@burdenoff/microfe-mybodyshield 2026.1026.2 → 2026.1101.1

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 (1509) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +11 -5
  2. package/dist/dev/main.d.ts +0 -1
  3. package/dist/mybodyshield/MyBodyShieldRoot.d.ts +0 -1
  4. package/dist/mybodyshield/MyBodyShieldRoot.js +22 -21
  5. package/dist/mybodyshield/MyBodyShieldRoot.js.map +1 -1
  6. package/dist/mybodyshield/MyBodyShieldRoutes.d.ts +0 -1
  7. package/dist/mybodyshield/MyBodyShieldRoutes.js +5 -6
  8. package/dist/mybodyshield/MyBodyShieldRoutes.js.map +1 -1
  9. package/dist/mybodyshield/components/DataTable.d.ts +1 -2
  10. package/dist/mybodyshield/components/DataTable.js +1 -2
  11. package/dist/mybodyshield/components/DataTable.js.map +1 -1
  12. package/dist/mybodyshield/components/EmptyState.d.ts +0 -1
  13. package/dist/mybodyshield/components/EmptyState.js +1 -2
  14. package/dist/mybodyshield/components/EmptyState.js.map +1 -1
  15. package/dist/mybodyshield/components/EvidenceUpload.d.ts +1 -2
  16. package/dist/mybodyshield/components/EvidenceUpload.js +1 -2
  17. package/dist/mybodyshield/components/EvidenceUpload.js.map +1 -1
  18. package/dist/mybodyshield/components/FeatureFlagGuard.d.ts +0 -1
  19. package/dist/mybodyshield/components/FeatureFlagGuard.js +1 -2
  20. package/dist/mybodyshield/components/FeatureFlagGuard.js.map +1 -1
  21. package/dist/mybodyshield/components/FileLink.d.ts +1 -1
  22. package/dist/mybodyshield/components/FileLink.js +1 -2
  23. package/dist/mybodyshield/components/FileLink.js.map +1 -1
  24. package/dist/mybodyshield/components/FilterTabs.d.ts +1 -1
  25. package/dist/mybodyshield/components/FilterTabs.js +1 -2
  26. package/dist/mybodyshield/components/FilterTabs.js.map +1 -1
  27. package/dist/mybodyshield/components/MetricsCard.d.ts +0 -1
  28. package/dist/mybodyshield/components/MetricsCard.js +1 -2
  29. package/dist/mybodyshield/components/MetricsCard.js.map +1 -1
  30. package/dist/mybodyshield/components/MiniBar.d.ts +1 -1
  31. package/dist/mybodyshield/components/MiniBar.js +1 -2
  32. package/dist/mybodyshield/components/MiniBar.js.map +1 -1
  33. package/dist/mybodyshield/components/MybDiscussion.d.ts +1 -1
  34. package/dist/mybodyshield/components/MybDiscussion.js +15 -16
  35. package/dist/mybodyshield/components/MybDiscussion.js.map +1 -1
  36. package/dist/mybodyshield/components/MybTags.d.ts +1 -1
  37. package/dist/mybodyshield/components/MybTags.js +1 -2
  38. package/dist/mybodyshield/components/MybTags.js.map +1 -1
  39. package/dist/mybodyshield/components/PageDisabled.d.ts +0 -1
  40. package/dist/mybodyshield/components/PageDisabled.js +1 -2
  41. package/dist/mybodyshield/components/PageDisabled.js.map +1 -1
  42. package/dist/mybodyshield/components/PageLayout.d.ts +0 -1
  43. package/dist/mybodyshield/components/PageLayout.js +1 -2
  44. package/dist/mybodyshield/components/PageLayout.js.map +1 -1
  45. package/dist/mybodyshield/components/Pagination.d.ts +1 -1
  46. package/dist/mybodyshield/components/Pagination.js +1 -2
  47. package/dist/mybodyshield/components/Pagination.js.map +1 -1
  48. package/dist/mybodyshield/components/StateViews.d.ts +0 -1
  49. package/dist/mybodyshield/components/StateViews.js +1 -2
  50. package/dist/mybodyshield/components/StateViews.js.map +1 -1
  51. package/dist/mybodyshield/components/StatusBadge.d.ts +0 -1
  52. package/dist/mybodyshield/components/StatusBadge.js +2 -3
  53. package/dist/mybodyshield/components/StatusBadge.js.map +1 -1
  54. package/dist/mybodyshield/components/Tabs.d.ts +1 -2
  55. package/dist/mybodyshield/components/Tabs.js +1 -2
  56. package/dist/mybodyshield/components/Tabs.js.map +1 -1
  57. package/dist/mybodyshield/components/UserSearchSelect.d.ts +1 -1
  58. package/dist/mybodyshield/components/UserSearchSelect.js +1 -2
  59. package/dist/mybodyshield/components/UserSearchSelect.js.map +1 -1
  60. package/dist/mybodyshield/components/index.js +18 -17
  61. package/dist/mybodyshield/context/MyBodyShieldContext.d.ts +0 -1
  62. package/dist/mybodyshield/context/MyBodyShieldContext.js +1 -2
  63. package/dist/mybodyshield/context/MyBodyShieldContext.js.map +1 -1
  64. package/dist/mybodyshield/context/index.js +1 -1
  65. package/dist/mybodyshield/data/programTemplates.d.ts +0 -1
  66. package/dist/mybodyshield/data/programTemplates.js +1 -2
  67. package/dist/mybodyshield/data/programTemplates.js.map +1 -1
  68. package/dist/mybodyshield/hooks/index.js +9 -8
  69. package/dist/mybodyshield/hooks/useMyBodyShieldAnalytics.js +1 -2
  70. package/dist/mybodyshield/hooks/useMyBodyShieldAnalytics.js.map +1 -1
  71. package/dist/mybodyshield/hooks/useMyBodyShieldApi.d.ts +0 -1
  72. package/dist/mybodyshield/hooks/useMyBodyShieldApi.js +1 -2
  73. package/dist/mybodyshield/hooks/useMyBodyShieldApi.js.map +1 -1
  74. package/dist/mybodyshield/hooks/useMybComments.js +1 -2
  75. package/dist/mybodyshield/hooks/useMybComments.js.map +1 -1
  76. package/dist/mybodyshield/hooks/useMybFiles.js +1 -2
  77. package/dist/mybodyshield/hooks/useMybFiles.js.map +1 -1
  78. package/dist/mybodyshield/hooks/useMybTags.js +6 -7
  79. package/dist/mybodyshield/hooks/useMybTags.js.map +1 -1
  80. package/dist/mybodyshield/hooks/useMybUsers.js +1 -2
  81. package/dist/mybodyshield/hooks/useMybUsers.js.map +1 -1
  82. package/dist/mybodyshield/hooks/usePager.js +1 -2
  83. package/dist/mybodyshield/hooks/usePager.js.map +1 -1
  84. package/dist/mybodyshield/hooks/useTr.d.ts +0 -1
  85. package/dist/mybodyshield/hooks/useTr.js +1 -2
  86. package/dist/mybodyshield/hooks/useTr.js.map +1 -1
  87. package/dist/mybodyshield/index.js +6 -5
  88. package/dist/mybodyshield/lib/offlineSessionQueue.js +34 -35
  89. package/dist/mybodyshield/lib/offlineSessionQueue.js.map +1 -1
  90. package/dist/mybodyshield/lib/useOfflineSessionSync.d.ts +0 -1
  91. package/dist/mybodyshield/lib/useOfflineSessionSync.js +1 -2
  92. package/dist/mybodyshield/lib/useOfflineSessionSync.js.map +1 -1
  93. package/dist/mybodyshield/pages/DashboardPage.d.ts +1 -1
  94. package/dist/mybodyshield/pages/DashboardPage.js +132 -133
  95. package/dist/mybodyshield/pages/DashboardPage.js.map +1 -1
  96. package/dist/mybodyshield/pages/SettingsPage.d.ts +1 -1
  97. package/dist/mybodyshield/pages/SettingsPage.js +2 -3
  98. package/dist/mybodyshield/pages/SettingsPage.js.map +1 -1
  99. package/dist/mybodyshield/pages/_shared/visuals.d.ts +0 -1
  100. package/dist/mybodyshield/pages/_shared/visuals.js +1 -2
  101. package/dist/mybodyshield/pages/_shared/visuals.js.map +1 -1
  102. package/dist/mybodyshield/pages/ai/AiControlsPage.d.ts +1 -1
  103. package/dist/mybodyshield/pages/ai/AiControlsPage.js +90 -91
  104. package/dist/mybodyshield/pages/ai/AiControlsPage.js.map +1 -1
  105. package/dist/mybodyshield/pages/coaching/CoachClientPage.d.ts +1 -1
  106. package/dist/mybodyshield/pages/coaching/CoachClientPage.js +35 -37
  107. package/dist/mybodyshield/pages/coaching/CoachClientPage.js.map +1 -1
  108. package/dist/mybodyshield/pages/coaching/CoachingPage.d.ts +1 -1
  109. package/dist/mybodyshield/pages/coaching/CoachingPage.js +169 -170
  110. package/dist/mybodyshield/pages/coaching/CoachingPage.js.map +1 -1
  111. package/dist/mybodyshield/pages/coaching/coachAnalytics.d.ts +0 -1
  112. package/dist/mybodyshield/pages/coaching/coachAnalytics.js +1 -2
  113. package/dist/mybodyshield/pages/coaching/coachAnalytics.js.map +1 -1
  114. package/dist/mybodyshield/pages/goals/GoalsPage.d.ts +1 -1
  115. package/dist/mybodyshield/pages/goals/GoalsPage.js +219 -221
  116. package/dist/mybodyshield/pages/goals/GoalsPage.js.map +1 -1
  117. package/dist/mybodyshield/pages/insights/InsightsCharts.d.ts +5 -6
  118. package/dist/mybodyshield/pages/insights/InsightsCharts.js +117 -118
  119. package/dist/mybodyshield/pages/insights/InsightsCharts.js.map +1 -1
  120. package/dist/mybodyshield/pages/insights/InsightsPage.d.ts +1 -1
  121. package/dist/mybodyshield/pages/insights/InsightsPage.js +67 -68
  122. package/dist/mybodyshield/pages/insights/InsightsPage.js.map +1 -1
  123. package/dist/mybodyshield/pages/nutrition/NutritionPage.d.ts +1 -1
  124. package/dist/mybodyshield/pages/nutrition/NutritionPage.js +519 -518
  125. package/dist/mybodyshield/pages/nutrition/NutritionPage.js.map +1 -1
  126. package/dist/mybodyshield/pages/programs/ProgramDetailPage.d.ts +1 -1
  127. package/dist/mybodyshield/pages/programs/ProgramDetailPage.js +420 -421
  128. package/dist/mybodyshield/pages/programs/ProgramDetailPage.js.map +1 -1
  129. package/dist/mybodyshield/pages/programs/ProgramsPage.d.ts +1 -1
  130. package/dist/mybodyshield/pages/programs/ProgramsPage.js +258 -259
  131. package/dist/mybodyshield/pages/programs/ProgramsPage.js.map +1 -1
  132. package/dist/mybodyshield/pages/progress/ProgressPage.d.ts +1 -1
  133. package/dist/mybodyshield/pages/progress/ProgressPage.js +139 -140
  134. package/dist/mybodyshield/pages/progress/ProgressPage.js.map +1 -1
  135. package/dist/mybodyshield/pages/recovery/MindfulnessPage.d.ts +1 -1
  136. package/dist/mybodyshield/pages/recovery/MindfulnessPage.js +3 -4
  137. package/dist/mybodyshield/pages/recovery/MindfulnessPage.js.map +1 -1
  138. package/dist/mybodyshield/pages/recovery/RecoveryPage.d.ts +1 -1
  139. package/dist/mybodyshield/pages/recovery/RecoveryPage.js +205 -206
  140. package/dist/mybodyshield/pages/recovery/RecoveryPage.js.map +1 -1
  141. package/dist/mybodyshield/pages/train/SessionDetailPage.d.ts +1 -1
  142. package/dist/mybodyshield/pages/train/SessionDetailPage.js +118 -125
  143. package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -1
  144. package/dist/mybodyshield/pages/train/SessionsPage.d.ts +1 -1
  145. package/dist/mybodyshield/pages/train/SessionsPage.js +156 -157
  146. package/dist/mybodyshield/pages/train/SessionsPage.js.map +1 -1
  147. package/dist/mybodyshield/services/createSandboxAssistantTransport.js +1 -2
  148. package/dist/mybodyshield/services/createSandboxAssistantTransport.js.map +1 -1
  149. package/dist/mybodyshield/types/index.d.ts +0 -1
  150. package/dist/mybodyshield/utils/cn.d.ts +0 -1
  151. package/dist/mybodyshield/utils/cn.js +2 -3
  152. package/dist/mybodyshield/utils/cn.js.map +1 -1
  153. package/dist/mybodyshield/utils/formatters.js +1 -2
  154. package/dist/mybodyshield/utils/formatters.js.map +1 -1
  155. package/dist/mybodyshield/utils/i18n.d.ts +0 -1
  156. package/dist/mybodyshield/utils/i18n.js +1 -2
  157. package/dist/mybodyshield/utils/i18n.js.map +1 -1
  158. package/dist/mybodyshield/utils/navigation.js +1 -2
  159. package/dist/mybodyshield/utils/navigation.js.map +1 -1
  160. package/dist/mybodyshield/utils/pageContext.js +2 -3
  161. package/dist/mybodyshield/utils/pageContext.js.map +1 -1
  162. package/dist/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +4 -5
  163. package/dist/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js.map +1 -1
  164. package/dist/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +2 -3
  165. package/dist/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js.map +1 -1
  166. package/dist/node_modules/clsx/dist/clsx.js +8 -7
  167. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  168. package/dist/node_modules/d3-array/src/ascending.js +1 -2
  169. package/dist/node_modules/d3-array/src/ascending.js.map +1 -1
  170. package/dist/node_modules/d3-array/src/bisect.js +2 -3
  171. package/dist/node_modules/d3-array/src/bisect.js.map +1 -1
  172. package/dist/node_modules/d3-array/src/bisector.js +1 -2
  173. package/dist/node_modules/d3-array/src/bisector.js.map +1 -1
  174. package/dist/node_modules/d3-array/src/descending.js +1 -2
  175. package/dist/node_modules/d3-array/src/descending.js.map +1 -1
  176. package/dist/node_modules/d3-array/src/max.js +1 -2
  177. package/dist/node_modules/d3-array/src/max.js.map +1 -1
  178. package/dist/node_modules/d3-array/src/min.js +1 -2
  179. package/dist/node_modules/d3-array/src/min.js.map +1 -1
  180. package/dist/node_modules/d3-array/src/number.js +1 -2
  181. package/dist/node_modules/d3-array/src/number.js.map +1 -1
  182. package/dist/node_modules/d3-array/src/quantile.js +17 -18
  183. package/dist/node_modules/d3-array/src/quantile.js.map +1 -1
  184. package/dist/node_modules/d3-array/src/quickselect.js +1 -2
  185. package/dist/node_modules/d3-array/src/quickselect.js.map +1 -1
  186. package/dist/node_modules/d3-array/src/range.js +1 -2
  187. package/dist/node_modules/d3-array/src/range.js.map +1 -1
  188. package/dist/node_modules/d3-array/src/sort.js +1 -2
  189. package/dist/node_modules/d3-array/src/sort.js.map +1 -1
  190. package/dist/node_modules/d3-array/src/ticks.js +5 -5
  191. package/dist/node_modules/d3-array/src/ticks.js.map +1 -1
  192. package/dist/node_modules/d3-color/src/color.js +2 -3
  193. package/dist/node_modules/d3-color/src/color.js.map +1 -1
  194. package/dist/node_modules/d3-color/src/define.js +1 -2
  195. package/dist/node_modules/d3-color/src/define.js.map +1 -1
  196. package/dist/node_modules/d3-format/src/defaultLocale.js +2 -3
  197. package/dist/node_modules/d3-format/src/defaultLocale.js.map +1 -1
  198. package/dist/node_modules/d3-format/src/exponent.js +1 -2
  199. package/dist/node_modules/d3-format/src/exponent.js.map +1 -1
  200. package/dist/node_modules/d3-format/src/formatDecimal.js +1 -2
  201. package/dist/node_modules/d3-format/src/formatDecimal.js.map +1 -1
  202. package/dist/node_modules/d3-format/src/formatGroup.js +1 -2
  203. package/dist/node_modules/d3-format/src/formatGroup.js.map +1 -1
  204. package/dist/node_modules/d3-format/src/formatNumerals.js +1 -2
  205. package/dist/node_modules/d3-format/src/formatNumerals.js.map +1 -1
  206. package/dist/node_modules/d3-format/src/formatPrefixAuto.js +1 -2
  207. package/dist/node_modules/d3-format/src/formatPrefixAuto.js.map +1 -1
  208. package/dist/node_modules/d3-format/src/formatRounded.js +1 -2
  209. package/dist/node_modules/d3-format/src/formatRounded.js.map +1 -1
  210. package/dist/node_modules/d3-format/src/formatSpecifier.js +2 -3
  211. package/dist/node_modules/d3-format/src/formatSpecifier.js.map +1 -1
  212. package/dist/node_modules/d3-format/src/formatTrim.js +1 -3
  213. package/dist/node_modules/d3-format/src/formatTrim.js.map +1 -1
  214. package/dist/node_modules/d3-format/src/formatTypes.js +1 -2
  215. package/dist/node_modules/d3-format/src/formatTypes.js.map +1 -1
  216. package/dist/node_modules/d3-format/src/identity.js +1 -2
  217. package/dist/node_modules/d3-format/src/identity.js.map +1 -1
  218. package/dist/node_modules/d3-format/src/locale.js +10 -13
  219. package/dist/node_modules/d3-format/src/locale.js.map +1 -1
  220. package/dist/node_modules/d3-format/src/precisionFixed.js +1 -2
  221. package/dist/node_modules/d3-format/src/precisionFixed.js.map +1 -1
  222. package/dist/node_modules/d3-format/src/precisionPrefix.js +1 -2
  223. package/dist/node_modules/d3-format/src/precisionPrefix.js.map +1 -1
  224. package/dist/node_modules/d3-format/src/precisionRound.js +1 -2
  225. package/dist/node_modules/d3-format/src/precisionRound.js.map +1 -1
  226. package/dist/node_modules/d3-interpolate/src/array.js +2 -4
  227. package/dist/node_modules/d3-interpolate/src/array.js.map +1 -1
  228. package/dist/node_modules/d3-interpolate/src/basis.js +1 -2
  229. package/dist/node_modules/d3-interpolate/src/basis.js.map +1 -1
  230. package/dist/node_modules/d3-interpolate/src/basisClosed.js +1 -2
  231. package/dist/node_modules/d3-interpolate/src/basisClosed.js.map +1 -1
  232. package/dist/node_modules/d3-interpolate/src/color.js +1 -2
  233. package/dist/node_modules/d3-interpolate/src/color.js.map +1 -1
  234. package/dist/node_modules/d3-interpolate/src/constant.js +1 -2
  235. package/dist/node_modules/d3-interpolate/src/constant.js.map +1 -1
  236. package/dist/node_modules/d3-interpolate/src/date.js +1 -2
  237. package/dist/node_modules/d3-interpolate/src/date.js.map +1 -1
  238. package/dist/node_modules/d3-interpolate/src/number.js +1 -2
  239. package/dist/node_modules/d3-interpolate/src/number.js.map +1 -1
  240. package/dist/node_modules/d3-interpolate/src/numberArray.js +1 -2
  241. package/dist/node_modules/d3-interpolate/src/numberArray.js.map +1 -1
  242. package/dist/node_modules/d3-interpolate/src/object.js +2 -3
  243. package/dist/node_modules/d3-interpolate/src/object.js.map +1 -1
  244. package/dist/node_modules/d3-interpolate/src/piecewise.js +1 -2
  245. package/dist/node_modules/d3-interpolate/src/piecewise.js.map +1 -1
  246. package/dist/node_modules/d3-interpolate/src/rgb.js +1 -2
  247. package/dist/node_modules/d3-interpolate/src/rgb.js.map +1 -1
  248. package/dist/node_modules/d3-interpolate/src/round.js +1 -2
  249. package/dist/node_modules/d3-interpolate/src/round.js.map +1 -1
  250. package/dist/node_modules/d3-interpolate/src/string.js +1 -2
  251. package/dist/node_modules/d3-interpolate/src/string.js.map +1 -1
  252. package/dist/node_modules/d3-interpolate/src/value.js +10 -11
  253. package/dist/node_modules/d3-interpolate/src/value.js.map +1 -1
  254. package/dist/node_modules/d3-path/src/path.js +8 -7
  255. package/dist/node_modules/d3-path/src/path.js.map +1 -1
  256. package/dist/node_modules/d3-scale/src/band.js +1 -2
  257. package/dist/node_modules/d3-scale/src/band.js.map +1 -1
  258. package/dist/node_modules/d3-scale/src/constant.js +1 -2
  259. package/dist/node_modules/d3-scale/src/constant.js.map +1 -1
  260. package/dist/node_modules/d3-scale/src/continuous.js +7 -8
  261. package/dist/node_modules/d3-scale/src/continuous.js.map +1 -1
  262. package/dist/node_modules/d3-scale/src/diverging.js +35 -36
  263. package/dist/node_modules/d3-scale/src/diverging.js.map +1 -1
  264. package/dist/node_modules/d3-scale/src/identity.js +6 -7
  265. package/dist/node_modules/d3-scale/src/identity.js.map +1 -1
  266. package/dist/node_modules/d3-scale/src/init.js +3 -8
  267. package/dist/node_modules/d3-scale/src/init.js.map +1 -1
  268. package/dist/node_modules/d3-scale/src/linear.js +6 -7
  269. package/dist/node_modules/d3-scale/src/linear.js.map +1 -1
  270. package/dist/node_modules/d3-scale/src/log.js +32 -33
  271. package/dist/node_modules/d3-scale/src/log.js.map +1 -1
  272. package/dist/node_modules/d3-scale/src/nice.js +1 -2
  273. package/dist/node_modules/d3-scale/src/nice.js.map +1 -1
  274. package/dist/node_modules/d3-scale/src/number.js +1 -2
  275. package/dist/node_modules/d3-scale/src/number.js.map +1 -1
  276. package/dist/node_modules/d3-scale/src/ordinal.js +1 -2
  277. package/dist/node_modules/d3-scale/src/ordinal.js.map +1 -1
  278. package/dist/node_modules/d3-scale/src/pow.js +13 -14
  279. package/dist/node_modules/d3-scale/src/pow.js.map +1 -1
  280. package/dist/node_modules/d3-scale/src/quantile.js +2 -3
  281. package/dist/node_modules/d3-scale/src/quantile.js.map +1 -1
  282. package/dist/node_modules/d3-scale/src/quantize.js +5 -6
  283. package/dist/node_modules/d3-scale/src/quantize.js.map +1 -1
  284. package/dist/node_modules/d3-scale/src/radial.js +8 -9
  285. package/dist/node_modules/d3-scale/src/radial.js.map +1 -1
  286. package/dist/node_modules/d3-scale/src/sequential.js +27 -28
  287. package/dist/node_modules/d3-scale/src/sequential.js.map +1 -1
  288. package/dist/node_modules/d3-scale/src/sequentialQuantile.js +6 -7
  289. package/dist/node_modules/d3-scale/src/sequentialQuantile.js.map +1 -1
  290. package/dist/node_modules/d3-scale/src/symlog.js +12 -13
  291. package/dist/node_modules/d3-scale/src/symlog.js.map +1 -1
  292. package/dist/node_modules/d3-scale/src/threshold.js +2 -3
  293. package/dist/node_modules/d3-scale/src/threshold.js.map +1 -1
  294. package/dist/node_modules/d3-scale/src/tickFormat.js +7 -10
  295. package/dist/node_modules/d3-scale/src/tickFormat.js.map +1 -1
  296. package/dist/node_modules/d3-scale/src/time.js +27 -28
  297. package/dist/node_modules/d3-scale/src/time.js.map +1 -1
  298. package/dist/node_modules/d3-scale/src/utcTime.js +13 -14
  299. package/dist/node_modules/d3-scale/src/utcTime.js.map +1 -1
  300. package/dist/node_modules/d3-shape/src/area.js +34 -33
  301. package/dist/node_modules/d3-shape/src/area.js.map +1 -1
  302. package/dist/node_modules/d3-shape/src/array.js +0 -1
  303. package/dist/node_modules/d3-shape/src/array.js.map +1 -1
  304. package/dist/node_modules/d3-shape/src/constant.js +1 -2
  305. package/dist/node_modules/d3-shape/src/constant.js.map +1 -1
  306. package/dist/node_modules/d3-shape/src/curve/basis.js +4 -9
  307. package/dist/node_modules/d3-shape/src/curve/basis.js.map +1 -1
  308. package/dist/node_modules/d3-shape/src/curve/basisClosed.js +3 -8
  309. package/dist/node_modules/d3-shape/src/curve/basisClosed.js.map +1 -1
  310. package/dist/node_modules/d3-shape/src/curve/basisOpen.js +2 -5
  311. package/dist/node_modules/d3-shape/src/curve/basisOpen.js.map +1 -1
  312. package/dist/node_modules/d3-shape/src/curve/bump.js +2 -5
  313. package/dist/node_modules/d3-shape/src/curve/bump.js.map +1 -1
  314. package/dist/node_modules/d3-shape/src/curve/linear.js +2 -5
  315. package/dist/node_modules/d3-shape/src/curve/linear.js.map +1 -1
  316. package/dist/node_modules/d3-shape/src/curve/linearClosed.js +1 -2
  317. package/dist/node_modules/d3-shape/src/curve/linearClosed.js.map +1 -1
  318. package/dist/node_modules/d3-shape/src/curve/monotone.js +4 -9
  319. package/dist/node_modules/d3-shape/src/curve/monotone.js.map +1 -1
  320. package/dist/node_modules/d3-shape/src/curve/natural.js +5 -4
  321. package/dist/node_modules/d3-shape/src/curve/natural.js.map +1 -1
  322. package/dist/node_modules/d3-shape/src/curve/step.js +6 -9
  323. package/dist/node_modules/d3-shape/src/curve/step.js.map +1 -1
  324. package/dist/node_modules/d3-shape/src/line.js +16 -17
  325. package/dist/node_modules/d3-shape/src/line.js.map +1 -1
  326. package/dist/node_modules/d3-shape/src/math.js +1 -2
  327. package/dist/node_modules/d3-shape/src/math.js.map +1 -1
  328. package/dist/node_modules/d3-shape/src/noop.js +1 -2
  329. package/dist/node_modules/d3-shape/src/noop.js.map +1 -1
  330. package/dist/node_modules/d3-shape/src/offset/expand.js +1 -2
  331. package/dist/node_modules/d3-shape/src/offset/expand.js.map +1 -1
  332. package/dist/node_modules/d3-shape/src/offset/none.js +1 -2
  333. package/dist/node_modules/d3-shape/src/offset/none.js.map +1 -1
  334. package/dist/node_modules/d3-shape/src/offset/silhouette.js +1 -2
  335. package/dist/node_modules/d3-shape/src/offset/silhouette.js.map +1 -1
  336. package/dist/node_modules/d3-shape/src/offset/wiggle.js +2 -3
  337. package/dist/node_modules/d3-shape/src/offset/wiggle.js.map +1 -1
  338. package/dist/node_modules/d3-shape/src/order/none.js +1 -2
  339. package/dist/node_modules/d3-shape/src/order/none.js.map +1 -1
  340. package/dist/node_modules/d3-shape/src/path.js +1 -2
  341. package/dist/node_modules/d3-shape/src/path.js.map +1 -1
  342. package/dist/node_modules/d3-shape/src/point.js +1 -2
  343. package/dist/node_modules/d3-shape/src/point.js.map +1 -1
  344. package/dist/node_modules/d3-shape/src/stack.js +13 -14
  345. package/dist/node_modules/d3-shape/src/stack.js.map +1 -1
  346. package/dist/node_modules/d3-shape/src/symbol/circle.js +1 -2
  347. package/dist/node_modules/d3-shape/src/symbol/circle.js.map +1 -1
  348. package/dist/node_modules/d3-shape/src/symbol/cross.js +1 -2
  349. package/dist/node_modules/d3-shape/src/symbol/cross.js.map +1 -1
  350. package/dist/node_modules/d3-shape/src/symbol/diamond.js +1 -2
  351. package/dist/node_modules/d3-shape/src/symbol/diamond.js.map +1 -1
  352. package/dist/node_modules/d3-shape/src/symbol/square.js +1 -2
  353. package/dist/node_modules/d3-shape/src/symbol/square.js.map +1 -1
  354. package/dist/node_modules/d3-shape/src/symbol/star.js +1 -2
  355. package/dist/node_modules/d3-shape/src/symbol/star.js.map +1 -1
  356. package/dist/node_modules/d3-shape/src/symbol/triangle.js +1 -2
  357. package/dist/node_modules/d3-shape/src/symbol/triangle.js.map +1 -1
  358. package/dist/node_modules/d3-shape/src/symbol/wye.js +1 -2
  359. package/dist/node_modules/d3-shape/src/symbol/wye.js.map +1 -1
  360. package/dist/node_modules/d3-shape/src/symbol.js +1 -2
  361. package/dist/node_modules/d3-shape/src/symbol.js.map +1 -1
  362. package/dist/node_modules/d3-time/src/day.js +1 -2
  363. package/dist/node_modules/d3-time/src/day.js.map +1 -1
  364. package/dist/node_modules/d3-time/src/duration.js +1 -2
  365. package/dist/node_modules/d3-time/src/duration.js.map +1 -1
  366. package/dist/node_modules/d3-time/src/hour.js +1 -2
  367. package/dist/node_modules/d3-time/src/hour.js.map +1 -1
  368. package/dist/node_modules/d3-time/src/interval.js +5 -4
  369. package/dist/node_modules/d3-time/src/interval.js.map +1 -1
  370. package/dist/node_modules/d3-time/src/millisecond.js +1 -2
  371. package/dist/node_modules/d3-time/src/millisecond.js.map +1 -1
  372. package/dist/node_modules/d3-time/src/minute.js +1 -2
  373. package/dist/node_modules/d3-time/src/minute.js.map +1 -1
  374. package/dist/node_modules/d3-time/src/month.js +1 -2
  375. package/dist/node_modules/d3-time/src/month.js.map +1 -1
  376. package/dist/node_modules/d3-time/src/second.js +1 -2
  377. package/dist/node_modules/d3-time/src/second.js.map +1 -1
  378. package/dist/node_modules/d3-time/src/ticks.js +27 -28
  379. package/dist/node_modules/d3-time/src/ticks.js.map +1 -1
  380. package/dist/node_modules/d3-time/src/week.js +2 -3
  381. package/dist/node_modules/d3-time/src/week.js.map +1 -1
  382. package/dist/node_modules/d3-time/src/year.js +1 -2
  383. package/dist/node_modules/d3-time/src/year.js.map +1 -1
  384. package/dist/node_modules/d3-time-format/src/defaultLocale.js +6 -7
  385. package/dist/node_modules/d3-time-format/src/defaultLocale.js.map +1 -1
  386. package/dist/node_modules/d3-time-format/src/locale.js +1 -2
  387. package/dist/node_modules/d3-time-format/src/locale.js.map +1 -1
  388. package/dist/node_modules/decimal.js-light/decimal.js +33 -30
  389. package/dist/node_modules/decimal.js-light/decimal.js.map +1 -1
  390. package/dist/node_modules/eventemitter3/index.js +2 -3
  391. package/dist/node_modules/eventemitter3/index.js.map +1 -1
  392. package/dist/node_modules/fast-equals/dist/es/index.js +3 -4
  393. package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
  394. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +3 -4
  395. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js.map +1 -1
  396. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +7 -8
  397. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js.map +1 -1
  398. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +1 -2
  399. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js.map +1 -1
  400. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +1 -2
  401. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js.map +1 -1
  402. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +1 -2
  403. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js.map +1 -1
  404. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +1 -2
  405. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js.map +1 -1
  406. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +1 -2
  407. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js.map +1 -1
  408. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +1 -2
  409. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js.map +1 -1
  410. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +1 -2
  411. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js.map +1 -1
  412. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +1 -2
  413. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js.map +1 -1
  414. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +7 -8
  415. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js.map +1 -1
  416. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +1 -2
  417. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js.map +1 -1
  418. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +1 -2
  419. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js.map +1 -1
  420. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +1 -2
  421. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js.map +1 -1
  422. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +1 -2
  423. package/dist/node_modules/framer-motion/dist/es/events/event-info.js.map +1 -1
  424. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +92 -101
  425. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js.map +1 -1
  426. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +8 -9
  427. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js.map +1 -1
  428. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +11 -12
  429. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js.map +1 -1
  430. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +8 -9
  431. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js.map +1 -1
  432. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +8 -9
  433. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js.map +1 -1
  434. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +37 -38
  435. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js.map +1 -1
  436. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +5 -6
  437. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js.map +1 -1
  438. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +9 -10
  439. package/dist/node_modules/framer-motion/dist/es/gestures/press.js.map +1 -1
  440. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +12 -13
  441. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js.map +1 -1
  442. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +8 -9
  443. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js.map +1 -1
  444. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +1 -2
  445. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js.map +1 -1
  446. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +2 -3
  447. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js.map +1 -1
  448. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +9 -10
  449. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js.map +1 -1
  450. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +1 -2
  451. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js.map +1 -1
  452. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +15 -16
  453. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js.map +1 -1
  454. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +1 -2
  455. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js.map +1 -1
  456. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +1 -2
  457. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js.map +1 -1
  458. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +4 -5
  459. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js.map +1 -1
  460. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +1 -2
  461. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js.map +1 -1
  462. package/dist/node_modules/framer-motion/dist/es/motion/index.js +34 -35
  463. package/dist/node_modules/framer-motion/dist/es/motion/index.js.map +1 -1
  464. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +1 -2
  465. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js.map +1 -1
  466. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +7 -7
  467. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js.map +1 -1
  468. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +17 -18
  469. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js.map +1 -1
  470. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +22 -23
  471. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js.map +1 -1
  472. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +2 -3
  473. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js.map +1 -1
  474. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +1 -2
  475. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js.map +1 -1
  476. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +1 -2
  477. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js.map +1 -1
  478. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +4 -5
  479. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js.map +1 -1
  480. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +4 -5
  481. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js.map +1 -1
  482. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +5 -6
  483. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js.map +1 -1
  484. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +2 -3
  485. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js.map +1 -1
  486. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +1 -2
  487. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js.map +1 -1
  488. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +5 -6
  489. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js.map +1 -1
  490. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +8 -9
  491. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js.map +1 -1
  492. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +1 -2
  493. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js.map +1 -1
  494. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +1 -2
  495. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js.map +1 -1
  496. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +1 -2
  497. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js.map +1 -1
  498. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +5 -6
  499. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js.map +1 -1
  500. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +1 -2
  501. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js.map +1 -1
  502. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +2 -3
  503. package/dist/node_modules/framer-motion/dist/es/utils/distance.js.map +1 -1
  504. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +1 -2
  505. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js.map +1 -1
  506. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +1 -2
  507. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js.map +1 -1
  508. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +1 -2
  509. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js.map +1 -1
  510. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +7 -8
  511. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js.map +1 -1
  512. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +1 -2
  513. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js.map +1 -1
  514. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +1 -2
  515. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js.map +1 -1
  516. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +1 -2
  517. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js.map +1 -1
  518. package/dist/node_modules/internmap/src/index.js +1 -2
  519. package/dist/node_modules/internmap/src/index.js.map +1 -1
  520. package/dist/node_modules/lodash/_DataView.js +4 -5
  521. package/dist/node_modules/lodash/_DataView.js.map +1 -1
  522. package/dist/node_modules/lodash/_Hash.js +1 -2
  523. package/dist/node_modules/lodash/_Hash.js.map +1 -1
  524. package/dist/node_modules/lodash/_ListCache.js +1 -2
  525. package/dist/node_modules/lodash/_ListCache.js.map +1 -1
  526. package/dist/node_modules/lodash/_Map.js +4 -5
  527. package/dist/node_modules/lodash/_Map.js.map +1 -1
  528. package/dist/node_modules/lodash/_MapCache.js +1 -2
  529. package/dist/node_modules/lodash/_MapCache.js.map +1 -1
  530. package/dist/node_modules/lodash/_Promise.js +4 -5
  531. package/dist/node_modules/lodash/_Promise.js.map +1 -1
  532. package/dist/node_modules/lodash/_Set.js +4 -5
  533. package/dist/node_modules/lodash/_Set.js.map +1 -1
  534. package/dist/node_modules/lodash/_SetCache.js +1 -2
  535. package/dist/node_modules/lodash/_SetCache.js.map +1 -1
  536. package/dist/node_modules/lodash/_Stack.js +3 -3
  537. package/dist/node_modules/lodash/_Stack.js.map +1 -1
  538. package/dist/node_modules/lodash/_Symbol.js +1 -2
  539. package/dist/node_modules/lodash/_Symbol.js.map +1 -1
  540. package/dist/node_modules/lodash/_Uint8Array.js +1 -2
  541. package/dist/node_modules/lodash/_Uint8Array.js.map +1 -1
  542. package/dist/node_modules/lodash/_WeakMap.js +4 -5
  543. package/dist/node_modules/lodash/_WeakMap.js.map +1 -1
  544. package/dist/node_modules/lodash/_apply.js +1 -2
  545. package/dist/node_modules/lodash/_apply.js.map +1 -1
  546. package/dist/node_modules/lodash/_arrayEvery.js +1 -2
  547. package/dist/node_modules/lodash/_arrayEvery.js.map +1 -1
  548. package/dist/node_modules/lodash/_arrayFilter.js +1 -2
  549. package/dist/node_modules/lodash/_arrayFilter.js.map +1 -1
  550. package/dist/node_modules/lodash/_arrayIncludes.js +1 -2
  551. package/dist/node_modules/lodash/_arrayIncludes.js.map +1 -1
  552. package/dist/node_modules/lodash/_arrayIncludesWith.js +1 -2
  553. package/dist/node_modules/lodash/_arrayIncludesWith.js.map +1 -1
  554. package/dist/node_modules/lodash/_arrayLikeKeys.js +5 -6
  555. package/dist/node_modules/lodash/_arrayLikeKeys.js.map +1 -1
  556. package/dist/node_modules/lodash/_arrayMap.js +1 -2
  557. package/dist/node_modules/lodash/_arrayMap.js.map +1 -1
  558. package/dist/node_modules/lodash/_arrayPush.js +1 -2
  559. package/dist/node_modules/lodash/_arrayPush.js.map +1 -1
  560. package/dist/node_modules/lodash/_arraySome.js +1 -2
  561. package/dist/node_modules/lodash/_arraySome.js.map +1 -1
  562. package/dist/node_modules/lodash/_asciiToArray.js +1 -2
  563. package/dist/node_modules/lodash/_asciiToArray.js.map +1 -1
  564. package/dist/node_modules/lodash/_assocIndexOf.js +1 -2
  565. package/dist/node_modules/lodash/_assocIndexOf.js.map +1 -1
  566. package/dist/node_modules/lodash/_baseAssignValue.js +1 -2
  567. package/dist/node_modules/lodash/_baseAssignValue.js.map +1 -1
  568. package/dist/node_modules/lodash/_baseEach.js +1 -2
  569. package/dist/node_modules/lodash/_baseEach.js.map +1 -1
  570. package/dist/node_modules/lodash/_baseEvery.js +1 -2
  571. package/dist/node_modules/lodash/_baseEvery.js.map +1 -1
  572. package/dist/node_modules/lodash/_baseExtremum.js +1 -2
  573. package/dist/node_modules/lodash/_baseExtremum.js.map +1 -1
  574. package/dist/node_modules/lodash/_baseFindIndex.js +1 -2
  575. package/dist/node_modules/lodash/_baseFindIndex.js.map +1 -1
  576. package/dist/node_modules/lodash/_baseFlatten.js +1 -2
  577. package/dist/node_modules/lodash/_baseFlatten.js.map +1 -1
  578. package/dist/node_modules/lodash/_baseFor.js +1 -2
  579. package/dist/node_modules/lodash/_baseFor.js.map +1 -1
  580. package/dist/node_modules/lodash/_baseForOwn.js +4 -5
  581. package/dist/node_modules/lodash/_baseForOwn.js.map +1 -1
  582. package/dist/node_modules/lodash/_baseGet.js +1 -2
  583. package/dist/node_modules/lodash/_baseGet.js.map +1 -1
  584. package/dist/node_modules/lodash/_baseGetAllKeys.js +4 -5
  585. package/dist/node_modules/lodash/_baseGetAllKeys.js.map +1 -1
  586. package/dist/node_modules/lodash/_baseGetTag.js +1 -2
  587. package/dist/node_modules/lodash/_baseGetTag.js.map +1 -1
  588. package/dist/node_modules/lodash/_baseGt.js +1 -2
  589. package/dist/node_modules/lodash/_baseGt.js.map +1 -1
  590. package/dist/node_modules/lodash/_baseHasIn.js +1 -2
  591. package/dist/node_modules/lodash/_baseHasIn.js.map +1 -1
  592. package/dist/node_modules/lodash/_baseIndexOf.js +1 -2
  593. package/dist/node_modules/lodash/_baseIndexOf.js.map +1 -1
  594. package/dist/node_modules/lodash/_baseIsArguments.js +1 -2
  595. package/dist/node_modules/lodash/_baseIsArguments.js.map +1 -1
  596. package/dist/node_modules/lodash/_baseIsEqual.js +4 -5
  597. package/dist/node_modules/lodash/_baseIsEqual.js.map +1 -1
  598. package/dist/node_modules/lodash/_baseIsEqualDeep.js +10 -11
  599. package/dist/node_modules/lodash/_baseIsEqualDeep.js.map +1 -1
  600. package/dist/node_modules/lodash/_baseIsMatch.js +1 -2
  601. package/dist/node_modules/lodash/_baseIsMatch.js.map +1 -1
  602. package/dist/node_modules/lodash/_baseIsNaN.js +1 -2
  603. package/dist/node_modules/lodash/_baseIsNaN.js.map +1 -1
  604. package/dist/node_modules/lodash/_baseIsNative.js +5 -6
  605. package/dist/node_modules/lodash/_baseIsNative.js.map +1 -1
  606. package/dist/node_modules/lodash/_baseIsTypedArray.js +4 -5
  607. package/dist/node_modules/lodash/_baseIsTypedArray.js.map +1 -1
  608. package/dist/node_modules/lodash/_baseIteratee.js +6 -7
  609. package/dist/node_modules/lodash/_baseIteratee.js.map +1 -1
  610. package/dist/node_modules/lodash/_baseKeys.js +1 -2
  611. package/dist/node_modules/lodash/_baseKeys.js.map +1 -1
  612. package/dist/node_modules/lodash/_baseLt.js +1 -2
  613. package/dist/node_modules/lodash/_baseLt.js.map +1 -1
  614. package/dist/node_modules/lodash/_baseMap.js +4 -5
  615. package/dist/node_modules/lodash/_baseMap.js.map +1 -1
  616. package/dist/node_modules/lodash/_baseMatches.js +1 -2
  617. package/dist/node_modules/lodash/_baseMatches.js.map +1 -1
  618. package/dist/node_modules/lodash/_baseMatchesProperty.js +7 -8
  619. package/dist/node_modules/lodash/_baseMatchesProperty.js.map +1 -1
  620. package/dist/node_modules/lodash/_baseOrderBy.js +11 -12
  621. package/dist/node_modules/lodash/_baseOrderBy.js.map +1 -1
  622. package/dist/node_modules/lodash/_baseProperty.js +1 -2
  623. package/dist/node_modules/lodash/_baseProperty.js.map +1 -1
  624. package/dist/node_modules/lodash/_basePropertyDeep.js +1 -2
  625. package/dist/node_modules/lodash/_basePropertyDeep.js.map +1 -1
  626. package/dist/node_modules/lodash/_baseRange.js +1 -2
  627. package/dist/node_modules/lodash/_baseRange.js.map +1 -1
  628. package/dist/node_modules/lodash/_baseRest.js +1 -2
  629. package/dist/node_modules/lodash/_baseRest.js.map +1 -1
  630. package/dist/node_modules/lodash/_baseSetToString.js +5 -6
  631. package/dist/node_modules/lodash/_baseSetToString.js.map +1 -1
  632. package/dist/node_modules/lodash/_baseSlice.js +1 -2
  633. package/dist/node_modules/lodash/_baseSlice.js.map +1 -1
  634. package/dist/node_modules/lodash/_baseSome.js +1 -2
  635. package/dist/node_modules/lodash/_baseSome.js.map +1 -1
  636. package/dist/node_modules/lodash/_baseSortBy.js +1 -2
  637. package/dist/node_modules/lodash/_baseSortBy.js.map +1 -1
  638. package/dist/node_modules/lodash/_baseTimes.js +1 -2
  639. package/dist/node_modules/lodash/_baseTimes.js.map +1 -1
  640. package/dist/node_modules/lodash/_baseToString.js +6 -7
  641. package/dist/node_modules/lodash/_baseToString.js.map +1 -1
  642. package/dist/node_modules/lodash/_baseTrim.js +1 -2
  643. package/dist/node_modules/lodash/_baseTrim.js.map +1 -1
  644. package/dist/node_modules/lodash/_baseUnary.js +1 -2
  645. package/dist/node_modules/lodash/_baseUnary.js.map +1 -1
  646. package/dist/node_modules/lodash/_baseUniq.js +7 -8
  647. package/dist/node_modules/lodash/_baseUniq.js.map +1 -1
  648. package/dist/node_modules/lodash/_cacheHas.js +1 -2
  649. package/dist/node_modules/lodash/_cacheHas.js.map +1 -1
  650. package/dist/node_modules/lodash/_castPath.js +1 -2
  651. package/dist/node_modules/lodash/_castPath.js.map +1 -1
  652. package/dist/node_modules/lodash/_castSlice.js +1 -2
  653. package/dist/node_modules/lodash/_castSlice.js.map +1 -1
  654. package/dist/node_modules/lodash/_compareAscending.js +1 -2
  655. package/dist/node_modules/lodash/_compareAscending.js.map +1 -1
  656. package/dist/node_modules/lodash/_compareMultiple.js +1 -2
  657. package/dist/node_modules/lodash/_compareMultiple.js.map +1 -1
  658. package/dist/node_modules/lodash/_coreJsData.js +1 -2
  659. package/dist/node_modules/lodash/_coreJsData.js.map +1 -1
  660. package/dist/node_modules/lodash/_createBaseEach.js +1 -2
  661. package/dist/node_modules/lodash/_createBaseEach.js.map +1 -1
  662. package/dist/node_modules/lodash/_createBaseFor.js +1 -2
  663. package/dist/node_modules/lodash/_createBaseFor.js.map +1 -1
  664. package/dist/node_modules/lodash/_createCaseFirst.js +6 -7
  665. package/dist/node_modules/lodash/_createCaseFirst.js.map +1 -1
  666. package/dist/node_modules/lodash/_createFind.js +5 -6
  667. package/dist/node_modules/lodash/_createFind.js.map +1 -1
  668. package/dist/node_modules/lodash/_createRange.js +4 -5
  669. package/dist/node_modules/lodash/_createRange.js.map +1 -1
  670. package/dist/node_modules/lodash/_createSet.js +6 -7
  671. package/dist/node_modules/lodash/_createSet.js.map +1 -1
  672. package/dist/node_modules/lodash/_defineProperty.js +1 -2
  673. package/dist/node_modules/lodash/_defineProperty.js.map +1 -1
  674. package/dist/node_modules/lodash/_equalArrays.js +1 -2
  675. package/dist/node_modules/lodash/_equalArrays.js.map +1 -1
  676. package/dist/node_modules/lodash/_equalByTag.js +5 -6
  677. package/dist/node_modules/lodash/_equalByTag.js.map +1 -1
  678. package/dist/node_modules/lodash/_equalObjects.js +1 -2
  679. package/dist/node_modules/lodash/_equalObjects.js.map +1 -1
  680. package/dist/node_modules/lodash/_freeGlobal.js +1 -2
  681. package/dist/node_modules/lodash/_freeGlobal.js.map +1 -1
  682. package/dist/node_modules/lodash/_getAllKeys.js +1 -2
  683. package/dist/node_modules/lodash/_getAllKeys.js.map +1 -1
  684. package/dist/node_modules/lodash/_getMapData.js +1 -2
  685. package/dist/node_modules/lodash/_getMapData.js.map +1 -1
  686. package/dist/node_modules/lodash/_getMatchData.js +4 -5
  687. package/dist/node_modules/lodash/_getMatchData.js.map +1 -1
  688. package/dist/node_modules/lodash/_getNative.js +1 -2
  689. package/dist/node_modules/lodash/_getNative.js.map +1 -1
  690. package/dist/node_modules/lodash/_getPrototype.js +1 -2
  691. package/dist/node_modules/lodash/_getPrototype.js.map +1 -1
  692. package/dist/node_modules/lodash/_getRawTag.js +1 -2
  693. package/dist/node_modules/lodash/_getRawTag.js.map +1 -1
  694. package/dist/node_modules/lodash/_getSymbols.js +1 -2
  695. package/dist/node_modules/lodash/_getSymbols.js.map +1 -1
  696. package/dist/node_modules/lodash/_getTag.js +9 -10
  697. package/dist/node_modules/lodash/_getTag.js.map +1 -1
  698. package/dist/node_modules/lodash/_getValue.js +1 -2
  699. package/dist/node_modules/lodash/_getValue.js.map +1 -1
  700. package/dist/node_modules/lodash/_hasPath.js +8 -9
  701. package/dist/node_modules/lodash/_hasPath.js.map +1 -1
  702. package/dist/node_modules/lodash/_hasUnicode.js +1 -2
  703. package/dist/node_modules/lodash/_hasUnicode.js.map +1 -1
  704. package/dist/node_modules/lodash/_hashClear.js +1 -2
  705. package/dist/node_modules/lodash/_hashClear.js.map +1 -1
  706. package/dist/node_modules/lodash/_hashDelete.js +1 -2
  707. package/dist/node_modules/lodash/_hashDelete.js.map +1 -1
  708. package/dist/node_modules/lodash/_hashGet.js +1 -2
  709. package/dist/node_modules/lodash/_hashGet.js.map +1 -1
  710. package/dist/node_modules/lodash/_hashHas.js +1 -2
  711. package/dist/node_modules/lodash/_hashHas.js.map +1 -1
  712. package/dist/node_modules/lodash/_hashSet.js +1 -2
  713. package/dist/node_modules/lodash/_hashSet.js.map +1 -1
  714. package/dist/node_modules/lodash/_isFlattenable.js +5 -6
  715. package/dist/node_modules/lodash/_isFlattenable.js.map +1 -1
  716. package/dist/node_modules/lodash/_isIndex.js +6 -7
  717. package/dist/node_modules/lodash/_isIndex.js.map +1 -1
  718. package/dist/node_modules/lodash/_isIterateeCall.js +5 -6
  719. package/dist/node_modules/lodash/_isIterateeCall.js.map +1 -1
  720. package/dist/node_modules/lodash/_isKey.js +1 -2
  721. package/dist/node_modules/lodash/_isKey.js.map +1 -1
  722. package/dist/node_modules/lodash/_isKeyable.js +1 -2
  723. package/dist/node_modules/lodash/_isKeyable.js.map +1 -1
  724. package/dist/node_modules/lodash/_isMasked.js +1 -2
  725. package/dist/node_modules/lodash/_isMasked.js.map +1 -1
  726. package/dist/node_modules/lodash/_isPrototype.js +1 -2
  727. package/dist/node_modules/lodash/_isPrototype.js.map +1 -1
  728. package/dist/node_modules/lodash/_isStrictComparable.js +1 -2
  729. package/dist/node_modules/lodash/_isStrictComparable.js.map +1 -1
  730. package/dist/node_modules/lodash/_listCacheClear.js +1 -2
  731. package/dist/node_modules/lodash/_listCacheClear.js.map +1 -1
  732. package/dist/node_modules/lodash/_listCacheDelete.js +1 -2
  733. package/dist/node_modules/lodash/_listCacheDelete.js.map +1 -1
  734. package/dist/node_modules/lodash/_listCacheGet.js +1 -2
  735. package/dist/node_modules/lodash/_listCacheGet.js.map +1 -1
  736. package/dist/node_modules/lodash/_listCacheHas.js +1 -2
  737. package/dist/node_modules/lodash/_listCacheHas.js.map +1 -1
  738. package/dist/node_modules/lodash/_listCacheSet.js +1 -2
  739. package/dist/node_modules/lodash/_listCacheSet.js.map +1 -1
  740. package/dist/node_modules/lodash/_mapCacheClear.js +1 -2
  741. package/dist/node_modules/lodash/_mapCacheClear.js.map +1 -1
  742. package/dist/node_modules/lodash/_mapCacheDelete.js +1 -2
  743. package/dist/node_modules/lodash/_mapCacheDelete.js.map +1 -1
  744. package/dist/node_modules/lodash/_mapCacheGet.js +1 -2
  745. package/dist/node_modules/lodash/_mapCacheGet.js.map +1 -1
  746. package/dist/node_modules/lodash/_mapCacheHas.js +1 -2
  747. package/dist/node_modules/lodash/_mapCacheHas.js.map +1 -1
  748. package/dist/node_modules/lodash/_mapCacheSet.js +1 -2
  749. package/dist/node_modules/lodash/_mapCacheSet.js.map +1 -1
  750. package/dist/node_modules/lodash/_mapToArray.js +1 -2
  751. package/dist/node_modules/lodash/_mapToArray.js.map +1 -1
  752. package/dist/node_modules/lodash/_matchesStrictComparable.js +2 -3
  753. package/dist/node_modules/lodash/_matchesStrictComparable.js.map +1 -1
  754. package/dist/node_modules/lodash/_memoizeCapped.js +1 -2
  755. package/dist/node_modules/lodash/_memoizeCapped.js.map +1 -1
  756. package/dist/node_modules/lodash/_nativeCreate.js +1 -2
  757. package/dist/node_modules/lodash/_nativeCreate.js.map +1 -1
  758. package/dist/node_modules/lodash/_nativeKeys.js +1 -2
  759. package/dist/node_modules/lodash/_nativeKeys.js.map +1 -1
  760. package/dist/node_modules/lodash/_nodeUtil.js +1 -2
  761. package/dist/node_modules/lodash/_nodeUtil.js.map +1 -1
  762. package/dist/node_modules/lodash/_objectToString.js +1 -2
  763. package/dist/node_modules/lodash/_objectToString.js.map +1 -1
  764. package/dist/node_modules/lodash/_overArg.js +1 -2
  765. package/dist/node_modules/lodash/_overArg.js.map +1 -1
  766. package/dist/node_modules/lodash/_overRest.js +1 -2
  767. package/dist/node_modules/lodash/_overRest.js.map +1 -1
  768. package/dist/node_modules/lodash/_root.js +1 -2
  769. package/dist/node_modules/lodash/_root.js.map +1 -1
  770. package/dist/node_modules/lodash/_setCacheAdd.js +4 -6
  771. package/dist/node_modules/lodash/_setCacheAdd.js.map +1 -1
  772. package/dist/node_modules/lodash/_setCacheHas.js +1 -2
  773. package/dist/node_modules/lodash/_setCacheHas.js.map +1 -1
  774. package/dist/node_modules/lodash/_setToArray.js +1 -2
  775. package/dist/node_modules/lodash/_setToArray.js.map +1 -1
  776. package/dist/node_modules/lodash/_setToString.js +1 -2
  777. package/dist/node_modules/lodash/_setToString.js.map +1 -1
  778. package/dist/node_modules/lodash/_shortOut.js +8 -9
  779. package/dist/node_modules/lodash/_shortOut.js.map +1 -1
  780. package/dist/node_modules/lodash/_stackClear.js +1 -2
  781. package/dist/node_modules/lodash/_stackClear.js.map +1 -1
  782. package/dist/node_modules/lodash/_stackDelete.js +1 -2
  783. package/dist/node_modules/lodash/_stackDelete.js.map +1 -1
  784. package/dist/node_modules/lodash/_stackGet.js +1 -2
  785. package/dist/node_modules/lodash/_stackGet.js.map +1 -1
  786. package/dist/node_modules/lodash/_stackHas.js +1 -2
  787. package/dist/node_modules/lodash/_stackHas.js.map +1 -1
  788. package/dist/node_modules/lodash/_stackSet.js +1 -2
  789. package/dist/node_modules/lodash/_stackSet.js.map +1 -1
  790. package/dist/node_modules/lodash/_strictIndexOf.js +1 -2
  791. package/dist/node_modules/lodash/_strictIndexOf.js.map +1 -1
  792. package/dist/node_modules/lodash/_stringToArray.js +4 -5
  793. package/dist/node_modules/lodash/_stringToArray.js.map +1 -1
  794. package/dist/node_modules/lodash/_stringToPath.js +1 -2
  795. package/dist/node_modules/lodash/_stringToPath.js.map +1 -1
  796. package/dist/node_modules/lodash/_toKey.js +2 -3
  797. package/dist/node_modules/lodash/_toKey.js.map +1 -1
  798. package/dist/node_modules/lodash/_toSource.js +1 -2
  799. package/dist/node_modules/lodash/_toSource.js.map +1 -1
  800. package/dist/node_modules/lodash/_trimmedEndIndex.js +1 -2
  801. package/dist/node_modules/lodash/_trimmedEndIndex.js.map +1 -1
  802. package/dist/node_modules/lodash/_unicodeToArray.js +1 -2
  803. package/dist/node_modules/lodash/_unicodeToArray.js.map +1 -1
  804. package/dist/node_modules/lodash/constant.js +1 -2
  805. package/dist/node_modules/lodash/constant.js.map +1 -1
  806. package/dist/node_modules/lodash/debounce.js +1 -2
  807. package/dist/node_modules/lodash/debounce.js.map +1 -1
  808. package/dist/node_modules/lodash/eq.js +1 -2
  809. package/dist/node_modules/lodash/eq.js.map +1 -1
  810. package/dist/node_modules/lodash/every.js +7 -8
  811. package/dist/node_modules/lodash/every.js.map +1 -1
  812. package/dist/node_modules/lodash/find.js +1 -2
  813. package/dist/node_modules/lodash/find.js.map +1 -1
  814. package/dist/node_modules/lodash/findIndex.js +4 -5
  815. package/dist/node_modules/lodash/findIndex.js.map +1 -1
  816. package/dist/node_modules/lodash/flatMap.js +1 -2
  817. package/dist/node_modules/lodash/flatMap.js.map +1 -1
  818. package/dist/node_modules/lodash/get.js +1 -2
  819. package/dist/node_modules/lodash/get.js.map +1 -1
  820. package/dist/node_modules/lodash/hasIn.js +1 -2
  821. package/dist/node_modules/lodash/hasIn.js.map +1 -1
  822. package/dist/node_modules/lodash/identity.js +1 -2
  823. package/dist/node_modules/lodash/identity.js.map +1 -1
  824. package/dist/node_modules/lodash/isArguments.js +4 -5
  825. package/dist/node_modules/lodash/isArguments.js.map +1 -1
  826. package/dist/node_modules/lodash/isArray.js +1 -2
  827. package/dist/node_modules/lodash/isArray.js.map +1 -1
  828. package/dist/node_modules/lodash/isArrayLike.js +1 -2
  829. package/dist/node_modules/lodash/isArrayLike.js.map +1 -1
  830. package/dist/node_modules/lodash/isBoolean.js +1 -2
  831. package/dist/node_modules/lodash/isBoolean.js.map +1 -1
  832. package/dist/node_modules/lodash/isBuffer.js +1 -2
  833. package/dist/node_modules/lodash/isBuffer.js.map +1 -1
  834. package/dist/node_modules/lodash/isEqual.js +1 -2
  835. package/dist/node_modules/lodash/isEqual.js.map +1 -1
  836. package/dist/node_modules/lodash/isFunction.js +1 -2
  837. package/dist/node_modules/lodash/isFunction.js.map +1 -1
  838. package/dist/node_modules/lodash/isLength.js +4 -6
  839. package/dist/node_modules/lodash/isLength.js.map +1 -1
  840. package/dist/node_modules/lodash/isNaN.js +1 -2
  841. package/dist/node_modules/lodash/isNaN.js.map +1 -1
  842. package/dist/node_modules/lodash/isNil.js +1 -2
  843. package/dist/node_modules/lodash/isNil.js.map +1 -1
  844. package/dist/node_modules/lodash/isNumber.js +1 -2
  845. package/dist/node_modules/lodash/isNumber.js.map +1 -1
  846. package/dist/node_modules/lodash/isObject.js +1 -2
  847. package/dist/node_modules/lodash/isObject.js.map +1 -1
  848. package/dist/node_modules/lodash/isObjectLike.js +1 -2
  849. package/dist/node_modules/lodash/isObjectLike.js.map +1 -1
  850. package/dist/node_modules/lodash/isPlainObject.js +4 -5
  851. package/dist/node_modules/lodash/isPlainObject.js.map +1 -1
  852. package/dist/node_modules/lodash/isString.js +4 -5
  853. package/dist/node_modules/lodash/isString.js.map +1 -1
  854. package/dist/node_modules/lodash/isSymbol.js +1 -2
  855. package/dist/node_modules/lodash/isSymbol.js.map +1 -1
  856. package/dist/node_modules/lodash/isTypedArray.js +1 -2
  857. package/dist/node_modules/lodash/isTypedArray.js.map +1 -1
  858. package/dist/node_modules/lodash/keys.js +1 -2
  859. package/dist/node_modules/lodash/keys.js.map +1 -1
  860. package/dist/node_modules/lodash/last.js +1 -2
  861. package/dist/node_modules/lodash/last.js.map +1 -1
  862. package/dist/node_modules/lodash/map.js +6 -7
  863. package/dist/node_modules/lodash/map.js.map +1 -1
  864. package/dist/node_modules/lodash/mapValues.js +4 -5
  865. package/dist/node_modules/lodash/mapValues.js.map +1 -1
  866. package/dist/node_modules/lodash/max.js +5 -6
  867. package/dist/node_modules/lodash/max.js.map +1 -1
  868. package/dist/node_modules/lodash/memoize.js +1 -2
  869. package/dist/node_modules/lodash/memoize.js.map +1 -1
  870. package/dist/node_modules/lodash/min.js +5 -6
  871. package/dist/node_modules/lodash/min.js.map +1 -1
  872. package/dist/node_modules/lodash/noop.js +1 -2
  873. package/dist/node_modules/lodash/noop.js.map +1 -1
  874. package/dist/node_modules/lodash/now.js +1 -2
  875. package/dist/node_modules/lodash/now.js.map +1 -1
  876. package/dist/node_modules/lodash/property.js +6 -7
  877. package/dist/node_modules/lodash/property.js.map +1 -1
  878. package/dist/node_modules/lodash/range.js +1 -2
  879. package/dist/node_modules/lodash/range.js.map +1 -1
  880. package/dist/node_modules/lodash/some.js +7 -8
  881. package/dist/node_modules/lodash/some.js.map +1 -1
  882. package/dist/node_modules/lodash/sortBy.js +1 -2
  883. package/dist/node_modules/lodash/sortBy.js.map +1 -1
  884. package/dist/node_modules/lodash/stubArray.js +1 -2
  885. package/dist/node_modules/lodash/stubArray.js.map +1 -1
  886. package/dist/node_modules/lodash/stubFalse.js +1 -2
  887. package/dist/node_modules/lodash/stubFalse.js.map +1 -1
  888. package/dist/node_modules/lodash/throttle.js +4 -5
  889. package/dist/node_modules/lodash/throttle.js.map +1 -1
  890. package/dist/node_modules/lodash/toFinite.js +2 -3
  891. package/dist/node_modules/lodash/toFinite.js.map +1 -1
  892. package/dist/node_modules/lodash/toInteger.js +1 -2
  893. package/dist/node_modules/lodash/toInteger.js.map +1 -1
  894. package/dist/node_modules/lodash/toNumber.js +4 -5
  895. package/dist/node_modules/lodash/toNumber.js.map +1 -1
  896. package/dist/node_modules/lodash/toString.js +1 -2
  897. package/dist/node_modules/lodash/toString.js.map +1 -1
  898. package/dist/node_modules/lodash/uniqBy.js +1 -2
  899. package/dist/node_modules/lodash/uniqBy.js.map +1 -1
  900. package/dist/node_modules/lodash/upperFirst.js +1 -2
  901. package/dist/node_modules/lodash/upperFirst.js.map +1 -1
  902. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +22 -23
  903. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js.map +1 -1
  904. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +29 -30
  905. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js.map +1 -1
  906. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +17 -18
  907. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js.map +1 -1
  908. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +10 -11
  909. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js.map +1 -1
  910. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +5 -6
  911. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js.map +1 -1
  912. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +6 -7
  913. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js.map +1 -1
  914. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +1 -2
  915. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js.map +1 -1
  916. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +4 -5
  917. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js.map +1 -1
  918. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +50 -49
  919. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js.map +1 -1
  920. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +1 -2
  921. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js.map +1 -1
  922. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +1 -2
  923. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js.map +1 -1
  924. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +1 -2
  925. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js.map +1 -1
  926. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +1 -2
  927. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js.map +1 -1
  928. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +17 -18
  929. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js.map +1 -1
  930. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +23 -24
  931. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js.map +1 -1
  932. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +12 -12
  933. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js.map +1 -1
  934. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +1 -2
  935. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js.map +1 -1
  936. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +35 -37
  937. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js.map +1 -1
  938. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +18 -19
  939. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js.map +1 -1
  940. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +1 -2
  941. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js.map +1 -1
  942. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +1 -2
  943. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js.map +1 -1
  944. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +1 -2
  945. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js.map +1 -1
  946. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +1 -2
  947. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js.map +1 -1
  948. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +1 -2
  949. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js.map +1 -1
  950. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +2 -3
  951. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js.map +1 -1
  952. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +2 -3
  953. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js.map +1 -1
  954. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +9 -10
  955. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js.map +1 -1
  956. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +3 -3
  957. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js.map +1 -1
  958. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +1 -2
  959. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js.map +1 -1
  960. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +1 -2
  961. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js.map +1 -1
  962. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +1 -2
  963. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js.map +1 -1
  964. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +1 -2
  965. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js.map +1 -1
  966. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +2 -3
  967. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js.map +1 -1
  968. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +1 -2
  969. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js.map +1 -1
  970. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +1 -2
  971. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js.map +1 -1
  972. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +2 -3
  973. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js.map +1 -1
  974. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +3 -4
  975. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js.map +1 -1
  976. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +2 -3
  977. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js.map +1 -1
  978. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +1 -2
  979. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js.map +1 -1
  980. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +9 -10
  981. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js.map +1 -1
  982. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +1 -2
  983. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js.map +1 -1
  984. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +1 -2
  985. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js.map +1 -1
  986. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +4 -5
  987. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js.map +1 -1
  988. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +5 -6
  989. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js.map +1 -1
  990. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +1 -2
  991. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js.map +1 -1
  992. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +3 -4
  993. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js.map +1 -1
  994. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +2 -3
  995. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js.map +1 -1
  996. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +1 -2
  997. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js.map +1 -1
  998. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +1 -2
  999. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js.map +1 -1
  1000. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +1 -2
  1001. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js.map +1 -1
  1002. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +7 -8
  1003. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js.map +1 -1
  1004. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +1 -2
  1005. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js.map +1 -1
  1006. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +1 -2
  1007. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js.map +1 -1
  1008. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +1 -2
  1009. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js.map +1 -1
  1010. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +1 -2
  1011. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js.map +1 -1
  1012. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +1 -2
  1013. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js.map +1 -1
  1014. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +1 -2
  1015. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js.map +1 -1
  1016. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +1 -2
  1017. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js.map +1 -1
  1018. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +1 -2
  1019. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js.map +1 -1
  1020. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +1 -2
  1021. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js.map +1 -1
  1022. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +2 -9
  1023. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js.map +1 -1
  1024. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +16 -17
  1025. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js.map +1 -1
  1026. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +3 -4
  1027. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js.map +1 -1
  1028. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +1 -2
  1029. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js.map +1 -1
  1030. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +1 -2
  1031. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js.map +1 -1
  1032. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +2 -3
  1033. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js.map +1 -1
  1034. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +1 -2
  1035. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js.map +1 -1
  1036. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +1 -2
  1037. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js.map +1 -1
  1038. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +15 -16
  1039. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js.map +1 -1
  1040. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +1 -2
  1041. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js.map +1 -1
  1042. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +1 -2
  1043. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js.map +1 -1
  1044. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +2 -3
  1045. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js.map +1 -1
  1046. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +16 -17
  1047. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js.map +1 -1
  1048. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +6 -7
  1049. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js.map +1 -1
  1050. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +2 -3
  1051. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js.map +1 -1
  1052. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +2 -3
  1053. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js.map +1 -1
  1054. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +1 -2
  1055. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js.map +1 -1
  1056. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +2 -3
  1057. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js.map +1 -1
  1058. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +175 -180
  1059. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js.map +1 -1
  1060. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +1 -2
  1061. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js.map +1 -1
  1062. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +2 -3
  1063. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js.map +1 -1
  1064. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +6 -5
  1065. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js.map +1 -1
  1066. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +1 -2
  1067. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js.map +1 -1
  1068. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +1 -2
  1069. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js.map +1 -1
  1070. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +1 -2
  1071. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js.map +1 -1
  1072. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +1 -2
  1073. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js.map +1 -1
  1074. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +1 -2
  1075. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js.map +1 -1
  1076. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +1 -2
  1077. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js.map +1 -1
  1078. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +1 -2
  1079. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js.map +1 -1
  1080. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +1 -2
  1081. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js.map +1 -1
  1082. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +1 -2
  1083. package/dist/node_modules/motion-dom/dist/es/render/Feature.js.map +1 -1
  1084. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +58 -59
  1085. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js.map +1 -1
  1086. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +1 -2
  1087. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js.map +1 -1
  1088. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +1 -2
  1089. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js.map +1 -1
  1090. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +1 -2
  1091. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js.map +1 -1
  1092. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +1 -2
  1093. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js.map +1 -1
  1094. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +1 -2
  1095. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js.map +1 -1
  1096. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +9 -10
  1097. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js.map +1 -1
  1098. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +10 -15
  1099. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js.map +1 -1
  1100. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +10 -11
  1101. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js.map +1 -1
  1102. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +1 -2
  1103. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js.map +1 -1
  1104. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +1 -2
  1105. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js.map +1 -1
  1106. package/dist/node_modules/motion-dom/dist/es/render/store.js +1 -2
  1107. package/dist/node_modules/motion-dom/dist/es/render/store.js.map +1 -1
  1108. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +11 -12
  1109. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js.map +1 -1
  1110. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +1 -2
  1111. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js.map +1 -1
  1112. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +2 -3
  1113. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js.map +1 -1
  1114. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +1 -2
  1115. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js.map +1 -1
  1116. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +1 -2
  1117. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js.map +1 -1
  1118. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +1 -2
  1119. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js.map +1 -1
  1120. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +6 -7
  1121. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js.map +1 -1
  1122. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +57 -58
  1123. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js.map +1 -1
  1124. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +1 -2
  1125. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js.map +1 -1
  1126. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +1 -2
  1127. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js.map +1 -1
  1128. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +1 -2
  1129. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js.map +1 -1
  1130. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +2 -3
  1131. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js.map +1 -1
  1132. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +1 -2
  1133. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js.map +1 -1
  1134. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +1 -2
  1135. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js.map +1 -1
  1136. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +2 -3
  1137. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js.map +1 -1
  1138. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +2 -3
  1139. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js.map +1 -1
  1140. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +9 -8
  1141. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js.map +1 -1
  1142. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +8 -7
  1143. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js.map +1 -1
  1144. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +1 -2
  1145. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js.map +1 -1
  1146. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +1 -2
  1147. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js.map +1 -1
  1148. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +1 -2
  1149. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js.map +1 -1
  1150. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +1 -2
  1151. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js.map +1 -1
  1152. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +1 -2
  1153. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js.map +1 -1
  1154. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +1 -2
  1155. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js.map +1 -1
  1156. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +7 -8
  1157. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js.map +1 -1
  1158. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +1 -2
  1159. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js.map +1 -1
  1160. package/dist/node_modules/motion-dom/dist/es/resize/index.js +1 -2
  1161. package/dist/node_modules/motion-dom/dist/es/resize/index.js.map +1 -1
  1162. package/dist/node_modules/motion-dom/dist/es/stats/buffer.js +1 -2
  1163. package/dist/node_modules/motion-dom/dist/es/stats/buffer.js.map +1 -1
  1164. package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +1 -2
  1165. package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js.map +1 -1
  1166. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +7 -8
  1167. package/dist/node_modules/motion-dom/dist/es/utils/delay.js.map +1 -1
  1168. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +10 -7
  1169. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js.map +1 -1
  1170. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +1 -2
  1171. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js.map +1 -1
  1172. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +1 -2
  1173. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js.map +1 -1
  1174. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +1 -2
  1175. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js.map +1 -1
  1176. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +17 -18
  1177. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js.map +1 -1
  1178. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +13 -14
  1179. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js.map +1 -1
  1180. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +1 -2
  1181. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js.map +1 -1
  1182. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +4 -5
  1183. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js.map +1 -1
  1184. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +1 -2
  1185. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js.map +1 -1
  1186. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +2 -3
  1187. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js.map +1 -1
  1188. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +1 -2
  1189. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js.map +1 -1
  1190. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +1 -2
  1191. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js.map +1 -1
  1192. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +2 -3
  1193. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js.map +1 -1
  1194. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +1 -2
  1195. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js.map +1 -1
  1196. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +1 -2
  1197. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js.map +1 -1
  1198. package/dist/node_modules/motion-dom/dist/es/value/index.js +20 -21
  1199. package/dist/node_modules/motion-dom/dist/es/value/index.js.map +1 -1
  1200. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +1 -2
  1201. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js.map +1 -1
  1202. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +5 -6
  1203. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js.map +1 -1
  1204. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +1 -2
  1205. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js.map +1 -1
  1206. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +7 -8
  1207. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js.map +1 -1
  1208. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +7 -8
  1209. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js.map +1 -1
  1210. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +4 -5
  1211. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js.map +1 -1
  1212. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +1 -2
  1213. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js.map +1 -1
  1214. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +10 -11
  1215. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js.map +1 -1
  1216. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +13 -14
  1217. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js.map +1 -1
  1218. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +1 -2
  1219. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js.map +1 -1
  1220. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +8 -9
  1221. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js.map +1 -1
  1222. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +1 -2
  1223. package/dist/node_modules/motion-dom/dist/es/value/types/int.js.map +1 -1
  1224. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +2 -3
  1225. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js.map +1 -1
  1226. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +58 -59
  1227. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js.map +1 -1
  1228. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +1 -2
  1229. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js.map +1 -1
  1230. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +1 -2
  1231. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js.map +1 -1
  1232. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +2 -3
  1233. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js.map +1 -1
  1234. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +1 -2
  1235. package/dist/node_modules/motion-dom/dist/es/value/types/test.js.map +1 -1
  1236. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +2 -3
  1237. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js.map +1 -1
  1238. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +1 -2
  1239. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js.map +1 -1
  1240. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +5 -6
  1241. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js.map +1 -1
  1242. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +1 -2
  1243. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js.map +1 -1
  1244. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +1 -2
  1245. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js.map +1 -1
  1246. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +1 -2
  1247. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js.map +1 -1
  1248. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +1 -2
  1249. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js.map +1 -1
  1250. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +1 -2
  1251. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js.map +1 -1
  1252. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +1 -2
  1253. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js.map +1 -1
  1254. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +1 -2
  1255. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js.map +1 -1
  1256. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +1 -2
  1257. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js.map +1 -1
  1258. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +1 -2
  1259. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js.map +1 -1
  1260. package/dist/node_modules/motion-utils/dist/es/array.js +1 -2
  1261. package/dist/node_modules/motion-utils/dist/es/array.js.map +1 -1
  1262. package/dist/node_modules/motion-utils/dist/es/clamp.js +1 -2
  1263. package/dist/node_modules/motion-utils/dist/es/clamp.js.map +1 -1
  1264. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +1 -2
  1265. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js.map +1 -1
  1266. package/dist/node_modules/motion-utils/dist/es/easing/back.js +2 -3
  1267. package/dist/node_modules/motion-utils/dist/es/easing/back.js.map +1 -1
  1268. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +1 -2
  1269. package/dist/node_modules/motion-utils/dist/es/easing/circ.js.map +1 -1
  1270. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +2 -3
  1271. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js.map +1 -1
  1272. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +2 -3
  1273. package/dist/node_modules/motion-utils/dist/es/easing/ease.js.map +1 -1
  1274. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +1 -2
  1275. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js.map +1 -1
  1276. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +1 -2
  1277. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js.map +1 -1
  1278. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +1 -2
  1279. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js.map +1 -1
  1280. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +1 -2
  1281. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js.map +1 -1
  1282. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +12 -13
  1283. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js.map +1 -1
  1284. package/dist/node_modules/motion-utils/dist/es/errors.js +1 -2
  1285. package/dist/node_modules/motion-utils/dist/es/errors.js.map +1 -1
  1286. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +1 -2
  1287. package/dist/node_modules/motion-utils/dist/es/format-error-message.js.map +1 -1
  1288. package/dist/node_modules/motion-utils/dist/es/global-config.js +1 -2
  1289. package/dist/node_modules/motion-utils/dist/es/global-config.js.map +1 -1
  1290. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +1 -2
  1291. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js.map +1 -1
  1292. package/dist/node_modules/motion-utils/dist/es/is-object.js +1 -2
  1293. package/dist/node_modules/motion-utils/dist/es/is-object.js.map +1 -1
  1294. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +1 -2
  1295. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js.map +1 -1
  1296. package/dist/node_modules/motion-utils/dist/es/memo.js +2 -3
  1297. package/dist/node_modules/motion-utils/dist/es/memo.js.map +1 -1
  1298. package/dist/node_modules/motion-utils/dist/es/noop.js +1 -2
  1299. package/dist/node_modules/motion-utils/dist/es/noop.js.map +1 -1
  1300. package/dist/node_modules/motion-utils/dist/es/pipe.js +1 -2
  1301. package/dist/node_modules/motion-utils/dist/es/pipe.js.map +1 -1
  1302. package/dist/node_modules/motion-utils/dist/es/progress.js +1 -2
  1303. package/dist/node_modules/motion-utils/dist/es/progress.js.map +1 -1
  1304. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +7 -6
  1305. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js.map +1 -1
  1306. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +1 -2
  1307. package/dist/node_modules/motion-utils/dist/es/time-conversion.js.map +1 -1
  1308. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +1 -2
  1309. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js.map +1 -1
  1310. package/dist/node_modules/motion-utils/dist/es/warn-once.js +1 -2
  1311. package/dist/node_modules/motion-utils/dist/es/warn-once.js.map +1 -1
  1312. package/dist/node_modules/object-assign/index.js +1 -2
  1313. package/dist/node_modules/object-assign/index.js.map +1 -1
  1314. package/dist/node_modules/prop-types/checkPropTypes.js +1 -2
  1315. package/dist/node_modules/prop-types/checkPropTypes.js.map +1 -1
  1316. package/dist/node_modules/prop-types/factoryWithThrowingShims.js +1 -2
  1317. package/dist/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -1
  1318. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
  1319. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -1
  1320. package/dist/node_modules/prop-types/index.js +1 -2
  1321. package/dist/node_modules/prop-types/index.js.map +1 -1
  1322. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +1 -2
  1323. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -1
  1324. package/dist/node_modules/prop-types/lib/has.js +1 -2
  1325. package/dist/node_modules/prop-types/lib/has.js.map +1 -1
  1326. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +1 -2
  1327. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -1
  1328. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +1 -2
  1329. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
  1330. package/dist/node_modules/prop-types/node_modules/react-is/index.js +2 -3
  1331. package/dist/node_modules/prop-types/node_modules/react-is/index.js.map +1 -1
  1332. package/dist/node_modules/react-is/cjs/react-is.development.js +31 -32
  1333. package/dist/node_modules/react-is/cjs/react-is.development.js.map +1 -1
  1334. package/dist/node_modules/react-is/cjs/react-is.production.min.js +1 -2
  1335. package/dist/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
  1336. package/dist/node_modules/react-is/index.js +2 -3
  1337. package/dist/node_modules/react-is/index.js.map +1 -1
  1338. package/dist/node_modules/react-smooth/es6/Animate.js +33 -41
  1339. package/dist/node_modules/react-smooth/es6/Animate.js.map +1 -1
  1340. package/dist/node_modules/react-smooth/es6/AnimateManager.js +2 -5
  1341. package/dist/node_modules/react-smooth/es6/AnimateManager.js.map +1 -1
  1342. package/dist/node_modules/react-smooth/es6/configUpdate.js +1 -2
  1343. package/dist/node_modules/react-smooth/es6/configUpdate.js.map +1 -1
  1344. package/dist/node_modules/react-smooth/es6/easing.js +1 -2
  1345. package/dist/node_modules/react-smooth/es6/easing.js.map +1 -1
  1346. package/dist/node_modules/react-smooth/es6/index.js +1 -2
  1347. package/dist/node_modules/react-smooth/es6/index.js.map +1 -1
  1348. package/dist/node_modules/react-smooth/es6/setRafTimeout.js +1 -2
  1349. package/dist/node_modules/react-smooth/es6/setRafTimeout.js.map +1 -1
  1350. package/dist/node_modules/react-smooth/es6/util.js +17 -16
  1351. package/dist/node_modules/react-smooth/es6/util.js.map +1 -1
  1352. package/dist/node_modules/recharts/es6/cartesian/Area.js +99 -100
  1353. package/dist/node_modules/recharts/es6/cartesian/Area.js.map +1 -1
  1354. package/dist/node_modules/recharts/es6/cartesian/Bar.js +103 -104
  1355. package/dist/node_modules/recharts/es6/cartesian/Bar.js.map +1 -1
  1356. package/dist/node_modules/recharts/es6/cartesian/Brush.js +35 -36
  1357. package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +1 -1
  1358. package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js +60 -67
  1359. package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js.map +1 -1
  1360. package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +45 -46
  1361. package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js.map +1 -1
  1362. package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js +20 -21
  1363. package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +1 -1
  1364. package/dist/node_modules/recharts/es6/cartesian/Line.js +79 -80
  1365. package/dist/node_modules/recharts/es6/cartesian/Line.js.map +1 -1
  1366. package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js +29 -30
  1367. package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +1 -1
  1368. package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js +23 -24
  1369. package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +1 -1
  1370. package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js +31 -32
  1371. package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +1 -1
  1372. package/dist/node_modules/recharts/es6/cartesian/Scatter.js +81 -82
  1373. package/dist/node_modules/recharts/es6/cartesian/Scatter.js.map +1 -1
  1374. package/dist/node_modules/recharts/es6/cartesian/XAxis.js +10 -11
  1375. package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +1 -1
  1376. package/dist/node_modules/recharts/es6/cartesian/YAxis.js +10 -11
  1377. package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +1 -1
  1378. package/dist/node_modules/recharts/es6/cartesian/ZAxis.js +2 -3
  1379. package/dist/node_modules/recharts/es6/cartesian/ZAxis.js.map +1 -1
  1380. package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js +5 -6
  1381. package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js.map +1 -1
  1382. package/dist/node_modules/recharts/es6/cartesian/getTicks.js +7 -8
  1383. package/dist/node_modules/recharts/es6/cartesian/getTicks.js.map +1 -1
  1384. package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js +2 -5
  1385. package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js.map +1 -1
  1386. package/dist/node_modules/recharts/es6/chart/AreaChart.js +5 -6
  1387. package/dist/node_modules/recharts/es6/chart/AreaChart.js.map +1 -1
  1388. package/dist/node_modules/recharts/es6/chart/BarChart.js +7 -8
  1389. package/dist/node_modules/recharts/es6/chart/BarChart.js.map +1 -1
  1390. package/dist/node_modules/recharts/es6/chart/ComposedChart.js +18 -19
  1391. package/dist/node_modules/recharts/es6/chart/ComposedChart.js.map +1 -1
  1392. package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js +534 -533
  1393. package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js.map +1 -1
  1394. package/dist/node_modules/recharts/es6/component/Cell.js +1 -2
  1395. package/dist/node_modules/recharts/es6/component/Cell.js.map +1 -1
  1396. package/dist/node_modules/recharts/es6/component/Cursor.js +17 -18
  1397. package/dist/node_modules/recharts/es6/component/Cursor.js.map +1 -1
  1398. package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +35 -36
  1399. package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js.map +1 -1
  1400. package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js +16 -17
  1401. package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js.map +1 -1
  1402. package/dist/node_modules/recharts/es6/component/Label.js +85 -86
  1403. package/dist/node_modules/recharts/es6/component/Label.js.map +1 -1
  1404. package/dist/node_modules/recharts/es6/component/LabelList.js +20 -21
  1405. package/dist/node_modules/recharts/es6/component/LabelList.js.map +1 -1
  1406. package/dist/node_modules/recharts/es6/component/Legend.js +26 -23
  1407. package/dist/node_modules/recharts/es6/component/Legend.js.map +1 -1
  1408. package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +16 -17
  1409. package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +1 -1
  1410. package/dist/node_modules/recharts/es6/component/Text.js +18 -21
  1411. package/dist/node_modules/recharts/es6/component/Text.js.map +1 -1
  1412. package/dist/node_modules/recharts/es6/component/Tooltip.js +16 -17
  1413. package/dist/node_modules/recharts/es6/component/Tooltip.js.map +1 -1
  1414. package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js +3 -4
  1415. package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js.map +1 -1
  1416. package/dist/node_modules/recharts/es6/container/Layer.js +5 -6
  1417. package/dist/node_modules/recharts/es6/container/Layer.js.map +1 -1
  1418. package/dist/node_modules/recharts/es6/container/Surface.js +5 -6
  1419. package/dist/node_modules/recharts/es6/container/Surface.js.map +1 -1
  1420. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +21 -21
  1421. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -1
  1422. package/dist/node_modules/recharts/es6/shape/Cross.js +4 -5
  1423. package/dist/node_modules/recharts/es6/shape/Cross.js.map +1 -1
  1424. package/dist/node_modules/recharts/es6/shape/Curve.js +51 -52
  1425. package/dist/node_modules/recharts/es6/shape/Curve.js.map +1 -1
  1426. package/dist/node_modules/recharts/es6/shape/Dot.js +3 -4
  1427. package/dist/node_modules/recharts/es6/shape/Dot.js.map +1 -1
  1428. package/dist/node_modules/recharts/es6/shape/Rectangle.js +8 -9
  1429. package/dist/node_modules/recharts/es6/shape/Rectangle.js.map +1 -1
  1430. package/dist/node_modules/recharts/es6/shape/Sector.js +33 -34
  1431. package/dist/node_modules/recharts/es6/shape/Sector.js.map +1 -1
  1432. package/dist/node_modules/recharts/es6/shape/Symbols.js +33 -34
  1433. package/dist/node_modules/recharts/es6/shape/Symbols.js.map +1 -1
  1434. package/dist/node_modules/recharts/es6/shape/Trapezoid.js +8 -9
  1435. package/dist/node_modules/recharts/es6/shape/Trapezoid.js.map +1 -1
  1436. package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +24 -25
  1437. package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js.map +1 -1
  1438. package/dist/node_modules/recharts/es6/util/BarUtils.js +10 -11
  1439. package/dist/node_modules/recharts/es6/util/BarUtils.js.map +1 -1
  1440. package/dist/node_modules/recharts/es6/util/CartesianUtils.js +33 -34
  1441. package/dist/node_modules/recharts/es6/util/CartesianUtils.js.map +1 -1
  1442. package/dist/node_modules/recharts/es6/util/ChartUtils.js +237 -236
  1443. package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -1
  1444. package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js +1 -2
  1445. package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js.map +1 -1
  1446. package/dist/node_modules/recharts/es6/util/DOMUtils.js +1 -2
  1447. package/dist/node_modules/recharts/es6/util/DOMUtils.js.map +1 -1
  1448. package/dist/node_modules/recharts/es6/util/DataUtils.js +7 -8
  1449. package/dist/node_modules/recharts/es6/util/DataUtils.js.map +1 -1
  1450. package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js +20 -21
  1451. package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js.map +1 -1
  1452. package/dist/node_modules/recharts/es6/util/Events.js +0 -1
  1453. package/dist/node_modules/recharts/es6/util/Events.js.map +1 -1
  1454. package/dist/node_modules/recharts/es6/util/Global.js +0 -1
  1455. package/dist/node_modules/recharts/es6/util/Global.js.map +1 -1
  1456. package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js +1 -2
  1457. package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js.map +1 -1
  1458. package/dist/node_modules/recharts/es6/util/LogUtils.js +9 -8
  1459. package/dist/node_modules/recharts/es6/util/LogUtils.js.map +1 -1
  1460. package/dist/node_modules/recharts/es6/util/PolarUtils.js +4 -5
  1461. package/dist/node_modules/recharts/es6/util/PolarUtils.js.map +1 -1
  1462. package/dist/node_modules/recharts/es6/util/ReactUtils.js +11 -12
  1463. package/dist/node_modules/recharts/es6/util/ReactUtils.js.map +1 -1
  1464. package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js +5 -6
  1465. package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js.map +1 -1
  1466. package/dist/node_modules/recharts/es6/util/ScatterUtils.js +5 -6
  1467. package/dist/node_modules/recharts/es6/util/ScatterUtils.js.map +1 -1
  1468. package/dist/node_modules/recharts/es6/util/ShallowEqual.js +1 -2
  1469. package/dist/node_modules/recharts/es6/util/ShallowEqual.js.map +1 -1
  1470. package/dist/node_modules/recharts/es6/util/TickUtils.js +4 -4
  1471. package/dist/node_modules/recharts/es6/util/TickUtils.js.map +1 -1
  1472. package/dist/node_modules/recharts/es6/util/calculateViewBox.js +0 -1
  1473. package/dist/node_modules/recharts/es6/util/calculateViewBox.js.map +1 -1
  1474. package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js +7 -6
  1475. package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js.map +1 -1
  1476. package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js +1 -2
  1477. package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js.map +1 -1
  1478. package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js +1 -2
  1479. package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js.map +1 -1
  1480. package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js +1 -2
  1481. package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js.map +1 -1
  1482. package/dist/node_modules/recharts/es6/util/getLegendProps.js +9 -10
  1483. package/dist/node_modules/recharts/es6/util/getLegendProps.js.map +1 -1
  1484. package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js +1 -2
  1485. package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js.map +1 -1
  1486. package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js +4 -5
  1487. package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js.map +1 -1
  1488. package/dist/node_modules/recharts/es6/util/tooltip/translate.js +3 -4
  1489. package/dist/node_modules/recharts/es6/util/tooltip/translate.js.map +1 -1
  1490. package/dist/node_modules/recharts/es6/util/types.js +2 -3
  1491. package/dist/node_modules/recharts/es6/util/types.js.map +1 -1
  1492. package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js +2 -3
  1493. package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js.map +1 -1
  1494. package/dist/node_modules/recharts-scale/es6/index.js +1 -1
  1495. package/dist/node_modules/recharts-scale/es6/util/arithmetic.js +1 -2
  1496. package/dist/node_modules/recharts-scale/es6/util/arithmetic.js.map +1 -1
  1497. package/dist/node_modules/recharts-scale/es6/util/utils.js +3 -4
  1498. package/dist/node_modules/recharts-scale/es6/util/utils.js.map +1 -1
  1499. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +134 -151
  1500. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  1501. package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +2 -3
  1502. package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js.map +1 -1
  1503. package/dist/node_modules/victory-vendor/es/d3-scale.js +2 -3
  1504. package/dist/node_modules/victory-vendor/es/d3-scale.js.map +1 -1
  1505. package/dist/stories/EmptyState.stories.d.ts +0 -1
  1506. package/dist/stories/InsightsCharts.stories.d.ts +0 -1
  1507. package/dist/stories/MetricsCard.stories.d.ts +0 -1
  1508. package/dist/stories/StatusBadge.stories.d.ts +0 -1
  1509. package/package.json +21 -7
