@cyberskill/shared 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/dist/config/commitlint/index.js +1 -0
  2. package/dist/config/commitlint/index.js.map +1 -0
  3. package/dist/config/config.test.unit.d.ts +1 -0
  4. package/dist/config/config.type.js +1 -0
  5. package/dist/config/config.type.js.map +1 -0
  6. package/dist/config/config.type.test.unit.d.ts +1 -0
  7. package/dist/config/config.util.js +1 -0
  8. package/dist/config/config.util.js.map +1 -0
  9. package/dist/config/env/env.constant.js +1 -0
  10. package/dist/config/env/env.constant.js.map +1 -0
  11. package/dist/config/env/env.util.js +1 -0
  12. package/dist/config/env/env.util.js.map +1 -0
  13. package/dist/config/env/index.js +1 -0
  14. package/dist/config/env/index.js.map +1 -0
  15. package/dist/config/eslint/index.js +1 -0
  16. package/dist/config/eslint/index.js.map +1 -0
  17. package/dist/config/graphql-codegen/graphql-codegen.util.js +1 -0
  18. package/dist/config/graphql-codegen/graphql-codegen.util.js.map +1 -0
  19. package/dist/config/graphql-codegen/index.js +1 -0
  20. package/dist/config/graphql-codegen/index.js.map +1 -0
  21. package/dist/config/index.js +1 -0
  22. package/dist/config/index.js.map +1 -0
  23. package/dist/config/lint-staged/index.js +1 -0
  24. package/dist/config/lint-staged/index.js.map +1 -0
  25. package/dist/config/storybook/index.js +1 -0
  26. package/dist/config/storybook/index.js.map +1 -0
  27. package/dist/config/storybook/storybook.main.js +1 -0
  28. package/dist/config/storybook/storybook.main.js.map +1 -0
  29. package/dist/config/storybook/storybook.preview.js +1 -0
  30. package/dist/config/storybook/storybook.preview.js.map +1 -0
  31. package/dist/config/vitest/index.js +1 -0
  32. package/dist/config/vitest/index.js.map +1 -0
  33. package/dist/config/vitest/vitest.e2e.js +1 -0
  34. package/dist/config/vitest/vitest.e2e.js.map +1 -0
  35. package/dist/config/vitest/vitest.unit.js +1 -0
  36. package/dist/config/vitest/vitest.unit.js.map +1 -0
  37. package/dist/constant/common.js +1 -0
  38. package/dist/constant/common.js.map +1 -0
  39. package/dist/constant/constant.test.unit.d.ts +1 -0
  40. package/dist/constant/index.js +1 -0
  41. package/dist/constant/index.js.map +1 -0
  42. package/dist/constant/response-status.js +1 -0
  43. package/dist/constant/response-status.js.map +1 -0
  44. package/dist/node/apollo-server/apollo-server.util.js +1 -0
  45. package/dist/node/apollo-server/apollo-server.util.js.map +1 -0
  46. package/dist/node/apollo-server/index.js +1 -0
  47. package/dist/node/apollo-server/index.js.map +1 -0
  48. package/dist/node/cli/index.js +1 -0
  49. package/dist/node/cli/index.js.map +1 -0
  50. package/dist/node/command/command.test.unit.d.ts +1 -0
  51. package/dist/node/command/command.type.js +1 -0
  52. package/dist/node/command/command.type.js.map +1 -0
  53. package/dist/node/command/command.util.js +110 -102
  54. package/dist/node/command/command.util.js.map +1 -0
  55. package/dist/node/command/index.js +1 -0
  56. package/dist/node/command/index.js.map +1 -0
  57. package/dist/node/express/express.type.d.ts +4 -0
  58. package/dist/node/express/express.util.js +53 -35
  59. package/dist/node/express/express.util.js.map +1 -0
  60. package/dist/node/express/index.js +1 -0
  61. package/dist/node/express/index.js.map +1 -0
  62. package/dist/node/fs/fs.test.unit.d.ts +1 -0
  63. package/dist/node/fs/fs.util.js +1 -0
  64. package/dist/node/fs/fs.util.js.map +1 -0
  65. package/dist/node/fs/index.js +1 -0
  66. package/dist/node/fs/index.js.map +1 -0
  67. package/dist/node/log/index.js +1 -0
  68. package/dist/node/log/index.js.map +1 -0
  69. package/dist/node/log/log.test.unit.d.ts +1 -0
  70. package/dist/node/log/log.type.js +1 -0
  71. package/dist/node/log/log.type.js.map +1 -0
  72. package/dist/node/log/log.util.js +1 -0
  73. package/dist/node/log/log.util.js.map +1 -0
  74. package/dist/node/mongo/index.d.ts +2 -0
  75. package/dist/node/mongo/index.js +21 -12
  76. package/dist/node/mongo/index.js.map +1 -0
  77. package/dist/node/mongo/mongo.constant.js +1 -0
  78. package/dist/node/mongo/mongo.constant.js.map +1 -0
  79. package/dist/node/mongo/mongo.controller.d.ts +5 -315
  80. package/dist/node/mongo/mongo.controller.mongoose.d.ts +234 -0
  81. package/dist/node/mongo/mongo.controller.mongoose.js +468 -0
  82. package/dist/node/mongo/mongo.controller.mongoose.js.map +1 -0
  83. package/dist/node/mongo/mongo.controller.native.d.ts +84 -0
  84. package/dist/node/mongo/mongo.controller.native.js +214 -0
  85. package/dist/node/mongo/mongo.controller.native.js.map +1 -0
  86. package/dist/node/mongo/mongo.dynamic-populate.d.ts +61 -0
  87. package/dist/node/mongo/mongo.dynamic-populate.js +197 -0
  88. package/dist/node/mongo/mongo.dynamic-populate.js.map +1 -0
  89. package/dist/node/mongo/mongo.populate.d.ts +15 -0
  90. package/dist/node/mongo/mongo.populate.js +269 -0
  91. package/dist/node/mongo/mongo.populate.js.map +1 -0
  92. package/dist/node/mongo/mongo.type.js +1 -0
  93. package/dist/node/mongo/mongo.type.js.map +1 -0
  94. package/dist/node/mongo/mongo.util.d.ts +52 -0
  95. package/dist/node/mongo/mongo.util.js +106 -363
  96. package/dist/node/mongo/mongo.util.js.map +1 -0
  97. package/dist/node/package/index.js +1 -0
  98. package/dist/node/package/index.js.map +1 -0
  99. package/dist/node/package/package.test.unit.d.ts +1 -0
  100. package/dist/node/package/package.type.js +1 -0
  101. package/dist/node/package/package.type.js.map +1 -0
  102. package/dist/node/package/package.util.js +20 -20
  103. package/dist/node/package/package.util.js.map +1 -0
  104. package/dist/node/path/index.js +1 -0
  105. package/dist/node/path/index.js.map +1 -0
  106. package/dist/node/path/path.constant.js +1 -0
  107. package/dist/node/path/path.constant.js.map +1 -0
  108. package/dist/node/path/path.util.js +1 -0
  109. package/dist/node/path/path.util.js.map +1 -0
  110. package/dist/node/storage/index.js +1 -0
  111. package/dist/node/storage/index.js.map +1 -0
  112. package/dist/node/storage/storage.constant.js +1 -0
  113. package/dist/node/storage/storage.constant.js.map +1 -0
  114. package/dist/node/storage/storage.util.js +1 -0
  115. package/dist/node/storage/storage.util.js.map +1 -0
  116. package/dist/node/upload/index.js +1 -0
  117. package/dist/node/upload/index.js.map +1 -0
  118. package/dist/node/upload/upload.constant.js +1 -0
  119. package/dist/node/upload/upload.constant.js.map +1 -0
  120. package/dist/node/upload/upload.type.js +1 -0
  121. package/dist/node/upload/upload.type.js.map +1 -0
  122. package/dist/node/upload/upload.util.js +1 -0
  123. package/dist/node/upload/upload.util.js.map +1 -0
  124. package/dist/node/ws/index.d.ts +1 -1
  125. package/dist/node/ws/index.js +2 -1
  126. package/dist/node/ws/index.js.map +1 -0
  127. package/dist/node/ws/{ts.util.js → ws.util.js} +1 -0
  128. package/dist/node/ws/ws.util.js.map +1 -0
  129. package/dist/node_modules/.pnpm/vitest@4.0.18_@types_node@25.3.3_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/config.js +1 -0
  130. package/dist/node_modules/.pnpm/vitest@4.0.18_@types_node@25.3.3_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/config.js.map +1 -0
  131. package/dist/react/apollo-client/apollo-client.component.js +1 -0
  132. package/dist/react/apollo-client/apollo-client.component.js.map +1 -0
  133. package/dist/react/apollo-client/apollo-client.constant.js +1 -0
  134. package/dist/react/apollo-client/apollo-client.constant.js.map +1 -0
  135. package/dist/react/apollo-client/apollo-client.context.js +1 -0
  136. package/dist/react/apollo-client/apollo-client.context.js.map +1 -0
  137. package/dist/react/apollo-client/apollo-client.module.scss.js +1 -0
  138. package/dist/react/apollo-client/apollo-client.module.scss.js.map +1 -0
  139. package/dist/react/apollo-client/apollo-client.util.js +1 -0
  140. package/dist/react/apollo-client/apollo-client.util.js.map +1 -0
  141. package/dist/react/apollo-client/index.js +1 -0
  142. package/dist/react/apollo-client/index.js.map +1 -0
  143. package/dist/react/apollo-client/links/index.js +1 -0
  144. package/dist/react/apollo-client/links/index.js.map +1 -0
  145. package/dist/react/apollo-client/links/upload.js +1 -0
  146. package/dist/react/apollo-client/links/upload.js.map +1 -0
  147. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.js +1 -0
  148. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.js.map +1 -0
  149. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js +1 -0
  150. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js.map +1 -0
  151. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js +1 -0
  152. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js.map +1 -0
  153. package/dist/react/apollo-client-nextjs/index.js +1 -0
  154. package/dist/react/apollo-client-nextjs/index.js.map +1 -0
  155. package/dist/react/apollo-error/apollo-error.component.js +1 -0
  156. package/dist/react/apollo-error/apollo-error.component.js.map +1 -0
  157. package/dist/react/apollo-error/apollo-error.context.js +1 -0
  158. package/dist/react/apollo-error/apollo-error.context.js.map +1 -0
  159. package/dist/react/apollo-error/apollo-error.hook.js +1 -0
  160. package/dist/react/apollo-error/apollo-error.hook.js.map +1 -0
  161. package/dist/react/apollo-error/apollo-error.module.scss.js +1 -0
  162. package/dist/react/apollo-error/apollo-error.module.scss.js.map +1 -0
  163. package/dist/react/apollo-error/apollo-error.provider.js +1 -0
  164. package/dist/react/apollo-error/apollo-error.provider.js.map +1 -0
  165. package/dist/react/apollo-error/apollo-error.util.js +1 -0
  166. package/dist/react/apollo-error/apollo-error.util.js.map +1 -0
  167. package/dist/react/apollo-error/index.js +1 -0
  168. package/dist/react/apollo-error/index.js.map +1 -0
  169. package/dist/react/i18next/i18next.hook.js +1 -0
  170. package/dist/react/i18next/i18next.hook.js.map +1 -0
  171. package/dist/react/i18next/i18next.util.js +1 -0
  172. package/dist/react/i18next/i18next.util.js.map +1 -0
  173. package/dist/react/i18next/index.js +1 -0
  174. package/dist/react/i18next/index.js.map +1 -0
  175. package/dist/react/loading/index.js +1 -0
  176. package/dist/react/loading/index.js.map +1 -0
  177. package/dist/react/loading/loading.component.js +1 -0
  178. package/dist/react/loading/loading.component.js.map +1 -0
  179. package/dist/react/loading/loading.context.js +1 -0
  180. package/dist/react/loading/loading.context.js.map +1 -0
  181. package/dist/react/loading/loading.hook.js +1 -0
  182. package/dist/react/loading/loading.hook.js.map +1 -0
  183. package/dist/react/loading/loading.module.scss.js +1 -0
  184. package/dist/react/loading/loading.module.scss.js.map +1 -0
  185. package/dist/react/loading/loading.provider.js +1 -0
  186. package/dist/react/loading/loading.provider.js.map +1 -0
  187. package/dist/react/log/index.js +1 -0
  188. package/dist/react/log/index.js.map +1 -0
  189. package/dist/react/log/log.util.js +1 -0
  190. package/dist/react/log/log.util.js.map +1 -0
  191. package/dist/react/next-intl/index.js +1 -0
  192. package/dist/react/next-intl/index.js.map +1 -0
  193. package/dist/react/next-intl/next-intl.constant.js +1 -0
  194. package/dist/react/next-intl/next-intl.constant.js.map +1 -0
  195. package/dist/react/next-intl/next-intl.context.js +1 -0
  196. package/dist/react/next-intl/next-intl.context.js.map +1 -0
  197. package/dist/react/next-intl/next-intl.hoc.js +1 -0
  198. package/dist/react/next-intl/next-intl.hoc.js.map +1 -0
  199. package/dist/react/next-intl/next-intl.hook.js +1 -0
  200. package/dist/react/next-intl/next-intl.hook.js.map +1 -0
  201. package/dist/react/next-intl/next-intl.provider.js +1 -0
  202. package/dist/react/next-intl/next-intl.provider.js.map +1 -0
  203. package/dist/react/storage/index.js +1 -0
  204. package/dist/react/storage/index.js.map +1 -0
  205. package/dist/react/storage/storage.hook.js +1 -0
  206. package/dist/react/storage/storage.hook.js.map +1 -0
  207. package/dist/react/storage/storage.test.unit.d.ts +1 -0
  208. package/dist/react/storage/storage.util.js +1 -0
  209. package/dist/react/storage/storage.util.js.map +1 -0
  210. package/dist/react/toast/index.js +1 -0
  211. package/dist/react/toast/index.js.map +1 -0
  212. package/dist/react/userback/index.js +1 -0
  213. package/dist/react/userback/index.js.map +1 -0
  214. package/dist/react/userback/userback.component.js +1 -0
  215. package/dist/react/userback/userback.component.js.map +1 -0
  216. package/dist/typescript/common.type.js +1 -0
  217. package/dist/typescript/common.type.js.map +1 -0
  218. package/dist/typescript/index.js +1 -0
  219. package/dist/typescript/index.js.map +1 -0
  220. package/dist/typescript/typescript.test.unit.d.ts +1 -0
  221. package/dist/util/common/common.util.js +1 -0
  222. package/dist/util/common/common.util.js.map +1 -0
  223. package/dist/util/common/index.js +1 -0
  224. package/dist/util/common/index.js.map +1 -0
  225. package/dist/util/index.js +1 -0
  226. package/dist/util/index.js.map +1 -0
  227. package/dist/util/object/index.js +1 -0
  228. package/dist/util/object/index.js.map +1 -0
  229. package/dist/util/object/object.util.js +1 -0
  230. package/dist/util/object/object.util.js.map +1 -0
  231. package/dist/util/serializer/index.js +1 -0
  232. package/dist/util/serializer/index.js.map +1 -0
  233. package/dist/util/serializer/serializer.util.js +1 -0
  234. package/dist/util/serializer/serializer.util.js.map +1 -0
  235. package/dist/util/string/index.js +1 -0
  236. package/dist/util/string/index.js.map +1 -0
  237. package/dist/util/string/string.util.js +1 -0
  238. package/dist/util/string/string.util.js.map +1 -0
  239. package/dist/util/validate/index.js +1 -0
  240. package/dist/util/validate/index.js.map +1 -0
  241. package/dist/util/validate/validate.util.js +1 -0
  242. package/dist/util/validate/validate.util.js.map +1 -0
  243. package/package.json +58 -87
  244. package/dist/config/commitlint/index.cjs +0 -1
  245. package/dist/config/config.type.cjs +0 -1
  246. package/dist/config/config.util.cjs +0 -1
  247. package/dist/config/env/env.constant.cjs +0 -1
  248. package/dist/config/env/env.util.cjs +0 -1
  249. package/dist/config/env/index.cjs +0 -1
  250. package/dist/config/eslint/index.cjs +0 -1
  251. package/dist/config/graphql-codegen/graphql-codegen.util.cjs +0 -1
  252. package/dist/config/graphql-codegen/index.cjs +0 -1
  253. package/dist/config/index.cjs +0 -1
  254. package/dist/config/lint-staged/index.cjs +0 -1
  255. package/dist/config/storybook/index.cjs +0 -1
  256. package/dist/config/storybook/storybook.main.cjs +0 -1
  257. package/dist/config/storybook/storybook.preview.cjs +0 -1
  258. package/dist/config/vitest/index.cjs +0 -1
  259. package/dist/config/vitest/vitest.e2e.cjs +0 -1
  260. package/dist/config/vitest/vitest.unit.cjs +0 -1
  261. package/dist/constant/common.cjs +0 -1
  262. package/dist/constant/index.cjs +0 -1
  263. package/dist/constant/response-status.cjs +0 -1
  264. package/dist/node/apollo-server/apollo-server.util.cjs +0 -1
  265. package/dist/node/apollo-server/index.cjs +0 -1
  266. package/dist/node/cli/index.cjs +0 -3
  267. package/dist/node/command/command.type.cjs +0 -1
  268. package/dist/node/command/command.util.cjs +0 -2
  269. package/dist/node/command/index.cjs +0 -1
  270. package/dist/node/express/express.util.cjs +0 -1
  271. package/dist/node/express/index.cjs +0 -1
  272. package/dist/node/fs/fs.util.cjs +0 -4
  273. package/dist/node/fs/index.cjs +0 -1
  274. package/dist/node/log/index.cjs +0 -1
  275. package/dist/node/log/log.type.cjs +0 -1
  276. package/dist/node/log/log.util.cjs +0 -1
  277. package/dist/node/mongo/index.cjs +0 -1
  278. package/dist/node/mongo/mongo.constant.cjs +0 -1
  279. package/dist/node/mongo/mongo.controller.cjs +0 -1
  280. package/dist/node/mongo/mongo.controller.js +0 -858
  281. package/dist/node/mongo/mongo.type.cjs +0 -1
  282. package/dist/node/mongo/mongo.util.cjs +0 -2
  283. package/dist/node/package/index.cjs +0 -1
  284. package/dist/node/package/package.type.cjs +0 -1
  285. package/dist/node/package/package.util.cjs +0 -1
  286. package/dist/node/path/index.cjs +0 -1
  287. package/dist/node/path/path.constant.cjs +0 -1
  288. package/dist/node/path/path.util.cjs +0 -1
  289. package/dist/node/storage/index.cjs +0 -1
  290. package/dist/node/storage/storage.constant.cjs +0 -1
  291. package/dist/node/storage/storage.util.cjs +0 -1
  292. package/dist/node/upload/index.cjs +0 -1
  293. package/dist/node/upload/upload.constant.cjs +0 -1
  294. package/dist/node/upload/upload.type.cjs +0 -1
  295. package/dist/node/upload/upload.util.cjs +0 -1
  296. package/dist/node/ws/index.cjs +0 -1
  297. package/dist/node/ws/ts.util.cjs +0 -1
  298. package/dist/node_modules/.pnpm/vitest@4.0.18_@types_node@25.3.3_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/config.cjs +0 -1
  299. package/dist/react/apollo-client/apollo-client.component.cjs +0 -1
  300. package/dist/react/apollo-client/apollo-client.constant.cjs +0 -1
  301. package/dist/react/apollo-client/apollo-client.context.cjs +0 -1
  302. package/dist/react/apollo-client/apollo-client.module.scss.cjs +0 -1
  303. package/dist/react/apollo-client/apollo-client.util.cjs +0 -1
  304. package/dist/react/apollo-client/index.cjs +0 -1
  305. package/dist/react/apollo-client/links/index.cjs +0 -1
  306. package/dist/react/apollo-client/links/upload.cjs +0 -1
  307. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +0 -1
  308. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +0 -1
  309. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +0 -1
  310. package/dist/react/apollo-client-nextjs/index.cjs +0 -1
  311. package/dist/react/apollo-error/apollo-error.component.cjs +0 -1
  312. package/dist/react/apollo-error/apollo-error.context.cjs +0 -1
  313. package/dist/react/apollo-error/apollo-error.hook.cjs +0 -1
  314. package/dist/react/apollo-error/apollo-error.module.scss.cjs +0 -1
  315. package/dist/react/apollo-error/apollo-error.provider.cjs +0 -1
  316. package/dist/react/apollo-error/apollo-error.util.cjs +0 -1
  317. package/dist/react/apollo-error/index.cjs +0 -1
  318. package/dist/react/i18next/i18next.hook.cjs +0 -1
  319. package/dist/react/i18next/i18next.util.cjs +0 -1
  320. package/dist/react/i18next/index.cjs +0 -1
  321. package/dist/react/loading/index.cjs +0 -1
  322. package/dist/react/loading/loading.component.cjs +0 -6
  323. package/dist/react/loading/loading.context.cjs +0 -1
  324. package/dist/react/loading/loading.hook.cjs +0 -1
  325. package/dist/react/loading/loading.module.scss.cjs +0 -1
  326. package/dist/react/loading/loading.provider.cjs +0 -1
  327. package/dist/react/log/index.cjs +0 -1
  328. package/dist/react/log/log.util.cjs +0 -1
  329. package/dist/react/next-intl/index.cjs +0 -1
  330. package/dist/react/next-intl/next-intl.constant.cjs +0 -1
  331. package/dist/react/next-intl/next-intl.context.cjs +0 -1
  332. package/dist/react/next-intl/next-intl.hoc.cjs +0 -1
  333. package/dist/react/next-intl/next-intl.hook.cjs +0 -1
  334. package/dist/react/next-intl/next-intl.provider.cjs +0 -1
  335. package/dist/react/storage/index.cjs +0 -1
  336. package/dist/react/storage/storage.hook.cjs +0 -1
  337. package/dist/react/storage/storage.util.cjs +0 -1
  338. package/dist/react/toast/index.cjs +0 -1
  339. package/dist/react/userback/index.cjs +0 -1
  340. package/dist/react/userback/userback.component.cjs +0 -1
  341. package/dist/typescript/common.type.cjs +0 -1
  342. package/dist/typescript/index.cjs +0 -1
  343. package/dist/util/common/common.util.cjs +0 -1
  344. package/dist/util/common/index.cjs +0 -1
  345. package/dist/util/index.cjs +0 -1
  346. package/dist/util/object/index.cjs +0 -1
  347. package/dist/util/object/object.util.cjs +0 -1
  348. package/dist/util/serializer/index.cjs +0 -1
  349. package/dist/util/serializer/serializer.util.cjs +0 -1
  350. package/dist/util/string/index.cjs +0 -1
  351. package/dist/util/string/string.util.cjs +0 -1
  352. package/dist/util/validate/index.cjs +0 -1
  353. package/dist/util/validate/validate.util.cjs +0 -1
  354. /package/dist/node/ws/{ts.util.d.ts → ws.util.d.ts} +0 -0
