@burdenoff/microfe-brainyrich 2026.706.1 → 2026.706.3

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 (1370) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +20 -0
  2. package/dist/brainyrich/components/LoadMore.js.map +1 -1
  3. package/dist/brainyrich/components/index.js +1 -0
  4. package/dist/brainyrich/components/pickers.js.map +1 -1
  5. package/dist/brainyrich/components/reuse/CommentThread.js.map +1 -1
  6. package/dist/brainyrich/components/reuse/DocumentsPanel.js.map +1 -1
  7. package/dist/brainyrich/components/reuse/TagField.js.map +1 -1
  8. package/dist/brainyrich/components/viz.js +628 -0
  9. package/dist/brainyrich/components/viz.js.map +1 -0
  10. package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
  11. package/dist/brainyrich/pages/AccountsPage.js +732 -530
  12. package/dist/brainyrich/pages/AccountsPage.js.map +1 -1
  13. package/dist/brainyrich/pages/AiAssistantPage.js +475 -343
  14. package/dist/brainyrich/pages/AiAssistantPage.js.map +1 -1
  15. package/dist/brainyrich/pages/AnalyticsPage.js +555 -392
  16. package/dist/brainyrich/pages/AnalyticsPage.js.map +1 -1
  17. package/dist/brainyrich/pages/DashboardPage.js +318 -194
  18. package/dist/brainyrich/pages/DashboardPage.js.map +1 -1
  19. package/dist/brainyrich/pages/FamilyPage.js +723 -355
  20. package/dist/brainyrich/pages/FamilyPage.js.map +1 -1
  21. package/dist/brainyrich/pages/GoalsPage.js +573 -419
  22. package/dist/brainyrich/pages/GoalsPage.js.map +1 -1
  23. package/dist/brainyrich/pages/InvestmentsPage.js +357 -213
  24. package/dist/brainyrich/pages/InvestmentsPage.js.map +1 -1
  25. package/dist/brainyrich/pages/PortfoliosPage.js +525 -399
  26. package/dist/brainyrich/pages/PortfoliosPage.js.map +1 -1
  27. package/dist/brainyrich/pages/ReportsPage.js +845 -258
  28. package/dist/brainyrich/pages/ReportsPage.js.map +1 -1
  29. package/dist/brainyrich/pages/RiskPage.js +667 -346
  30. package/dist/brainyrich/pages/RiskPage.js.map +1 -1
  31. package/dist/brainyrich/pages/TaxPage.js +687 -347
  32. package/dist/brainyrich/pages/TaxPage.js.map +1 -1
  33. package/dist/brainyrich/pages/_shared.js +81 -101
  34. package/dist/brainyrich/pages/_shared.js.map +1 -1
  35. package/dist/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +13 -0
  36. package/dist/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js.map +1 -0
  37. package/dist/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +14 -0
  38. package/dist/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js.map +1 -0
  39. package/dist/node_modules/clsx/dist/clsx.js +18 -0
  40. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  41. package/dist/node_modules/d3-array/src/ascending.js +8 -0
  42. package/dist/node_modules/d3-array/src/ascending.js.map +1 -0
  43. package/dist/node_modules/d3-array/src/bisect.js +10 -0
  44. package/dist/node_modules/d3-array/src/bisect.js.map +1 -0
  45. package/dist/node_modules/d3-array/src/bisector.js +43 -0
  46. package/dist/node_modules/d3-array/src/bisector.js.map +1 -0
  47. package/dist/node_modules/d3-array/src/descending.js +8 -0
  48. package/dist/node_modules/d3-array/src/descending.js.map +1 -0
  49. package/dist/node_modules/d3-array/src/max.js +14 -0
  50. package/dist/node_modules/d3-array/src/max.js.map +1 -0
  51. package/dist/node_modules/d3-array/src/min.js +14 -0
  52. package/dist/node_modules/d3-array/src/min.js.map +1 -0
  53. package/dist/node_modules/d3-array/src/number.js +15 -0
  54. package/dist/node_modules/d3-array/src/number.js.map +1 -0
  55. package/dist/node_modules/d3-array/src/quantile.js +25 -0
  56. package/dist/node_modules/d3-array/src/quantile.js.map +1 -0
  57. package/dist/node_modules/d3-array/src/quickselect.js +26 -0
  58. package/dist/node_modules/d3-array/src/quickselect.js.map +1 -0
  59. package/dist/node_modules/d3-array/src/range.js +10 -0
  60. package/dist/node_modules/d3-array/src/range.js.map +1 -0
  61. package/dist/node_modules/d3-array/src/sort.js +17 -0
  62. package/dist/node_modules/d3-array/src/sort.js.map +1 -0
  63. package/dist/node_modules/d3-array/src/ticks.js +34 -0
  64. package/dist/node_modules/d3-array/src/ticks.js.map +1 -0
  65. package/dist/node_modules/d3-color/src/color.js +291 -0
  66. package/dist/node_modules/d3-color/src/color.js.map +1 -0
  67. package/dist/node_modules/d3-color/src/define.js +13 -0
  68. package/dist/node_modules/d3-color/src/define.js.map +1 -0
  69. package/dist/node_modules/d3-format/src/defaultLocale.js +15 -0
  70. package/dist/node_modules/d3-format/src/defaultLocale.js.map +1 -0
  71. package/dist/node_modules/d3-format/src/exponent.js +9 -0
  72. package/dist/node_modules/d3-format/src/exponent.js.map +1 -0
  73. package/dist/node_modules/d3-format/src/formatDecimal.js +13 -0
  74. package/dist/node_modules/d3-format/src/formatDecimal.js.map +1 -0
  75. package/dist/node_modules/d3-format/src/formatGroup.js +11 -0
  76. package/dist/node_modules/d3-format/src/formatGroup.js.map +1 -0
  77. package/dist/node_modules/d3-format/src/formatNumerals.js +12 -0
  78. package/dist/node_modules/d3-format/src/formatNumerals.js.map +1 -0
  79. package/dist/node_modules/d3-format/src/formatPrefixAuto.js +13 -0
  80. package/dist/node_modules/d3-format/src/formatPrefixAuto.js.map +1 -0
  81. package/dist/node_modules/d3-format/src/formatRounded.js +12 -0
  82. package/dist/node_modules/d3-format/src/formatRounded.js.map +1 -0
  83. package/dist/node_modules/d3-format/src/formatSpecifier.js +29 -0
  84. package/dist/node_modules/d3-format/src/formatSpecifier.js.map +1 -0
  85. package/dist/node_modules/d3-format/src/formatTrim.js +20 -0
  86. package/dist/node_modules/d3-format/src/formatTrim.js.map +1 -0
  87. package/dist/node_modules/d3-format/src/formatTypes.js +23 -0
  88. package/dist/node_modules/d3-format/src/formatTypes.js.map +1 -0
  89. package/dist/node_modules/d3-format/src/identity.js +8 -0
  90. package/dist/node_modules/d3-format/src/identity.js.map +1 -0
  91. package/dist/node_modules/d3-format/src/locale.js +86 -0
  92. package/dist/node_modules/d3-format/src/locale.js.map +1 -0
  93. package/dist/node_modules/d3-format/src/precisionFixed.js +9 -0
  94. package/dist/node_modules/d3-format/src/precisionFixed.js.map +1 -0
  95. package/dist/node_modules/d3-format/src/precisionPrefix.js +9 -0
  96. package/dist/node_modules/d3-format/src/precisionPrefix.js.map +1 -0
  97. package/dist/node_modules/d3-format/src/precisionRound.js +9 -0
  98. package/dist/node_modules/d3-format/src/precisionRound.js.map +1 -0
  99. package/dist/node_modules/d3-interpolate/src/array.js +15 -0
  100. package/dist/node_modules/d3-interpolate/src/array.js.map +1 -0
  101. package/dist/node_modules/d3-interpolate/src/basis.js +16 -0
  102. package/dist/node_modules/d3-interpolate/src/basis.js.map +1 -0
  103. package/dist/node_modules/d3-interpolate/src/basisClosed.js +13 -0
  104. package/dist/node_modules/d3-interpolate/src/basisClosed.js.map +1 -0
  105. package/dist/node_modules/d3-interpolate/src/color.js +25 -0
  106. package/dist/node_modules/d3-interpolate/src/color.js.map +1 -0
  107. package/dist/node_modules/d3-interpolate/src/constant.js +6 -0
  108. package/dist/node_modules/d3-interpolate/src/constant.js.map +1 -0
  109. package/dist/node_modules/d3-interpolate/src/date.js +11 -0
  110. package/dist/node_modules/d3-interpolate/src/date.js.map +1 -0
  111. package/dist/node_modules/d3-interpolate/src/number.js +10 -0
  112. package/dist/node_modules/d3-interpolate/src/number.js.map +1 -0
  113. package/dist/node_modules/d3-interpolate/src/numberArray.js +16 -0
  114. package/dist/node_modules/d3-interpolate/src/numberArray.js.map +1 -0
  115. package/dist/node_modules/d3-interpolate/src/object.js +14 -0
  116. package/dist/node_modules/d3-interpolate/src/object.js.map +1 -0
  117. package/dist/node_modules/d3-interpolate/src/piecewise.js +14 -0
  118. package/dist/node_modules/d3-interpolate/src/piecewise.js.map +1 -0
  119. package/dist/node_modules/d3-interpolate/src/rgb.js +19 -0
  120. package/dist/node_modules/d3-interpolate/src/rgb.js.map +1 -0
  121. package/dist/node_modules/d3-interpolate/src/round.js +10 -0
  122. package/dist/node_modules/d3-interpolate/src/round.js.map +1 -0
  123. package/dist/node_modules/d3-interpolate/src/string.js +28 -0
  124. package/dist/node_modules/d3-interpolate/src/string.js.map +1 -0
  125. package/dist/node_modules/d3-interpolate/src/value.js +18 -0
  126. package/dist/node_modules/d3-interpolate/src/value.js.map +1 -0
  127. package/dist/node_modules/d3-path/src/path.js +65 -0
  128. package/dist/node_modules/d3-path/src/path.js.map +1 -0
  129. package/dist/node_modules/d3-scale/src/band.js +52 -0
  130. package/dist/node_modules/d3-scale/src/band.js.map +1 -0
  131. package/dist/node_modules/d3-scale/src/constant.js +10 -0
  132. package/dist/node_modules/d3-scale/src/constant.js.map +1 -0
  133. package/dist/node_modules/d3-scale/src/continuous.js +73 -0
  134. package/dist/node_modules/d3-scale/src/continuous.js.map +1 -0
  135. package/dist/node_modules/d3-scale/src/diverging.js +82 -0
  136. package/dist/node_modules/d3-scale/src/diverging.js.map +1 -0
  137. package/dist/node_modules/d3-scale/src/identity.js +20 -0
  138. package/dist/node_modules/d3-scale/src/identity.js.map +1 -0
  139. package/dist/node_modules/d3-scale/src/init.js +29 -0
  140. package/dist/node_modules/d3-scale/src/init.js.map +1 -0
  141. package/dist/node_modules/d3-scale/src/linear.js +36 -0
  142. package/dist/node_modules/d3-scale/src/linear.js.map +1 -0
  143. package/dist/node_modules/d3-scale/src/log.js +77 -0
  144. package/dist/node_modules/d3-scale/src/log.js.map +1 -0
  145. package/dist/node_modules/d3-scale/src/nice.js +10 -0
  146. package/dist/node_modules/d3-scale/src/nice.js.map +1 -0
  147. package/dist/node_modules/d3-scale/src/number.js +8 -0
  148. package/dist/node_modules/d3-scale/src/number.js.map +1 -0
  149. package/dist/node_modules/d3-scale/src/ordinal.js +31 -0
  150. package/dist/node_modules/d3-scale/src/ordinal.js.map +1 -0
  151. package/dist/node_modules/d3-scale/src/pow.js +37 -0
  152. package/dist/node_modules/d3-scale/src/pow.js.map +1 -0
  153. package/dist/node_modules/d3-scale/src/quantile.js +37 -0
  154. package/dist/node_modules/d3-scale/src/quantile.js.map +1 -0
  155. package/dist/node_modules/d3-scale/src/quantize.js +33 -0
  156. package/dist/node_modules/d3-scale/src/quantize.js.map +1 -0
  157. package/dist/node_modules/d3-scale/src/radial.js +39 -0
  158. package/dist/node_modules/d3-scale/src/radial.js.map +1 -0
  159. package/dist/node_modules/d3-scale/src/sequential.js +67 -0
  160. package/dist/node_modules/d3-scale/src/sequential.js.map +1 -0
  161. package/dist/node_modules/d3-scale/src/sequentialQuantile.js +30 -0
  162. package/dist/node_modules/d3-scale/src/sequentialQuantile.js.map +1 -0
  163. package/dist/node_modules/d3-scale/src/symlog.js +30 -0
  164. package/dist/node_modules/d3-scale/src/symlog.js.map +1 -0
  165. package/dist/node_modules/d3-scale/src/threshold.js +25 -0
  166. package/dist/node_modules/d3-scale/src/threshold.js.map +1 -0
  167. package/dist/node_modules/d3-scale/src/tickFormat.js +31 -0
  168. package/dist/node_modules/d3-scale/src/tickFormat.js.map +1 -0
  169. package/dist/node_modules/d3-scale/src/time.js +47 -0
  170. package/dist/node_modules/d3-scale/src/time.js.map +1 -0
  171. package/dist/node_modules/d3-scale/src/utcTime.js +19 -0
  172. package/dist/node_modules/d3-scale/src/utcTime.js.map +1 -0
  173. package/dist/node_modules/d3-shape/src/area.js +55 -0
  174. package/dist/node_modules/d3-shape/src/area.js.map +1 -0
  175. package/dist/node_modules/d3-shape/src/array.js +8 -0
  176. package/dist/node_modules/d3-shape/src/array.js.map +1 -0
  177. package/dist/node_modules/d3-shape/src/constant.js +10 -0
  178. package/dist/node_modules/d3-shape/src/constant.js.map +1 -0
  179. package/dist/node_modules/d3-shape/src/curve/basis.js +49 -0
  180. package/dist/node_modules/d3-shape/src/curve/basis.js.map +1 -0
  181. package/dist/node_modules/d3-shape/src/curve/basisClosed.js +50 -0
  182. package/dist/node_modules/d3-shape/src/curve/basisClosed.js.map +1 -0
  183. package/dist/node_modules/d3-shape/src/curve/basisOpen.js +46 -0
  184. package/dist/node_modules/d3-shape/src/curve/basisOpen.js.map +1 -0
  185. package/dist/node_modules/d3-shape/src/curve/bump.js +40 -0
  186. package/dist/node_modules/d3-shape/src/curve/bump.js.map +1 -0
  187. package/dist/node_modules/d3-shape/src/curve/linear.js +36 -0
  188. package/dist/node_modules/d3-shape/src/curve/linear.js.map +1 -0
  189. package/dist/node_modules/d3-shape/src/curve/linearClosed.js +25 -0
  190. package/dist/node_modules/d3-shape/src/curve/linearClosed.js.map +1 -0
  191. package/dist/node_modules/d3-shape/src/curve/monotone.js +94 -0
  192. package/dist/node_modules/d3-shape/src/curve/monotone.js.map +1 -0
  193. package/dist/node_modules/d3-shape/src/curve/natural.js +39 -0
  194. package/dist/node_modules/d3-shape/src/curve/natural.js.map +1 -0
  195. package/dist/node_modules/d3-shape/src/curve/step.js +47 -0
  196. package/dist/node_modules/d3-shape/src/curve/step.js.map +1 -0
  197. package/dist/node_modules/d3-shape/src/line.js +30 -0
  198. package/dist/node_modules/d3-shape/src/line.js.map +1 -0
  199. package/dist/node_modules/d3-shape/src/math.js +8 -0
  200. package/dist/node_modules/d3-shape/src/math.js.map +1 -0
  201. package/dist/node_modules/d3-shape/src/noop.js +6 -0
  202. package/dist/node_modules/d3-shape/src/noop.js.map +1 -0
  203. package/dist/node_modules/d3-shape/src/offset/expand.js +15 -0
  204. package/dist/node_modules/d3-shape/src/offset/expand.js.map +1 -0
  205. package/dist/node_modules/d3-shape/src/offset/none.js +8 -0
  206. package/dist/node_modules/d3-shape/src/offset/none.js.map +1 -0
  207. package/dist/node_modules/d3-shape/src/offset/silhouette.js +15 -0
  208. package/dist/node_modules/d3-shape/src/offset/silhouette.js.map +1 -0
  209. package/dist/node_modules/d3-shape/src/offset/wiggle.js +21 -0
  210. package/dist/node_modules/d3-shape/src/offset/wiggle.js.map +1 -0
  211. package/dist/node_modules/d3-shape/src/order/none.js +9 -0
  212. package/dist/node_modules/d3-shape/src/order/none.js.map +1 -0
  213. package/dist/node_modules/d3-shape/src/path.js +19 -0
  214. package/dist/node_modules/d3-shape/src/path.js.map +1 -0
  215. package/dist/node_modules/d3-shape/src/point.js +11 -0
  216. package/dist/node_modules/d3-shape/src/point.js.map +1 -0
  217. package/dist/node_modules/d3-shape/src/stack.js +34 -0
  218. package/dist/node_modules/d3-shape/src/stack.js.map +1 -0
  219. package/dist/node_modules/d3-shape/src/symbol/circle.js +10 -0
  220. package/dist/node_modules/d3-shape/src/symbol/circle.js.map +1 -0
  221. package/dist/node_modules/d3-shape/src/symbol/cross.js +10 -0
  222. package/dist/node_modules/d3-shape/src/symbol/cross.js.map +1 -0
  223. package/dist/node_modules/d3-shape/src/symbol/diamond.js +10 -0
  224. package/dist/node_modules/d3-shape/src/symbol/diamond.js.map +1 -0
  225. package/dist/node_modules/d3-shape/src/symbol/square.js +10 -0
  226. package/dist/node_modules/d3-shape/src/symbol/square.js.map +1 -0
  227. package/dist/node_modules/d3-shape/src/symbol/star.js +15 -0
  228. package/dist/node_modules/d3-shape/src/symbol/star.js.map +1 -0
  229. package/dist/node_modules/d3-shape/src/symbol/triangle.js +10 -0
  230. package/dist/node_modules/d3-shape/src/symbol/triangle.js.map +1 -0
  231. package/dist/node_modules/d3-shape/src/symbol/wye.js +10 -0
  232. package/dist/node_modules/d3-shape/src/symbol/wye.js.map +1 -0
  233. package/dist/node_modules/d3-shape/src/symbol.js +23 -0
  234. package/dist/node_modules/d3-shape/src/symbol.js.map +1 -0
  235. package/dist/node_modules/d3-time/src/day.js +21 -0
  236. package/dist/node_modules/d3-time/src/day.js.map +1 -0
  237. package/dist/node_modules/d3-time/src/duration.js +6 -0
  238. package/dist/node_modules/d3-time/src/duration.js.map +1 -0
  239. package/dist/node_modules/d3-time/src/hour.js +19 -0
  240. package/dist/node_modules/d3-time/src/hour.js.map +1 -0
  241. package/dist/node_modules/d3-time/src/interval.js +28 -0
  242. package/dist/node_modules/d3-time/src/interval.js.map +1 -0
  243. package/dist/node_modules/d3-time/src/millisecond.js +14 -0
  244. package/dist/node_modules/d3-time/src/millisecond.js.map +1 -0
  245. package/dist/node_modules/d3-time/src/minute.js +19 -0
  246. package/dist/node_modules/d3-time/src/minute.js.map +1 -0
  247. package/dist/node_modules/d3-time/src/month.js +18 -0
  248. package/dist/node_modules/d3-time/src/month.js.map +1 -0
  249. package/dist/node_modules/d3-time/src/second.js +13 -0
  250. package/dist/node_modules/d3-time/src/second.js.map +1 -0
  251. package/dist/node_modules/d3-time/src/ticks.js +125 -0
  252. package/dist/node_modules/d3-time/src/ticks.js.map +1 -0
  253. package/dist/node_modules/d3-time/src/week.js +25 -0
  254. package/dist/node_modules/d3-time/src/week.js.map +1 -0
  255. package/dist/node_modules/d3-time/src/year.js +26 -0
  256. package/dist/node_modules/d3-time/src/year.js.map +1 -0
  257. package/dist/node_modules/d3-time-format/src/defaultLocale.js +62 -0
  258. package/dist/node_modules/d3-time-format/src/defaultLocale.js.map +1 -0
  259. package/dist/node_modules/d3-time-format/src/locale.js +490 -0
  260. package/dist/node_modules/d3-time-format/src/locale.js.map +1 -0
  261. package/dist/node_modules/decimal.js-light/decimal.js +378 -0
  262. package/dist/node_modules/decimal.js-light/decimal.js.map +1 -0
  263. package/dist/node_modules/eventemitter3/index.js +95 -0
  264. package/dist/node_modules/eventemitter3/index.js.map +1 -0
  265. package/dist/node_modules/fast-equals/dist/es/index.js +267 -0
  266. package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -0
  267. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +22 -0
  268. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js.map +1 -0
  269. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +8 -0
  270. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js.map +1 -0
  271. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +8 -0
  272. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js.map +1 -0
  273. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +12 -0
  274. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js.map +1 -0
  275. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +19 -0
  276. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js.map +1 -0
  277. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +8 -0
  278. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js.map +1 -0
  279. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +17 -0
  280. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js.map +1 -0
  281. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +8 -0
  282. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js.map +1 -0
  283. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +8 -0
  284. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js.map +1 -0
  285. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +10 -0
  286. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js.map +1 -0
  287. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +13 -0
  288. package/dist/node_modules/framer-motion/dist/es/events/event-info.js.map +1 -0
  289. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +259 -0
  290. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js.map +1 -0
  291. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +24 -0
  292. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js.map +1 -0
  293. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +61 -0
  294. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js.map +1 -0
  295. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +29 -0
  296. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js.map +1 -0
  297. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +22 -0
  298. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js.map +1 -0
  299. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +135 -0
  300. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js.map +1 -0
  301. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +44 -0
  302. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js.map +1 -0
  303. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +28 -0
  304. package/dist/node_modules/framer-motion/dist/es/gestures/press.js.map +1 -0
  305. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +41 -0
  306. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js.map +1 -0
  307. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +27 -0
  308. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js.map +1 -0
  309. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +11 -0
  310. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js.map +1 -0
  311. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +53 -0
  312. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js.map +1 -0
  313. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +17 -0
  314. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js.map +1 -0
  315. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +15 -0
  316. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js.map +1 -0
  317. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +63 -0
  318. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js.map +1 -0
  319. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +11 -0
  320. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js.map +1 -0
  321. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +15 -0
  322. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js.map +1 -0
  323. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +48 -0
  324. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js.map +1 -0
  325. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +26 -0
  326. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js.map +1 -0
  327. package/dist/node_modules/framer-motion/dist/es/motion/index.js +72 -0
  328. package/dist/node_modules/framer-motion/dist/es/motion/index.js.map +1 -0
  329. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +6 -0
  330. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js.map +1 -0
  331. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +24 -0
  332. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js.map +1 -0
  333. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +60 -0
  334. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js.map +1 -0
  335. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +52 -0
  336. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js.map +1 -0
  337. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +9 -0
  338. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js.map +1 -0
  339. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +12 -0
  340. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js.map +1 -0
  341. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +15 -0
  342. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js.map +1 -0
  343. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +9 -0
  344. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js.map +1 -0
  345. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +10 -0
  346. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js.map +1 -0
  347. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +23 -0
  348. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js.map +1 -0
  349. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +21 -0
  350. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js.map +1 -0
  351. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +9 -0
  352. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js.map +1 -0
  353. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +13 -0
  354. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js.map +1 -0
  355. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +28 -0
  356. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js.map +1 -0
  357. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +11 -0
  358. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js.map +1 -0
  359. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +32 -0
  360. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js.map +1 -0
  361. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +28 -0
  362. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js.map +1 -0
  363. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +13 -0
  364. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js.map +1 -0
  365. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +10 -0
  366. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js.map +1 -0
  367. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +10 -0
  368. package/dist/node_modules/framer-motion/dist/es/utils/distance.js.map +1 -0
  369. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +6 -0
  370. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js.map +1 -0
  371. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +6 -0
  372. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js.map +1 -0
  373. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +8 -0
  374. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js.map +1 -0
  375. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +15 -0
  376. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js.map +1 -0
  377. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +11 -0
  378. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js.map +1 -0
  379. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +9 -0
  380. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js.map +1 -0
  381. package/dist/node_modules/internmap/src/index.js +40 -0
  382. package/dist/node_modules/internmap/src/index.js.map +1 -0
  383. package/dist/node_modules/lodash/_DataView.js +12 -0
  384. package/dist/node_modules/lodash/_DataView.js.map +1 -0
  385. package/dist/node_modules/lodash/_Hash.js +23 -0
  386. package/dist/node_modules/lodash/_Hash.js.map +1 -0
  387. package/dist/node_modules/lodash/_ListCache.js +23 -0
  388. package/dist/node_modules/lodash/_ListCache.js.map +1 -0
  389. package/dist/node_modules/lodash/_Map.js +12 -0
  390. package/dist/node_modules/lodash/_Map.js.map +1 -0
  391. package/dist/node_modules/lodash/_MapCache.js +23 -0
  392. package/dist/node_modules/lodash/_MapCache.js.map +1 -0
  393. package/dist/node_modules/lodash/_Promise.js +12 -0
  394. package/dist/node_modules/lodash/_Promise.js.map +1 -0
  395. package/dist/node_modules/lodash/_Set.js +12 -0
  396. package/dist/node_modules/lodash/_Set.js.map +1 -0
  397. package/dist/node_modules/lodash/_SetCache.js +18 -0
  398. package/dist/node_modules/lodash/_SetCache.js.map +1 -0
  399. package/dist/node_modules/lodash/_Stack.js +20 -0
  400. package/dist/node_modules/lodash/_Stack.js.map +1 -0
  401. package/dist/node_modules/lodash/_Symbol.js +11 -0
  402. package/dist/node_modules/lodash/_Symbol.js.map +1 -0
  403. package/dist/node_modules/lodash/_Uint8Array.js +11 -0
  404. package/dist/node_modules/lodash/_Uint8Array.js.map +1 -0
  405. package/dist/node_modules/lodash/_WeakMap.js +12 -0
  406. package/dist/node_modules/lodash/_WeakMap.js.map +1 -0
  407. package/dist/node_modules/lodash/_apply.js +19 -0
  408. package/dist/node_modules/lodash/_apply.js.map +1 -0
  409. package/dist/node_modules/lodash/_arrayEvery.js +14 -0
  410. package/dist/node_modules/lodash/_arrayEvery.js.map +1 -0
  411. package/dist/node_modules/lodash/_arrayFilter.js +17 -0
  412. package/dist/node_modules/lodash/_arrayFilter.js.map +1 -0
  413. package/dist/node_modules/lodash/_arrayIncludes.js +15 -0
  414. package/dist/node_modules/lodash/_arrayIncludes.js.map +1 -0
  415. package/dist/node_modules/lodash/_arrayIncludesWith.js +14 -0
  416. package/dist/node_modules/lodash/_arrayIncludesWith.js.map +1 -0
  417. package/dist/node_modules/lodash/_arrayLikeKeys.js +22 -0
  418. package/dist/node_modules/lodash/_arrayLikeKeys.js.map +1 -0
  419. package/dist/node_modules/lodash/_arrayMap.js +14 -0
  420. package/dist/node_modules/lodash/_arrayMap.js.map +1 -0
  421. package/dist/node_modules/lodash/_arrayPush.js +14 -0
  422. package/dist/node_modules/lodash/_arrayPush.js.map +1 -0
  423. package/dist/node_modules/lodash/_arraySome.js +14 -0
  424. package/dist/node_modules/lodash/_arraySome.js.map +1 -0
  425. package/dist/node_modules/lodash/_asciiToArray.js +13 -0
  426. package/dist/node_modules/lodash/_asciiToArray.js.map +1 -0
  427. package/dist/node_modules/lodash/_assocIndexOf.js +16 -0
  428. package/dist/node_modules/lodash/_assocIndexOf.js.map +1 -0
  429. package/dist/node_modules/lodash/_baseAssignValue.js +20 -0
  430. package/dist/node_modules/lodash/_baseAssignValue.js.map +1 -0
  431. package/dist/node_modules/lodash/_baseEach.js +13 -0
  432. package/dist/node_modules/lodash/_baseEach.js.map +1 -0
  433. package/dist/node_modules/lodash/_baseEvery.js +18 -0
  434. package/dist/node_modules/lodash/_baseEvery.js.map +1 -0
  435. package/dist/node_modules/lodash/_baseExtremum.js +19 -0
  436. package/dist/node_modules/lodash/_baseExtremum.js.map +1 -0
  437. package/dist/node_modules/lodash/_baseFindIndex.js +14 -0
  438. package/dist/node_modules/lodash/_baseFindIndex.js.map +1 -0
  439. package/dist/node_modules/lodash/_baseFlatten.js +21 -0
  440. package/dist/node_modules/lodash/_baseFlatten.js.map +1 -0
  441. package/dist/node_modules/lodash/_baseFor.js +11 -0
  442. package/dist/node_modules/lodash/_baseFor.js.map +1 -0
  443. package/dist/node_modules/lodash/_baseForOwn.js +16 -0
  444. package/dist/node_modules/lodash/_baseForOwn.js.map +1 -0
  445. package/dist/node_modules/lodash/_baseGet.js +18 -0
  446. package/dist/node_modules/lodash/_baseGet.js.map +1 -0
  447. package/dist/node_modules/lodash/_baseGetAllKeys.js +17 -0
  448. package/dist/node_modules/lodash/_baseGetAllKeys.js.map +1 -0
  449. package/dist/node_modules/lodash/_baseGetTag.js +17 -0
  450. package/dist/node_modules/lodash/_baseGetTag.js.map +1 -0
  451. package/dist/node_modules/lodash/_baseGt.js +13 -0
  452. package/dist/node_modules/lodash/_baseGt.js.map +1 -0
  453. package/dist/node_modules/lodash/_baseHasIn.js +13 -0
  454. package/dist/node_modules/lodash/_baseHasIn.js.map +1 -0
  455. package/dist/node_modules/lodash/_baseIndexOf.js +17 -0
  456. package/dist/node_modules/lodash/_baseIndexOf.js.map +1 -0
  457. package/dist/node_modules/lodash/_baseIsArguments.js +16 -0
  458. package/dist/node_modules/lodash/_baseIsArguments.js.map +1 -0
  459. package/dist/node_modules/lodash/_baseIsEqual.js +16 -0
  460. package/dist/node_modules/lodash/_baseIsEqual.js.map +1 -0
  461. package/dist/node_modules/lodash/_baseIsEqualDeep.js +37 -0
  462. package/dist/node_modules/lodash/_baseIsEqualDeep.js.map +1 -0
  463. package/dist/node_modules/lodash/_baseIsMatch.js +33 -0
  464. package/dist/node_modules/lodash/_baseIsMatch.js.map +1 -0
  465. package/dist/node_modules/lodash/_baseIsNaN.js +13 -0
  466. package/dist/node_modules/lodash/_baseIsNaN.js.map +1 -0
  467. package/dist/node_modules/lodash/_baseIsNative.js +18 -0
  468. package/dist/node_modules/lodash/_baseIsNative.js.map +1 -0
  469. package/dist/node_modules/lodash/_baseIsTypedArray.js +18 -0
  470. package/dist/node_modules/lodash/_baseIsTypedArray.js.map +1 -0
  471. package/dist/node_modules/lodash/_baseIteratee.js +19 -0
  472. package/dist/node_modules/lodash/_baseIteratee.js.map +1 -0
  473. package/dist/node_modules/lodash/_baseKeys.js +19 -0
  474. package/dist/node_modules/lodash/_baseKeys.js.map +1 -0
  475. package/dist/node_modules/lodash/_baseLt.js +13 -0
  476. package/dist/node_modules/lodash/_baseLt.js.map +1 -0
  477. package/dist/node_modules/lodash/_baseMap.js +19 -0
  478. package/dist/node_modules/lodash/_baseMap.js.map +1 -0
  479. package/dist/node_modules/lodash/_baseMatches.js +20 -0
  480. package/dist/node_modules/lodash/_baseMatches.js.map +1 -0
  481. package/dist/node_modules/lodash/_baseMatchesProperty.js +24 -0
  482. package/dist/node_modules/lodash/_baseMatchesProperty.js.map +1 -0
  483. package/dist/node_modules/lodash/_baseOrderBy.js +39 -0
  484. package/dist/node_modules/lodash/_baseOrderBy.js.map +1 -0
  485. package/dist/node_modules/lodash/_baseProperty.js +15 -0
  486. package/dist/node_modules/lodash/_baseProperty.js.map +1 -0
  487. package/dist/node_modules/lodash/_basePropertyDeep.js +17 -0
  488. package/dist/node_modules/lodash/_basePropertyDeep.js.map +1 -0
  489. package/dist/node_modules/lodash/_baseRange.js +15 -0
  490. package/dist/node_modules/lodash/_baseRange.js.map +1 -0
  491. package/dist/node_modules/lodash/_baseRest.js +17 -0
  492. package/dist/node_modules/lodash/_baseRest.js.map +1 -0
  493. package/dist/node_modules/lodash/_baseSetToString.js +21 -0
  494. package/dist/node_modules/lodash/_baseSetToString.js.map +1 -0
  495. package/dist/node_modules/lodash/_baseSlice.js +16 -0
  496. package/dist/node_modules/lodash/_baseSlice.js.map +1 -0
  497. package/dist/node_modules/lodash/_baseSome.js +18 -0
  498. package/dist/node_modules/lodash/_baseSome.js.map +1 -0
  499. package/dist/node_modules/lodash/_baseSortBy.js +15 -0
  500. package/dist/node_modules/lodash/_baseSortBy.js.map +1 -0
  501. package/dist/node_modules/lodash/_baseTimes.js +14 -0
  502. package/dist/node_modules/lodash/_baseTimes.js.map +1 -0
  503. package/dist/node_modules/lodash/_baseToString.js +22 -0
  504. package/dist/node_modules/lodash/_baseToString.js.map +1 -0
  505. package/dist/node_modules/lodash/_baseTrim.js +15 -0
  506. package/dist/node_modules/lodash/_baseTrim.js.map +1 -0
  507. package/dist/node_modules/lodash/_baseUnary.js +15 -0
  508. package/dist/node_modules/lodash/_baseUnary.js.map +1 -0
  509. package/dist/node_modules/lodash/_baseUniq.js +34 -0
  510. package/dist/node_modules/lodash/_baseUniq.js.map +1 -0
  511. package/dist/node_modules/lodash/_cacheHas.js +13 -0
  512. package/dist/node_modules/lodash/_cacheHas.js.map +1 -0
  513. package/dist/node_modules/lodash/_castPath.js +18 -0
  514. package/dist/node_modules/lodash/_castPath.js.map +1 -0
  515. package/dist/node_modules/lodash/_castSlice.js +16 -0
  516. package/dist/node_modules/lodash/_castSlice.js.map +1 -0
  517. package/dist/node_modules/lodash/_compareAscending.js +20 -0
  518. package/dist/node_modules/lodash/_compareAscending.js.map +1 -0
  519. package/dist/node_modules/lodash/_compareMultiple.js +19 -0
  520. package/dist/node_modules/lodash/_compareMultiple.js.map +1 -0
  521. package/dist/node_modules/lodash/_coreJsData.js +11 -0
  522. package/dist/node_modules/lodash/_coreJsData.js.map +1 -0
  523. package/dist/node_modules/lodash/_createBaseEach.js +20 -0
  524. package/dist/node_modules/lodash/_createBaseEach.js.map +1 -0
  525. package/dist/node_modules/lodash/_createBaseFor.js +19 -0
  526. package/dist/node_modules/lodash/_createBaseFor.js.map +1 -0
  527. package/dist/node_modules/lodash/_createCaseFirst.js +22 -0
  528. package/dist/node_modules/lodash/_createCaseFirst.js.map +1 -0
  529. package/dist/node_modules/lodash/_createFind.js +27 -0
  530. package/dist/node_modules/lodash/_createFind.js.map +1 -0
  531. package/dist/node_modules/lodash/_createRange.js +19 -0
  532. package/dist/node_modules/lodash/_createRange.js.map +1 -0
  533. package/dist/node_modules/lodash/_createSet.js +16 -0
  534. package/dist/node_modules/lodash/_createSet.js.map +1 -0
  535. package/dist/node_modules/lodash/_defineProperty.js +17 -0
  536. package/dist/node_modules/lodash/_defineProperty.js.map +1 -0
  537. package/dist/node_modules/lodash/_equalArrays.js +42 -0
  538. package/dist/node_modules/lodash/_equalArrays.js.map +1 -0
  539. package/dist/node_modules/lodash/_equalByTag.js +42 -0
  540. package/dist/node_modules/lodash/_equalByTag.js.map +1 -0
  541. package/dist/node_modules/lodash/_equalObjects.js +39 -0
  542. package/dist/node_modules/lodash/_equalObjects.js.map +1 -0
  543. package/dist/node_modules/lodash/_freeGlobal.js +10 -0
  544. package/dist/node_modules/lodash/_freeGlobal.js.map +1 -0
  545. package/dist/node_modules/lodash/_getAllKeys.js +17 -0
  546. package/dist/node_modules/lodash/_getAllKeys.js.map +1 -0
  547. package/dist/node_modules/lodash/_getMapData.js +16 -0
  548. package/dist/node_modules/lodash/_getMapData.js.map +1 -0
  549. package/dist/node_modules/lodash/_getMatchData.js +24 -0
  550. package/dist/node_modules/lodash/_getMatchData.js.map +1 -0
  551. package/dist/node_modules/lodash/_getNative.js +17 -0
  552. package/dist/node_modules/lodash/_getNative.js.map +1 -0
  553. package/dist/node_modules/lodash/_getPrototype.js +11 -0
  554. package/dist/node_modules/lodash/_getPrototype.js.map +1 -0
  555. package/dist/node_modules/lodash/_getRawTag.js +21 -0
  556. package/dist/node_modules/lodash/_getRawTag.js.map +1 -0
  557. package/dist/node_modules/lodash/_getSymbols.js +17 -0
  558. package/dist/node_modules/lodash/_getSymbols.js.map +1 -0
  559. package/dist/node_modules/lodash/_getTag.js +28 -0
  560. package/dist/node_modules/lodash/_getTag.js.map +1 -0
  561. package/dist/node_modules/lodash/_getValue.js +13 -0
  562. package/dist/node_modules/lodash/_getValue.js.map +1 -0
  563. package/dist/node_modules/lodash/_hasPath.js +26 -0
  564. package/dist/node_modules/lodash/_hasPath.js.map +1 -0
  565. package/dist/node_modules/lodash/_hasUnicode.js +14 -0
  566. package/dist/node_modules/lodash/_hasUnicode.js.map +1 -0
  567. package/dist/node_modules/lodash/_hashClear.js +15 -0
  568. package/dist/node_modules/lodash/_hashClear.js.map +1 -0
  569. package/dist/node_modules/lodash/_hashDelete.js +14 -0
  570. package/dist/node_modules/lodash/_hashDelete.js.map +1 -0
  571. package/dist/node_modules/lodash/_hashGet.js +20 -0
  572. package/dist/node_modules/lodash/_hashGet.js.map +1 -0
  573. package/dist/node_modules/lodash/_hashHas.js +16 -0
  574. package/dist/node_modules/lodash/_hashHas.js.map +1 -0
  575. package/dist/node_modules/lodash/_hashSet.js +16 -0
  576. package/dist/node_modules/lodash/_hashSet.js.map +1 -0
  577. package/dist/node_modules/lodash/_isFlattenable.js +17 -0
  578. package/dist/node_modules/lodash/_isFlattenable.js.map +1 -0
  579. package/dist/node_modules/lodash/_isIndex.js +15 -0
  580. package/dist/node_modules/lodash/_isIndex.js.map +1 -0
  581. package/dist/node_modules/lodash/_isIterateeCall.js +20 -0
  582. package/dist/node_modules/lodash/_isIterateeCall.js.map +1 -0
  583. package/dist/node_modules/lodash/_isKey.js +18 -0
  584. package/dist/node_modules/lodash/_isKey.js.map +1 -0
  585. package/dist/node_modules/lodash/_isKeyable.js +14 -0
  586. package/dist/node_modules/lodash/_isKeyable.js.map +1 -0
  587. package/dist/node_modules/lodash/_isMasked.js +18 -0
  588. package/dist/node_modules/lodash/_isMasked.js.map +1 -0
  589. package/dist/node_modules/lodash/_isPrototype.js +15 -0
  590. package/dist/node_modules/lodash/_isPrototype.js.map +1 -0
  591. package/dist/node_modules/lodash/_isStrictComparable.js +15 -0
  592. package/dist/node_modules/lodash/_isStrictComparable.js.map +1 -0
  593. package/dist/node_modules/lodash/_listCacheClear.js +13 -0
  594. package/dist/node_modules/lodash/_listCacheClear.js.map +1 -0
  595. package/dist/node_modules/lodash/_listCacheDelete.js +16 -0
  596. package/dist/node_modules/lodash/_listCacheDelete.js.map +1 -0
  597. package/dist/node_modules/lodash/_listCacheGet.js +16 -0
  598. package/dist/node_modules/lodash/_listCacheGet.js.map +1 -0
  599. package/dist/node_modules/lodash/_listCacheHas.js +15 -0
  600. package/dist/node_modules/lodash/_listCacheHas.js.map +1 -0
  601. package/dist/node_modules/lodash/_listCacheSet.js +16 -0
  602. package/dist/node_modules/lodash/_listCacheSet.js.map +1 -0
  603. package/dist/node_modules/lodash/_mapCacheClear.js +21 -0
  604. package/dist/node_modules/lodash/_mapCacheClear.js.map +1 -0
  605. package/dist/node_modules/lodash/_mapCacheDelete.js +16 -0
  606. package/dist/node_modules/lodash/_mapCacheDelete.js.map +1 -0
  607. package/dist/node_modules/lodash/_mapCacheGet.js +15 -0
  608. package/dist/node_modules/lodash/_mapCacheGet.js.map +1 -0
  609. package/dist/node_modules/lodash/_mapCacheHas.js +15 -0
  610. package/dist/node_modules/lodash/_mapCacheHas.js.map +1 -0
  611. package/dist/node_modules/lodash/_mapCacheSet.js +16 -0
  612. package/dist/node_modules/lodash/_mapCacheSet.js.map +1 -0
  613. package/dist/node_modules/lodash/_mapToArray.js +16 -0
  614. package/dist/node_modules/lodash/_mapToArray.js.map +1 -0
  615. package/dist/node_modules/lodash/_matchesStrictComparable.js +15 -0
  616. package/dist/node_modules/lodash/_matchesStrictComparable.js.map +1 -0
  617. package/dist/node_modules/lodash/_memoizeCapped.js +18 -0
  618. package/dist/node_modules/lodash/_memoizeCapped.js.map +1 -0
  619. package/dist/node_modules/lodash/_nativeCreate.js +11 -0
  620. package/dist/node_modules/lodash/_nativeCreate.js.map +1 -0
  621. package/dist/node_modules/lodash/_nativeKeys.js +11 -0
  622. package/dist/node_modules/lodash/_nativeKeys.js.map +1 -0
  623. package/dist/node_modules/lodash/_nodeUtil.js +16 -0
  624. package/dist/node_modules/lodash/_nodeUtil.js.map +1 -0
  625. package/dist/node_modules/lodash/_objectToString.js +14 -0
  626. package/dist/node_modules/lodash/_objectToString.js.map +1 -0
  627. package/dist/node_modules/lodash/_overArg.js +15 -0
  628. package/dist/node_modules/lodash/_overArg.js.map +1 -0
  629. package/dist/node_modules/lodash/_overRest.js +20 -0
  630. package/dist/node_modules/lodash/_overRest.js.map +1 -0
  631. package/dist/node_modules/lodash/_root.js +12 -0
  632. package/dist/node_modules/lodash/_root.js.map +1 -0
  633. package/dist/node_modules/lodash/_setCacheAdd.js +14 -0
  634. package/dist/node_modules/lodash/_setCacheAdd.js.map +1 -0
  635. package/dist/node_modules/lodash/_setCacheHas.js +13 -0
  636. package/dist/node_modules/lodash/_setCacheHas.js.map +1 -0
  637. package/dist/node_modules/lodash/_setToArray.js +16 -0
  638. package/dist/node_modules/lodash/_setToArray.js.map +1 -0
  639. package/dist/node_modules/lodash/_setToString.js +13 -0
  640. package/dist/node_modules/lodash/_setToString.js.map +1 -0
  641. package/dist/node_modules/lodash/_shortOut.js +21 -0
  642. package/dist/node_modules/lodash/_shortOut.js.map +1 -0
  643. package/dist/node_modules/lodash/_stackClear.js +15 -0
  644. package/dist/node_modules/lodash/_stackClear.js.map +1 -0
  645. package/dist/node_modules/lodash/_stackDelete.js +14 -0
  646. package/dist/node_modules/lodash/_stackDelete.js.map +1 -0
  647. package/dist/node_modules/lodash/_stackGet.js +13 -0
  648. package/dist/node_modules/lodash/_stackGet.js.map +1 -0
  649. package/dist/node_modules/lodash/_stackHas.js +13 -0
  650. package/dist/node_modules/lodash/_stackHas.js.map +1 -0
  651. package/dist/node_modules/lodash/_stackSet.js +23 -0
  652. package/dist/node_modules/lodash/_stackSet.js.map +1 -0
  653. package/dist/node_modules/lodash/_strictIndexOf.js +14 -0
  654. package/dist/node_modules/lodash/_strictIndexOf.js.map +1 -0
  655. package/dist/node_modules/lodash/_stringToArray.js +17 -0
  656. package/dist/node_modules/lodash/_stringToArray.js.map +1 -0
  657. package/dist/node_modules/lodash/_stringToPath.js +17 -0
  658. package/dist/node_modules/lodash/_stringToPath.js.map +1 -0
  659. package/dist/node_modules/lodash/_toKey.js +17 -0
  660. package/dist/node_modules/lodash/_toKey.js.map +1 -0
  661. package/dist/node_modules/lodash/_toSource.js +22 -0
  662. package/dist/node_modules/lodash/_toSource.js.map +1 -0
  663. package/dist/node_modules/lodash/_trimmedEndIndex.js +15 -0
  664. package/dist/node_modules/lodash/_trimmedEndIndex.js.map +1 -0
  665. package/dist/node_modules/lodash/_unicodeToArray.js +24 -0
  666. package/dist/node_modules/lodash/_unicodeToArray.js.map +1 -0
  667. package/dist/node_modules/lodash/constant.js +15 -0
  668. package/dist/node_modules/lodash/constant.js.map +1 -0
  669. package/dist/node_modules/lodash/debounce.js +57 -0
  670. package/dist/node_modules/lodash/debounce.js.map +1 -0
  671. package/dist/node_modules/lodash/eq.js +13 -0
  672. package/dist/node_modules/lodash/eq.js.map +1 -0
  673. package/dist/node_modules/lodash/every.js +20 -0
  674. package/dist/node_modules/lodash/every.js.map +1 -0
  675. package/dist/node_modules/lodash/find.js +12 -0
  676. package/dist/node_modules/lodash/find.js.map +1 -0
  677. package/dist/node_modules/lodash/findIndex.js +20 -0
  678. package/dist/node_modules/lodash/findIndex.js.map +1 -0
  679. package/dist/node_modules/lodash/flatMap.js +16 -0
  680. package/dist/node_modules/lodash/flatMap.js.map +1 -0
  681. package/dist/node_modules/lodash/get.js +16 -0
  682. package/dist/node_modules/lodash/get.js.map +1 -0
  683. package/dist/node_modules/lodash/hasIn.js +16 -0
  684. package/dist/node_modules/lodash/hasIn.js.map +1 -0
  685. package/dist/node_modules/lodash/identity.js +13 -0
  686. package/dist/node_modules/lodash/identity.js.map +1 -0
  687. package/dist/node_modules/lodash/isArguments.js +17 -0
  688. package/dist/node_modules/lodash/isArguments.js.map +1 -0
  689. package/dist/node_modules/lodash/isArray.js +10 -0
  690. package/dist/node_modules/lodash/isArray.js.map +1 -0
  691. package/dist/node_modules/lodash/isArrayLike.js +16 -0
  692. package/dist/node_modules/lodash/isArrayLike.js.map +1 -0
  693. package/dist/node_modules/lodash/isBoolean.js +16 -0
  694. package/dist/node_modules/lodash/isBoolean.js.map +1 -0
  695. package/dist/node_modules/lodash/isBuffer.js +13 -0
  696. package/dist/node_modules/lodash/isBuffer.js.map +1 -0
  697. package/dist/node_modules/lodash/isEqual.js +15 -0
  698. package/dist/node_modules/lodash/isEqual.js.map +1 -0
  699. package/dist/node_modules/lodash/isFunction.js +18 -0
  700. package/dist/node_modules/lodash/isFunction.js.map +1 -0
  701. package/dist/node_modules/lodash/isLength.js +14 -0
  702. package/dist/node_modules/lodash/isLength.js.map +1 -0
  703. package/dist/node_modules/lodash/isNaN.js +15 -0
  704. package/dist/node_modules/lodash/isNaN.js.map +1 -0
  705. package/dist/node_modules/lodash/isNil.js +13 -0
  706. package/dist/node_modules/lodash/isNil.js.map +1 -0
  707. package/dist/node_modules/lodash/isNumber.js +16 -0
  708. package/dist/node_modules/lodash/isNumber.js.map +1 -0
  709. package/dist/node_modules/lodash/isObject.js +14 -0
  710. package/dist/node_modules/lodash/isObject.js.map +1 -0
  711. package/dist/node_modules/lodash/isObjectLike.js +13 -0
  712. package/dist/node_modules/lodash/isObjectLike.js.map +1 -0
  713. package/dist/node_modules/lodash/isPlainObject.js +21 -0
  714. package/dist/node_modules/lodash/isPlainObject.js.map +1 -0
  715. package/dist/node_modules/lodash/isString.js +17 -0
  716. package/dist/node_modules/lodash/isString.js.map +1 -0
  717. package/dist/node_modules/lodash/isSymbol.js +16 -0
  718. package/dist/node_modules/lodash/isSymbol.js.map +1 -0
  719. package/dist/node_modules/lodash/isTypedArray.js +14 -0
  720. package/dist/node_modules/lodash/isTypedArray.js.map +1 -0
  721. package/dist/node_modules/lodash/keys.js +17 -0
  722. package/dist/node_modules/lodash/keys.js.map +1 -0
  723. package/dist/node_modules/lodash/last.js +14 -0
  724. package/dist/node_modules/lodash/last.js.map +1 -0
  725. package/dist/node_modules/lodash/map.js +18 -0
  726. package/dist/node_modules/lodash/map.js.map +1 -0
  727. package/dist/node_modules/lodash/mapValues.js +20 -0
  728. package/dist/node_modules/lodash/mapValues.js.map +1 -0
  729. package/dist/node_modules/lodash/max.js +17 -0
  730. package/dist/node_modules/lodash/max.js.map +1 -0
  731. package/dist/node_modules/lodash/maxBy.js +17 -0
  732. package/dist/node_modules/lodash/maxBy.js.map +1 -0
  733. package/dist/node_modules/lodash/memoize.js +22 -0
  734. package/dist/node_modules/lodash/memoize.js.map +1 -0
  735. package/dist/node_modules/lodash/min.js +17 -0
  736. package/dist/node_modules/lodash/min.js.map +1 -0
  737. package/dist/node_modules/lodash/minBy.js +17 -0
  738. package/dist/node_modules/lodash/minBy.js.map +1 -0
  739. package/dist/node_modules/lodash/noop.js +11 -0
  740. package/dist/node_modules/lodash/noop.js.map +1 -0
  741. package/dist/node_modules/lodash/now.js +14 -0
  742. package/dist/node_modules/lodash/now.js.map +1 -0
  743. package/dist/node_modules/lodash/property.js +18 -0
  744. package/dist/node_modules/lodash/property.js.map +1 -0
  745. package/dist/node_modules/lodash/range.js +11 -0
  746. package/dist/node_modules/lodash/range.js.map +1 -0
  747. package/dist/node_modules/lodash/some.js +20 -0
  748. package/dist/node_modules/lodash/some.js.map +1 -0
  749. package/dist/node_modules/lodash/sortBy.js +19 -0
  750. package/dist/node_modules/lodash/sortBy.js.map +1 -0
  751. package/dist/node_modules/lodash/stubArray.js +13 -0
  752. package/dist/node_modules/lodash/stubArray.js.map +1 -0
  753. package/dist/node_modules/lodash/stubFalse.js +13 -0
  754. package/dist/node_modules/lodash/stubFalse.js.map +1 -0
  755. package/dist/node_modules/lodash/throttle.js +22 -0
  756. package/dist/node_modules/lodash/throttle.js.map +1 -0
  757. package/dist/node_modules/lodash/toFinite.js +15 -0
  758. package/dist/node_modules/lodash/toFinite.js.map +1 -0
  759. package/dist/node_modules/lodash/toInteger.js +16 -0
  760. package/dist/node_modules/lodash/toInteger.js.map +1 -0
  761. package/dist/node_modules/lodash/toNumber.js +26 -0
  762. package/dist/node_modules/lodash/toNumber.js.map +1 -0
  763. package/dist/node_modules/lodash/toString.js +15 -0
  764. package/dist/node_modules/lodash/toString.js.map +1 -0
  765. package/dist/node_modules/lodash/uniqBy.js +16 -0
  766. package/dist/node_modules/lodash/uniqBy.js.map +1 -0
  767. package/dist/node_modules/lodash/upperFirst.js +11 -0
  768. package/dist/node_modules/lodash/upperFirst.js.map +1 -0
  769. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +109 -0
  770. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js.map +1 -0
  771. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +132 -0
  772. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js.map +1 -0
  773. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +86 -0
  774. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js.map +1 -0
  775. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +30 -0
  776. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js.map +1 -0
  777. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +12 -0
  778. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js.map +1 -0
  779. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +15 -0
  780. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js.map +1 -0
  781. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +34 -0
  782. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js.map +1 -0
  783. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +24 -0
  784. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js.map +1 -0
  785. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +168 -0
  786. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js.map +1 -0
  787. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +11 -0
  788. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js.map +1 -0
  789. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +18 -0
  790. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js.map +1 -0
  791. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +8 -0
  792. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js.map +1 -0
  793. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +11 -0
  794. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js.map +1 -0
  795. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +47 -0
  796. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js.map +1 -0
  797. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +56 -0
  798. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js.map +1 -0
  799. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +28 -0
  800. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js.map +1 -0
  801. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +23 -0
  802. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js.map +1 -0
  803. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +63 -0
  804. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js.map +1 -0
  805. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +69 -0
  806. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js.map +1 -0
  807. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +10 -0
  808. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js.map +1 -0
  809. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +10 -0
  810. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js.map +1 -0
  811. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +14 -0
  812. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js.map +1 -0
  813. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +8 -0
  814. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js.map +1 -0
  815. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +8 -0
  816. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js.map +1 -0
  817. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +9 -0
  818. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js.map +1 -0
  819. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +20 -0
  820. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js.map +1 -0
  821. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +38 -0
  822. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js.map +1 -0
  823. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +6 -0
  824. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js.map +1 -0
  825. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +9 -0
  826. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js.map +1 -0
  827. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +24 -0
  828. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js.map +1 -0
  829. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +9 -0
  830. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js.map +1 -0
  831. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +20 -0
  832. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js.map +1 -0
  833. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +27 -0
  834. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js.map +1 -0
  835. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +29 -0
  836. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js.map +1 -0
  837. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +10 -0
  838. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js.map +1 -0
  839. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +7 -0
  840. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js.map +1 -0
  841. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +9 -0
  842. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js.map +1 -0
  843. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +21 -0
  844. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js.map +1 -0
  845. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +8 -0
  846. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js.map +1 -0
  847. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +18 -0
  848. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js.map +1 -0
  849. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +15 -0
  850. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js.map +1 -0
  851. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +6 -0
  852. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js.map +1 -0
  853. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +13 -0
  854. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js.map +1 -0
  855. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +37 -0
  856. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js.map +1 -0
  857. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +27 -0
  858. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js.map +1 -0
  859. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +26 -0
  860. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js.map +1 -0
  861. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +11 -0
  862. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js.map +1 -0
  863. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +10 -0
  864. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js.map +1 -0
  865. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +10 -0
  866. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js.map +1 -0
  867. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +10 -0
  868. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js.map +1 -0
  869. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +19 -0
  870. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js.map +1 -0
  871. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +8 -0
  872. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js.map +1 -0
  873. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +32 -0
  874. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js.map +1 -0
  875. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +8 -0
  876. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js.map +1 -0
  877. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +7 -0
  878. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js.map +1 -0
  879. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +15 -0
  880. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js.map +1 -0
  881. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +35 -0
  882. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js.map +1 -0
  883. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +17 -0
  884. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js.map +1 -0
  885. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +12 -0
  886. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js.map +1 -0
  887. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +13 -0
  888. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js.map +1 -0
  889. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +38 -0
  890. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js.map +1 -0
  891. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +35 -0
  892. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js.map +1 -0
  893. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +23 -0
  894. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js.map +1 -0
  895. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +30 -0
  896. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js.map +1 -0
  897. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +6 -0
  898. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js.map +1 -0
  899. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +6 -0
  900. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js.map +1 -0
  901. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +6 -0
  902. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js.map +1 -0
  903. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +18 -0
  904. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js.map +1 -0
  905. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +31 -0
  906. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js.map +1 -0
  907. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +41 -0
  908. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js.map +1 -0
  909. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +14 -0
  910. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js.map +1 -0
  911. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +45 -0
  912. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js.map +1 -0
  913. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +32 -0
  914. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js.map +1 -0
  915. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +31 -0
  916. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js.map +1 -0
  917. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +20 -0
  918. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js.map +1 -0
  919. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +30 -0
  920. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js.map +1 -0
  921. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +15 -0
  922. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js.map +1 -0
  923. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +24 -0
  924. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js.map +1 -0
  925. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +590 -0
  926. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js.map +1 -0
  927. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +9 -0
  928. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js.map +1 -0
  929. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +53 -0
  930. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js.map +1 -0
  931. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +15 -0
  932. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js.map +1 -0
  933. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +15 -0
  934. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js.map +1 -0
  935. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +23 -0
  936. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js.map +1 -0
  937. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +14 -0
  938. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js.map +1 -0
  939. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +6 -0
  940. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js.map +1 -0
  941. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +8 -0
  942. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js.map +1 -0
  943. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +21 -0
  944. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js.map +1 -0
  945. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +20 -0
  946. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js.map +1 -0
  947. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +14 -0
  948. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js.map +1 -0
  949. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +11 -0
  950. package/dist/node_modules/motion-dom/dist/es/render/Feature.js.map +1 -0
  951. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +206 -0
  952. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js.map +1 -0
  953. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +30 -0
  954. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js.map +1 -0
  955. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +6 -0
  956. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js.map +1 -0
  957. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +58 -0
  958. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js.map +1 -0
  959. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +9 -0
  960. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js.map +1 -0
  961. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +8 -0
  962. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js.map +1 -0
  963. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +37 -0
  964. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js.map +1 -0
  965. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +30 -0
  966. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js.map +1 -0
  967. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +37 -0
  968. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js.map +1 -0
  969. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +10 -0
  970. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js.map +1 -0
  971. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +13 -0
  972. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js.map +1 -0
  973. package/dist/node_modules/motion-dom/dist/es/render/store.js +6 -0
  974. package/dist/node_modules/motion-dom/dist/es/render/store.js.map +1 -0
  975. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +42 -0
  976. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js.map +1 -0
  977. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +24 -0
  978. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js.map +1 -0
  979. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +30 -0
  980. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js.map +1 -0
  981. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +6 -0
  982. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js.map +1 -0
  983. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +17 -0
  984. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js.map +1 -0
  985. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +12 -0
  986. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js.map +1 -0
  987. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +16 -0
  988. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js.map +1 -0
  989. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +137 -0
  990. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js.map +1 -0
  991. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +21 -0
  992. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js.map +1 -0
  993. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +8 -0
  994. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js.map +1 -0
  995. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +14 -0
  996. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js.map +1 -0
  997. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +10 -0
  998. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js.map +1 -0
  999. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +6 -0
  1000. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js.map +1 -0
  1001. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +8 -0
  1002. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js.map +1 -0
  1003. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +15 -0
  1004. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js.map +1 -0
  1005. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +24 -0
  1006. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js.map +1 -0
  1007. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +23 -0
  1008. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js.map +1 -0
  1009. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +13 -0
  1010. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js.map +1 -0
  1011. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +6 -0
  1012. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js.map +1 -0
  1013. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +10 -0
  1014. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js.map +1 -0
  1015. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +22 -0
  1016. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js.map +1 -0
  1017. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +22 -0
  1018. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js.map +1 -0
  1019. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +12 -0
  1020. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js.map +1 -0
  1021. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +14 -0
  1022. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js.map +1 -0
  1023. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +39 -0
  1024. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js.map +1 -0
  1025. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +24 -0
  1026. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js.map +1 -0
  1027. package/dist/node_modules/motion-dom/dist/es/resize/index.js +10 -0
  1028. package/dist/node_modules/motion-dom/dist/es/resize/index.js.map +1 -0
  1029. package/dist/node_modules/motion-dom/dist/es/stats/animation-count.js +10 -0
  1030. package/dist/node_modules/motion-dom/dist/es/stats/animation-count.js.map +1 -0
  1031. package/dist/node_modules/motion-dom/dist/es/stats/buffer.js +9 -0
  1032. package/dist/node_modules/motion-dom/dist/es/stats/buffer.js.map +1 -0
  1033. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +14 -0
  1034. package/dist/node_modules/motion-dom/dist/es/utils/delay.js.map +1 -0
  1035. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +35 -0
  1036. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js.map +1 -0
  1037. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +9 -0
  1038. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js.map +1 -0
  1039. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +9 -0
  1040. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js.map +1 -0
  1041. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +9 -0
  1042. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js.map +1 -0
  1043. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +32 -0
  1044. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js.map +1 -0
  1045. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +54 -0
  1046. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js.map +1 -0
  1047. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +8 -0
  1048. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js.map +1 -0
  1049. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +10 -0
  1050. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js.map +1 -0
  1051. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +6 -0
  1052. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js.map +1 -0
  1053. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +9 -0
  1054. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js.map +1 -0
  1055. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +16 -0
  1056. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js.map +1 -0
  1057. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +6 -0
  1058. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js.map +1 -0
  1059. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +14 -0
  1060. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js.map +1 -0
  1061. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +11 -0
  1062. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js.map +1 -0
  1063. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +7 -0
  1064. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js.map +1 -0
  1065. package/dist/node_modules/motion-dom/dist/es/value/index.js +94 -0
  1066. package/dist/node_modules/motion-dom/dist/es/value/index.js.map +1 -0
  1067. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +9 -0
  1068. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js.map +1 -0
  1069. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +21 -0
  1070. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js.map +1 -0
  1071. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +23 -0
  1072. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js.map +1 -0
  1073. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +14 -0
  1074. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js.map +1 -0
  1075. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +17 -0
  1076. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js.map +1 -0
  1077. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +17 -0
  1078. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js.map +1 -0
  1079. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +18 -0
  1080. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js.map +1 -0
  1081. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +28 -0
  1082. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js.map +1 -0
  1083. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +54 -0
  1084. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js.map +1 -0
  1085. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +16 -0
  1086. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js.map +1 -0
  1087. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +18 -0
  1088. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js.map +1 -0
  1089. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +10 -0
  1090. package/dist/node_modules/motion-dom/dist/es/value/types/int.js.map +1 -0
  1091. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +26 -0
  1092. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js.map +1 -0
  1093. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +66 -0
  1094. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js.map +1 -0
  1095. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +33 -0
  1096. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js.map +1 -0
  1097. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +17 -0
  1098. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js.map +1 -0
  1099. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +14 -0
  1100. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js.map +1 -0
  1101. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +6 -0
  1102. package/dist/node_modules/motion-dom/dist/es/value/types/test.js.map +1 -0
  1103. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +14 -0
  1104. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js.map +1 -0
  1105. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +6 -0
  1106. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js.map +1 -0
  1107. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +14 -0
  1108. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js.map +1 -0
  1109. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +6 -0
  1110. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js.map +1 -0
  1111. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +6 -0
  1112. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js.map +1 -0
  1113. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +8 -0
  1114. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js.map +1 -0
  1115. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +6 -0
  1116. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js.map +1 -0
  1117. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +6 -0
  1118. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js.map +1 -0
  1119. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +6 -0
  1120. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js.map +1 -0
  1121. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +9 -0
  1122. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js.map +1 -0
  1123. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +15 -0
  1124. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js.map +1 -0
  1125. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +9 -0
  1126. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js.map +1 -0
  1127. package/dist/node_modules/motion-utils/dist/es/array.js +12 -0
  1128. package/dist/node_modules/motion-utils/dist/es/array.js.map +1 -0
  1129. package/dist/node_modules/motion-utils/dist/es/clamp.js +6 -0
  1130. package/dist/node_modules/motion-utils/dist/es/clamp.js.map +1 -0
  1131. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +7 -0
  1132. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js.map +1 -0
  1133. package/dist/node_modules/motion-utils/dist/es/easing/back.js +9 -0
  1134. package/dist/node_modules/motion-utils/dist/es/easing/back.js.map +1 -0
  1135. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +8 -0
  1136. package/dist/node_modules/motion-utils/dist/es/easing/circ.js.map +1 -0
  1137. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +19 -0
  1138. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js.map +1 -0
  1139. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +7 -0
  1140. package/dist/node_modules/motion-utils/dist/es/easing/ease.js.map +1 -0
  1141. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +6 -0
  1142. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js.map +1 -0
  1143. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +6 -0
  1144. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js.map +1 -0
  1145. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +6 -0
  1146. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js.map +1 -0
  1147. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +6 -0
  1148. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js.map +1 -0
  1149. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +33 -0
  1150. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js.map +1 -0
  1151. package/dist/node_modules/motion-utils/dist/es/errors.js +12 -0
  1152. package/dist/node_modules/motion-utils/dist/es/errors.js.map +1 -0
  1153. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +8 -0
  1154. package/dist/node_modules/motion-utils/dist/es/format-error-message.js.map +1 -0
  1155. package/dist/node_modules/motion-utils/dist/es/global-config.js +6 -0
  1156. package/dist/node_modules/motion-utils/dist/es/global-config.js.map +1 -0
  1157. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +6 -0
  1158. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js.map +1 -0
  1159. package/dist/node_modules/motion-utils/dist/es/is-object.js +8 -0
  1160. package/dist/node_modules/motion-utils/dist/es/is-object.js.map +1 -0
  1161. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +6 -0
  1162. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js.map +1 -0
  1163. package/dist/node_modules/motion-utils/dist/es/memo.js +10 -0
  1164. package/dist/node_modules/motion-utils/dist/es/memo.js.map +1 -0
  1165. package/dist/node_modules/motion-utils/dist/es/noop.js +6 -0
  1166. package/dist/node_modules/motion-utils/dist/es/noop.js.map +1 -0
  1167. package/dist/node_modules/motion-utils/dist/es/pipe.js +6 -0
  1168. package/dist/node_modules/motion-utils/dist/es/pipe.js.map +1 -0
  1169. package/dist/node_modules/motion-utils/dist/es/progress.js +9 -0
  1170. package/dist/node_modules/motion-utils/dist/es/progress.js.map +1 -0
  1171. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +28 -0
  1172. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js.map +1 -0
  1173. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +6 -0
  1174. package/dist/node_modules/motion-utils/dist/es/time-conversion.js.map +1 -0
  1175. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +8 -0
  1176. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js.map +1 -0
  1177. package/dist/node_modules/motion-utils/dist/es/warn-once.js +10 -0
  1178. package/dist/node_modules/motion-utils/dist/es/warn-once.js.map +1 -0
  1179. package/dist/node_modules/object-assign/index.js +41 -0
  1180. package/dist/node_modules/object-assign/index.js.map +1 -0
  1181. package/dist/node_modules/prop-types/checkPropTypes.js +46 -0
  1182. package/dist/node_modules/prop-types/checkPropTypes.js.map +1 -0
  1183. package/dist/node_modules/prop-types/factoryWithThrowingShims.js +49 -0
  1184. package/dist/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -0
  1185. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +272 -0
  1186. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -0
  1187. package/dist/node_modules/prop-types/index.js +16 -0
  1188. package/dist/node_modules/prop-types/index.js.map +1 -0
  1189. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +10 -0
  1190. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -0
  1191. package/dist/node_modules/prop-types/lib/has.js +10 -0
  1192. package/dist/node_modules/prop-types/lib/has.js.map +1 -0
  1193. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +84 -0
  1194. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  1195. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +64 -0
  1196. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
  1197. package/dist/node_modules/prop-types/node_modules/react-is/index.js +12 -0
  1198. package/dist/node_modules/prop-types/node_modules/react-is/index.js.map +1 -0
  1199. package/dist/node_modules/react-is/cjs/react-is.development.js +87 -0
  1200. package/dist/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  1201. package/dist/node_modules/react-is/cjs/react-is.production.min.js +65 -0
  1202. package/dist/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
  1203. package/dist/node_modules/react-is/index.js +12 -0
  1204. package/dist/node_modules/react-is/index.js.map +1 -0
  1205. package/dist/node_modules/react-smooth/es6/Animate.js +374 -0
  1206. package/dist/node_modules/react-smooth/es6/Animate.js.map +1 -0
  1207. package/dist/node_modules/react-smooth/es6/AnimateManager.js +73 -0
  1208. package/dist/node_modules/react-smooth/es6/AnimateManager.js.map +1 -0
  1209. package/dist/node_modules/react-smooth/es6/configUpdate.js +173 -0
  1210. package/dist/node_modules/react-smooth/es6/configUpdate.js.map +1 -0
  1211. package/dist/node_modules/react-smooth/es6/easing.js +152 -0
  1212. package/dist/node_modules/react-smooth/es6/easing.js.map +1 -0
  1213. package/dist/node_modules/react-smooth/es6/index.js +9 -0
  1214. package/dist/node_modules/react-smooth/es6/index.js.map +1 -0
  1215. package/dist/node_modules/react-smooth/es6/setRafTimeout.js +14 -0
  1216. package/dist/node_modules/react-smooth/es6/setRafTimeout.js.map +1 -0
  1217. package/dist/node_modules/react-smooth/es6/util.js +92 -0
  1218. package/dist/node_modules/react-smooth/es6/util.js.map +1 -0
  1219. package/dist/node_modules/recharts/es6/cartesian/Area.js +435 -0
  1220. package/dist/node_modules/recharts/es6/cartesian/Area.js.map +1 -0
  1221. package/dist/node_modules/recharts/es6/cartesian/Bar.js +387 -0
  1222. package/dist/node_modules/recharts/es6/cartesian/Bar.js.map +1 -0
  1223. package/dist/node_modules/recharts/es6/cartesian/Brush.js +499 -0
  1224. package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +1 -0
  1225. package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js +338 -0
  1226. package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js.map +1 -0
  1227. package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js +243 -0
  1228. package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +1 -0
  1229. package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js +173 -0
  1230. package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +1 -0
  1231. package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js +178 -0
  1232. package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +1 -0
  1233. package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js +254 -0
  1234. package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +1 -0
  1235. package/dist/node_modules/recharts/es6/cartesian/XAxis.js +144 -0
  1236. package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +1 -0
  1237. package/dist/node_modules/recharts/es6/cartesian/YAxis.js +143 -0
  1238. package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +1 -0
  1239. package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js +18 -0
  1240. package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js.map +1 -0
  1241. package/dist/node_modules/recharts/es6/cartesian/getTicks.js +121 -0
  1242. package/dist/node_modules/recharts/es6/cartesian/getTicks.js.map +1 -0
  1243. package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js +101 -0
  1244. package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js.map +1 -0
  1245. package/dist/node_modules/recharts/es6/chart/AreaChart.js +22 -0
  1246. package/dist/node_modules/recharts/es6/chart/AreaChart.js.map +1 -0
  1247. package/dist/node_modules/recharts/es6/chart/BarChart.js +24 -0
  1248. package/dist/node_modules/recharts/es6/chart/BarChart.js.map +1 -0
  1249. package/dist/node_modules/recharts/es6/chart/PieChart.js +34 -0
  1250. package/dist/node_modules/recharts/es6/chart/PieChart.js.map +1 -0
  1251. package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js +1245 -0
  1252. package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js.map +1 -0
  1253. package/dist/node_modules/recharts/es6/component/Cell.js +9 -0
  1254. package/dist/node_modules/recharts/es6/component/Cell.js.map +1 -0
  1255. package/dist/node_modules/recharts/es6/component/Cursor.js +93 -0
  1256. package/dist/node_modules/recharts/es6/component/Cursor.js.map +1 -0
  1257. package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +237 -0
  1258. package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js.map +1 -0
  1259. package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js +171 -0
  1260. package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js.map +1 -0
  1261. package/dist/node_modules/recharts/es6/component/Label.js +353 -0
  1262. package/dist/node_modules/recharts/es6/component/Label.js.map +1 -0
  1263. package/dist/node_modules/recharts/es6/component/LabelList.js +166 -0
  1264. package/dist/node_modules/recharts/es6/component/LabelList.js.map +1 -0
  1265. package/dist/node_modules/recharts/es6/component/Legend.js +234 -0
  1266. package/dist/node_modules/recharts/es6/component/Legend.js.map +1 -0
  1267. package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +187 -0
  1268. package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +1 -0
  1269. package/dist/node_modules/recharts/es6/component/Text.js +225 -0
  1270. package/dist/node_modules/recharts/es6/component/Text.js.map +1 -0
  1271. package/dist/node_modules/recharts/es6/component/Tooltip.js +182 -0
  1272. package/dist/node_modules/recharts/es6/component/Tooltip.js.map +1 -0
  1273. package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js +198 -0
  1274. package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js.map +1 -0
  1275. package/dist/node_modules/recharts/es6/container/Layer.js +40 -0
  1276. package/dist/node_modules/recharts/es6/container/Layer.js.map +1 -0
  1277. package/dist/node_modules/recharts/es6/container/Surface.js +60 -0
  1278. package/dist/node_modules/recharts/es6/container/Surface.js.map +1 -0
  1279. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +46 -0
  1280. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -0
  1281. package/dist/node_modules/recharts/es6/polar/Pie.js +435 -0
  1282. package/dist/node_modules/recharts/es6/polar/Pie.js.map +1 -0
  1283. package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js +215 -0
  1284. package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js.map +1 -0
  1285. package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js +268 -0
  1286. package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js.map +1 -0
  1287. package/dist/node_modules/recharts/es6/shape/Cross.js +112 -0
  1288. package/dist/node_modules/recharts/es6/shape/Cross.js.map +1 -0
  1289. package/dist/node_modules/recharts/es6/shape/Curve.js +136 -0
  1290. package/dist/node_modules/recharts/es6/shape/Curve.js.map +1 -0
  1291. package/dist/node_modules/recharts/es6/shape/Dot.js +27 -0
  1292. package/dist/node_modules/recharts/es6/shape/Dot.js.map +1 -0
  1293. package/dist/node_modules/recharts/es6/shape/Polygon.js +112 -0
  1294. package/dist/node_modules/recharts/es6/shape/Polygon.js.map +1 -0
  1295. package/dist/node_modules/recharts/es6/shape/Rectangle.js +205 -0
  1296. package/dist/node_modules/recharts/es6/shape/Rectangle.js.map +1 -0
  1297. package/dist/node_modules/recharts/es6/shape/Sector.js +192 -0
  1298. package/dist/node_modules/recharts/es6/shape/Sector.js.map +1 -0
  1299. package/dist/node_modules/recharts/es6/shape/Symbols.js +143 -0
  1300. package/dist/node_modules/recharts/es6/shape/Symbols.js.map +1 -0
  1301. package/dist/node_modules/recharts/es6/shape/Trapezoid.js +175 -0
  1302. package/dist/node_modules/recharts/es6/shape/Trapezoid.js.map +1 -0
  1303. package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +181 -0
  1304. package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js.map +1 -0
  1305. package/dist/node_modules/recharts/es6/util/BarUtils.js +112 -0
  1306. package/dist/node_modules/recharts/es6/util/BarUtils.js.map +1 -0
  1307. package/dist/node_modules/recharts/es6/util/CartesianUtils.js +234 -0
  1308. package/dist/node_modules/recharts/es6/util/CartesianUtils.js.map +1 -0
  1309. package/dist/node_modules/recharts/es6/util/ChartUtils.js +554 -0
  1310. package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -0
  1311. package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js +70 -0
  1312. package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js.map +1 -0
  1313. package/dist/node_modules/recharts/es6/util/DOMUtils.js +108 -0
  1314. package/dist/node_modules/recharts/es6/util/DOMUtils.js.map +1 -0
  1315. package/dist/node_modules/recharts/es6/util/DataUtils.js +57 -0
  1316. package/dist/node_modules/recharts/es6/util/DataUtils.js.map +1 -0
  1317. package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js +58 -0
  1318. package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js.map +1 -0
  1319. package/dist/node_modules/recharts/es6/util/Events.js +7 -0
  1320. package/dist/node_modules/recharts/es6/util/Events.js.map +1 -0
  1321. package/dist/node_modules/recharts/es6/util/Global.js +21 -0
  1322. package/dist/node_modules/recharts/es6/util/Global.js.map +1 -0
  1323. package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js +9 -0
  1324. package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js.map +1 -0
  1325. package/dist/node_modules/recharts/es6/util/LogUtils.js +15 -0
  1326. package/dist/node_modules/recharts/es6/util/LogUtils.js.map +1 -0
  1327. package/dist/node_modules/recharts/es6/util/PolarUtils.js +198 -0
  1328. package/dist/node_modules/recharts/es6/util/PolarUtils.js.map +1 -0
  1329. package/dist/node_modules/recharts/es6/util/ReactUtils.js +137 -0
  1330. package/dist/node_modules/recharts/es6/util/ReactUtils.js.map +1 -0
  1331. package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js +181 -0
  1332. package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js.map +1 -0
  1333. package/dist/node_modules/recharts/es6/util/ShallowEqual.js +10 -0
  1334. package/dist/node_modules/recharts/es6/util/ShallowEqual.js.map +1 -0
  1335. package/dist/node_modules/recharts/es6/util/TickUtils.js +31 -0
  1336. package/dist/node_modules/recharts/es6/util/TickUtils.js.map +1 -0
  1337. package/dist/node_modules/recharts/es6/util/calculateViewBox.js +25 -0
  1338. package/dist/node_modules/recharts/es6/util/calculateViewBox.js.map +1 -0
  1339. package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js +23 -0
  1340. package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js.map +1 -0
  1341. package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js +16 -0
  1342. package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js.map +1 -0
  1343. package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js +17 -0
  1344. package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js.map +1 -0
  1345. package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js +12 -0
  1346. package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js.map +1 -0
  1347. package/dist/node_modules/recharts/es6/util/getLegendProps.js +88 -0
  1348. package/dist/node_modules/recharts/es6/util/getLegendProps.js.map +1 -0
  1349. package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js +13 -0
  1350. package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js.map +1 -0
  1351. package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js +12 -0
  1352. package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js.map +1 -0
  1353. package/dist/node_modules/recharts/es6/util/tooltip/translate.js +87 -0
  1354. package/dist/node_modules/recharts/es6/util/tooltip/translate.js.map +1 -0
  1355. package/dist/node_modules/recharts/es6/util/types.js +43 -0
  1356. package/dist/node_modules/recharts/es6/util/types.js.map +1 -0
  1357. package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js +132 -0
  1358. package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js.map +1 -0
  1359. package/dist/node_modules/recharts-scale/es6/index.js +1 -0
  1360. package/dist/node_modules/recharts-scale/es6/util/arithmetic.js +32 -0
  1361. package/dist/node_modules/recharts-scale/es6/util/arithmetic.js.map +1 -0
  1362. package/dist/node_modules/recharts-scale/es6/util/utils.js +79 -0
  1363. package/dist/node_modules/recharts-scale/es6/util/utils.js.map +1 -0
  1364. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1716 -0
  1365. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  1366. package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +13 -0
  1367. package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js.map +1 -0
  1368. package/dist/node_modules/victory-vendor/es/d3-scale.js +53 -0
  1369. package/dist/node_modules/victory-vendor/es/d3-scale.js.map +1 -0
  1370. package/package.json +5 -4