@@ -1 +1 @@
1
- {"version":3,"file":"useMyBodyShieldApi.js","names":[],"sources":["../../../src/mybodyshield/hooks/useMyBodyShieldApi.ts"],"sourcesContent":["/**\n * MyBodyShield API hooks\n * @module mybodyshield/hooks\n *\n * React-Query hooks wired DIRECTLY to the real `wspace-mybodyshield-svc`\n * federated GraphQL contract (the `myb*` operations). Every query/mutation\n * below uses an inline gql string whose fields match the svc\n * `.hive-schema.graphql` exactly. No mock data.\n *\n * Transport: `graphqlFetch({ gateway: 'workspace', workspaceToken: true })` —\n * the host shell supplies the gateway base URL + a workspace-scoped token.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useMyBodyShield } from '../context';\nimport type {\n MybConnection,\n MybProgram,\n MybProgramStatus,\n MybWorkout,\n MybExercise,\n MybWorkoutSession,\n MybSessionStatus,\n MybSessionSet,\n MybGoal,\n MybGoalStatus,\n MybMealLog,\n MybMealType,\n MybNutritionPlan,\n MybDailyMacros,\n MybBodyMetric,\n MybBodyMetricType,\n MybRecoveryLog,\n MybRecoveryMetric,\n MybCoachingRelationship,\n MybCoachingStatus,\n MybCreateProgramInput,\n MybUpdateProgramInput,\n MybCreateWorkoutInput,\n MybCreateExerciseInput,\n MybStartSessionInput,\n MybLogSetInput,\n MybCompleteSessionInput,\n MybCreateGoalInput,\n MybUpdateGoalInput,\n MybCreateNutritionPlanInput,\n MybUpdateNutritionPlanInput,\n MybLogMealInput,\n MybRecordMetricInput,\n MybLogRecoveryInput,\n MybCreateCoachingInput,\n PaginationInput,\n MybDeviceConnection,\n MybDeviceProvider,\n MybWearableMetricType,\n MybTodayGuidance,\n MybFood,\n MybInsights,\n MybAiSettings,\n MybAiOperationLogConnection,\n MybUpdateAiSettingsInput,\n MybAiProcessingConsent,\n MybMindfulnessExercise,\n MybMindfulnessSession,\n MybCompleteMindfulnessSessionInput,\n} from '../types';\n\n// ============================================================================\n// Transport\n// ============================================================================\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in an in-memory cache keyed\n * by operationName+variables for ~15s (mutations are never cached). A read\n * issued right after a write (e.g. React-Query refetch triggered by our\n * `invalidateQueries`) would otherwise return the PRE-mutation response until the\n * TTL expires — making just-created/updated rows invisible until a full reload.\n * fe-libs' documented remedy is that write-performing callers clear those caches;\n * we do exactly that after every myb mutation so every follow-up read is fresh.\n */\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\nconst clearGraphqlReadCaches = (): void => {\n const g = globalThis as GraphqlReadCacheGlobals;\n g.__graphqlFetchResponseCache?.clear();\n g.__graphqlFetchPendingResponses?.clear();\n g.__boffGraphQLResponseCache?.clear();\n};\n\nconst mybQuery = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n baseUrl,\n query,\n variables,\n workspaceToken: true,\n });\n\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n if (/^\\s*mutation\\b/.test(query)) {\n clearGraphqlReadCaches();\n }\n return response.data;\n};\n\n// React-Query key roots (one namespace per domain entity).\nconst KEY = {\n programs: ['mybodyshield', 'programs'] as const,\n program: (id: string) => ['mybodyshield', 'program', id] as const,\n programWorkouts: (id: string) => ['mybodyshield', 'program-workouts', id] as const,\n workoutExercises: (id: string) => ['mybodyshield', 'workout-exercises', id] as const,\n sessions: ['mybodyshield', 'sessions'] as const,\n session: (id: string) => ['mybodyshield', 'session', id] as const,\n exerciseBestSet: (name: string) => ['mybodyshield', 'exercise-best-set', name] as const,\n goals: ['mybodyshield', 'goals'] as const,\n goal: (id: string) => ['mybodyshield', 'goal', id] as const,\n meals: ['mybodyshield', 'meals'] as const,\n nutritionPlan: (id: string) => ['mybodyshield', 'nutrition-plan', id] as const,\n activePlan: ['mybodyshield', 'active-plan'] as const,\n dailyMacros: ['mybodyshield', 'daily-macros'] as const,\n bodyMetrics: ['mybodyshield', 'body-metrics'] as const,\n recovery: ['mybodyshield', 'recovery'] as const,\n coaching: ['mybodyshield', 'coaching'] as const,\n deviceConnections: ['mybodyshield', 'device-connections'] as const,\n guidance: ['mybodyshield', 'guidance'] as const,\n insights: (range: string) => ['mybodyshield', 'insights', range] as const,\n foodSearch: (query: string) => ['mybodyshield', 'food-search', query] as const,\n foodByBarcode: (barcode: string) => ['mybodyshield', 'food-barcode', barcode] as const,\n aiSettings: ['mybodyshield', 'ai-settings'] as const,\n aiOperationLogs: ['mybodyshield', 'ai-operation-logs'] as const,\n aiConsent: ['mybodyshield', 'ai-consent'] as const,\n mindfulnessExercises: ['mybodyshield', 'mindfulness-exercises'] as const,\n mindfulnessSessions: ['mybodyshield', 'mindfulness-sessions'] as const,\n};\n\nconst DEFAULT_PAGE: PaginationInput = { limit: 50 };\n\n// ============================================================================\n// Reusable gql field selections (codegen-free strictness)\n// ============================================================================\n\nconst PROGRAM_FIELDS = `\n id workspaceId memberId coachId name description goalType level phase status\n weeks daysPerWeek startDate endDate tags createdAt updatedAt\n`;\n\nconst EXERCISE_FIELDS = `\n id workspaceId workoutId name instructions muscleGroup sets reps targetWeight\n restSeconds orderIndex demo { id } createdAt updatedAt\n`;\n\nconst WORKOUT_FIELDS = `\n id workspaceId programId name description type dayOfWeek weekNumber orderIndex\n durationMin createdAt updatedAt\n`;\n\nconst SET_FIELDS = `\n id workspaceId sessionId exerciseName setNumber reps weight distanceM durationSec\n isPersonalRecord createdAt updatedAt\n`;\n\nconst SESSION_FIELDS = `\n id workspaceId memberId programId workoutId status scheduledFor startedAt completedAt\n caloriesBurned perceivedExertion notes createdAt updatedAt\n`;\n\nconst GOAL_FIELDS = `\n id workspaceId memberId title description type status targetValue currentValue\n baselineValue unit targetDate achievedAt createdAt updatedAt\n`;\n\nconst MEAL_FIELDS = `\n id workspaceId memberId planId name mealType calories proteinG carbsG fatG servings\n isFavorite loggedAt barcode createdAt updatedAt\n`;\n\nconst PLAN_FIELDS = `\n id workspaceId memberId coachId name goalType calorieTarget proteinTarget carbsTarget\n fatTarget startDate endDate isActive notes createdAt updatedAt\n`;\n\nconst METRIC_FIELDS = `\n id workspaceId memberId type value unit measuredAt notes photo { id } createdAt updatedAt\n`;\n\nconst RECOVERY_FIELDS = `\n id workspaceId memberId metric score sleepHours notes loggedAt createdAt updatedAt\n`;\n\nconst COACHING_FIELDS = `\n id workspaceId coachId memberId status specialty shareWorkouts shareNutrition\n shareMetrics startedAt endedAt notes createdAt updatedAt\n`;\n\nconst DEVICE_CONNECTION_FIELDS = `\n id workspaceId memberId provider status externalAccountId lastSyncedAt scopes createdAt updatedAt\n`;\n\nconst GUIDANCE_FIELDS = `\n memberId date readinessScore aiSummary cards { signal action reason }\n`;\n\nconst INSIGHTS_FIELDS = `\n dateRangeStart dateRangeEnd\n summary { consistencyStreakDays totalSessions totalVolumeKg averageReadiness macroAdherencePercent }\n daily { date sessions volumeKg readiness sleepHours calories proteinG carbsG fatG weight }\n goals { ${GOAL_FIELDS} }\n`;\n\nconst AI_SETTINGS_FIELDS = `\n id workspaceId memberId provider hasProviderKey modelName dailyAllowance dailyAllowanceUsed allowanceResetAt createdAt updatedAt\n`;\n\nconst AI_OPERATION_LOG_FIELDS = `\n id workspaceId memberId operationType provider modelName inputTokens outputTokens status errorMessage createdAt\n`;\n\nconst AI_PROCESSING_CONSENT_FIELDS = `\n id workspaceId actorId enabled acceptedAt withdrawnAt createdAt updatedAt\n`;\n\nconst FOOD_FIELDS = `\n barcode name brand servingG calories proteinG carbsG fatG imageUrl\n`;\n\nconst MACROS_FIELDS = `\n date calories proteinG carbsG fatG calorieTarget proteinTarget carbsTarget fatTarget\n`;\n\n/**\n * `MybWorkout.exercises` is a paginated `MybExerciseConnection` on the wire\n * (see `.hive-schema.graphql`); unwrap it back to the flat `MybExercise[]`\n * shape the rest of the app consumes.\n */\ntype MybWorkoutWithExerciseConnection = Omit<MybWorkout, 'exercises'> & {\n exercises: { items: MybExercise[] };\n};\n\nconst unwrapWorkoutItems = (items: MybWorkoutWithExerciseConnection[]): MybWorkout[] =>\n items.map(({ exercises, ...workout }) => ({ ...workout, exercises: exercises.items }));\n\n// ============================================================================\n// Programs (Training)\n// ============================================================================\n\nexport interface ProgramFilters {\n status?: MybProgramStatus;\n memberId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybPrograms = (filters: ProgramFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.programs, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListPrograms: MybConnection<MybProgram> }>(\n `query MybListPrograms($status: MybProgramStatus, $memberId: ID, $pagination: PaginationInput) {\n mybListPrograms(status: $status, memberId: $memberId, pagination: $pagination) {\n items { ${PROGRAM_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n status: filters.status,\n memberId: filters.memberId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListPrograms;\n },\n });\n};\n\nexport const useMybProgram = (id: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.program(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const result = await mybQuery<{\n mybProgram:\n | (Omit<MybProgram, 'workouts'> & {\n workouts: { items: MybWorkoutWithExerciseConnection[] };\n })\n | null;\n }>(\n `query MybProgram($id: ID!) {\n mybProgram(id: $id) {\n ${PROGRAM_FIELDS}\n workouts {\n items {\n ${WORKOUT_FIELDS}\n exercises { items { ${EXERCISE_FIELDS} } }\n }\n }\n }\n }`,\n { id },\n apiGatewayUrl\n );\n if (!result.mybProgram) return null;\n const { workouts, ...program } = result.mybProgram;\n return { ...program, workouts: unwrapWorkoutItems(workouts.items) };\n },\n });\n};\n\nexport const useMybProgramWorkouts = (programId: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.programWorkouts(programId ?? ''),\n enabled: Boolean(programId),\n queryFn: async () => {\n const result = await mybQuery<{\n mybProgramWorkouts: { items: MybWorkoutWithExerciseConnection[] };\n }>(\n `query MybProgramWorkouts($programId: ID!) {\n mybProgramWorkouts(programId: $programId) {\n items {\n ${WORKOUT_FIELDS}\n exercises { items { ${EXERCISE_FIELDS} } }\n }\n }\n }`,\n { programId },\n apiGatewayUrl\n );\n return unwrapWorkoutItems(result.mybProgramWorkouts.items);\n },\n });\n};\n\n/**\n * Planned exercises for a single workout, in `orderIndex` order — the\n * guided-workout stepper (BOFF-4096) walks a live session's `workoutId`\n * through these to drive the \"next exercise\" flow.\n */\nexport const useMybWorkoutExercises = (workoutId: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.workoutExercises(workoutId ?? ''),\n enabled: Boolean(workoutId),\n queryFn: async () => {\n const result = await mybQuery<{ mybWorkoutExercises: { items: MybExercise[] } }>(\n `query MybWorkoutExercises($workoutId: ID!) {\n mybWorkoutExercises(workoutId: $workoutId, pagination: { limit: 100 }) {\n items { ${EXERCISE_FIELDS} }\n }\n }`,\n { workoutId },\n apiGatewayUrl\n );\n return result.mybWorkoutExercises.items.slice().sort((a, b) => a.orderIndex - b.orderIndex);\n },\n });\n};\n\nexport const useMybCreateProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateProgramInput) => {\n const result = await mybQuery<{ mybCreateProgram: MybProgram }>(\n `mutation MybCreateProgram($input: MybCreateProgramInput!) {\n mybCreateProgram(input: $input) { ${PROGRAM_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateProgram;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.programs }),\n });\n};\n\nexport const useMybUpdateProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybUpdateProgramInput }) => {\n const result = await mybQuery<{ mybUpdateProgram: MybProgram }>(\n `mutation MybUpdateProgram($id: ID!, $input: MybUpdateProgramInput!) {\n mybUpdateProgram(id: $id, input: $input) { ${PROGRAM_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybUpdateProgram;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.programs });\n qc.invalidateQueries({ queryKey: KEY.program(data.id) });\n },\n });\n};\n\nexport const useMybTransitionProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; status: MybProgramStatus }) => {\n const result = await mybQuery<{ mybTransitionProgram: MybProgram }>(\n `mutation MybTransitionProgram($id: ID!, $status: MybProgramStatus!) {\n mybTransitionProgram(id: $id, status: $status) { ${PROGRAM_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybTransitionProgram;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.programs });\n qc.invalidateQueries({ queryKey: KEY.program(data.id) });\n },\n });\n};\n\nexport const useMybArchiveProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybArchiveProgram: boolean }>(\n `mutation MybArchiveProgram($id: ID!) { mybArchiveProgram(id: $id) }`,\n { id },\n apiGatewayUrl\n );\n return result.mybArchiveProgram;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.programs }),\n });\n};\n\nexport const useMybAddWorkout = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateWorkoutInput) => {\n const result = await mybQuery<{ mybAddWorkout: MybWorkout }>(\n `mutation MybAddWorkout($input: MybCreateWorkoutInput!) {\n mybAddWorkout(input: $input) { ${WORKOUT_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybAddWorkout;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.program(data.programId) });\n qc.invalidateQueries({ queryKey: KEY.programWorkouts(data.programId) });\n },\n });\n};\n\nexport const useMybAddExercise = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateExerciseInput) => {\n const result = await mybQuery<{ mybAddExercise: { id: string; workoutId: string } }>(\n `mutation MybAddExercise($input: MybCreateExerciseInput!) {\n mybAddExercise(input: $input) { id workoutId }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybAddExercise;\n },\n onSuccess: () => {\n // Exercises live under a program's workouts; invalidate program + workout\n // caches so the newly-added exercise appears on the program detail tree.\n qc.invalidateQueries({ queryKey: ['mybodyshield', 'program'] });\n qc.invalidateQueries({ queryKey: ['mybodyshield', 'program-workouts'] });\n },\n });\n};\n\n// ============================================================================\n// Sessions / Sets (Training — live logging)\n// ============================================================================\n\nexport interface SessionFilters {\n status?: MybSessionStatus;\n programId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybSessions = (filters: SessionFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.sessions, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListSessions: MybConnection<MybWorkoutSession> }>(\n `query MybListSessions($status: MybSessionStatus, $programId: ID, $pagination: PaginationInput) {\n mybListSessions(status: $status, programId: $programId, pagination: $pagination) {\n items { ${SESSION_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n status: filters.status,\n programId: filters.programId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListSessions;\n },\n });\n};\n\nexport const useMybSession = (id: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.session(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const result = await mybQuery<{\n mybSession: (Omit<MybWorkoutSession, 'sets'> & { sets: { items: MybSessionSet[] } }) | null;\n }>(\n `query MybSession($id: ID!) {\n mybSession(id: $id) {\n ${SESSION_FIELDS}\n sets { items { ${SET_FIELDS} } }\n }\n }`,\n { id },\n apiGatewayUrl\n );\n if (!result.mybSession) return null;\n const { sets, ...session } = result.mybSession;\n return { ...session, sets: sets.items };\n },\n });\n};\n\n/**\n * The calling member's own best-ever logged set for `exerciseName` (backend:\n * `mybExerciseBestSet`, self-scoped — no memberId argument). Drives live\n * auto-PR detection in the log-set dialog (BOFF-4096): `null` means the\n * member has never logged this exercise before, so there is no record to\n * beat yet.\n */\nexport const useMybExerciseBestSet = (exerciseName: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const trimmed = exerciseName.trim();\n return useQuery({\n queryKey: KEY.exerciseBestSet(trimmed),\n enabled: trimmed.length > 0,\n queryFn: async () => {\n const result = await mybQuery<{ mybExerciseBestSet: MybSessionSet | null }>(\n `query MybExerciseBestSet($exerciseName: String!) {\n mybExerciseBestSet(exerciseName: $exerciseName) { ${SET_FIELDS} }\n }`,\n { exerciseName: trimmed },\n apiGatewayUrl\n );\n return result.mybExerciseBestSet;\n },\n // Best-set history changes rarely mid-session; a short stale window\n // avoids refiring on every keystroke while the exercise name settles.\n staleTime: 15_000,\n });\n};\n\nexport const useMybStartSession = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybStartSessionInput) => {\n const result = await mybQuery<{ mybStartSession: MybWorkoutSession }>(\n `mutation MybStartSession($input: MybStartSessionInput!) {\n mybStartSession(input: $input) { ${SESSION_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybStartSession;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.sessions }),\n });\n};\n\nexport const useMybLogSet = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybLogSetInput) => {\n const result = await mybQuery<{ mybLogSet: MybSessionSet }>(\n `mutation MybLogSet($input: MybLogSetInput!) {\n mybLogSet(input: $input) { ${SET_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybLogSet;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.session(data.sessionId) });\n qc.invalidateQueries({ queryKey: KEY.sessions });\n // A just-logged set may itself now be the best-ever for this exercise —\n // refresh so the next auto-PR comparison (this session or a later one)\n // sees it (BOFF-4096).\n qc.invalidateQueries({ queryKey: KEY.exerciseBestSet(data.exerciseName) });\n },\n });\n};\n\nexport const useMybCompleteSession = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybCompleteSessionInput }) => {\n const result = await mybQuery<{ mybCompleteSession: MybWorkoutSession }>(\n `mutation MybCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {\n mybCompleteSession(id: $id, input: $input) { ${SESSION_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybCompleteSession;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.session(data.id) });\n qc.invalidateQueries({ queryKey: KEY.sessions });\n },\n });\n};\n\n// ============================================================================\n// Goals (Progress)\n// ============================================================================\n\nexport interface GoalFilters {\n status?: MybGoalStatus;\n memberId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybGoals = (filters: GoalFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.goals, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListGoals: MybConnection<MybGoal> }>(\n `query MybListGoals($status: MybGoalStatus, $memberId: ID, $pagination: PaginationInput) {\n mybListGoals(status: $status, memberId: $memberId, pagination: $pagination) {\n items { ${GOAL_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n status: filters.status,\n memberId: filters.memberId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListGoals;\n },\n });\n};\n\nexport const useMybCreateGoal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateGoalInput) => {\n const result = await mybQuery<{ mybCreateGoal: MybGoal }>(\n `mutation MybCreateGoal($input: MybCreateGoalInput!) {\n mybCreateGoal(input: $input) { ${GOAL_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateGoal;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.goals }),\n });\n};\n\nexport const useMybUpdateGoal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybUpdateGoalInput }) => {\n const result = await mybQuery<{ mybUpdateGoal: MybGoal }>(\n `mutation MybUpdateGoal($id: ID!, $input: MybUpdateGoalInput!) {\n mybUpdateGoal(id: $id, input: $input) { ${GOAL_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybUpdateGoal;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.goals }),\n });\n};\n\nexport const useMybAchieveGoal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybAchieveGoal: MybGoal }>(\n `mutation MybAchieveGoal($id: ID!) {\n mybAchieveGoal(id: $id) { ${GOAL_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.mybAchieveGoal;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.goals }),\n });\n};\n\n// ============================================================================\n// Nutrition (plans, meals, macros)\n// ============================================================================\n\nexport const useMybActiveNutritionPlan = (memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.activePlan, memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybActiveNutritionPlan: MybNutritionPlan | null }>(\n `query MybActiveNutritionPlan($memberId: ID) {\n mybActiveNutritionPlan(memberId: $memberId) { ${PLAN_FIELDS} }\n }`,\n { memberId },\n apiGatewayUrl\n );\n return result.mybActiveNutritionPlan;\n },\n });\n};\n\nexport const useMybNutritionPlan = (id: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.nutritionPlan(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const result = await mybQuery<{ mybNutritionPlan: MybNutritionPlan | null }>(\n `query MybNutritionPlan($id: ID!) {\n mybNutritionPlan(id: $id) {\n ${PLAN_FIELDS}\n meals { ${MEAL_FIELDS} }\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.mybNutritionPlan;\n },\n });\n};\n\nexport interface MealFilters {\n mealType?: MybMealType;\n planId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybMeals = (filters: MealFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.meals, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListMeals: MybConnection<MybMealLog> }>(\n `query MybListMeals($mealType: MybMealType, $planId: ID, $pagination: PaginationInput) {\n mybListMeals(mealType: $mealType, planId: $planId, pagination: $pagination) {\n items { ${MEAL_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n mealType: filters.mealType,\n planId: filters.planId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListMeals;\n },\n });\n};\n\nexport const useMybDailyMacros = (date?: string, memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.dailyMacros, date ?? 'today', memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybDailyMacros: MybDailyMacros }>(\n `query MybDailyMacros($date: DateTime, $memberId: ID) {\n mybDailyMacros(date: $date, memberId: $memberId) { ${MACROS_FIELDS} }\n }`,\n { date, memberId },\n apiGatewayUrl\n );\n return result.mybDailyMacros;\n },\n });\n};\n\nexport const useMybCreateNutritionPlan = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateNutritionPlanInput) => {\n const result = await mybQuery<{ mybCreateNutritionPlan: MybNutritionPlan }>(\n `mutation MybCreateNutritionPlan($input: MybCreateNutritionPlanInput!) {\n mybCreateNutritionPlan(input: $input) { ${PLAN_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateNutritionPlan;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.activePlan });\n },\n });\n};\n\nexport const useMybUpdateNutritionPlan = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybUpdateNutritionPlanInput }) => {\n const result = await mybQuery<{ mybUpdateNutritionPlan: MybNutritionPlan }>(\n `mutation MybUpdateNutritionPlan($id: ID!, $input: MybUpdateNutritionPlanInput!) {\n mybUpdateNutritionPlan(id: $id, input: $input) { ${PLAN_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybUpdateNutritionPlan;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.activePlan });\n qc.invalidateQueries({ queryKey: KEY.nutritionPlan(data.id) });\n },\n });\n};\n\nexport const useMybActivateNutritionPlan = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybActivateNutritionPlan: MybNutritionPlan }>(\n `mutation MybActivateNutritionPlan($id: ID!) {\n mybActivateNutritionPlan(id: $id) { ${PLAN_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.mybActivateNutritionPlan;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.activePlan });\n qc.invalidateQueries({ queryKey: KEY.nutritionPlan(data.id) });\n },\n });\n};\n\nexport const useMybLogMeal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybLogMealInput) => {\n const result = await mybQuery<{ mybLogMeal: MybMealLog }>(\n `mutation MybLogMeal($input: MybLogMealInput!) {\n mybLogMeal(input: $input) { ${MEAL_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybLogMeal;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.meals });\n qc.invalidateQueries({ queryKey: KEY.dailyMacros });\n if (data.planId) qc.invalidateQueries({ queryKey: KEY.nutritionPlan(data.planId) });\n },\n });\n};\n\nexport const useMybDeleteMeal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybDeleteMeal: boolean }>(\n `mutation MybDeleteMeal($id: ID!) { mybDeleteMeal(id: $id) }`,\n { id },\n apiGatewayUrl\n );\n return result.mybDeleteMeal;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.meals });\n qc.invalidateQueries({ queryKey: KEY.dailyMacros });\n },\n });\n};\n\n// ============================================================================\n// Body metrics (Progress)\n// ============================================================================\n\nexport interface BodyMetricFilters {\n type?: MybBodyMetricType;\n memberId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybBodyMetrics = (filters: BodyMetricFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.bodyMetrics, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListBodyMetrics: MybConnection<MybBodyMetric> }>(\n `query MybListBodyMetrics($type: MybBodyMetricType, $memberId: ID, $pagination: PaginationInput) {\n mybListBodyMetrics(type: $type, memberId: $memberId, pagination: $pagination) {\n items { ${METRIC_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n type: filters.type,\n memberId: filters.memberId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListBodyMetrics;\n },\n });\n};\n\nexport const useMybRecordBodyMetric = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybRecordMetricInput) => {\n const result = await mybQuery<{ mybRecordBodyMetric: MybBodyMetric }>(\n `mutation MybRecordBodyMetric($input: MybRecordMetricInput!) {\n mybRecordBodyMetric(input: $input) { ${METRIC_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybRecordBodyMetric;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.bodyMetrics }),\n });\n};\n\n// ============================================================================\n// Recovery (Wellbeing)\n// ============================================================================\n\nexport const useMybRecoveryLogs = (metric?: MybRecoveryMetric, memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.recovery, metric ?? 'all', memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybListRecoveryLogs: MybConnection<MybRecoveryLog> }>(\n `query MybListRecoveryLogs($metric: MybRecoveryMetric, $memberId: ID) {\n mybListRecoveryLogs(metric: $metric, memberId: $memberId) {\n items { ${RECOVERY_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { metric, memberId },\n apiGatewayUrl\n );\n return result.mybListRecoveryLogs;\n },\n });\n};\n\nexport const useMybLogRecovery = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybLogRecoveryInput) => {\n const result = await mybQuery<{ mybLogRecovery: MybRecoveryLog }>(\n `mutation MybLogRecovery($input: MybLogRecoveryInput!) {\n mybLogRecovery(input: $input) { ${RECOVERY_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybLogRecovery;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.recovery }),\n });\n};\n\nconst MINDFULNESS_EXERCISE_FIELDS = `\n id slug title description kind durationSeconds inhaleSeconds holdSeconds\n exhaleSeconds cycles contentSource\n`;\n\nconst MINDFULNESS_SESSION_FIELDS = `\n id workspaceId memberId startedAt completedAt durationSeconds cyclesCompleted createdAt\n exercise { ${MINDFULNESS_EXERCISE_FIELDS} }\n`;\n\nexport const useMybMindfulnessExercises = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.mindfulnessExercises,\n queryFn: async () => {\n const result = await mybQuery<{ mybListMindfulnessExercises: MybMindfulnessExercise[] }>(\n `query MybListMindfulnessExercises { mybListMindfulnessExercises { ${MINDFULNESS_EXERCISE_FIELDS} } }`,\n {},\n apiGatewayUrl\n );\n return result.mybListMindfulnessExercises;\n },\n });\n};\n\nexport const useMybMindfulnessSessions = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.mindfulnessSessions,\n queryFn: async () => {\n const result = await mybQuery<{\n mybListMindfulnessSessions: MybConnection<MybMindfulnessSession>;\n }>(\n `query MybListMindfulnessSessions { mybListMindfulnessSessions { items { ${MINDFULNESS_SESSION_FIELDS} } pageInfo { cursor hasMore } } }`,\n {},\n apiGatewayUrl\n );\n return result.mybListMindfulnessSessions;\n },\n });\n};\n\nexport const useMybCompleteMindfulnessSession = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCompleteMindfulnessSessionInput) => {\n const result = await mybQuery<{ mybCompleteMindfulnessSession: MybMindfulnessSession }>(\n `mutation MybCompleteMindfulnessSession($input: MybCompleteMindfulnessSessionInput!) {\n mybCompleteMindfulnessSession(input: $input) { ${MINDFULNESS_SESSION_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCompleteMindfulnessSession;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.mindfulnessSessions }),\n });\n};\n\n// ============================================================================\n// Coaching (Wellbeing)\n// ============================================================================\n\nexport const useMybCoaching = (status?: MybCoachingStatus, memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.coaching, status ?? 'all', memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybListCoaching: MybConnection<MybCoachingRelationship> }>(\n `query MybListCoaching($status: MybCoachingStatus, $memberId: ID) {\n mybListCoaching(status: $status, memberId: $memberId) {\n items { ${COACHING_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { status, memberId },\n apiGatewayUrl\n );\n return result.mybListCoaching;\n },\n });\n};\n\nexport const useMybCreateCoaching = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateCoachingInput) => {\n const result = await mybQuery<{ mybCreateCoaching: MybCoachingRelationship }>(\n `mutation MybCreateCoaching($input: MybCreateCoachingInput!) {\n mybCreateCoaching(input: $input) { ${COACHING_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateCoaching;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.coaching }),\n });\n};\n\nexport const useMybTransitionCoaching = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; status: MybCoachingStatus }) => {\n const result = await mybQuery<{ mybTransitionCoaching: MybCoachingRelationship }>(\n `mutation MybTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {\n mybTransitionCoaching(id: $id, status: $status) { ${COACHING_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybTransitionCoaching;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.coaching }),\n });\n};\n\n// ============================================================================\n// Wearable device integrations (BOFF-4172)\n// ============================================================================\n\nexport const useMybDeviceConnections = (memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.deviceConnections, memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybListDeviceConnections: MybDeviceConnection[] }>(\n `query MybListDeviceConnections($memberId: ID) {\n mybListDeviceConnections(memberId: $memberId) { ${DEVICE_CONNECTION_FIELDS} }\n }`,\n { memberId },\n apiGatewayUrl\n );\n return result.mybListDeviceConnections;\n },\n });\n};\n\nexport const useMybConnectDevice = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: {\n provider: MybDeviceProvider;\n externalAccountId?: string;\n scopes?: string[];\n }) => {\n const result = await mybQuery<{ mybConnectDevice: MybDeviceConnection }>(\n `mutation MybConnectDevice($input: MybConnectDeviceInput!) {\n mybConnectDevice(input: $input) { ${DEVICE_CONNECTION_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybConnectDevice;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.deviceConnections }),\n });\n};\n\nexport const useMybDisconnectDevice = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybDisconnectDevice: boolean }>(\n `mutation MybDisconnectDevice($id: ID!) { mybDisconnectDevice(id: $id) }`,\n { id },\n apiGatewayUrl\n );\n return result.mybDisconnectDevice;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.deviceConnections }),\n });\n};\n\nexport interface MybSyncReadingInput {\n metricType: MybWearableMetricType;\n value: number;\n unit?: string;\n recordedAt: string;\n}\n\n/**\n * Sync a batch of readings a native health bridge (Apple HealthKit / Google\n * Health Connect) already pulled on-device. The bridge itself is a Capacitor\n * plugin concern that lives in the app shell (`mybodyshield-app`), not this\n * MFE; this hook is the transport primitive it calls once it has readings to\n * push (BOFF-4172).\n */\nexport const useMybSyncDeviceReadings = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { connectionId: string; readings: MybSyncReadingInput[] }) => {\n const result = await mybQuery<{ mybSyncDeviceReadings: unknown[] }>(\n `mutation MybSyncDeviceReadings($connectionId: ID!, $readings: [MybSyncReadingInput!]!) {\n mybSyncDeviceReadings(connectionId: $connectionId, readings: $readings) { id }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybSyncDeviceReadings;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.deviceConnections });\n qc.invalidateQueries({ queryKey: KEY.recovery });\n qc.invalidateQueries({ queryKey: KEY.bodyMetrics });\n },\n });\n};\n\n// ============================================================================\n// Adaptive guidance (BOFF-4174)\n// ============================================================================\n\nexport const useMybTodayGuidance = (memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.guidance, memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybTodayGuidance: MybTodayGuidance }>(\n `query MybTodayGuidance($memberId: ID) {\n mybTodayGuidance(memberId: $memberId) { ${GUIDANCE_FIELDS} }\n }`,\n { memberId },\n apiGatewayUrl\n );\n return result.mybTodayGuidance;\n },\n // Guidance is derived from the day's logged data; a short stale window\n // avoids refetching on every focus while still catching a fresh log.\n staleTime: 60_000,\n });\n};\n\nexport interface InsightsRange {\n dateRangeStart?: string;\n dateRangeEnd?: string;\n /** Set only for an active coach/member relationship. */\n memberId?: string;\n}\n\nexport const useMybInsights = (range: InsightsRange = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const rangeKey = `${range.dateRangeStart ?? ''}|${range.dateRangeEnd ?? ''}|${range.memberId ?? 'me'}`;\n return useQuery({\n queryKey: KEY.insights(rangeKey),\n queryFn: async () => {\n const result = await mybQuery<{ mybInsights: MybInsights }>(\n `query MybInsights($dateRangeStart: DateTime, $dateRangeEnd: DateTime, $memberId: ID) {\n mybInsights(dateRangeStart: $dateRangeStart, dateRangeEnd: $dateRangeEnd, memberId: $memberId) { ${INSIGHTS_FIELDS} }\n }`,\n {\n dateRangeStart: range.dateRangeStart,\n dateRangeEnd: range.dateRangeEnd,\n memberId: range.memberId,\n },\n apiGatewayUrl\n );\n return result.mybInsights;\n },\n });\n};\n\n// ============================================================================\n// AI controls (BOFF-5949)\n// ============================================================================\n\nexport const useMybAiSettings = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.aiSettings,\n queryFn: async () => {\n const result = await mybQuery<{ mybAiSettings: MybAiSettings }>(\n `query MybAiSettings { mybAiSettings { ${AI_SETTINGS_FIELDS} } }`,\n {},\n apiGatewayUrl\n );\n return result.mybAiSettings;\n },\n });\n};\n\nexport const useMybUpdateAiSettings = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybUpdateAiSettingsInput) => {\n const result = await mybQuery<{ mybUpdateAiSettings: MybAiSettings }>(\n `mutation MybUpdateAiSettings($input: MybUpdateAiSettingsInput!) {\n mybUpdateAiSettings(input: $input) { ${AI_SETTINGS_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybUpdateAiSettings;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.aiSettings });\n },\n });\n};\n\nexport const useMybAiOperationLogs = (pagination?: PaginationInput) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.aiOperationLogs, pagination ?? DEFAULT_PAGE],\n queryFn: async () => {\n const result = await mybQuery<{ mybListAiOperationLogs: MybAiOperationLogConnection }>(\n `query MybListAiOperationLogs($pagination: PaginationInput) {\n mybListAiOperationLogs(pagination: $pagination) {\n items { ${AI_OPERATION_LOG_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { pagination: pagination ?? DEFAULT_PAGE },\n apiGatewayUrl\n );\n return result.mybListAiOperationLogs;\n },\n });\n};\n\n// ============================================================================\n// AI processing consent (BOFF-3838)\n// ============================================================================\n\nexport const useMybAiProcessingConsent = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.aiConsent,\n queryFn: async () => {\n const result = await mybQuery<{ mybMyAiProcessingConsent: MybAiProcessingConsent }>(\n `query MybMyAiProcessingConsent { mybMyAiProcessingConsent { ${AI_PROCESSING_CONSENT_FIELDS} } }`,\n {},\n apiGatewayUrl\n );\n return result.mybMyAiProcessingConsent;\n },\n });\n};\n\nexport const useMybSetAiProcessingConsent = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (enabled: boolean) => {\n const result = await mybQuery<{ mybSetAiProcessingConsent: MybAiProcessingConsent }>(\n `mutation MybSetAiProcessingConsent($enabled: Boolean!) {\n mybSetAiProcessingConsent(enabled: $enabled) { ${AI_PROCESSING_CONSENT_FIELDS} }\n }`,\n { enabled },\n apiGatewayUrl\n );\n return result.mybSetAiProcessingConsent;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.aiConsent });\n },\n });\n};\n\n// ============================================================================\n// Food database — Open Food Facts (BOFF-4173)\n// ============================================================================\n\nexport const useMybSearchFoods = (query: string, limit = 10) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const trimmed = query.trim();\n return useQuery({\n queryKey: KEY.foodSearch(trimmed),\n enabled: trimmed.length >= 2,\n queryFn: async () => {\n const result = await mybQuery<{ mybSearchFoods: MybFood[] }>(\n `query MybSearchFoods($query: String!, $limit: Int) {\n mybSearchFoods(query: $query, limit: $limit) { ${FOOD_FIELDS} }\n }`,\n { query: trimmed, limit },\n apiGatewayUrl\n );\n return result.mybSearchFoods;\n },\n staleTime: 30_000,\n });\n};\n\nexport const useMybFoodByBarcode = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useMutation({\n mutationFn: async (barcode: string) => {\n const result = await mybQuery<{ mybFoodByBarcode: MybFood | null }>(\n `query MybFoodByBarcode($barcode: String!) {\n mybFoodByBarcode(barcode: $barcode) { ${FOOD_FIELDS} }\n }`,\n { barcode },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AiB,KAAc,EAAa;EAC9D,SAAS,aACQ,MAAM,EACnB;;sBAEc,EAAwB;;;YAItC,EAAE,YAAY,KAAc,GAAc,EAC1C,EACD,EACa;EAEjB,CAAC;GAOS,WAAkC;CAC7C,IAAM,EAAE,qBAAkB,GAAiB;AAC3C,QAAO,EAAS;EACd,UAAU,EAAI;EACd,SAAS,aACQ,MAAM,EACnB,+DAA+D,EAA6B,OAC5F,EAAE,EACF,EACD,EACa;EAEjB,CAAC;GAGS,WAAqC;CAChD,IAAM,EAAE,qBAAkB,GAAiB,EACrC,IAAK,GAAgB;AAC3B,QAAO,EAAY;EACjB,YAAY,OAAO,OACF,MAAM,EACnB;2DACmD,EAA6B;YAEhF,EAAE,YAAS,EACX,EACD,EACa;EAEhB,iBAAiB;AACf,KAAG,kBAAkB,EAAE,UAAU,EAAI,WAAW,CAAC;;EAEpD,CAAC;GAOS,MAAqB,GAAe,IAAQ,OAAO;CAC9D,IAAM,EAAE,qBAAkB,GAAiB,EACrC,IAAU,EAAM,MAAM;AAC5B,QAAO,EAAS;EACd,UAAU,EAAI,WAAW,EAAQ;EACjC,SAAS,EAAQ,UAAU;EAC3B,SAAS,aACQ,MAAM,EACnB;2DACmD,EAAY;YAE/D;GAAE,OAAO;GAAS;GAAO,EACzB,EACD,EACa;EAEhB,WAAW;EACZ,CAAC;GAGS,WAA4B;CACvC,IAAM,EAAE,qBAAkB,GAAiB;AAC3C,QAAO,EAAY,EACjB,YAAY,OAAO,OACF,MAAM,EACnB;kDAC0C,EAAY;YAEtD,EAAE,YAAS,EACX,EACD,EACa,kBAEjB,CAAC"}
1
+ {"version":3,"file":"useMyBodyShieldApi.js","names":["clearGraphqlReadCaches","g","mybQuery","response","graphqlFetch","query","KEY","id","name","range","barcode","DEFAULT_PAGE","PROGRAM_FIELDS","EXERCISE_FIELDS","WORKOUT_FIELDS","SET_FIELDS","SESSION_FIELDS","GOAL_FIELDS","MEAL_FIELDS","PLAN_FIELDS","METRIC_FIELDS","RECOVERY_FIELDS","COACHING_FIELDS","GUIDANCE_FIELDS","INSIGHTS_FIELDS","AI_SETTINGS_FIELDS","AI_OPERATION_LOG_FIELDS","AI_PROCESSING_CONSENT_FIELDS","FOOD_FIELDS","MACROS_FIELDS","unwrapWorkoutItems","items","workout","exercises","useMybPrograms","useMyBodyShield","useQuery","filters","apiGatewayUrl","useMybProgram","result","program","workouts","useMybProgramWorkouts","programId","useMybWorkoutExercises","workoutId","a","b","useMybCreateProgram","qc","useQueryClient","useMutation","useMybUpdateProgram","vars","data","useMybTransitionProgram","useMybArchiveProgram","useMybAddWorkout","useMybAddExercise","useMybSessions","useMybSession","session","sets","useMybExerciseBestSet","trimmed","exerciseName","useMybStartSession","useMybLogSet","useMybCompleteSession","useMybGoals","useMybCreateGoal","useMybUpdateGoal","useMybAchieveGoal","useMybActiveNutritionPlan","memberId","useMybMeals","useMybDailyMacros","date","useMybCreateNutritionPlan","useMybUpdateNutritionPlan","useMybActivateNutritionPlan","useMybLogMeal","useMybDeleteMeal","useMybBodyMetrics","useMybRecordBodyMetric","useMybRecoveryLogs","metric","useMybLogRecovery","MINDFULNESS_EXERCISE_FIELDS","MINDFULNESS_SESSION_FIELDS","useMybMindfulnessExercises","useMybMindfulnessSessions","useMybCompleteMindfulnessSession","useMybCoaching","status","useMybCreateCoaching","useMybTransitionCoaching","useMybTodayGuidance","useMybInsights","rangeKey","useMybAiSettings","useMybUpdateAiSettings","useMybAiOperationLogs","pagination","useMybAiProcessingConsent","useMybSetAiProcessingConsent","useMybSearchFoods","useMybFoodByBarcode"],"sources":["../../../src/mybodyshield/hooks/useMyBodyShieldApi.ts"],"sourcesContent":["/**\n * MyBodyShield API hooks\n * @module mybodyshield/hooks\n *\n * React-Query hooks wired DIRECTLY to the real `wspace-mybodyshield-svc`\n * federated GraphQL contract (the `myb*` operations). Every query/mutation\n * below uses an inline gql string whose fields match the svc\n * `.hive-schema.graphql` exactly. No mock data.\n *\n * Transport: `graphqlFetch({ gateway: 'workspace', workspaceToken: true })` —\n * the host shell supplies the gateway base URL + a workspace-scoped token.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useMyBodyShield } from '../context';\nimport type {\n MybConnection,\n MybProgram,\n MybProgramStatus,\n MybWorkout,\n MybExercise,\n MybWorkoutSession,\n MybSessionStatus,\n MybSessionSet,\n MybGoal,\n MybGoalStatus,\n MybMealLog,\n MybMealType,\n MybNutritionPlan,\n MybDailyMacros,\n MybBodyMetric,\n MybBodyMetricType,\n MybRecoveryLog,\n MybRecoveryMetric,\n MybCoachingRelationship,\n MybCoachingStatus,\n MybCreateProgramInput,\n MybUpdateProgramInput,\n MybCreateWorkoutInput,\n MybCreateExerciseInput,\n MybStartSessionInput,\n MybLogSetInput,\n MybCompleteSessionInput,\n MybCreateGoalInput,\n MybUpdateGoalInput,\n MybCreateNutritionPlanInput,\n MybUpdateNutritionPlanInput,\n MybLogMealInput,\n MybRecordMetricInput,\n MybLogRecoveryInput,\n MybCreateCoachingInput,\n PaginationInput,\n MybDeviceConnection,\n MybDeviceProvider,\n MybWearableMetricType,\n MybTodayGuidance,\n MybFood,\n MybInsights,\n MybAiSettings,\n MybAiOperationLogConnection,\n MybUpdateAiSettingsInput,\n MybAiProcessingConsent,\n MybMindfulnessExercise,\n MybMindfulnessSession,\n MybCompleteMindfulnessSessionInput,\n} from '../types';\n\n// ============================================================================\n// Transport\n// ============================================================================\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in an in-memory cache keyed\n * by operationName+variables for ~15s (mutations are never cached). A read\n * issued right after a write (e.g. React-Query refetch triggered by our\n * `invalidateQueries`) would otherwise return the PRE-mutation response until the\n * TTL expires — making just-created/updated rows invisible until a full reload.\n * fe-libs' documented remedy is that write-performing callers clear those caches;\n * we do exactly that after every myb mutation so every follow-up read is fresh.\n */\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\nconst clearGraphqlReadCaches = (): void => {\n const g = globalThis as GraphqlReadCacheGlobals;\n g.__graphqlFetchResponseCache?.clear();\n g.__graphqlFetchPendingResponses?.clear();\n g.__boffGraphQLResponseCache?.clear();\n};\n\nconst mybQuery = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n baseUrl,\n query,\n variables,\n workspaceToken: true,\n });\n\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n if (/^\\s*mutation\\b/.test(query)) {\n clearGraphqlReadCaches();\n }\n return response.data;\n};\n\n// React-Query key roots (one namespace per domain entity).\nconst KEY = {\n programs: ['mybodyshield', 'programs'] as const,\n program: (id: string) => ['mybodyshield', 'program', id] as const,\n programWorkouts: (id: string) => ['mybodyshield', 'program-workouts', id] as const,\n workoutExercises: (id: string) => ['mybodyshield', 'workout-exercises', id] as const,\n sessions: ['mybodyshield', 'sessions'] as const,\n session: (id: string) => ['mybodyshield', 'session', id] as const,\n exerciseBestSet: (name: string) => ['mybodyshield', 'exercise-best-set', name] as const,\n goals: ['mybodyshield', 'goals'] as const,\n goal: (id: string) => ['mybodyshield', 'goal', id] as const,\n meals: ['mybodyshield', 'meals'] as const,\n nutritionPlan: (id: string) => ['mybodyshield', 'nutrition-plan', id] as const,\n activePlan: ['mybodyshield', 'active-plan'] as const,\n dailyMacros: ['mybodyshield', 'daily-macros'] as const,\n bodyMetrics: ['mybodyshield', 'body-metrics'] as const,\n recovery: ['mybodyshield', 'recovery'] as const,\n coaching: ['mybodyshield', 'coaching'] as const,\n deviceConnections: ['mybodyshield', 'device-connections'] as const,\n guidance: ['mybodyshield', 'guidance'] as const,\n insights: (range: string) => ['mybodyshield', 'insights', range] as const,\n foodSearch: (query: string) => ['mybodyshield', 'food-search', query] as const,\n foodByBarcode: (barcode: string) => ['mybodyshield', 'food-barcode', barcode] as const,\n aiSettings: ['mybodyshield', 'ai-settings'] as const,\n aiOperationLogs: ['mybodyshield', 'ai-operation-logs'] as const,\n aiConsent: ['mybodyshield', 'ai-consent'] as const,\n mindfulnessExercises: ['mybodyshield', 'mindfulness-exercises'] as const,\n mindfulnessSessions: ['mybodyshield', 'mindfulness-sessions'] as const,\n};\n\nconst DEFAULT_PAGE: PaginationInput = { limit: 50 };\n\n// ============================================================================\n// Reusable gql field selections (codegen-free strictness)\n// ============================================================================\n\nconst PROGRAM_FIELDS = `\n id workspaceId memberId coachId name description goalType level phase status\n weeks daysPerWeek startDate endDate tags createdAt updatedAt\n`;\n\nconst EXERCISE_FIELDS = `\n id workspaceId workoutId name instructions muscleGroup sets reps targetWeight\n restSeconds orderIndex demo { id } createdAt updatedAt\n`;\n\nconst WORKOUT_FIELDS = `\n id workspaceId programId name description type dayOfWeek weekNumber orderIndex\n durationMin createdAt updatedAt\n`;\n\nconst SET_FIELDS = `\n id workspaceId sessionId exerciseName setNumber reps weight distanceM durationSec\n isPersonalRecord createdAt updatedAt\n`;\n\nconst SESSION_FIELDS = `\n id workspaceId memberId programId workoutId status scheduledFor startedAt completedAt\n caloriesBurned perceivedExertion notes createdAt updatedAt\n`;\n\nconst GOAL_FIELDS = `\n id workspaceId memberId title description type status targetValue currentValue\n baselineValue unit targetDate achievedAt createdAt updatedAt\n`;\n\nconst MEAL_FIELDS = `\n id workspaceId memberId planId name mealType calories proteinG carbsG fatG servings\n isFavorite loggedAt barcode createdAt updatedAt\n`;\n\nconst PLAN_FIELDS = `\n id workspaceId memberId coachId name goalType calorieTarget proteinTarget carbsTarget\n fatTarget startDate endDate isActive notes createdAt updatedAt\n`;\n\nconst METRIC_FIELDS = `\n id workspaceId memberId type value unit measuredAt notes photo { id } createdAt updatedAt\n`;\n\nconst RECOVERY_FIELDS = `\n id workspaceId memberId metric score sleepHours notes loggedAt createdAt updatedAt\n`;\n\nconst COACHING_FIELDS = `\n id workspaceId coachId memberId status specialty shareWorkouts shareNutrition\n shareMetrics startedAt endedAt notes createdAt updatedAt\n`;\n\nconst DEVICE_CONNECTION_FIELDS = `\n id workspaceId memberId provider status externalAccountId lastSyncedAt scopes createdAt updatedAt\n`;\n\nconst GUIDANCE_FIELDS = `\n memberId date readinessScore aiSummary cards { signal action reason }\n`;\n\nconst INSIGHTS_FIELDS = `\n dateRangeStart dateRangeEnd\n summary { consistencyStreakDays totalSessions totalVolumeKg averageReadiness macroAdherencePercent }\n daily { date sessions volumeKg readiness sleepHours calories proteinG carbsG fatG weight }\n goals { ${GOAL_FIELDS} }\n`;\n\nconst AI_SETTINGS_FIELDS = `\n id workspaceId memberId provider hasProviderKey modelName dailyAllowance dailyAllowanceUsed allowanceResetAt createdAt updatedAt\n`;\n\nconst AI_OPERATION_LOG_FIELDS = `\n id workspaceId memberId operationType provider modelName inputTokens outputTokens status errorMessage createdAt\n`;\n\nconst AI_PROCESSING_CONSENT_FIELDS = `\n id workspaceId actorId enabled acceptedAt withdrawnAt createdAt updatedAt\n`;\n\nconst FOOD_FIELDS = `\n barcode name brand servingG calories proteinG carbsG fatG imageUrl\n`;\n\nconst MACROS_FIELDS = `\n date calories proteinG carbsG fatG calorieTarget proteinTarget carbsTarget fatTarget\n`;\n\n/**\n * `MybWorkout.exercises` is a paginated `MybExerciseConnection` on the wire\n * (see `.hive-schema.graphql`); unwrap it back to the flat `MybExercise[]`\n * shape the rest of the app consumes.\n */\ntype MybWorkoutWithExerciseConnection = Omit<MybWorkout, 'exercises'> & {\n exercises: { items: MybExercise[] };\n};\n\nconst unwrapWorkoutItems = (items: MybWorkoutWithExerciseConnection[]): MybWorkout[] =>\n items.map(({ exercises, ...workout }) => ({ ...workout, exercises: exercises.items }));\n\n// ============================================================================\n// Programs (Training)\n// ============================================================================\n\nexport interface ProgramFilters {\n status?: MybProgramStatus;\n memberId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybPrograms = (filters: ProgramFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.programs, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListPrograms: MybConnection<MybProgram> }>(\n `query MybListPrograms($status: MybProgramStatus, $memberId: ID, $pagination: PaginationInput) {\n mybListPrograms(status: $status, memberId: $memberId, pagination: $pagination) {\n items { ${PROGRAM_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n status: filters.status,\n memberId: filters.memberId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListPrograms;\n },\n });\n};\n\nexport const useMybProgram = (id: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.program(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const result = await mybQuery<{\n mybProgram:\n | (Omit<MybProgram, 'workouts'> & {\n workouts: { items: MybWorkoutWithExerciseConnection[] };\n })\n | null;\n }>(\n `query MybProgram($id: ID!) {\n mybProgram(id: $id) {\n ${PROGRAM_FIELDS}\n workouts {\n items {\n ${WORKOUT_FIELDS}\n exercises { items { ${EXERCISE_FIELDS} } }\n }\n }\n }\n }`,\n { id },\n apiGatewayUrl\n );\n if (!result.mybProgram) return null;\n const { workouts, ...program } = result.mybProgram;\n return { ...program, workouts: unwrapWorkoutItems(workouts.items) };\n },\n });\n};\n\nexport const useMybProgramWorkouts = (programId: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.programWorkouts(programId ?? ''),\n enabled: Boolean(programId),\n queryFn: async () => {\n const result = await mybQuery<{\n mybProgramWorkouts: { items: MybWorkoutWithExerciseConnection[] };\n }>(\n `query MybProgramWorkouts($programId: ID!) {\n mybProgramWorkouts(programId: $programId) {\n items {\n ${WORKOUT_FIELDS}\n exercises { items { ${EXERCISE_FIELDS} } }\n }\n }\n }`,\n { programId },\n apiGatewayUrl\n );\n return unwrapWorkoutItems(result.mybProgramWorkouts.items);\n },\n });\n};\n\n/**\n * Planned exercises for a single workout, in `orderIndex` order — the\n * guided-workout stepper (BOFF-4096) walks a live session's `workoutId`\n * through these to drive the \"next exercise\" flow.\n */\nexport const useMybWorkoutExercises = (workoutId: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.workoutExercises(workoutId ?? ''),\n enabled: Boolean(workoutId),\n queryFn: async () => {\n const result = await mybQuery<{ mybWorkoutExercises: { items: MybExercise[] } }>(\n `query MybWorkoutExercises($workoutId: ID!) {\n mybWorkoutExercises(workoutId: $workoutId, pagination: { limit: 100 }) {\n items { ${EXERCISE_FIELDS} }\n }\n }`,\n { workoutId },\n apiGatewayUrl\n );\n return result.mybWorkoutExercises.items.slice().sort((a, b) => a.orderIndex - b.orderIndex);\n },\n });\n};\n\nexport const useMybCreateProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateProgramInput) => {\n const result = await mybQuery<{ mybCreateProgram: MybProgram }>(\n `mutation MybCreateProgram($input: MybCreateProgramInput!) {\n mybCreateProgram(input: $input) { ${PROGRAM_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateProgram;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.programs }),\n });\n};\n\nexport const useMybUpdateProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybUpdateProgramInput }) => {\n const result = await mybQuery<{ mybUpdateProgram: MybProgram }>(\n `mutation MybUpdateProgram($id: ID!, $input: MybUpdateProgramInput!) {\n mybUpdateProgram(id: $id, input: $input) { ${PROGRAM_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybUpdateProgram;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.programs });\n qc.invalidateQueries({ queryKey: KEY.program(data.id) });\n },\n });\n};\n\nexport const useMybTransitionProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; status: MybProgramStatus }) => {\n const result = await mybQuery<{ mybTransitionProgram: MybProgram }>(\n `mutation MybTransitionProgram($id: ID!, $status: MybProgramStatus!) {\n mybTransitionProgram(id: $id, status: $status) { ${PROGRAM_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybTransitionProgram;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.programs });\n qc.invalidateQueries({ queryKey: KEY.program(data.id) });\n },\n });\n};\n\nexport const useMybArchiveProgram = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybArchiveProgram: boolean }>(\n `mutation MybArchiveProgram($id: ID!) { mybArchiveProgram(id: $id) }`,\n { id },\n apiGatewayUrl\n );\n return result.mybArchiveProgram;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.programs }),\n });\n};\n\nexport const useMybAddWorkout = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateWorkoutInput) => {\n const result = await mybQuery<{ mybAddWorkout: MybWorkout }>(\n `mutation MybAddWorkout($input: MybCreateWorkoutInput!) {\n mybAddWorkout(input: $input) { ${WORKOUT_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybAddWorkout;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.program(data.programId) });\n qc.invalidateQueries({ queryKey: KEY.programWorkouts(data.programId) });\n },\n });\n};\n\nexport const useMybAddExercise = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateExerciseInput) => {\n const result = await mybQuery<{ mybAddExercise: { id: string; workoutId: string } }>(\n `mutation MybAddExercise($input: MybCreateExerciseInput!) {\n mybAddExercise(input: $input) { id workoutId }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybAddExercise;\n },\n onSuccess: () => {\n // Exercises live under a program's workouts; invalidate program + workout\n // caches so the newly-added exercise appears on the program detail tree.\n qc.invalidateQueries({ queryKey: ['mybodyshield', 'program'] });\n qc.invalidateQueries({ queryKey: ['mybodyshield', 'program-workouts'] });\n },\n });\n};\n\n// ============================================================================\n// Sessions / Sets (Training — live logging)\n// ============================================================================\n\nexport interface SessionFilters {\n status?: MybSessionStatus;\n programId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybSessions = (filters: SessionFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.sessions, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListSessions: MybConnection<MybWorkoutSession> }>(\n `query MybListSessions($status: MybSessionStatus, $programId: ID, $pagination: PaginationInput) {\n mybListSessions(status: $status, programId: $programId, pagination: $pagination) {\n items { ${SESSION_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n status: filters.status,\n programId: filters.programId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListSessions;\n },\n });\n};\n\nexport const useMybSession = (id: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.session(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const result = await mybQuery<{\n mybSession: (Omit<MybWorkoutSession, 'sets'> & { sets: { items: MybSessionSet[] } }) | null;\n }>(\n `query MybSession($id: ID!) {\n mybSession(id: $id) {\n ${SESSION_FIELDS}\n sets { items { ${SET_FIELDS} } }\n }\n }`,\n { id },\n apiGatewayUrl\n );\n if (!result.mybSession) return null;\n const { sets, ...session } = result.mybSession;\n return { ...session, sets: sets.items };\n },\n });\n};\n\n/**\n * The calling member's own best-ever logged set for `exerciseName` (backend:\n * `mybExerciseBestSet`, self-scoped — no memberId argument). Drives live\n * auto-PR detection in the log-set dialog (BOFF-4096): `null` means the\n * member has never logged this exercise before, so there is no record to\n * beat yet.\n */\nexport const useMybExerciseBestSet = (exerciseName: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const trimmed = exerciseName.trim();\n return useQuery({\n queryKey: KEY.exerciseBestSet(trimmed),\n enabled: trimmed.length > 0,\n queryFn: async () => {\n const result = await mybQuery<{ mybExerciseBestSet: MybSessionSet | null }>(\n `query MybExerciseBestSet($exerciseName: String!) {\n mybExerciseBestSet(exerciseName: $exerciseName) { ${SET_FIELDS} }\n }`,\n { exerciseName: trimmed },\n apiGatewayUrl\n );\n return result.mybExerciseBestSet;\n },\n // Best-set history changes rarely mid-session; a short stale window\n // avoids refiring on every keystroke while the exercise name settles.\n staleTime: 15_000,\n });\n};\n\nexport const useMybStartSession = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybStartSessionInput) => {\n const result = await mybQuery<{ mybStartSession: MybWorkoutSession }>(\n `mutation MybStartSession($input: MybStartSessionInput!) {\n mybStartSession(input: $input) { ${SESSION_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybStartSession;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.sessions }),\n });\n};\n\nexport const useMybLogSet = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybLogSetInput) => {\n const result = await mybQuery<{ mybLogSet: MybSessionSet }>(\n `mutation MybLogSet($input: MybLogSetInput!) {\n mybLogSet(input: $input) { ${SET_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybLogSet;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.session(data.sessionId) });\n qc.invalidateQueries({ queryKey: KEY.sessions });\n // A just-logged set may itself now be the best-ever for this exercise —\n // refresh so the next auto-PR comparison (this session or a later one)\n // sees it (BOFF-4096).\n qc.invalidateQueries({ queryKey: KEY.exerciseBestSet(data.exerciseName) });\n },\n });\n};\n\nexport const useMybCompleteSession = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybCompleteSessionInput }) => {\n const result = await mybQuery<{ mybCompleteSession: MybWorkoutSession }>(\n `mutation MybCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {\n mybCompleteSession(id: $id, input: $input) { ${SESSION_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybCompleteSession;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.session(data.id) });\n qc.invalidateQueries({ queryKey: KEY.sessions });\n },\n });\n};\n\n// ============================================================================\n// Goals (Progress)\n// ============================================================================\n\nexport interface GoalFilters {\n status?: MybGoalStatus;\n memberId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybGoals = (filters: GoalFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.goals, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListGoals: MybConnection<MybGoal> }>(\n `query MybListGoals($status: MybGoalStatus, $memberId: ID, $pagination: PaginationInput) {\n mybListGoals(status: $status, memberId: $memberId, pagination: $pagination) {\n items { ${GOAL_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n status: filters.status,\n memberId: filters.memberId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListGoals;\n },\n });\n};\n\nexport const useMybCreateGoal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateGoalInput) => {\n const result = await mybQuery<{ mybCreateGoal: MybGoal }>(\n `mutation MybCreateGoal($input: MybCreateGoalInput!) {\n mybCreateGoal(input: $input) { ${GOAL_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateGoal;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.goals }),\n });\n};\n\nexport const useMybUpdateGoal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybUpdateGoalInput }) => {\n const result = await mybQuery<{ mybUpdateGoal: MybGoal }>(\n `mutation MybUpdateGoal($id: ID!, $input: MybUpdateGoalInput!) {\n mybUpdateGoal(id: $id, input: $input) { ${GOAL_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybUpdateGoal;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.goals }),\n });\n};\n\nexport const useMybAchieveGoal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybAchieveGoal: MybGoal }>(\n `mutation MybAchieveGoal($id: ID!) {\n mybAchieveGoal(id: $id) { ${GOAL_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.mybAchieveGoal;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.goals }),\n });\n};\n\n// ============================================================================\n// Nutrition (plans, meals, macros)\n// ============================================================================\n\nexport const useMybActiveNutritionPlan = (memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.activePlan, memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybActiveNutritionPlan: MybNutritionPlan | null }>(\n `query MybActiveNutritionPlan($memberId: ID) {\n mybActiveNutritionPlan(memberId: $memberId) { ${PLAN_FIELDS} }\n }`,\n { memberId },\n apiGatewayUrl\n );\n return result.mybActiveNutritionPlan;\n },\n });\n};\n\nexport const useMybNutritionPlan = (id: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.nutritionPlan(id ?? ''),\n enabled: Boolean(id),\n queryFn: async () => {\n const result = await mybQuery<{ mybNutritionPlan: MybNutritionPlan | null }>(\n `query MybNutritionPlan($id: ID!) {\n mybNutritionPlan(id: $id) {\n ${PLAN_FIELDS}\n meals { ${MEAL_FIELDS} }\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.mybNutritionPlan;\n },\n });\n};\n\nexport interface MealFilters {\n mealType?: MybMealType;\n planId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybMeals = (filters: MealFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.meals, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListMeals: MybConnection<MybMealLog> }>(\n `query MybListMeals($mealType: MybMealType, $planId: ID, $pagination: PaginationInput) {\n mybListMeals(mealType: $mealType, planId: $planId, pagination: $pagination) {\n items { ${MEAL_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n mealType: filters.mealType,\n planId: filters.planId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListMeals;\n },\n });\n};\n\nexport const useMybDailyMacros = (date?: string, memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.dailyMacros, date ?? 'today', memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybDailyMacros: MybDailyMacros }>(\n `query MybDailyMacros($date: DateTime, $memberId: ID) {\n mybDailyMacros(date: $date, memberId: $memberId) { ${MACROS_FIELDS} }\n }`,\n { date, memberId },\n apiGatewayUrl\n );\n return result.mybDailyMacros;\n },\n });\n};\n\nexport const useMybCreateNutritionPlan = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateNutritionPlanInput) => {\n const result = await mybQuery<{ mybCreateNutritionPlan: MybNutritionPlan }>(\n `mutation MybCreateNutritionPlan($input: MybCreateNutritionPlanInput!) {\n mybCreateNutritionPlan(input: $input) { ${PLAN_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateNutritionPlan;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.activePlan });\n },\n });\n};\n\nexport const useMybUpdateNutritionPlan = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; input: MybUpdateNutritionPlanInput }) => {\n const result = await mybQuery<{ mybUpdateNutritionPlan: MybNutritionPlan }>(\n `mutation MybUpdateNutritionPlan($id: ID!, $input: MybUpdateNutritionPlanInput!) {\n mybUpdateNutritionPlan(id: $id, input: $input) { ${PLAN_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybUpdateNutritionPlan;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.activePlan });\n qc.invalidateQueries({ queryKey: KEY.nutritionPlan(data.id) });\n },\n });\n};\n\nexport const useMybActivateNutritionPlan = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybActivateNutritionPlan: MybNutritionPlan }>(\n `mutation MybActivateNutritionPlan($id: ID!) {\n mybActivateNutritionPlan(id: $id) { ${PLAN_FIELDS} }\n }`,\n { id },\n apiGatewayUrl\n );\n return result.mybActivateNutritionPlan;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.activePlan });\n qc.invalidateQueries({ queryKey: KEY.nutritionPlan(data.id) });\n },\n });\n};\n\nexport const useMybLogMeal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybLogMealInput) => {\n const result = await mybQuery<{ mybLogMeal: MybMealLog }>(\n `mutation MybLogMeal($input: MybLogMealInput!) {\n mybLogMeal(input: $input) { ${MEAL_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybLogMeal;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: KEY.meals });\n qc.invalidateQueries({ queryKey: KEY.dailyMacros });\n if (data.planId) qc.invalidateQueries({ queryKey: KEY.nutritionPlan(data.planId) });\n },\n });\n};\n\nexport const useMybDeleteMeal = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybDeleteMeal: boolean }>(\n `mutation MybDeleteMeal($id: ID!) { mybDeleteMeal(id: $id) }`,\n { id },\n apiGatewayUrl\n );\n return result.mybDeleteMeal;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.meals });\n qc.invalidateQueries({ queryKey: KEY.dailyMacros });\n },\n });\n};\n\n// ============================================================================\n// Body metrics (Progress)\n// ============================================================================\n\nexport interface BodyMetricFilters {\n type?: MybBodyMetricType;\n memberId?: string;\n pagination?: PaginationInput;\n}\n\nexport const useMybBodyMetrics = (filters: BodyMetricFilters = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.bodyMetrics, filters],\n queryFn: async () => {\n const result = await mybQuery<{ mybListBodyMetrics: MybConnection<MybBodyMetric> }>(\n `query MybListBodyMetrics($type: MybBodyMetricType, $memberId: ID, $pagination: PaginationInput) {\n mybListBodyMetrics(type: $type, memberId: $memberId, pagination: $pagination) {\n items { ${METRIC_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n {\n type: filters.type,\n memberId: filters.memberId,\n pagination: filters.pagination ?? DEFAULT_PAGE,\n },\n apiGatewayUrl\n );\n return result.mybListBodyMetrics;\n },\n });\n};\n\nexport const useMybRecordBodyMetric = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybRecordMetricInput) => {\n const result = await mybQuery<{ mybRecordBodyMetric: MybBodyMetric }>(\n `mutation MybRecordBodyMetric($input: MybRecordMetricInput!) {\n mybRecordBodyMetric(input: $input) { ${METRIC_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybRecordBodyMetric;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.bodyMetrics }),\n });\n};\n\n// ============================================================================\n// Recovery (Wellbeing)\n// ============================================================================\n\nexport const useMybRecoveryLogs = (metric?: MybRecoveryMetric, memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.recovery, metric ?? 'all', memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybListRecoveryLogs: MybConnection<MybRecoveryLog> }>(\n `query MybListRecoveryLogs($metric: MybRecoveryMetric, $memberId: ID) {\n mybListRecoveryLogs(metric: $metric, memberId: $memberId) {\n items { ${RECOVERY_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { metric, memberId },\n apiGatewayUrl\n );\n return result.mybListRecoveryLogs;\n },\n });\n};\n\nexport const useMybLogRecovery = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybLogRecoveryInput) => {\n const result = await mybQuery<{ mybLogRecovery: MybRecoveryLog }>(\n `mutation MybLogRecovery($input: MybLogRecoveryInput!) {\n mybLogRecovery(input: $input) { ${RECOVERY_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybLogRecovery;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.recovery }),\n });\n};\n\nconst MINDFULNESS_EXERCISE_FIELDS = `\n id slug title description kind durationSeconds inhaleSeconds holdSeconds\n exhaleSeconds cycles contentSource\n`;\n\nconst MINDFULNESS_SESSION_FIELDS = `\n id workspaceId memberId startedAt completedAt durationSeconds cyclesCompleted createdAt\n exercise { ${MINDFULNESS_EXERCISE_FIELDS} }\n`;\n\nexport const useMybMindfulnessExercises = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.mindfulnessExercises,\n queryFn: async () => {\n const result = await mybQuery<{ mybListMindfulnessExercises: MybMindfulnessExercise[] }>(\n `query MybListMindfulnessExercises { mybListMindfulnessExercises { ${MINDFULNESS_EXERCISE_FIELDS} } }`,\n {},\n apiGatewayUrl\n );\n return result.mybListMindfulnessExercises;\n },\n });\n};\n\nexport const useMybMindfulnessSessions = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.mindfulnessSessions,\n queryFn: async () => {\n const result = await mybQuery<{\n mybListMindfulnessSessions: MybConnection<MybMindfulnessSession>;\n }>(\n `query MybListMindfulnessSessions { mybListMindfulnessSessions { items { ${MINDFULNESS_SESSION_FIELDS} } pageInfo { cursor hasMore } } }`,\n {},\n apiGatewayUrl\n );\n return result.mybListMindfulnessSessions;\n },\n });\n};\n\nexport const useMybCompleteMindfulnessSession = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCompleteMindfulnessSessionInput) => {\n const result = await mybQuery<{ mybCompleteMindfulnessSession: MybMindfulnessSession }>(\n `mutation MybCompleteMindfulnessSession($input: MybCompleteMindfulnessSessionInput!) {\n mybCompleteMindfulnessSession(input: $input) { ${MINDFULNESS_SESSION_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCompleteMindfulnessSession;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.mindfulnessSessions }),\n });\n};\n\n// ============================================================================\n// Coaching (Wellbeing)\n// ============================================================================\n\nexport const useMybCoaching = (status?: MybCoachingStatus, memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.coaching, status ?? 'all', memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybListCoaching: MybConnection<MybCoachingRelationship> }>(\n `query MybListCoaching($status: MybCoachingStatus, $memberId: ID) {\n mybListCoaching(status: $status, memberId: $memberId) {\n items { ${COACHING_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { status, memberId },\n apiGatewayUrl\n );\n return result.mybListCoaching;\n },\n });\n};\n\nexport const useMybCreateCoaching = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybCreateCoachingInput) => {\n const result = await mybQuery<{ mybCreateCoaching: MybCoachingRelationship }>(\n `mutation MybCreateCoaching($input: MybCreateCoachingInput!) {\n mybCreateCoaching(input: $input) { ${COACHING_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybCreateCoaching;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.coaching }),\n });\n};\n\nexport const useMybTransitionCoaching = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { id: string; status: MybCoachingStatus }) => {\n const result = await mybQuery<{ mybTransitionCoaching: MybCoachingRelationship }>(\n `mutation MybTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {\n mybTransitionCoaching(id: $id, status: $status) { ${COACHING_FIELDS} }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybTransitionCoaching;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.coaching }),\n });\n};\n\n// ============================================================================\n// Wearable device integrations (BOFF-4172)\n// ============================================================================\n\nexport const useMybDeviceConnections = (memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.deviceConnections, memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybListDeviceConnections: MybDeviceConnection[] }>(\n `query MybListDeviceConnections($memberId: ID) {\n mybListDeviceConnections(memberId: $memberId) { ${DEVICE_CONNECTION_FIELDS} }\n }`,\n { memberId },\n apiGatewayUrl\n );\n return result.mybListDeviceConnections;\n },\n });\n};\n\nexport const useMybConnectDevice = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: {\n provider: MybDeviceProvider;\n externalAccountId?: string;\n scopes?: string[];\n }) => {\n const result = await mybQuery<{ mybConnectDevice: MybDeviceConnection }>(\n `mutation MybConnectDevice($input: MybConnectDeviceInput!) {\n mybConnectDevice(input: $input) { ${DEVICE_CONNECTION_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybConnectDevice;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.deviceConnections }),\n });\n};\n\nexport const useMybDisconnectDevice = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const result = await mybQuery<{ mybDisconnectDevice: boolean }>(\n `mutation MybDisconnectDevice($id: ID!) { mybDisconnectDevice(id: $id) }`,\n { id },\n apiGatewayUrl\n );\n return result.mybDisconnectDevice;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: KEY.deviceConnections }),\n });\n};\n\nexport interface MybSyncReadingInput {\n metricType: MybWearableMetricType;\n value: number;\n unit?: string;\n recordedAt: string;\n}\n\n/**\n * Sync a batch of readings a native health bridge (Apple HealthKit / Google\n * Health Connect) already pulled on-device. The bridge itself is a Capacitor\n * plugin concern that lives in the app shell (`mybodyshield-app`), not this\n * MFE; this hook is the transport primitive it calls once it has readings to\n * push (BOFF-4172).\n */\nexport const useMybSyncDeviceReadings = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (vars: { connectionId: string; readings: MybSyncReadingInput[] }) => {\n const result = await mybQuery<{ mybSyncDeviceReadings: unknown[] }>(\n `mutation MybSyncDeviceReadings($connectionId: ID!, $readings: [MybSyncReadingInput!]!) {\n mybSyncDeviceReadings(connectionId: $connectionId, readings: $readings) { id }\n }`,\n vars,\n apiGatewayUrl\n );\n return result.mybSyncDeviceReadings;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.deviceConnections });\n qc.invalidateQueries({ queryKey: KEY.recovery });\n qc.invalidateQueries({ queryKey: KEY.bodyMetrics });\n },\n });\n};\n\n// ============================================================================\n// Adaptive guidance (BOFF-4174)\n// ============================================================================\n\nexport const useMybTodayGuidance = (memberId?: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.guidance, memberId ?? 'me'],\n queryFn: async () => {\n const result = await mybQuery<{ mybTodayGuidance: MybTodayGuidance }>(\n `query MybTodayGuidance($memberId: ID) {\n mybTodayGuidance(memberId: $memberId) { ${GUIDANCE_FIELDS} }\n }`,\n { memberId },\n apiGatewayUrl\n );\n return result.mybTodayGuidance;\n },\n // Guidance is derived from the day's logged data; a short stale window\n // avoids refetching on every focus while still catching a fresh log.\n staleTime: 60_000,\n });\n};\n\nexport interface InsightsRange {\n dateRangeStart?: string;\n dateRangeEnd?: string;\n /** Set only for an active coach/member relationship. */\n memberId?: string;\n}\n\nexport const useMybInsights = (range: InsightsRange = {}) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const rangeKey = `${range.dateRangeStart ?? ''}|${range.dateRangeEnd ?? ''}|${range.memberId ?? 'me'}`;\n return useQuery({\n queryKey: KEY.insights(rangeKey),\n queryFn: async () => {\n const result = await mybQuery<{ mybInsights: MybInsights }>(\n `query MybInsights($dateRangeStart: DateTime, $dateRangeEnd: DateTime, $memberId: ID) {\n mybInsights(dateRangeStart: $dateRangeStart, dateRangeEnd: $dateRangeEnd, memberId: $memberId) { ${INSIGHTS_FIELDS} }\n }`,\n {\n dateRangeStart: range.dateRangeStart,\n dateRangeEnd: range.dateRangeEnd,\n memberId: range.memberId,\n },\n apiGatewayUrl\n );\n return result.mybInsights;\n },\n });\n};\n\n// ============================================================================\n// AI controls (BOFF-5949)\n// ============================================================================\n\nexport const useMybAiSettings = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.aiSettings,\n queryFn: async () => {\n const result = await mybQuery<{ mybAiSettings: MybAiSettings }>(\n `query MybAiSettings { mybAiSettings { ${AI_SETTINGS_FIELDS} } }`,\n {},\n apiGatewayUrl\n );\n return result.mybAiSettings;\n },\n });\n};\n\nexport const useMybUpdateAiSettings = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (input: MybUpdateAiSettingsInput) => {\n const result = await mybQuery<{ mybUpdateAiSettings: MybAiSettings }>(\n `mutation MybUpdateAiSettings($input: MybUpdateAiSettingsInput!) {\n mybUpdateAiSettings(input: $input) { ${AI_SETTINGS_FIELDS} }\n }`,\n { input },\n apiGatewayUrl\n );\n return result.mybUpdateAiSettings;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.aiSettings });\n },\n });\n};\n\nexport const useMybAiOperationLogs = (pagination?: PaginationInput) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: [...KEY.aiOperationLogs, pagination ?? DEFAULT_PAGE],\n queryFn: async () => {\n const result = await mybQuery<{ mybListAiOperationLogs: MybAiOperationLogConnection }>(\n `query MybListAiOperationLogs($pagination: PaginationInput) {\n mybListAiOperationLogs(pagination: $pagination) {\n items { ${AI_OPERATION_LOG_FIELDS} }\n pageInfo { cursor hasMore }\n }\n }`,\n { pagination: pagination ?? DEFAULT_PAGE },\n apiGatewayUrl\n );\n return result.mybListAiOperationLogs;\n },\n });\n};\n\n// ============================================================================\n// AI processing consent (BOFF-3838)\n// ============================================================================\n\nexport const useMybAiProcessingConsent = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: KEY.aiConsent,\n queryFn: async () => {\n const result = await mybQuery<{ mybMyAiProcessingConsent: MybAiProcessingConsent }>(\n `query MybMyAiProcessingConsent { mybMyAiProcessingConsent { ${AI_PROCESSING_CONSENT_FIELDS} } }`,\n {},\n apiGatewayUrl\n );\n return result.mybMyAiProcessingConsent;\n },\n });\n};\n\nexport const useMybSetAiProcessingConsent = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (enabled: boolean) => {\n const result = await mybQuery<{ mybSetAiProcessingConsent: MybAiProcessingConsent }>(\n `mutation MybSetAiProcessingConsent($enabled: Boolean!) {\n mybSetAiProcessingConsent(enabled: $enabled) { ${AI_PROCESSING_CONSENT_FIELDS} }\n }`,\n { enabled },\n apiGatewayUrl\n );\n return result.mybSetAiProcessingConsent;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: KEY.aiConsent });\n },\n });\n};\n\n// ============================================================================\n// Food database — Open Food Facts (BOFF-4173)\n// ============================================================================\n\nexport const useMybSearchFoods = (query: string, limit = 10) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const trimmed = query.trim();\n return useQuery({\n queryKey: KEY.foodSearch(trimmed),\n enabled: trimmed.length >= 2,\n queryFn: async () => {\n const result = await mybQuery<{ mybSearchFoods: MybFood[] }>(\n `query MybSearchFoods($query: String!, $limit: Int) {\n mybSearchFoods(query: $query, limit: $limit) { ${FOOD_FIELDS} }\n }`,\n { query: trimmed, limit },\n apiGatewayUrl\n );\n return result.mybSearchFoods;\n },\n staleTime: 30_000,\n });\n};\n\nexport const useMybFoodByBarcode = () => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useMutation({\n mutationFn: async (barcode: string) => {\n const result = await mybQuery<{ mybFoodByBarcode: MybFood | null }>(\n `query MybFoodByBarcode($barcode: String!) {\n mybFoodByBarcode(barcode: $barcode) { ${FOOD_FIELDS} }\n }`,\n { barcode },\n apiGatewayUrl\n );\n return result.mybFoodByBarcode;\n },\n });\n};\n"],"mappings":";;;;;AAwFA,IAAMA,UAAqC;CACzC,IAAMC,IAAI;CAGV,AAFAA,EAAE,6BAA6B,MAAM,GACrCA,EAAE,gCAAgC,MAAM,GACxCA,EAAE,4BAA4B,MAAM;AACtC,GAEMC,IAAW,OACf,GACA,GACA,MACmB;CACnB,IAAMC,IAAW,MAAMC,EAAoB;EACzC,SAAS;EACT;EACA;EACA;EACA,gBAAgB;CAClB,CAAC;CAED,IAAID,EAAS,QAAQ,QACnB,MAAU,MAAMA,EAAS,OAAO,EAAE,EAAE,WAAW,wBAAwB;CAEzE,IAAI,CAACA,EA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6B,OAC5F,CAAC,GACDW,CACF,EAAA,CACc;CAElB,CAAC;AACH,GAEaoE,WAAqC;CAChD,IAAM,EAAE,qBAAkBvE,EAAgB,GACpCe,IAAKC,EAAe;CAC1B,OAAOC,EAAY;EACjB,YAAY,OAAO,OAQV,MAPclD,EACnB;2DACmDyB,EAA6B;YAEhF,EAAE,WAAQ,GACVW,CACF,EAAA,CACc;EAEhB,iBAAiB;GACf,EAAG,kBAAkB,EAAE,UAAUhC,EAAI,UAAU,CAAC;EAClD;CACF,CAAC;AACH,GAMaqG,MAAqB,GAAe,IAAQ,OAAO;CAC9D,IAAM,EAAE,qBAAkBxE,EAAgB,GACpC8B,IAAU5D,EAAM,KAAK;CAC3B,OAAO+B,EAAS;EACd,UAAU9B,EAAI,WAAW2D,CAAO;EAChC,SAASA,EAAQ,UAAU;EAC3B,SAAS,aAQA,MAPc/D,EACnB;2DACmD0B,EAAY;YAE/D;GAAE,OAAOqC;GAAS;EAAM,GACxB3B,CACF,EAAA,CACc;EAEhB,WAAW;CACb,CAAC;AACH,GAEasE,WAA4B;CACvC,IAAM,EAAE,qBAAkBzE,EAAgB;CAC1C,OAAOiB,EAAY,EACjB,YAAY,OAAO,OAQV,MAPclD,EACnB;kDAC0C0B,EAAY;YAEtD,EAAE,WAAQ,GACVU,CACF,EAAA,CACc,iBAElB,CAAC;AACH"}
@@ -2,7 +2,7 @@ import { useMyBodyShield as e } from "../context/MyBodyShieldContext.js";
2
2
  import "../context/index.js";
3
3
  import { wspaceFetch as t } from "./useMybFiles.js";
4
4
  import { useMutation as n, useQuery as r, useQueryClient as i } from "@tanstack/react-query";
5
- //#region src/mybodyshield/hooks/useMybComments.ts
5
+ // src/mybodyshield/hooks/useMybComments.ts
6
6
  var a = (e, t) => [
7
7
  "mybodyshield",
8
8
  "comments",
@@ -39,7 +39,6 @@ var a = (e, t) => [
39
39
  }
40
40
  });
