@oj-module/cli 0.2.64 → 0.2.67

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 (369) hide show
  1. package/bin/.oj-version +1 -0
  2. package/bin/oj +4 -0
  3. package/devkit/README.md +18 -4
  4. package/devkit/SKILL.md +35 -3
  5. package/devkit/framework-dev.md +22 -11
  6. package/devkit/manual.md +161 -68
  7. package/devkit/menu-rules.md +4 -1
  8. package/devkit/publish-walkthrough.md +110 -37
  9. package/devkit/wecom-internal-app.md +7 -2
  10. package/devkit/wecom-multi-corp-links.md +163 -0
  11. package/package.json +3 -2
  12. package/shell-dist/assets/ahooks.2l850ymmh0.js +18 -0
  13. package/shell-dist/assets/antd-es-locale-zh_CN.1gjjsvxbf0.js +1 -0
  14. package/shell-dist/assets/antd-img-crop.196rkty480.js +99 -0
  15. package/shell-dist/assets/antd-locale-en_US.561tozx860.js +1 -0
  16. package/shell-dist/assets/antd-locale-zh_CN.1cmpmgzh70.js +1 -0
  17. package/shell-dist/assets/antd.uw1coq15l0.js +348 -0
  18. package/shell-dist/assets/clsx.jotilrt2e0.js +1 -0
  19. package/shell-dist/assets/contract-errors.2o17vz9u50.js +1 -0
  20. package/shell-dist/assets/contract.3h327o3mj0.js +57 -0
  21. package/shell-dist/assets/cssinjs.atgmhan7m0.js +3 -0
  22. package/shell-dist/assets/dayjs-plugin-advancedFormat.3vsyd2eis0.js +1 -0
  23. package/shell-dist/assets/dayjs-plugin-customParseFormat.13xhghv1d0.js +1 -0
  24. package/shell-dist/assets/dayjs-plugin-isoWeek.1fn1tw82p0.js +1 -0
  25. package/shell-dist/assets/dayjs-plugin-localeData.2rwbjp9nk0.js +1 -0
  26. package/shell-dist/assets/dayjs-plugin-quarterOfYear.2oqo1lcx80.js +1 -0
  27. package/shell-dist/assets/dayjs-plugin-relativeTime.2pqs3et4y0.js +1 -0
  28. package/shell-dist/assets/dayjs-plugin-weekOfYear.gvn9iph080.js +1 -0
  29. package/shell-dist/assets/dayjs-plugin-weekYear.2u78l3ex10.js +1 -0
  30. package/shell-dist/assets/dayjs-plugin-weekday.2d56a4tml0.js +1 -0
  31. package/shell-dist/assets/dayjs.pa60l6wjo0.js +1 -0
  32. package/shell-dist/assets/dnd-kit-core.1xyreig6r0.js +5 -0
  33. package/shell-dist/assets/dnd-kit-sortable.s94qciuft0.js +1 -0
  34. package/shell-dist/assets/dnd-kit-utilities.1umw4xphb0.js +1 -0
  35. package/shell-dist/assets/i18next.33zqofapj0.js +1 -0
  36. package/shell-dist/assets/icons-es-components-Context.365qmflwg0.js +1 -0
  37. package/shell-dist/assets/icons.159wjwals0.js +57 -0
  38. package/shell-dist/assets/{index-xZhmujjM.js → index.6alqyx6ae0.js} +21 -1
  39. package/shell-dist/assets/jsx-dev-runtime.3uibuc82f0.js +14 -0
  40. package/shell-dist/assets/jsx-runtime.h40xu4o5b0.js +14 -0
  41. package/shell-dist/assets/keepalive-for-react.xenu5vam70.js +1 -0
  42. package/shell-dist/assets/kit.37kr8ui390.js +1 -0
  43. package/shell-dist/assets/ky.1cgch7gu60.js +6 -0
  44. package/shell-dist/assets/motion-react.pjsxytvjs0.js +12 -0
  45. package/shell-dist/assets/motion.21tciqutg0.js +4 -0
  46. package/shell-dist/assets/nprogress.2nz76n9ny0.js +7 -0
  47. package/shell-dist/assets/ojm-dayjs-locale-zh-cn.3vr3beiyp0.js +9 -0
  48. package/shell-dist/assets/pinyin-pro.3v0mnxczn0.js +1 -0
  49. package/shell-dist/assets/pro-components.2kyot1vcl0.js +83 -0
  50. package/shell-dist/assets/react-countup.2x8idnr8y0.js +10 -0
  51. package/shell-dist/assets/react-dom-client.ick0v05ob0.js +43 -0
  52. package/shell-dist/assets/react-dom.2so9uxg3f0.js +22 -0
  53. package/shell-dist/assets/react-error-boundary.2dncdfj3b0.js +1 -0
  54. package/shell-dist/assets/react-i18next.auhvjhqv00.js +1 -0
  55. package/shell-dist/assets/react-jss.1ei6dr9e00.js +29 -0
  56. package/shell-dist/assets/react-query.3rln45ow00.js +1 -0
  57. package/shell-dist/assets/react-router-dom.3c6zld8h40.js +44 -0
  58. package/shell-dist/assets/react-router.2h9rebcv50.js +56 -0
  59. package/shell-dist/assets/react.1ew63mwts0.js +14 -0
  60. package/shell-dist/assets/runtime.2dgstpjsu0.js +21702 -0
  61. package/shell-dist/assets/simplebar-react.2g739uvai0.js +1 -0
  62. package/shell-dist/assets/spin-delay.yjeyj6iwp0.js +9 -0
  63. package/shell-dist/assets/tailwind-merge.125ehiqjw0.js +1 -0
  64. package/shell-dist/assets/use-sync-external-store-shim.1nz1pi9bb0.js +22 -0
  65. package/shell-dist/assets/zustand-middleware.1xaxjueme0.js +6 -0
  66. package/shell-dist/assets/zustand-react-shallow.pybayv1hx0.js +1 -0
  67. package/shell-dist/assets/zustand-react.9fsl9brxy0.js +1 -0
  68. package/shell-dist/assets/zustand-shallow.6cz0yyv9x0.js +1 -0
  69. package/shell-dist/assets/zustand-vanilla-shallow.3424monv50.js +1 -0
  70. package/shell-dist/assets/zustand-vanilla.1mo3ka3g30.js +1 -0
  71. package/shell-dist/assets/zustand.3gjgzlnqo0.js +1 -0
  72. package/shell-dist/index.html +67 -118
  73. package/shell-dist/versions.json +3 -3
  74. package/src/__tests__/publish-keygen.test.ts +157 -0
  75. package/src/__tests__/templates-migration-schema-parity.test.ts +540 -0
  76. package/src/__tests__/templates-schema-columns.test.ts +15 -2
  77. package/src/__tests__/templates-tenant-scope.test.ts +6 -2
  78. package/src/bundle.ts +8 -3
  79. package/src/cli.ts +17 -5
  80. package/src/dev.ts +15 -10
  81. package/src/esm-exports.ts +152 -70
  82. package/src/install.ts +11 -4
  83. package/src/keygen.ts +54 -0
  84. package/src/lifecycle/__tests__/bundle.test.ts +21 -3
  85. package/src/lifecycle/__tests__/fixtures/fixture-valid/api/src/demo-solution/manifest.yaml +1 -1
  86. package/src/lifecycle/__tests__/fixtures/fixture-valid/api/src/demo-solution/migrations/0001__init.sql +2 -2
  87. package/src/lifecycle/__tests__/fixtures/fixture-valid/api/src/demo-solution/schema.yaml +5 -2
  88. package/src/lifecycle/__tests__/fixtures/fixture-valid/manifest.yaml +1 -1
  89. package/src/lifecycle/__tests__/manifest-contract.test.ts +75 -3
  90. package/src/lifecycle/__tests__/smoke.test.ts +2 -2
  91. package/src/manifest-contract.ts +91 -8
  92. package/src/market/bootstrap.ts +26 -2
  93. package/src/market/command.ts +1 -0
  94. package/src/market/publish.ts +5 -1
  95. package/src/market/walkthrough.ts +24 -8
  96. package/src/shared-deps.ts +69 -19
  97. package/src/site-base.ts +4 -0
  98. package/src/site.ts +2 -0
  99. package/src/usage.ts +8 -4
  100. package/src/vendor.ts +5 -1
  101. package/templates/config.yaml +4 -2
  102. package/templates/init.include.yaml +8 -3
  103. package/templates/openapi.json +460 -1
  104. package/templates/src/app/api/_platform/_lifecycle/compensate.ts +136 -0
  105. package/templates/src/app/api/_platform/_lifecycle/installer.ts +71 -22
  106. package/templates/src/app/api/_platform/_lifecycle/lock.ts +23 -0
  107. package/templates/src/app/api/_platform/_lifecycle/steps/deploy-web.ts +28 -0
  108. package/templates/src/app/api/_platform/_lifecycle/steps/preflight.ts +46 -0
  109. package/templates/src/app/api/_platform/_lifecycle/steps/reload.ts +100 -36
  110. package/templates/src/app/api/_platform/_lifecycle/steps/smoke.ts +7 -15
  111. package/templates/src/app/api/_platform/_lifecycle/text-edit.ts +71 -19
  112. package/templates/src/app/api/_platform/_lifecycle/types.ts +26 -2
  113. package/templates/src/app/api/_platform/_lifecycle/uninstall.ts +93 -14
  114. package/templates/src/app/api/_platform/_shared/service/domain/settings.ts +8 -4
  115. package/templates/src/app/api/_platform/manifest.yaml +1 -0
  116. package/templates/src/app/api/_platform/market/api.ts +235 -10
  117. package/templates/src/app/api/_platform/migrations/0001__baseline.mysql.sql +178 -0
  118. package/templates/src/app/api/_platform/migrations/0001__baseline.pg.sql +173 -0
  119. package/templates/src/app/api/_platform/migrations/0001__baseline.sql +188 -0
  120. package/templates/src/app/api/_platform/migrations/0002__market_release.mysql.sql +17 -0
  121. package/templates/src/app/api/_platform/migrations/0002__market_release.pg.sql +16 -0
  122. package/templates/src/app/api/_platform/migrations/0002__market_release.sql +33 -0
  123. package/templates/src/app/api/_platform/schema.yaml +18 -0
  124. package/templates/src/app/api/_platform/seed.mysql.sql +10 -0
  125. package/templates/src/app/api/_platform/seed.pg.sql +10 -0
  126. package/templates/src/app/api/auth/_shared/wecom/client.ts +24 -4
  127. package/templates/src/app/api/home/migrations/0001__create_home_tables.mysql.sql +14 -0
  128. package/templates/src/app/api/home/migrations/0001__create_home_tables.pg.sql +14 -0
  129. package/templates/src/app/api/home/migrations/0002__tenant.pg.sql +4 -0
  130. package/templates/src/app/api/home/seed.mysql.sql +71 -0
  131. package/templates/src/app/api/home/seed.pg.sql +71 -0
  132. package/templates/src/app/api/notification/_shared/notify.ts +6 -6
  133. package/templates/src/app/api/notification/migrations/0001__create_notifications.mysql.sql +11 -0
  134. package/templates/src/app/api/notification/migrations/0001__create_notifications.pg.sql +11 -0
  135. package/templates/src/app/api/notification/migrations/0002__notifications_user.mysql.sql +8 -0
  136. package/templates/src/app/api/notification/migrations/0003__notifications_broadcast.mysql.sql +21 -0
  137. package/templates/src/app/api/notification/migrations/0003__notifications_broadcast.pg.sql +22 -0
  138. package/templates/src/app/api/notification/migrations/0004__notifications_broadcast_hidden.mysql.sql +10 -0
  139. package/templates/src/app/api/notification/migrations/0004__notifications_broadcast_hidden.pg.sql +11 -0
  140. package/templates/src/app/api/notification/migrations/0005__tenant.pg.sql +6 -0
  141. package/templates/src/app/api/notification/seed.mysql.sql +8 -0
  142. package/templates/src/app/api/notification/seed.pg.sql +11 -0
  143. package/templates/src/app/api/publish/_shared/identity.ts +69 -0
  144. package/templates/src/app/api/publish/api.ts +349 -0
  145. package/templates/src/app/api/publish/manifest.yaml +8 -0
  146. package/templates/src/app/api/publish/migrations/0001__publish_credential.mysql.sql +23 -0
  147. package/templates/src/app/api/publish/migrations/0001__publish_credential.pg.sql +23 -0
  148. package/templates/src/app/api/publish/migrations/0001__publish_credential.sql +39 -0
  149. package/templates/src/app/api/publish/schema.yaml +33 -0
  150. package/templates/src/app/api/system/login-methods/api.ts +2 -1
  151. package/templates/src/app/web/_platform/__client/api.schemas.ts +15 -0
  152. package/templates/src/app/web/_platform/__client/index.ts +25 -1
  153. package/templates/src/app/web/entry.ts +9 -5
  154. package/templates/src/app/web/home/pages/components/bar-chart.tsx +5 -3
  155. package/templates/src/app/web/home/pages/components/echarts-setup.ts +30 -0
  156. package/templates/src/app/web/home/pages/components/line-chart.tsx +5 -3
  157. package/templates/src/app/web/home/pages/components/pie-chart.tsx +6 -3
  158. package/templates/src/app/web/home/pages/index.tsx +3 -2
  159. package/templates/src/app/web/home/routes.ts +8 -2
  160. package/templates/src/app/web/login/locales/en-US.json +7 -1
  161. package/templates/src/app/web/login/locales/zh-CN.json +7 -1
  162. package/templates/src/app/web/login/pages/login.tsx +79 -86
  163. package/templates/src/app/web/login/routes.ts +54 -1
  164. package/templates/src/app/web/personal-center/locales/en-US.json +1 -0
  165. package/templates/src/app/web/personal-center/locales/zh-CN.json +1 -0
  166. package/templates/src/app/web/personal-center/pages/my-profile/index.tsx +5 -0
  167. package/templates/src/app/web/system/__client/api.schemas.ts +2 -1
  168. package/templates/src/app/web/system/locales/en-US.json +1 -8
  169. package/templates/src/app/web/system/locales/zh-CN.json +1 -8
  170. package/templates/src/app/web/system/pages/settings/index.tsx +17 -4
  171. package/templates/src/app/web/system/routes.ts +0 -6
  172. package/templates/src/oj-market/web/__tests__/CardGrid.test.tsx +33 -0
  173. package/templates/src/oj-market/web/__tests__/DetailDrawer.test.tsx +69 -0
  174. package/templates/src/oj-market/web/__tests__/marketClient.fake.ts +7 -1
  175. package/templates/src/oj-market/web/api/client.ts +3 -0
  176. package/templates/src/oj-market/web/api/defaultClient.ts +5 -0
  177. package/templates/src/oj-market/web/components/CardItem.tsx +44 -1
  178. package/templates/src/oj-market/web/components/DetailDrawer.tsx +17 -1
  179. package/templates/src/oj-market/web/entry.ts +31 -2
  180. package/templates/src/oj-market/web/locales/en-US.json +5 -1
  181. package/templates/src/oj-market/web/locales/zh-CN.json +5 -1
  182. package/templates/src/oj-market/web/publish/__client/api.schemas.ts +61 -0
  183. package/templates/src/oj-market/web/publish/__client/index.ts +164 -0
  184. package/templates/src/oj-market/web/publish/locales/en-US.json +80 -0
  185. package/templates/src/oj-market/web/publish/locales/zh-CN.json +80 -0
  186. package/templates/src/oj-market/web/publish/pages/history.tsx +112 -0
  187. package/templates/src/oj-market/web/publish/pages/index.tsx +196 -0
  188. package/templates/src/oj-market/web/publish/pages/model.ts +52 -0
  189. package/templates/src/oj-market/web/publish/pages/token-modal.tsx +82 -0
  190. package/templates/src/oj-market/web/publish/routes.ts +41 -0
  191. package/templates/src/oj-market/web/types.ts +30 -0
  192. package/templates/tests/lifecycle/compensate.spec.ts +207 -0
  193. package/templates/tests/lifecycle/deploy-smoke.spec.ts +38 -14
  194. package/templates/tests/lifecycle/installer.spec.ts +28 -9
  195. package/templates/tests/lifecycle/market-api.spec.ts +164 -12
  196. package/templates/tests/lifecycle/preflight.spec.ts +68 -0
  197. package/templates/tests/lifecycle/role-title-translate.spec.ts +2 -32
  198. package/templates/tests/lifecycle/text-edit.spec.ts +45 -27
  199. package/templates/tests/lifecycle/uninstall.spec.ts +36 -0
  200. package/templates/tests/publish-credential.spec.ts +354 -0
  201. package/templates/tests/publish-identity.spec.ts +44 -0
  202. package/templates/tests/wecom-client-timeout.spec.ts +33 -3
  203. package/templates/tests/wecom-landing.spec.ts +63 -1
  204. package/templates/tsconfig.paths.json +1 -0
  205. package/templates/web.config.ts +6 -4
  206. package/vendor/host-versions.json +3 -3
  207. package/shell-dist/assets/ahooks.js +0 -6909
  208. package/shell-dist/assets/antd-es-locale-zh_CN.js +0 -257
  209. package/shell-dist/assets/antd-img-crop.js +0 -1495
  210. package/shell-dist/assets/antd-locale-en_US.js +0 -374
  211. package/shell-dist/assets/antd-locale-zh_CN.js +0 -379
  212. package/shell-dist/assets/antd.js +0 -106874
  213. package/shell-dist/assets/clsx.js +0 -33
  214. package/shell-dist/assets/contract-errors.js +0 -30
  215. package/shell-dist/assets/contract.js +0 -18900
  216. package/shell-dist/assets/cssinjs.js +0 -2595
  217. package/shell-dist/assets/dayjs-plugin-advancedFormat.js +0 -98
  218. package/shell-dist/assets/dayjs-plugin-customParseFormat.js +0 -173
  219. package/shell-dist/assets/dayjs-plugin-isoWeek.js +0 -77
  220. package/shell-dist/assets/dayjs-plugin-localeData.js +0 -126
  221. package/shell-dist/assets/dayjs-plugin-quarterOfYear.js +0 -77
  222. package/shell-dist/assets/dayjs-plugin-relativeTime.js +0 -92
  223. package/shell-dist/assets/dayjs-plugin-weekOfYear.js +0 -73
  224. package/shell-dist/assets/dayjs-plugin-weekYear.js +0 -63
  225. package/shell-dist/assets/dayjs-plugin-weekday.js +0 -63
  226. package/shell-dist/assets/dayjs.js +0 -326
  227. package/shell-dist/assets/dnd-kit-core.js +0 -3601
  228. package/shell-dist/assets/dnd-kit-sortable.js +0 -717
  229. package/shell-dist/assets/dnd-kit-utilities.js +0 -340
  230. package/shell-dist/assets/i18next.js +0 -2321
  231. package/shell-dist/assets/icons-es-components-Context.js +0 -20
  232. package/shell-dist/assets/icons.js +0 -34961
  233. package/shell-dist/assets/jsx-dev-runtime.js +0 -75
  234. package/shell-dist/assets/jsx-runtime.js +0 -97
  235. package/shell-dist/assets/keepalive-for-react.js +0 -283
  236. package/shell-dist/assets/kit.js +0 -151
  237. package/shell-dist/assets/ky.js +0 -1427
  238. package/shell-dist/assets/motion-react.js +0 -13589
  239. package/shell-dist/assets/motion.js +0 -9959
  240. package/shell-dist/assets/nprogress.js +0 -314
  241. package/shell-dist/assets/ojm--ant-design-icons-es-icons-BarsOutlined.js +0 -7
  242. package/shell-dist/assets/ojm--ant-design-icons-es-icons-CalendarOutlined.js +0 -7
  243. package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretDownFilled.js +0 -7
  244. package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretDownOutlined.js +0 -7
  245. package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretUpOutlined.js +0 -7
  246. package/shell-dist/assets/ojm--ant-design-icons-es-icons-CheckCircleFilled.js +0 -7
  247. package/shell-dist/assets/ojm--ant-design-icons-es-icons-CheckOutlined.js +0 -7
  248. package/shell-dist/assets/ojm--ant-design-icons-es-icons-ClockCircleOutlined.js +0 -7
  249. package/shell-dist/assets/ojm--ant-design-icons-es-icons-CloseCircleFilled.js +0 -7
  250. package/shell-dist/assets/ojm--ant-design-icons-es-icons-CloseOutlined.js +0 -7
  251. package/shell-dist/assets/ojm--ant-design-icons-es-icons-CopyOutlined.js +0 -7
  252. package/shell-dist/assets/ojm--ant-design-icons-es-icons-DeleteOutlined.js +0 -7
  253. package/shell-dist/assets/ojm--ant-design-icons-es-icons-DoubleLeftOutlined.js +0 -7
  254. package/shell-dist/assets/ojm--ant-design-icons-es-icons-DoubleRightOutlined.js +0 -7
  255. package/shell-dist/assets/ojm--ant-design-icons-es-icons-DownOutlined.js +0 -7
  256. package/shell-dist/assets/ojm--ant-design-icons-es-icons-DownloadOutlined.js +0 -7
  257. package/shell-dist/assets/ojm--ant-design-icons-es-icons-EditOutlined.js +0 -7
  258. package/shell-dist/assets/ojm--ant-design-icons-es-icons-EllipsisOutlined.js +0 -7
  259. package/shell-dist/assets/ojm--ant-design-icons-es-icons-EnterOutlined.js +0 -7
  260. package/shell-dist/assets/ojm--ant-design-icons-es-icons-ExclamationCircleFilled.js +0 -7
  261. package/shell-dist/assets/ojm--ant-design-icons-es-icons-EyeInvisibleOutlined.js +0 -7
  262. package/shell-dist/assets/ojm--ant-design-icons-es-icons-EyeOutlined.js +0 -7
  263. package/shell-dist/assets/ojm--ant-design-icons-es-icons-FileOutlined.js +0 -7
  264. package/shell-dist/assets/ojm--ant-design-icons-es-icons-FileTextOutlined.js +0 -7
  265. package/shell-dist/assets/ojm--ant-design-icons-es-icons-FilterFilled.js +0 -7
  266. package/shell-dist/assets/ojm--ant-design-icons-es-icons-FolderOpenOutlined.js +0 -7
  267. package/shell-dist/assets/ojm--ant-design-icons-es-icons-FolderOutlined.js +0 -7
  268. package/shell-dist/assets/ojm--ant-design-icons-es-icons-HolderOutlined.js +0 -7
  269. package/shell-dist/assets/ojm--ant-design-icons-es-icons-InfoCircleFilled.js +0 -7
  270. package/shell-dist/assets/ojm--ant-design-icons-es-icons-LeftOutlined.js +0 -7
  271. package/shell-dist/assets/ojm--ant-design-icons-es-icons-LoadingOutlined.js +0 -7
  272. package/shell-dist/assets/ojm--ant-design-icons-es-icons-MinusOutlined.js +0 -7
  273. package/shell-dist/assets/ojm--ant-design-icons-es-icons-MinusSquareOutlined.js +0 -7
  274. package/shell-dist/assets/ojm--ant-design-icons-es-icons-PaperClipOutlined.js +0 -7
  275. package/shell-dist/assets/ojm--ant-design-icons-es-icons-PictureOutlined.js +0 -7
  276. package/shell-dist/assets/ojm--ant-design-icons-es-icons-PlusOutlined.js +0 -7
  277. package/shell-dist/assets/ojm--ant-design-icons-es-icons-PlusSquareOutlined.js +0 -7
  278. package/shell-dist/assets/ojm--ant-design-icons-es-icons-QuestionCircleOutlined.js +0 -7
  279. package/shell-dist/assets/ojm--ant-design-icons-es-icons-ReloadOutlined.js +0 -7
  280. package/shell-dist/assets/ojm--ant-design-icons-es-icons-RightOutlined.js +0 -7
  281. package/shell-dist/assets/ojm--ant-design-icons-es-icons-RotateLeftOutlined.js +0 -7
  282. package/shell-dist/assets/ojm--ant-design-icons-es-icons-RotateRightOutlined.js +0 -7
  283. package/shell-dist/assets/ojm--ant-design-icons-es-icons-SearchOutlined.js +0 -7
  284. package/shell-dist/assets/ojm--ant-design-icons-es-icons-StarFilled.js +0 -7
  285. package/shell-dist/assets/ojm--ant-design-icons-es-icons-SwapOutlined.js +0 -7
  286. package/shell-dist/assets/ojm--ant-design-icons-es-icons-SwapRightOutlined.js +0 -7
  287. package/shell-dist/assets/ojm--ant-design-icons-es-icons-UpOutlined.js +0 -7
  288. package/shell-dist/assets/ojm--ant-design-icons-es-icons-VerticalAlignTopOutlined.js +0 -7
  289. package/shell-dist/assets/ojm--ant-design-icons-es-icons-WarningFilled.js +0 -7
  290. package/shell-dist/assets/ojm--ant-design-icons-es-icons-ZoomInOutlined.js +0 -7
  291. package/shell-dist/assets/ojm--ant-design-icons-es-icons-ZoomOutOutlined.js +0 -7
  292. package/shell-dist/assets/ojm-dayjs-locale-zh-cn.js +0 -81
  293. package/shell-dist/assets/pinyin-pro.js +0 -25175
  294. package/shell-dist/assets/pro-components.js +0 -44627
  295. package/shell-dist/assets/react-countup.js +0 -525
  296. package/shell-dist/assets/react-dom-client.js +0 -12134
  297. package/shell-dist/assets/react-dom.js +0 -266
  298. package/shell-dist/assets/react-error-boundary.js +0 -141
  299. package/shell-dist/assets/react-i18next.js +0 -1773
  300. package/shell-dist/assets/react-jss.js +0 -4089
  301. package/shell-dist/assets/react-query.js +0 -3072
  302. package/shell-dist/assets/react-router-dom.js +0 -9927
  303. package/shell-dist/assets/react-router.js +0 -14584
  304. package/shell-dist/assets/react.js +0 -590
  305. package/shell-dist/assets/runtime.js +0 -28311
  306. package/shell-dist/assets/simplebar-react.js +0 -1119
  307. package/shell-dist/assets/spin-delay.js +0 -111
  308. package/shell-dist/assets/tailwind-merge.js +0 -3364
  309. package/shell-dist/assets/use-sync-external-store-shim.js +0 -130
  310. package/shell-dist/assets/zustand-middleware.js +0 -513
  311. package/shell-dist/assets/zustand-react-shallow.js +0 -27
  312. package/shell-dist/assets/zustand-react.js +0 -39
  313. package/shell-dist/assets/zustand-shallow.js +0 -22
  314. package/shell-dist/assets/zustand-vanilla-shallow.js +0 -71
  315. package/shell-dist/assets/zustand-vanilla.js +0 -40
  316. package/shell-dist/assets/zustand.js +0 -32
  317. package/templates/seed.mysql.sql +0 -6
  318. package/templates/seed.pg.sql +0 -6
  319. package/templates/src/app/api/_platform/migrations/0001__create_users.mysql.sql +0 -9
  320. package/templates/src/app/api/_platform/migrations/0001__create_users.pg.sql +0 -9
  321. package/templates/src/app/api/_platform/migrations/0001__create_users.sql +0 -7
  322. package/templates/src/app/api/_platform/migrations/0002__add_users_avatar_base64.mysql.sql +0 -3
  323. package/templates/src/app/api/_platform/migrations/0002__add_users_avatar_base64.sql +0 -2
  324. package/templates/src/app/api/_platform/migrations/0003__users_source_display_name.mysql.sql +0 -5
  325. package/templates/src/app/api/_platform/migrations/0003__users_source_display_name.sql +0 -5
  326. package/templates/src/app/api/_platform/migrations/0004__sys_rbac.mysql.sql +0 -70
  327. package/templates/src/app/api/_platform/migrations/0004__sys_rbac.pg.sql +0 -67
  328. package/templates/src/app/api/_platform/migrations/0004__sys_rbac.sql +0 -67
  329. package/templates/src/app/api/_platform/migrations/0005__users_must_change.mysql.sql +0 -3
  330. package/templates/src/app/api/_platform/migrations/0005__users_must_change.sql +0 -2
  331. package/templates/src/app/api/_platform/migrations/0006__users_is_forbidden.mysql.sql +0 -3
  332. package/templates/src/app/api/_platform/migrations/0006__users_is_forbidden.sql +0 -3
  333. package/templates/src/app/api/_platform/migrations/0007__users_email.sql +0 -3
  334. package/templates/src/app/api/_platform/migrations/0008__sys_refresh_token.mysql.sql +0 -10
  335. package/templates/src/app/api/_platform/migrations/0008__sys_refresh_token.pg.sql +0 -10
  336. package/templates/src/app/api/_platform/migrations/0008__sys_refresh_token.sql +0 -11
  337. package/templates/src/app/api/_platform/migrations/0009__sys_throttle.mysql.sql +0 -12
  338. package/templates/src/app/api/_platform/migrations/0009__sys_throttle.pg.sql +0 -12
  339. package/templates/src/app/api/_platform/migrations/0009__sys_throttle.sql +0 -13
  340. package/templates/src/app/api/_platform/migrations/0010__sys_solution_route.mysql.sql +0 -17
  341. package/templates/src/app/api/_platform/migrations/0010__sys_solution_route.pg.sql +0 -16
  342. package/templates/src/app/api/_platform/migrations/0010__sys_solution_route.sql +0 -18
  343. package/templates/src/app/api/_platform/migrations/0011__sys_setting_group_label.mysql.sql +0 -2
  344. package/templates/src/app/api/_platform/migrations/0011__sys_setting_group_label.sql +0 -4
  345. package/templates/src/app/api/_platform/migrations/0012__market_history.mysql.sql +0 -13
  346. package/templates/src/app/api/_platform/migrations/0012__market_history.pg.sql +0 -12
  347. package/templates/src/app/api/_platform/migrations/0012__market_history.sql +0 -14
  348. package/templates/src/app/api/_platform/migrations/0013__users_profile.sql +0 -4
  349. package/templates/src/app/api/_platform/migrations/0014__reg_source_seq.mysql.sql +0 -9
  350. package/templates/src/app/api/_platform/migrations/0014__reg_source_seq.pg.sql +0 -7
  351. package/templates/src/app/api/_platform/migrations/0014__reg_source_seq.sql +0 -8
  352. package/templates/src/app/api/_platform/migrations/0015__tenant.mysql.sql +0 -12
  353. package/templates/src/app/api/_platform/migrations/0015__tenant.pg.sql +0 -11
  354. package/templates/src/app/api/_platform/migrations/0015__tenant.sql +0 -44
  355. package/templates/src/app/api/_platform/migrations/0016__org.mysql.sql +0 -41
  356. package/templates/src/app/api/_platform/migrations/0016__org.pg.sql +0 -40
  357. package/templates/src/app/api/_platform/migrations/0016__org.sql +0 -62
  358. package/templates/src/app/api/_platform/migrations/0017__users_employee_no.mysql.sql +0 -7
  359. package/templates/src/app/api/_platform/migrations/0017__users_employee_no.pg.sql +0 -4
  360. package/templates/src/app/api/_platform/migrations/0017__users_employee_no.sql +0 -8
  361. package/templates/src/app/api/_platform/migrations/0018__sys_role_title_key.mysql.sql +0 -3
  362. package/templates/src/app/api/_platform/migrations/0018__sys_role_title_key.pg.sql +0 -3
  363. package/templates/src/app/api/_platform/migrations/0018__sys_role_title_key.sql +0 -8
  364. package/templates/src/app/web/system/pages/login-methods/index.tsx +0 -30
  365. /package/shell-dist/assets/{nprogress-css.js → nprogress-css.1cq2pzkre0.js} +0 -0
  366. /package/shell-dist/assets/{ojm-antd-es-button.js → ojm-antd-es-button.2uriphio50.js} +0 -0
  367. /package/shell-dist/assets/{ojm-antd-es-modal.js → ojm-antd-es-modal.bf3tgdh8v0.js} +0 -0
  368. /package/shell-dist/assets/{ojm-antd-es-slider.js → ojm-antd-es-slider.xyvptuhid0.js} +0 -0
  369. /package/shell-dist/assets/{ojm-antd-es-upload.js → ojm-antd-es-upload.13gx45e0g0.js} +0 -0