@@ -0,0 +1,20 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (e && (t = e(e = 0)), t), s = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), c = (e, n) => {
3
+ let r = {};
4
+ for (var i in e) t(r, i, {
5
+ get: e[i],
6
+ enumerable: !0
7
+ });
8
+ return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
9
+ }, l = (e, i, o, s) => {
10
+ if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
11
+ get: ((e) => i[e]).bind(null, d),
12
+ enumerable: !(s = n(i, d)) || s.enumerable
13
+ });
14
+ return e;
15
+ }, u = (n, r, a) => (a = n == null ? {} : e(i(n)), l(r || !n || !n.__esModule ? t(a, "default", {
16
+ value: n,
17
+ enumerable: !0
18
+ }) : a, n)), d = (e) => a.call(e, "module.exports") ? e["module.exports"] : l(t({}, "__esModule", { value: !0 }), e);
19
+ //#endregion
20
+ export { s as __commonJSMin, o as __esmMin, c as __exportAll, d as __toCommonJS, u as __toESM };
@@ -1 +1 @@
1
- {"version":3,"file":"LoadMore.js","names":[],"sources":["../../../src/brainyrich/components/LoadMore.tsx"],"sourcesContent":["/**\n * \"Load more\" button for cursor-paginated list pages.\n * @module brainyrich/components/LoadMore\n *\n * Pair with the `usePaged*` hooks in `../hooks/useBrainyRichApi` (they expose\n * `hasMore`, `loadMore`, `isFetchingNextPage`). Renders nothing when there is\n * no next page, so it can be dropped unconditionally at the end of a list.\n */\n\nimport { Loader2 } from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\n\nexport interface LoadMoreProps {\n /** Whether another page exists. Component renders null when false. */\n hasMore: boolean;\n /** Fetch the next page. */\n onClick: () => void;\n /** Next-page fetch in flight. */\n loading?: boolean;\n label?: string;\n loadingLabel?: string;\n className?: string;\n}\n\nexport function LoadMore({\n hasMore,\n onClick,\n loading = false,\n label = 'Load more',\n loadingLabel = 'Loading…',\n className = '',\n}: LoadMoreProps) {\n if (!hasMore) return null;\n return (\n <div className={`flex justify-center pt-4 ${className}`}>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={onClick}\n disabled={loading}\n aria-busy={loading}\n >\n {loading ? (\n <>\n <Loader2 className=\"size-4 motion-safe:animate-spin\" aria-hidden=\"true\" />\n {loadingLabel}\n </>\n ) : (\n label\n )}\n </Button>\n </div>\n );\n}\n"],"mappings":";;;;AAwBA,SAAgB,EAAS,EACvB,YACA,YACA,aAAU,IACV,WAAQ,aACR,kBAAe,YACf,eAAY,MACI;AAEhB,QADK,IAEH,kBAAC,OAAD;EAAK,WAAW,4BAA4B;YAC1C,kBAAC,GAAD;GACE,SAAQ;GACR,MAAK;GACI;GACT,UAAU;GACV,aAAW;aAEV,IACC,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;IAAS,WAAU;IAAkC,eAAY;IAAS,CAAA,EACzE,EACA,EAAA,CAAA,GAEH;GAEK,CAAA;EACL,CAAA,GAnBa"}
1
+ {"version":3,"file":"LoadMore.js","names":[],"sources":["../../../src/brainyrich/components/LoadMore.tsx"],"sourcesContent":["/**\n * \"Load more\" button for cursor-paginated list pages.\n * @module brainyrich/components/LoadMore\n *\n * Pair with the `usePaged*` hooks in `../hooks/useBrainyRichApi` (they expose\n * `hasMore`, `loadMore`, `isFetchingNextPage`). Renders nothing when there is\n * no next page, so it can be dropped unconditionally at the end of a list.\n */\n\nimport { Loader2 } from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\n\nexport interface LoadMoreProps {\n /** Whether another page exists. Component renders null when false. */\n hasMore: boolean;\n /** Fetch the next page. */\n onClick: () => void;\n /** Next-page fetch in flight. */\n loading?: boolean;\n label?: string;\n loadingLabel?: string;\n className?: string;\n}\n\nexport function LoadMore({\n hasMore,\n onClick,\n loading = false,\n label = 'Load more',\n loadingLabel = 'Loading…',\n className = '',\n}: LoadMoreProps) {\n if (!hasMore) return null;\n return (\n <div className={`flex justify-center pt-4 ${className}`}>\n <Button variant=\"outline\" size=\"sm\" onClick={onClick} disabled={loading} aria-busy={loading}>\n {loading ? (\n <>\n <Loader2 className=\"size-4 motion-safe:animate-spin\" aria-hidden=\"true\" />\n {loadingLabel}\n </>\n ) : (\n label\n )}\n </Button>\n </div>\n );\n}\n"],"mappings":";;;;AAwBA,SAAgB,EAAS,EACvB,YACA,YACA,aAAU,IACV,WAAQ,aACR,kBAAe,YACf,eAAY,MACI;AAEhB,QADK,IAEH,kBAAC,OAAD;EAAK,WAAW,4BAA4B;YAC1C,kBAAC,GAAD;GAAQ,SAAQ;GAAU,MAAK;GAAc;GAAS,UAAU;GAAS,aAAW;aACjF,IACC,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;IAAS,WAAU;IAAkC,eAAY;IAAS,CAAA,EACzE,EACA,EAAA,CAAA,GAEH;GAEK,CAAA;EACL,CAAA,GAba"}
@@ -2,4 +2,5 @@ import "./notify.js";
2
2
  import "./LoadMore.js";