41
41
  };
42
- //#endregion
43
42
  export { o as useMybComments, s as useMybCreateComment };
44
43
 
45
44
  //# sourceMappingURL=useMybComments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMybComments.js","names":[],"sources":["../../../src/mybodyshield/hooks/useMybComments.ts"],"sourcesContent":["/**\n * MyBodyShield — wspace-conversations-svc EntityComment REUSE hooks (Integration B).\n * @module mybodyshield/hooks/useMybComments\n *\n * Adds a discussion surface to mybodyshield entities WITHOUT any mybodyshield-svc change by\n * reusing the generic EntityComment API composed into the WORKSPACE supergraph.\n * Comments attach to any entity by `(entityType, entityId)`:\n * - `getEntityComments(input): EntityCommentConnection!`\n * - `createEntityComment(input): EntityComment!`\n *\n * Transport reuses `wspaceFetch` from `useMybFiles` (workspace gateway +\n * workspace token). Lives in a separate file; `useMyBodyShieldApi.ts` is\n * untouched.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { useMyBodyShield } from '../context';\nimport { wspaceFetch } from './useMybFiles';\n\nexport interface MybComment {\n id: string;\n authorId: string;\n authorType: string;\n content: {\n text: string | null;\n markdown: string | null;\n };\n createdAt: string;\n edited: boolean;\n parentCommentId: string | null;\n replyCount: number;\n}\n\nconst commentsKey = (entityType: string, entityId: string) =>\n ['mybodyshield', 'comments', entityType, entityId] as const;\n\n/** Top-level (root) comments for an mybodyshield entity, oldest first. */\nexport const useMybComments = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: commentsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{\n getEntityComments: { items: MybComment[]; total: number };\n }>(\n `query MybGetEntityComments($input: GetCommentsInput!) {\n getEntityComments(input: $input) {\n total\n items {\n id\n authorId\n authorType\n content { text markdown }\n createdAt\n edited\n parentCommentId\n replyCount\n }\n }\n }`,\n {\n input: {\n entityType,\n entityId,\n take: 100,\n parentCommentId: null,\n },\n },\n apiGatewayUrl\n );\n // Render root comments oldest-first (server order is not guaranteed).\n const roots = data.getEntityComments.items.filter((c) => !c.parentCommentId);\n roots.sort((a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime());\n return { items: roots, total: data.getEntityComments.total };\n },\n });\n};\n\nexport const useMybCreateComment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (text: string) => {\n const data = await wspaceFetch<{ createEntityComment: { id: string } }>(\n `mutation MybCreateEntityComment($input: CreateEntityCommentInput!) {\n createEntityComment(input: $input) { id }\n }`,\n {\n input: {\n entityType,\n entityId,\n content: { text },\n },\n },\n apiGatewayUrl\n );\n return data.createEntityComment;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: commentsKey(entityType, entityId) });\n },\n });\n};\n"],"mappings":";;;;;AAkCA,IAAM,KAAe,GAAoB,MACvC;CAAC;CAAgB;CAAY;CAAY;CAAS,EAGvC,KAAkB,GAAoB,MAAiC;CAClF,IAAM,EAAE,qBAAkB,GAAiB;AAC3C,QAAO,EAAS;EACd,UAAU,EAAY,GAAY,KAAY,GAAG;EACjD,SAAS,EAAQ;EACjB,SAAS,YAAY;GACnB,IAAM,IAAO,MAAM,EAGjB,6YAeA,EACE,OAAO;IACL;IACA;IACA,MAAM;IACN,iBAAiB;IAClB,EACF,EACD,EACD,EAEK,IAAQ,EAAK,kBAAkB,MAAM,QAAQ,MAAM,CAAC,EAAE,gBAAgB;AAE5E,UADA,EAAM,MAAM,GAAG,MAAM,IAAI,KAAK,EAAE,UAAU,CAAC,SAAS,GAAG,IAAI,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,EAChF;IAAE,OAAO;IAAO,OAAO,EAAK,kBAAkB;IAAO;;EAE/D,CAAC;GAGS,KAAuB,GAAoB,MAAqB;CAC3E,IAAM,EAAE,qBAAkB,GAAiB,EACrC,IAAK,GAAgB;AAC3B,QAAO,EAAY;EACjB,YAAY,OAAO,OACJ,MAAM,EACjB,wIAGA,EACE,OAAO;GACL;GACA;GACA,SAAS,EAAE,SAAM;GAClB,EACF,EACD,EACD,EACW;EAEd,iBAAiB;AACf,KAAG,kBAAkB,EAAE,UAAU,EAAY,GAAY,EAAS,EAAE,CAAC;;EAExE,CAAC"}