@@ -1,1773 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/index.js
8
- var es_exports = {};
9
- __export(es_exports, {
10
- I18nContext: () => I18nContext,
11
- I18nextProvider: () => I18nextProvider,
12
- IcuTrans: () => IcuTrans,
13
- IcuTransWithoutContext: () => IcuTransWithoutContext,
14
- Trans: () => Trans2,
15
- TransWithoutContext: () => Trans,
16
- Translation: () => Translation,
17
- composeInitialProps: () => composeInitialProps,
18
- date: () => date,
19
- getDefaults: () => getDefaults,
20
- getI18n: () => getI18n,
21
- getInitialProps: () => getInitialProps,
22
- initReactI18next: () => initReactI18next,
23
- nodesToString: () => nodesToString,
24
- number: () => number,
25
- plural: () => plural,
26
- select: () => select,
27
- selectOrdinal: () => selectOrdinal,
28
- setDefaults: () => setDefaults,
29
- setI18n: () => setI18n,
30
- time: () => time,
31
- useSSR: () => useSSR,
32
- useTranslation: () => useTranslation,
33
- withSSR: () => withSSR,
34
- withTranslation: () => withTranslation
35
- });
36
-
37
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/Trans.js
38
- import { useContext } from "react";
39
-
40
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/TransWithoutContext.js
41
- import { Fragment, isValidElement, cloneElement, createElement, Children } from "react";
42
- import { keyFromSelector } from "i18next";
43
-
44
- // ../../node_modules/.pnpm/html-parse-stringify@4.0.1/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js
45
- var voidElements = {
46
- area: true,
47
- base: true,
48
- br: true,
49
- col: true,
50
- embed: true,
51
- hr: true,
52
- img: true,
53
- input: true,
54
- link: true,
55
- meta: true,
56
- param: true,
57
- source: true,
58
- track: true,
59
- wbr: true,
60
- "!doctype": true,
61
- "!DOCTYPE": true
62
- };
63
- var attrRE = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;
64
- function parseTag(tag) {
65
- const res = {
66
- type: "tag",
67
- name: "",
68
- voidElement: false,
69
- attrs: {},
70
- children: []
71
- };
72
- const tagMatch = tag.match(/<\/?([^\s]+?)[/\s>]/);
73
- if (tagMatch) {
74
- res.name = tagMatch[1];
75
- if (voidElements[tagMatch[1]] || tag.charAt(tag.length - 2) === "/") {
76
- res.voidElement = true;
77
- }
78
- if (res.name.startsWith("!--")) {
79
- const endIndex = tag.indexOf("-->");
80
- return {
81
- type: "comment",
82
- comment: endIndex !== -1 ? tag.slice(4, endIndex) : ""
83
- };
84
- }
85
- }
86
- const reg = new RegExp(attrRE);
87
- let result = null;
88
- for (; ; ) {
89
- result = reg.exec(tag);
90
- if (result === null) {
91
- break;
92
- }
93
- if (!result[0].trim()) {
94
- continue;
95
- }
96
- if (result[1]) {
97
- const attr = result[1].trim();
98
- let arr = [attr, null];
99
- const eq = attr.indexOf("=");
100
- if (eq > -1) {
101
- arr = [attr.slice(0, eq), attr.slice(eq + 1)];
102
- }
103
- res.attrs[arr[0]] = arr[1];
104
- reg.lastIndex--;
105
- } else if (result[2]) {
106
- res.attrs[result[2]] = result[3].trim().substring(1, result[3].length - 1);
107
- }
108
- }
109
- return res;
110
- }
111
- var tagRE = /<!--[\s\S]*?-->|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g;
112
- var tagNameRE = /<\/?([^\s]+?)[/\s>]/;
113
- var whitespaceRE = /^\s*$/;
114
- var rawTextRE = /^(script|style)$/i;
115
- var sentinel = "\0";
116
- var empty = /* @__PURE__ */ Object.create(null);
117
- function restoreSentinels(nodes) {
118
- nodes.forEach(function(node) {
119
- if (node.type === "text") {
120
- node.content = node.content.split(sentinel).join("<");
121
- return;
122
- }
123
- if (node.type === "comment") {
124
- node.comment = node.comment.split(sentinel).join("<");
125
- return;
126
- }
127
- for (const key in node.attrs) {
128
- const value = node.attrs[key];
129
- if (typeof value === "string" && value.indexOf(sentinel) > -1) {
130
- node.attrs[key] = value.split(sentinel).join("<");
131
- }
132
- }
133
- if (node.children.length) {
134
- restoreSentinels(node.children);
135
- }
136
- });
137
- }
138
- function parse(html, options) {
139
- const components = options && options.components || empty;
140
- const allowedTags = options && options.allowedTags;
141
- let restoreNeeded = false;
142
- if (allowedTags) {
143
- const isAllowed = typeof allowedTags === "function" ? allowedTags : function(name) {
144
- return allowedTags.indexOf(name) > -1;
145
- };
146
- let out = "";
147
- let pos = 0;
148
- tagRE.lastIndex = 0;
149
- let am;
150
- while (am = tagRE.exec(html)) {
151
- const tag = am[0];
152
- out += html.slice(pos, am.index);
153
- const nameMatch = tag.match(tagNameRE);
154
- if (tag.startsWith("<!--") || nameMatch && isAllowed(nameMatch[1])) {
155
- out += tag;
156
- pos = am.index + tag.length;
157
- } else {
158
- restoreNeeded = true;
159
- out += sentinel;
160
- pos = am.index + 1;
161
- tagRE.lastIndex = pos;
162
- }
163
- }
164
- html = out + html.slice(pos);
165
- }
166
- const result = [];
167
- const arr = [];
168
- let current;
169
- let level = -1;
170
- let inComponent = false;
171
- let rawUntil = 0;
172
- let htmlLower;
173
- if (html.indexOf("<") !== 0) {
174
- const end = html.indexOf("<");
175
- result.push({
176
- type: "text",
177
- content: end === -1 ? html : html.substring(0, end)
178
- });
179
- }
180
- const matches = [];
181
- let m;
182
- while (m = tagRE.exec(html)) {
183
- matches.push(m);
184
- }
185
- matches.forEach(function(match, i) {
186
- const tag = match[0];
187
- if (!tag) return;
188
- if (tag.startsWith("<!--")) return;
189
- let lts = 0;
190
- let gts = 0;
191
- let secondLt = -1;
192
- let quote = null;
193
- for (let j = 0; j < tag.length; j++) {
194
- const c = tag.charAt(j);
195
- if (quote) {
196
- if (c === quote) quote = null;
197
- } else if (c === '"' || c === "'") {
198
- quote = c;
199
- } else if (c === "<") {
200
- lts++;
201
- if (lts === 2) secondLt = j;
202
- } else if (c === ">") {
203
- gts++;
204
- }
205
- }
206
- const validSplit = secondLt > -1 && /[a-zA-Z0-9\-!/]/.test(tag.charAt(secondLt + 1));
207
- if (lts > gts && validSplit) {
208
- const firstPart = tag.substring(0, secondLt);
209
- const secondPart = tag.substring(firstPart.length);
210
- matches[i][0] = secondPart;
211
- matches[i].index += firstPart.length;
212
- }
213
- });
214
- matches.forEach(function(match, i) {
215
- const tag = match[0];
216
- if (!tag) return;
217
- const index2 = match.index;
218
- if (index2 < rawUntil) return;
219
- if (inComponent) {
220
- if (tag !== "</" + current.name + ">") {
221
- return;
222
- } else {
223
- inComponent = false;
224
- }
225
- }
226
- const isOpen = tag.charAt(1) !== "/";
227
- const isComment = tag.startsWith("<!--");
228
- const start = index2 + tag.length;
229
- const nextChar = html.charAt(start);
230
- const nextMatch = matches[i + 1];
231
- let isText;
232
- if (nextChar === "<" && nextMatch) {
233
- const nextTag = html.substring(start, nextMatch.index);
234
- isText = nextTag.split("<").length > nextTag.split(">").length;
235
- }
236
- let parent;
237
- if (isComment) {
238
- const comment = parseTag(tag);
239
- if (level < 0) {
240
- result.push(comment);
241
- return result;
242
- }
243
- parent = arr[level];
244
- parent.children.push(comment);
245
- const text = html.slice(start, nextMatch ? nextMatch.index : void 0);
246
- if (text.length > 0) {
247
- parent.children.push({
248
- type: "text",
249
- content: text
250
- });
251
- }
252
- return result;
253
- }
254
- if (isOpen) {
255
- level++;
256
- current = parseTag(tag);
257
- if (current.type === "tag" && components[current.name]) {
258
- current.type = "component";
259
- inComponent = true;
260
- }
261
- let isRawText = false;
262
- if (!inComponent && !current.voidElement && rawTextRE.test(current.name)) {
263
- isRawText = true;
264
- htmlLower || (htmlLower = html.toLowerCase());
265
- const closeIndex = htmlLower.indexOf(
266
- "</" + current.name.toLowerCase() + ">",
267
- start
268
- );
269
- const contentEnd = closeIndex === -1 ? html.length : closeIndex;
270
- const content = html.slice(start, contentEnd);
271
- if (content) {
272
- current.children.push({
273
- type: "text",
274
- content
275
- });
276
- }
277
- rawUntil = contentEnd;
278
- }
279
- if (!current.voidElement && !inComponent && !isRawText && nextChar && nextChar !== "<") {
280
- current.children.push({
281
- type: "text",
282
- content: html.slice(start, nextMatch ? nextMatch.index : void 0)
283
- });
284
- }
285
- if (level === 0) {
286
- result.push(current);
287
- }
288
- parent = arr[level - 1];
289
- if (parent) {
290
- parent.children.push(current);
291
- }
292
- arr[level] = current;
293
- }
294
- if (!isOpen || current.voidElement) {
295
- if (level > -1 && (current.voidElement || current.name === tag.slice(2, -1))) {
296
- level--;
297
- current = level === -1 ? result : arr[level];
298
- }
299
- if (!inComponent && (nextChar !== "<" || isText) && nextChar) {
300
- parent = level === -1 ? result : arr[level].children;
301
- const end = nextMatch ? nextMatch.index : -1;
302
- let content = html.slice(start, end === -1 ? void 0 : end);
303
- if (whitespaceRE.test(content)) {
304
- content = " ";
305
- }
306
- if (end > -1 && level + parent.length >= 0 || content !== " ") {
307
- parent.push({
308
- type: "text",
309
- content
310
- });
311
- }
312
- }
313
- }
314
- });
315
- if (restoreNeeded) {
316
- restoreSentinels(result);
317
- }
318
- return result;
319
- }
320
- function attrString(attrs) {
321
- const buff = [];
322
- for (const key in attrs) {
323
- if (attrs[key] === null) {
324
- buff.push(key);
325
- } else {
326
- buff.push(key + '="' + String(attrs[key]).replace(/"/g, "&quot;") + '"');
327
- }
328
- }
329
- if (!buff.length) {
330
- return "";
331
- }
332
- return " " + buff.join(" ");
333
- }
334
- function stringifyNode(buff, doc) {
335
- switch (doc.type) {
336
- case "text":
337
- return buff + doc.content;
338
- case "tag": {
339
- const tagEnd = doc.voidElement && doc.name.toLowerCase() !== "!doctype" ? "/>" : ">";
340
- buff += "<" + doc.name + (doc.attrs ? attrString(doc.attrs) : "") + tagEnd;
341
- if (doc.voidElement) {
342
- return buff;
343
- }
344
- return buff + doc.children.reduce(stringifyNode, "") + "</" + doc.name + ">";
345
- }
346
- case "comment":
347
- buff += "<!--" + doc.comment + "-->";
348
- return buff;
349
- }
350
- }
351
- function stringify(doc) {
352
- return doc.reduce(function(token, rootEl) {
353
- return token + stringifyNode("", rootEl);
354
- }, "");
355
- }
356
- var index = {
357
- parse,
358
- stringify
359
- };
360
-
361
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/utils.js
362
- var warn = (i18n, code, msg, rest) => {
363
- const args = [msg, {
364
- code,
365
- ...rest || {}
366
- }];
367
- if (i18n?.services?.logger?.forward) {
368
- return i18n.services.logger.forward(args, "warn", "react-i18next::", true);
369
- }
370
- if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
371
- if (i18n?.services?.logger?.warn) {
372
- i18n.services.logger.warn(...args);
373
- } else if (console?.warn) {
374
- console.warn(...args);
375
- }
376
- };
377
- var alreadyWarned = {};
378
- var warnOnce = (i18n, code, msg, rest) => {
379
- if (isString(msg) && alreadyWarned[msg]) return;
380
- if (isString(msg)) alreadyWarned[msg] = /* @__PURE__ */ new Date();
381
- warn(i18n, code, msg, rest);
382
- };
383
- var loadedClb = (i18n, cb) => () => {
384
- if (i18n.isInitialized) {
385
- cb();
386
- } else {
387
- const initialized = () => {
388
- setTimeout(() => {
389
- i18n.off("initialized", initialized);
390
- }, 0);
391
- cb();
392
- };
393
- i18n.on("initialized", initialized);
394
- }
395
- };
396
- var loadNamespaces = (i18n, ns, cb) => {
397
- i18n.loadNamespaces(ns, loadedClb(i18n, cb));
398
- };
399
- var loadLanguages = (i18n, lng, ns, cb) => {
400
- if (isString(ns)) ns = [ns];
401
- if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
402
- ns.forEach((n) => {
403
- if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
404
- });
405
- i18n.loadLanguages(lng, loadedClb(i18n, cb));
406
- };
407
- var hasLoadedNamespace = (ns, i18n, options = {}) => {
408
- if (!i18n.languages || !i18n.languages.length) {
409
- warnOnce(i18n, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
410
- languages: i18n.languages
411
- });
412
- return true;
413
- }
414
- return i18n.hasLoadedNamespace(ns, {
415
- lng: options.lng,
416
- precheck: (i18nInstance2, loadNotPending) => {
417
- if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
418
- }
419
- });
420
- };
421
- var getDisplayName = (Component) => Component.displayName || Component.name || (isString(Component) && Component.length > 0 ? Component : "Unknown");
422
- var isString = (obj) => typeof obj === "string";
423
- var isObject = (obj) => typeof obj === "object" && obj !== null;
424
-
425
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/unescape.js
426
- var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
427
- var htmlEntities = {
428
- "&amp;": "&",
429
- "&#38;": "&",
430
- "&lt;": "<",
431
- "&#60;": "<",
432
- "&gt;": ">",
433
- "&#62;": ">",
434
- "&apos;": "'",
435
- "&#39;": "'",
436
- "&quot;": '"',
437
- "&#34;": '"',
438
- "&nbsp;": " ",
439
- "&#160;": " ",
440
- "&copy;": "\xA9",
441
- "&#169;": "\xA9",
442
- "&reg;": "\xAE",
443
- "&#174;": "\xAE",
444
- "&hellip;": "\u2026",
445
- "&#8230;": "\u2026",
446
- "&#x2F;": "/",
447
- "&#47;": "/"
448
- };
449
- var unescapeHtmlEntity = (m) => htmlEntities[m];
450
- var unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
451
-
452
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/defaults.js
453
- var defaultOptions = {
454
- bindI18n: "languageChanged",
455
- bindI18nStore: "",
456
- transEmptyNodeValue: "",
457
- transSupportBasicHtmlNodes: true,
458
- transWrapTextNodes: "",
459
- transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
460
- useSuspense: true,
461
- unescape,
462
- transDefaultProps: void 0
463
- };
464
- var setDefaults = (options = {}) => {
465
- defaultOptions = {
466
- ...defaultOptions,
467
- ...options
468
- };
469
- };
470
- var getDefaults = () => defaultOptions;
471
-
472
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/i18nInstance.js
473
- var i18nInstance;
474
- var setI18n = (instance) => {
475
- i18nInstance = instance;
476
- };
477
- var getI18n = () => i18nInstance;
478
-
479
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/TransWithoutContext.js
480
- var hasChildren = (node, checkLength) => {
481
- if (!node) return false;
482
- const base = node.props?.children ?? node.children;
483
- if (checkLength) return base.length > 0;
484
- return !!base;
485
- };
486
- var getChildren = (node) => {
487
- if (!node) return [];
488
- const children = node.props?.children ?? node.children;
489
- return node.props?.i18nIsDynamicList ? getAsArray(children) : children;
490
- };
491
- var hasValidReactChildren = (children) => Array.isArray(children) && children.every(isValidElement);
492
- var getAsArray = (data) => Array.isArray(data) ? data : [data];
493
- var mergeProps = (source, target) => {
494
- const newTarget = {
495
- ...target
496
- };
497
- newTarget.props = {
498
- ...target.props,
499
- ...source.props
500
- };
501
- return newTarget;
502
- };
503
- var getValuesFromChildren = (children) => {
504
- const values = {};
505
- if (!children) return values;
506
- const getData = (childs) => {
507
- const childrenArray = getAsArray(childs);
508
- childrenArray.forEach((child) => {
509
- if (isString(child)) return;
510
- if (hasChildren(child)) getData(getChildren(child));
511
- else if (isObject(child) && !isValidElement(child)) Object.assign(values, child);
512
- });
513
- };
514
- getData(children);
515
- return values;
516
- };
517
- var nodesToString = (children, i18nOptions, i18n, i18nKey) => {
518
- if (!children) return "";
519
- let stringNode = "";
520
- const childrenArray = getAsArray(children);
521
- const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];
522
- childrenArray.forEach((child, childIndex) => {
523
- if (isString(child)) {
524
- stringNode += `${child}`;
525
- return;
526
- }
527
- if (isValidElement(child)) {
528
- const {
529
- props,
530
- type
531
- } = child;
532
- const childPropsCount = Object.keys(props).length;
533
- const shouldKeepChild = keepArray.indexOf(type) > -1;
534
- const childChildren = props.children;
535
- if (!childChildren && shouldKeepChild && !childPropsCount) {
536
- stringNode += `<${type}/>`;
537
- return;
538
- }
539
- if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {
540
- stringNode += `<${childIndex}></${childIndex}>`;
541
- return;
542
- }
543
- if (shouldKeepChild && childPropsCount <= 1) {
544
- const cnt = isString(childChildren) ? childChildren : nodesToString(childChildren, i18nOptions, i18n, i18nKey);
545
- stringNode += `<${type}>${cnt}</${type}>`;
546
- return;
547
- }
548
- const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);
549
- stringNode += `<${childIndex}>${content}</${childIndex}>`;
550
- return;
551
- }
552
- if (child === null) {
553
- warn(i18n, "TRANS_NULL_VALUE", `Passed in a null value as child`, {
554
- i18nKey
555
- });
556
- return;
557
- }
558
- if (isObject(child)) {
559
- const {
560
- format,
561
- ...clone
562
- } = child;
563
- const keys = Object.keys(clone);
564
- if (keys.length === 1) {
565
- const value = format ? `${keys[0]}, ${format}` : keys[0];
566
- stringNode += `{{${value}}}`;
567
- return;
568
- }
569
- warn(i18n, "TRANS_INVALID_OBJ", `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {
570
- i18nKey,
571
- child
572
- });
573
- return;
574
- }
575
- warn(i18n, "TRANS_INVALID_VAR", `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {
576
- i18nKey,
577
- child
578
- });
579
- });
580
- return stringNode;
581
- };
582
- var renderNodes = (children, knownComponentsMap, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {
583
- if (targetString === "") return [];
584
- const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];
585
- const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map((keep) => `<${keep}`).join("|")).test(targetString);
586
- if (!children && !knownComponentsMap && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];
587
- const data = knownComponentsMap ?? {};
588
- const getData = (childs) => {
589
- const childrenArray = getAsArray(childs);
590
- childrenArray.forEach((child) => {
591
- if (isString(child)) return;
592
- if (hasChildren(child)) getData(getChildren(child));
593
- else if (isObject(child) && !isValidElement(child)) Object.assign(data, child);
594
- });
595
- };
596
- getData(children);
597
- const knownNames = Object.keys(data);
598
- const allowedTags = (name) => /^\d+$/.test(name) || keepArray.indexOf(name) > -1 || knownNames.indexOf(name) > -1;
599
- const ast = index.parse(`<0>${targetString}</0>`, {
600
- allowedTags
601
- });
602
- const opts = {
603
- ...data,
604
- ...combinedTOpts
605
- };
606
- const renderInner = (child, node, rootReactNode) => {
607
- const childs = getChildren(child);
608
- const mappedChildren = mapAST(childs, node.children, rootReactNode);
609
- return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;
610
- };
611
- const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {
612
- if (child.dummy) {
613
- child.children = inner;
614
- mem.push(cloneElement(child, {
615
- key: i
616
- }, isVoid ? void 0 : inner));
617
- } else {
618
- mem.push(...Children.map([child], (c) => {
619
- if (c.type === Fragment || c.props?.i18nIsDynamicList !== void 0) {
620
- const freshProps = {
621
- key: i
622
- };
623
- if (c && c.props) {
624
- Object.keys(c.props).forEach((k) => {
625
- if (k === "children" || k === "i18nIsDynamicList") return;
626
- freshProps[k] = c.props[k];
627
- });
628
- }
629
- return createElement(c.type, freshProps, isVoid ? null : inner);
630
- }
631
- const override = {
632
- key: i
633
- };
634
- if (c && c.props) {
635
- Object.keys(c.props).forEach((k) => {
636
- if (k === "ref" || k === "children") return;
637
- override[k] = c.props[k];
638
- });
639
- }
640
- return cloneElement(c, override, isVoid ? null : inner);
641
- }));
642
- }
643
- };
644
- const mapAST = (reactNode, astNode, rootReactNode) => {
645
- const reactNodes = getAsArray(reactNode);
646
- const astNodes = getAsArray(astNode);
647
- const keepTagOccurrence = {};
648
- return astNodes.reduce((mem, node, i) => {
649
- const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);
650
- if (node.type === "tag") {
651
- let tmp = reactNodes[parseInt(node.name, 10)];
652
- if (!tmp && knownComponentsMap) tmp = knownComponentsMap[node.name];
653
- if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];
654
- if (!tmp) tmp = {};
655
- const props = {
656
- ...node.attrs
657
- };
658
- if (shouldUnescape) {
659
- Object.keys(props).forEach((p) => {
660
- const val = props[p];
661
- if (isString(val)) {
662
- props[p] = unescape(val);
663
- }
664
- });
665
- }
666
- const child = Object.keys(props).length !== 0 ? mergeProps({
667
- props
668
- }, tmp) : tmp;
669
- const isElement = isValidElement(child);
670
- const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;
671
- const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;
672
- const isKnownComponent = isObject(knownComponentsMap) && Object.hasOwnProperty.call(knownComponentsMap, node.name);
673
- if (isString(child)) {
674
- const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);
675
- mem.push(value);
676
- } else if (hasChildren(child) || isValidTranslationWithChildren) {
677
- const inner = renderInner(child, node, rootReactNode);
678
- pushTranslatedJSX(child, inner, mem, i);
679
- } else if (isEmptyTransWithHTML) {
680
- const inner = mapAST(reactNodes, node.children, rootReactNode);
681
- pushTranslatedJSX(child, inner, mem, i);
682
- } else if (Number.isNaN(parseFloat(node.name))) {
683
- if (isKnownComponent) {
684
- const inner = renderInner(child, node, rootReactNode);
685
- pushTranslatedJSX(child, inner, mem, i, node.voidElement);
686
- } else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {
687
- if (node.voidElement) {
688
- mem.push(createElement(node.name, {
689
- key: `${node.name}-${i}`
690
- }));
691
- } else {
692
- const occurrence = keepTagOccurrence[node.name] || 0;
693
- keepTagOccurrence[node.name] = occurrence + 1;
694
- let matched;
695
- let seen = 0;
696
- for (let r = 0; r < reactNodes.length; r += 1) {
697
- const rn = reactNodes[r];
698
- if (isValidElement(rn) && rn.type === node.name) {
699
- if (seen === occurrence) {
700
- matched = rn;
701
- break;
702
- }
703
- seen += 1;
704
- }
705
- }
706
- const innerScope = matched ? getAsArray(getChildren(matched)) : reactNodes;
707
- const inner = mapAST(innerScope, node.children, rootReactNode);
708
- mem.push(createElement(node.name, {
709
- key: `${node.name}-${i}`
710
- }, inner));
711
- }
712
- } else if (node.voidElement) {
713
- mem.push(`<${node.name} />`);
714
- } else {
715
- const inner = mapAST(reactNodes, node.children, rootReactNode);
716
- mem.push(`<${node.name}>${inner}</${node.name}>`);
717
- }
718
- } else if (isObject(child) && !isElement) {
719
- const content = node.children[0] ? translationContent : null;
720
- if (content) mem.push(content);
721
- } else {
722
- pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);
723
- }
724
- } else if (node.type === "text") {
725
- const wrapTextNodes = i18nOptions.transWrapTextNodes;
726
- const unescapeFn = typeof i18nOptions.unescape === "function" ? i18nOptions.unescape : getDefaults().unescape;
727
- const content = shouldUnescape ? unescapeFn(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);
728
- if (wrapTextNodes) {
729
- mem.push(createElement(wrapTextNodes, {
730
- key: `${node.name}-${i}`
731
- }, content));
732
- } else {
733
- mem.push(content);
734
- }
735
- }
736
- return mem;
737
- }, []);
738
- };
739
- const result = mapAST([{
740
- dummy: true,
741
- children: children || []
742
- }], ast, getAsArray(children || []));
743
- return getChildren(result[0]);
744
- };
745
- var fixComponentProps = (component, index2, translation) => {
746
- const componentKey = component.key || index2;
747
- const comp = cloneElement(component, {
748
- key: componentKey
749
- });
750
- if (!comp.props || !comp.props.children || translation.indexOf(`${index2}/>`) < 0 && translation.indexOf(`${index2} />`) < 0) {
751
- return comp;
752
- }
753
- function Componentized() {
754
- return createElement(Fragment, null, comp);
755
- }
756
- return createElement(Componentized, {
757
- key: componentKey
758
- });
759
- };
760
- var generateArrayComponents = (components, translation) => components.map((c, index2) => fixComponentProps(c, index2, translation));
761
- var generateObjectComponents = (components, translation) => {
762
- const componentMap = {};
763
- Object.keys(components).forEach((c) => {
764
- Object.assign(componentMap, {
765
- [c]: fixComponentProps(components[c], c, translation)
766
- });
767
- });
768
- return componentMap;
769
- };
770
- var generateComponents = (components, translation, i18n, i18nKey) => {
771
- if (!components) return null;
772
- if (Array.isArray(components)) {
773
- return generateArrayComponents(components, translation);
774
- }
775
- if (isObject(components)) {
776
- return generateObjectComponents(components, translation);
777
- }
778
- warnOnce(i18n, "TRANS_INVALID_COMPONENTS", `<Trans /> "components" prop expects an object or array`, {
779
- i18nKey
780
- });
781
- return null;
782
- };
783
- var isComponentsMap = (object) => {
784
- if (!isObject(object)) return false;
785
- if (Array.isArray(object)) return false;
786
- return Object.keys(object).reduce((acc, key) => acc && Number.isNaN(Number.parseFloat(key)), true);
787
- };
788
- function Trans({
789
- children,
790
- count,
791
- parent,
792
- i18nKey,
793
- context,
794
- tOptions = {},
795
- values,
796
- defaults,
797
- components,
798
- ns,
799
- i18n: i18nFromProps,
800
- t: tFromProps,
801
- shouldUnescape,
802
- ...additionalProps
803
- }) {
804
- const i18n = i18nFromProps || getI18n();
805
- if (!i18n) {
806
- 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.`, {
807
- i18nKey
808
- });
809
- return children;
810
- }
811
- const t = tFromProps || i18n.t.bind(i18n) || ((k) => k);
812
- const reactI18nextOptions = {
813
- ...getDefaults(),
814
- ...i18n.options?.react
815
- };
816
- let namespaces = ns || t.ns || i18n.options?.defaultNS;
817
- namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
818
- const {
819
- transDefaultProps
820
- } = reactI18nextOptions;
821
- const mergedTOptions = transDefaultProps?.tOptions ? {
822
- ...transDefaultProps.tOptions,
823
- ...tOptions
824
- } : tOptions;
825
- const mergedShouldUnescape = shouldUnescape ?? transDefaultProps?.shouldUnescape;
826
- const mergedValues = transDefaultProps?.values ? {
827
- ...transDefaultProps.values,
828
- ...values
829
- } : values;
830
- const mergedComponents = transDefaultProps?.components ? {
831
- ...transDefaultProps.components,
832
- ...components
833
- } : components;
834
- const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);
835
- const defaultValue = defaults || mergedTOptions?.defaultValue || nodeAsString || reactI18nextOptions.transEmptyNodeValue || (typeof i18nKey === "function" ? keyFromSelector(i18nKey) : i18nKey);
836
- const {
837
- hashTransKey
838
- } = reactI18nextOptions;
839
- const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);
840
- if (i18n.options?.interpolation?.defaultVariables) {
841
- values = mergedValues && Object.keys(mergedValues).length > 0 ? {
842
- ...mergedValues,
843
- ...i18n.options.interpolation.defaultVariables
844
- } : {
845
- ...i18n.options.interpolation.defaultVariables
846
- };
847
- } else {
848
- values = mergedValues;
849
- }
850
- const valuesFromChildren = getValuesFromChildren(children);
851
- if (valuesFromChildren && typeof valuesFromChildren.count === "number" && count === void 0) {
852
- count = valuesFromChildren.count;
853
- }
854
- const interpolationOverride = values || count !== void 0 && !i18n.options?.interpolation?.alwaysFormat || !children ? mergedTOptions.interpolation : {
855
- interpolation: {
856
- ...mergedTOptions.interpolation,
857
- prefix: "#$?",
858
- suffix: "?$#"
859
- }
860
- };
861
- const combinedTOpts = {
862
- ...mergedTOptions,
863
- context: context || mergedTOptions.context,
864
- count,
865
- ...values,
866
- ...interpolationOverride,
867
- defaultValue,
868
- ns: namespaces
869
- };
870
- let translation = key ? t(key, combinedTOpts) : defaultValue;
871
- if (translation === key && defaultValue) translation = defaultValue;
872
- const generatedComponents = generateComponents(mergedComponents, translation, i18n, i18nKey);
873
- let indexedChildren = generatedComponents || children;
874
- let componentsMap = null;
875
- if (isComponentsMap(generatedComponents)) {
876
- componentsMap = generatedComponents;
877
- indexedChildren = children;
878
- }
879
- const content = renderNodes(indexedChildren, componentsMap, translation, i18n, reactI18nextOptions, combinedTOpts, mergedShouldUnescape);
880
- const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;
881
- return useAsParent ? createElement(useAsParent, additionalProps, content) : content;
882
- }
883
-
884
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/context.js
885
- import { createContext } from "react";
886
-
887
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/initReactI18next.js
888
- var initReactI18next = {
889
- type: "3rdParty",
890
- init(instance) {
891
- setDefaults(instance.options.react);
892
- setI18n(instance);
893
- }
894
- };
895
-
896
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/context.js
897
- var I18nContext = createContext();
898
- var ReportNamespaces = class {
899
- constructor() {
900
- this.usedNamespaces = {};
901
- }
902
- addUsedNamespaces(namespaces) {
903
- namespaces.forEach((ns) => {
904
- if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
905
- });
906
- }
907
- getUsedNamespaces() {
908
- return Object.keys(this.usedNamespaces);
909
- }
910
- };
911
- var composeInitialProps = (ForComponent) => async (ctx) => {
912
- const componentsInitialProps = await ForComponent.getInitialProps?.(ctx) ?? {};
913
- const i18nInitialProps = getInitialProps();
914
- return {
915
- ...componentsInitialProps,
916
- ...i18nInitialProps
917
- };
918
- };
919
- var getInitialProps = () => {
920
- const i18n = getI18n();
921
- if (!i18n) {
922
- console.warn("react-i18next:: getInitialProps: You will need to pass in an i18next instance by using initReactI18next");
923
- return {};
924
- }
925
- const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];
926
- const ret = {};
927
- const initialI18nStore = {};
928
- i18n.languages.forEach((l) => {
929
- initialI18nStore[l] = {};
930
- namespaces.forEach((ns) => {
931
- initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};
932
- });
933
- });
934
- ret.initialI18nStore = initialI18nStore;
935
- ret.initialLanguage = i18n.language;
936
- return ret;
937
- };
938
-
939
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/Trans.js
940
- function Trans2({
941
- children,
942
- count,
943
- parent,
944
- i18nKey,
945
- context,
946
- tOptions = {},
947
- values,
948
- defaults,
949
- components,
950
- ns,
951
- i18n: i18nFromProps,
952
- t: tFromProps,
953
- shouldUnescape,
954
- ...additionalProps
955
- }) {
956
- const {
957
- i18n: i18nFromContext,
958
- defaultNS: defaultNSFromContext
959
- } = useContext(I18nContext) || {};
960
- const i18n = i18nFromProps || i18nFromContext || getI18n();
961
- const t = tFromProps || i18n?.t.bind(i18n);
962
- return Trans({
963
- children,
964
- count,
965
- parent,
966
- i18nKey,
967
- context,
968
- tOptions,
969
- values,
970
- defaults,
971
- components,
972
- ns: ns || t?.ns || defaultNSFromContext || i18n?.options?.defaultNS,
973
- i18n,
974
- t: tFromProps,
975
- shouldUnescape,
976
- ...additionalProps
977
- });
978
- }
979
-
980
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/IcuTrans.js
981
- import { useContext as useContext2 } from "react";
982
-
983
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/IcuTransWithoutContext.js
984
- import React2 from "react";
985
-
986
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/IcuTransUtils/TranslationParserError.js
987
- var TranslationParserError = class _TranslationParserError extends Error {
988
- constructor(message, position, translationString) {
989
- super(message);
990
- this.name = "TranslationParserError";
991
- this.position = position;
992
- this.translationString = translationString;
993
- if (Error.captureStackTrace) {
994
- Error.captureStackTrace(this, _TranslationParserError);
995
- }
996
- }
997
- };
998
-
999
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/IcuTransUtils/htmlEntityDecoder.js
1000
- var commonEntities = {
1001
- "&nbsp;": "\xA0",
1002
- "&amp;": "&",
1003
- "&lt;": "<",
1004
- "&gt;": ">",
1005
- "&quot;": '"',
1006
- "&apos;": "'",
1007
- "&copy;": "\xA9",
1008
- "&reg;": "\xAE",
1009
- "&trade;": "\u2122",
1010
- "&hellip;": "\u2026",
1011
- "&ndash;": "\u2013",
1012
- "&mdash;": "\u2014",
1013
- "&lsquo;": "\u2018",
1014
- "&rsquo;": "\u2019",
1015
- "&sbquo;": "\u201A",
1016
- "&ldquo;": "\u201C",
1017
- "&rdquo;": "\u201D",
1018
- "&bdquo;": "\u201E",
1019
- "&dagger;": "\u2020",
1020
- "&Dagger;": "\u2021",
1021
- "&bull;": "\u2022",
1022
- "&prime;": "\u2032",
1023
- "&Prime;": "\u2033",
1024
- "&lsaquo;": "\u2039",
1025
- "&rsaquo;": "\u203A",
1026
- "&sect;": "\xA7",
1027
- "&para;": "\xB6",
1028
- "&middot;": "\xB7",
1029
- "&ensp;": "\u2002",
1030
- "&emsp;": "\u2003",
1031
- "&thinsp;": "\u2009",
1032
- "&euro;": "\u20AC",
1033
- "&pound;": "\xA3",
1034
- "&yen;": "\xA5",
1035
- "&cent;": "\xA2",
1036
- "&curren;": "\xA4",
1037
- "&times;": "\xD7",
1038
- "&divide;": "\xF7",
1039
- "&minus;": "\u2212",
1040
- "&plusmn;": "\xB1",
1041
- "&ne;": "\u2260",
1042
- "&le;": "\u2264",
1043
- "&ge;": "\u2265",
1044
- "&asymp;": "\u2248",
1045
- "&equiv;": "\u2261",
1046
- "&infin;": "\u221E",
1047
- "&int;": "\u222B",
1048
- "&sum;": "\u2211",
1049
- "&prod;": "\u220F",
1050
- "&radic;": "\u221A",
1051
- "&part;": "\u2202",
1052
- "&permil;": "\u2030",
1053
- "&deg;": "\xB0",
1054
- "&micro;": "\xB5",
1055
- "&larr;": "\u2190",
1056
- "&uarr;": "\u2191",
1057
- "&rarr;": "\u2192",
1058
- "&darr;": "\u2193",
1059
- "&harr;": "\u2194",
1060
- "&crarr;": "\u21B5",
1061
- "&lArr;": "\u21D0",
1062
- "&uArr;": "\u21D1",
1063
- "&rArr;": "\u21D2",
1064
- "&dArr;": "\u21D3",
1065
- "&hArr;": "\u21D4",
1066
- "&alpha;": "\u03B1",
1067
- "&beta;": "\u03B2",
1068
- "&gamma;": "\u03B3",
1069
- "&delta;": "\u03B4",
1070
- "&epsilon;": "\u03B5",
1071
- "&zeta;": "\u03B6",
1072
- "&eta;": "\u03B7",
1073
- "&theta;": "\u03B8",
1074
- "&iota;": "\u03B9",
1075
- "&kappa;": "\u03BA",
1076
- "&lambda;": "\u03BB",
1077
- "&mu;": "\u03BC",
1078
- "&nu;": "\u03BD",
1079
- "&xi;": "\u03BE",
1080
- "&omicron;": "\u03BF",
1081
- "&pi;": "\u03C0",
1082
- "&rho;": "\u03C1",
1083
- "&sigma;": "\u03C3",
1084
- "&tau;": "\u03C4",
1085
- "&upsilon;": "\u03C5",
1086
- "&phi;": "\u03C6",
1087
- "&chi;": "\u03C7",
1088
- "&psi;": "\u03C8",
1089
- "&omega;": "\u03C9",
1090
- "&Alpha;": "\u0391",
1091
- "&Beta;": "\u0392",
1092
- "&Gamma;": "\u0393",
1093
- "&Delta;": "\u0394",
1094
- "&Epsilon;": "\u0395",
1095
- "&Zeta;": "\u0396",
1096
- "&Eta;": "\u0397",
1097
- "&Theta;": "\u0398",
1098
- "&Iota;": "\u0399",
1099
- "&Kappa;": "\u039A",
1100
- "&Lambda;": "\u039B",
1101
- "&Mu;": "\u039C",
1102
- "&Nu;": "\u039D",
1103
- "&Xi;": "\u039E",
1104
- "&Omicron;": "\u039F",
1105
- "&Pi;": "\u03A0",
1106
- "&Rho;": "\u03A1",
1107
- "&Sigma;": "\u03A3",
1108
- "&Tau;": "\u03A4",
1109
- "&Upsilon;": "\u03A5",
1110
- "&Phi;": "\u03A6",
1111
- "&Chi;": "\u03A7",
1112
- "&Psi;": "\u03A8",
1113
- "&Omega;": "\u03A9",
1114
- "&Agrave;": "\xC0",
1115
- "&Aacute;": "\xC1",
1116
- "&Acirc;": "\xC2",
1117
- "&Atilde;": "\xC3",
1118
- "&Auml;": "\xC4",
1119
- "&Aring;": "\xC5",
1120
- "&AElig;": "\xC6",
1121
- "&Ccedil;": "\xC7",
1122
- "&Egrave;": "\xC8",
1123
- "&Eacute;": "\xC9",
1124
- "&Ecirc;": "\xCA",
1125
- "&Euml;": "\xCB",
1126
- "&Igrave;": "\xCC",
1127
- "&Iacute;": "\xCD",
1128
- "&Icirc;": "\xCE",
1129
- "&Iuml;": "\xCF",
1130
- "&ETH;": "\xD0",
1131
- "&Ntilde;": "\xD1",
1132
- "&Ograve;": "\xD2",
1133
- "&Oacute;": "\xD3",
1134
- "&Ocirc;": "\xD4",
1135
- "&Otilde;": "\xD5",
1136
- "&Ouml;": "\xD6",
1137
- "&Oslash;": "\xD8",
1138
- "&Ugrave;": "\xD9",
1139
- "&Uacute;": "\xDA",
1140
- "&Ucirc;": "\xDB",
1141
- "&Uuml;": "\xDC",
1142
- "&Yacute;": "\xDD",
1143
- "&THORN;": "\xDE",
1144
- "&szlig;": "\xDF",
1145
- "&agrave;": "\xE0",
1146
- "&aacute;": "\xE1",
1147
- "&acirc;": "\xE2",
1148
- "&atilde;": "\xE3",
1149
- "&auml;": "\xE4",
1150
- "&aring;": "\xE5",
1151
- "&aelig;": "\xE6",
1152
- "&ccedil;": "\xE7",
1153
- "&egrave;": "\xE8",
1154
- "&eacute;": "\xE9",
1155
- "&ecirc;": "\xEA",
1156
- "&euml;": "\xEB",
1157
- "&igrave;": "\xEC",
1158
- "&iacute;": "\xED",
1159
- "&icirc;": "\xEE",
1160
- "&iuml;": "\xEF",
1161
- "&eth;": "\xF0",
1162
- "&ntilde;": "\xF1",
1163
- "&ograve;": "\xF2",
1164
- "&oacute;": "\xF3",
1165
- "&ocirc;": "\xF4",
1166
- "&otilde;": "\xF5",
1167
- "&ouml;": "\xF6",
1168
- "&oslash;": "\xF8",
1169
- "&ugrave;": "\xF9",
1170
- "&uacute;": "\xFA",
1171
- "&ucirc;": "\xFB",
1172
- "&uuml;": "\xFC",
1173
- "&yacute;": "\xFD",
1174
- "&thorn;": "\xFE",
1175
- "&yuml;": "\xFF",
1176
- "&iexcl;": "\xA1",
1177
- "&iquest;": "\xBF",
1178
- "&fnof;": "\u0192",
1179
- "&circ;": "\u02C6",
1180
- "&tilde;": "\u02DC",
1181
- "&OElig;": "\u0152",
1182
- "&oelig;": "\u0153",
1183
- "&Scaron;": "\u0160",
1184
- "&scaron;": "\u0161",
1185
- "&Yuml;": "\u0178",
1186
- "&ordf;": "\xAA",
1187
- "&ordm;": "\xBA",
1188
- "&macr;": "\xAF",
1189
- "&acute;": "\xB4",
1190
- "&cedil;": "\xB8",
1191
- "&sup1;": "\xB9",
1192
- "&sup2;": "\xB2",
1193
- "&sup3;": "\xB3",
1194
- "&frac14;": "\xBC",
1195
- "&frac12;": "\xBD",
1196
- "&frac34;": "\xBE",
1197
- "&spades;": "\u2660",
1198
- "&clubs;": "\u2663",
1199
- "&hearts;": "\u2665",
1200
- "&diams;": "\u2666",
1201
- "&loz;": "\u25CA",
1202
- "&oline;": "\u203E",
1203
- "&frasl;": "\u2044",
1204
- "&weierp;": "\u2118",
1205
- "&image;": "\u2111",
1206
- "&real;": "\u211C",
1207
- "&alefsym;": "\u2135"
1208
- };
1209
- var entityPattern = new RegExp(Object.keys(commonEntities).map((entity) => entity.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), "g");
1210
- var decodeHtmlEntities = (text) => text.replace(entityPattern, (match) => commonEntities[match]).replace(/&#(\d+);/g, (_, num) => String.fromCharCode(parseInt(num, 10))).replace(/&#x([0-9a-fA-F]+);/g, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
1211
-
1212
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/IcuTransUtils/tokenizer.js
1213
- var tokenize = (translation) => {
1214
- const tokens = [];
1215
- let position = 0;
1216
- let currentText = "";
1217
- const flushText = () => {
1218
- if (currentText) {
1219
- tokens.push({
1220
- type: "Text",
1221
- value: currentText,
1222
- position: position - currentText.length
1223
- });
1224
- currentText = "";
1225
- }
1226
- };
1227
- while (position < translation.length) {
1228
- const char = translation[position];
1229
- if (char === "<") {
1230
- const tagMatch = translation.slice(position).match(/^<(\d+)>/);
1231
- if (tagMatch) {
1232
- flushText();
1233
- tokens.push({
1234
- type: "TagOpen",
1235
- value: tagMatch[0],
1236
- position,
1237
- tagNumber: parseInt(tagMatch[1], 10)
1238
- });
1239
- position += tagMatch[0].length;
1240
- } else {
1241
- const closeTagMatch = translation.slice(position).match(/^<\/(\d+)>/);
1242
- if (closeTagMatch) {
1243
- flushText();
1244
- tokens.push({
1245
- type: "TagClose",
1246
- value: closeTagMatch[0],
1247
- position,
1248
- tagNumber: parseInt(closeTagMatch[1], 10)
1249
- });
1250
- position += closeTagMatch[0].length;
1251
- } else {
1252
- currentText += char;
1253
- position += 1;
1254
- }
1255
- }
1256
- } else {
1257
- currentText += char;
1258
- position += 1;
1259
- }
1260
- }
1261
- flushText();
1262
- return tokens;
1263
- };
1264
-
1265
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/IcuTransUtils/renderTranslation.js
1266
- import React from "react";
1267
- var renderDeclarationNode = (declaration, children, childDeclarations) => {
1268
- const {
1269
- type,
1270
- props = {}
1271
- } = declaration;
1272
- if (props.children && Array.isArray(props.children) && childDeclarations) {
1273
- const {
1274
- children: _childrenToRemove,
1275
- ...propsWithoutChildren
1276
- } = props;
1277
- return React.createElement(type, propsWithoutChildren, ...children);
1278
- }
1279
- if (children.length === 0) {
1280
- return React.createElement(type, props);
1281
- }
1282
- if (children.length === 1) {
1283
- return React.createElement(type, props, children[0]);
1284
- }
1285
- return React.createElement(type, props, ...children);
1286
- };
1287
- var renderTranslation = (translation, declarations = []) => {
1288
- if (!translation) {
1289
- return [];
1290
- }
1291
- const tokens = tokenize(translation);
1292
- const result = [];
1293
- const stack = [];
1294
- const literalTagNumbers = /* @__PURE__ */ new Set();
1295
- const getCurrentDeclarations = () => {
1296
- if (stack.length === 0) {
1297
- return declarations;
1298
- }
1299
- const parentFrame = stack[stack.length - 1];
1300
- if (parentFrame.declaration.props?.children && Array.isArray(parentFrame.declaration.props.children)) {
1301
- return parentFrame.declaration.props.children;
1302
- }
1303
- return parentFrame.declarations;
1304
- };
1305
- tokens.forEach((token) => {
1306
- switch (token.type) {
1307
- case "Text":
1308
- {
1309
- const decoded = decodeHtmlEntities(token.value);
1310
- const targetArray = stack.length > 0 ? stack[stack.length - 1].children : result;
1311
- targetArray.push(decoded);
1312
- }
1313
- break;
1314
- case "TagOpen":
1315
- {
1316
- const {
1317
- tagNumber
1318
- } = token;
1319
- const currentDeclarations = getCurrentDeclarations();
1320
- const declaration = currentDeclarations[tagNumber];
1321
- if (!declaration) {
1322
- literalTagNumbers.add(tagNumber);
1323
- const literalText = `<${tagNumber}>`;
1324
- const targetArray = stack.length > 0 ? stack[stack.length - 1].children : result;
1325
- targetArray.push(literalText);
1326
- break;
1327
- }
1328
- stack.push({
1329
- tagNumber,
1330
- children: [],
1331
- position: token.position,
1332
- declaration,
1333
- declarations: currentDeclarations
1334
- });
1335
- }
1336
- break;
1337
- case "TagClose":
1338
- {
1339
- const {
1340
- tagNumber
1341
- } = token;
1342
- if (literalTagNumbers.has(tagNumber)) {
1343
- const literalText = `</${tagNumber}>`;
1344
- const literalTargetArray = stack.length > 0 ? stack[stack.length - 1].children : result;
1345
- literalTargetArray.push(literalText);
1346
- literalTagNumbers.delete(tagNumber);
1347
- break;
1348
- }
1349
- if (stack.length === 0) {
1350
- throw new TranslationParserError(`Unexpected closing tag </${tagNumber}> at position ${token.position}`, token.position, translation);
1351
- }
1352
- const frame = stack.pop();
1353
- if (frame.tagNumber !== tagNumber) {
1354
- throw new TranslationParserError(`Mismatched tags: expected </${frame.tagNumber}> but got </${tagNumber}> at position ${token.position}`, token.position, translation);
1355
- }
1356
- const element = renderDeclarationNode(frame.declaration, frame.children, frame.declarations);
1357
- const elementTargetArray = stack.length > 0 ? stack[stack.length - 1].children : result;
1358
- elementTargetArray.push(element);
1359
- }
1360
- break;
1361
- }
1362
- });
1363
- if (stack.length > 0) {
1364
- const unclosed = stack[stack.length - 1];
1365
- throw new TranslationParserError(`Unclosed tag <${unclosed.tagNumber}> at position ${unclosed.position}`, unclosed.position, translation);
1366
- }
1367
- return result;
1368
- };
1369
-
1370
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/IcuTransWithoutContext.js
1371
- function IcuTransWithoutContext({
1372
- i18nKey,
1373
- defaultTranslation,
1374
- content,
1375
- ns,
1376
- values = {},
1377
- i18n: i18nFromProps,
1378
- t: tFromProps
1379
- }) {
1380
- const i18n = i18nFromProps || getI18n();
1381
- if (!i18n) {
1382
- warnOnce(i18n, "NO_I18NEXT_INSTANCE", `IcuTrans: You need to pass in an i18next instance using i18nextReactModule`, {
1383
- i18nKey
1384
- });
1385
- return React2.createElement(React2.Fragment, {}, defaultTranslation);
1386
- }
1387
- const t = tFromProps || i18n.t?.bind(i18n) || ((k) => k);
1388
- let namespaces = ns || t.ns || i18n.options?.defaultNS;
1389
- namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
1390
- let mergedValues = values;
1391
- if (i18n.options?.interpolation?.defaultVariables) {
1392
- mergedValues = values && Object.keys(values).length > 0 ? {
1393
- ...values,
1394
- ...i18n.options.interpolation.defaultVariables
1395
- } : {
1396
- ...i18n.options.interpolation.defaultVariables
1397
- };
1398
- }
1399
- const translation = t(i18nKey || defaultTranslation, {
1400
- defaultValue: defaultTranslation,
1401
- ...mergedValues,
1402
- ns: namespaces
1403
- });
1404
- try {
1405
- const rendered = renderTranslation(translation, content);
1406
- return React2.createElement(React2.Fragment, {}, ...rendered);
1407
- } catch (error) {
1408
- warn(i18n, "ICU_TRANS_RENDER_ERROR", `IcuTrans component error for key "${i18nKey}": ${error.message}`, {
1409
- i18nKey,
1410
- error
1411
- });
1412
- return React2.createElement(React2.Fragment, {}, translation);
1413
- }
1414
- }
1415
- IcuTransWithoutContext.displayName = "IcuTransWithoutContext";
1416
-
1417
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/IcuTrans.js
1418
- function IcuTrans({
1419
- i18nKey,
1420
- defaultTranslation,
1421
- content,
1422
- ns,
1423
- values = {},
1424
- i18n: i18nFromProps,
1425
- t: tFromProps
1426
- }) {
1427
- const {
1428
- i18n: i18nFromContext,
1429
- defaultNS: defaultNSFromContext
1430
- } = useContext2(I18nContext) || {};
1431
- const i18n = i18nFromProps || i18nFromContext || getI18n();
1432
- const t = tFromProps || i18n?.t.bind(i18n);
1433
- return IcuTransWithoutContext({
1434
- i18nKey,
1435
- defaultTranslation,
1436
- content,
1437
- ns: ns || t?.ns || defaultNSFromContext || i18n?.options?.defaultNS,
1438
- values,
1439
- i18n,
1440
- t: tFromProps
1441
- });
1442
- }
1443
- IcuTrans.displayName = "IcuTrans";
1444
-
1445
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/useTranslation.js
1446
- import { useContext as useContext3, useCallback, useMemo, useEffect, useRef, useState } from "react";
1447
- import { useSyncExternalStore } from "use-sync-external-store/shim";
1448
- var notReadyT = (k, optsOrDefaultValue) => {
1449
- if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
1450
- if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
1451
- if (typeof k === "function") return "";
1452
- if (Array.isArray(k)) {
1453
- const last = k[k.length - 1];
1454
- return typeof last === "function" ? "" : last;
1455
- }
1456
- return k;
1457
- };
1458
- var notReadySnapshot = {
1459
- t: notReadyT,
1460
- ready: false
1461
- };
1462
- var dummySubscribe = () => () => {
1463
- };
1464
- var useTranslation = (ns, props = {}) => {
1465
- const {
1466
- i18n: i18nFromProps
1467
- } = props;
1468
- const {
1469
- i18n: i18nFromContext,
1470
- defaultNS: defaultNSFromContext
1471
- } = useContext3(I18nContext) || {};
1472
- const i18n = i18nFromProps || i18nFromContext || getI18n();
1473
- if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
1474
- if (!i18n) {
1475
- 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.");
1476
- }
1477
- const i18nOptions = useMemo(() => ({
1478
- ...getDefaults(),
1479
- ...i18n?.options?.react,
1480
- ...props
1481
- }), [i18n, props]);
1482
- const {
1483
- useSuspense,
1484
- keyPrefix
1485
- } = i18nOptions;
1486
- const nsOrContext = ns || defaultNSFromContext || i18n?.options?.defaultNS;
1487
- const unstableNamespaces = isString(nsOrContext) ? [nsOrContext] : nsOrContext || ["translation"];
1488
- const namespaces = useMemo(() => unstableNamespaces, unstableNamespaces);
1489
- i18n?.reportNamespaces?.addUsedNamespaces?.(namespaces);
1490
- const revisionRef = useRef(0);
1491
- const subscribe = useCallback((callback) => {
1492
- if (!i18n) return dummySubscribe;
1493
- const {
1494
- bindI18n,
1495
- bindI18nStore
1496
- } = i18nOptions;
1497
- const wrappedCallback = () => {
1498
- revisionRef.current += 1;
1499
- callback();
1500
- };
1501
- if (bindI18n) i18n.on(bindI18n, wrappedCallback);
1502
- if (bindI18nStore) i18n.store.on(bindI18nStore, wrappedCallback);
1503
- return () => {
1504
- if (bindI18n) bindI18n.split(" ").forEach((e) => i18n.off(e, wrappedCallback));
1505
- if (bindI18nStore) bindI18nStore.split(" ").forEach((e) => i18n.store.off(e, wrappedCallback));
1506
- };
1507
- }, [i18n, i18nOptions]);
1508
- const snapshotRef = useRef();
1509
- const getSnapshot = useCallback(() => {
1510
- if (!i18n) {
1511
- return notReadySnapshot;
1512
- }
1513
- const calculatedReady = !!(i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n, i18nOptions));
1514
- const currentLng = props.lng || i18n.language;
1515
- const currentRevision = revisionRef.current;
1516
- const lastSnapshot = snapshotRef.current;
1517
- if (lastSnapshot && lastSnapshot.ready === calculatedReady && lastSnapshot.lng === currentLng && lastSnapshot.keyPrefix === keyPrefix && lastSnapshot.revision === currentRevision) {
1518
- return lastSnapshot;
1519
- }
1520
- const calculatedT = i18n.getFixedT(currentLng, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix, {
1521
- scopeNs: namespaces
1522
- });
1523
- const newSnapshot = {
1524
- t: calculatedT,
1525
- ready: calculatedReady,
1526
- lng: currentLng,
1527
- keyPrefix,
1528
- revision: currentRevision
1529
- };
1530
- snapshotRef.current = newSnapshot;
1531
- return newSnapshot;
1532
- }, [i18n, namespaces, keyPrefix, i18nOptions, props.lng]);
1533
- const [loadCount, setLoadCount] = useState(0);
1534
- const {
1535
- t,
1536
- ready
1537
- } = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
1538
- useEffect(() => {
1539
- if (i18n && !ready && !useSuspense) {
1540
- const onLoaded = () => setLoadCount((c) => c + 1);
1541
- if (props.lng) {
1542
- loadLanguages(i18n, props.lng, namespaces, onLoaded);
1543
- } else {
1544
- loadNamespaces(i18n, namespaces, onLoaded);
1545
- }
1546
- }
1547
- }, [i18n, props.lng, namespaces, ready, useSuspense, loadCount]);
1548
- const finalI18n = i18n || {};
1549
- const wrapperRef = useRef(null);
1550
- const wrapperLangRef = useRef();
1551
- const createI18nWrapper = (original) => {
1552
- const descriptors = Object.getOwnPropertyDescriptors(original);
1553
- if (descriptors.__original) delete descriptors.__original;
1554
- const wrapper = Object.create(Object.getPrototypeOf(original), descriptors);
1555
- if (!Object.prototype.hasOwnProperty.call(wrapper, "__original")) {
1556
- try {
1557
- Object.defineProperty(wrapper, "__original", {
1558
- value: original,
1559
- writable: false,
1560
- enumerable: false,
1561
- configurable: false
1562
- });
1563
- } catch (_) {
1564
- }
1565
- }
1566
- return wrapper;
1567
- };
1568
- const ret = useMemo(() => {
1569
- const original = finalI18n;
1570
- const lang = original?.language;
1571
- let i18nWrapper = original;
1572
- if (original) {
1573
- if (wrapperRef.current && wrapperRef.current.__original === original) {
1574
- if (wrapperLangRef.current !== lang) {
1575
- i18nWrapper = createI18nWrapper(original);
1576
- wrapperRef.current = i18nWrapper;
1577
- wrapperLangRef.current = lang;
1578
- } else {
1579
- i18nWrapper = wrapperRef.current;
1580
- }
1581
- } else {
1582
- i18nWrapper = createI18nWrapper(original);
1583
- wrapperRef.current = i18nWrapper;
1584
- wrapperLangRef.current = lang;
1585
- }
1586
- }
1587
- const effectiveT = !ready && !useSuspense ? (...args) => {
1588
- 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.");
1589
- return t(...args);
1590
- } : t;
1591
- const arr = [effectiveT, i18nWrapper, ready];
1592
- arr.t = effectiveT;
1593
- arr.i18n = i18nWrapper;
1594
- arr.ready = ready;
1595
- return arr;
1596
- }, [t, finalI18n, ready, finalI18n.resolvedLanguage, finalI18n.language, finalI18n.languages]);
1597
- if (i18n && useSuspense && !ready) {
1598
- let inDevelopment = false;
1599
- try {
1600
- inDevelopment = false;
1601
- } catch (e) {
1602
- }
1603
- if (inDevelopment) {
1604
- 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");
1605
- }
1606
- throw new Promise((resolve) => {
1607
- const onLoaded = () => resolve();
1608
- if (props.lng) {
1609
- loadLanguages(i18n, props.lng, namespaces, onLoaded);
1610
- } else {
1611
- loadNamespaces(i18n, namespaces, onLoaded);
1612
- }
1613
- });
1614
- }
1615
- return ret;
1616
- };
1617
-
1618
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/withTranslation.js
1619
- import { createElement as createElement2, forwardRef as forwardRefReact } from "react";
1620
- var withTranslation = (ns, options = {}) => function Extend(WrappedComponent) {
1621
- function I18nextWithTranslation({
1622
- forwardedRef,
1623
- ...rest
1624
- }) {
1625
- const [t, i18n, ready] = useTranslation(ns, {
1626
- ...rest,
1627
- keyPrefix: options.keyPrefix
1628
- });
1629
- const passDownProps = {
1630
- ...rest,
1631
- t,
1632
- i18n,
1633
- tReady: ready
1634
- };
1635
- if (options.withRef && forwardedRef) {
1636
- passDownProps.ref = forwardedRef;
1637
- } else if (!options.withRef && forwardedRef) {
1638
- passDownProps.forwardedRef = forwardedRef;
1639
- }
1640
- return createElement2(WrappedComponent, passDownProps);
1641
- }
1642
- I18nextWithTranslation.displayName = `withI18nextTranslation(${getDisplayName(WrappedComponent)})`;
1643
- I18nextWithTranslation.WrappedComponent = WrappedComponent;
1644
- const forwardRef = (props, ref) => createElement2(I18nextWithTranslation, Object.assign({}, props, {
1645
- forwardedRef: ref
1646
- }));
1647
- return options.withRef ? forwardRefReact(forwardRef) : I18nextWithTranslation;
1648
- };
1649
-
1650
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/Translation.js
1651
- var Translation = ({
1652
- ns,
1653
- children,
1654
- ...options
1655
- }) => {
1656
- const [t, i18n, ready] = useTranslation(ns, options);
1657
- return children(t, {
1658
- i18n,
1659
- lng: i18n?.language
1660
- }, ready);
1661
- };
1662
-
1663
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/I18nextProvider.js
1664
- import { createElement as createElement3, useMemo as useMemo2 } from "react";
1665
- function I18nextProvider({
1666
- i18n,
1667
- defaultNS,
1668
- children
1669
- }) {
1670
- const value = useMemo2(() => ({
1671
- i18n,
1672
- defaultNS
1673
- }), [i18n, defaultNS]);
1674
- return createElement3(I18nContext.Provider, {
1675
- value
1676
- }, children);
1677
- }
1678
-
1679
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/withSSR.js
1680
- import { createElement as createElement4 } from "react";
1681
-
1682
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/useSSR.js
1683
- import { useContext as useContext4 } from "react";
1684
- var useSSR = (initialI18nStore, initialLanguage, props = {}) => {
1685
- const {
1686
- i18n: i18nFromProps
1687
- } = props;
1688
- const {
1689
- i18n: i18nFromContext
1690
- } = useContext4(I18nContext) || {};
1691
- const i18n = i18nFromProps || i18nFromContext || getI18n();
1692
- if (!i18n) {
1693
- warnOnce(i18n, "NO_I18NEXT_INSTANCE", "useSSR: 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.");
1694
- return;
1695
- }
1696
- if (i18n.options?.isClone) return;
1697
- if (initialI18nStore && !i18n.initializedStoreOnce) {
1698
- if (!i18n.services?.resourceStore) {
1699
- warnOnce(i18n, "I18N_NOT_INITIALIZED", "useSSR: i18n instance was found but not initialized (services.resourceStore is missing). Make sure you call i18next.init() before using useSSR \u2014 e.g. at module level, not only in getStaticProps/getServerSideProps.");
1700
- return;
1701
- }
1702
- i18n.services.resourceStore.data = initialI18nStore;
1703
- i18n.options.ns = Object.values(initialI18nStore).reduce((mem, lngResources) => {
1704
- Object.keys(lngResources).forEach((ns) => {
1705
- if (mem.indexOf(ns) < 0) mem.push(ns);
1706
- });
1707
- return mem;
1708
- }, i18n.options.ns);
1709
- i18n.initializedStoreOnce = true;
1710
- i18n.isInitialized = true;
1711
- }
1712
- if (initialLanguage && !i18n.initializedLanguageOnce) {
1713
- i18n.changeLanguage(initialLanguage);
1714
- i18n.initializedLanguageOnce = true;
1715
- }
1716
- };
1717
-
1718
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/withSSR.js
1719
- var withSSR = () => function Extend(WrappedComponent) {
1720
- function I18nextWithSSR({
1721
- initialI18nStore,
1722
- initialLanguage,
1723
- ...rest
1724
- }) {
1725
- useSSR(initialI18nStore, initialLanguage);
1726
- return createElement4(WrappedComponent, {
1727
- ...rest
1728
- });
1729
- }
1730
- I18nextWithSSR.getInitialProps = composeInitialProps(WrappedComponent);
1731
- I18nextWithSSR.displayName = `withI18nextSSR(${getDisplayName(WrappedComponent)})`;
1732
- I18nextWithSSR.WrappedComponent = WrappedComponent;
1733
- return I18nextWithSSR;
1734
- };
1735
-
1736
- // ../../node_modules/.pnpm/react-i18next@17.0.12_i18next@26.4.0_typescript@6.0.3__react-dom@19.2.8_react@19.2.8__react@19.2.8_typescript@6.0.3/node_modules/react-i18next/dist/es/index.js
1737
- var date = () => "";
1738
- var time = () => "";
1739
- var number = () => "";
1740
- var select = () => "";
1741
- var plural = () => "";
1742
- var selectOrdinal = () => "";
1743
-
1744
- // shell/.ojm-shim-react-i18next.mjs
1745
- var ojm_shim_react_i18next_default = void 0 ?? es_exports;
1746
- export {
1747
- I18nContext,
1748
- I18nextProvider,
1749
- IcuTrans,
1750
- IcuTransWithoutContext,
1751
- Trans2 as Trans,
1752
- Trans as TransWithoutContext,
1753
- Translation,
1754
- composeInitialProps,
1755
- date,
1756
- ojm_shim_react_i18next_default as default,
1757
- getDefaults,
1758
- getI18n,
1759
- getInitialProps,
1760
- initReactI18next,
1761
- nodesToString,
1762
- number,
1763
- plural,
1764
- select,
1765
- selectOrdinal,
1766
- setDefaults,
1767
- setI18n,
1768
- time,
1769
- useSSR,
1770
- useTranslation,
1771
- withSSR,
1772
- withTranslation
1773
- };