@@ -15,3 +15,4 @@ function g({ options: r, children: t, onError: o }) {
15
15
  export {
16
16
  g as ApolloProvider
17
17
  };
18
+ //# sourceMappingURL=apollo-client-nextjs.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo-client-nextjs.component.js","sources":["../../../src/react/apollo-client-nextjs/apollo-client-nextjs.component.tsx"],"sourcesContent":["import { ApolloNextAppProvider } from '@apollo/client-integration-nextjs';\nimport * as React from 'react';\nimport { useMemo } from 'react';\n\nimport type { I_ApolloProviderProps } from '../apollo-client/index.js';\n\nimport { ApolloErrorComponent, ApolloErrorProvider } from '../apollo-error/index.js';\nimport { Toaster } from '../toast/index.js';\nimport { getClient } from './apollo-client-nextjs.util.js';\n\n/**\n * Next.js Apollo Provider component that wraps the application with Apollo Client context.\n * This component provides the Apollo Client instance to all child components,\n * enabling GraphQL operations throughout the component tree. It includes\n * error handling and toast integration for a complete GraphQL experience.\n *\n * Features:\n * - Apollo Client context provision\n * - Error boundary integration\n * - Toast notification support\n * - Automatic error handling\n * - Next.js specific optimizations\n *\n * @param props - Component props containing options, children, and optional error override.\n * @param props.options - Apollo Client configuration options.\n * @param props.children - React children that will have access to Apollo Client context.\n * @param props.onError - Optional callback to override the default modal/toast error handling.\n * @returns A React component that provides Apollo Client context to its children.\n */\nexport function ApolloProvider({ options, children, onError }: I_ApolloProviderProps) {\n const makeClient = useMemo(\n () => () => getClient(options || {}),\n [options],\n );\n\n return (\n <>\n <ApolloErrorProvider onError={onError}>\n <ApolloNextAppProvider makeClient={makeClient}>\n {children}\n </ApolloNextAppProvider>\n {!onError && <ApolloErrorComponent />}\n </ApolloErrorProvider>\n <Toaster position=\"top-right\" />\n </>\n );\n}\n"],"names":["ApolloProvider","options","children","onError","makeClient","useMemo","getClient","React","ApolloErrorProvider","ApolloNextAppProvider","ApolloErrorComponent","Toaster"],"mappings":";;;;;;;AA6BO,SAASA,EAAe,EAAE,SAAAC,GAAS,UAAAC,GAAU,SAAAC,KAAkC;AAClF,QAAMC,IAAaC;AAAA,IACf,MAAM,MAAMC,EAAUL,KAAW,EAAE;AAAA,IACnC,CAACA,CAAO;AAAA,EAAA;AAGZ,2DAEQ,gBAAAM,EAAA,cAACC,GAAA,EAAoB,SAAAL,KACjB,gBAAAI,EAAA,cAACE,GAAA,EAAsB,YAAAL,KAClBF,CACL,GACC,CAACC,KAAW,gBAAAI,EAAA,cAACG,OAAqB,CACvC,mCACCC,GAAA,EAAQ,UAAS,aAAY,CAClC;AAER;"}
@@ -4,3 +4,4 @@ const l = (t = {}) => e(() => o(t));
4
4
  export {
5
5
  l as makeClient
6
6
  };
7
+ //# sourceMappingURL=apollo-client-nextjs.rsc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo-client-nextjs.rsc.js","sources":["../../../src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.ts"],"sourcesContent":["import { registerApolloClient } from '@apollo/client-integration-nextjs';\n\nimport type { I_ApolloOptions } from '../apollo-client/index.js';\n\nimport { getClient } from './apollo-client-nextjs.util.js';\n\n/**\n * Creates a registered Apollo Client factory for Next.js server components.\n * This function creates a client factory that is registered with Next.js for\n * proper server-side rendering support. The factory function ensures that\n * each request gets its own Apollo Client instance, which is essential for\n * SSR compatibility and preventing client state leakage between requests.\n *\n * @param options - Configuration options for the Apollo Client including URI, WebSocket URL, and custom links.\n * @returns A registered Apollo Client factory function that can be used with Next.js server components.\n */\nexport const makeClient = (options: I_ApolloOptions = {}) => registerApolloClient(() => getClient(options));\n"],"names":["registerApolloClient","getClient","makeClient","options"],"mappings":"AAgBO,SAAA,wBAAAA,SAAA;AAAA,SAAA,aAAAC,SAAA;AAAA,MAAMC,IAAa,CAACC,IAA2B,CAAA,MAAOH,EAAqB,MAAMC,EAAUE,CAAO,CAAC;"}
@@ -12,3 +12,4 @@ function p(o = {}) {
12
12
  export {
13
13
  p as getClient
14
14
  };
15
+ //# sourceMappingURL=apollo-client-nextjs.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo-client-nextjs.util.js","sources":["../../../src/react/apollo-client-nextjs/apollo-client-nextjs.util.ts"],"sourcesContent":["import { ApolloClient, InMemoryCache } from '@apollo/client-integration-nextjs';\nimport { ApolloLink } from '@apollo/client/link';\n\nimport type { I_ApolloOptions } from '../apollo-client/index.js';\n\nimport { createApolloLinks } from '../apollo-client/apollo-client.util.js';\n\n/**\n * Creates a Next.js optimized Apollo Client instance.\n * This function creates an Apollo Client specifically configured for Next.js applications,\n * using the Next.js integration package for proper server-side rendering support.\n * The client includes all standard Apollo features like error handling, logging,\n * file uploads, and WebSocket subscriptions, but is optimized for Next.js environments.\n *\n * @param options - Configuration options for the Apollo Client including URI, WebSocket URL, and custom links.\n * @returns A Next.js optimized Apollo Client instance ready for use in Next.js applications.\n */\nexport function getClient(options: I_ApolloOptions = {}) {\n const link = ApolloLink.from(createApolloLinks(options));\n\n return new ApolloClient({\n link,\n cache: new InMemoryCache(),\n ...options,\n });\n}\n"],"names":["ApolloClient","InMemoryCache","ApolloLink","createApolloLinks","getClient","options","link"],"mappings":"AAiBO,SAAA,gBAAAA,GAAA,iBAAAC,SAAA;AAAA,SAAA,cAAAC,SAAA;AAAA,SAAA,qBAAAC,SAAA;AAAA,SAASC,EAAUC,IAA2B,IAAI;AACrD,QAAMC,IAAOJ,EAAW,KAAKC,EAAkBE,CAAO,CAAC;AAEvD,SAAO,IAAIL,EAAa;AAAA,IACpB,MAAAM;AAAA,IACA,OAAO,IAAIL,EAAA;AAAA,IACX,GAAGI;AAAA,EAAA,CACN;AACL;"}
@@ -4,3 +4,4 @@ export {
4
4
  e as ApolloProvider,
5
5
  l as getClient
6
6
  };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -67,3 +67,4 @@ function C() {
67
67
  export {
68
68
  C as ApolloErrorComponent
69
69
  };
70
+ //# sourceMappingURL=apollo-error.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo-error.component.js","sources":["../../../src/react/apollo-error/apollo-error.component.tsx"],"sourcesContent":["import * as React from 'react';\nimport { use, useEffect, useRef } from 'react';\n\nimport { validate } from '#util/validate/validate.util.js';\n\nimport { ApolloErrorContext } from './apollo-error.context.js';\nimport style from './apollo-error.module.scss';\n\nconst FOCUSABLE_SELECTORS = 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * Apollo Error Component that displays detailed error information in a modal.\n * This component provides a comprehensive error display interface that shows\n * GraphQL errors and other error types with detailed information for debugging purposes.\n *\n * Features:\n * - Modal overlay with backdrop for focus\n * - Detailed error categorization and display\n * - Reload functionality for error recovery\n * - Close button to dismiss the error modal\n * - Structured display of different error types\n * - Extra information display for debugging\n *\n * @returns A modal component displaying Apollo error details, or null if no error is present.\n */\nexport function ApolloErrorComponent() {\n const context = use(ApolloErrorContext);\n const { error, hideError } = context ?? {};\n const dialogRef = useRef<HTMLDivElement>(null);\n const previousFocusRef = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!error || !hideError) return;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n hideError();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [error, hideError]);\n\n useEffect(() => {\n if (error && dialogRef.current) {\n previousFocusRef.current = document.activeElement as HTMLElement;\n dialogRef.current.focus();\n }\n else if (!error && previousFocusRef.current) {\n previousFocusRef.current.focus();\n previousFocusRef.current = null;\n }\n }, [error]);\n\n const handleFocusTrap = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Tab' || !dialogRef.current) return;\n\n const focusableElements = Array.from(\n dialogRef.current.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTORS),\n ).filter(el => !el.hasAttribute('disabled'));\n\n if (focusableElements.length === 0) return;\n\n const firstElement = focusableElements[0];\n const lastElement = focusableElements[focusableElements.length - 1];\n\n if (!firstElement || !lastElement) return;\n\n if (event.shiftKey) {\n if (document.activeElement === firstElement) {\n event.preventDefault();\n lastElement.focus();\n }\n }\n else if (document.activeElement === lastElement) {\n event.preventDefault();\n firstElement.focus();\n }\n };\n\n if (!error) {\n return null;\n }\n\n const isGraphQLError = 'locations' in error || 'path' in error || 'extensions' in error;\n const errorMessage = 'message' in error ? error.message : 'Unknown error occurred';\n\n return (\n <div className={style['modal-backdrop']}>\n <div\n ref={dialogRef}\n className={style['modal-content']}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"apollo-error-title\"\n tabIndex={-1}\n onKeyDown={handleFocusTrap}\n >\n <button\n type=\"button\"\n className={style['btn-close']}\n onClick={hideError}\n aria-label=\"Close error details\"\n title=\"Close error details\"\n >\n ✕\n </button>\n <div id=\"apollo-error-title\" className={style['error-title']}>\n <button\n type=\"button\"\n className={style['btn-retry']}\n onClick={() => window.location.reload()}\n aria-label=\"Reload page\"\n >\n Reload\n </button>\n {' '}\n {!validate.isEmpty(error) && errorMessage}\n </div>\n <div className={style['error-details']}>\n {isGraphQLError && 'locations' in error && error.locations && (\n <pre className=\"locations\">\n <strong>Locations:</strong>\n {' '}\n {JSON.stringify(error.locations, null, 4)}\n </pre>\n )}\n {isGraphQLError && 'path' in error && error.path && (\n <pre className=\"path\">\n <strong>Path:</strong>\n {' '}\n {JSON.stringify(error.path, null, 4)}\n </pre>\n )}\n {isGraphQLError && 'extensions' in error && error.extensions && (\n <pre className=\"extensions\">\n <strong>Extensions:</strong>\n {' '}\n {JSON.stringify(error.extensions, null, 4)}\n </pre>\n )}\n {!isGraphQLError && (\n <pre className=\"error-details\">\n <strong>Error Details:</strong>\n {' '}\n {validate.isEmpty(error) ? errorMessage : JSON.stringify(error, null, 4)}\n </pre>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"names":["FOCUSABLE_SELECTORS","ApolloErrorComponent","context","use","ApolloErrorContext","error","hideError","dialogRef","useRef","previousFocusRef","useEffect","handleKeyDown","event","handleFocusTrap","focusableElements","el","firstElement","lastElement","isGraphQLError","errorMessage","React","style","validate"],"mappings":"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"}
@@ -3,3 +3,4 @@ const r = o(void 0);
3
3
  export {
4
4
  r as ApolloErrorContext
5
5
  };
6
+ //# sourceMappingURL=apollo-error.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo-error.context.js","sources":["../../../src/react/apollo-error/apollo-error.context.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nimport type { I_ApolloErrorContext } from './apollo-error.type.js';\n\nexport const ApolloErrorContext = createContext<I_ApolloErrorContext | undefined>(undefined);\n"],"names":["createContext","ApolloErrorContext"],"mappings":"AAIO,SAAA,iBAAAA,SAAA;AAAA,MAAMC,IAAqBD,EAAgD,MAAS;"}
@@ -9,3 +9,4 @@ function n() {
9
9
  export {
10
10
  n as useApolloError
11
11
  };
12
+ //# sourceMappingURL=apollo-error.hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo-error.hook.js","sources":["../../../src/react/apollo-error/apollo-error.hook.tsx"],"sourcesContent":["import { use } from 'react';\n\nimport { ApolloErrorContext } from './apollo-error.context.js';\n\n/**\n * React hook that provides access to Apollo error context.\n * This hook retrieves the Apollo error context which contains the current error state\n * and methods to show or hide errors. It provides a convenient way to access error\n * handling functionality within components.\n *\n * The hook will throw an error if used outside of an ApolloErrorProvider,\n * ensuring proper context usage and providing clear error messages for debugging.\n *\n * @returns The Apollo error context containing error state and control methods.\n * @throws {Error} When used outside of an ApolloErrorProvider context.\n */\nexport function useApolloError() {\n const context = use(ApolloErrorContext);\n\n if (!context) {\n throw new Error('useApolloError must be used within ApolloErrorProvider');\n }\n\n return context;\n}\n"],"names":["use","ApolloErrorContext","useApolloError","context"],"mappings":"AAgBO,SAAA,OAAAA,SAAA;AAAA,SAAA,sBAAAC,SAAA;AAAA,SAASC,IAAiB;AAC7B,QAAMC,IAAUH,EAAIC,CAAkB;AAEtC,MAAI,CAACE;AACD,UAAM,IAAI,MAAM,wDAAwD;AAG5E,SAAOA;AACX;"}
@@ -9,3 +9,4 @@ const t = {
9
9
  export {
10
10
  t as default
11
11
  };
12
+ //# sourceMappingURL=apollo-error.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo-error.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -23,3 +23,4 @@ function k({ children: u, onError: l }) {
23
23
  export {
24
24
  k as ApolloErrorProvider
25
25
  };
26
+ //# sourceMappingURL=apollo-error.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo-error.provider.js","sources":["../../../src/react/apollo-error/apollo-error.provider.tsx"],"sourcesContent":["import type { GraphQLError } from 'graphql';\n\nimport * as React from 'react';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport type { I_ApolloErrorProviderProps } from './apollo-error.type.js';\n\nimport { ApolloErrorContext } from './apollo-error.context.js';\nimport { clearGlobalApolloErrorCallback, setGlobalApolloErrorCallback } from './apollo-error.util.js';\n\n/**\n * Provider component that manages Apollo error state and provides error context.\n * This component sets up error handling for Apollo Client operations and provides\n * error state management to all child components through React context.\n *\n * Features:\n * - Global Apollo error state management\n * - Error context provision to child components\n * - Automatic error handling and display\n * - Optional custom error handling callbacks\n * - Integration with error boundaries\n *\n * @param props - Component props containing children.\n * @param props.children - React children that will have access to the error context.\n * @param props.onError - Optional callback to override the default error modal/toast flow.\n * @returns A React component that provides Apollo error context to its children.\n */\nexport function ApolloErrorProvider({ children, onError }: I_ApolloErrorProviderProps) {\n const [error, setError] = useState<GraphQLError | Error | null>(null);\n\n const handleGlobalError = useCallback((apolloError: GraphQLError | Error) => {\n if (onError) {\n onError(apolloError);\n\n return;\n }\n\n setError(apolloError);\n }, [onError]);\n\n useEffect(() => {\n setGlobalApolloErrorCallback(handleGlobalError, Boolean(onError));\n\n return () => {\n clearGlobalApolloErrorCallback();\n };\n }, [handleGlobalError, onError]);\n\n const hideError = useCallback(() => setError(null), []);\n\n const contextValue = useMemo(() => ({\n error: onError ? null : error,\n showError: handleGlobalError,\n hideError,\n }), [error, handleGlobalError, hideError, onError]);\n\n return (\n <ApolloErrorContext value={contextValue}>\n {children}\n </ApolloErrorContext>\n );\n}\n"],"names":["React","useState","useCallback","useEffect","useMemo","ApolloErrorContext","setGlobalApolloErrorCallback","clearGlobalApolloErrorCallback","ApolloErrorProvider","children","onError","error","setError","handleGlobalError","apolloError","hideError","contextValue"],"mappings":"AA2BO,YAAAA,OAAA;AAAA,SAAA,YAAAC,GAAA,eAAAC,GAAA,aAAAC,GAAA,WAAAC,SAAA;AAAA,SAAA,sBAAAC,SAAA;AAAA,SAAA,gCAAAC,GAAA,kCAAAC,SAAA;AAAA,SAASC,EAAoB,EAAE,UAAAC,GAAU,SAAAC,KAAuC;AACnF,QAAM,CAACC,GAAOC,CAAQ,IAAIX,EAAsC,IAAI,GAE9DY,IAAoBX,EAAY,CAACY,MAAsC;AACzE,QAAIJ,GAAS;AACT,MAAAA,EAAQI,CAAW;AAEnB;AAAA,IACJ;AAEA,IAAAF,EAASE,CAAW;AAAA,EACxB,GAAG,CAACJ,CAAO,CAAC;AAEZ,EAAAP,EAAU,OACNG,EAA6BO,GAAmB,EAAQH,CAAQ,GAEzD,MAAM;AACT,IAAAH,EAAA;AAAA,EACJ,IACD,CAACM,GAAmBH,CAAO,CAAC;AAE/B,QAAMK,IAAYb,EAAY,MAAMU,EAAS,IAAI,GAAG,CAAA,CAAE,GAEhDI,IAAeZ,EAAQ,OAAO;AAAA,IAChC,OAAOM,IAAU,OAAOC;AAAA,IACxB,WAAWE;AAAA,IACX,WAAAE;AAAA,EAAA,IACA,CAACJ,GAAOE,GAAmBE,GAAWL,CAAO,CAAC;AAElD,SACI,gBAAAV,EAAA,cAACK,GAAA,EAAmB,OAAOW,EAAA,GACtBP,CACL;AAER;"}
@@ -17,3 +17,4 @@ export {
17
17
  n as setGlobalApolloErrorCallback,
18
18
  s as showGlobalApolloError
19
19
  };
20
+ //# sourceMappingURL=apollo-error.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apollo-error.util.js","sources":["../../../src/react/apollo-error/apollo-error.util.tsx"],"sourcesContent":["import type { GraphQLError } from 'graphql';\n\n/**\n * Global callback function for displaying Apollo errors.\n * This variable holds the callback function that will be called when a global\n * Apollo error needs to be displayed. It is set by the ApolloErrorProvider\n * and used throughout the application for consistent error handling.\n */\nlet showErrorCallback: ((err: GraphQLError | Error) => void) | null = null;\nlet hasCustomHandler = false;\n\n/**\n * Sets the global callback function for Apollo error handling.\n * This function registers a callback that will be called whenever a global\n * Apollo error needs to be displayed. The callback is typically set by the\n * ApolloErrorProvider component and used throughout the application for\n * consistent error handling.\n *\n * @param callback - The function to be called when a global Apollo error occurs.\n * @param isCustomHandler - Flag that identifies whether the handler was provided by the consumer.\n */\nexport function setGlobalApolloErrorCallback(\n callback: (err: GraphQLError | Error) => void,\n isCustomHandler = false,\n) {\n showErrorCallback = callback;\n hasCustomHandler = isCustomHandler;\n}\n\n/**\n * Clears the global callback function for Apollo error handling.\n * Useful when the ApolloErrorProvider unmounts to avoid stale references.\n */\nexport function clearGlobalApolloErrorCallback() {\n showErrorCallback = null;\n hasCustomHandler = false;\n}\n\n/**\n * Indicates whether a custom Apollo error handler is registered.\n *\n * @returns True if a custom handler is registered, otherwise false.\n */\nexport function hasCustomApolloErrorHandler() {\n return hasCustomHandler;\n}\n\n/**\n * Displays a global Apollo error using the registered callback.\n * This function triggers the global error display system by calling the\n * registered callback function. If no callback is registered, the function\n * does nothing, providing safe error handling even when the provider is not set up.\n *\n * @param error - The Apollo error to display globally.\n */\nexport function showGlobalApolloError(error: GraphQLError | Error) {\n showErrorCallback?.(error);\n}\n"],"names":["showErrorCallback","hasCustomHandler","setGlobalApolloErrorCallback","callback","isCustomHandler","clearGlobalApolloErrorCallback","hasCustomApolloErrorHandler","showGlobalApolloError","error"],"mappings":"AAQA,IAAIA,IAAkE,MAClEC,IAAmB;AAYhB,SAASC,EACZC,GACAC,IAAkB,IACpB;AACE,EAAAJ,IAAoBG,GACpBF,IAAmBG;AACvB;AAMO,SAASC,IAAiC;AAC7C,EAAAL,IAAoB,MACpBC,IAAmB;AACvB;AAOO,SAASK,IAA8B;AAC1C,SAAOL;AACX;AAUO,SAASM,EAAsBC,GAA6B;AAC/D,EAAAR,IAAoBQ,CAAK;AAC7B;"}
@@ -13,3 +13,4 @@ export {
13
13
  s as showGlobalApolloError,
14
14
  t as useApolloError
15
15
  };
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -3,3 +3,4 @@ const n = t;
3
3
  export {
4
4
  n as useTranslateI18next
5
5
  };
6
+ //# sourceMappingURL=i18next.hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18next.hook.js","sources":["../../../src/react/i18next/i18next.hook.ts"],"sourcesContent":["import { useTranslation } from 'react-i18next';\n\n/**\n * React hook that provides i18next translation functionality.\n * This hook is a wrapper around react-i18next's useTranslation hook,\n * providing access to translation functions and current language information.\n * It enables internationalization features including text translation,\n * language switching, and pluralization support.\n *\n * @returns The useTranslation hook result with translation functions and language information.\n */\nexport const useTranslateI18next: typeof useTranslation = useTranslation;\n"],"names":["useTranslation","useTranslateI18next"],"mappings":"AAWO,SAAA,kBAAAA,SAAA;AAAA,MAAMC,IAA6CD;"}
@@ -6,3 +6,4 @@ function o(t) {
6
6
  export {
7
7
  o as initI18next
8
8
  };
9
+ //# sourceMappingURL=i18next.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18next.util.js","sources":["../../../src/react/i18next/i18next.util.ts"],"sourcesContent":["import type { InitOptions } from 'i18next';\n\nimport i18next from 'i18next';\nimport { initReactI18next } from 'react-i18next';\n\n/**\n * Initializes i18next with React integration.\n * This function sets up i18next for use with React applications by configuring\n * the react-i18next plugin and initializing the i18next instance with the provided\n * options. It enables internationalization features including translation,\n * language detection, and pluralization rules.\n *\n * @param options - Configuration options for i18next initialization including languages, namespaces, and plugins.\n * @returns A promise that resolves when i18next initialization is complete.\n */\nexport function initI18next(options: InitOptions) {\n return i18next.use(initReactI18next).init(options);\n}\n"],"names":["initI18next","options","i18next","initReactI18next"],"mappings":";;AAeO,SAASA,EAAYC,GAAsB;AAC9C,SAAOC,EAAQ,IAAIC,CAAgB,EAAE,KAAKF,CAAO;AACrD;"}
@@ -4,3 +4,4 @@ export {
4
4
  o as initI18next,
5
5
  r as useTranslateI18next
6
6
  };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -8,3 +8,4 @@ export {
8
8
  a as LoadingProvider,
9
9
  n as useLoading
10
10
  };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -47,3 +47,4 @@ function E({ full: n = !1, className: a = "", message: r = "Loading", ...d }) {
47
47
  export {
48
48
  E as Loading
49
49
  };
50
+ //# sourceMappingURL=loading.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading.component.js","sources":["../../../src/react/loading/loading.component.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport * as React from 'react';\nimport { useEffect } from 'react';\n\nimport type { I_LoadingProps } from './loading.type.js';\n\nimport style from './loading.module.scss';\n\n/**\n * Injects CSS styles to prevent scrolling when full-screen loading is active.\n * This function creates and injects a style element that adds the 'noscroll' class\n * to prevent body scrolling and sets a fixed height. It ensures the style is only\n * injected once by checking for an existing style element with the same ID.\n */\nfunction injectNoScrollStyle() {\n if (document.getElementById('noscroll-style')) {\n return;\n }\n\n const style = document.createElement('style');\n style.id = 'noscroll-style';\n style.innerHTML = `\n .noscroll {\n overflow: hidden !important;\n height: 100vh !important;\n }\n `;\n document.head.appendChild(style);\n}\n\n/**\n * Loading component that displays animated loading indicators.\n * This component provides a customizable loading interface with animated rings\n * and optional full-screen overlay. It includes features for preventing user\n * interaction during loading states and supports both inline and full-screen modes.\n *\n * Features:\n * - Animated loading rings with multiple colors\n * - Full-screen overlay mode with scroll prevention\n * - Context menu prevention during full-screen loading\n * - Customizable loading message\n * - Responsive design with CSS modules\n * - Accessibility considerations with reduced motion support\n *\n * @param props - Component props containing loading configuration.\n * @param props.full - Whether to display the loading indicator in full-screen mode (default: false).\n * @param props.className - Additional CSS classes to apply to the loading container.\n * @param props.message - Custom message to display below the loading animation.\n * @param props.rest - Additional props to spread to the loading container.\n * @returns A React component displaying the loading animation with optional full-screen overlay.\n */\nexport function Loading({ full = false, className = '', message = 'Loading', ...rest }: I_LoadingProps) {\n useEffect(() => {\n if (full) {\n document.body.classList.add('noscroll');\n\n const handleContextMenu = (e: MouseEvent) => e.preventDefault();\n document.addEventListener('contextmenu', handleContextMenu);\n\n return () => {\n document.body.classList.remove('noscroll');\n document.removeEventListener('contextmenu', handleContextMenu);\n };\n }\n }, [full]);\n\n useEffect(() => {\n injectNoScrollStyle();\n }, []);\n\n /**\n * Renders the core loading animation with rings and message.\n * This function creates the animated loading rings and optional message\n * that are used in both full-screen and inline loading modes.\n *\n * @returns A React element containing the loading animation and message.\n */\n function _renderLoading() {\n return (\n <div\n role=\"status\"\n aria-live=\"polite\"\n aria-label={message}\n className={style['container']}\n {...rest}\n >\n <div className={style['ring']} aria-hidden=\"true\"></div>\n <div className={style['ring']} aria-hidden=\"true\"></div>\n <div className={style['ring']} aria-hidden=\"true\"></div>\n <div className={style['ring']} aria-hidden=\"true\"></div>\n {message && <div className={style['message']}>{message}</div>}\n </div>\n );\n }\n\n if (full) {\n return (\n <div className={clsx(style['full'], className)}>\n {_renderLoading()}\n </div>\n );\n }\n\n return (\n <div className={clsx(style['block'], className)}>\n {_renderLoading()}\n </div>\n );\n}\n"],"names":["clsx","React","useEffect","style","injectNoScrollStyle","Loading","full","className","message","rest","handleContextMenu","e","_renderLoading"],"mappings":"AAcA,OAAAA,OAAA;AAAA,YAAAC,OAAA;AAAA,SAAA,aAAAC,SAAA;AAAA,OAAAC,OAAA;AAAA,SAASC,IAAsB;AAC3B,MAAI,SAAS,eAAe,gBAAgB;AACxC;AAGJ,QAAMD,IAAQ,SAAS,cAAc,OAAO;AAC5CA,EAAAA,EAAM,KAAK,kBACXA,EAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,OAMlB,SAAS,KAAK,YAAYA,CAAK;AACnC;AAuBO,SAASE,EAAQ,EAAE,MAAAC,IAAO,IAAO,WAAAC,IAAY,IAAI,SAAAC,IAAU,WAAW,GAAGC,KAAwB;AACpG,EAAAP,EAAU,MAAM;AACZ,QAAII,GAAM;AACN,eAAS,KAAK,UAAU,IAAI,UAAU;AAEtC,YAAMI,IAAoB,CAACC,MAAkBA,EAAE,eAAA;AAC/C,sBAAS,iBAAiB,eAAeD,CAAiB,GAEnD,MAAM;AACT,iBAAS,KAAK,UAAU,OAAO,UAAU,GACzC,SAAS,oBAAoB,eAAeA,CAAiB;AAAA,MACjE;AAAA,IACJ;AAAA,EACJ,GAAG,CAACJ,CAAI,CAAC,GAETJ,EAAU,MAAM;AACZ,IAAAE,EAAA;AAAA,EACJ,GAAG,CAAA,CAAE;AASL,WAASQ,IAAiB;AACtB,WACI,gBAAAX,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,MAAK;AAAA,QACL,aAAU;AAAA,QACV,cAAYO;AAAA,QACZ,WAAWL,EAAM;AAAA,QAChB,GAAGM;AAAA,MAAA;AAAA,sCAEH,OAAA,EAAI,WAAWN,EAAM,MAAS,eAAY,QAAO;AAAA,sCACjD,OAAA,EAAI,WAAWA,EAAM,MAAS,eAAY,QAAO;AAAA,sCACjD,OAAA,EAAI,WAAWA,EAAM,MAAS,eAAY,QAAO;AAAA,sCACjD,OAAA,EAAI,WAAWA,EAAM,MAAS,eAAY,QAAO;AAAA,MACjDK,KAAW,gBAAAP,EAAA,cAAC,OAAA,EAAI,WAAWE,EAAM,WAAaK,CAAQ;AAAA,IAAA;AAAA,EAGnE;AAEA,SAAIF,IAEI,gBAAAL,EAAA,cAAC,OAAA,EAAI,WAAWD,EAAKG,EAAM,MAASI,CAAS,EAAA,GACxCK,EAAA,CACL,IAKJ,gBAAAX,EAAA,cAAC,OAAA,EAAI,WAAWD,EAAKG,EAAM,OAAUI,CAAS,EAAA,GACzCK,EAAA,CACL;AAER;"}
@@ -3,3 +3,4 @@ const e = o(void 0);
3
3
  export {
4
4
  e as LoadingContext
5
5
  };
6
+ //# sourceMappingURL=loading.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading.context.js","sources":["../../../src/react/loading/loading.context.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nimport type { I_LoadingContext } from './loading.type.js';\n\nexport const LoadingContext = createContext<I_LoadingContext | undefined>(undefined);\n"],"names":["createContext","LoadingContext"],"mappings":"AAIO,SAAA,iBAAAA,SAAA;AAAA,MAAMC,IAAiBD,EAA4C,MAAS;"}
@@ -9,3 +9,4 @@ function i() {
9
9
  export {
10
10
  i as useLoading
11
11
  };
12
+ //# sourceMappingURL=loading.hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading.hook.js","sources":["../../../src/react/loading/loading.hook.tsx"],"sourcesContent":["import { use } from 'react';\n\nimport { LoadingContext } from './loading.context.js';\n\n/**\n * React hook that provides access to loading context.\n * This hook retrieves the loading context which contains loading state and\n * control methods. It provides a convenient way to access loading functionality\n * within components, allowing them to show and hide loading states.\n *\n * The hook will throw an error if used outside of a LoadingProvider,\n * ensuring proper context usage and providing clear error messages for debugging.\n *\n * @returns The loading context containing loading state and control methods.\n * @throws {Error} When used outside of a LoadingProvider context.\n */\nexport function useLoading() {\n const context = use(LoadingContext);\n if (!context) {\n throw new Error('useLoading must be used within a LoadingProvider');\n }\n return context;\n}\n"],"names":["use","LoadingContext","useLoading","context"],"mappings":"AAgBO,SAAA,OAAAA,SAAA;AAAA,SAAA,kBAAAC,SAAA;AAAA,SAASC,IAAa;AACzB,QAAMC,IAAUH,EAAIC,CAAc;AAClC,MAAI,CAACE;AACD,UAAM,IAAI,MAAM,kDAAkD;AAEtE,SAAOA;AACX;"}
@@ -13,3 +13,4 @@ export {
13
13
  c as message,
14
14
  s as ring
15
15
  };
16
+ //# sourceMappingURL=loading.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -16,3 +16,4 @@ function x({ children: c }) {
16
16
  export {
17
17
  x as LoadingProvider
18
18
  };
19
+ //# sourceMappingURL=loading.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading.provider.js","sources":["../../../src/react/loading/loading.provider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCallback, useMemo, useState } from 'react';\n\nimport type { I_Children } from '#typescript/index.js';\n\nimport { Loading } from './loading.component.js';\nimport { LoadingContext } from './loading.context.js';\n\n/**\n * Provider component that manages loading state and provides loading context.\n * This component sets up loading state management for the application and provides\n * loading context to all child components through React context.\n *\n * Features:\n * - Global loading state management\n * - Loading context provision to child components\n * - Automatic loading state synchronization\n * - Integration with loading components\n *\n * @param props - Component props containing children.\n * @param props.children - React children that will have access to the loading context.\n * @returns A React component that provides loading context to its children.\n */\nexport function LoadingProvider({ children }: I_Children) {\n const [isLoading, setIsLoading] = useState(false);\n const [isGlobalLoading, setIsGlobalLoading] = useState(false);\n\n const showLoading = useCallback((global = false) => {\n setIsLoading(true);\n setIsGlobalLoading(global);\n }, []);\n\n const hideLoading = useCallback(() => {\n setIsLoading(false);\n setIsGlobalLoading(false);\n }, []);\n\n const contextValue = useMemo(\n () => ({ isLoading, isGlobalLoading, showLoading, hideLoading }),\n [isLoading, isGlobalLoading, showLoading, hideLoading],\n );\n\n return (\n <LoadingContext value={contextValue}>\n {isLoading ? <Loading full={isGlobalLoading} /> : children}\n </LoadingContext>\n );\n}\n"],"names":["React","useState","useCallback","useMemo","Loading","LoadingContext","LoadingProvider","children","isLoading","setIsLoading","isGlobalLoading","setIsGlobalLoading","showLoading","global","hideLoading","contextValue"],"mappings":"AAuBO,YAAAA,OAAA;AAAA,SAAA,YAAAC,GAAA,eAAAC,GAAA,WAAAC,SAAA;AAAA,SAAA,WAAAC,SAAA;AAAA,SAAA,kBAAAC,SAAA;AAAA,SAASC,EAAgB,EAAE,UAAAC,KAAwB;AACtD,QAAM,CAACC,GAAWC,CAAY,IAAIR,EAAS,EAAK,GAC1C,CAACS,GAAiBC,CAAkB,IAAIV,EAAS,EAAK,GAEtDW,IAAcV,EAAY,CAACW,IAAS,OAAU;AAChD,IAAAJ,EAAa,EAAI,GACjBE,EAAmBE,CAAM;AAAA,EAC7B,GAAG,CAAA,CAAE,GAECC,IAAcZ,EAAY,MAAM;AAClC,IAAAO,EAAa,EAAK,GAClBE,EAAmB,EAAK;AAAA,EAC5B,GAAG,CAAA,CAAE,GAECI,IAAeZ;AAAA,IACjB,OAAO,EAAE,WAAAK,GAAW,iBAAAE,GAAiB,aAAAE,GAAa,aAAAE,EAAA;AAAA,IAClD,CAACN,GAAWE,GAAiBE,GAAaE,CAAW;AAAA,EAAA;AAGzD,SACI,gBAAAd,EAAA,cAACK,GAAA,EAAe,OAAOU,EAAA,GAClBP,oCAAaJ,GAAA,EAAQ,MAAMM,EAAA,CAAiB,IAAKH,CACtD;AAER;"}
@@ -3,3 +3,4 @@ export {
3
3
  c as catchError,
4
4
  t as log
5
5
  };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -28,3 +28,4 @@ export {
28
28
  g as catchError,
29
29
  l as log
30
30
  };
31
+ //# sourceMappingURL=log.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.util.js","sources":["../../../src/react/log/log.util.ts"],"sourcesContent":["import { consola } from 'consola/browser';\n\nimport type { I_Log, I_Return } from '#typescript/index.js';\n\nimport { RESPONSE_STATUS } from '#constant/index.js';\n\nimport type { I_CatchErrorOptions } from './log.type.js';\n\n/**\n * Browser-compatible logging interface using consola.\n * This object provides all standard consola logging methods for use in browser environments,\n * including error, warning, info, success, and debug logging capabilities.\n */\nexport const log: I_Log = {\n silent: consola.silent,\n level: consola.level,\n fatal: consola.fatal,\n error: consola.error,\n warn: consola.warn,\n log: consola.log,\n info: consola.info,\n success: consola.success,\n ready: consola.ready,\n start: consola.start,\n box: consola.box,\n debug: consola.debug,\n trace: consola.trace,\n verbose: consola.verbose,\n};\n\n/**\n * Catches and handles errors with configurable behavior for React applications.\n * This function provides a standardized way to handle errors in React components\n * with options for logging control, return value specification, and custom callback execution.\n *\n * The function handles different error input types and provides consistent error\n * response formatting for React applications.\n *\n * @param errorInput - The error to catch and handle, can be Error object, string, or unknown type.\n * @param options - Configuration options for error handling behavior.\n * @returns Either the specified return value or a standardized error response object.\n */\nexport function catchError<T = unknown>(errorInput: unknown, options: I_CatchErrorOptions & { returnValue: T }): T;\nexport function catchError<T = unknown>(errorInput: unknown, options?: I_CatchErrorOptions): I_Return<T>;\nexport function catchError<T = unknown>(errorInput: unknown, options?: I_CatchErrorOptions): I_Return<T> | T {\n const { shouldLog = true, returnValue, callback } = options ?? {};\n\n const error = errorInput instanceof Error\n ? errorInput\n : new Error(typeof errorInput === 'string' ? errorInput : 'Unknown error');\n\n if (shouldLog) {\n log.error(error.message);\n }\n\n if (callback && typeof callback === 'function') {\n callback(error);\n }\n\n if (returnValue) {\n return returnValue as I_Return<T>;\n }\n\n return {\n success: false,\n message: error.message,\n code: RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE,\n };\n}\n"],"names":["consola","RESPONSE_STATUS","log","catchError","errorInput","options","shouldLog","returnValue","callback","error"],"mappings":"AAaO,SAAA,WAAAA,SAAA;AAAA,SAAA,mBAAAC,SAAA;AAAA,MAAMC,IAAa;AAAA,EACtB,QAAQF,EAAQ;AAAA,EAChB,OAAOA,EAAQ;AAAA,EACf,OAAOA,EAAQ;AAAA,EACf,OAAOA,EAAQ;AAAA,EACf,MAAMA,EAAQ;AAAA,EACd,KAAKA,EAAQ;AAAA,EACb,MAAMA,EAAQ;AAAA,EACd,SAASA,EAAQ;AAAA,EACjB,OAAOA,EAAQ;AAAA,EACf,OAAOA,EAAQ;AAAA,EACf,KAAKA,EAAQ;AAAA,EACb,OAAOA,EAAQ;AAAA,EACf,OAAOA,EAAQ;AAAA,EACf,SAASA,EAAQ;AACrB;AAgBO,SAASG,EAAwBC,GAAqBC,GAAgD;AACzG,QAAM,EAAE,WAAAC,IAAY,IAAM,aAAAC,GAAa,UAAAC,EAAA,IAAaH,KAAW,CAAA,GAEzDI,IAAQL,aAAsB,QAC9BA,IACA,IAAI,MAAM,OAAOA,KAAe,WAAWA,IAAa,eAAe;AAU7E,SARIE,KACAJ,EAAI,MAAMO,EAAM,OAAO,GAGvBD,KAAY,OAAOA,KAAa,cAChCA,EAASC,CAAK,GAGdF,KAIG;AAAA,IACH,SAAS;AAAA,IACT,SAASE,EAAM;AAAA,IACf,MAAMR,EAAgB,sBAAsB;AAAA,EAAA;AAEpD;"}
@@ -11,3 +11,4 @@ export {
11
11
  f as useTranslateNextIntl,
12
12
  n as withNextIntl
13
13
  };
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -14,3 +14,4 @@ const a = {
14
14
  export {
15
15
  a as NEXT_INTL_DEFAULT_LANGUAGE
16
16
  };
17
+ //# sourceMappingURL=next-intl.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-intl.constant.js","sources":["../../../src/react/next-intl/next-intl.constant.ts"],"sourcesContent":["import { enUS as enUSAdapter } from 'date-fns/locale';\n\n/**\n * Default language configuration for Next.js internationalization.\n * This constant provides the default English (US) language settings including:\n * - Language label and value for display and identification\n * - Flag emoji and icon for UI representation\n * - Date-fns locale adapter for date formatting\n * - Number formatting configuration (locale and currency)\n * - Timezone setting for date/time operations\n */\nexport const NEXT_INTL_DEFAULT_LANGUAGE = {\n label: 'English',\n value: 'en',\n flag: '🇺🇸',\n adapterLocale: enUSAdapter,\n icon: 'flagpack:gb-nir',\n numberFormat: {\n code: 'en-US',\n currency: 'USD',\n },\n timezone: 'America/New_York',\n};\n"],"names":["enUS","NEXT_INTL_DEFAULT_LANGUAGE","enUSAdapter"],"mappings":"AAWO,SAAA,QAAAA,SAAA;AAAA,MAAMC,IAA6B;AAAA,EACtC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EACN,eAAeC;AAAAA,EACf,MAAM;AAAA,EACN,cAAc;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,EAAA;AAAA,EAEd,UAAU;AACd;"}
@@ -3,3 +3,4 @@ const e = t(void 0);
3
3
  export {
4
4
  e as NextIntlContext
5
5
  };
6
+ //# sourceMappingURL=next-intl.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-intl.context.js","sources":["../../../src/react/next-intl/next-intl.context.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nimport type { I_NextIntlContext } from './next-intl.type.js';\n\nexport const NextIntlContext = createContext<I_NextIntlContext | undefined>(undefined);\n"],"names":["createContext","NextIntlContext"],"mappings":"AAIO,SAAA,iBAAAA,SAAA;AAAA,MAAMC,IAAkBD,EAA6C,MAAS;"}
@@ -21,3 +21,4 @@ function x(t) {
21
21
  export {
22
22
  x as withNextIntl
23
23
  };
24
+ //# sourceMappingURL=next-intl.hoc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-intl.hoc.js","sources":["../../../src/react/next-intl/next-intl.hoc.tsx"],"sourcesContent":["import type { ComponentType } from 'react';\n\nimport { NextIntlClientProvider } from 'next-intl';\nimport * as React from 'react';\n\nimport type { I_Children } from '#typescript/index.js';\n\nimport type { I_NextIntlLanguage, T_NextIntlMessageList } from './next-intl.type.js';\n\nimport { log } from '../log/index.js';\nimport { NEXT_INTL_DEFAULT_LANGUAGE } from './next-intl.constant.js';\nimport { useNextIntl } from './next-intl.hook.js';\n\n/**\n * Higher-Order Component (HOC) that wraps components with Next.js internationalization support.\n * This HOC provides internationalization capabilities to React components by wrapping them\n * with the NextIntlClientProvider. It automatically handles language detection, message\n * loading, and timezone configuration based on the current language settings.\n *\n * Features:\n * - Automatic language detection and message loading\n * - Timezone configuration based on language settings\n * - Fallback to default language when messages are missing\n * - Warning logging for missing message configurations\n * - Proper display name preservation for debugging\n *\n * @param Component - The React component to wrap with internationalization support.\n * @returns A new component with internationalization capabilities and additional props for languages and messages.\n */\nexport function withNextIntl<T extends I_Children>(Component: ComponentType<T>) {\n const PageWithI18n = (props: T & { languages: I_NextIntlLanguage[]; messages: T_NextIntlMessageList }) => {\n const { currentLanguage } = useNextIntl();\n const { messages, languages } = props;\n const defaultLang = 'en';\n\n const defaultMessages = messages[currentLanguage?.value || defaultLang];\n const timeZone = languages.find(lang => lang.value === currentLanguage?.value)?.timezone ?? NEXT_INTL_DEFAULT_LANGUAGE.timezone;\n\n if (!messages) {\n log.warn(`Missing messages for language: ${currentLanguage?.value || defaultLang}`);\n return null;\n }\n\n return (\n <NextIntlClientProvider\n locale={currentLanguage?.value || defaultLang}\n messages={defaultMessages || null}\n timeZone={timeZone}\n >\n <Component {...(props as T)} />\n </NextIntlClientProvider>\n );\n };\n\n PageWithI18n.displayName = `withNextIntl(${Component.displayName || Component.name || 'Component'})`;\n\n return PageWithI18n;\n}\n"],"names":["withNextIntl","Component","PageWithI18n","props","currentLanguage","useNextIntl","messages","languages","defaultLang","defaultMessages","timeZone","lang","NEXT_INTL_DEFAULT_LANGUAGE","React","NextIntlClientProvider","log"],"mappings":";;;;;AA6BO,SAASA,EAAmCC,GAA6B;AAC5E,QAAMC,IAAe,CAACC,MAAoF;AACtG,UAAM,EAAE,iBAAAC,EAAA,IAAoBC,EAAA,GACtB,EAAE,UAAAC,GAAU,WAAAC,EAAA,IAAcJ,GAC1BK,IAAc,MAEdC,IAAkBH,EAASF,GAAiB,SAASI,CAAW,GAChEE,IAAWH,EAAU,KAAK,CAAAI,MAAQA,EAAK,UAAUP,GAAiB,KAAK,GAAG,YAAYQ,EAA2B;AAEvH,WAAKN,IAMD,gBAAAO,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACG,QAAQV,GAAiB,SAASI;AAAA,QAClC,UAAUC,KAAmB;AAAA,QAC7B,UAAAC;AAAA,MAAA;AAAA,MAEA,gBAAAG,EAAA,cAACZ,GAAA,EAAW,GAAIE,EAAA,CAAa;AAAA,IAAA,KAVjCY,EAAI,KAAK,kCAAkCX,GAAiB,SAASI,CAAW,EAAE,GAC3E;AAAA,EAYf;AAEA,SAAAN,EAAa,cAAc,gBAAgBD,EAAU,eAAeA,EAAU,QAAQ,WAAW,KAE1FC;AACX;"}
@@ -12,3 +12,4 @@ export {
12
12
  u as useNextIntl,
13
13
  x as useTranslateNextIntl
14
14
  };
15
+ //# sourceMappingURL=next-intl.hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-intl.hook.js","sources":["../../../src/react/next-intl/next-intl.hook.tsx"],"sourcesContent":["import { useTranslations } from 'next-intl';\nimport { use } from 'react';\n\nimport type { I_NextIntlContext } from './next-intl.type.js';\n\nimport { NextIntlContext } from './next-intl.context.js';\n\n/**\n * React hook that provides access to Next.js internationalization context.\n * This hook retrieves the Next.js internationalization context which contains\n * language information and language switching functionality. It provides a\n * convenient way to access internationalization features within components.\n *\n * The hook will throw an error if used outside of a NextIntlProvider,\n * ensuring proper context usage and providing clear error messages for debugging.\n *\n * @returns The Next.js internationalization context containing language state and control methods.\n * @throws {Error} When used outside of a NextIntlProvider context.\n */\nexport function useNextIntl(): I_NextIntlContext {\n const context = use(NextIntlContext);\n\n if (!context) {\n throw new Error('useNextIntl must be used within a NextIntlProvider');\n }\n\n return context;\n}\n\n/**\n * React hook that provides Next.js translation functionality.\n * This hook is a wrapper around next-intl's useTranslations hook,\n * providing access to translation functions and current locale information.\n * It enables internationalization features including text translation,\n * locale switching, and pluralization support for Next.js applications.\n *\n * @returns The useTranslations hook result with translation functions and locale information.\n */\nexport const useTranslateNextIntl: typeof useTranslations = useTranslations;\n"],"names":["useTranslations","use","NextIntlContext","useNextIntl","context","useTranslateNextIntl"],"mappings":"AAmBO,SAAA,mBAAAA,SAAA;AAAA,SAAA,OAAAC,SAAA;AAAA,SAAA,mBAAAC,SAAA;AAAA,SAASC,IAAiC;AAC7C,QAAMC,IAAUH,EAAIC,CAAe;AAEnC,MAAI,CAACE;AACD,UAAM,IAAI,MAAM,oDAAoD;AAGxE,SAAOA;AACX;AAWO,MAAMC,IAA+CL;"}
@@ -22,3 +22,4 @@ function I({
22
22
  export {
23
23
  I as NextIntlProvider
24
24
  };
25
+ //# sourceMappingURL=next-intl.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-intl.provider.js","sources":["../../../src/react/next-intl/next-intl.provider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useMemo } from 'react';\n\nimport type { I_Children } from '#typescript/index.js';\n\nimport type { I_NextIntlLanguage, I_NextIntlProviderProps } from './next-intl.type.js';\n\nimport { useStorage } from '../storage/index.js';\nimport { NEXT_INTL_DEFAULT_LANGUAGE } from './next-intl.constant.js';\nimport { NextIntlContext } from './next-intl.context.js';\nimport { withNextIntl } from './next-intl.hoc.js';\n\n/**\n * Base component that serves as a wrapper for the withNextIntl HOC.\n * This component is used internally by the NextIntlProvider to create\n * the language wrapper component with internationalization capabilities.\n *\n * @param props - Component props containing children.\n * @param props.children - React children to be wrapped with internationalization support.\n * @returns A React component that passes through its children.\n */\nfunction LanguageWrapperBase({ children }: I_Children) {\n return <>{children}</>;\n}\n\nconst LanguageWrapper = withNextIntl(LanguageWrapperBase);\n\n/**\n * Provider component that manages Next.js internationalization state and provides i18n context.\n * This component sets up a complete internationalization system for Next.js applications,\n * including language management, message loading, and persistent language preferences.\n * It integrates with the storage system to remember user language choices and provides\n * a comprehensive i18n context to all child components.\n *\n * Features:\n * - Language state management with persistence\n * - Automatic language detection and fallback\n * - Message loading and caching\n * - Timezone configuration per language\n * - Integration with Next.js internationalization\n * - Memoized context value for performance optimization\n *\n * @param props - Component props containing children, languages, and messages.\n * @param props.children - React children that will have access to the internationalization context.\n * @param props.languages - Array of supported languages with their configurations.\n * @param props.messages - Object containing translation messages for each supported language.\n * @returns A React component that provides internationalization context to its children.\n */\nexport function NextIntlProvider({\n children,\n languages,\n messages,\n}: I_NextIntlProviderProps) {\n const { value, set } = useStorage<I_NextIntlLanguage>('lang', languages[0]);\n\n const contextValue = useMemo(\n () => ({ languages, currentLanguage: value ?? NEXT_INTL_DEFAULT_LANGUAGE, setCurrentLanguage: set }),\n [languages, set, value],\n );\n\n return (\n <NextIntlContext value={contextValue}>\n <LanguageWrapper languages={languages} messages={messages}>\n {children}\n </LanguageWrapper>\n </NextIntlContext>\n );\n}\n"],"names":["React","useMemo","NEXT_INTL_DEFAULT_LANGUAGE","NextIntlContext","withNextIntl","useStorage","LanguageWrapperBase","children","LanguageWrapper","NextIntlProvider","languages","messages","value","set","contextValue"],"mappings":"AAqBA,YAAAA,OAAA;AAAA,SAAA,WAAAC,SAAA;AAAA,SAAA,8BAAAC,SAAA;AAAA,SAAA,mBAAAC,SAAA;AAAA,SAAA,gBAAAC,SAAA;AAAA,SAAA,cAAAC,SAAA;AAAA,SAASC,EAAoB,EAAE,UAAAC,KAAwB;AACnD,2DAAUA,CAAS;AACvB;AAEA,MAAMC,IAAkBJ,EAAaE,CAAmB;AAuBjD,SAASG,EAAiB;AAAA,EAC7B,UAAAF;AAAA,EACA,WAAAG;AAAA,EACA,UAAAC;AACJ,GAA4B;AACxB,QAAM,EAAE,OAAAC,GAAO,KAAAC,EAAA,IAAQR,EAA+B,QAAQK,EAAU,CAAC,CAAC,GAEpEI,IAAeb;AAAA,IACjB,OAAO,EAAE,WAAAS,GAAW,iBAAiBE,KAASV,GAA4B,oBAAoBW;IAC9F,CAACH,GAAWG,GAAKD,CAAK;AAAA,EAAA;AAG1B,SACI,gBAAAZ,EAAA,cAACG,KAAgB,OAAOW,EAAA,mCACnBN,GAAA,EAAgB,WAAAE,GAAsB,UAAAC,EAAA,GAClCJ,CACL,CACJ;AAER;"}
@@ -4,3 +4,4 @@ export {
4
4
  a as storage,
5
5
  e as useStorage
6
6
  };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -57,3 +57,4 @@ function S(e, o, a = w) {
57
57
  export {
58
58
  S as useStorage
59
59
  };
60
+ //# sourceMappingURL=storage.hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.hook.js","sources":["../../../src/react/storage/storage.hook.tsx"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport type { I_Serializer } from '#util/serializer/index.js';\n\nimport { serializer as defaultSerializer } from '#util/serializer/index.js';\n\nimport { catchError } from '../log/index.js';\nimport { storage } from './storage.util.js';\n\n/**\n * React hook that provides persistent storage functionality with automatic serialization.\n * This hook manages state that persists across browser sessions using localForage,\n * with automatic serialization/deserialization of complex data types. It provides\n * a React-friendly interface for storage operations with proper error handling.\n *\n * Features:\n * - Automatic data serialization and deserialization\n * - Persistent storage across browser sessions\n * - Initial value handling and fallback\n * - Error handling with graceful degradation\n * - Automatic storage synchronization\n * - Support for complex data types via custom serializers\n *\n * @param key - The unique storage key for the data.\n * @param initialValue - Optional initial value to use if no stored value exists.\n * @param serializer - Optional custom serializer for complex data types (defaults to JSON serializer).\n * @returns An object containing the current value, set function, and remove function.\n */\nexport function useStorage<T>(\n key: string,\n initialValue?: T,\n serializer: I_Serializer<T> = defaultSerializer as I_Serializer<T>,\n) {\n const [value, setValue] = useState<T | undefined>(initialValue);\n const [isLoaded, setIsLoaded] = useState(false);\n\n useEffect(() => {\n let isMounted = true;\n\n const loadValue = async () => {\n try {\n const valueFound = await storage.get<string>(key);\n\n if (isMounted) {\n if (valueFound !== null) {\n const parsedValue = serializer.deserialize(valueFound);\n setValue(parsedValue);\n }\n else if (initialValue !== undefined) {\n const serialized = serializer.serialize(initialValue);\n await storage.set(key, serialized);\n setValue(initialValue);\n }\n else {\n setValue(undefined);\n }\n }\n }\n catch (error) {\n catchError(error);\n\n if (isMounted) {\n setValue(initialValue);\n }\n }\n finally {\n if (isMounted)\n setIsLoaded(true);\n }\n };\n\n loadValue();\n\n return () => {\n isMounted = false;\n setIsLoaded(false);\n };\n }, [key, initialValue, serializer]);\n\n useEffect(() => {\n if (!isLoaded)\n return;\n\n const saveValue = async () => {\n try {\n if (value !== undefined) {\n const serialized = serializer.serialize(value);\n await storage.set(key, serialized);\n }\n }\n catch (error) {\n catchError(error);\n }\n };\n\n saveValue();\n }, [value, key, serializer, isLoaded]);\n\n const set = useCallback(\n (newValue: T | ((val: T | undefined) => T)) => {\n setValue((prev) => {\n if (typeof newValue === 'function') {\n return (newValue as (val: T | undefined) => T)(prev);\n }\n return newValue;\n });\n },\n [],\n );\n\n const remove = useCallback(async () => {\n try {\n await storage.remove(key);\n setValue(undefined);\n }\n catch (error) {\n catchError(error);\n }\n }, [key]);\n\n return { value, set, remove };\n}\n"],"names":["useStorage","key","initialValue","serializer","defaultSerializer","value","setValue","useState","isLoaded","setIsLoaded","useEffect","isMounted","valueFound","storage","parsedValue","serialized","error","catchError","set","useCallback","newValue","prev","remove"],"mappings":";;;;AA4BO,SAASA,EACZC,GACAC,GACAC,IAA8BC,GAChC;AACE,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAwBL,CAAY,GACxD,CAACM,GAAUC,CAAW,IAAIF,EAAS,EAAK;AAE9C,EAAAG,EAAU,MAAM;AACZ,QAAIC,IAAY;AAkChB,YAhCkB,YAAY;AAC1B,UAAI;AACA,cAAMC,IAAa,MAAMC,EAAQ,IAAYZ,CAAG;AAEhD,YAAIU;AACA,cAAIC,MAAe,MAAM;AACrB,kBAAME,IAAcX,EAAW,YAAYS,CAAU;AACrD,YAAAN,EAASQ,CAAW;AAAA,UACxB,WACSZ,MAAiB,QAAW;AACjC,kBAAMa,IAAaZ,EAAW,UAAUD,CAAY;AACpD,kBAAMW,EAAQ,IAAIZ,GAAKc,CAAU,GACjCT,EAASJ,CAAY;AAAA,UACzB;AAEI,YAAAI,EAAS,MAAS;AAAA,MAG9B,SACOU,GAAO;AACV,QAAAC,EAAWD,CAAK,GAEZL,KACAL,EAASJ,CAAY;AAAA,MAE7B,UAAA;AAEI,QAAIS,KACAF,EAAY,EAAI;AAAA,MACxB;AAAA,IACJ,GAEA,GAEO,MAAM;AACT,MAAAE,IAAY,IACZF,EAAY,EAAK;AAAA,IACrB;AAAA,EACJ,GAAG,CAACR,GAAKC,GAAcC,CAAU,CAAC,GAElCO,EAAU,MAAM;AACZ,QAAI,CAACF;AACD;AAcJ,KAZkB,YAAY;AAC1B,UAAI;AACA,YAAIH,MAAU,QAAW;AACrB,gBAAMU,IAAaZ,EAAW,UAAUE,CAAK;AAC7C,gBAAMQ,EAAQ,IAAIZ,GAAKc,CAAU;AAAA,QACrC;AAAA,MACJ,SACOC,GAAO;AACV,QAAAC,EAAWD,CAAK;AAAA,MACpB;AAAA,IACJ,GAEA;AAAA,EACJ,GAAG,CAACX,GAAOJ,GAAKE,GAAYK,CAAQ,CAAC;AAErC,QAAMU,IAAMC;AAAA,IACR,CAACC,MAA8C;AAC3C,MAAAd,EAAS,CAACe,MACF,OAAOD,KAAa,aACZA,EAAuCC,CAAI,IAEhDD,CACV;AAAA,IACL;AAAA,IACA,CAAA;AAAA,EAAC,GAGCE,IAASH,EAAY,YAAY;AACnC,QAAI;AACA,YAAMN,EAAQ,OAAOZ,CAAG,GACxBK,EAAS,MAAS;AAAA,IACtB,SACOU,GAAO;AACV,MAAAC,EAAWD,CAAK;AAAA,IACpB;AAAA,EACJ,GAAG,CAACf,CAAG,CAAC;AAER,SAAO,EAAE,OAAAI,GAAO,KAAAa,GAAK,QAAAI,EAAA;AACzB;"}
@@ -0,0 +1 @@
1
+ export {};
@@ -66,3 +66,4 @@ const s = {
66
66
  export {
67
67
  s as storage
68
68
  };
69
+ //# sourceMappingURL=storage.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.util.js","sources":["../../../src/react/storage/storage.util.ts"],"sourcesContent":["import localForage from 'localforage';\n\nimport { catchError } from '../log/index.js';\n\n/**\n * Browser storage utility object using localForage for cross-browser compatibility.\n * This object provides a unified interface for browser storage operations using localForage,\n * which automatically chooses the best available storage method (IndexedDB, WebSQL, or localStorage)\n * based on browser capabilities. It includes comprehensive error handling and type safety.\n */\nexport const storage = {\n /**\n * Retrieves a value from browser storage by key.\n * This method fetches data that was previously stored using the set method.\n * Returns null if the key doesn't exist or if an error occurs during retrieval.\n *\n * @param key - The unique identifier for the stored value.\n * @returns A promise that resolves to the stored value or null if not found.\n */\n async get<T = unknown>(key: string): Promise<T | null> {\n try {\n return await localForage.getItem<T>(key);\n }\n catch (error) {\n return catchError(error, { returnValue: null });\n }\n },\n /**\n * Stores a value in browser storage with a unique key.\n * This method saves data that can be retrieved later using the get method.\n * The data is automatically handled by localForage which chooses the optimal\n * storage method for the browser environment.\n *\n * @param key - The unique identifier for the value to store.\n * @param value - The data to store (will be automatically handled by localForage).\n * @returns A promise that resolves when the storage operation is complete.\n */\n async set<T = unknown>(key: string, value: T): Promise<void> {\n try {\n await localForage.setItem(key, value);\n }\n catch (error) {\n catchError(error);\n }\n },\n /**\n * Removes a value from browser storage by key.\n * This method permanently deletes the stored data associated with the specified key.\n * If the key doesn't exist, the operation completes successfully without error.\n *\n * @param key - The unique identifier of the value to remove.\n * @returns A promise that resolves when the removal operation is complete.\n */\n async remove(key: string): Promise<void> {\n try {\n await localForage.removeItem(key);\n }\n catch (error) {\n catchError(error);\n }\n },\n /**\n * Retrieves all storage keys.\n * This method returns an array of all keys that currently have stored values.\n * Returns an empty array if no keys exist or if an error occurs during retrieval.\n *\n * @returns A promise that resolves to an array of storage keys.\n */\n async keys(): Promise<string[]> {\n try {\n const keys = await localForage.keys();\n\n return keys ?? [];\n }\n catch (error) {\n return catchError(error, { returnValue: [] });\n }\n },\n};\n"],"names":["localForage","catchError","storage","key","error","value"],"mappings":"AAUO,OAAAA,OAAA;AAAA,SAAA,cAAAC,SAAA;AAAA,MAAMC,IAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASnB,MAAM,IAAiBC,GAAgC;AACnD,QAAI;AACA,aAAO,MAAMH,EAAY,QAAWG,CAAG;AAAA,IAC3C,SACOC,GAAO;AACV,aAAOH,EAAWG,GAAO,EAAE,aAAa,MAAM;AAAA,IAClD;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,IAAiBD,GAAaE,GAAyB;AACzD,QAAI;AACA,YAAML,EAAY,QAAQG,GAAKE,CAAK;AAAA,IACxC,SACOD,GAAO;AACV,MAAAH,EAAWG,CAAK;AAAA,IACpB;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,OAAOD,GAA4B;AACrC,QAAI;AACA,YAAMH,EAAY,WAAWG,CAAG;AAAA,IACpC,SACOC,GAAO;AACV,MAAAH,EAAWG,CAAK;AAAA,IACpB;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,OAA0B;AAC5B,QAAI;AAGA,aAFa,MAAMJ,EAAY,KAAA,KAEhB,CAAA;AAAA,IACnB,SACOI,GAAO;AACV,aAAOH,EAAWG,GAAO,EAAE,aAAa,CAAA,GAAI;AAAA,IAChD;AAAA,EACJ;AACJ;"}
@@ -3,3 +3,4 @@ export {
3
3
  r as Toaster,
4
4
  a as toast
5
5
  };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -2,3 +2,4 @@ import { Userback as o } from "./userback.component.js";
2
2
  export {
3
3
  o as Userback
4
4
  };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -25,3 +25,4 @@ function d({ token: r, options: n }) {
25
25
  export {
26
26
  d as Userback
27
27
  };
28
+ //# sourceMappingURL=userback.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userback.component.js","sources":["../../../src/react/userback/userback.component.tsx"],"sourcesContent":["import UserbackWidget from '@userback/widget';\nimport { useEffect } from 'react';\n\nimport type { I_UserBackProps } from './userback.type.js';\n\n/**\n * Userback feedback widget component for collecting user feedback.\n * This component integrates the Userback feedback widget into React applications,\n * providing a customizable feedback collection interface for users to submit\n * bug reports, feature requests, and general feedback.\n *\n * Features:\n * - Userback widget integration\n * - Customizable feedback collection\n * - Automatic widget initialization\n * - Token-based configuration\n * - Responsive design support\n *\n * @param props - Component props containing token and options.\n * @param props.token - The Userback token for widget authentication.\n * @param props.options - Optional configuration options for the Userback widget.\n * @returns A React component that renders the Userback feedback widget.\n */\nexport function Userback({ token, options }: I_UserBackProps) {\n useEffect(() => {\n if (!token) {\n return;\n }\n\n let observer: MutationObserver;\n\n const loadUserback = async () => {\n const { hide, ...rest } = options || {};\n\n await UserbackWidget(token, rest);\n\n if (hide && hide.length > 0) {\n hide.forEach((selector: string) => {\n document.querySelectorAll(selector).forEach(el => el.remove());\n });\n }\n\n observer = new MutationObserver(() => {\n if (hide && hide.length > 0) {\n hide.forEach((selector: string) => {\n document.querySelectorAll(selector).forEach(el => el.remove());\n });\n }\n });\n\n observer.observe(document.body, {\n childList: true,\n subtree: true,\n });\n };\n\n loadUserback();\n\n return () => {\n observer?.disconnect();\n };\n }, [token, options]);\n\n return null;\n}\n"],"names":["UserbackWidget","useEffect","Userback","token","options","observer","hide","rest","selector","el"],"mappings":"AAuBO,OAAAA,OAAA;AAAA,SAAA,aAAAC,SAAA;AAAA,SAASC,EAAS,EAAE,OAAAC,GAAO,SAAAC,KAA4B;AAC1D,SAAAH,EAAU,MAAM;AACZ,QAAI,CAACE;AACD;AAGJ,QAAIE;AA2BJ,YAzBqB,YAAY;AAC7B,YAAM,EAAE,MAAAC,GAAM,GAAGC,EAAA,IAASH,KAAW,CAAA;AAErC,YAAMJ,EAAeG,GAAOI,CAAI,GAE5BD,KAAQA,EAAK,SAAS,KACtBA,EAAK,QAAQ,CAACE,MAAqB;AAC/B,iBAAS,iBAAiBA,CAAQ,EAAE,QAAQ,CAAAC,MAAMA,EAAG,QAAQ;AAAA,MACjE,CAAC,GAGLJ,IAAW,IAAI,iBAAiB,MAAM;AAClC,QAAIC,KAAQA,EAAK,SAAS,KACtBA,EAAK,QAAQ,CAACE,MAAqB;AAC/B,mBAAS,iBAAiBA,CAAQ,EAAE,QAAQ,CAAAC,MAAMA,EAAG,QAAQ;AAAA,QACjE,CAAC;AAAA,MAET,CAAC,GAEDJ,EAAS,QAAQ,SAAS,MAAM;AAAA,QAC5B,WAAW;AAAA,QACX,SAAS;AAAA,MAAA,CACZ;AAAA,IACL,GAEA,GAEO,MAAM;AACT,MAAAA,GAAU,WAAA;AAAA,IACd;AAAA,EACJ,GAAG,CAACF,GAAOC,CAAO,CAAC,GAEZ;AACX;"}
@@ -2,3 +2,4 @@ var p = /* @__PURE__ */ ((e) => (e.PRODUCTION = "production", e.STAGING = "stagi
2
2
  export {
3
3
  p as E_Environment
4
4
  };
5
+ //# sourceMappingURL=common.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.type.js","sources":["../../src/typescript/common.type.ts"],"sourcesContent":["import type consola from 'consola';\n\n/**\n * Generic object type with string keys and values of type T (defaults to unknown).\n */\nexport type T_Object<T = unknown> = Record<string, T>;\n\n/**\n * Logging interface for browser and Node.js environments, compatible with consola.\n */\nexport interface I_Log {\n silent: typeof consola['silent'];\n level: typeof consola['level'];\n fatal: typeof consola['fatal'];\n error: typeof consola['error'];\n warn: typeof consola['warn'];\n log: typeof consola['log'];\n info: typeof consola['info'];\n success: typeof consola['success'];\n ready: typeof consola['ready'];\n start: typeof consola['start'];\n box: typeof consola['box'];\n debug: typeof consola['debug'];\n trace: typeof consola['trace'];\n verbose: typeof consola['verbose'];\n}\n\n/**\n * Base interface for return types with common properties.\n */\nexport interface I_ReturnBase {\n success: boolean;\n message?: string;\n code?: number | string;\n}\n\n/**\n * Success return type with result data.\n * @template T - The main result type\n * @template E - Additional properties to merge with the result (defaults to unknown)\n */\nexport interface I_ReturnSuccess<T, E = unknown> extends I_ReturnBase {\n success: true;\n result: T & E;\n}\n\n/**\n * Failure return type with error information.\n */\nexport interface I_ReturnFailure extends I_ReturnBase {\n success: false;\n message: string;\n code: number | string;\n}\n\n/**\n * Discriminated union type for function return values.\n * Provides type-safe handling of success and failure cases.\n *\n * @template T - The success result type (defaults to void)\n * @template E - Additional properties to merge with the result (defaults to unknown)\n *\n * @example\n * ```typescript\n * function fetchUser(id: string): I_Return<User> {\n * try {\n * const user = await getUser(id);\n * return { success: true, result: user };\n * } catch (error) {\n * return { success: false, message: error.message, code: 'USER_NOT_FOUND' };\n * }\n * }\n * ```\n */\nexport type I_Return<T = void, E = unknown> = I_ReturnSuccess<T, E> | I_ReturnFailure;\n\nexport enum E_Environment {\n PRODUCTION = 'production',\n STAGING = 'staging',\n DEVELOPMENT = 'development',\n}\n"],"names":["E_Environment"],"mappings":"AA4EO,IAAKA,sBAAAA,OACRA,EAAA,aAAa,cACbA,EAAA,UAAU,WACVA,EAAA,cAAc,eAHNA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -2,3 +2,4 @@ import { E_Environment as r } from "./common.type.js";
2
2
  export {
3
3
  r as E_Environment
4
4
  };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1 @@
1
+ export {};
@@ -50,3 +50,4 @@ export {
50
50
  M as removeAccent,
51
51
  T as uniqueArray
52
52
  };
53
+ //# sourceMappingURL=common.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.util.js","sources":["../../../src/util/common/common.util.ts"],"sourcesContent":["import { E_Environment } from '#typescript/index.js';\n\nimport type { I_EnvFlags, I_NodeEnvInput } from './common.type.js';\n\nconst charMap: Record<string, string[]> = {\n a: ['à', 'á', 'ạ', 'ả', 'ã', 'â', 'ầ', 'ấ', 'ậ', 'ẩ', 'ẫ', 'ă', 'ằ', 'ắ', 'ặ', 'ẳ', 'ẵ'],\n e: ['è', 'é', 'ẹ', 'ẻ', 'ẽ', 'ê', 'ề', 'ế', 'ệ', 'ể', 'ễ'],\n i: ['ì', 'í', 'ị', 'ỉ', 'ĩ'],\n o: ['ò', 'ó', 'ọ', 'ỏ', 'õ', 'ô', 'ồ', 'ố', 'ộ', 'ổ', 'ỗ', 'ơ', 'ờ', 'ớ', 'ợ', 'ở', 'ỡ'],\n u: ['ù', 'ú', 'ụ', 'ủ', 'ũ', 'ư', 'ừ', 'ứ', 'ự', 'ử', 'ữ'],\n y: ['ỳ', 'ý', 'ỵ', 'ỷ', 'ỹ'],\n d: ['đ'],\n};\n\nconst upperCharMap: Record<string, string[]> = Object.entries(charMap).reduce(\n (map, [key, value]) => {\n map[key.toUpperCase()] = value.map(char => char.toUpperCase());\n return map;\n },\n {} as Record<string, string[]>,\n);\n\nconst combinedMap = { ...charMap, ...upperCharMap };\n\n// Pre-compute replacement map and search regex for better performance\n// This avoids rebuilding regexes and maps on every function call\nconst replacementMap = new Map<string, string>();\nconst charsToMatch = new Set<string>();\n\nObject.entries(combinedMap).forEach(([baseChar, variations]) => {\n // The replacement pattern is the same for the base char and all its variations\n // Example: 'a', 'à', 'á'... all map to '(a|à|á...)'\n const replacement = `(${[baseChar, ...variations].join('|')})`;\n\n [baseChar, ...variations].forEach((char) => {\n replacementMap.set(char, replacement);\n charsToMatch.add(char);\n });\n});\n\n// Construct a single regex that matches any character in our map\nconst patternString = Array.from(charsToMatch).join('');\n// We use a character class regex: [abc...]\nconst searchRegex = new RegExp(`[${patternString}]`, 'g');\n\n/**\n * Escapes special characters in a string for use in a regular expression.\n * This function escapes characters that have special meaning in regex (e.g., ., *, +, ?, etc.)\n * so they are treated as literal characters.\n *\n * @param str - The string to escape.\n * @returns The escaped string safe for use in a RegExp.\n */\nexport function escapeRegExp(str: string): string {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/**\n * Convert a string to a regex pattern that matches the string and its accented variations.\n * This function normalizes the input string and creates a regex pattern that can match\n * both the original characters and their accented equivalents.\n *\n * Optimization: Uses pre-computed regex and map to perform replacement in a single pass (O(N)),\n * instead of iterating through all character groups (O(K*N)).\n * Removed unnecessary NFD normalization which improves performance and fixes\n * matching against NFC target strings.\n *\n * @param str - The string to convert to a regex pattern.\n * @returns The regex pattern as a string that matches the original string and its accented variations.\n */\nexport function regexSearchMapper(str: string) {\n str = escapeRegExp(str);\n return str.replace(searchRegex, match => replacementMap.get(match) || match);\n}\n\n/**\n * Remove accents from a string.\n * This function normalizes the string using NFD normalization and removes all diacritical marks.\n *\n * @param str - The string to remove accents from.\n * @returns The string without any accents or diacritical marks.\n */\nexport function removeAccent(str: string) {\n return str.normalize('NFD').replace(/\\p{Diacritic}/gu, '');\n}\n\n/**\n * Remove duplicates from an array based on a key function.\n * This function can remove duplicates either by comparing values directly (when no keyFn is provided)\n * or by using a custom key function to determine uniqueness.\n *\n * @param arr - The array to remove duplicates from.\n * @param keyFn - Optional function that returns a unique key for each item in the array.\n * @returns A new array with duplicates removed, maintaining the original order.\n */\nexport function uniqueArray<T>(\n arr: T[],\n keyFn?: (item: T) => string | number,\n): T[] {\n if (!keyFn) {\n return Array.from(new Set(arr));\n }\n\n const seen = new Set<string | number>();\n const result: T[] = [];\n\n for (const item of arr) {\n const key = keyFn(item);\n if (!seen.has(key)) {\n seen.add(key);\n result.push(item);\n }\n }\n\n return result;\n}\n\n/**\n * Map environment variables to boolean flags indicating the current environment.\n * This function takes NODE_ENV and NODE_ENV_MODE variables and returns flags\n * indicating whether the current environment is development, staging, or production.\n *\n * @param env - The environment variables object containing NODE_ENV and NODE_ENV_MODE.\n * @returns An object containing boolean flags for the environment (IS_DEV, IS_STAG, IS_PROD).\n * @throws {Error} When NODE_ENV is production but NODE_ENV_MODE is development.\n */\nexport function mapEnvironment(env: I_NodeEnvInput): I_EnvFlags {\n const { NODE_ENV = E_Environment.DEVELOPMENT, NODE_ENV_MODE = E_Environment.DEVELOPMENT } = env;\n\n const IS_DEV = NODE_ENV === E_Environment.DEVELOPMENT && NODE_ENV_MODE === E_Environment.DEVELOPMENT;\n const IS_STAG = NODE_ENV === E_Environment.PRODUCTION && NODE_ENV_MODE === E_Environment.STAGING;\n const IS_PROD = NODE_ENV === E_Environment.PRODUCTION && NODE_ENV_MODE === E_Environment.PRODUCTION;\n\n if (NODE_ENV === E_Environment.PRODUCTION && NODE_ENV_MODE === E_Environment.DEVELOPMENT) {\n throw new Error('NODE_ENV_MODE must be set to staging or production in production environment');\n }\n\n return { IS_DEV, IS_STAG, IS_PROD };\n}\n"],"names":["E_Environment","charMap","upperCharMap","map","key","value","char","combinedMap","replacementMap","charsToMatch","baseChar","variations","replacement","patternString","searchRegex","escapeRegExp","str","regexSearchMapper","match","removeAccent","uniqueArray","arr","keyFn","seen","result","item","mapEnvironment","env","NODE_ENV","NODE_ENV_MODE","IS_DEV","IS_STAG","IS_PROD"],"mappings":"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"}
@@ -6,3 +6,4 @@ export {
6
6
  c as removeAccent,
7
7
  m as uniqueArray
8
8
  };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -24,3 +24,4 @@ export {
24
24
  x as uniqueArray,
25
25
  z as validate
26
26
  };
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -7,3 +7,4 @@ export {
7
7
  s as normalizeMongoFilter,
8
8
  a as setNestedValue
9
9
  };
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -132,3 +132,4 @@ export {
132
132
  h as normalizeMongoFilter,
133
133
  g as setNestedValue
134
134
  };
135
+ //# sourceMappingURL=object.util.js.map