1
+ {"version":3,"file":"useMybComments.js","names":["commentsKey","entityType","entityId","useMybComments","useMyBodyShield","useQuery","data","wspaceFetch","apiGatewayUrl","roots","c","a","b","useMybCreateComment","qc","useQueryClient","useMutation"],"sources":["../../../src/mybodyshield/hooks/useMybComments.ts"],"sourcesContent":["/**\n * MyBodyShield — wspace-conversations-svc EntityComment REUSE hooks (Integration B).\n * @module mybodyshield/hooks/useMybComments\n *\n * Adds a discussion surface to mybodyshield entities WITHOUT any mybodyshield-svc change by\n * reusing the generic EntityComment API composed into the WORKSPACE supergraph.\n * Comments attach to any entity by `(entityType, entityId)`:\n * - `getEntityComments(input): EntityCommentConnection!`\n * - `createEntityComment(input): EntityComment!`\n *\n * Transport reuses `wspaceFetch` from `useMybFiles` (workspace gateway +\n * workspace token). Lives in a separate file; `useMyBodyShieldApi.ts` is\n * untouched.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { useMyBodyShield } from '../context';\nimport { wspaceFetch } from './useMybFiles';\n\nexport interface MybComment {\n id: string;\n authorId: string;\n authorType: string;\n content: {\n text: string | null;\n markdown: string | null;\n };\n createdAt: string;\n edited: boolean;\n parentCommentId: string | null;\n replyCount: number;\n}\n\nconst commentsKey = (entityType: string, entityId: string) =>\n ['mybodyshield', 'comments', entityType, entityId] as const;\n\n/** Top-level (root) comments for an mybodyshield entity, oldest first. */\nexport const useMybComments = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: commentsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{\n getEntityComments: { items: MybComment[]; total: number };\n }>(\n `query MybGetEntityComments($input: GetCommentsInput!) {\n getEntityComments(input: $input) {\n total\n items {\n id\n authorId\n authorType\n content { text markdown }\n createdAt\n edited\n parentCommentId\n replyCount\n }\n }\n }`,\n {\n input: {\n entityType,\n entityId,\n take: 100,\n parentCommentId: null,\n },\n },\n apiGatewayUrl\n );\n // Render root comments oldest-first (server order is not guaranteed).\n const roots = data.getEntityComments.items.filter((c) => !c.parentCommentId);\n roots.sort((a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime());\n return { items: roots, total: data.getEntityComments.total };\n },\n });\n};\n\nexport const useMybCreateComment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (text: string) => {\n const data = await wspaceFetch<{ createEntityComment: { id: string } }>(\n `mutation MybCreateEntityComment($input: CreateEntityCommentInput!) {\n createEntityComment(input: $input) { id }\n }`,\n {\n input: {\n entityType,\n entityId,\n content: { text },\n },\n },\n apiGatewayUrl\n );\n return data.createEntityComment;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: commentsKey(entityType, entityId) });\n },\n });\n};\n"],"mappings":";;;;;AAkCA,IAAMA,KAAe,GAAoB,MACvC;CAAC;CAAgB;CAAYC;CAAYC;AAAQ,GAGtCC,KAAkB,GAAoB,MAAiC;CAClF,IAAM,EAAE,qBAAkBC,EAAgB;CAC1C,OAAOC,EAAS;EACd,UAAUL,EAAYC,GAAYC,KAAY,EAAE;EAChD,SAAS,EAAQA;EACjB,SAAS,YAAY;GACnB,IAAMI,IAAO,MAAMC,EAGjB,6YAeA,EACE,OAAO;IACL;IACA;IACA,MAAM;IACN,iBAAiB;GACnB,EACF,GACAC,CACF,GAEMC,IAAQH,EAAK,kBAAkB,MAAM,QAAQ,MAAM,CAACI,EAAE,eAAe;GAE3E,OADAD,EAAM,MAAM,GAAG,MAAM,IAAI,KAAKE,EAAE,SAAS,CAAC,CAAC,QAAQ,IAAI,IAAI,KAAKC,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,GAC/E;IAAE,OAAOH;IAAO,OAAOH,EAAK,kBAAkB;GAAM;EAC7D;CACF,CAAC;AACH,GAEaO,KAAuB,GAAoB,MAAqB;CAC3E,IAAM,EAAE,qBAAkBT,EAAgB,GACpCU,IAAKC,EAAe;CAC1B,OAAOC,EAAY;EACjB,YAAY,OAAO,OAcV,MAbYT,EACjB,wIAGA,EACE,OAAO;GACL;GACA;GACA,SAAS,EAAE,QAAK;EAClB,EACF,GACAC,CACF,EAAA,CACY;EAEd,iBAAiB;GACf,EAAG,kBAAkB,EAAE,UAAUR,EAAYC,GAAYC,CAAQ,EAAE,CAAC;EACtE;CACF,CAAC;AACH"}
@@ -3,7 +3,7 @@ import "../context/index.js";
3
3
  import { useCallback as t, useState as n } from "react";