3
3
  import "./ConfirmDialog.js";
4
4
  import "./ActorName.js";
5
+ import "./viz.js";
5
6
  import "./pickers.js";
@@ -1 +1 @@
1
- {"version":3,"file":"pickers.js","names":[],"sources":["../../../src/brainyrich/components/pickers.tsx"],"sourcesContent":["/**\n * Reusable entity / subject pickers.\n * @module brainyrich/components/pickers\n *\n * - `SubjectPicker` — encodes `SUBJECT_TYPE:id` across accounts, portfolios,\n * goals and households (for the AiAssistant insight subject).\n * - `EntityPicker` — generic account / household Select returning a bare id.\n * - `AccountPicker` — convenience wrapper (kind=\"account\").\n * - `HouseholdPicker` — OPTIONAL household Select with a \"None\" option, for the\n * account create/edit form (accounts can be linked to a\n * household). Never a dead-end when no households exist.\n *\n * When a *required* source list is empty every picker renders a CTA that routes\n * the user to create the missing entity instead of showing an empty dropdown.\n */\n\nimport { Loader2 } from 'lucide-react';\nimport {\n Button,\n Label,\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectTrigger,\n SelectValue,\n} from '@burdenoff/fe-libs/ui';\nimport { useAccounts, useGoals, useHouseholds, usePortfolios } from '../hooks/useBrainyRichApi';\nimport { useBrainyRich } from '../providers/BrainyRichProvider';\nimport { joinPath } from '../utils/navigation';\n\n// ============================================================================\n// Subject encoding (matches the SDL `subjectType` convention — uppercase)\n// ============================================================================\n\nexport const SUBJECT_KINDS = ['ACCOUNT', 'PORTFOLIO', 'GOAL', 'HOUSEHOLD'] as const;\nexport type SubjectKind = (typeof SUBJECT_KINDS)[number];\n\nconst SUBJECT_KIND_LABEL: Record<SubjectKind, string> = {\n ACCOUNT: 'Account',\n PORTFOLIO: 'Portfolio',\n GOAL: 'Goal',\n HOUSEHOLD: 'Household',\n};\n\n/** Encode a subject selection as the `SUBJECT_TYPE:id` token a SubjectPicker emits. */\nexport function encodeSubject(kind: SubjectKind, id: string): string {\n return `${kind}:${id}`;\n}\n\n/** Decode a `SUBJECT_TYPE:id` token back into `{ subjectType, subjectId }`. */\nexport function parseSubject(\n value: string | null | undefined\n): { subjectType: SubjectKind; subjectId: string } | null {\n if (!value) return null;\n const idx = value.indexOf(':');\n if (idx < 0) return null;\n const kind = value.slice(0, idx) as SubjectKind;\n const id = value.slice(idx + 1);\n if (!SUBJECT_KINDS.includes(kind) || !id) return null;\n return { subjectType: kind, subjectId: id };\n}\n\n// ============================================================================\n// Shared empty-state CTA (routes to the create surface, never a dead-end)\n// ============================================================================\n\nfunction PickerCTA({ message, cta, relativePath }: { message: string; cta: string; relativePath: string }) {\n const { basePath = '/', navigate } = useBrainyRich();\n const target = joinPath(basePath, relativePath);\n return (\n <div className=\"rounded-lg border border-dashed border-border-subtle bg-bg-surface px-4 py-3 text-sm\">\n <p className=\"text-text-secondary\">{message}</p>\n {navigate ? (\n <Button variant=\"outline\" size=\"sm\" className=\"mt-2\" onClick={() => navigate(target)}>\n {cta}\n </Button>\n ) : null}\n </div>\n );\n}\n\nfunction PickerLoading({ id, label }: { id?: string; label?: string }) {\n return (\n <div className=\"space-y-2\">\n {label ? <Label htmlFor={id}>{label}</Label> : null}\n <div\n className=\"flex h-9 items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-secondary\"\n aria-busy=\"true\"\n >\n <Loader2 className=\"size-4 motion-safe:animate-spin\" aria-hidden=\"true\" />\n Loading…\n </div>\n </div>\n );\n}\n\n// ============================================================================\n// SubjectPicker — accounts + portfolios + goals + households\n// ============================================================================\n\nexport interface SubjectPickerProps {\n /** Current `SUBJECT_TYPE:id` token, or empty. */\n value?: string;\n onChange: (value: string) => void;\n id?: string;\n label?: string;\n placeholder?: string;\n disabled?: boolean;\n}\n\nexport function SubjectPicker({\n value,\n onChange,\n id = 'subject-picker',\n label = 'Subject',\n placeholder = 'Select a subject',\n disabled = false,\n}: SubjectPickerProps) {\n const accounts = useAccounts();\n const portfolios = usePortfolios();\n const goals = useGoals();\n const households = useHouseholds();\n\n const loading =\n accounts.isLoading || portfolios.isLoading || goals.isLoading || households.isLoading;\n const total =\n accounts.data.length + portfolios.data.length + goals.data.length + households.data.length;\n\n if (loading) return <PickerLoading id={id} label={label} />;\n\n if (total === 0) {\n return (\n <div className=\"space-y-2\">\n {label ? <Label htmlFor={id}>{label}</Label> : null}\n <PickerCTA\n message=\"No accounts, portfolios, goals or households yet — create one to attach this insight.\"\n cta=\"Create an account\"\n relativePath=\"accounts\"\n />\n </div>\n );\n }\n\n const groups: Array<{ kind: SubjectKind; items: Array<{ id: string; name: string }> }> = [\n { kind: 'ACCOUNT', items: accounts.data.map((a) => ({ id: a.id, name: a.name })) },\n { kind: 'PORTFOLIO', items: portfolios.data.map((p) => ({ id: p.id, name: p.name })) },\n { kind: 'GOAL', items: goals.data.map((g) => ({ id: g.id, name: g.name })) },\n { kind: 'HOUSEHOLD', items: households.data.map((h) => ({ id: h.id, name: h.name })) },\n ];\n\n return (\n <div className=\"space-y-2\">\n {label ? <Label htmlFor={id}>{label}</Label> : null}\n <Select value={value || undefined} onValueChange={onChange} disabled={disabled}>\n <SelectTrigger id={id} aria-label={label}>\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent>\n {groups\n .filter((group) => group.items.length > 0)\n .map((group) => (\n <SelectGroup key={group.kind}>\n <SelectLabel>{SUBJECT_KIND_LABEL[group.kind]}</SelectLabel>\n {group.items.map((item) => (\n <SelectItem key={`${group.kind}:${item.id}`} value={encodeSubject(group.kind, item.id)}>\n {item.name}\n </SelectItem>\n ))}\n </SelectGroup>\n ))}\n </SelectContent>\n </Select>\n </div>\n );\n}\n\n// ============================================================================\n// EntityPicker — generic account / household id picker\n// ============================================================================\n\nexport interface EntityPickerProps {\n kind: 'account' | 'household';\n value?: string | null;\n onChange: (id: string) => void;\n id?: string;\n label?: string;\n placeholder?: string;\n disabled?: boolean;\n}\n\nconst ENTITY_META: Record<\n EntityPickerProps['kind'],\n { label: string; placeholder: string; relativePath: string; cta: string; emptyMessage: string }\n> = {\n account: {\n label: 'Account',\n placeholder: 'Select an account',\n relativePath: 'accounts',\n cta: 'Create an account',\n emptyMessage: 'No accounts yet — create one first.',\n },\n household: {\n label: 'Household',\n placeholder: 'Select a household',\n relativePath: 'family',\n cta: 'Create a household',\n emptyMessage: 'No households yet — create one first.',\n },\n};\n\nexport function EntityPicker({\n kind,\n value,\n onChange,\n id,\n label,\n placeholder,\n disabled = false,\n}: EntityPickerProps) {\n const meta = ENTITY_META[kind];\n const accounts = useAccounts();\n const households = useHouseholds();\n const source = kind === 'account' ? accounts : households;\n const fieldId = id ?? `${kind}-picker`;\n const fieldLabel = label ?? meta.label;\n\n if (source.isLoading) return <PickerLoading id={fieldId} label={fieldLabel} />;\n\n const options = source.data.map((entity) => ({ id: entity.id, name: entity.name }));\n\n if (options.length === 0) {\n return (\n <div className=\"space-y-2\">\n {fieldLabel ? <Label htmlFor={fieldId}>{fieldLabel}</Label> : null}\n <PickerCTA message={meta.emptyMessage} cta={meta.cta} relativePath={meta.relativePath} />\n </div>\n );\n }\n\n return (\n <div className=\"space-y-2\">\n {fieldLabel ? <Label htmlFor={fieldId}>{fieldLabel}</Label> : null}\n <Select value={value || undefined} onValueChange={onChange} disabled={disabled}>\n <SelectTrigger id={fieldId} aria-label={fieldLabel}>\n <SelectValue placeholder={placeholder ?? meta.placeholder} />\n </SelectTrigger>\n <SelectContent>\n {options.map((option) => (\n <SelectItem key={option.id} value={option.id}>\n {option.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n );\n}\n\n/** Convenience wrapper — a required account picker. */\nexport function AccountPicker(props: Omit<EntityPickerProps, 'kind'>) {\n return <EntityPicker kind=\"account\" {...props} />;\n}\n\n// ============================================================================\n// HouseholdPicker — OPTIONAL household link (account form, item 6)\n// ============================================================================\n\nconst HOUSEHOLD_NONE = '__none__';\n\nexport interface HouseholdPickerProps {\n /** Current householdId, or null/undefined for \"no household\". */\n value?: string | null;\n onChange: (householdId: string | null) => void;\n id?: string;\n label?: string;\n /** Label for the \"unlinked\" option (default \"No household\"). */\n noneLabel?: string;\n disabled?: boolean;\n}\n\n/**\n * OPTIONAL household selector. Always offers a \"No household\" option, so it is\n * never a dead-end even when zero households exist (it just shows a hint). Emits\n * `null` for the none option and a bare householdId otherwise.\n */\nexport function HouseholdPicker({\n value,\n onChange,\n id = 'household-picker',\n label = 'Household',\n noneLabel = 'No household',\n disabled = false,\n}: HouseholdPickerProps) {\n const households = useHouseholds();\n\n if (households.isLoading) return <PickerLoading id={id} label={label} />;\n\n return (\n <div className=\"space-y-2\">\n {label ? <Label htmlFor={id}>{label}</Label> : null}\n <Select\n value={value ?? HOUSEHOLD_NONE}\n onValueChange={(next) => onChange(next === HOUSEHOLD_NONE ? null : next)}\n disabled={disabled}\n >\n <SelectTrigger id={id} aria-label={label}>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value={HOUSEHOLD_NONE}>{noneLabel}</SelectItem>\n {households.data.map((household) => (\n <SelectItem key={household.id} value={household.id}>\n {household.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {households.data.length === 0 ? (\n <p className=\"text-xs text-text-secondary\">\n No households yet — you can create one in Households and link this account later.\n </p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAoCA,IAAa,IAAgB;CAAC;CAAW;CAAa;CAAQ;CAAY,EAGpE,IAAkD;CACtD,SAAS;CACT,WAAW;CACX,MAAM;CACN,WAAW;CACZ;AAGD,SAAgB,EAAc,GAAmB,GAAoB;AACnE,QAAO,GAAG,EAAK,GAAG;;AAIpB,SAAgB,EACd,GACwD;AACxD,KAAI,CAAC,EAAO,QAAO;CACnB,IAAM,IAAM,EAAM,QAAQ,IAAI;AAC9B,KAAI,IAAM,EAAG,QAAO;CACpB,IAAM,IAAO,EAAM,MAAM,GAAG,EAAI,EAC1B,IAAK,EAAM,MAAM,IAAM,EAAE;AAE/B,QADI,CAAC,EAAc,SAAS,EAAK,IAAI,CAAC,IAAW,OAC1C;EAAE,aAAa;EAAM,WAAW;EAAI;;AAO7C,SAAS,EAAU,EAAE,YAAS,QAAK,mBAAwE;CACzG,IAAM,EAAE,cAAW,KAAK,gBAAa,GAAe,EAC9C,IAAS,EAAS,GAAU,EAAa;AAC/C,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,KAAD;GAAG,WAAU;aAAuB;GAAY,CAAA,EAC/C,IACC,kBAAC,GAAD;GAAQ,SAAQ;GAAU,MAAK;GAAK,WAAU;GAAO,eAAe,EAAS,EAAO;aACjF;GACM,CAAA,GACP,KACA;;;AAIV,SAAS,EAAc,EAAE,OAAI,YAA0C;AACrE,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACG,I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D,EAAW,KAAK,KAAK,MACpB,kBAAC,GAAD;KAA+B,OAAO,EAAU;eAC7C,EAAU;KACA,EAFI,EAAU,GAEd,CACb,CACY,EAAA,CAAA,CACT;;GACR,EAAW,KAAK,WAAW,IAC1B,kBAAC,KAAD;IAAG,WAAU;cAA8B;IAEvC,CAAA,GACF;GACA"}
1
+ {"version":3,"file":"pickers.js","names":[],"sources":["../../../src/brainyrich/components/pickers.tsx"],"sourcesContent":["/**\n * Reusable entity / subject pickers.\n * @module brainyrich/components/pickers\n *\n * - `SubjectPicker` — encodes `SUBJECT_TYPE:id` across accounts, portfolios,\n * goals and households (for the AiAssistant insight subject).\n * - `EntityPicker` — generic account / household Select returning a bare id.\n * - `AccountPicker` — convenience wrapper (kind=\"account\").\n * - `HouseholdPicker` — OPTIONAL household Select with a \"None\" option, for the\n * account create/edit form (accounts can be linked to a\n * household). Never a dead-end when no households exist.\n *\n * When a *required* source list is empty every picker renders a CTA that routes\n * the user to create the missing entity instead of showing an empty dropdown.\n */\n\nimport { Loader2 } from 'lucide-react';\nimport {\n Button,\n Label,\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectTrigger,\n SelectValue,\n} from '@burdenoff/fe-libs/ui';\nimport { useAccounts, useGoals, useHouseholds, usePortfolios } from '../hooks/useBrainyRichApi';\nimport { useBrainyRich } from '../providers/BrainyRichProvider';\nimport { joinPath } from '../utils/navigation';\n\n// ============================================================================\n// Subject encoding (matches the SDL `subjectType` convention — uppercase)\n// ============================================================================\n\nexport const SUBJECT_KINDS = ['ACCOUNT', 'PORTFOLIO', 'GOAL', 'HOUSEHOLD'] as const;\nexport type SubjectKind = (typeof SUBJECT_KINDS)[number];\n\nconst SUBJECT_KIND_LABEL: Record<SubjectKind, string> = {\n ACCOUNT: 'Account',\n PORTFOLIO: 'Portfolio',\n GOAL: 'Goal',\n HOUSEHOLD: 'Household',\n};\n\n/** Encode a subject selection as the `SUBJECT_TYPE:id` token a SubjectPicker emits. */\nexport function encodeSubject(kind: SubjectKind, id: string): string {\n return `${kind}:${id}`;\n}\n\n/** Decode a `SUBJECT_TYPE:id` token back into `{ subjectType, subjectId }`. */\nexport function parseSubject(\n value: string | null | undefined\n): { subjectType: SubjectKind; subjectId: string } | null {\n if (!value) return null;\n const idx = value.indexOf(':');\n if (idx < 0) return null;\n const kind = value.slice(0, idx) as SubjectKind;\n const id = value.slice(idx + 1);\n if (!SUBJECT_KINDS.includes(kind) || !id) return null;\n return { subjectType: kind, subjectId: id };\n}\n\n// ============================================================================\n// Shared empty-state CTA (routes to the create surface, never a dead-end)\n// ============================================================================\n\nfunction PickerCTA({\n message,\n cta,\n relativePath,\n}: {\n message: string;\n cta: string;\n relativePath: string;\n}) {\n const { basePath = '/', navigate } = useBrainyRich();\n const target = joinPath(basePath, relativePath);\n return (\n <div className=\"rounded-lg border border-dashed border-border-subtle bg-bg-surface px-4 py-3 text-sm\">\n <p className=\"text-text-secondary\">{message}</p>\n {navigate ? (\n <Button variant=\"outline\" size=\"sm\" className=\"mt-2\" onClick={() => navigate(target)}>\n {cta}\n </Button>\n ) : null}\n </div>\n );\n}\n\nfunction PickerLoading({ id, label }: { id?: string; label?: string }) {\n return (\n <div className=\"space-y-2\">\n {label ? <Label htmlFor={id}>{label}</Label> : null}\n <div\n className=\"flex h-9 items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-secondary\"\n aria-busy=\"true\"\n >\n <Loader2 className=\"size-4 motion-safe:animate-spin\" aria-hidden=\"true\" />\n Loading…\n </div>\n </div>\n );\n}\n\n// ============================================================================\n// SubjectPicker — accounts + portfolios + goals + households\n// ============================================================================\n\nexport interface SubjectPickerProps {\n /** Current `SUBJECT_TYPE:id` token, or empty. */\n value?: string;\n onChange: (value: string) => void;\n id?: string;\n label?: string;\n placeholder?: string;\n disabled?: boolean;\n}\n\nexport function SubjectPicker({\n value,\n onChange,\n id = 'subject-picker',\n label = 'Subject',\n placeholder = 'Select a subject',\n disabled = false,\n}: SubjectPickerProps) {\n const accounts = useAccounts();\n const portfolios = usePortfolios();\n const goals = useGoals();\n const households = useHouseholds();\n\n const loading =\n accounts.isLoading || portfolios.isLoading || goals.isLoading || households.isLoading;\n const total =\n accounts.data.length + portfolios.data.length + goals.data.length + households.data.length;\n\n if (loading) return <PickerLoading id={id} label={label} />;\n\n if (total === 0) {\n return (\n <div className=\"space-y-2\">\n {label ? <Label htmlFor={id}>{label}</Label> : null}\n <PickerCTA\n message=\"No accounts, portfolios, goals or households yet — create one to attach this insight.\"\n cta=\"Create an account\"\n relativePath=\"accounts\"\n />\n </div>\n );\n }\n\n const groups: Array<{ kind: SubjectKind; items: Array<{ id: string; name: string }> }> = [\n { kind: 'ACCOUNT', items: accounts.data.map((a) => ({ id: a.id, name: a.name })) },\n { kind: 'PORTFOLIO', items: portfolios.data.map((p) => ({ id: p.id, name: p.name })) },\n { kind: 'GOAL', items: goals.data.map((g) => ({ id: g.id, name: g.name })) },\n { kind: 'HOUSEHOLD', items: households.data.map((h) => ({ id: h.id, name: h.name })) },\n ];\n\n return (\n <div className=\"space-y-2\">\n {label ? <Label htmlFor={id}>{label}</Label> : null}\n <Select value={value || undefined} onValueChange={onChange} disabled={disabled}>\n <SelectTrigger id={id} aria-label={label}>\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n <SelectContent>\n {groups\n .filter((group) => group.items.length > 0)\n .map((group) => (\n <SelectGroup key={group.kind}>\n <SelectLabel>{SUBJECT_KIND_LABEL[group.kind]}</SelectLabel>\n {group.items.map((item) => (\n <SelectItem\n key={`${group.kind}:${item.id}`}\n value={encodeSubject(group.kind, item.id)}\n >\n {item.name}\n </SelectItem>\n ))}\n </SelectGroup>\n ))}\n </SelectContent>\n </Select>\n </div>\n );\n}\n\n// ============================================================================\n// EntityPicker — generic account / household id picker\n// ============================================================================\n\nexport interface EntityPickerProps {\n kind: 'account' | 'household';\n value?: string | null;\n onChange: (id: string) => void;\n id?: string;\n label?: string;\n placeholder?: string;\n disabled?: boolean;\n}\n\nconst ENTITY_META: Record<\n EntityPickerProps['kind'],\n { label: string; placeholder: string; relativePath: string; cta: string; emptyMessage: string }\n> = {\n account: {\n label: 'Account',\n placeholder: 'Select an account',\n relativePath: 'accounts',\n cta: 'Create an account',\n emptyMessage: 'No accounts yet — create one first.',\n },\n household: {\n label: 'Household',\n placeholder: 'Select a household',\n relativePath: 'family',\n cta: 'Create a household',\n emptyMessage: 'No households yet — create one first.',\n },\n};\n\nexport function EntityPicker({\n kind,\n value,\n onChange,\n id,\n label,\n placeholder,\n disabled = false,\n}: EntityPickerProps) {\n const meta = ENTITY_META[kind];\n const accounts = useAccounts();\n const households = useHouseholds();\n const source = kind === 'account' ? accounts : households;\n const fieldId = id ?? `${kind}-picker`;\n const fieldLabel = label ?? meta.label;\n\n if (source.isLoading) return <PickerLoading id={fieldId} label={fieldLabel} />;\n\n const options = source.data.map((entity) => ({ id: entity.id, name: entity.name }));\n\n if (options.length === 0) {\n return (\n <div className=\"space-y-2\">\n {fieldLabel ? <Label htmlFor={fieldId}>{fieldLabel}</Label> : null}\n <PickerCTA message={meta.emptyMessage} cta={meta.cta} relativePath={meta.relativePath} />\n </div>\n );\n }\n\n return (\n <div className=\"space-y-2\">\n {fieldLabel ? <Label htmlFor={fieldId}>{fieldLabel}</Label> : null}\n <Select value={value || undefined} onValueChange={onChange} disabled={disabled}>\n <SelectTrigger id={fieldId} aria-label={fieldLabel}>\n <SelectValue placeholder={placeholder ?? meta.placeholder} />\n </SelectTrigger>\n <SelectContent>\n {options.map((option) => (\n <SelectItem key={option.id} value={option.id}>\n {option.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n );\n}\n\n/** Convenience wrapper — a required account picker. */\nexport function AccountPicker(props: Omit<EntityPickerProps, 'kind'>) {\n return <EntityPicker kind=\"account\" {...props} />;\n}\n\n// ============================================================================\n// HouseholdPicker — OPTIONAL household link (account form, item 6)\n// ============================================================================\n\nconst HOUSEHOLD_NONE = '__none__';\n\nexport interface HouseholdPickerProps {\n /** Current householdId, or null/undefined for \"no household\". */\n value?: string | null;\n onChange: (householdId: string | null) => void;\n id?: string;\n label?: string;\n /** Label for the \"unlinked\" option (default \"No household\"). */\n noneLabel?: string;\n disabled?: boolean;\n}\n\n/**\n * OPTIONAL household selector. Always offers a \"No household\" option, so it is\n * never a dead-end even when zero households exist (it just shows a hint). Emits\n * `null` for the none option and a bare householdId otherwise.\n */\nexport function HouseholdPicker({\n value,\n onChange,\n id = 'household-picker',\n label = 'Household',\n noneLabel = 'No household',\n disabled = false,\n}: HouseholdPickerProps) {\n const households = useHouseholds();\n\n if (households.isLoading) return <PickerLoading id={id} label={label} />;\n\n return (\n <div className=\"space-y-2\">\n {label ? <Label htmlFor={id}>{label}</Label> : null}\n <Select\n value={value ?? HOUSEHOLD_NONE}\n onValueChange={(next) => onChange(next === HOUSEHOLD_NONE ? null : next)}\n disabled={disabled}\n >\n <SelectTrigger id={id} aria-label={label}>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value={HOUSEHOLD_NONE}>{noneLabel}</SelectItem>\n {households.data.map((household) => (\n <SelectItem key={household.id} value={household.id}>\n {household.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {households.data.length === 0 ? (\n <p className=\"text-xs text-text-secondary\">\n No households yet — you can create one in Households and link this account later.\n </p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAoCA,IAAa,IAAgB;CAAC;CAAW;CAAa;CAAQ;CAAY,EAGpE,IAAkD;CACtD,SAAS;CACT,WAAW;CACX,MAAM;CACN,WAAW;CACZ;AAGD,SAAgB,EAAc,GAAmB,GAAoB;AACnE,QAAO,GAAG,EAAK,GAAG;;AAIpB,SAAgB,EACd,GACwD;AACxD,KAAI,CAAC,EAAO,QAAO;CACnB,IAAM,IAAM,EAAM,QAAQ,IAAI;AAC9B,KAAI,IAAM,EAAG,QAAO;CACpB,IAAM,IAAO,EAAM,MAAM,GAAG,EAAI,EAC1B,IAAK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B,EAC9B,UACA,aACA,QAAK,oBACL,WAAQ,aACR,eAAY,gBACZ,cAAW,MACY;CACvB,IAAM,IAAa,GAAe;AAIlC,QAFI,EAAW,YAAkB,kBAAC,GAAD;EAAmB;EAAW;EAAS,CAAA,GAGtE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACG,IAAQ,kBAAC,GAAD;IAAO,SAAS;cAAK;IAAc,CAAA,GAAG;GAC/C,kBAAC,GAAD;IACE,OAAO,KAAS;IAChB,gBAAgB,MAAS,EAAS,MAAS,IAAiB,OAAO,EAAK;IAC9D;cAHZ,CAKE,kBAAC,GAAD;KAAmB;KAAI,cAAY;eACjC,kBAAC,GAAD,EAAe,CAAA;KACD,CAAA,EAChB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;KAAY,OAAO;eAAiB;KAAuB,CAAA,EAC1D,EAAW,KAAK,KAAK,MACpB,kBAAC,GAAD;KAA+B,OAAO,EAAU;eAC7C,EAAU;KACA,EAFI,EAAU,GAEd,CACb,CACY,EAAA,CAAA,CACT;;GACR,EAAW,KAAK,WAAW,IAC1B,kBAAC,KAAD;IAAG,WAAU;cAA8B;IAEvC,CAAA,GACF;GACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"CommentThread.js","names":[],"sources":["../../../../src/brainyrich/components/reuse/CommentThread.tsx"],"sourcesContent":["/**\n * CommentThread — REUSE of `wspace-conversations-svc` EntityComment as a real\n * comment thread.\n * @module brainyrich/components/reuse/CommentThread\n *\n * Replaces the single-field notes / rationale fork on Households / Portfolios /\n * RebalanceProposals with a threaded, multi-author comment log keyed by\n * `(entityType, entityId)`.\n *\n * Why not the fe-libs `contextConversationWidget`? That folder ships a kit of\n * sub-components + Apollo hooks (subscriptions, `sendContextMessage`, a\n * conversationId-resolution flow) but exports NO mountable root widget and no\n * single mount hook — it is not wrappable as `<CommentThread>` without importing\n * its internals. Per the task's fallback, we build a minimal thread directly on\n * the platform EntityComment API, which is purpose-built for exactly this\n * \"comments on an arbitrary entity\" case:\n * - `getEntityComments(input)` → list (newest first)\n * - `createEntityComment(input)` → post\n * - `deleteEntityComment(input)` → remove own comment (soft)\n *\n * All ops route through the workspace supergraph the MFE already uses.\n * Presentational + self-contained: owns its hooks, reads gateway base URL +\n * current user from `useBrainyRich()`, uses fe-libs/ui + semantic tokens.\n */\n\nimport { useState, type KeyboardEvent } from 'react';\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { MessagesSquare, Send, Trash2 } from 'lucide-react';\nimport { Button, Skeleton, Textarea } from '@burdenoff/fe-libs/ui';\n\nimport { useBrainyRich } from '../../providers/BrainyRichProvider';\nimport { formatDate } from '../../pages/_shared';\nimport { wspaceFetch, wspaceMutate } from './transport';\n\ninterface EntityComment {\n id: string;\n authorId: string;\n authorType: string;\n content: { text: string | null; markdown: string | null };\n createdAt: string;\n edited: boolean;\n status: string;\n}\n\nconst COMMENT_FIELDS = `\n id authorId authorType content { text markdown } createdAt edited status\n`;\n\nconst commentsKey = (entityType: string, entityId: string) =>\n ['brainyrich', 'entity-comments', entityType, entityId] as const;\n\nconst useEntityComments = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useBrainyRich();\n return useQuery({\n queryKey: commentsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{ getEntityComments: { items: EntityComment[]; total: number } }>(\n `query BraGetEntityComments($input: GetCommentsInput!) {\n getEntityComments(input: $input) {\n items { ${COMMENT_FIELDS} }\n total\n }\n }`,\n {\n input: { entityType, entityId, take: 50, sortBy: 'createdAt', sortOrder: 'desc' },\n },\n apiGatewayUrl\n );\n return data.getEntityComments;\n },\n });\n};\n\nconst useCreateComment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (text: string) => {\n const trimmed = text.trim();\n if (!trimmed) throw new Error('A comment is required.');\n const data = await wspaceMutate<{ createEntityComment: { id: string } }>(\n `mutation BraCreateEntityComment($input: CreateEntityCommentInput!) {\n createEntityComment(input: $input) { id }\n }`,\n { input: { entityType, entityId, content: { text: trimmed } } },\n apiGatewayUrl\n );\n return data.createEntityComment;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: commentsKey(entityType, entityId) }),\n });\n};\n\nconst useDeleteComment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const data = await wspaceMutate<{ deleteEntityComment: boolean }>(\n `mutation BraDeleteEntityComment($input: DeleteCommentInput!) {\n deleteEntityComment(input: $input)\n }`,\n { input: { id, soft: true } },\n apiGatewayUrl\n );\n return data.deleteEntityComment;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: commentsKey(entityType, entityId) }),\n });\n};\n\nconst authorInitials = (authorId: string, isSelf: boolean): string => {\n if (isSelf) return 'You';\n return authorId.slice(0, 2).toUpperCase();\n};\n\nexport interface CommentThreadProps {\n /** Polymorphic entity type, e.g. \"brainyrich-household\". */\n entityType: string;\n /** The bra entity's id (an ID scalar). */\n entityId: string;\n /** Optional heading; hide with `hideHeading`. */\n heading?: string;\n hideHeading?: boolean;\n}\n\nexport function CommentThread({\n entityType,\n entityId,\n heading = 'Discussion',\n hideHeading = false,\n}: CommentThreadProps) {\n const { currentUser } = useBrainyRich();\n const [draft, setDraft] = useState('');\n const comments = useEntityComments(entityType, entityId);\n const create = useCreateComment(entityType, entityId);\n const remove = useDeleteComment(entityType, entityId);\n\n const items = (comments.data?.items ?? []).filter((c) => c.status !== 'DELETED');\n const selfName =\n currentUser?.name ||\n [currentUser?.firstName, currentUser?.lastName].filter(Boolean).join(' ') ||\n currentUser?.email ||\n 'You';\n\n const submit = async () => {\n if (!draft.trim() || create.isPending) return;\n await create.mutateAsync(draft);\n setDraft('');\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>) => {\n if ((event.metaKey || event.ctrlKey) && event.key === 'Enter') {\n event.preventDefault();\n void submit();\n }\n };\n\n return (\n <div className=\"space-y-3\">\n {!hideHeading && (\n <h3 className=\"flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <MessagesSquare className=\"size-4\" aria-hidden=\"true\" />\n {heading}\n {comments.data ? (\n <span className=\"text-xs font-normal text-text-secondary\">({items.length})</span>\n ) : null}\n </h3>\n )}\n\n {/* Composer */}\n <div className=\"space-y-2\">\n <label htmlFor={`comment-${entityId}`} className=\"sr-only\">\n Add a comment\n </label>\n <Textarea\n id={`comment-${entityId}`}\n value={draft}\n onChange={(e) => setDraft(e.target.value)}\n onKeyDown={onKeyDown}\n placeholder=\"Add a note or rationale…\"\n rows={3}\n disabled={create.isPending}\n />\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">⌘/Ctrl + Enter to post</span>\n <Button type=\"button\" size=\"sm\" onClick={submit} disabled={!draft.trim() || create.isPending}>\n <Send className=\"size-4\" aria-hidden=\"true\" />\n {create.isPending ? 'Posting…' : 'Post'}\n </Button>\n </div>\n {create.isError && (\n <p className=\"text-sm text-status-error-text\">Could not post your comment. Please try again.</p>\n )}\n </div>\n\n {/* Thread */}\n {comments.isLoading ? (\n <div className=\"space-y-3\" aria-busy=\"true\">\n <Skeleton className=\"h-16 w-full rounded-md\" />\n <Skeleton className=\"h-16 w-full rounded-md\" />\n </div>\n ) : comments.isError ? (\n <p className=\"text-sm text-status-error-text\">\n Could not load the discussion.{' '}\n <button\n type=\"button\"\n className=\"underline underline-offset-2\"\n onClick={() => comments.refetch()}\n >\n Retry\n </button>\n </p>\n ) : items.length === 0 ? (\n <div className=\"rounded-lg border border-dashed border-border-subtle bg-bg-surface px-4 py-8 text-center\">\n <MessagesSquare className=\"mx-auto mb-2 size-6 text-text-secondary\" aria-hidden=\"true\" />\n <p className=\"text-sm text-text-primary\">No comments yet</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n Start the discussion with a note or rationale.\n </p>\n </div>\n ) : (\n <ul className=\"space-y-3\">\n {items.map((c) => {\n const isSelf = Boolean(currentUser?.id) && c.authorId === currentUser?.id;\n const body = c.content.text ?? c.content.markdown ?? '';\n return (\n <li key={c.id} className=\"flex gap-3\">\n <div\n className=\"flex size-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken text-xs font-medium text-text-secondary\"\n aria-hidden=\"true\"\n >\n {authorInitials(c.authorId, isSelf)}\n </div>\n <div className=\"min-w-0 flex-1 rounded-lg border border-border-subtle bg-bg-surface p-3\">\n <div className=\"mb-1 flex items-center gap-2\">\n <span className=\"text-sm font-medium text-text-primary\">\n {isSelf ? selfName : 'Team member'}\n </span>\n <span className=\"text-xs text-text-secondary\">{formatDate(c.createdAt)}</span>\n {c.edited ? <span className=\"text-xs text-text-secondary\">(edited)</span> : null}\n {isSelf && (\n <button\n type=\"button\"\n aria-label=\"Delete comment\"\n className=\"ml-auto rounded p-1 text-text-secondary hover:bg-bg-sunken hover:text-status-error-text focus-visible:outline focus-visible:outline-2 focus-visible:outline-border-focus disabled:opacity-50\"\n disabled={remove.isPending}\n onClick={() => remove.mutate(c.id)}\n >\n <Trash2 className=\"size-3.5\" aria-hidden=\"true\" />\n </button>\n )}\n </div>\n <p className=\"whitespace-pre-wrap break-words text-sm text-text-primary\">{body}</p>\n </div>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AA4CA,IAAM,IAAiB,kFAIjB,KAAe,GAAoB,MACvC;CAAC;CAAc;CAAmB;CAAY;CAAS,EAEnD,KAAqB,GAAoB,MAAiC;CAC9E,IAAM,EAAE,qBAAkB,GAAe;AACzC,QAAO,EAAS;EACd,UAAU,EAAY,GAAY,KAAY,GAAG;EACjD,SAAS,EAAQ;EACjB,SAAS,aACM,MAAM,EACjB;;sBAEc,EAAe;;;YAI7B,EACE,OAAO;GAAE;GAAY;GAAU,MAAM;GAAI,QAAQ;GAAa,WAAW;GAAQ,EAClF,EACD,EACD,EACW;EAEf,CAAC;GAGE,KAAoB,GAA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;MACL,WAAU;MACV,eAAe,EAAS,SAAS;gBAClC;MAEQ,CAAA;KACP;QACF,EAAM,WAAW,IACnB,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,GAAD;MAAgB,WAAU;MAA0C,eAAY;MAAS,CAAA;KACzF,kBAAC,KAAD;MAAG,WAAU;gBAA4B;MAAmB,CAAA;KAC5D,kBAAC,KAAD;MAAG,WAAU;gBAAqC;MAE9C,CAAA;KACA;QAEN,kBAAC,MAAD;IAAI,WAAU;cACX,EAAM,KAAK,MAAM;KAChB,IAAM,IAAS,EAAQ,GAAa,MAAO,EAAE,aAAa,GAAa,IACjE,IAAO,EAAE,QAAQ,QAAQ,EAAE,QAAQ,YAAY;AACrD,YACE,kBAAC,MAAD;MAAe,WAAU;gBAAzB,CACE,kBAAC,OAAD;OACE,WAAU;OACV,eAAY;iBAEX,EAAe,EAAE,UAAU,EAAO;OAC/B,CAAA,EACN,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,OAAD;QAAK,WAAU;kBAAf;SACE,kBAAC,QAAD;UAAM,WAAU;oBACb,IAAS,IAAW;UAChB,CAAA;SACP,kBAAC,QAAD;UAAM,WAAU;oBAA+B,EAAW,EAAE,UAAU;UAAQ,CAAA;SAC7E,EAAE,SAAS,kBAAC,QAAD;UAAM,WAAU;oBAA8B;UAAe,CAAA,GAAG;SAC3E,KACC,kBAAC,UAAD;UACE,MAAK;UACL,cAAW;UACX,WAAU;UACV,UAAU,EAAO;UACjB,eAAe,EAAO,OAAO,EAAE,GAAG;oBAElC,kBAAC,GAAD;WAAQ,WAAU;WAAW,eAAY;WAAS,CAAA;UAC3C,CAAA;SAEP;WACN,kBAAC,KAAD;QAAG,WAAU;kBAA6D;QAAS,CAAA,CAC/E;SACH;QA5BI,EAAE,GA4BN;MAEP;IACC,CAAA;GAEH"}
1
+ {"version":3,"file":"CommentThread.js","names":[],"sources":["../../../../src/brainyrich/components/reuse/CommentThread.tsx"],"sourcesContent":["/**\n * CommentThread — REUSE of `wspace-conversations-svc` EntityComment as a real\n * comment thread.\n * @module brainyrich/components/reuse/CommentThread\n *\n * Replaces the single-field notes / rationale fork on Households / Portfolios /\n * RebalanceProposals with a threaded, multi-author comment log keyed by\n * `(entityType, entityId)`.\n *\n * Why not the fe-libs `contextConversationWidget`? That folder ships a kit of\n * sub-components + Apollo hooks (subscriptions, `sendContextMessage`, a\n * conversationId-resolution flow) but exports NO mountable root widget and no\n * single mount hook — it is not wrappable as `<CommentThread>` without importing\n * its internals. Per the task's fallback, we build a minimal thread directly on\n * the platform EntityComment API, which is purpose-built for exactly this\n * \"comments on an arbitrary entity\" case:\n * - `getEntityComments(input)` → list (newest first)\n * - `createEntityComment(input)` → post\n * - `deleteEntityComment(input)` → remove own comment (soft)\n *\n * All ops route through the workspace supergraph the MFE already uses.\n * Presentational + self-contained: owns its hooks, reads gateway base URL +\n * current user from `useBrainyRich()`, uses fe-libs/ui + semantic tokens.\n */\n\nimport { useState, type KeyboardEvent } from 'react';\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { MessagesSquare, Send, Trash2 } from 'lucide-react';\nimport { Button, Skeleton, Textarea } from '@burdenoff/fe-libs/ui';\n\nimport { useBrainyRich } from '../../providers/BrainyRichProvider';\nimport { formatDate } from '../../pages/_shared';\nimport { wspaceFetch, wspaceMutate } from './transport';\n\ninterface EntityComment {\n id: string;\n authorId: string;\n authorType: string;\n content: { text: string | null; markdown: string | null };\n createdAt: string;\n edited: boolean;\n status: string;\n}\n\nconst COMMENT_FIELDS = `\n id authorId authorType content { text markdown } createdAt edited status\n`;\n\nconst commentsKey = (entityType: string, entityId: string) =>\n ['brainyrich', 'entity-comments', entityType, entityId] as const;\n\nconst useEntityComments = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useBrainyRich();\n return useQuery({\n queryKey: commentsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{\n getEntityComments: { items: EntityComment[]; total: number };\n }>(\n `query BraGetEntityComments($input: GetCommentsInput!) {\n getEntityComments(input: $input) {\n items { ${COMMENT_FIELDS} }\n total\n }\n }`,\n {\n input: { entityType, entityId, take: 50, sortBy: 'createdAt', sortOrder: 'desc' },\n },\n apiGatewayUrl\n );\n return data.getEntityComments;\n },\n });\n};\n\nconst useCreateComment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (text: string) => {\n const trimmed = text.trim();\n if (!trimmed) throw new Error('A comment is required.');\n const data = await wspaceMutate<{ createEntityComment: { id: string } }>(\n `mutation BraCreateEntityComment($input: CreateEntityCommentInput!) {\n createEntityComment(input: $input) { id }\n }`,\n { input: { entityType, entityId, content: { text: trimmed } } },\n apiGatewayUrl\n );\n return data.createEntityComment;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: commentsKey(entityType, entityId) }),\n });\n};\n\nconst useDeleteComment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (id: string) => {\n const data = await wspaceMutate<{ deleteEntityComment: boolean }>(\n `mutation BraDeleteEntityComment($input: DeleteCommentInput!) {\n deleteEntityComment(input: $input)\n }`,\n { input: { id, soft: true } },\n apiGatewayUrl\n );\n return data.deleteEntityComment;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: commentsKey(entityType, entityId) }),\n });\n};\n\nconst authorInitials = (authorId: string, isSelf: boolean): string => {\n if (isSelf) return 'You';\n return authorId.slice(0, 2).toUpperCase();\n};\n\nexport interface CommentThreadProps {\n /** Polymorphic entity type, e.g. \"brainyrich-household\". */\n entityType: string;\n /** The bra entity's id (an ID scalar). */\n entityId: string;\n /** Optional heading; hide with `hideHeading`. */\n heading?: string;\n hideHeading?: boolean;\n}\n\nexport function CommentThread({\n entityType,\n entityId,\n heading = 'Discussion',\n hideHeading = false,\n}: CommentThreadProps) {\n const { currentUser } = useBrainyRich();\n const [draft, setDraft] = useState('');\n const comments = useEntityComments(entityType, entityId);\n const create = useCreateComment(entityType, entityId);\n const remove = useDeleteComment(entityType, entityId);\n\n const items = (comments.data?.items ?? []).filter((c) => c.status !== 'DELETED');\n const selfName =\n currentUser?.name ||\n [currentUser?.firstName, currentUser?.lastName].filter(Boolean).join(' ') ||\n currentUser?.email ||\n 'You';\n\n const submit = async () => {\n if (!draft.trim() || create.isPending) return;\n await create.mutateAsync(draft);\n setDraft('');\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>) => {\n if ((event.metaKey || event.ctrlKey) && event.key === 'Enter') {\n event.preventDefault();\n void submit();\n }\n };\n\n return (\n <div className=\"space-y-3\">\n {!hideHeading && (\n <h3 className=\"flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <MessagesSquare className=\"size-4\" aria-hidden=\"true\" />\n {heading}\n {comments.data ? (\n <span className=\"text-xs font-normal text-text-secondary\">({items.length})</span>\n ) : null}\n </h3>\n )}\n\n {/* Composer */}\n <div className=\"space-y-2\">\n <label htmlFor={`comment-${entityId}`} className=\"sr-only\">\n Add a comment\n </label>\n <Textarea\n id={`comment-${entityId}`}\n value={draft}\n onChange={(e) => setDraft(e.target.value)}\n onKeyDown={onKeyDown}\n placeholder=\"Add a note or rationale…\"\n rows={3}\n disabled={create.isPending}\n />\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">⌘/Ctrl + Enter to post</span>\n <Button\n type=\"button\"\n size=\"sm\"\n onClick={submit}\n disabled={!draft.trim() || create.isPending}\n >\n <Send className=\"size-4\" aria-hidden=\"true\" />\n {create.isPending ? 'Posting…' : 'Post'}\n </Button>\n </div>\n {create.isError && (\n <p className=\"text-sm text-status-error-text\">\n Could not post your comment. Please try again.\n </p>\n )}\n </div>\n\n {/* Thread */}\n {comments.isLoading ? (\n <div className=\"space-y-3\" aria-busy=\"true\">\n <Skeleton className=\"h-16 w-full rounded-md\" />\n <Skeleton className=\"h-16 w-full rounded-md\" />\n </div>\n ) : comments.isError ? (\n <p className=\"text-sm text-status-error-text\">\n Could not load the discussion.{' '}\n <button\n type=\"button\"\n className=\"underline underline-offset-2\"\n onClick={() => comments.refetch()}\n >\n Retry\n </button>\n </p>\n ) : items.length === 0 ? (\n <div className=\"rounded-lg border border-dashed border-border-subtle bg-bg-surface px-4 py-8 text-center\">\n <MessagesSquare className=\"mx-auto mb-2 size-6 text-text-secondary\" aria-hidden=\"true\" />\n <p className=\"text-sm text-text-primary\">No comments yet</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n Start the discussion with a note or rationale.\n </p>\n </div>\n ) : (\n <ul className=\"space-y-3\">\n {items.map((c) => {\n const isSelf = Boolean(currentUser?.id) && c.authorId === currentUser?.id;\n const body = c.content.text ?? c.content.markdown ?? '';\n return (\n <li key={c.id} className=\"flex gap-3\">\n <div\n className=\"flex size-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken text-xs font-medium text-text-secondary\"\n aria-hidden=\"true\"\n >\n {authorInitials(c.authorId, isSelf)}\n </div>\n <div className=\"min-w-0 flex-1 rounded-lg border border-border-subtle bg-bg-surface p-3\">\n <div className=\"mb-1 flex items-center gap-2\">\n <span className=\"text-sm font-medium text-text-primary\">\n {isSelf ? selfName : 'Team member'}\n </span>\n <span className=\"text-xs text-text-secondary\">{formatDate(c.createdAt)}</span>\n {c.edited ? (\n <span className=\"text-xs text-text-secondary\">(edited)</span>\n ) : null}\n {isSelf && (\n <button\n type=\"button\"\n aria-label=\"Delete comment\"\n className=\"ml-auto rounded p-1 text-text-secondary hover:bg-bg-sunken hover:text-status-error-text focus-visible:outline focus-visible:outline-2 focus-visible:outline-border-focus disabled:opacity-50\"\n disabled={remove.isPending}\n onClick={() => remove.mutate(c.id)}\n >\n <Trash2 className=\"size-3.5\" aria-hidden=\"true\" />\n </button>\n )}\n </div>\n <p className=\"whitespace-pre-wrap break-words text-sm text-text-primary\">\n {body}\n </p>\n </div>\n </li>\n );\n })}\n </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M,WAAU;oBAA8B;UAAe,CAAA,GAC3D;SACH,KACC,kBAAC,UAAD;UACE,MAAK;UACL,cAAW;UACX,WAAU;UACV,UAAU,EAAO;UACjB,eAAe,EAAO,OAAO,EAAE,GAAG;oBAElC,kBAAC,GAAD;WAAQ,WAAU;WAAW,eAAY;WAAS,CAAA;UAC3C,CAAA;SAEP;WACN,kBAAC,KAAD;QAAG,WAAU;kBACV;QACC,CAAA,CACA;SACH;QAhCI,EAAE,GAgCN;MAEP;IACC,CAAA;GAEH"}
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentsPanel.js","names":[],"sources":["../../../../src/brainyrich/components/reuse/DocumentsPanel.tsx"],"sourcesContent":["/**\n * DocumentsPanel — REUSE of `wspace-files-svc` for statement / KYC / tax-doc\n * attachments on Accounts + Households.\n * @module brainyrich/components/reuse/DocumentsPanel\n *\n * A wealth product needs to attach documents (statements, KYC, tax packs) to\n * accounts and households. `wspace-files-svc` has no native entity-owned link on\n * `File`, so we scope documents to an entity via a dedicated, stably-named\n * FOLDER per `(entityType, entityId)` and list its contents. All ops route\n * through the workspace supergraph the MFE already uses.\n *\n * Flow:\n * - resolve folder → `getFolders(filter)` matched by name (created lazily on\n * first upload via `createFolder`); no side-effects on read.\n * - list → `getFilesInFolder(folderId, pagination)`\n * - upload (3-step) → `initiateUpload` → S3 `PUT` (byte-progress) → `completeUpload`\n * - download → `getFileDownloadUrl(id, expiresIn)` capped at 21600s to\n * avoid the >604800 fleet bug (S3 7-day cap → 500).\n *\n * Presentational + self-contained: owns its hooks, reads the gateway base URL\n * from `useBrainyRich()`, uses fe-libs/ui primitives + semantic tokens.\n */\n\nimport { useCallback, useRef, useState } from 'react';\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { Download, FileText, Upload } from 'lucide-react';\nimport { Button, Card, CardContent, Skeleton } from '@burdenoff/fe-libs/ui';\n\nimport { useBrainyRich } from '../../providers/BrainyRichProvider';\nimport { formatDate } from '../../pages/_shared';\nimport { wspaceFetch, wspaceMutate } from './transport';\n\n// Presigned-URL TTL: cap at 21600s (6h). >604800 (S3 7-day) → INTERNAL_SERVER_ERROR.\nconst DOWNLOAD_URL_TTL_SECONDS = 21600;\n\ninterface FilesFolder {\n id: string;\n name: string;\n}\n\ninterface FilesFile {\n id: string;\n name: string;\n extension: string;\n mimeType: string;\n size: string;\n createdAt: string;\n}\n\nconst FILE_FIELDS = 'id name extension mimeType size createdAt';\n\nconst folderName = (entityType: string, entityId: string) =>\n `BrainyRich · ${entityType} · ${entityId}`;\n\nconst folderKey = (entityType: string, entityId: string) =>\n ['brainyrich', 'entity-folder', entityType, entityId] as const;\n\nconst filesKey = (folderId: string | null | undefined) =>\n ['brainyrich', 'folder-files', folderId ?? 'none'] as const;\n\n// ============================================================================\n// Folder resolution (read-only — no lazy creation here)\n// ============================================================================\n\nconst useEntityFolder = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useBrainyRich();\n const wanted = entityId ? folderName(entityType, entityId) : '';\n return useQuery({\n queryKey: folderKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{ getFolders: { folders: FilesFolder[] } }>(\n `query BraGetFolders($pagination: PaginationInput) {\n getFolders(pagination: $pagination) { folders { id name } }\n }`,\n { pagination: { limit: 200, offset: 0 } },\n apiGatewayUrl\n );\n return data.getFolders.folders.find((f) => f.name === wanted) ?? null;\n },\n });\n};\n\nconst useFolderFiles = (folderId: string | null | undefined) => {\n const { apiGatewayUrl } = useBrainyRich();\n return useQuery({\n queryKey: filesKey(folderId),\n enabled: Boolean(folderId),\n queryFn: async () => {\n const data = await wspaceFetch<{ getFilesInFolder: { files: FilesFile[] } }>(\n `query BraGetFilesInFolder($folderId: ID, $pagination: PaginationInput) {\n getFilesInFolder(folderId: $folderId, pagination: $pagination) {\n files { ${FILE_FIELDS} }\n }\n }`,\n { folderId, pagination: { limit: 100, offset: 0 } },\n apiGatewayUrl\n );\n return data.getFilesInFolder.files;\n },\n });\n};\n\n// ============================================================================\n// Upload (3-step platform flow, with lazy folder creation)\n// ============================================================================\n\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 xhr.status >= 200 && xhr.status < 300\n ? resolve()\n : reject(new Error(`File storage rejected the upload (HTTP ${xhr.status}).`));\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\nconst useDocumentUpload = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n const [progress, setProgress] = useState(0);\n\n const mutation = useMutation({\n mutationFn: async (file: File) => {\n setProgress(0);\n\n // 0. resolve or create the entity folder\n let folder = await wspaceFetch<{ getFolders: { folders: FilesFolder[] } }>(\n `query BraResolveFolder($pagination: PaginationInput) {\n getFolders(pagination: $pagination) { folders { id name } }\n }`,\n { pagination: { limit: 200, offset: 0 } },\n apiGatewayUrl\n ).then((d) => d.getFolders.folders.find((f) => f.name === folderName(entityType, entityId)));\n\n if (!folder) {\n const created = await wspaceMutate<{ createFolder: FilesFolder }>(\n `mutation BraCreateFolder($input: CreateFolderInput!) {\n createFolder(input: $input) { id name }\n }`,\n {\n input: {\n name: folderName(entityType, entityId),\n description: `Documents attached to ${entityType} ${entityId}.`,\n visibility: 'WORKSPACE',\n },\n },\n apiGatewayUrl\n );\n folder = created.createFolder;\n }\n const folderId = folder.id;\n\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 const fileSize = String(file.size);\n\n // 1. initiate\n const initiated = await wspaceMutate<{\n initiateUpload: { uploadUrl: string | null; session: { id: string } };\n }>(\n `mutation BraInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) { uploadUrl session { id } }\n }`,\n {\n input: { fileName: file.name, extension, mimeType, fileSize, folderId, visibility: 'WORKSPACE' },\n },\n apiGatewayUrl\n );\n const { uploadUrl } = initiated.initiateUpload;\n const sessionId = initiated.initiateUpload.session.id;\n if (!uploadUrl) throw new Error('The file service did not return an upload URL.');\n\n // 2. PUT the bytes\n await putWithProgress(uploadUrl, file, mimeType, setProgress);\n\n // 3. complete\n await wspaceMutate<{ completeUpload: { fileId: string } }>(\n `mutation BraCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) { fileId }\n }`,\n { input: { sessionId, fileSize, folderId } },\n apiGatewayUrl\n );\n setProgress(100);\n return folderId;\n },\n onSuccess: (folderId) => {\n qc.invalidateQueries({ queryKey: folderKey(entityType, entityId) });\n qc.invalidateQueries({ queryKey: filesKey(folderId) });\n },\n });\n\n return { ...mutation, progress };\n};\n\nconst useDownloadFile = () => {\n const { apiGatewayUrl } = useBrainyRich();\n return useMutation({\n mutationFn: async (id: string) => {\n const data = await wspaceFetch<{ getFileDownloadUrl: string }>(\n `query BraGetFileDownloadUrl($id: ID!, $expiresIn: Int) {\n getFileDownloadUrl(id: $id, expiresIn: $expiresIn)\n }`,\n { id, expiresIn: DOWNLOAD_URL_TTL_SECONDS },\n apiGatewayUrl\n );\n return data.getFileDownloadUrl;\n },\n });\n};\n\n// ============================================================================\n// Component\n// ============================================================================\n\nconst formatSize = (bytes: string): string => {\n const n = Number(bytes);\n if (!Number.isFinite(n) || n <= 0) return '—';\n if (n < 1024) return `${n} B`;\n if (n < 1024 * 1024) return `${(n / 1024).toFixed(0)} KB`;\n return `${(n / (1024 * 1024)).toFixed(1)} MB`;\n};\n\nexport interface DocumentsPanelProps {\n /** Polymorphic entity type, e.g. \"brainyrich-account\" | \"brainyrich-household\". */\n entityType: string;\n /** The bra entity's id (an ID scalar). */\n entityId: string;\n /** Optional heading; hide with `hideHeading`. */\n heading?: string;\n hideHeading?: boolean;\n}\n\nexport function DocumentsPanel({\n entityType,\n entityId,\n heading = 'Documents',\n hideHeading = false,\n}: DocumentsPanelProps) {\n const inputRef = useRef<HTMLInputElement>(null);\n const folder = useEntityFolder(entityType, entityId);\n const files = useFolderFiles(folder.data?.id);\n const upload = useDocumentUpload(entityType, entityId);\n const download = useDownloadFile();\n\n const onPick = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const file = e.target.files?.[0];\n if (file) upload.mutate(file);\n e.target.value = '';\n },\n [upload]\n );\n\n const onDownload = async (id: string) => {\n const url = await download.mutateAsync(id);\n if (url) window.open(url, '_blank', 'noopener,noreferrer');\n };\n\n const loading = folder.isLoading || (Boolean(folder.data) && files.isLoading);\n const list = files.data ?? [];\n\n return (\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n {!hideHeading && (\n <h3 className=\"flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <FileText className=\"size-4\" aria-hidden=\"true\" />\n {heading}\n </h3>\n )}\n <div className=\"ml-auto\">\n <input\n ref={inputRef}\n type=\"file\"\n className=\"sr-only\"\n aria-hidden=\"true\"\n tabIndex={-1}\n onChange={onPick}\n />\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n onClick={() => inputRef.current?.click()}\n disabled={upload.isPending}\n >\n <Upload className=\"size-4\" aria-hidden=\"true\" />\n {upload.isPending ? `Uploading ${upload.progress}%` : 'Upload'}\n </Button>\n </div>\n </div>\n\n {upload.isPending && (\n <div\n className=\"h-1.5 w-full overflow-hidden rounded-full bg-bg-sunken\"\n role=\"progressbar\"\n aria-label=\"Upload progress\"\n aria-valuenow={upload.progress}\n aria-valuemin={0}\n aria-valuemax={100}\n >\n <div\n className=\"h-full rounded-full bg-primary motion-safe:transition-[width] motion-safe:duration-200\"\n style={{ width: `${upload.progress}%` }}\n />\n </div>\n )}\n\n {loading ? (\n <div className=\"space-y-2\" aria-busy=\"true\">\n <Skeleton className=\"h-12 w-full rounded-md\" />\n <Skeleton className=\"h-12 w-full rounded-md\" />\n </div>\n ) : files.isError ? (\n <p className=\"text-sm text-status-error-text\">\n Could not load documents.{' '}\n <button\n type=\"button\"\n className=\"underline underline-offset-2\"\n onClick={() => files.refetch()}\n >\n Retry\n </button>\n </p>\n ) : list.length === 0 ? (\n <div className=\"rounded-lg border border-dashed border-border-subtle bg-bg-surface px-4 py-8 text-center\">\n <FileText className=\"mx-auto mb-2 size-6 text-text-secondary\" aria-hidden=\"true\" />\n <p className=\"text-sm text-text-primary\">No documents yet</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n Upload statements, KYC or tax documents for this record.\n </p>\n </div>\n ) : (\n <ul className=\"space-y-2\">\n {list.map((file) => (\n <li key={file.id}>\n <Card>\n <CardContent className=\"flex items-center gap-3 p-3\">\n <div className=\"flex size-9 shrink-0 items-center justify-center rounded-md bg-bg-sunken text-text-secondary\">\n <FileText className=\"size-4\" aria-hidden=\"true\" />\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-medium text-text-primary\">{file.name}</p>\n <p className=\"text-xs text-text-secondary\">\n {formatSize(file.size)} · {formatDate(file.createdAt)}\n </p>\n </div>\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n aria-label={`Download ${file.name}`}\n disabled={download.isPending}\n onClick={() => onDownload(file.id)}\n >\n <Download className=\"size-4\" aria-hidden=\"true\" />\n </Button>\n </CardContent>\n </Card>\n </li>\n ))}\n </ul>\n )}\n\n {(upload.isError || download.isError) && (\n <p className=\"text-sm text-status-error-text\">\n {upload.error instanceof Error\n ? upload.error.message\n : download.error instanceof Error\n ? 'Could not open the document. Please try again.'\n : 'Something went wrong. Please try again.'}\n </p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAiCA,IAAM,IAA2B,OAgB3B,IAAc,6CAEd,KAAc,GAAo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KAAa,WAAU;eAAvB;MACE,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,GAAD;QAAU,WAAU;QAAS,eAAY;QAAS,CAAA;OAC9C,CAAA;MACN,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,KAAD;QAAG,WAAU;kBAAkD,EAAK;QAAS,CAAA,EAC7E,kBAAC,KAAD;QAAG,WAAU;kBAAb;SACG,EAAW,EAAK,KAAK;SAAC;SAAI,EAAW,EAAK,UAAU;SACnD;UACA;;MACN,kBAAC,GAAD;OACE,MAAK;OACL,MAAK;OACL,SAAQ;OACR,cAAY,YAAY,EAAK;OAC7B,UAAU,EAAS;OACnB,eAAe,EAAW,EAAK,GAAG;iBAElC,kBAAC,GAAD;QAAU,WAAU;QAAS,eAAY;QAAS,CAAA;OAC3C,CAAA;MACG;QACT,CAAA,EACJ,EAxBI,EAAK,GAwBT,CACL;IACC,CAAA;IAGL,EAAO,WAAW,EAAS,YAC3B,kBAAC,KAAD;IAAG,WAAU;cACV,EAAO,iBAAiB,QACrB,EAAO,MAAM,UACb,EAAS,iBAAiB,QACxB,mDACA;IACJ,CAAA;GAEF"}
1
+ {"version":3,"file":"DocumentsPanel.js","names":[],"sources":["../../../../src/brainyrich/components/reuse/DocumentsPanel.tsx"],"sourcesContent":["/**\n * DocumentsPanel — REUSE of `wspace-files-svc` for statement / KYC / tax-doc\n * attachments on Accounts + Households.\n * @module brainyrich/components/reuse/DocumentsPanel\n *\n * A wealth product needs to attach documents (statements, KYC, tax packs) to\n * accounts and households. `wspace-files-svc` has no native entity-owned link on\n * `File`, so we scope documents to an entity via a dedicated, stably-named\n * FOLDER per `(entityType, entityId)` and list its contents. All ops route\n * through the workspace supergraph the MFE already uses.\n *\n * Flow:\n * - resolve folder → `getFolders(filter)` matched by name (created lazily on\n * first upload via `createFolder`); no side-effects on read.\n * - list → `getFilesInFolder(folderId, pagination)`\n * - upload (3-step) → `initiateUpload` → S3 `PUT` (byte-progress) → `completeUpload`\n * - download → `getFileDownloadUrl(id, expiresIn)` capped at 21600s to\n * avoid the >604800 fleet bug (S3 7-day cap → 500).\n *\n * Presentational + self-contained: owns its hooks, reads the gateway base URL\n * from `useBrainyRich()`, uses fe-libs/ui primitives + semantic tokens.\n */\n\nimport { useCallback, useRef, useState } from 'react';\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { Download, FileText, Upload } from 'lucide-react';\nimport { Button, Card, CardContent, Skeleton } from '@burdenoff/fe-libs/ui';\n\nimport { useBrainyRich } from '../../providers/BrainyRichProvider';\nimport { formatDate } from '../../pages/_shared';\nimport { wspaceFetch, wspaceMutate } from './transport';\n\n// Presigned-URL TTL: cap at 21600s (6h). >604800 (S3 7-day) → INTERNAL_SERVER_ERROR.\nconst DOWNLOAD_URL_TTL_SECONDS = 21600;\n\ninterface FilesFolder {\n id: string;\n name: string;\n}\n\ninterface FilesFile {\n id: string;\n name: string;\n extension: string;\n mimeType: string;\n size: string;\n createdAt: string;\n}\n\nconst FILE_FIELDS = 'id name extension mimeType size createdAt';\n\nconst folderName = (entityType: string, entityId: string) =>\n `BrainyRich · ${entityType} · ${entityId}`;\n\nconst folderKey = (entityType: string, entityId: string) =>\n ['brainyrich', 'entity-folder', entityType, entityId] as const;\n\nconst filesKey = (folderId: string | null | undefined) =>\n ['brainyrich', 'folder-files', folderId ?? 'none'] as const;\n\n// ============================================================================\n// Folder resolution (read-only — no lazy creation here)\n// ============================================================================\n\nconst useEntityFolder = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useBrainyRich();\n const wanted = entityId ? folderName(entityType, entityId) : '';\n return useQuery({\n queryKey: folderKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{ getFolders: { folders: FilesFolder[] } }>(\n `query BraGetFolders($pagination: PaginationInput) {\n getFolders(pagination: $pagination) { folders { id name } }\n }`,\n { pagination: { limit: 200, offset: 0 } },\n apiGatewayUrl\n );\n return data.getFolders.folders.find((f) => f.name === wanted) ?? null;\n },\n });\n};\n\nconst useFolderFiles = (folderId: string | null | undefined) => {\n const { apiGatewayUrl } = useBrainyRich();\n return useQuery({\n queryKey: filesKey(folderId),\n enabled: Boolean(folderId),\n queryFn: async () => {\n const data = await wspaceFetch<{ getFilesInFolder: { files: FilesFile[] } }>(\n `query BraGetFilesInFolder($folderId: ID, $pagination: PaginationInput) {\n getFilesInFolder(folderId: $folderId, pagination: $pagination) {\n files { ${FILE_FIELDS} }\n }\n }`,\n { folderId, pagination: { limit: 100, offset: 0 } },\n apiGatewayUrl\n );\n return data.getFilesInFolder.files;\n },\n });\n};\n\n// ============================================================================\n// Upload (3-step platform flow, with lazy folder creation)\n// ============================================================================\n\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 xhr.status >= 200 && xhr.status < 300\n ? resolve()\n : reject(new Error(`File storage rejected the upload (HTTP ${xhr.status}).`));\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\nconst useDocumentUpload = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n const [progress, setProgress] = useState(0);\n\n const mutation = useMutation({\n mutationFn: async (file: File) => {\n setProgress(0);\n\n // 0. resolve or create the entity folder\n let folder = await wspaceFetch<{ getFolders: { folders: FilesFolder[] } }>(\n `query BraResolveFolder($pagination: PaginationInput) {\n getFolders(pagination: $pagination) { folders { id name } }\n }`,\n { pagination: { limit: 200, offset: 0 } },\n apiGatewayUrl\n ).then((d) => d.getFolders.folders.find((f) => f.name === folderName(entityType, entityId)));\n\n if (!folder) {\n const created = await wspaceMutate<{ createFolder: FilesFolder }>(\n `mutation BraCreateFolder($input: CreateFolderInput!) {\n createFolder(input: $input) { id name }\n }`,\n {\n input: {\n name: folderName(entityType, entityId),\n description: `Documents attached to ${entityType} ${entityId}.`,\n visibility: 'WORKSPACE',\n },\n },\n apiGatewayUrl\n );\n folder = created.createFolder;\n }\n const folderId = folder.id;\n\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 const fileSize = String(file.size);\n\n // 1. initiate\n const initiated = await wspaceMutate<{\n initiateUpload: { uploadUrl: string | null; session: { id: string } };\n }>(\n `mutation BraInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) { uploadUrl session { id } }\n }`,\n {\n input: {\n fileName: file.name,\n extension,\n mimeType,\n fileSize,\n folderId,\n visibility: 'WORKSPACE',\n },\n },\n apiGatewayUrl\n );\n const { uploadUrl } = initiated.initiateUpload;\n const sessionId = initiated.initiateUpload.session.id;\n if (!uploadUrl) throw new Error('The file service did not return an upload URL.');\n\n // 2. PUT the bytes\n await putWithProgress(uploadUrl, file, mimeType, setProgress);\n\n // 3. complete\n await wspaceMutate<{ completeUpload: { fileId: string } }>(\n `mutation BraCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) { fileId }\n }`,\n { input: { sessionId, fileSize, folderId } },\n apiGatewayUrl\n );\n setProgress(100);\n return folderId;\n },\n onSuccess: (folderId) => {\n qc.invalidateQueries({ queryKey: folderKey(entityType, entityId) });\n qc.invalidateQueries({ queryKey: filesKey(folderId) });\n },\n });\n\n return { ...mutation, progress };\n};\n\nconst useDownloadFile = () => {\n const { apiGatewayUrl } = useBrainyRich();\n return useMutation({\n mutationFn: async (id: string) => {\n const data = await wspaceFetch<{ getFileDownloadUrl: string }>(\n `query BraGetFileDownloadUrl($id: ID!, $expiresIn: Int) {\n getFileDownloadUrl(id: $id, expiresIn: $expiresIn)\n }`,\n { id, expiresIn: DOWNLOAD_URL_TTL_SECONDS },\n apiGatewayUrl\n );\n return data.getFileDownloadUrl;\n },\n });\n};\n\n// ============================================================================\n// Component\n// ============================================================================\n\nconst formatSize = (bytes: string): string => {\n const n = Number(bytes);\n if (!Number.isFinite(n) || n <= 0) return '—';\n if (n < 1024) return `${n} B`;\n if (n < 1024 * 1024) return `${(n / 1024).toFixed(0)} KB`;\n return `${(n / (1024 * 1024)).toFixed(1)} MB`;\n};\n\nexport interface DocumentsPanelProps {\n /** Polymorphic entity type, e.g. \"brainyrich-account\" | \"brainyrich-household\". */\n entityType: string;\n /** The bra entity's id (an ID scalar). */\n entityId: string;\n /** Optional heading; hide with `hideHeading`. */\n heading?: string;\n hideHeading?: boolean;\n}\n\nexport function DocumentsPanel({\n entityType,\n entityId,\n heading = 'Documents',\n hideHeading = false,\n}: DocumentsPanelProps) {\n const inputRef = useRef<HTMLInputElement>(null);\n const folder = useEntityFolder(entityType, entityId);\n const files = useFolderFiles(folder.data?.id);\n const upload = useDocumentUpload(entityType, entityId);\n const download = useDownloadFile();\n\n const onPick = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const file = e.target.files?.[0];\n if (file) upload.mutate(file);\n e.target.value = '';\n },\n [upload]\n );\n\n const onDownload = async (id: string) => {\n const url = await download.mutateAsync(id);\n if (url) window.open(url, '_blank', 'noopener,noreferrer');\n };\n\n const loading = folder.isLoading || (Boolean(folder.data) && files.isLoading);\n const list = files.data ?? [];\n\n return (\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n {!hideHeading && (\n <h3 className=\"flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <FileText className=\"size-4\" aria-hidden=\"true\" />\n {heading}\n </h3>\n )}\n <div className=\"ml-auto\">\n <input\n ref={inputRef}\n type=\"file\"\n className=\"sr-only\"\n aria-hidden=\"true\"\n tabIndex={-1}\n onChange={onPick}\n />\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n onClick={() => inputRef.current?.click()}\n disabled={upload.isPending}\n >\n <Upload className=\"size-4\" aria-hidden=\"true\" />\n {upload.isPending ? `Uploading ${upload.progress}%` : 'Upload'}\n </Button>\n </div>\n </div>\n\n {upload.isPending && (\n <div\n className=\"h-1.5 w-full overflow-hidden rounded-full bg-bg-sunken\"\n role=\"progressbar\"\n aria-label=\"Upload progress\"\n aria-valuenow={upload.progress}\n aria-valuemin={0}\n aria-valuemax={100}\n >\n <div\n className=\"h-full rounded-full bg-primary motion-safe:transition-[width] motion-safe:duration-200\"\n style={{ width: `${upload.progress}%` }}\n />\n </div>\n )}\n\n {loading ? (\n <div className=\"space-y-2\" aria-busy=\"true\">\n <Skeleton className=\"h-12 w-full rounded-md\" />\n <Skeleton className=\"h-12 w-full rounded-md\" />\n </div>\n ) : files.isError ? (\n <p className=\"text-sm text-status-error-text\">\n Could not load documents.{' '}\n <button\n type=\"button\"\n className=\"underline underline-offset-2\"\n onClick={() => files.refetch()}\n >\n Retry\n </button>\n </p>\n ) : list.length === 0 ? (\n <div className=\"rounded-lg border border-dashed border-border-subtle bg-bg-surface px-4 py-8 text-center\">\n <FileText className=\"mx-auto mb-2 size-6 text-text-secondary\" aria-hidden=\"true\" />\n <p className=\"text-sm text-text-primary\">No documents yet</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n Upload statements, KYC or tax documents for this record.\n </p>\n </div>\n ) : (\n <ul className=\"space-y-2\">\n {list.map((file) => (\n <li key={file.id}>\n <Card>\n <CardContent className=\"flex items-center gap-3 p-3\">\n <div className=\"flex size-9 shrink-0 items-center justify-center rounded-md bg-bg-sunken text-text-secondary\">\n <FileText className=\"size-4\" aria-hidden=\"true\" />\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-medium text-text-primary\">{file.name}</p>\n <p className=\"text-xs text-text-secondary\">\n {formatSize(file.size)} · {formatDate(file.createdAt)}\n </p>\n </div>\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n aria-label={`Download ${file.name}`}\n disabled={download.isPending}\n onClick={() => onDownload(file.id)}\n >\n <Download className=\"size-4\" aria-hidden=\"true\" />\n </Button>\n </CardContent>\n </Card>\n </li>\n ))}\n </ul>\n )}\n\n {(upload.isError || download.isError) && (\n <p className=\"text-sm text-status-error-text\">\n {upload.error instanceof Error\n ? upload.error.message\n : download.error instanceof Error\n ? 'Could not open the document. Please try again.'\n : 'Something went wrong. Please try again.'}\n </p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAiCA,IAAM,IAA2B,OAgB3B,IAAc,6CAEd,KAAc,GAAoB,MACtC,gBAAgB,EAAW,KAAK,KAE5B,KAAa,GAAoB,MACrC;CAAC;CAAc;CAAiB;CAAY;CAAS,EAEjD,KAAY,MAChB;CAAC;CAAc;CAAgB,KAAY;CAAO,EAM9C,KAAmB,GAAoB,MAAiC;CAC5E,IAAM,EAAE,qBAAkB,GAAe,EACnC,IAAS,IAAW,EAAW,GAAY,EAAS,GAAG;AAC7D,QAAO,EAAS;EACd,UAAU,EAAU,GAAY,KAAY,GAAG;EAC/C,SAAS,EAAQ;EACjB,SAAS,aACM,MAAM,EACjB,yIAGA,EAAE,YAAY;GAAE,OAAO;GAAK,QAAQ;GAAG,EAAE,EACzC,EACD,EACW,WAAW,QAAQ,MAAM,MAAM,EAAE,SAAS,EAAO,IAAI;EAEpE,CAAC;GAGE,KAAkB,MAAwC;CAC9D,IAAM,EAAE,qBAAkB,GAAe;AACzC,QAAO,EAAS;EACd,UAAU,EAAS,EAAS;EAC5B,SAAS,EAAQ;EACjB,SAAS,aACM,MAAM,EACjB;;sBAEc,EAAY;;YAG1B;GAAE;GAAU,YAAY;IAAE,OAAO;IAAK,QAAQ;IAAG;GAAE,EACnD,EACD,EACW,iBAAiB;EAEhC,CAAC;;AAOJ,SAAS,EACP,GACA,GACA,GACA,GACe;AACf,QAAO,IAAI,SAAe,GAAS,MAAW;EAC5C,IAAM,IAAM,IAAI,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ACV,eAAe,EAAM,SAAS;gBAC/B;MAEQ,CAAA;KACP;QACF,EAAK,WAAW,IAClB,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,GAAD;MAAU,WAAU;MAA0C,eAAY;MAAS,CAAA;KACnF,kBAAC,KAAD;MAAG,WAAU;gBAA4B;MAAoB,CAAA;KAC7D,kBAAC,KAAD;MAAG,WAAU;gBAAqC;MAE9C,CAAA;KACA;QAEN,kBAAC,MAAD;IAAI,WAAU;cACX,EAAK,KAAK,MACT,kBAAC,MAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;KAAa,WAAU;eAAvB;MACE,kBAAC,OAAD;OAAK,WAAU;iBACb,kBAAC,GAAD;QAAU,WAAU;QAAS,eAAY;QAAS,CAAA;OAC9C,CAAA;MACN,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,KAAD;QAAG,WAAU;kBAAkD,EAAK;QAAS,CAAA,EAC7E,kBAAC,KAAD;QAAG,WAAU;kBAAb;SACG,EAAW,EAAK,KAAK;SAAC;SAAI,EAAW,EAAK,UAAU;SACnD;UACA;;MACN,kBAAC,GAAD;OACE,MAAK;OACL,MAAK;OACL,SAAQ;OACR,cAAY,YAAY,EAAK;OAC7B,UAAU,EAAS;OACnB,eAAe,EAAW,EAAK,GAAG;iBAElC,kBAAC,GAAD;QAAU,WAAU;QAAS,eAAY;QAAS,CAAA;OAC3C,CAAA;MACG;QACT,CAAA,EACJ,EAxBI,EAAK,GAwBT,CACL;IACC,CAAA;IAGL,EAAO,WAAW,EAAS,YAC3B,kBAAC,KAAD;IAAG,WAAU;cACV,EAAO,iBAAiB,QACrB,EAAO,MAAM,UACb,EAAS,iBAAiB,QACxB,mDACA;IACJ,CAAA;GAEF"}
@@ -1 +1 @@
1
- {"version":3,"file":"TagField.js","names":[],"sources":["../../../../src/brainyrich/components/reuse/TagField.tsx"],"sourcesContent":["/**\n * TagField — REUSE of `wspace-tags-svc` UniversalTag (polymorphic-by-entity).\n * @module brainyrich/components/reuse/TagField\n *\n * Drop-in replacement for the free-text tag string inputs on Households /\n * Portfolios / Goals. Instead of writing a `tags` scalar on the bra entity,\n * this manages REAL `UniversalTag` assignments keyed by `(entityType, entityId)`\n * against the platform tag store — no bra-svc change required. The bra `tags`\n * scalar stays as legacy; this component is the canonical tag surface.\n *\n * Ops (all on the workspace supergraph):\n * - `getEntityTags(entityType, entityId)` → current assignments (chips)\n * - `searchTags(query, limit)` → typeahead over existing tags\n * - `assignTag(input)` → link an existing tag\n * - `createTag(input)` + `assignTag(...)` → create-from-label then link\n * - `removeTagAssignment(id)` → unlink a chip\n *\n * `createTag` needs a `vocabularyId`; we resolve a stable, workspace-scoped\n * \"brainyrich\" vocabulary via `getVocabularyByKey` (creating it on first use).\n *\n * Presentational + self-contained: owns its react-query hooks, reads the gateway\n * base URL from `useBrainyRich()`, uses fe-libs/ui primitives + semantic tokens.\n */\n\nimport { useState, type KeyboardEvent } from 'react';\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { Plus, Tag as TagIcon, X } from 'lucide-react';\nimport { Badge, Button, Input, Label, Skeleton } from '@burdenoff/fe-libs/ui';\n\nimport { useBrainyRich } from '../../providers/BrainyRichProvider';\nimport { wspaceFetch, wspaceMutate } from './transport';\n\n// ============================================================================\n// Types (mirror the UniversalTag SDL fields we select)\n// ============================================================================\n\ninterface UniversalTag {\n id: string;\n label: string;\n color: string | null;\n key: string;\n}\n\ninterface UniversalTagAssignment {\n id: string;\n tag: UniversalTag;\n}\n\nconst TAG_FIELDS = 'id label color key';\nconst BRAINYRICH_VOCABULARY_KEY = 'brainyrich';\n\nconst entityTagsKey = (entityType: string, entityId: string) =>\n ['brainyrich', 'entity-tags', entityType, entityId] as const;\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// ============================================================================\n// Hooks (co-located; reuse the shared workspace transport)\n// ============================================================================\n\nconst useEntityTags = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useBrainyRich();\n return useQuery({\n queryKey: entityTagsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{ getEntityTags: UniversalTagAssignment[] }>(\n `query BraGetEntityTags($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\nconst useTagSearch = (query: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const trimmed = query.trim();\n return useQuery({\n queryKey: ['brainyrich', 'tag-search', trimmed],\n enabled: trimmed.length > 0,\n queryFn: async () => {\n const data = await wspaceFetch<{ searchTags: UniversalTag[] }>(\n `query BraSearchTags($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/** Resolve (creating on first use) the workspace-scoped \"brainyrich\" vocabulary. */\nconst resolveVocabularyId = async (baseUrl?: string): Promise<string> => {\n const existing = await wspaceFetch<{ getVocabularyByKey: { id: string } | null }>(\n `query BraGetVocabulary($key: String!) {\n getVocabularyByKey(key: $key) { id }\n }`,\n { key: BRAINYRICH_VOCABULARY_KEY },\n baseUrl\n );\n if (existing.getVocabularyByKey?.id) return existing.getVocabularyByKey.id;\n\n const created = await wspaceMutate<{ createVocabulary: { id: string } }>(\n `mutation BraCreateVocabulary($input: CreateVocabularyInput!) {\n createVocabulary(input: $input) { id }\n }`,\n {\n input: {\n key: BRAINYRICH_VOCABULARY_KEY,\n name: 'BrainyRich',\n description: 'Tags for BrainyRich households, portfolios and goals.',\n allowCustomTags: true,\n },\n },\n baseUrl\n );\n return created.createVocabulary.id;\n};\n\nconst useAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (tagId: string) => {\n const data = await wspaceMutate<{ assignTag: { id: string } }>(\n `mutation BraAssignTag($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\nconst useCreateAndAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (label: string) => {\n const trimmed = label.trim();\n if (!trimmed) throw new Error('A tag label is required.');\n const vocabularyId = await resolveVocabularyId(apiGatewayUrl);\n // Unique key avoids collisions inside the vocabulary; the label is the display text.\n const key = `${slugify(trimmed)}-${Math.random().toString(36).slice(2, 6)}`;\n const created = await wspaceMutate<{ createTag: { id: string } }>(\n `mutation BraCreateTag($input: CreateTagInput!) {\n createTag(input: $input) { id }\n }`,\n { input: { vocabularyId, key, label: trimmed } },\n apiGatewayUrl\n );\n await wspaceMutate<{ assignTag: { id: string } }>(\n `mutation BraAssignCreatedTag($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\nconst useRemoveTagAssignment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (assignmentId: string) => {\n const data = await wspaceMutate<{ removeTagAssignment: boolean }>(\n `mutation BraRemoveTagAssignment($id: ID!) { removeTagAssignment(id: $id) }`,\n { id: assignmentId },\n apiGatewayUrl\n );\n return data.removeTagAssignment;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport interface TagFieldProps {\n /** Polymorphic entity type, e.g. \"brainyrich-household\". */\n entityType: string;\n /** The bra entity's id (an ID scalar). */\n entityId: string;\n /** Optional field label (hidden visually when `hideLabel`). */\n label?: string;\n hideLabel?: boolean;\n}\n\nexport function TagField({\n entityType,\n entityId,\n label = 'Tags',\n hideLabel = false,\n}: TagFieldProps) {\n const [draft, setDraft] = useState('');\n const assignments = useEntityTags(entityType, entityId);\n const search = useTagSearch(draft);\n const assign = useAssignTag(entityType, entityId);\n const createAndAssign = useCreateAndAssignTag(entityType, entityId);\n const remove = useRemoveTagAssignment(entityType, entityId);\n\n const busy = assign.isPending || createAndAssign.isPending;\n const assigned = assignments.data ?? [];\n const assignedTagIds = new Set(assigned.map((a) => a.tag.id));\n const suggestions = (search.data ?? []).filter((t) => !assignedTagIds.has(t.id));\n const trimmed = draft.trim();\n const exactExists = suggestions.some((t) => t.label.toLowerCase() === trimmed.toLowerCase());\n\n const inputId = `tagfield-${entityType}-${entityId}`;\n\n const commitCreate = async () => {\n if (!trimmed || busy) return;\n await createAndAssign.mutateAsync(trimmed);\n setDraft('');\n };\n\n const commitAssign = async (tagId: string) => {\n if (busy) return;\n await assign.mutateAsync(tagId);\n setDraft('');\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n void commitCreate();\n }\n };\n\n return (\n <div className=\"space-y-2\">\n {!hideLabel && (\n <Label htmlFor={inputId} className=\"text-text-primary\">\n {label}\n </Label>\n )}\n\n {/* Current assignments */}\n {assignments.isLoading ? (\n <div className=\"flex flex-wrap gap-2\" aria-busy=\"true\">\n <Skeleton className=\"h-6 w-16 rounded-full\" />\n <Skeleton className=\"h-6 w-20 rounded-full\" />\n <Skeleton className=\"h-6 w-12 rounded-full\" />\n </div>\n ) : assignments.isError ? (\n <p className=\"text-sm text-status-error-text\">\n Could not load tags.{' '}\n <button\n type=\"button\"\n className=\"underline underline-offset-2\"\n onClick={() => assignments.refetch()}\n >\n Retry\n </button>\n </p>\n ) : assigned.length === 0 ? (\n <p className=\"flex items-center gap-1.5 text-sm text-text-secondary\">\n <TagIcon className=\"size-3.5\" aria-hidden=\"true\" />\n No tags yet — add one below.\n </p>\n ) : (\n <div className=\"flex flex-wrap gap-2\">\n {assigned.map((a) => (\n <Badge key={a.id} variant=\"secondary\" className=\"gap-1 pr-1\">\n <span>{a.tag.label}</span>\n <button\n type=\"button\"\n aria-label={`Remove tag ${a.tag.label}`}\n className=\"rounded-full p-0.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-border-focus disabled:opacity-50\"\n disabled={remove.isPending}\n onClick={() => remove.mutate(a.id)}\n >\n <X className=\"size-3\" aria-hidden=\"true\" />\n </button>\n </Badge>\n ))}\n </div>\n )}\n\n {/* Add control */}\n <div className=\"relative\">\n <div className=\"flex gap-2\">\n <Input\n id={inputId}\n value={draft}\n onChange={(e) => setDraft(e.target.value)}\n onKeyDown={onKeyDown}\n placeholder=\"Search or create a tag…\"\n aria-label=\"Search or create a tag\"\n autoComplete=\"off\"\n disabled={busy}\n />\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={commitCreate}\n disabled={!trimmed || busy || exactExists}\n >\n <Plus className=\"size-4\" aria-hidden=\"true\" />\n Create\n </Button>\n </div>\n\n {/* Typeahead suggestions */}\n {trimmed.length > 0 && (suggestions.length > 0 || search.isFetching) && (\n <ul\n className=\"absolute z-10 mt-1 w-full overflow-hidden rounded-md border border-border-subtle bg-bg-surface shadow-md\"\n role=\"listbox\"\n aria-label=\"Tag suggestions\"\n >\n {search.isFetching && suggestions.length === 0 ? (\n <li className=\"px-3 py-2 text-sm text-text-secondary\">Searching…</li>\n ) : (\n suggestions.map((t) => (\n <li key={t.id} role=\"option\" aria-selected=\"false\">\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-2 px-3 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken focus-visible:bg-bg-sunken focus-visible:outline-none disabled:opacity-50\"\n disabled={busy}\n onClick={() => commitAssign(t.id)}\n >\n <TagIcon className=\"size-3.5 text-text-secondary\" aria-hidden=\"true\" />\n {t.label}\n </button>\n </li>\n ))\n )}\n </ul>\n )}\n </div>\n\n {(assign.isError || createAndAssign.isError || remove.isError) && (\n <p className=\"text-sm text-status-error-text\">\n Could not update tags. Please try again.\n </p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAgDA,IAAM,IAAa,sBACb,IAA4B,cAE5B,KAAiB,GAAoB,MACzC;CAAC;CAAc;CAAe;CAAY;CAAS,EAE/C,KAAW,MACf,EACG,aAAa,CACb,MAAM,CACN,QAAQ,eAAe,IAAI,CAC3B,QAAQ,YAAY,GAAG,CACvB,MAAM,GAAG,GAAG,IAAI,OAMf,KAAiB,GAAoB,MAAiC;CAC1E,IAAM,EAAE,qBAAkB,GAAe;AACzC,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;GAGE,KAAgB,MAAkB;CACtC,IAAM,EAAE,qBAAkB,GAAe,EACnC,IAAU,EAAM,MAAM;AAC5B,QAAO,EAAS;EACd,UAAU;GAAC;GAAc;GAAc;GAAQ;EAC/C,SAAS,EAAQ,SAAS;EAC1B,SAAS,aACM,MAAM,EACjB;uDAC+C,EAAW;YAE1D;GAAE,OAAO;GAAS,OAAO;GAAG,EAC5B,EACD,EACW;EAEf,CAAC;GAIE,IAAsB,OAAO,MAAsC;CACvE,IAAM,IAAW,MAAM,EACrB,8FAGA,EAAE,KAAK,GAA2B,EAClC,EACD;AAiBD,QAhBI,EAAS,oBAAoB,KAAW,EAAS,mBAAmB,MAExD,MAAM,EACpB,uHAGA,EACE,OAAO;EACL,KAAK;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BAAc;gBACzC,kBAAC,UAAD;OACE,MAAK;OACL,WAAU;OACV,UAAU;OACV,eAAe,EAAa,EAAE,GAAG;iBAJnC,CAME,kBAAC,GAAD;QAAS,WAAU;QAA+B,eAAY;QAAS,CAAA,EACtE,EAAE,MACI;;MACN,EAVI,EAAE,GAUN,CACL;KAED,CAAA,CAEH;;IAEJ,EAAO,WAAW,EAAgB,WAAW,EAAO,YACpD,kBAAC,KAAD;IAAG,WAAU;cAAiC;IAE1C,CAAA;GAEF"}
1
+ {"version":3,"file":"TagField.js","names":[],"sources":["../../../../src/brainyrich/components/reuse/TagField.tsx"],"sourcesContent":["/**\n * TagField — REUSE of `wspace-tags-svc` UniversalTag (polymorphic-by-entity).\n * @module brainyrich/components/reuse/TagField\n *\n * Drop-in replacement for the free-text tag string inputs on Households /\n * Portfolios / Goals. Instead of writing a `tags` scalar on the bra entity,\n * this manages REAL `UniversalTag` assignments keyed by `(entityType, entityId)`\n * against the platform tag store — no bra-svc change required. The bra `tags`\n * scalar stays as legacy; this component is the canonical tag surface.\n *\n * Ops (all on the workspace supergraph):\n * - `getEntityTags(entityType, entityId)` → current assignments (chips)\n * - `searchTags(query, limit)` → typeahead over existing tags\n * - `assignTag(input)` → link an existing tag\n * - `createTag(input)` + `assignTag(...)` → create-from-label then link\n * - `removeTagAssignment(id)` → unlink a chip\n *\n * `createTag` needs a `vocabularyId`; we resolve a stable, workspace-scoped\n * \"brainyrich\" vocabulary via `getVocabularyByKey` (creating it on first use).\n *\n * Presentational + self-contained: owns its react-query hooks, reads the gateway\n * base URL from `useBrainyRich()`, uses fe-libs/ui primitives + semantic tokens.\n */\n\nimport { useState, type KeyboardEvent } from 'react';\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { Plus, Tag as TagIcon, X } from 'lucide-react';\nimport { Badge, Button, Input, Label, Skeleton } from '@burdenoff/fe-libs/ui';\n\nimport { useBrainyRich } from '../../providers/BrainyRichProvider';\nimport { wspaceFetch, wspaceMutate } from './transport';\n\n// ============================================================================\n// Types (mirror the UniversalTag SDL fields we select)\n// ============================================================================\n\ninterface UniversalTag {\n id: string;\n label: string;\n color: string | null;\n key: string;\n}\n\ninterface UniversalTagAssignment {\n id: string;\n tag: UniversalTag;\n}\n\nconst TAG_FIELDS = 'id label color key';\nconst BRAINYRICH_VOCABULARY_KEY = 'brainyrich';\n\nconst entityTagsKey = (entityType: string, entityId: string) =>\n ['brainyrich', 'entity-tags', entityType, entityId] as const;\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// ============================================================================\n// Hooks (co-located; reuse the shared workspace transport)\n// ============================================================================\n\nconst useEntityTags = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useBrainyRich();\n return useQuery({\n queryKey: entityTagsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{ getEntityTags: UniversalTagAssignment[] }>(\n `query BraGetEntityTags($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\nconst useTagSearch = (query: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const trimmed = query.trim();\n return useQuery({\n queryKey: ['brainyrich', 'tag-search', trimmed],\n enabled: trimmed.length > 0,\n queryFn: async () => {\n const data = await wspaceFetch<{ searchTags: UniversalTag[] }>(\n `query BraSearchTags($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/** Resolve (creating on first use) the workspace-scoped \"brainyrich\" vocabulary. */\nconst resolveVocabularyId = async (baseUrl?: string): Promise<string> => {\n const existing = await wspaceFetch<{ getVocabularyByKey: { id: string } | null }>(\n `query BraGetVocabulary($key: String!) {\n getVocabularyByKey(key: $key) { id }\n }`,\n { key: BRAINYRICH_VOCABULARY_KEY },\n baseUrl\n );\n if (existing.getVocabularyByKey?.id) return existing.getVocabularyByKey.id;\n\n const created = await wspaceMutate<{ createVocabulary: { id: string } }>(\n `mutation BraCreateVocabulary($input: CreateVocabularyInput!) {\n createVocabulary(input: $input) { id }\n }`,\n {\n input: {\n key: BRAINYRICH_VOCABULARY_KEY,\n name: 'BrainyRich',\n description: 'Tags for BrainyRich households, portfolios and goals.',\n allowCustomTags: true,\n },\n },\n baseUrl\n );\n return created.createVocabulary.id;\n};\n\nconst useAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (tagId: string) => {\n const data = await wspaceMutate<{ assignTag: { id: string } }>(\n `mutation BraAssignTag($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\nconst useCreateAndAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (label: string) => {\n const trimmed = label.trim();\n if (!trimmed) throw new Error('A tag label is required.');\n const vocabularyId = await resolveVocabularyId(apiGatewayUrl);\n // Unique key avoids collisions inside the vocabulary; the label is the display text.\n const key = `${slugify(trimmed)}-${Math.random().toString(36).slice(2, 6)}`;\n const created = await wspaceMutate<{ createTag: { id: string } }>(\n `mutation BraCreateTag($input: CreateTagInput!) {\n createTag(input: $input) { id }\n }`,\n { input: { vocabularyId, key, label: trimmed } },\n apiGatewayUrl\n );\n await wspaceMutate<{ assignTag: { id: string } }>(\n `mutation BraAssignCreatedTag($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\nconst useRemoveTagAssignment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (assignmentId: string) => {\n const data = await wspaceMutate<{ removeTagAssignment: boolean }>(\n `mutation BraRemoveTagAssignment($id: ID!) { removeTagAssignment(id: $id) }`,\n { id: assignmentId },\n apiGatewayUrl\n );\n return data.removeTagAssignment;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport interface TagFieldProps {\n /** Polymorphic entity type, e.g. \"brainyrich-household\". */\n entityType: string;\n /** The bra entity's id (an ID scalar). */\n entityId: string;\n /** Optional field label (hidden visually when `hideLabel`). */\n label?: string;\n hideLabel?: boolean;\n}\n\nexport function TagField({\n entityType,\n entityId,\n label = 'Tags',\n hideLabel = false,\n}: TagFieldProps) {\n const [draft, setDraft] = useState('');\n const assignments = useEntityTags(entityType, entityId);\n const search = useTagSearch(draft);\n const assign = useAssignTag(entityType, entityId);\n const createAndAssign = useCreateAndAssignTag(entityType, entityId);\n const remove = useRemoveTagAssignment(entityType, entityId);\n\n const busy = assign.isPending || createAndAssign.isPending;\n const assigned = assignments.data ?? [];\n const assignedTagIds = new Set(assigned.map((a) => a.tag.id));\n const suggestions = (search.data ?? []).filter((t) => !assignedTagIds.has(t.id));\n const trimmed = draft.trim();\n const exactExists = suggestions.some((t) => t.label.toLowerCase() === trimmed.toLowerCase());\n\n const inputId = `tagfield-${entityType}-${entityId}`;\n\n const commitCreate = async () => {\n if (!trimmed || busy) return;\n await createAndAssign.mutateAsync(trimmed);\n setDraft('');\n };\n\n const commitAssign = async (tagId: string) => {\n if (busy) return;\n await assign.mutateAsync(tagId);\n setDraft('');\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n void commitCreate();\n }\n };\n\n return (\n <div className=\"space-y-2\">\n {!hideLabel && (\n <Label htmlFor={inputId} className=\"text-text-primary\">\n {label}\n </Label>\n )}\n\n {/* Current assignments */}\n {assignments.isLoading ? (\n <div className=\"flex flex-wrap gap-2\" aria-busy=\"true\">\n <Skeleton className=\"h-6 w-16 rounded-full\" />\n <Skeleton className=\"h-6 w-20 rounded-full\" />\n <Skeleton className=\"h-6 w-12 rounded-full\" />\n </div>\n ) : assignments.isError ? (\n <p className=\"text-sm text-status-error-text\">\n Could not load tags.{' '}\n <button\n type=\"button\"\n className=\"underline underline-offset-2\"\n onClick={() => assignments.refetch()}\n >\n Retry\n </button>\n </p>\n ) : assigned.length === 0 ? (\n <p className=\"flex items-center gap-1.5 text-sm text-text-secondary\">\n <TagIcon className=\"size-3.5\" aria-hidden=\"true\" />\n No tags yet — add one below.\n </p>\n ) : (\n <div className=\"flex flex-wrap gap-2\">\n {assigned.map((a) => (\n <Badge key={a.id} variant=\"secondary\" className=\"gap-1 pr-1\">\n <span>{a.tag.label}</span>\n <button\n type=\"button\"\n aria-label={`Remove tag ${a.tag.label}`}\n className=\"rounded-full p-0.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-border-focus disabled:opacity-50\"\n disabled={remove.isPending}\n onClick={() => remove.mutate(a.id)}\n >\n <X className=\"size-3\" aria-hidden=\"true\" />\n </button>\n </Badge>\n ))}\n </div>\n )}\n\n {/* Add control */}\n <div className=\"relative\">\n <div className=\"flex gap-2\">\n <Input\n id={inputId}\n value={draft}\n onChange={(e) => setDraft(e.target.value)}\n onKeyDown={onKeyDown}\n placeholder=\"Search or create a tag…\"\n aria-label=\"Search or create a tag\"\n autoComplete=\"off\"\n disabled={busy}\n />\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={commitCreate}\n disabled={!trimmed || busy || exactExists}\n >\n <Plus className=\"size-4\" aria-hidden=\"true\" />\n Create\n </Button>\n </div>\n\n {/* Typeahead suggestions */}\n {trimmed.length > 0 && (suggestions.length > 0 || search.isFetching) && (\n <ul\n className=\"absolute z-10 mt-1 w-full overflow-hidden rounded-md border border-border-subtle bg-bg-surface shadow-md\"\n role=\"listbox\"\n aria-label=\"Tag suggestions\"\n >\n {search.isFetching && suggestions.length === 0 ? (\n <li className=\"px-3 py-2 text-sm text-text-secondary\">Searching…</li>\n ) : (\n suggestions.map((t) => (\n <li key={t.id} role=\"option\" aria-selected=\"false\">\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-2 px-3 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken focus-visible:bg-bg-sunken focus-visible:outline-none disabled:opacity-50\"\n disabled={busy}\n onClick={() => commitAssign(t.id)}\n >\n <TagIcon className=\"size-3.5 text-text-secondary\" aria-hidden=\"true\" />\n {t.label}\n </button>\n </li>\n ))\n )}\n </ul>\n )}\n </div>\n\n {(assign.isError || createAndAssign.isError || remove.isError) && (\n <p className=\"text-sm text-status-error-text\">Could not update tags. Please try again.</p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAgDA,IAAM,IAAa,sBACb,IAA4B,cAE5B,KAAiB,GAAoB,MACzC;CAAC;CAAc;CAAe;CAAY;CAAS,EAE/C,KAAW,MACf,EACG,aAAa,CACb,MAAM,CACN,QAAQ,eAAe,IAAI,CAC3B,QAAQ,YAAY,GAAG,CACvB,MAAM,GAAG,GAAG,IAAI,OAMf,KAAiB,GAAoB,MAAiC;CAC1E,IAAM,EAAE,qBAAkB,GAAe;AACzC,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;GAGE,KAAgB,MAAkB;CACtC,IA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