4
4
  import { useQuery as r } from "@tanstack/react-query";
5
5
  import { graphqlFetch as i } from "@burdenoff/fe-libs/shared/graphql";
6
- //#region src/mybodyshield/hooks/useMybFiles.ts
6
+ // src/mybodyshield/hooks/useMybFiles.ts
7
7
  var a = () => {
8
8
  let e = globalThis;
9
9
  e.__graphqlFetchResponseCache?.clear(), e.__graphqlFetchPendingResponses?.clear(), e.__boffGraphQLResponseCache?.clear();
@@ -75,7 +75,6 @@ var c = () => {
75
75
  queryFn: async () => (await o("query MybGetFile($id: ID!) {\n getFile(id: $id) {\n id\n name\n downloadUrl\n mimeType\n size\n }\n }", { id: t }, n)).getFile
76
76
  });
77
77
  };
78
- //#endregion
79
78
  export { l as useMybFile, c as useMybFileUpload, o as wspaceFetch };
80
79
 
81
80
  //# sourceMappingURL=useMybFiles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMybFiles.js","names":[],"sources":["../../../src/mybodyshield/hooks/useMybFiles.ts"],"sourcesContent":["/**\n * MyBodyShield — wspace-files-svc REUSE hooks (Integration A).\n * @module mybodyshield/hooks/useMybFiles\n *\n * Reuses the platform file store (`wspace-files-svc`) WITHOUT any mybodyshield-svc\n * change: the eco schema already exposes `MybObservation.evidenceFileId` /\n * `MybReport.fileId`; this module lets the UI actually produce a `fileId` via\n * the canonical 3-step upload flow composed into the WORKSPACE supergraph:\n * 1. `initiateUpload(input)` → `{ uploadUrl, session { id } }`\n * 2. HTTP `PUT` the bytes to the returned signed `uploadUrl`\n * 3. `completeUpload(input: { sessionId })` → `{ fileId }`\n * plus `getFile(id)` to resolve an existing evidence/report file's name + URL.\n *\n * Transport mirrors `useMyBodyShieldApi` exactly — `graphqlFetch({ gateway:\n * 'workspace', workspaceToken: true })` — so no ApolloProvider is required.\n * These hooks live in a SEPARATE file by design; `useMyBodyShieldApi.ts` is\n * left untouched.\n */\n\nimport { useCallback, useState } from 'react';\nimport { useQuery } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useMyBodyShield } from '../context';\n\n// ============================================================================\n// Shared workspace-gateway transport (reused by the comments + tags hooks too)\n// ============================================================================\n\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in a short-lived in-memory\n * cache. After a write we drop those caches so the invalidation refetch that\n * follows reads fresh data (same remedy `useMyBodyShieldApi` applies).\n */\nconst clearGraphqlReadCaches = (): void => {\n const g = globalThis as GraphqlReadCacheGlobals;\n g.__graphqlFetchResponseCache?.clear();\n g.__graphqlFetchPendingResponses?.clear();\n g.__boffGraphQLResponseCache?.clear();\n};\n\n/** Execute a workspace-gateway GraphQL operation with the workspace token. */\nexport const wspaceFetch = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n baseUrl,\n query,\n variables,\n workspaceToken: true,\n });\n\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n if (/^\\s*mutation\\b/.test(query)) {\n clearGraphqlReadCaches();\n }\n return response.data;\n};\n\n// ============================================================================\n// File upload (initiate → PUT → complete)\n// ============================================================================\n\nexport interface UploadedMybFile {\n fileId: string;\n fileName: string;\n}\n\n/** `PUT` the blob to the signed URL, reporting byte-progress via `onProgress`. */\nfunction putWithProgress(\n url: string,\n file: File,\n contentType: string,\n onProgress: (percent: number) => void\n): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open('PUT', url);\n xhr.setRequestHeader('Content-Type', contentType);\n xhr.upload.onprogress = (event) => {\n if (event.lengthComputable) {\n onProgress(Math.round((event.loaded / event.total) * 100));\n }\n };\n xhr.onload = () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve();\n } else {\n reject(new Error(`File storage rejected the upload (HTTP ${xhr.status}).`));\n }\n };\n xhr.onerror = () => reject(new Error('Network error while uploading the file.'));\n xhr.onabort = () => reject(new Error('The upload was cancelled.'));\n xhr.send(file);\n });\n}\n\nexport interface UseMybFileUploadResult {\n upload: (file: File) => Promise<UploadedMybFile>;\n isUploading: boolean;\n /** 0–100 byte-progress of the signed-URL PUT. */\n progress: number;\n error: string | null;\n reset: () => void;\n}\n\n/**\n * Imperative upload hook: `await upload(file)` runs the platform 3-step flow and\n * resolves to `{ fileId, fileName }`. `fileId` is what the eco mutations accept\n * (`MybRecordMetricInput.photoFileId`, `MybCreateExerciseInput.demoFileId`).\n */\nexport const useMybFileUpload = (): UseMybFileUploadResult => {\n const { apiGatewayUrl } = useMyBodyShield();\n const [isUploading, setIsUploading] = useState(false);\n const [progress, setProgress] = useState(0);\n const [error, setError] = useState<string | null>(null);\n\n const reset = useCallback(() => {\n setIsUploading(false);\n setProgress(0);\n setError(null);\n }, []);\n\n const upload = useCallback(\n async (file: File): Promise<UploadedMybFile> => {\n setIsUploading(true);\n setProgress(0);\n setError(null);\n try {\n const dotIndex = file.name.lastIndexOf('.');\n const extension = dotIndex > -1 ? file.name.slice(dotIndex + 1) : '';\n const mimeType = file.type || 'application/octet-stream';\n\n // 1. initiate\n const initiated = await wspaceFetch<{\n initiateUpload: { uploadUrl: string | null; session: { id: string } };\n }>(\n `mutation MybInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n uploadUrl\n session { id }\n }\n }`,\n {\n input: {\n fileName: file.name,\n extension,\n mimeType,\n fileSize: String(file.size),\n visibility: 'WORKSPACE',\n },\n },\n apiGatewayUrl\n );\n\n const { uploadUrl } = initiated.initiateUpload;\n const sessionId = initiated.initiateUpload.session.id;\n if (!uploadUrl) {\n throw new Error('The file service did not return an upload URL.');\n }\n\n // 2. PUT the bytes\n await putWithProgress(uploadUrl, file, mimeType, setProgress);\n\n // 3. complete\n const completed = await wspaceFetch<{\n completeUpload: { fileId: string; file: { id: string; name: string } | null };\n }>(\n `mutation MybCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) {\n fileId\n file { id name }\n }\n }`,\n { input: { sessionId } },\n apiGatewayUrl\n );\n\n setProgress(100);\n return {\n fileId: completed.completeUpload.fileId,\n fileName: completed.completeUpload.file?.name ?? file.name,\n };\n } catch (err) {\n const message = err instanceof Error ? err.message : 'The file could not be uploaded.';\n setError(message);\n throw err instanceof Error ? err : new Error(message);\n } finally {\n setIsUploading(false);\n }\n },\n [apiGatewayUrl]\n );\n\n return { upload, isUploading, progress, error, reset };\n};\n\n// ============================================================================\n// Resolve an existing file (name + download URL) for rendering evidence links\n// ============================================================================\n\nexport interface MybFileMeta {\n id: string;\n name: string;\n downloadUrl: string | null;\n mimeType: string;\n size: string;\n}\n\nexport const useMybFile = (id: string | null | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: ['mybodyshield', 'file', id ?? ''],\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await wspaceFetch<{ getFile: MybFileMeta | null }>(\n `query MybGetFile($id: ID!) {\n getFile(id: $id) {\n id\n name\n downloadUrl\n mimeType\n size\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.getFile;\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lFetch","query","putWithProgress","xhr","url","contentType","event","onProgress","resolve","reject","file","useMybFileUpload","useMyBodyShield","isUploading","setIsUploading","useState","progress","setProgress","error","setError","reset","useCallback","dotIndex","extension","mimeType","initiated","apiGatewayUrl","sessionId","uploadUrl","completed","err","message","useMybFile","useQuery","id"],"sources":["../../../src/mybodyshield/hooks/useMybFiles.ts"],"sourcesContent":["/**\n * MyBodyShield — wspace-files-svc REUSE hooks (Integration A).\n * @module mybodyshield/hooks/useMybFiles\n *\n * Reuses the platform file store (`wspace-files-svc`) WITHOUT any mybodyshield-svc\n * change: the eco schema already exposes `MybObservation.evidenceFileId` /\n * `MybReport.fileId`; this module lets the UI actually produce a `fileId` via\n * the canonical 3-step upload flow composed into the WORKSPACE supergraph:\n * 1. `initiateUpload(input)` → `{ uploadUrl, session { id } }`\n * 2. HTTP `PUT` the bytes to the returned signed `uploadUrl`\n * 3. `completeUpload(input: { sessionId })` → `{ fileId }`\n * plus `getFile(id)` to resolve an existing evidence/report file's name + URL.\n *\n * Transport mirrors `useMyBodyShieldApi` exactly — `graphqlFetch({ gateway:\n * 'workspace', workspaceToken: true })` — so no ApolloProvider is required.\n * These hooks live in a SEPARATE file by design; `useMyBodyShieldApi.ts` is\n * left untouched.\n */\n\nimport { useCallback, useState } from 'react';\nimport { useQuery } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useMyBodyShield } from '../context';\n\n// ============================================================================\n// Shared workspace-gateway transport (reused by the comments + tags hooks too)\n// ============================================================================\n\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in a short-lived in-memory\n * cache. After a write we drop those caches so the invalidation refetch that\n * follows reads fresh data (same remedy `useMyBodyShieldApi` applies).\n */\nconst clearGraphqlReadCaches = (): void => {\n const g = globalThis as GraphqlReadCacheGlobals;\n g.__graphqlFetchResponseCache?.clear();\n g.__graphqlFetchPendingResponses?.clear();\n g.__boffGraphQLResponseCache?.clear();\n};\n\n/** Execute a workspace-gateway GraphQL operation with the workspace token. */\nexport const wspaceFetch = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n baseUrl,\n query,\n variables,\n workspaceToken: true,\n });\n\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n if (/^\\s*mutation\\b/.test(query)) {\n clearGraphqlReadCaches();\n }\n return response.data;\n};\n\n// ============================================================================\n// File upload (initiate → PUT → complete)\n// ============================================================================\n\nexport interface UploadedMybFile {\n fileId: string;\n fileName: string;\n}\n\n/** `PUT` the blob to the signed URL, reporting byte-progress via `onProgress`. */\nfunction putWithProgress(\n url: string,\n file: File,\n contentType: string,\n onProgress: (percent: number) => void\n): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open('PUT', url);\n xhr.setRequestHeader('Content-Type', contentType);\n xhr.upload.onprogress = (event) => {\n if (event.lengthComputable) {\n onProgress(Math.round((event.loaded / event.total) * 100));\n }\n };\n xhr.onload = () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve();\n } else {\n reject(new Error(`File storage rejected the upload (HTTP ${xhr.status}).`));\n }\n };\n xhr.onerror = () => reject(new Error('Network error while uploading the file.'));\n xhr.onabort = () => reject(new Error('The upload was cancelled.'));\n xhr.send(file);\n });\n}\n\nexport interface UseMybFileUploadResult {\n upload: (file: File) => Promise<UploadedMybFile>;\n isUploading: boolean;\n /** 0–100 byte-progress of the signed-URL PUT. */\n progress: number;\n error: string | null;\n reset: () => void;\n}\n\n/**\n * Imperative upload hook: `await upload(file)` runs the platform 3-step flow and\n * resolves to `{ fileId, fileName }`. `fileId` is what the eco mutations accept\n * (`MybRecordMetricInput.photoFileId`, `MybCreateExerciseInput.demoFileId`).\n */\nexport const useMybFileUpload = (): UseMybFileUploadResult => {\n const { apiGatewayUrl } = useMyBodyShield();\n const [isUploading, setIsUploading] = useState(false);\n const [progress, setProgress] = useState(0);\n const [error, setError] = useState<string | null>(null);\n\n const reset = useCallback(() => {\n setIsUploading(false);\n setProgress(0);\n setError(null);\n }, []);\n\n const upload = useCallback(\n async (file: File): Promise<UploadedMybFile> => {\n setIsUploading(true);\n setProgress(0);\n setError(null);\n try {\n const dotIndex = file.name.lastIndexOf('.');\n const extension = dotIndex > -1 ? file.name.slice(dotIndex + 1) : '';\n const mimeType = file.type || 'application/octet-stream';\n\n // 1. initiate\n const initiated = await wspaceFetch<{\n initiateUpload: { uploadUrl: string | null; session: { id: string } };\n }>(\n `mutation MybInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n uploadUrl\n session { id }\n }\n }`,\n {\n input: {\n fileName: file.name,\n extension,\n mimeType,\n fileSize: String(file.size),\n visibility: 'WORKSPACE',\n },\n },\n apiGatewayUrl\n );\n\n const { uploadUrl } = initiated.initiateUpload;\n const sessionId = initiated.initiateUpload.session.id;\n if (!uploadUrl) {\n throw new Error('The file service did not return an upload URL.');\n }\n\n // 2. PUT the bytes\n await putWithProgress(uploadUrl, file, mimeType, setProgress);\n\n // 3. complete\n const completed = await wspaceFetch<{\n completeUpload: { fileId: string; file: { id: string; name: string } | null };\n }>(\n `mutation MybCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) {\n fileId\n file { id name }\n }\n }`,\n { input: { sessionId } },\n apiGatewayUrl\n );\n\n setProgress(100);\n return {\n fileId: completed.completeUpload.fileId,\n fileName: completed.completeUpload.file?.name ?? file.name,\n };\n } catch (err) {\n const message = err instanceof Error ? err.message : 'The file could not be uploaded.';\n setError(message);\n throw err instanceof Error ? err : new Error(message);\n } finally {\n setIsUploading(false);\n }\n },\n [apiGatewayUrl]\n );\n\n return { upload, isUploading, progress, error, reset };\n};\n\n// ============================================================================\n// Resolve an existing file (name + download URL) for rendering evidence links\n// ============================================================================\n\nexport interface MybFileMeta {\n id: string;\n name: string;\n downloadUrl: string | null;\n mimeType: string;\n size: string;\n}\n\nexport const useMybFile = (id: string | null | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: ['mybodyshield', 'file', id ?? ''],\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await wspaceFetch<{ getFile: MybFileMeta | null }>(\n `query MybGetFile($id: ID!) {\n getFile(id: $id) {\n id\n name\n downloadUrl\n mimeType\n size\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.getFile;\n },\n });\n};\n"],"mappings":";;;;;;AAwCA,IAAMA,UAAqC;CACzC,IAAMC,IAAI;CAGV,AAFAA,EAAE,6BAA6B,MAAM,GACrCA,EAAE,gCAAgC,MAAM,GACxCA,EAAE,4BAA4B,MAAM;AACtC,GAGaC,IAAc,OACzB,GACA,GACA,MACmB;CACnB,IAAMC,IAAW,MAAMC,EAAoB;EACzC,SAAS;EACT;EACA;EACA;EACA,gBAAgB;CAClB,CAAC;CAED,IAAID,EAAS,QAAQ,QACnB,MAAU,MAAMA,EAAS,OAAO,EAAE,EAAE,WAAW,wBAAwB;CAEzE,IAAI,CAACA,EAAS,MACZ,MAAU,MAAM,uCAAuC;CAKzD,OAHI,iBAAiB,KAAKE,CAAK,KAC7BL,EAAuB,GAElBG,EAAS;AAClB;AAYA,SAASG,EACP,GACA,GACA,GACA,GACe;CACf,OAAO,IAAI,SAAe,GAAS,MAAW;EAC5C,IAAMC,IAAM,IAAI,eAAe;EAiB/B,AAhBAA,EAAI,KAAK,OAAOC,CAAG,GACnBD,EAAI,iBAAiB,gBAAgBE,CAAW,GAChD,EAAI,OAAO,cAAc,MAAU;GACjC,AAAIC,EAAM,oBACRC,EAAW,KAAK,MAAOD,EAAM,SAASA,EAAM,QAAS,GAAG,CAAC;EAE7D,GACA,EAAI,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AAY,GAAG,GACR;KACL,QAAQY,EAAU,eAAe;KACjC,UAAUA,EAAU,eAAe,MAAM,QAAQnB,EAAK;IACxD;GACF,SAASoB,GAAK;IACZ,IAAMC,IAAUD,aAAe,QAAQA,EAAI,UAAU;IAErD,MADAX,EAASY,CAAO,GACVD,aAAe,QAAQA,IAAU,MAAMC,CAAO;GACtD,UAAU;IACR,EAAe,EAAK;GACtB;EACF,GACA,CAACL,CAAa,CAGP;EAAQ;EAAa;EAAU;EAAO;CAAM;AACvD,GAcaM,KAAc,MAAkC;CAC3D,IAAM,EAAE,qBAAkBpB,EAAgB;CAC1C,OAAOqB,EAAS;EACd,UAAU;GAAC;GAAgB;GAAQC,KAAM;EAAE;EAC3C,SAAS,EAAQA;EACjB,SAAS,aAcA,MAbYpC,EACjB,yLASA,EAAE,MAAG,GACL4B,CACF,EAAA,CACY;CAEhB,CAAC;AACH"}
@@ -2,7 +2,7 @@ import { useMyBodyShield as e } from "../context/MyBodyShieldContext.js";
2
2
  import "../context/index.js";
3
3
  import { wspaceFetch as t } from "./useMybFiles.js";
4
4
  import { useMutation as n, useQuery as r, useQueryClient as i } from "@tanstack/react-query";
5
- //#region src/mybodyshield/hooks/useMybTags.ts
5
+ // src/mybodyshield/hooks/useMybTags.ts
6
6
  var a = "mybodyshield", o = (e, t) => [
7
7
  "mybodyshield",
8
8
  "entity-tags",
@@ -69,21 +69,20 @@ var a = "mybodyshield", o = (e, t) => [
69
69
  mutationFn: async (e) => {
70
70
  let n = e.trim();
71
71
  if (!n) throw Error("A tag label is required.");
72
- let i = await t("mutation MybCreateTag($input: CreateTagInput!) {\n createTag(input: $input) { id }\n }", { input: {
73
- vocabularyId: await p(s),
74
- key: `${c(n)}-${Math.random().toString(36).slice(2, 6)}`,
72
+ let i = await p(s), o = `${c(n)}-${Math.random().toString(36).slice(2, 6)}`, l = await t("mutation MybCreateTag($input: CreateTagInput!) {\n createTag(input: $input) { id }\n }", { input: {
73
+ vocabularyId: i,
74
+ key: o,
75
75
  label: n
76
76
  } }, s);
77
77
  return await t("mutation MybAssignCreatedTag($input: AssignTagInput!) {\n assignTag(input: $input) { id }\n }", { input: {
78
78
  entityType: r,
79
79
  entityId: a,
80
- tagId: i.createTag.id
81
- } }, s), i.createTag;
80
+ tagId: l.createTag.id
81
+ } }, s), l.createTag;
82
82
  },
83
83
  onSuccess: () => l.invalidateQueries({ queryKey: o(r, a) })
84
84
  });
85
85
  };
86
- //#endregion
87
86
  export { d as useMybAssignTag, m as useMybCreateAndAssignTag, l as useMybEntityTags, f as useMybRemoveTagAssignment, u as useMybTagSearch };
88
87
 
89
88
  //# sourceMappingURL=useMybTags.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMybTags.js","names":[],"sources":["../../../src/mybodyshield/hooks/useMybTags.ts"],"sourcesContent":["/**\n * MyBodyShield — wspace-tags-svc UniversalTag REUSE hooks (Integration C).\n * @module mybodyshield/hooks/useMybTags\n *\n * The mybodyshield svc does NOT expose a tags field, so we drive the platform tag\n * assignment store directly (approach (b) in the reuse audit) — no mybodyshield-svc\n * change. All operations are composed into the WORKSPACE supergraph:\n * - `getEntityTags(entityType, entityId)` → current assignments (display)\n * - `searchTags(query)` → pick an existing tag\n * - `createTag(input)` → create a new tag (needs a vocabulary)\n * - `assignTag(input)` → link tag ↔ entity\n * - `removeTagAssignment(id)` → unlink\n *\n * `createTag` requires a `vocabularyId`; we resolve a stable, workspace-scoped\n * \"mybodyshield\" vocabulary (`getVocabularyByKey`, creating it on first use).\n *\n * Transport reuses `wspaceFetch` from `useMybFiles`. Lives in a separate file;\n * `useMyBodyShieldApi.ts` is untouched.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { useMyBodyShield } from '../context';\nimport { wspaceFetch } from './useMybFiles';\n\nexport interface MybTag {\n id: string;\n label: string;\n color: string | null;\n key: string;\n}\n\nexport interface MybTagAssignment {\n id: string;\n tag: MybTag;\n}\n\nconst MYB_VOCABULARY_KEY = 'mybodyshield';\n\nconst entityTagsKey = (entityType: string, entityId: string) =>\n ['mybodyshield', 'entity-tags', entityType, entityId] as const;\n\nconst TAG_FIELDS = 'id label color key';\n\nconst slugify = (value: string): string =>\n value\n .toLowerCase()\n .trim()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n .slice(0, 48) || 'tag';\n\n/** Current tag assignments for an mybodyshield entity. */\nexport const useMybEntityTags = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: entityTagsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{ getEntityTags: MybTagAssignment[] }>(\n `query MybGetEntityTags($entityType: String!, $entityId: ID!) {\n getEntityTags(entityType: $entityType, entityId: $entityId) {\n id\n tag { ${TAG_FIELDS} }\n }\n }`,\n { entityType, entityId },\n apiGatewayUrl\n );\n return data.getEntityTags;\n },\n });\n};\n\n/** Search existing tags (enabled only for a non-empty query). */\nexport const useMybTagSearch = (query: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const trimmed = query.trim();\n return useQuery({\n queryKey: ['mybodyshield', 'tag-search', trimmed],\n enabled: trimmed.length > 0,\n queryFn: async () => {\n const data = await wspaceFetch<{ searchTags: MybTag[] }>(\n `query MybSearchTags($query: String!, $limit: Int) {\n searchTags(query: $query, limit: $limit) { ${TAG_FIELDS} }\n }`,\n { query: trimmed, limit: 8 },\n apiGatewayUrl\n );\n return data.searchTags;\n },\n });\n};\n\n/** Assign an existing tag to the entity. */\nexport const useMybAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (tagId: string) => {\n const data = await wspaceFetch<{ assignTag: { id: string } }>(\n `mutation MybAssignTag($input: AssignTagInput!) {\n assignTag(input: $input) { id }\n }`,\n { input: { entityType, entityId, tagId } },\n apiGatewayUrl\n );\n return data.assignTag;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\n/** Remove a tag assignment by its assignment id. */\nexport const useMybRemoveTagAssignment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (assignmentId: string) => {\n const data = await wspaceFetch<{ removeTagAssignment: boolean }>(\n `mutation MybRemoveTagAssignment($id: ID!) {\n removeTagAssignment(id: $id)\n }`,\n { id: assignmentId },\n apiGatewayUrl\n );\n return data.removeTagAssignment;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\n/** Resolve (creating on first use) the workspace-scoped \"mybodyshield\" vocabulary. */\nconst resolveMybVocabularyId = async (baseUrl?: string): Promise<string> => {\n const existing = await wspaceFetch<{ getVocabularyByKey: { id: string } | null }>(\n `query MybGetVocabulary($key: String!) {\n getVocabularyByKey(key: $key) { id }\n }`,\n { key: MYB_VOCABULARY_KEY },\n baseUrl\n );\n if (existing.getVocabularyByKey?.id) {\n return existing.getVocabularyByKey.id;\n }\n const created = await wspaceFetch<{ createVocabulary: { id: string } }>(\n `mutation MybCreateVocabulary($input: CreateVocabularyInput!) {\n createVocabulary(input: $input) { id }\n }`,\n {\n input: {\n key: MYB_VOCABULARY_KEY,\n name: 'MyBodyShield',\n description: 'Tags for MyBodyShield programs, coaching and other records.',\n allowCustomTags: true,\n },\n },\n baseUrl\n );\n return created.createVocabulary.id;\n};\n\n/** Create a new tag from a free-text label and assign it to the entity. */\nexport const useMybCreateAndAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (label: string) => {\n const trimmed = label.trim();\n if (!trimmed) {\n throw new Error('A tag label is required.');\n }\n const vocabularyId = await resolveMybVocabularyId(apiGatewayUrl);\n // A unique key avoids collisions with existing tags in the vocabulary;\n // the (non-unique) label is what users see.\n const key = `${slugify(trimmed)}-${Math.random().toString(36).slice(2, 6)}`;\n const created = await wspaceFetch<{ createTag: { id: string } }>(\n `mutation MybCreateTag($input: CreateTagInput!) {\n createTag(input: $input) { id }\n }`,\n { input: { vocabularyId, key, label: trimmed } },\n apiGatewayUrl\n );\n await wspaceFetch<{ assignTag: { id: string } }>(\n `mutation MybAssignCreatedTag($input: AssignTagInput!) {\n assignTag(input: $input) { id }\n }`,\n { input: { entityType, entityId, tagId: created.createTag.id } },\n apiGatewayUrl\n );\n return created.createTag;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n"],"mappings":";;;;;AAqCA,IAAM,IAAqB,gBAErB,KAAiB,GAAoB,MACzC;CAAC;CAAgB;CAAe;CAAY;CAAS,EAEjD,IAAa,sBAEb,KAAW,MACf,EACG,aAAa,CACb,MAAM,CACN,QAAQ,eAAe,IAAI,CAC3B,QAAQ,YAAY,GAAG,CACvB,MAAM,GAAG,GAAG,IAAI,OAGR,KAAoB,GAAoB,MAAiC;CACpF,IAAM,EAAE,qBAAkB,GAAiB;AAC3C,QAAO,EAAS;EACd,UAAU,EAAc,GAAY,KAAY,GAAG;EACnD,SAAS,EAAQ;EACjB,SAAS,aACM,MAAM,EACjB;;;oBAGY,EAAW;;YAGvB;GAAE;GAAY;GAAU,EACxB,EACD,EACW;EAEf,CAAC;GAIS,KAAmB,MAAkB;CAChD,IAAM,EAAE,qBAAkB,GAAiB,EACrC,IAAU,EAAM,MAAM;AAC5B,QAAO,EAAS;EACd,UAAU;GAAC;GAAgB;GAAc;GAAQ;EACjD,SAAS,EAAQ,SAAS;EAC1B,SAAS,aACM,MAAM,EACjB;uDAC+C,EAAW;YAE1D;GAAE,OAAO;GAAS,OAAO;GAAG,EAC5B,EACD,EACW;EAEf,CAAC;GAIS,KAAmB,GAAoB,MAAqB;CACvE,IAAM,EAAE,qBAAkB,GAAiB,EACrC,IAAK,GAAgB;AAC3B,QAAO,EAAY;EACjB,YAAY,OAAO,OACJ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iB,EAAG,kBAAkB,EAAE,UAAU,EAAc,GAAY,EAAS,EAAE,CAAC;EACzF,CAAC"}
1
+ {"version":3,"file":"useMybTags.js","names":["MYB_VOCABULARY_KEY","entityTagsKey","entityType","entityId","TAG_FIELDS","slugify","value","useMybEntityTags","useMyBodyShield","useQuery","wspaceFetch","apiGatewayUrl","useMybTagSearch","trimmed","query","useMybAssignTag","qc","useQueryClient","useMutation","useMybRemoveTagAssignment","assignmentId","resolveMybVocabularyId","existing","baseUrl","useMybCreateAndAssignTag","label","vocabularyId","key","created"],"sources":["../../../src/mybodyshield/hooks/useMybTags.ts"],"sourcesContent":["/**\n * MyBodyShield — wspace-tags-svc UniversalTag REUSE hooks (Integration C).\n * @module mybodyshield/hooks/useMybTags\n *\n * The mybodyshield svc does NOT expose a tags field, so we drive the platform tag\n * assignment store directly (approach (b) in the reuse audit) — no mybodyshield-svc\n * change. All operations are composed into the WORKSPACE supergraph:\n * - `getEntityTags(entityType, entityId)` → current assignments (display)\n * - `searchTags(query)` → pick an existing tag\n * - `createTag(input)` → create a new tag (needs a vocabulary)\n * - `assignTag(input)` → link tag ↔ entity\n * - `removeTagAssignment(id)` → unlink\n *\n * `createTag` requires a `vocabularyId`; we resolve a stable, workspace-scoped\n * \"mybodyshield\" vocabulary (`getVocabularyByKey`, creating it on first use).\n *\n * Transport reuses `wspaceFetch` from `useMybFiles`. Lives in a separate file;\n * `useMyBodyShieldApi.ts` is untouched.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { useMyBodyShield } from '../context';\nimport { wspaceFetch } from './useMybFiles';\n\nexport interface MybTag {\n id: string;\n label: string;\n color: string | null;\n key: string;\n}\n\nexport interface MybTagAssignment {\n id: string;\n tag: MybTag;\n}\n\nconst MYB_VOCABULARY_KEY = 'mybodyshield';\n\nconst entityTagsKey = (entityType: string, entityId: string) =>\n ['mybodyshield', 'entity-tags', entityType, entityId] as const;\n\nconst TAG_FIELDS = 'id label color key';\n\nconst slugify = (value: string): string =>\n value\n .toLowerCase()\n .trim()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n .slice(0, 48) || 'tag';\n\n/** Current tag assignments for an mybodyshield entity. */\nexport const useMybEntityTags = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useMyBodyShield();\n return useQuery({\n queryKey: entityTagsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{ getEntityTags: MybTagAssignment[] }>(\n `query MybGetEntityTags($entityType: String!, $entityId: ID!) {\n getEntityTags(entityType: $entityType, entityId: $entityId) {\n id\n tag { ${TAG_FIELDS} }\n }\n }`,\n { entityType, entityId },\n apiGatewayUrl\n );\n return data.getEntityTags;\n },\n });\n};\n\n/** Search existing tags (enabled only for a non-empty query). */\nexport const useMybTagSearch = (query: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const trimmed = query.trim();\n return useQuery({\n queryKey: ['mybodyshield', 'tag-search', trimmed],\n enabled: trimmed.length > 0,\n queryFn: async () => {\n const data = await wspaceFetch<{ searchTags: MybTag[] }>(\n `query MybSearchTags($query: String!, $limit: Int) {\n searchTags(query: $query, limit: $limit) { ${TAG_FIELDS} }\n }`,\n { query: trimmed, limit: 8 },\n apiGatewayUrl\n );\n return data.searchTags;\n },\n });\n};\n\n/** Assign an existing tag to the entity. */\nexport const useMybAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (tagId: string) => {\n const data = await wspaceFetch<{ assignTag: { id: string } }>(\n `mutation MybAssignTag($input: AssignTagInput!) {\n assignTag(input: $input) { id }\n }`,\n { input: { entityType, entityId, tagId } },\n apiGatewayUrl\n );\n return data.assignTag;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\n/** Remove a tag assignment by its assignment id. */\nexport const useMybRemoveTagAssignment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (assignmentId: string) => {\n const data = await wspaceFetch<{ removeTagAssignment: boolean }>(\n `mutation MybRemoveTagAssignment($id: ID!) {\n removeTagAssignment(id: $id)\n }`,\n { id: assignmentId },\n apiGatewayUrl\n );\n return data.removeTagAssignment;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\n/** Resolve (creating on first use) the workspace-scoped \"mybodyshield\" vocabulary. */\nconst resolveMybVocabularyId = async (baseUrl?: string): Promise<string> => {\n const existing = await wspaceFetch<{ getVocabularyByKey: { id: string } | null }>(\n `query MybGetVocabulary($key: String!) {\n getVocabularyByKey(key: $key) { id }\n }`,\n { key: MYB_VOCABULARY_KEY },\n baseUrl\n );\n if (existing.getVocabularyByKey?.id) {\n return existing.getVocabularyByKey.id;\n }\n const created = await wspaceFetch<{ createVocabulary: { id: string } }>(\n `mutation MybCreateVocabulary($input: CreateVocabularyInput!) {\n createVocabulary(input: $input) { id }\n }`,\n {\n input: {\n key: MYB_VOCABULARY_KEY,\n name: 'MyBodyShield',\n description: 'Tags for MyBodyShield programs, coaching and other records.',\n allowCustomTags: true,\n },\n },\n baseUrl\n );\n return created.createVocabulary.id;\n};\n\n/** Create a new tag from a free-text label and assign it to the entity. */\nexport const useMybCreateAndAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useMyBodyShield();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (label: string) => {\n const trimmed = label.trim();\n if (!trimmed) {\n throw new Error('A tag label is required.');\n }\n const vocabularyId = await resolveMybVocabularyId(apiGatewayUrl);\n // A unique key avoids collisions with existing tags in the vocabulary;\n // the (non-unique) label is what users see.\n const key = `${slugify(trimmed)}-${Math.random().toString(36).slice(2, 6)}`;\n const created = await wspaceFetch<{ createTag: { id: string } }>(\n `mutation MybCreateTag($input: CreateTagInput!) {\n createTag(input: $input) { id }\n }`,\n { input: { vocabularyId, key, label: trimmed } },\n apiGatewayUrl\n );\n await wspaceFetch<{ assignTag: { id: string } }>(\n `mutation MybAssignCreatedTag($input: AssignTagInput!) {\n assignTag(input: $input) { id }\n }`,\n { input: { entityType, entityId, tagId: created.createTag.id } },\n apiGatewayUrl\n );\n return created.createTag;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n"],"mappings":";;;;;AAqCA,IAAMA,IAAqB,gBAErBC,KAAiB,GAAoB,MACzC;CAAC;CAAgB;CAAeC;CAAYC;AAAQ,GAEhDC,IAAa,sBAEbC,KAAW,MACfC,EACG,YAAY,CAAC,CACb,KAAK,CAAC,CACN,QAAQ,eAAe,GAAG,CAAC,CAC3B,QAAQ,YAAY,EAAE,CAAC,CACvB,MAAM,GAAG,EAAE,KAAK,OAGRC,KAAoB,GAAoB,MAAiC;CACpF,IAAM,EAAE,qBAAkBC,EAAgB;CAC1C,OAAOC,EAAS;EACd,UAAUR,EAAcC,GAAYC,KAAY,EAAE;EAClD,SAAS,EAAQA;EACjB,SAAS,aAWA,MAVYO,EACjB;;;oBAGYN,EAAW;;YAGvB;GAAE;GAAY;EAAS,GACvBO,CACF,EAAA,CACY;CAEhB,CAAC;AACH,GAGaC,KAAmB,MAAkB;CAChD,IAAM,EAAE,qBAAkBJ,EAAgB,GACpCK,IAAUC,EAAM,KAAK;CAC3B,OAAOL,EAAS;EACd,UAAU;GAAC;GAAgB;GAAcI;EAAO;EAChD,SAASA,EAAQ,SAAS;EAC1B,SAAS,aAQA,MAPYH,EACjB;uDAC+CN,EAAW;YAE1D;GAAE,OAAOS;GAAS,OAAO;EAAE,GAC3BF,CACF,EAAA,CACY;CAEhB,CAAC;AACH,GAGaI,KAAmB,GAAoB,MAAqB;CACvE,IAAM,EAAE,qBAAkBP,EAAgB,GACpCQ,IAAKC,EAAe;CAC1B,OAAOC,EAAY;EACjB,YAAY,OAAO,OAQV,MAPYR,EACjB,0G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,iHAGA,EAAE,OAAO;IAAE;IAAY;IAAU,OAAOkB,EAAQ,UAAU;GAAG,EAAE,GAC/DjB,CACF,GACOiB,EAAQ;EACjB;EACA,iBAAiBZ,EAAG,kBAAkB,EAAE,UAAUf,EAAcC,GAAYC,CAAQ,EAAE,CAAC;CACzF,CAAC;AACH"}
@@ -1,6 +1,6 @@
1
1
  import { useQuery as e } from "@tanstack/react-query";
2
2
  import { graphqlFetch as t } from "@burdenoff/fe-libs/shared/graphql";
3
- //#region src/mybodyshield/hooks/useMybUsers.ts
3
+ // src/mybodyshield/hooks/useMybUsers.ts
4
4
  var n = (e) => e.name?.trim() ? e.name.trim() : [e.firstName, e.lastName].filter(Boolean).join(" ").trim() || (e.username?.trim() ? e.username.trim() : e.email), r = async (e, n) => {
5
5
  let r = await t({
6
6
  gateway: "global",
@@ -30,7 +30,6 @@ var n = (e) => e.name?.trim() ? e.name.trim() : [e.firstName, e.lastName].filter
30
30
  })).users.users
31
31
  });
32
32
  };
33
- //#endregion
34
33
  export { n as directoryUserName, i as useMybUserSearch };
35
34
 
36
35
  //# sourceMappingURL=useMybUsers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMybUsers.js","names":[],"sources":["../../../src/mybodyshield/hooks/useMybUsers.ts"],"sourcesContent":["/**\n * MyBodyShield — global user directory search (identity reuse).\n * @module mybodyshield/hooks/useMybUsers\n *\n * Resolves real users (coach / member) from the global auth directory so the\n * coaching form can pick a person by name/email instead of pasting a raw UUID.\n * Reuses the composed GLOBAL supergraph `users(filter, pagination)` op — no\n * bespoke identity storage in the mybodyshield svc. Transport mirrors the other\n * hooks (`graphqlFetch`) but targets the GLOBAL gateway.\n */\n\nimport { useQuery } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useMyBodyShield } from '../context';\n\nexport interface DirectoryUser {\n id: string;\n name: string | null;\n firstName: string | null;\n lastName: string | null;\n email: string;\n username: string;\n}\n\n/** Best display name for a directory user (name → first+last → username → email). */\nexport const directoryUserName = (user: DirectoryUser): string => {\n if (user.name?.trim()) return user.name.trim();\n const full = [user.firstName, user.lastName].filter(Boolean).join(' ').trim();\n if (full) return full;\n if (user.username?.trim()) return user.username.trim();\n return user.email;\n};\n\nconst globalQuery = async <TData>(\n query: string,\n variables: Record<string, unknown>\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({ gateway: 'global', query, variables });\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n return response.data;\n};\n\n/**\n * Search the tenant user directory by name/email. Enabled once the term is at\n * least two characters; failures are surfaced to the caller (which offers a\n * manual-id fallback) rather than as a global error toast.\n */\nexport const useMybUserSearch = (search: string) => {\n const term = search.trim();\n return useQuery({\n queryKey: ['mybodyshield', 'user-search', term],\n enabled: term.length >= 2,\n staleTime: 30_000,\n retry: false,\n queryFn: async () => {\n const result = await globalQuery<{\n users: { users: DirectoryUser[]; hasMore: boolean };\n }>(\n `query MybUserSearch($filter: UserFilterInput, $pagination: PaginationInput) {\n users(filter: $filter, pagination: $pagination) {\n users { id name firstName lastName email username }\n hasMore\n }\n }`,\n { filter: { search: term }, pagination: { limit: 8, offset: 0 } }\n );\n return result.users.users;\n },\n });\n};\n"],"mappings":";;;AA0BA,IAAa,KAAqB,MAC5B,EAAK,MAAM,MAAM,GAAS,EAAK,KAAK,MAAM,GACjC,CAAC,EAAK,WAAW,EAAK,SAAS,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI,CAAC,MAAM,KAEzE,EAAK,UAAU,MAAM,GAAS,EAAK,SAAS,MAAM,GAC/C,EAAK,QAGR,IAAc,OAClB,GACA,MACmB;CACnB,IAAM,IAAW,MAAM,EAAoB;EAAE,SAAS;EAAU;EAAO;EAAW,CAAC;AACnF,KAAI,EAAS,QAAQ,OACnB,OAAU,MAAM,EAAS,OAAO,IAAI,WAAW,yBAAyB;AAE1E,KAAI,CAAC,EAAS,KACZ,OAAU,MAAM,wCAAwC;AAE1D,QAAO,EAAS;GAQL,KAAoB,MAAmB;CAClD,IAAM,IAAO,EAAO,MAAM;AAC1B,QAAO,EAAS;EACd,UAAU;GAAC;GAAgB;GAAe;GAAK;EAC/C,SAAS,EAAK,UAAU;EACxB,WAAW;EACX,OAAO;EACP,SAAS,aACQ,MAAM,EAGnB,4PAMA;GAAE,QAAQ,EAAE,QAAQ,GAAM;GAAE,YAAY;IAAE,OAAO;IAAG,QAAQ;IAAG;GAAE,CAClE,EACa,MAAM;EAEvB,CAAC"}
1
+ {"version":3,"file":"useMybUsers.js","names":["directoryUserName","user","globalQuery","response","graphqlFetch","useMybUserSearch","term","search","useQuery"],"sources":["../../../src/mybodyshield/hooks/useMybUsers.ts"],"sourcesContent":["/**\n * MyBodyShield — global user directory search (identity reuse).\n * @module mybodyshield/hooks/useMybUsers\n *\n * Resolves real users (coach / member) from the global auth directory so the\n * coaching form can pick a person by name/email instead of pasting a raw UUID.\n * Reuses the composed GLOBAL supergraph `users(filter, pagination)` op — no\n * bespoke identity storage in the mybodyshield svc. Transport mirrors the other\n * hooks (`graphqlFetch`) but targets the GLOBAL gateway.\n */\n\nimport { useQuery } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useMyBodyShield } from '../context';\n\nexport interface DirectoryUser {\n id: string;\n name: string | null;\n firstName: string | null;\n lastName: string | null;\n email: string;\n username: string;\n}\n\n/** Best display name for a directory user (name → first+last → username → email). */\nexport const directoryUserName = (user: DirectoryUser): string => {\n if (user.name?.trim()) return user.name.trim();\n const full = [user.firstName, user.lastName].filter(Boolean).join(' ').trim();\n if (full) return full;\n if (user.username?.trim()) return user.username.trim();\n return user.email;\n};\n\nconst globalQuery = async <TData>(\n query: string,\n variables: Record<string, unknown>\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({ gateway: 'global', query, variables });\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n return response.data;\n};\n\n/**\n * Search the tenant user directory by name/email. Enabled once the term is at\n * least two characters; failures are surfaced to the caller (which offers a\n * manual-id fallback) rather than as a global error toast.\n */\nexport const useMybUserSearch = (search: string) => {\n const term = search.trim();\n return useQuery({\n queryKey: ['mybodyshield', 'user-search', term],\n enabled: term.length >= 2,\n staleTime: 30_000,\n retry: false,\n queryFn: async () => {\n const result = await globalQuery<{\n users: { users: DirectoryUser[]; hasMore: boolean };\n }>(\n `query MybUserSearch($filter: UserFilterInput, $pagination: PaginationInput) {\n users(filter: $filter, pagination: $pagination) {\n users { id name firstName lastName email username }\n hasMore\n }\n }`,\n { filter: { search: term }, pagination: { limit: 8, offset: 0 } }\n );\n return result.users.users;\n },\n });\n};\n"],"mappings":";;;AA0BA,IAAaA,KAAqB,MAC5BC,EAAK,MAAM,KAAK,IAAUA,EAAK,KAAK,KAAK,IAChC,CAACA,EAAK,WAAWA,EAAK,QAAQ,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KACnE,MACAA,EAAK,UAAU,KAAK,IAAUA,EAAK,SAAS,KAAK,IAC9CA,EAAK,QAGRC,IAAc,OAClB,GACA,MACmB;CACnB,IAAMC,IAAW,MAAMC,EAAoB;EAAE,SAAS;EAAU;EAAO;CAAU,CAAC;CAClF,IAAID,EAAS,QAAQ,QACnB,MAAU,MAAMA,EAAS,OAAO,EAAE,EAAE,WAAW,wBAAwB;CAEzE,IAAI,CAACA,EAAS,MACZ,MAAU,MAAM,uCAAuC;CAEzD,OAAOA,EAAS;AAClB,GAOaE,KAAoB,MAAmB;CAClD,IAAMC,IAAOC,EAAO,KAAK;CACzB,OAAOC,EAAS;EACd,UAAU;GAAC;GAAgB;GAAeF;EAAI;EAC9C,SAASA,EAAK,UAAU;EACxB,WAAW;EACX,OAAO;EACP,SAAS,aAYA,MAXcJ,EAGnB,4PAMA;GAAE,QAAQ,EAAE,QAAQI,EAAK;GAAG,YAAY;IAAE,OAAO;IAAG,QAAQ;GAAE;EAAE,CAClE,EAAA,CACc,MAAM;CAExB,CAAC;AACH"}
@@ -1,5 +1,5 @@
1
1
  import { useCallback as e, useMemo as t, useState as n } from "react";
2
- //#region src/mybodyshield/hooks/usePager.ts
2
+ // src/mybodyshield/hooks/usePager.ts
3
3
  function r(r = 25) {
4
4
  let [i, a] = n(0), o = e(() => a((e) => e + 1), []), s = e(() => a((e) => e > 0 ? e - 1 : 0), []), c = e(() => a(0), []), l = e((e) => {
5
5
  a(e < 0 ? 0 : e);
@@ -21,7 +21,6 @@ function r(r = 25) {
21
21
  l
22
22
  ]);
23
23
  }
24
- //#endregion
25
24
  export { r as useOffsetPager };
26
25
 
27
26
  //# sourceMappingURL=usePager.js.map