@fluid-app/portal-sdk 0.1.350 → 0.1.352

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 (280) hide show
  1. package/dist/{AddressAutocompleteInput-JBXGT1iL.cjs → AddressAutocompleteInput-BQz2jaUO.cjs} +134 -79
  2. package/dist/AddressAutocompleteInput-BQz2jaUO.cjs.map +1 -0
  3. package/dist/{AddressAutocompleteInput-BANMgwzR.mjs → AddressAutocompleteInput-Dds2GjGt.mjs} +134 -79
  4. package/dist/AddressAutocompleteInput-Dds2GjGt.mjs.map +1 -0
  5. package/dist/{AlertWidget-BmOGoxTA.mjs → AlertWidget-DMwOt9u8.mjs} +3 -3
  6. package/dist/{AlertWidget-BmOGoxTA.mjs.map → AlertWidget-DMwOt9u8.mjs.map} +1 -1
  7. package/dist/{AppDownloadScreen-C78ggXk3.mjs → AppDownloadScreen-CBg2shvo.mjs} +5 -5
  8. package/dist/{AppDownloadScreen-C78ggXk3.mjs.map → AppDownloadScreen-CBg2shvo.mjs.map} +1 -1
  9. package/dist/{AppDownloadScreen-DIcwvAZ4.cjs → AppDownloadScreen-CMR1y4kP.cjs} +4 -4
  10. package/dist/{AppDownloadScreen-DIcwvAZ4.cjs.map → AppDownloadScreen-CMR1y4kP.cjs.map} +1 -1
  11. package/dist/{AppNavigationContext-BCj6iFxr.mjs → AppNavigationContext-B-wToUBG.mjs} +3 -3
  12. package/dist/AppNavigationContext-B-wToUBG.mjs.map +1 -0
  13. package/dist/{AppNavigationContext-CoNtdUrr.cjs → AppNavigationContext-CLOwdlpx.cjs} +2 -2
  14. package/dist/AppNavigationContext-CLOwdlpx.cjs.map +1 -0
  15. package/dist/{BulletListWidget-AIIf29RP.mjs → BulletListWidget-D--Mmasw.mjs} +2 -2
  16. package/dist/{BulletListWidget-AIIf29RP.mjs.map → BulletListWidget-D--Mmasw.mjs.map} +1 -1
  17. package/dist/{CalendarWidget-DW5wz5ke.cjs → CalendarWidget-Aa7H9M7f.cjs} +4 -4
  18. package/dist/{CalendarWidget-DW5wz5ke.cjs.map → CalendarWidget-Aa7H9M7f.cjs.map} +1 -1
  19. package/dist/{CalendarWidget-Dn55musX.mjs → CalendarWidget-Cx6KvkaG.mjs} +5 -5
  20. package/dist/{CalendarWidget-Dn55musX.mjs.map → CalendarWidget-Cx6KvkaG.mjs.map} +1 -1
  21. package/dist/{CardWidget-DsfLoyup.cjs → CardWidget-Caytu8qs.cjs} +3 -3
  22. package/dist/{CardWidget--S5FBquC.cjs → CardWidget-CqewqU5a.cjs} +2 -2
  23. package/dist/{CardWidget--S5FBquC.cjs.map → CardWidget-CqewqU5a.cjs.map} +1 -1
  24. package/dist/{CardWidget-ChfurL_z.mjs → CardWidget-DARqLSwy.mjs} +3 -3
  25. package/dist/{CardWidget-ChfurL_z.mjs.map → CardWidget-DARqLSwy.mjs.map} +1 -1
  26. package/dist/{CarouselWidget-SrCl4cSn.mjs → CarouselWidget-Bnl_iggA.mjs} +2 -2
  27. package/dist/{CarouselWidget-SrCl4cSn.mjs.map → CarouselWidget-Bnl_iggA.mjs.map} +1 -1
  28. package/dist/{CatchUpWidget-B_in7Bjq.mjs → CatchUpWidget-Bplozt8D.mjs} +5 -5
  29. package/dist/{CatchUpWidget-B_in7Bjq.mjs.map → CatchUpWidget-Bplozt8D.mjs.map} +1 -1
  30. package/dist/{CatchUpWidget-_ErrC-e8.cjs → CatchUpWidget-DEyXTEFj.cjs} +4 -4
  31. package/dist/{CatchUpWidget-_ErrC-e8.cjs.map → CatchUpWidget-DEyXTEFj.cjs.map} +1 -1
  32. package/dist/{ChartWidget-CIr3v8x6.mjs → ChartWidget-BPOZNKI_.mjs} +2 -2
  33. package/dist/{ChartWidget-CIr3v8x6.mjs.map → ChartWidget-BPOZNKI_.mjs.map} +1 -1
  34. package/dist/{ContactsScreen-f3dXV198.cjs → ContactsScreen-BFbWTMu9.cjs} +4 -4
  35. package/dist/{ContactsScreen-f3dXV198.cjs.map → ContactsScreen-BFbWTMu9.cjs.map} +1 -1
  36. package/dist/{ContactsScreen-DJ8O35Pl.mjs → ContactsScreen-CnLSICv5.mjs} +5 -5
  37. package/dist/{ContactsScreen-DJ8O35Pl.mjs.map → ContactsScreen-CnLSICv5.mjs.map} +1 -1
  38. package/dist/{ContactsScreen-CVmYvRZi.cjs → ContactsScreen-DQjdfcAV.cjs} +5 -5
  39. package/dist/{ContainerWidget-BHWPtBmF.mjs → ContainerWidget-Bv0f8-TC.mjs} +3 -3
  40. package/dist/{ContainerWidget-BHWPtBmF.mjs.map → ContainerWidget-Bv0f8-TC.mjs.map} +1 -1
  41. package/dist/{ContainerWidget-Cf_D4TAi.cjs → ContainerWidget-CF6VDxd8.cjs} +2 -2
  42. package/dist/{ContainerWidget-Cf_D4TAi.cjs.map → ContainerWidget-CF6VDxd8.cjs.map} +1 -1
  43. package/dist/ContainerWidget-D3JoA0IP.cjs +8 -0
  44. package/dist/{CustomersScreen-DGBwaZrt.mjs → CustomersScreen-BHqlHdHZ.mjs} +3 -3
  45. package/dist/{CustomersScreen-DGBwaZrt.mjs.map → CustomersScreen-BHqlHdHZ.mjs.map} +1 -1
  46. package/dist/{CustomersScreen-BXvWK7Y1.cjs → CustomersScreen-C8b3P79M.cjs} +2 -2
  47. package/dist/{CustomersScreen-BXvWK7Y1.cjs.map → CustomersScreen-C8b3P79M.cjs.map} +1 -1
  48. package/dist/{EmbedWidget-D5kFw9HS.mjs → EmbedWidget-DRfjHvRs.mjs} +2 -2
  49. package/dist/{EmbedWidget-D5kFw9HS.mjs.map → EmbedWidget-DRfjHvRs.mjs.map} +1 -1
  50. package/dist/{FluidProvider-BVJmIM13.cjs → FluidProvider-CMfpLju8.cjs} +73 -47
  51. package/dist/FluidProvider-CMfpLju8.cjs.map +1 -0
  52. package/dist/{FluidProvider-CYBXFElI.mjs → FluidProvider-tPt9UpYz.mjs} +101 -81
  53. package/dist/FluidProvider-tPt9UpYz.mjs.map +1 -0
  54. package/dist/{ImageWidget-B3ZTuy4v.mjs → ImageWidget-C7nfRJ6p.mjs} +2 -2
  55. package/dist/{ImageWidget-B3ZTuy4v.mjs.map → ImageWidget-C7nfRJ6p.mjs.map} +1 -1
  56. package/dist/{LayoutWidget-3G-w-YLz.cjs → LayoutWidget-6_Huueb4.cjs} +3 -3
  57. package/dist/{LayoutWidget-CrZG6Ipw.mjs → LayoutWidget-CSFWeXYY.mjs} +3 -3
  58. package/dist/{LayoutWidget-CrZG6Ipw.mjs.map → LayoutWidget-CSFWeXYY.mjs.map} +1 -1
  59. package/dist/{LayoutWidget-CG-dWz_c.cjs → LayoutWidget-DD1ZqWXg.cjs} +2 -2
  60. package/dist/{LayoutWidget-CG-dWz_c.cjs.map → LayoutWidget-DD1ZqWXg.cjs.map} +1 -1
  61. package/dist/{LinkWidget-fPowKN73.mjs → LinkWidget-DI2Uod5O.mjs} +2 -2
  62. package/dist/{LinkWidget-fPowKN73.mjs.map → LinkWidget-DI2Uod5O.mjs.map} +1 -1
  63. package/dist/{ListWidget-CQuNRg_g.mjs → ListWidget-BdUhs2fo.mjs} +2 -2
  64. package/dist/{ListWidget-CQuNRg_g.mjs.map → ListWidget-BdUhs2fo.mjs.map} +1 -1
  65. package/dist/{MessagingScreen-3o_Qb6u_.mjs → MessagingScreen-8hyxHThw.mjs} +10 -10
  66. package/dist/MessagingScreen-8hyxHThw.mjs.map +1 -0
  67. package/dist/{MessagingScreen-Db6wQydU.cjs → MessagingScreen-CaSUJhJc.cjs} +25 -25
  68. package/dist/MessagingScreen-CpMlE96f.mjs +50 -0
  69. package/dist/{MessagingScreen-C4SUSPy3.cjs → MessagingScreen-CvyQL50O.cjs} +8 -8
  70. package/dist/MessagingScreen-CvyQL50O.cjs.map +1 -0
  71. package/dist/{MySiteScreen-D3rkI2UJ.cjs → MySiteScreen-BZnLxHAq.cjs} +6 -6
  72. package/dist/{MySiteScreen-D3rkI2UJ.cjs.map → MySiteScreen-BZnLxHAq.cjs.map} +1 -1
  73. package/dist/MySiteScreen-CYGVxzCE.cjs +11 -0
  74. package/dist/{MySiteScreen-BC_K8gIq.mjs → MySiteScreen-tKgO4G0B.mjs} +7 -7
  75. package/dist/{MySiteScreen-BC_K8gIq.mjs.map → MySiteScreen-tKgO4G0B.mjs.map} +1 -1
  76. package/dist/{MySiteWidget-D6QyWuzN.cjs → MySiteWidget-CabBtq5C.cjs} +4 -4
  77. package/dist/{MySiteWidget-D6QyWuzN.cjs.map → MySiteWidget-CabBtq5C.cjs.map} +1 -1
  78. package/dist/{MySiteWidget-BLALS8Ve.mjs → MySiteWidget-ivytLi6H.mjs} +5 -5
  79. package/dist/{MySiteWidget-BLALS8Ve.mjs.map → MySiteWidget-ivytLi6H.mjs.map} +1 -1
  80. package/dist/{NestedWidget-DuNuNaeT.mjs → NestedWidget-gqdWZS9Q.mjs} +2 -2
  81. package/dist/{NestedWidget-DuNuNaeT.mjs.map → NestedWidget-gqdWZS9Q.mjs.map} +1 -1
  82. package/dist/OrdersScreen-BGVPWrEg.cjs +50 -0
  83. package/dist/OrdersScreen-BZ2iBfWQ.mjs +48 -0
  84. package/dist/{OrdersScreen-CJzegrYb.cjs → OrdersScreen-Ckt7uChL.cjs} +11 -11
  85. package/dist/OrdersScreen-Ckt7uChL.cjs.map +1 -0
  86. package/dist/{OrdersScreen-FaoTq71a.mjs → OrdersScreen-DsKspc_8.mjs} +12 -12
  87. package/dist/OrdersScreen-DsKspc_8.mjs.map +1 -0
  88. package/dist/{PointsWidget-BvGANrJq.mjs → PointsWidget-BJlOIK6o.mjs} +5 -5
  89. package/dist/{PointsWidget-BvGANrJq.mjs.map → PointsWidget-BJlOIK6o.mjs.map} +1 -1
  90. package/dist/{PointsWidget-Byd2-eEi.cjs → PointsWidget-Him7U2k2.cjs} +4 -4
  91. package/dist/{PointsWidget-Byd2-eEi.cjs.map → PointsWidget-Him7U2k2.cjs.map} +1 -1
  92. package/dist/{PortalTenantClientProvider-Bpm-CZq1.cjs → PortalTenantClientProvider-C0eJp8MN.cjs} +3 -3
  93. package/dist/PortalTenantClientProvider-C0eJp8MN.cjs.map +1 -0
  94. package/dist/{PortalTenantClientProvider-BmRtQAbi.mjs → PortalTenantClientProvider-DVClpfbi.mjs} +4 -4
  95. package/dist/PortalTenantClientProvider-DVClpfbi.mjs.map +1 -0
  96. package/dist/{ProfileScreen-DxjLSL0A.cjs → ProfileScreen-21MnRuNH.cjs} +12 -8
  97. package/dist/ProfileScreen-21MnRuNH.cjs.map +1 -0
  98. package/dist/{ProfileScreen-CU4Y3sBq.mjs → ProfileScreen-DA3vl5EU.mjs} +12 -8
  99. package/dist/ProfileScreen-DA3vl5EU.mjs.map +1 -0
  100. package/dist/ProfileScreen-DzxUqJJD.cjs +53 -0
  101. package/dist/ProfileScreen-Uw_6u6Ew.mjs +51 -0
  102. package/dist/{QuickLinksWidget-D8LqZkUS.mjs → QuickLinksWidget-DJUI7r5_.mjs} +2 -2
  103. package/dist/{QuickLinksWidget-D8LqZkUS.mjs.map → QuickLinksWidget-DJUI7r5_.mjs.map} +1 -1
  104. package/dist/{QuickShareWidget-BJpqzZp0.mjs → QuickShareWidget-B7DhQOyt.mjs} +2 -2
  105. package/dist/{QuickShareWidget-BJpqzZp0.mjs.map → QuickShareWidget-B7DhQOyt.mjs.map} +1 -1
  106. package/dist/{RecentActivityWidget-ClgOlTXl.mjs → RecentActivityWidget-BMGeLSUa.mjs} +5 -5
  107. package/dist/{RecentActivityWidget-ClgOlTXl.mjs.map → RecentActivityWidget-BMGeLSUa.mjs.map} +1 -1
  108. package/dist/{RecentActivityWidget-BYzAzBI-.cjs → RecentActivityWidget-DvrmBGsD.cjs} +4 -4
  109. package/dist/{RecentActivityWidget-BYzAzBI-.cjs.map → RecentActivityWidget-DvrmBGsD.cjs.map} +1 -1
  110. package/dist/{ScreenHeaderContext-BiGgRqjY.cjs → ScreenHeaderContext-VOp8pVHr.cjs} +4 -4
  111. package/dist/ScreenHeaderContext-VOp8pVHr.cjs.map +1 -0
  112. package/dist/{ScreenHeaderContext-BjpQOCck.mjs → ScreenHeaderContext-cuVMk00X.mjs} +5 -5
  113. package/dist/ScreenHeaderContext-cuVMk00X.mjs.map +1 -0
  114. package/dist/{ScreenRenderer-TobkTBMC.mjs → ScreenRenderer-D3zNFSr3.mjs} +4 -4
  115. package/dist/ScreenRenderer-D3zNFSr3.mjs.map +1 -0
  116. package/dist/{ScreenRenderer-CLDJUinO.cjs → ScreenRenderer-IMkMMnUJ.cjs} +3 -3
  117. package/dist/ScreenRenderer-IMkMMnUJ.cjs.map +1 -0
  118. package/dist/{SearchSort-B5hq2j-l.cjs → SearchSort-BjjBpuEi.cjs} +2 -2
  119. package/dist/SearchSort-BjjBpuEi.cjs.map +1 -0
  120. package/dist/{SearchSort-CMUL0qt3.mjs → SearchSort-C6RV6d9g.mjs} +3 -3
  121. package/dist/SearchSort-C6RV6d9g.mjs.map +1 -0
  122. package/dist/{SeparatorWidget-CDvDjL-k.mjs → SeparatorWidget-CGFzy35l.mjs} +2 -2
  123. package/dist/{SeparatorWidget-CDvDjL-k.mjs.map → SeparatorWidget-CGFzy35l.mjs.map} +1 -1
  124. package/dist/{ShareablesScreen-COg_WpdP.cjs → ShareablesScreen-B0vxU7i6.cjs} +20 -20
  125. package/dist/ShareablesScreen-B0vxU7i6.cjs.map +1 -0
  126. package/dist/{ShareablesScreen-C9EmRZJW.mjs → ShareablesScreen-CefIC5H8.mjs} +22 -22
  127. package/dist/ShareablesScreen-CefIC5H8.mjs.map +1 -0
  128. package/dist/ShareablesScreen-Cs8iC1qk.mjs +15 -0
  129. package/dist/ShareablesScreen-igzq70Xz.cjs +17 -0
  130. package/dist/{ShopScreen-DTL5xiPY.mjs → ShopScreen-CbeH9wRR.mjs} +10 -10
  131. package/dist/ShopScreen-CbeH9wRR.mjs.map +1 -0
  132. package/dist/{ShopScreen-Bgx6548O.cjs → ShopScreen-Cme3j61f.cjs} +10 -10
  133. package/dist/ShopScreen-Cme3j61f.cjs.map +1 -0
  134. package/dist/ShopScreen-D2LDk2xr.mjs +48 -0
  135. package/dist/ShopScreen-D6xtA_0b.cjs +50 -0
  136. package/dist/{ShopWidget-Cmx4Pb6Q.cjs → ShopWidget-BWURiWyx.cjs} +4 -4
  137. package/dist/{ShopWidget-Cmx4Pb6Q.cjs.map → ShopWidget-BWURiWyx.cjs.map} +1 -1
  138. package/dist/{ShopWidget-C76SSZwW.cjs → ShopWidget-C4jeRRut.cjs} +4 -4
  139. package/dist/{ShopWidget-BzAuvfyC.mjs → ShopWidget-Cqnwq0AG.mjs} +5 -5
  140. package/dist/{ShopWidget-BzAuvfyC.mjs.map → ShopWidget-Cqnwq0AG.mjs.map} +1 -1
  141. package/dist/{SpacerWidget-B0l19UqF.mjs → SpacerWidget-BhxIaqYF.mjs} +2 -2
  142. package/dist/{SpacerWidget-B0l19UqF.mjs.map → SpacerWidget-BhxIaqYF.mjs.map} +1 -1
  143. package/dist/{SubscriptionsScreen-qKJoibtI.mjs → SubscriptionsScreen-Br_gugTG.mjs} +32 -27
  144. package/dist/SubscriptionsScreen-Br_gugTG.mjs.map +1 -0
  145. package/dist/SubscriptionsScreen-CG3OldGE.mjs +50 -0
  146. package/dist/{SubscriptionsScreen-DGE3efWd.cjs → SubscriptionsScreen-CvM68asd.cjs} +26 -26
  147. package/dist/{SubscriptionsScreen-D8bjSX3s.cjs → SubscriptionsScreen-HbrDZhaX.cjs} +31 -26
  148. package/dist/SubscriptionsScreen-HbrDZhaX.cjs.map +1 -0
  149. package/dist/{TableWidget-CpHI9CGQ.mjs → TableWidget-Dwud4Fif.mjs} +2 -2
  150. package/dist/{TableWidget-CpHI9CGQ.mjs.map → TableWidget-Dwud4Fif.mjs.map} +1 -1
  151. package/dist/{TextWidget-Jy-Ktqje.mjs → TextWidget-B5ZtQMX-.mjs} +2 -2
  152. package/dist/{TextWidget-Jy-Ktqje.mjs.map → TextWidget-B5ZtQMX-.mjs.map} +1 -1
  153. package/dist/ToDoWidget-BJ2Ip97m.cjs +11 -0
  154. package/dist/{ToDoWidget-BaWksZpJ.mjs → ToDoWidget-Bnml3xLS.mjs} +6 -6
  155. package/dist/{ToDoWidget-BaWksZpJ.mjs.map → ToDoWidget-Bnml3xLS.mjs.map} +1 -1
  156. package/dist/{ToDoWidget-CZh5a5-z.cjs → ToDoWidget-C3Ob2TP2.cjs} +5 -5
  157. package/dist/{ToDoWidget-CZh5a5-z.cjs.map → ToDoWidget-C3Ob2TP2.cjs.map} +1 -1
  158. package/dist/{UpgradeScreen-VpfRqKdO.cjs → UpgradeScreen-B40dCeub.cjs} +3 -3
  159. package/dist/{UpgradeScreen-VpfRqKdO.cjs.map → UpgradeScreen-B40dCeub.cjs.map} +1 -1
  160. package/dist/{UpgradeScreen-C55rEuCN.cjs → UpgradeScreen-CbdTRnIj.cjs} +3 -3
  161. package/dist/{UpgradeScreen-x9TdC5aR.mjs → UpgradeScreen-GzkZOOR4.mjs} +4 -4
  162. package/dist/{UpgradeScreen-x9TdC5aR.mjs.map → UpgradeScreen-GzkZOOR4.mjs.map} +1 -1
  163. package/dist/{VideoWidget-DP-VHt2s.mjs → VideoWidget-Cm3UQ3-Z.mjs} +2 -2
  164. package/dist/{VideoWidget-DP-VHt2s.mjs.map → VideoWidget-Cm3UQ3-Z.mjs.map} +1 -1
  165. package/dist/{countries-api-context-G-NW4BoH.cjs → countries-api-context-16PZpF7O.cjs} +2 -2
  166. package/dist/countries-api-context-16PZpF7O.cjs.map +1 -0
  167. package/dist/{countries-api-context-DScC_39w.mjs → countries-api-context-Donus2X5.mjs} +3 -3
  168. package/dist/countries-api-context-Donus2X5.mjs.map +1 -0
  169. package/dist/{error-state-DvzIn9Tz.mjs → error-state-BUe589mD.mjs} +3 -3
  170. package/dist/error-state-BUe589mD.mjs.map +1 -0
  171. package/dist/{error-state-DJq7C-23.cjs → error-state-CU87JUpz.cjs} +2 -2
  172. package/dist/error-state-CU87JUpz.cjs.map +1 -0
  173. package/dist/{es-jA6aVeLD.mjs → es-C19weaa-.mjs} +2 -2
  174. package/dist/{es-jA6aVeLD.mjs.map → es-C19weaa-.mjs.map} +1 -1
  175. package/dist/index.cjs +65 -65
  176. package/dist/index.cjs.map +1 -1
  177. package/dist/index.d.cts.map +1 -1
  178. package/dist/index.d.mts.map +1 -1
  179. package/dist/index.mjs +83 -83
  180. package/dist/index.mjs.map +1 -1
  181. package/dist/{mysite-api-context-kUTM3GNG.mjs → mysite-api-context-CoLr9vIf.mjs} +3 -3
  182. package/dist/mysite-api-context-CoLr9vIf.mjs.map +1 -0
  183. package/dist/{mysite-api-context-CilZcDS4.cjs → mysite-api-context-DtEXblIV.cjs} +2 -2
  184. package/dist/mysite-api-context-DtEXblIV.cjs.map +1 -0
  185. package/dist/{preview-context-D9ZzEfWh.mjs → preview-context-BXEGWx9T.mjs} +3 -3
  186. package/dist/preview-context-BXEGWx9T.mjs.map +1 -0
  187. package/dist/{preview-context-BWCl-xyj.cjs → preview-context-DrXkIImI.cjs} +2 -2
  188. package/dist/preview-context-DrXkIImI.cjs.map +1 -0
  189. package/dist/{registry-context-BKvTiuXB.mjs → registry-context-CcoVxCii.mjs} +3 -3
  190. package/dist/{registry-context-BKvTiuXB.mjs.map → registry-context-CcoVxCii.mjs.map} +1 -1
  191. package/dist/{registry-context-DJ5xiVnt.cjs → registry-context-Q_1Iq2Ea.cjs} +2 -2
  192. package/dist/{registry-context-DJ5xiVnt.cjs.map → registry-context-Q_1Iq2Ea.cjs.map} +1 -1
  193. package/dist/{static-dict-adapter-JAau5LHb.cjs → static-dict-adapter-BLq4QzCI.cjs} +2 -2
  194. package/dist/static-dict-adapter-BLq4QzCI.cjs.map +1 -0
  195. package/dist/{static-dict-adapter-DjCpubZc.mjs → static-dict-adapter-DRBq3ndO.mjs} +3 -3
  196. package/dist/static-dict-adapter-DRBq3ndO.mjs.map +1 -0
  197. package/dist/{store-api-context-DViwxyG4.mjs → store-api-context-B_vtKkXO.mjs} +3 -3
  198. package/dist/store-api-context-B_vtKkXO.mjs.map +1 -0
  199. package/dist/{store-api-context-D1gZn22Z.cjs → store-api-context-CGH3YsZB.cjs} +2 -2
  200. package/dist/store-api-context-CGH3YsZB.cjs.map +1 -0
  201. package/dist/{task-composer-form-D_Pbl6qk.mjs → task-composer-form-CZgRqbIc.mjs} +4 -4
  202. package/dist/task-composer-form-CZgRqbIc.mjs.map +1 -0
  203. package/dist/{task-composer-form-BEZGTBBZ.cjs → task-composer-form-Cz8hpMTT.cjs} +3 -3
  204. package/dist/task-composer-form-Cz8hpMTT.cjs.map +1 -0
  205. package/dist/{translation-api-context-factory-BSRK6Z50.cjs → translation-api-context-factory-CjRDqIhF.cjs} +2 -2
  206. package/dist/translation-api-context-factory-CjRDqIhF.cjs.map +1 -0
  207. package/dist/{translation-api-context-factory-CJrVq_EB.mjs → translation-api-context-factory-DFr9yJ6Q.mjs} +3 -3
  208. package/dist/translation-api-context-factory-DFr9yJ6Q.mjs.map +1 -0
  209. package/dist/{use-account-CQ-mhA3W.cjs → use-account-DltRHEwC.cjs} +2 -2
  210. package/dist/{use-account-CQ-mhA3W.cjs.map → use-account-DltRHEwC.cjs.map} +1 -1
  211. package/dist/{use-account-CwGoFpwg.mjs → use-account-Dm6Svko1.mjs} +2 -2
  212. package/dist/{use-account-CwGoFpwg.mjs.map → use-account-Dm6Svko1.mjs.map} +1 -1
  213. package/dist/{use-mysite-portal-ChDJ4z34.mjs → use-mysite-portal-3Tn3bFoE.mjs} +2 -2
  214. package/dist/{use-mysite-portal-ChDJ4z34.mjs.map → use-mysite-portal-3Tn3bFoE.mjs.map} +1 -1
  215. package/dist/{use-mysite-portal-CH9ZQROw.cjs → use-mysite-portal-D3X51_Ax.cjs} +2 -2
  216. package/dist/{use-mysite-portal-CH9ZQROw.cjs.map → use-mysite-portal-D3X51_Ax.cjs.map} +1 -1
  217. package/dist/{use-navigation-parent-DvHbbMB0.mjs → use-navigation-parent-GjQMvU4i.mjs} +2 -2
  218. package/dist/{use-navigation-parent-DvHbbMB0.mjs.map → use-navigation-parent-GjQMvU4i.mjs.map} +1 -1
  219. package/dist/{use-navigation-parent-DQ8CiN9L.cjs → use-navigation-parent-q-la1wD2.cjs} +2 -2
  220. package/dist/{use-navigation-parent-DQ8CiN9L.cjs.map → use-navigation-parent-q-la1wD2.cjs.map} +1 -1
  221. package/dist/{use-store-cwcCLxl_.mjs → use-store-C6KYHvRw.mjs} +2 -2
  222. package/dist/{use-store-cwcCLxl_.mjs.map → use-store-C6KYHvRw.mjs.map} +1 -1
  223. package/dist/{use-store-lOOUcpRT.cjs → use-store-j_6I4DU4.cjs} +2 -2
  224. package/dist/{use-store-lOOUcpRT.cjs.map → use-store-j_6I4DU4.cjs.map} +1 -1
  225. package/package.json +19 -18
  226. package/dist/AddressAutocompleteInput-BANMgwzR.mjs.map +0 -1
  227. package/dist/AddressAutocompleteInput-JBXGT1iL.cjs.map +0 -1
  228. package/dist/AppNavigationContext-BCj6iFxr.mjs.map +0 -1
  229. package/dist/AppNavigationContext-CoNtdUrr.cjs.map +0 -1
  230. package/dist/ContainerWidget-CyDVJu83.cjs +0 -8
  231. package/dist/FluidProvider-BVJmIM13.cjs.map +0 -1
  232. package/dist/FluidProvider-CYBXFElI.mjs.map +0 -1
  233. package/dist/MessagingScreen-3o_Qb6u_.mjs.map +0 -1
  234. package/dist/MessagingScreen-C4SUSPy3.cjs.map +0 -1
  235. package/dist/MessagingScreen-D-wunIkf.mjs +0 -50
  236. package/dist/MySiteScreen-DiCU6P9d.cjs +0 -11
  237. package/dist/OrdersScreen-BL5Ta3Tt.cjs +0 -50
  238. package/dist/OrdersScreen-B_JxQTW8.mjs +0 -48
  239. package/dist/OrdersScreen-CJzegrYb.cjs.map +0 -1
  240. package/dist/OrdersScreen-FaoTq71a.mjs.map +0 -1
  241. package/dist/PortalTenantClientProvider-BmRtQAbi.mjs.map +0 -1
  242. package/dist/PortalTenantClientProvider-Bpm-CZq1.cjs.map +0 -1
  243. package/dist/ProfileScreen-CU4Y3sBq.mjs.map +0 -1
  244. package/dist/ProfileScreen-DMDKlk20.cjs +0 -53
  245. package/dist/ProfileScreen-Dcjp4wNO.mjs +0 -51
  246. package/dist/ProfileScreen-DxjLSL0A.cjs.map +0 -1
  247. package/dist/ScreenHeaderContext-BiGgRqjY.cjs.map +0 -1
  248. package/dist/ScreenHeaderContext-BjpQOCck.mjs.map +0 -1
  249. package/dist/ScreenRenderer-CLDJUinO.cjs.map +0 -1
  250. package/dist/ScreenRenderer-TobkTBMC.mjs.map +0 -1
  251. package/dist/SearchSort-B5hq2j-l.cjs.map +0 -1
  252. package/dist/SearchSort-CMUL0qt3.mjs.map +0 -1
  253. package/dist/ShareablesScreen-BQd1-Og8.mjs +0 -15
  254. package/dist/ShareablesScreen-C9EmRZJW.mjs.map +0 -1
  255. package/dist/ShareablesScreen-COg_WpdP.cjs.map +0 -1
  256. package/dist/ShareablesScreen-CoFM63kh.cjs +0 -17
  257. package/dist/ShopScreen-Bgx6548O.cjs.map +0 -1
  258. package/dist/ShopScreen-Bm2RlZas.cjs +0 -50
  259. package/dist/ShopScreen-Cz7aMt4z.mjs +0 -48
  260. package/dist/ShopScreen-DTL5xiPY.mjs.map +0 -1
  261. package/dist/SubscriptionsScreen-CF6AuW3I.mjs +0 -50
  262. package/dist/SubscriptionsScreen-D8bjSX3s.cjs.map +0 -1
  263. package/dist/SubscriptionsScreen-qKJoibtI.mjs.map +0 -1
  264. package/dist/ToDoWidget-1wI1ntdD.cjs +0 -11
  265. package/dist/countries-api-context-DScC_39w.mjs.map +0 -1
  266. package/dist/countries-api-context-G-NW4BoH.cjs.map +0 -1
  267. package/dist/error-state-DJq7C-23.cjs.map +0 -1
  268. package/dist/error-state-DvzIn9Tz.mjs.map +0 -1
  269. package/dist/mysite-api-context-CilZcDS4.cjs.map +0 -1
  270. package/dist/mysite-api-context-kUTM3GNG.mjs.map +0 -1
  271. package/dist/preview-context-BWCl-xyj.cjs.map +0 -1
  272. package/dist/preview-context-D9ZzEfWh.mjs.map +0 -1
  273. package/dist/static-dict-adapter-DjCpubZc.mjs.map +0 -1
  274. package/dist/static-dict-adapter-JAau5LHb.cjs.map +0 -1
  275. package/dist/store-api-context-D1gZn22Z.cjs.map +0 -1
  276. package/dist/store-api-context-DViwxyG4.mjs.map +0 -1
  277. package/dist/task-composer-form-BEZGTBBZ.cjs.map +0 -1
  278. package/dist/task-composer-form-D_Pbl6qk.mjs.map +0 -1
  279. package/dist/translation-api-context-factory-BSRK6Z50.cjs.map +0 -1
  280. package/dist/translation-api-context-factory-CJrVq_EB.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalTenantClientProvider-C0eJp8MN.cjs","names":[],"sources":["../../core/src/account-api-context.ts","../../../api-clients/portal-tenant/src/namespaces/portal_tenant.ts","../../../api-clients/portal-tenant-content/src/namespaces/portal_tenant_content.ts","../src/providers/PortalTenantClientProvider.tsx"],"sourcesContent":["import { createContext, use } from \"react\";\nimport type { AccountApi } from \"./account-api\";\n\nconst AccountApiContext = createContext<AccountApi | null>(null);\n\nexport const AccountApiProvider = AccountApiContext.Provider;\n\nexport function useAccountApi(): AccountApi {\n const api = use(AccountApiContext);\n if (!api) {\n throw new Error(\"useAccountApi must be used within an AccountApiProvider\");\n }\n return api;\n}\n","/**\n * Generated API client functions for portal_tenant\n *\n * DO NOT EDIT THIS FILE DIRECTLY\n * This file is auto-generated. To update:\n * 1. Update the OpenAPI spec file\n * 2. Run: pnpm generate\n */\n\nimport type { FetchClient } from \"../lib/fetch-client\";\nimport type { operations } from \"../generated/portal-tenant\";\n\n// ============================================================================\n// account\n// ============================================================================\n\n/**\n * Get current account\n * Returns the authenticated member's account profile and company context. This is the primary endpoint the SPA calls to check auth status and display user information.\n *\n * @param client - Fetch client instance\n \n */\nexport async function account_show(\n client: FetchClient,\n): Promise<\n operations[\"account_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/account`);\n}\n\n/**\n * Update current account\n * Updates the authenticated member's profile fields such as name, phone, bio, avatar, and social links.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function account_update(\n client: FetchClient,\n body: operations[\"account_update\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"account_update\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(`/api/account`, body);\n}\n\n// ============================================================================\n// store\n// ============================================================================\n\n/**\n * Get store branding and feature flags\n * Returns the tenant company's store branding (logo, icon, app store URLs) and feature flags such as whether subscription bundling is enabled.\n *\n * @param client - Fetch client instance\n \n */\nexport async function store_show(\n client: FetchClient,\n): Promise<\n operations[\"store_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/store`);\n}\n\n// ============================================================================\n// app\n// ============================================================================\n\n/**\n * Get the app manifest\n * Returns the rendered manifest for the tenant company's active FluidOS definition, matched against the current user's country, rank, and roles.\n *\n * @param client - Fetch client instance\n \n */\nexport async function app_manifest_show(\n client: FetchClient,\n): Promise<\n operations[\"app_manifest_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/app/manifest`);\n}\n\n// ============================================================================\n// calendar_events\n// ============================================================================\n\n/**\n * List calendar events\n * Returns a paginated list of upcoming and ongoing calendar events for the tenant company, optionally filtered by the authenticated member's country when one is set.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function calendar_events_list(\n client: FetchClient,\n params?: operations[\"calendar_events_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"calendar_events_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/calendar/events`, params);\n}\n\n// ============================================================================\n// activities\n// ============================================================================\n\n/**\n * List recent activities\n * Returns a paginated list of recent activities for the authenticated member, ordered by most recent first. Each activity includes pre-computed user_name and target_name fields ready for direct rendering by the portal SPA.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function activities_list(\n client: FetchClient,\n params?: operations[\"activities_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"activities_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/activities`, params);\n}\n\n// ============================================================================\n// catch_ups\n// ============================================================================\n\n/**\n * List catch-up suggestions\n * Returns a paginated list of catch-up suggestions for the authenticated member. Limited to suggestions with at least one pending action that have not expired.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function catch_ups_list(\n client: FetchClient,\n params?: operations[\"catch_ups_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"catch_ups_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/catch_ups`, params);\n}\n\n// ============================================================================\n// orders\n// ============================================================================\n\n/**\n * List orders\n * Returns a paginated list of orders placed through the tenant company, optionally filtered by status.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function orders_list(\n client: FetchClient,\n params?: operations[\"orders_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"orders_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/orders`, params);\n}\n\n/**\n * Get an order\n * Returns a single order by token with its line items.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function orders_show(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"orders_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/orders/${token}`);\n}\n\n// ============================================================================\n// products\n// ============================================================================\n\n/**\n * List products\n * Returns a paginated list of products available in the tenant company's catalog. Supports sorting and filtering by title, product type, collection, and stock availability.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function products_list(\n client: FetchClient,\n params?: operations[\"products_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"products_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products`, params);\n}\n\n/**\n * Get a product\n * Returns a single product by ID with its variants.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function products_show(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"products_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products/${id}`);\n}\n\n/**\n * Search products\n * Searches the tenant company's product catalog by keyword, returning paginated results.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function products_search(\n client: FetchClient,\n params?: operations[\"products_search\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"products_search\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products/search`, params);\n}\n\n/**\n * List product media\n * Returns all media (images, videos) attached to a product.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function products_media_list(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"products_media_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products/${id}/media`);\n}\n\n// ============================================================================\n// enrollment_packs\n// ============================================================================\n\n/**\n * List enrollment packs\n * Returns a paginated list of active, non-discarded enrollment packs scoped to the current portal tenant's company. Each pack carries an empty `products` array — fetch a single pack via `/api/enrollment_packs/{id}` to load its visible products.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function enrollment_packs_list(\n client: FetchClient,\n params?: operations[\"enrollment_packs_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"enrollment_packs_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/enrollment_packs`, params);\n}\n\n/**\n * Get an enrollment pack\n * Returns a single active, non-discarded enrollment pack scoped to the current portal tenant's company.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function enrollment_packs_show(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"enrollment_packs_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/enrollment_packs/${id}`);\n}\n\n// ============================================================================\n// subscriptions\n// ============================================================================\n\n/**\n * List subscription bundles\n * Returns the runtime bundle groupings for the authenticated customer's active subscriptions. Bundles are computed at request time by grouping subscriptions that share customer, address (physical only), volume rep, next bill date, and digital flag — they have no persistent id. The response is unpaginated; customers typically have a small number of bundles.\n *\n * @param client - Fetch client instance\n \n */\nexport async function subscription_bundles_list(\n client: FetchClient,\n): Promise<\n operations[\"subscription_bundles_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/subscription_bundles`);\n}\n\n/**\n * List subscriptions\n * Returns a paginated list of the member's active and historical subscriptions. Supports filtering by lifecycle state and a free-text search across product and plan names.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function subscriptions_list(\n client: FetchClient,\n params?: operations[\"subscriptions_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"subscriptions_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/subscriptions`, params);\n}\n\n/**\n * Get a subscription\n * Returns a single subscription by its token.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function subscriptions_show(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"subscriptions_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/subscriptions/${token}`);\n}\n\n/**\n * Update a subscription\n * Updates a subscription's default payment method or quantity.\n *\n * @param client - Fetch client instance\n * @param token - token\n * @param body - body\n */\nexport async function subscriptions_update(\n client: FetchClient,\n token: string | number,\n body: operations[\"subscriptions_update\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"subscriptions_update\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.put(`/api/subscriptions/${token}`, body);\n}\n\n/**\n * Pause a subscription\n * Pauses billing on an active subscription. When neither `next_bill_date` nor `number_of_orders` is provided, the subscription is paused indefinitely. Specifying both is rejected.\n *\n * @param client - Fetch client instance\n * @param token - token\n * @param [body] - body\n */\nexport async function subscriptions_pause(\n client: FetchClient,\n token: string | number,\n body?: NonNullable<\n operations[\"subscriptions_pause\"][\"requestBody\"]\n >[\"content\"][\"application/json\"],\n): Promise<\n operations[\"subscriptions_pause\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/pause`, body);\n}\n\n/**\n * Resume a subscription\n * Resumes billing on a paused subscription. When `next_bill_date` is omitted, the plan's next bill date from today is used.\n *\n * @param client - Fetch client instance\n * @param token - token\n * @param [body] - body\n */\nexport async function subscriptions_resume(\n client: FetchClient,\n token: string | number,\n body?: NonNullable<\n operations[\"subscriptions_resume\"][\"requestBody\"]\n >[\"content\"][\"application/json\"],\n): Promise<\n operations[\"subscriptions_resume\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/resume`, body);\n}\n\n/**\n * Skip next billing cycle\n * Skips the next billing cycle for a subscription without pausing it.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function subscriptions_skip(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"subscriptions_skip\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/skip_next_billing`);\n}\n\n/**\n * Cancel a subscription\n * Cancels an active subscription.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function subscriptions_cancel(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"subscriptions_cancel\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/cancel`);\n}\n\n/**\n * Reactivate a subscription\n * Reactivates a previously cancelled subscription.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function subscriptions_reactivate(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"subscriptions_reactivate\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/reactivate`);\n}\n\n/**\n * Retry billing on a past-due subscription\n * Queues an immediate retry on a past-due subscription against whatever payment method is currently on file. The customer-facing UI calls this after a successful payment-method update so the customer controls when the retry runs (vs. having it implicitly fire as a side-effect of the update).\n\n\nThe endpoint returns 200 for found subscriptions in normal operation, regardless of status — it is intentionally idempotent so the client can call it unconditionally after a payment-method update without first checking status. A 422 can still be returned if the server cannot persist the retry state. Use the response's `queued` field to distinguish the two outcomes:\n\n - `queued: true` — the subscription was past_due; a retry has been scheduled and `next_retry_at` is set to \"now\".\n - `queued: false` — the subscription was not past_due and no state change occurred. Treat as a no-op.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function subscriptions_retry(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"subscriptions_retry\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/retry`);\n}\n\n// ============================================================================\n// subscription_bundles\n// ============================================================================\n\n/**\n * Create a subscription bundle\n * Bundles two or more existing subscriptions onto a shared bill date, address, and volume rep. All subscriptions must belong to the authenticated customer. Bundles are not persisted entities — the endpoint aligns each subscription's billing attributes so that they share a runtime grouping key.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function subscription_bundles_create(\n client: FetchClient,\n body: operations[\"subscription_bundles_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"subscription_bundles_create\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscription_bundles/bundle`, body);\n}\n\n// ============================================================================\n// todos\n// ============================================================================\n\n/**\n * List todos\n * Returns a paginated list of incomplete tasks scoped to the authenticated member. Ordered by due date ascending, tasks without a due date sort last.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function todos_list(\n client: FetchClient,\n params?: operations[\"todos_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"todos_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/todos`, params);\n}\n\n/**\n * Toggle a todo's completion state\n * Marks a todo complete or incomplete for the authenticated member. Sending `completed: true` stamps `completed_at` with the current time; `false` clears it.\n *\n * @param client - Fetch client instance\n * @param id - id\n * @param body - body\n */\nexport async function todos_update(\n client: FetchClient,\n id: string | number,\n body: operations[\"todos_update\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"todos_update\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(`/api/todos/${id}`, body);\n}\n\n// ============================================================================\n// carts\n// ============================================================================\n\n/**\n * Claim a cart\n * Assigns the logged-in member as buyer_rep on an unclaimed FairShare cart. Any portal member (rep or customer) can claim. Returns an error if the cart has already been claimed.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function carts_claim(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"carts_claim\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/carts/${token}/claim`);\n}\n\n// ============================================================================\n// product_metrics\n// ============================================================================\n\n/**\n * Top products by direct visits\n * Ranked list of the company's products by total visits to the product page (aggregates metrics_product_visits across all visit sources).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function product_by_visits(\n client: FetchClient,\n params?: operations[\"product_by_visits\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"product_by_visits\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products/by-visits`, params);\n}\n\n/**\n * Top products by share-link visits\n * Ranked list of the company's products by click-throughs on rep share links (aggregates metrics_share_shareable_visits where shareable_type='Product').\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function product_by_shares(\n client: FetchClient,\n params?: operations[\"product_by_shares\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"product_by_shares\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products/by-shares`, params);\n}\n\n// ============================================================================\n// enrollment_pack_metrics\n// ============================================================================\n\n/**\n * Top enrollment packs by direct visits\n * Ranked list of the company's enrollment packs by total visits to the pack page (aggregates metrics_enrollment_pack_visits across all visit sources).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function enrollment_pack_by_visits(\n client: FetchClient,\n params?: operations[\"enrollment_pack_by_visits\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"enrollment_pack_by_visits\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/enrollment_packs/by-visits`, params);\n}\n\n/**\n * Top enrollment packs by share-link visits\n * Ranked list of the company's enrollment packs by click-throughs on rep share links (aggregates metrics_share_shareable_visits where shareable_type='EnrollmentPack').\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function enrollment_pack_by_shares(\n client: FetchClient,\n params?: operations[\"enrollment_pack_by_shares\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"enrollment_pack_by_shares\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/enrollment_packs/by-shares`, params);\n}\n","/**\n * Generated API client functions for portal_tenant_content\n *\n * DO NOT EDIT THIS FILE DIRECTLY\n * This file is auto-generated. To update:\n * 1. Update the OpenAPI spec file\n * 2. Run: pnpm generate\n */\n\nimport type { FetchClient } from \"../lib/fetch-client\";\nimport type { operations } from \"../generated/portal-tenant-content\";\n\n// ============================================================================\n// content\n// ============================================================================\n\n/**\n * List active languages for the tenant company\n * Returns active languages enabled for the tenant company, sorted by name. Used by the content/translation editor to populate the language switcher.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_languages_list(\n client: FetchClient,\n params?: operations[\"content_languages_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_languages_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/languages`, params);\n}\n\n/**\n * List media (own uploads and company share media)\n * Returns a paginated list of the member's own uploads and company share media. Training and update media are excluded.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function media_list(\n client: FetchClient,\n params?: operations[\"media_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"media_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/media`, params);\n}\n\n/**\n * Create a new media item\n * Creates a new media item record.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function media_create(\n client: FetchClient,\n body: operations[\"media_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"media_create\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/media`, body);\n}\n\n/**\n * Get a specific media item\n * Returns a single media item by ID. When language_iso is provided, translatable fields (title, description, url) are returned for that language with no fallback — empty values indicate an untranslated field.\n *\n * @param client - Fetch client instance\n * @param id - id\n * @param [params] - params\n */\nexport async function media_show(\n client: FetchClient,\n id: string | number,\n params?: operations[\"media_show\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"media_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/media/${id}`, params);\n}\n\n/**\n * Update a media item (own uploads only)\n * Updates a media item's title, description, status, url, content_format, thumbnail, CTA, and SEO. When language_iso is provided, translatable fields are written against that language's translation row instead of the default locale.\n *\n * @param client - Fetch client instance\n * @param id - id\n * @param body - body\n * @param [params] - params\n */\nexport async function media_update(\n client: FetchClient,\n id: string | number,\n body: operations[\"media_update\"][\"requestBody\"][\"content\"][\"application/json\"],\n params?: operations[\"media_update\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"media_update\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(`/api/content/media/${id}`, body, { params });\n}\n\n/**\n * Delete a media item (own uploads only)\n * Removes a media item.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function media_destroy(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"media_destroy\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.delete(`/api/content/media/${id}`);\n}\n\n/**\n * List products associated with a media item\n * Returns a paginated list of products associated with a media item.\n *\n * @param client - Fetch client instance\n * @param medium_id - medium_id\n * @param [params] - params\n */\nexport async function media_products_list(\n client: FetchClient,\n medium_id: string | number,\n params?: operations[\"media_products_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"media_products_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/media/${medium_id}/products`, params);\n}\n\n/**\n * Associate a product with a media item\n * Creates a product association for a media item.\n *\n * @param client - Fetch client instance\n * @param medium_id - medium_id\n * @param body - body\n */\nexport async function media_products_add(\n client: FetchClient,\n medium_id: string | number,\n body: operations[\"media_products_add\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"media_products_add\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/media/${medium_id}/products`, body);\n}\n\n/**\n * Remove a product association from a media item\n * Removes a single product association from a media item.\n *\n * @param client - Fetch client instance\n * @param medium_id - medium_id\n * @param id - id\n */\nexport async function media_products_remove(\n client: FetchClient,\n medium_id: string | number,\n id: string | number,\n): Promise<\n operations[\"media_products_remove\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.delete(`/api/content/media/${medium_id}/products/${id}`);\n}\n\n/**\n * List playlists with cursor pagination\n * Returns a paginated list of playlists.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function playlists_list(\n client: FetchClient,\n params?: operations[\"playlists_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"playlists_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/playlists`, params);\n}\n\n/**\n * Create a new playlist\n * Creates a new playlist.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function playlists_create(\n client: FetchClient,\n body: operations[\"playlists_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"playlists_create\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/playlists`, body);\n}\n\n/**\n * Get a specific playlist\n * Returns a single playlist by ID.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function playlists_show(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"playlists_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/playlists/${id}`);\n}\n\n/**\n * Update a playlist\n * Updates a playlist's title or metadata.\n *\n * @param client - Fetch client instance\n * @param id - id\n * @param body - body\n */\nexport async function playlists_update(\n client: FetchClient,\n id: string | number,\n body: operations[\"playlists_update\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"playlists_update\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(`/api/content/playlists/${id}`, body);\n}\n\n/**\n * Delete a playlist\n * Removes a playlist.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function playlists_destroy(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"playlists_destroy\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.delete(`/api/content/playlists/${id}`);\n}\n\n/**\n * List items in a playlist\n * Returns a paginated list of items in a playlist.\n *\n * @param client - Fetch client instance\n * @param playlist_id - playlist_id\n * @param [params] - params\n */\nexport async function playlists_items_list(\n client: FetchClient,\n playlist_id: string | number,\n params?: operations[\"playlists_items_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"playlists_items_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/playlists/${playlist_id}/items`, params);\n}\n\n/**\n * Add an item to a playlist\n * Adds a content item (media, page, product, or enrollment_pack) to a playlist.\n *\n * @param client - Fetch client instance\n * @param playlist_id - playlist_id\n * @param body - body\n */\nexport async function playlists_items_add(\n client: FetchClient,\n playlist_id: string | number,\n body: operations[\"playlists_items_add\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"playlists_items_add\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/playlists/${playlist_id}/items`, body);\n}\n\n/**\n * Reorder items in a playlist\n * Sets the order of items in a playlist. Items not included in the payload are not moved. Flips the playlist to manual ordering.\n *\n * @param client - Fetch client instance\n * @param playlist_id - playlist_id\n * @param body - body\n */\nexport async function playlists_items_reorder(\n client: FetchClient,\n playlist_id: string | number,\n body: operations[\"playlists_items_reorder\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"playlists_items_reorder\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(\n `/api/content/playlists/${playlist_id}/items/reorder`,\n body,\n );\n}\n\n/**\n * Remove an item from a playlist\n * Removes a single item from a playlist.\n *\n * @param client - Fetch client instance\n * @param playlist_id - playlist_id\n * @param id - id\n */\nexport async function playlists_items_remove(\n client: FetchClient,\n playlist_id: string | number,\n id: string | number,\n): Promise<\n operations[\"playlists_items_remove\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.delete(`/api/content/playlists/${playlist_id}/items/${id}`);\n}\n\n/**\n * List pages for the company\n * Returns a paginated list of published pages for the authenticated rep's company. Members have read-only access — there is no create, update, or destroy action for pages in the portal BFF. Response shape matches pages_show (PortalTenant::Api::PageBlueprinter).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function pages_list(\n client: FetchClient,\n params?: operations[\"pages_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"pages_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/pages`, params);\n}\n\n/**\n * Get a specific page\n * Returns a single page by ID, scoped to the authenticated rep's company. Response is a lean portal-BFF shape rendered by PortalTenant::Api::PageBlueprinter — not the legacy admin shape. Admin-only fields (html_code, application_theme_template, search_engine_optimizer, open_graph, prompts, etc.) are intentionally omitted.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function pages_show(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"pages_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/pages/${id}`);\n}\n\n/**\n * List share links for the current user\n * Returns a paginated list of share links.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function shares_list(\n client: FetchClient,\n params?: operations[\"shares_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"shares_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/shares`, params);\n}\n\n/**\n * Create a share link\n * Creates a new share link for content.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function shares_create(\n client: FetchClient,\n body: operations[\"shares_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"shares_create\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/shares`, body);\n}\n\n/**\n * List DAM assets\n * Returns a paginated list of DAM assets for the company.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function dam_assets_list(\n client: FetchClient,\n params?: operations[\"dam_assets_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"dam_assets_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/dam/assets`, params);\n}\n\n/**\n * Create a DAM asset\n * Creates a new DAM asset. Supports two modes:\n1. **JSON placeholder** — send `application/json` with `asset[name]` to\n create a placeholder record for later file upload.\n\n2. **File upload** — send `multipart/form-data` with `asset[file]`,\n `asset[name]`, and optionally `asset[description]` and `asset[tags]`\n to upload a file and create the full asset with variants.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function dam_assets_create(\n client: FetchClient,\n body: operations[\"dam_assets_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"dam_assets_create\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/dam/assets`, body);\n}\n\n/**\n * List paths for a DAM asset\n * Returns a paginated list of path aliases for a DAM asset.\n *\n * @param client - Fetch client instance\n * @param asset_code - asset_code\n * @param [params] - params\n */\nexport async function dam_asset_paths_list(\n client: FetchClient,\n asset_code: string | number,\n params?: operations[\"dam_asset_paths_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"dam_asset_paths_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/dam/assets/${asset_code}/paths`, params);\n}\n\n/**\n * Create a path alias for a DAM asset\n * Creates a new path alias for an existing DAM asset.\n *\n * @param client - Fetch client instance\n * @param asset_code - asset_code\n * @param body - body\n */\nexport async function dam_asset_paths_create(\n client: FetchClient,\n asset_code: string | number,\n body: operations[\"dam_asset_paths_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"dam_asset_paths_create\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/dam/assets/${asset_code}/paths`, body);\n}\n\n/**\n * Query DAM assets using tree paths and tags\n * Searches and retrieves DAM assets using tree path pattern matching, tag-based variant filtering, wildcard name matching, and partial search. Supports cursor pagination for large result sets.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function dam_query(\n client: FetchClient,\n body: operations[\"dam_query\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"dam_query\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/dam/query`, body);\n}\n\n/**\n * Delete a DAM asset\n * Permanently destroys a DAM asset, including its ImageKit storage, variants, and database records.\n *\n * @param client - Fetch client instance\n * @param code - code\n */\nexport async function dam_assets_destroy(\n client: FetchClient,\n code: string | number,\n): Promise<\n operations[\"dam_assets_destroy\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.delete(`/api/content/dam/assets/${code}`);\n}\n\n/**\n * Discard (soft-delete) a DAM asset\n * Soft-deletes a DAM asset. Used to discard an in-progress upload without permanently removing the record.\n *\n * @param client - Fetch client instance\n * @param code - code\n */\nexport async function dam_assets_discard(\n client: FetchClient,\n code: string | number,\n): Promise<\n operations[\"dam_assets_discard\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(`/api/content/dam/assets/${code}/discard`);\n}\n\n/**\n * Toggle favorite status on a content item\n * Toggles the favorite status of a content item for the authenticated member. If the item is not currently favorited, it becomes favorited. If it is already favorited, the favorite is removed.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function favorites_toggle(\n client: FetchClient,\n body: operations[\"favorites_toggle\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"favorites_toggle\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/favorites/toggle`, body);\n}\n\n// ============================================================================\n// media_metrics\n// ============================================================================\n\n/**\n * Top media by direct visits\n * Ranked list of the company's media by total visits (aggregates metrics_media_visits across all visit sources).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_media_by_visits(\n client: FetchClient,\n params?: operations[\"content_media_by_visits\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_media_by_visits\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/media/by-visits`, params);\n}\n\n/**\n * Top media by share-link visits\n * Ranked list of the company's media by click-throughs on rep share links (aggregates metrics_share_shareable_visits where shareable_type='Medium').\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_media_by_shares(\n client: FetchClient,\n params?: operations[\"content_media_by_shares\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_media_by_shares\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/media/by-shares`, params);\n}\n\n// ============================================================================\n// playlist_metrics\n// ============================================================================\n\n/**\n * Top playlists by direct visits\n * Ranked list of the company's playlists by total visits (aggregates metrics_library_visits since playlists are stored in the libraries table).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_playlists_by_visits(\n client: FetchClient,\n params?: operations[\"content_playlists_by_visits\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_playlists_by_visits\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/playlists/by-visits`, params);\n}\n\n/**\n * Top playlists by share-link visits\n * Ranked list of the company's playlists by click-throughs on rep share links (aggregates metrics_share_shareable_visits where shareable_type='Library').\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_playlists_by_shares(\n client: FetchClient,\n params?: operations[\"content_playlists_by_shares\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_playlists_by_shares\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/playlists/by-shares`, params);\n}\n\n// ============================================================================\n// page_metrics\n// ============================================================================\n\n/**\n * Top pages by direct visits\n * Ranked list of the company's pages by total visits (aggregates metrics_page_visits across all visit sources).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_pages_by_visits(\n client: FetchClient,\n params?: operations[\"content_pages_by_visits\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_pages_by_visits\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/pages/by-visits`, params);\n}\n\n/**\n * Top pages by share-link visits\n * Ranked list of the company's pages by click-throughs on rep share links (aggregates metrics_share_shareable_visits where shareable_type='Page').\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_pages_by_shares(\n client: FetchClient,\n params?: operations[\"content_pages_by_shares\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_pages_by_shares\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/pages/by-shares`, params);\n}\n","import { createContext, type Provider, use } from \"react\";\nimport type { FetchClient } from \"@fluid-app/portal-tenant-api-client\";\n\nconst PortalTenantClientContext = createContext<FetchClient | null>(null);\n\nexport const PortalTenantClientProvider: Provider<FetchClient | null> =\n PortalTenantClientContext.Provider;\n\n/**\n * Returns the portal-tenant FetchClient from context.\n * Must be used within a FluidProvider.\n */\nexport function usePortalTenantClient(): FetchClient {\n const client = use(PortalTenantClientContext);\n if (!client) {\n throw new Error(\n \"usePortalTenantClient must be used within a FluidProvider\",\n );\n }\n return client;\n}\n"],"mappings":";;;AAGA,MAAM,qBAAA,GAAA,MAAA,eAAqD,KAAK;AAEhE,MAAa,qBAAqB,kBAAkB;AAEpD,SAAgB,gBAA4B;CAC1C,MAAM,OAAA,GAAA,MAAA,KAAU,kBAAkB;AAClC,KAAI,CAAC,IACH,OAAM,IAAI,MAAM,0DAA0D;AAE5E,QAAO;;;;;;;;;;;ACWT,eAAsB,aACpB,QAGA;AACA,QAAO,OAAO,IAAI,eAAe;;;;;;;;;AAUnC,eAAsB,eACpB,QACA,MAGA;AACA,QAAO,OAAO,MA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A,QAGA;AACA,QAAO,OAAO,IAAI,gCAAgC,OAAO;;;;;;;;;AAU3D,eAAsB,wBACpB,QACA,QAGA;AACA,QAAO,OAAO,IAAI,gCAAgC,OAAO;;;;;;;;;AAc3D,eAAsB,4BACpB,QACA,QAGA;AACA,QAAO,OAAO,IAAI,oCAAoC,OAAO;;;;;;;;;AAU/D,eAAsB,4BACpB,QACA,QAGA;AACA,QAAO,OAAO,IAAI,oCAAoC,OAAO;;;;;;;;;AAc/D,eAAsB,wBACpB,QACA,QAGA;AACA,QAAO,OAAO,IAAI,gCAAgC,OAAO;;;;;;;;;AAU3D,eAAsB,wBACpB,QACA,QAGA;AACA,QAAO,OAAO,IAAI,gCAAgC,OAAO;;;;ACznB3D,MAAM,6BAAA,GAAA,MAAA,eAA8D,KAAK;AAEzE,MAAa,6BACX,0BAA0B;;;;;AAM5B,SAAgB,wBAAqC;CACnD,MAAM,UAAA,GAAA,MAAA,KAAa,0BAA0B;AAC7C,KAAI,CAAC,OACH,OAAM,IAAI,MACR,4DACD;AAEH,QAAO"}
@@ -1,4 +1,4 @@
1
- import { createContext, useContext } from "react";
1
+ import { createContext, use } from "react";
2
2
  //#region \0rolldown/runtime.js
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -39,7 +39,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
39
39
  const AccountApiContext = createContext(null);
40
40
  const AccountApiProvider = AccountApiContext.Provider;
41
41
  function useAccountApi() {
42
- const api = useContext(AccountApiContext);
42
+ const api = use(AccountApiContext);
43
43
  if (!api) throw new Error("useAccountApi must be used within an AccountApiProvider");
44
44
  return api;
45
45
  }
@@ -745,11 +745,11 @@ const PortalTenantClientProvider = PortalTenantClientContext.Provider;
745
745
  * Must be used within a FluidProvider.
746
746
  */
747
747
  function usePortalTenantClient() {
748
- const client = useContext(PortalTenantClientContext);
748
+ const client = use(PortalTenantClientContext);
749
749
  if (!client) throw new Error("usePortalTenantClient must be used within a FluidProvider");
750
750
  return client;
751
751
  }
752
752
  //#endregion
753
753
  export { products_search as $, playlists_items_remove as A, app_manifest_show as B, media_update as C, playlists_destroy as D, playlists_create as E, shares_create as F, enrollment_packs_list as G, catch_ups_list as H, shares_list as I, orders_show as J, enrollment_packs_show as K, account_show as L, playlists_list as M, playlists_show as N, playlists_items_add as O, playlists_update as P, products_media_list as Q, account_update as R, media_show as S, pages_show as T, enrollment_pack_by_shares as U, calendar_events_list as V, enrollment_pack_by_visits as W, product_by_visits as X, product_by_shares as Y, products_list as Z, media_destroy as _, __commonJSMin as _t, content_pages_by_shares as a, subscriptions_list as at, media_products_list as b, __toESM as bt, content_playlists_by_visits as c, subscriptions_resume as ct, dam_assets_create as d, subscriptions_skip as dt, products_show as et, dam_assets_destroy as f, subscriptions_update as ft, media_create as g, useAccountApi as gt, dam_query as h, AccountApiProvider as ht, content_media_by_visits as i, subscriptions_cancel as it, playlists_items_reorder as j, playlists_items_list as k, dam_asset_paths_create as l, subscriptions_retry as lt, dam_assets_list as m, todos_update as mt, usePortalTenantClient as n, subscription_bundles_create as nt, content_pages_by_visits as o, subscriptions_pause as ot, dam_assets_discard as p, todos_list as pt, orders_list as q, content_media_by_shares as r, subscription_bundles_list as rt, content_playlists_by_shares as s, subscriptions_reactivate as st, PortalTenantClientProvider as t, store_show as tt, dam_asset_paths_list as u, subscriptions_show as ut, media_list as v, __exportAll as vt, pages_list as w, media_products_remove as x, media_products_add as y, __require as yt, activities_list as z };
754
754
 
755
- //# sourceMappingURL=PortalTenantClientProvider-BmRtQAbi.mjs.map
755
+ //# sourceMappingURL=PortalTenantClientProvider-DVClpfbi.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalTenantClientProvider-DVClpfbi.mjs","names":[],"sources":["../../core/src/account-api-context.ts","../../../api-clients/portal-tenant/src/namespaces/portal_tenant.ts","../../../api-clients/portal-tenant-content/src/namespaces/portal_tenant_content.ts","../src/providers/PortalTenantClientProvider.tsx"],"sourcesContent":["import { createContext, use } from \"react\";\nimport type { AccountApi } from \"./account-api\";\n\nconst AccountApiContext = createContext<AccountApi | null>(null);\n\nexport const AccountApiProvider = AccountApiContext.Provider;\n\nexport function useAccountApi(): AccountApi {\n const api = use(AccountApiContext);\n if (!api) {\n throw new Error(\"useAccountApi must be used within an AccountApiProvider\");\n }\n return api;\n}\n","/**\n * Generated API client functions for portal_tenant\n *\n * DO NOT EDIT THIS FILE DIRECTLY\n * This file is auto-generated. To update:\n * 1. Update the OpenAPI spec file\n * 2. Run: pnpm generate\n */\n\nimport type { FetchClient } from \"../lib/fetch-client\";\nimport type { operations } from \"../generated/portal-tenant\";\n\n// ============================================================================\n// account\n// ============================================================================\n\n/**\n * Get current account\n * Returns the authenticated member's account profile and company context. This is the primary endpoint the SPA calls to check auth status and display user information.\n *\n * @param client - Fetch client instance\n \n */\nexport async function account_show(\n client: FetchClient,\n): Promise<\n operations[\"account_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/account`);\n}\n\n/**\n * Update current account\n * Updates the authenticated member's profile fields such as name, phone, bio, avatar, and social links.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function account_update(\n client: FetchClient,\n body: operations[\"account_update\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"account_update\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(`/api/account`, body);\n}\n\n// ============================================================================\n// store\n// ============================================================================\n\n/**\n * Get store branding and feature flags\n * Returns the tenant company's store branding (logo, icon, app store URLs) and feature flags such as whether subscription bundling is enabled.\n *\n * @param client - Fetch client instance\n \n */\nexport async function store_show(\n client: FetchClient,\n): Promise<\n operations[\"store_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/store`);\n}\n\n// ============================================================================\n// app\n// ============================================================================\n\n/**\n * Get the app manifest\n * Returns the rendered manifest for the tenant company's active FluidOS definition, matched against the current user's country, rank, and roles.\n *\n * @param client - Fetch client instance\n \n */\nexport async function app_manifest_show(\n client: FetchClient,\n): Promise<\n operations[\"app_manifest_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/app/manifest`);\n}\n\n// ============================================================================\n// calendar_events\n// ============================================================================\n\n/**\n * List calendar events\n * Returns a paginated list of upcoming and ongoing calendar events for the tenant company, optionally filtered by the authenticated member's country when one is set.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function calendar_events_list(\n client: FetchClient,\n params?: operations[\"calendar_events_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"calendar_events_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/calendar/events`, params);\n}\n\n// ============================================================================\n// activities\n// ============================================================================\n\n/**\n * List recent activities\n * Returns a paginated list of recent activities for the authenticated member, ordered by most recent first. Each activity includes pre-computed user_name and target_name fields ready for direct rendering by the portal SPA.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function activities_list(\n client: FetchClient,\n params?: operations[\"activities_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"activities_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/activities`, params);\n}\n\n// ============================================================================\n// catch_ups\n// ============================================================================\n\n/**\n * List catch-up suggestions\n * Returns a paginated list of catch-up suggestions for the authenticated member. Limited to suggestions with at least one pending action that have not expired.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function catch_ups_list(\n client: FetchClient,\n params?: operations[\"catch_ups_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"catch_ups_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/catch_ups`, params);\n}\n\n// ============================================================================\n// orders\n// ============================================================================\n\n/**\n * List orders\n * Returns a paginated list of orders placed through the tenant company, optionally filtered by status.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function orders_list(\n client: FetchClient,\n params?: operations[\"orders_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"orders_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/orders`, params);\n}\n\n/**\n * Get an order\n * Returns a single order by token with its line items.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function orders_show(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"orders_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/orders/${token}`);\n}\n\n// ============================================================================\n// products\n// ============================================================================\n\n/**\n * List products\n * Returns a paginated list of products available in the tenant company's catalog. Supports sorting and filtering by title, product type, collection, and stock availability.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function products_list(\n client: FetchClient,\n params?: operations[\"products_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"products_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products`, params);\n}\n\n/**\n * Get a product\n * Returns a single product by ID with its variants.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function products_show(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"products_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products/${id}`);\n}\n\n/**\n * Search products\n * Searches the tenant company's product catalog by keyword, returning paginated results.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function products_search(\n client: FetchClient,\n params?: operations[\"products_search\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"products_search\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products/search`, params);\n}\n\n/**\n * List product media\n * Returns all media (images, videos) attached to a product.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function products_media_list(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"products_media_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products/${id}/media`);\n}\n\n// ============================================================================\n// enrollment_packs\n// ============================================================================\n\n/**\n * List enrollment packs\n * Returns a paginated list of active, non-discarded enrollment packs scoped to the current portal tenant's company. Each pack carries an empty `products` array — fetch a single pack via `/api/enrollment_packs/{id}` to load its visible products.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function enrollment_packs_list(\n client: FetchClient,\n params?: operations[\"enrollment_packs_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"enrollment_packs_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/enrollment_packs`, params);\n}\n\n/**\n * Get an enrollment pack\n * Returns a single active, non-discarded enrollment pack scoped to the current portal tenant's company.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function enrollment_packs_show(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"enrollment_packs_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/enrollment_packs/${id}`);\n}\n\n// ============================================================================\n// subscriptions\n// ============================================================================\n\n/**\n * List subscription bundles\n * Returns the runtime bundle groupings for the authenticated customer's active subscriptions. Bundles are computed at request time by grouping subscriptions that share customer, address (physical only), volume rep, next bill date, and digital flag — they have no persistent id. The response is unpaginated; customers typically have a small number of bundles.\n *\n * @param client - Fetch client instance\n \n */\nexport async function subscription_bundles_list(\n client: FetchClient,\n): Promise<\n operations[\"subscription_bundles_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/subscription_bundles`);\n}\n\n/**\n * List subscriptions\n * Returns a paginated list of the member's active and historical subscriptions. Supports filtering by lifecycle state and a free-text search across product and plan names.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function subscriptions_list(\n client: FetchClient,\n params?: operations[\"subscriptions_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"subscriptions_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/subscriptions`, params);\n}\n\n/**\n * Get a subscription\n * Returns a single subscription by its token.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function subscriptions_show(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"subscriptions_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/subscriptions/${token}`);\n}\n\n/**\n * Update a subscription\n * Updates a subscription's default payment method or quantity.\n *\n * @param client - Fetch client instance\n * @param token - token\n * @param body - body\n */\nexport async function subscriptions_update(\n client: FetchClient,\n token: string | number,\n body: operations[\"subscriptions_update\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"subscriptions_update\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.put(`/api/subscriptions/${token}`, body);\n}\n\n/**\n * Pause a subscription\n * Pauses billing on an active subscription. When neither `next_bill_date` nor `number_of_orders` is provided, the subscription is paused indefinitely. Specifying both is rejected.\n *\n * @param client - Fetch client instance\n * @param token - token\n * @param [body] - body\n */\nexport async function subscriptions_pause(\n client: FetchClient,\n token: string | number,\n body?: NonNullable<\n operations[\"subscriptions_pause\"][\"requestBody\"]\n >[\"content\"][\"application/json\"],\n): Promise<\n operations[\"subscriptions_pause\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/pause`, body);\n}\n\n/**\n * Resume a subscription\n * Resumes billing on a paused subscription. When `next_bill_date` is omitted, the plan's next bill date from today is used.\n *\n * @param client - Fetch client instance\n * @param token - token\n * @param [body] - body\n */\nexport async function subscriptions_resume(\n client: FetchClient,\n token: string | number,\n body?: NonNullable<\n operations[\"subscriptions_resume\"][\"requestBody\"]\n >[\"content\"][\"application/json\"],\n): Promise<\n operations[\"subscriptions_resume\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/resume`, body);\n}\n\n/**\n * Skip next billing cycle\n * Skips the next billing cycle for a subscription without pausing it.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function subscriptions_skip(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"subscriptions_skip\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/skip_next_billing`);\n}\n\n/**\n * Cancel a subscription\n * Cancels an active subscription.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function subscriptions_cancel(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"subscriptions_cancel\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/cancel`);\n}\n\n/**\n * Reactivate a subscription\n * Reactivates a previously cancelled subscription.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function subscriptions_reactivate(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"subscriptions_reactivate\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/reactivate`);\n}\n\n/**\n * Retry billing on a past-due subscription\n * Queues an immediate retry on a past-due subscription against whatever payment method is currently on file. The customer-facing UI calls this after a successful payment-method update so the customer controls when the retry runs (vs. having it implicitly fire as a side-effect of the update).\n\n\nThe endpoint returns 200 for found subscriptions in normal operation, regardless of status — it is intentionally idempotent so the client can call it unconditionally after a payment-method update without first checking status. A 422 can still be returned if the server cannot persist the retry state. Use the response's `queued` field to distinguish the two outcomes:\n\n - `queued: true` — the subscription was past_due; a retry has been scheduled and `next_retry_at` is set to \"now\".\n - `queued: false` — the subscription was not past_due and no state change occurred. Treat as a no-op.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function subscriptions_retry(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"subscriptions_retry\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscriptions/${token}/retry`);\n}\n\n// ============================================================================\n// subscription_bundles\n// ============================================================================\n\n/**\n * Create a subscription bundle\n * Bundles two or more existing subscriptions onto a shared bill date, address, and volume rep. All subscriptions must belong to the authenticated customer. Bundles are not persisted entities — the endpoint aligns each subscription's billing attributes so that they share a runtime grouping key.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function subscription_bundles_create(\n client: FetchClient,\n body: operations[\"subscription_bundles_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"subscription_bundles_create\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/subscription_bundles/bundle`, body);\n}\n\n// ============================================================================\n// todos\n// ============================================================================\n\n/**\n * List todos\n * Returns a paginated list of incomplete tasks scoped to the authenticated member. Ordered by due date ascending, tasks without a due date sort last.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function todos_list(\n client: FetchClient,\n params?: operations[\"todos_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"todos_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/todos`, params);\n}\n\n/**\n * Toggle a todo's completion state\n * Marks a todo complete or incomplete for the authenticated member. Sending `completed: true` stamps `completed_at` with the current time; `false` clears it.\n *\n * @param client - Fetch client instance\n * @param id - id\n * @param body - body\n */\nexport async function todos_update(\n client: FetchClient,\n id: string | number,\n body: operations[\"todos_update\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"todos_update\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(`/api/todos/${id}`, body);\n}\n\n// ============================================================================\n// carts\n// ============================================================================\n\n/**\n * Claim a cart\n * Assigns the logged-in member as buyer_rep on an unclaimed FairShare cart. Any portal member (rep or customer) can claim. Returns an error if the cart has already been claimed.\n *\n * @param client - Fetch client instance\n * @param token - token\n */\nexport async function carts_claim(\n client: FetchClient,\n token: string | number,\n): Promise<\n operations[\"carts_claim\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/carts/${token}/claim`);\n}\n\n// ============================================================================\n// product_metrics\n// ============================================================================\n\n/**\n * Top products by direct visits\n * Ranked list of the company's products by total visits to the product page (aggregates metrics_product_visits across all visit sources).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function product_by_visits(\n client: FetchClient,\n params?: operations[\"product_by_visits\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"product_by_visits\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products/by-visits`, params);\n}\n\n/**\n * Top products by share-link visits\n * Ranked list of the company's products by click-throughs on rep share links (aggregates metrics_share_shareable_visits where shareable_type='Product').\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function product_by_shares(\n client: FetchClient,\n params?: operations[\"product_by_shares\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"product_by_shares\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/products/by-shares`, params);\n}\n\n// ============================================================================\n// enrollment_pack_metrics\n// ============================================================================\n\n/**\n * Top enrollment packs by direct visits\n * Ranked list of the company's enrollment packs by total visits to the pack page (aggregates metrics_enrollment_pack_visits across all visit sources).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function enrollment_pack_by_visits(\n client: FetchClient,\n params?: operations[\"enrollment_pack_by_visits\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"enrollment_pack_by_visits\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/enrollment_packs/by-visits`, params);\n}\n\n/**\n * Top enrollment packs by share-link visits\n * Ranked list of the company's enrollment packs by click-throughs on rep share links (aggregates metrics_share_shareable_visits where shareable_type='EnrollmentPack').\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function enrollment_pack_by_shares(\n client: FetchClient,\n params?: operations[\"enrollment_pack_by_shares\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"enrollment_pack_by_shares\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/enrollment_packs/by-shares`, params);\n}\n","/**\n * Generated API client functions for portal_tenant_content\n *\n * DO NOT EDIT THIS FILE DIRECTLY\n * This file is auto-generated. To update:\n * 1. Update the OpenAPI spec file\n * 2. Run: pnpm generate\n */\n\nimport type { FetchClient } from \"../lib/fetch-client\";\nimport type { operations } from \"../generated/portal-tenant-content\";\n\n// ============================================================================\n// content\n// ============================================================================\n\n/**\n * List active languages for the tenant company\n * Returns active languages enabled for the tenant company, sorted by name. Used by the content/translation editor to populate the language switcher.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_languages_list(\n client: FetchClient,\n params?: operations[\"content_languages_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_languages_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/languages`, params);\n}\n\n/**\n * List media (own uploads and company share media)\n * Returns a paginated list of the member's own uploads and company share media. Training and update media are excluded.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function media_list(\n client: FetchClient,\n params?: operations[\"media_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"media_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/media`, params);\n}\n\n/**\n * Create a new media item\n * Creates a new media item record.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function media_create(\n client: FetchClient,\n body: operations[\"media_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"media_create\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/media`, body);\n}\n\n/**\n * Get a specific media item\n * Returns a single media item by ID. When language_iso is provided, translatable fields (title, description, url) are returned for that language with no fallback — empty values indicate an untranslated field.\n *\n * @param client - Fetch client instance\n * @param id - id\n * @param [params] - params\n */\nexport async function media_show(\n client: FetchClient,\n id: string | number,\n params?: operations[\"media_show\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"media_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/media/${id}`, params);\n}\n\n/**\n * Update a media item (own uploads only)\n * Updates a media item's title, description, status, url, content_format, thumbnail, CTA, and SEO. When language_iso is provided, translatable fields are written against that language's translation row instead of the default locale.\n *\n * @param client - Fetch client instance\n * @param id - id\n * @param body - body\n * @param [params] - params\n */\nexport async function media_update(\n client: FetchClient,\n id: string | number,\n body: operations[\"media_update\"][\"requestBody\"][\"content\"][\"application/json\"],\n params?: operations[\"media_update\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"media_update\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(`/api/content/media/${id}`, body, { params });\n}\n\n/**\n * Delete a media item (own uploads only)\n * Removes a media item.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function media_destroy(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"media_destroy\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.delete(`/api/content/media/${id}`);\n}\n\n/**\n * List products associated with a media item\n * Returns a paginated list of products associated with a media item.\n *\n * @param client - Fetch client instance\n * @param medium_id - medium_id\n * @param [params] - params\n */\nexport async function media_products_list(\n client: FetchClient,\n medium_id: string | number,\n params?: operations[\"media_products_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"media_products_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/media/${medium_id}/products`, params);\n}\n\n/**\n * Associate a product with a media item\n * Creates a product association for a media item.\n *\n * @param client - Fetch client instance\n * @param medium_id - medium_id\n * @param body - body\n */\nexport async function media_products_add(\n client: FetchClient,\n medium_id: string | number,\n body: operations[\"media_products_add\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"media_products_add\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/media/${medium_id}/products`, body);\n}\n\n/**\n * Remove a product association from a media item\n * Removes a single product association from a media item.\n *\n * @param client - Fetch client instance\n * @param medium_id - medium_id\n * @param id - id\n */\nexport async function media_products_remove(\n client: FetchClient,\n medium_id: string | number,\n id: string | number,\n): Promise<\n operations[\"media_products_remove\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.delete(`/api/content/media/${medium_id}/products/${id}`);\n}\n\n/**\n * List playlists with cursor pagination\n * Returns a paginated list of playlists.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function playlists_list(\n client: FetchClient,\n params?: operations[\"playlists_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"playlists_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/playlists`, params);\n}\n\n/**\n * Create a new playlist\n * Creates a new playlist.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function playlists_create(\n client: FetchClient,\n body: operations[\"playlists_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"playlists_create\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/playlists`, body);\n}\n\n/**\n * Get a specific playlist\n * Returns a single playlist by ID.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function playlists_show(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"playlists_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/playlists/${id}`);\n}\n\n/**\n * Update a playlist\n * Updates a playlist's title or metadata.\n *\n * @param client - Fetch client instance\n * @param id - id\n * @param body - body\n */\nexport async function playlists_update(\n client: FetchClient,\n id: string | number,\n body: operations[\"playlists_update\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"playlists_update\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(`/api/content/playlists/${id}`, body);\n}\n\n/**\n * Delete a playlist\n * Removes a playlist.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function playlists_destroy(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"playlists_destroy\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.delete(`/api/content/playlists/${id}`);\n}\n\n/**\n * List items in a playlist\n * Returns a paginated list of items in a playlist.\n *\n * @param client - Fetch client instance\n * @param playlist_id - playlist_id\n * @param [params] - params\n */\nexport async function playlists_items_list(\n client: FetchClient,\n playlist_id: string | number,\n params?: operations[\"playlists_items_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"playlists_items_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/playlists/${playlist_id}/items`, params);\n}\n\n/**\n * Add an item to a playlist\n * Adds a content item (media, page, product, or enrollment_pack) to a playlist.\n *\n * @param client - Fetch client instance\n * @param playlist_id - playlist_id\n * @param body - body\n */\nexport async function playlists_items_add(\n client: FetchClient,\n playlist_id: string | number,\n body: operations[\"playlists_items_add\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"playlists_items_add\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/playlists/${playlist_id}/items`, body);\n}\n\n/**\n * Reorder items in a playlist\n * Sets the order of items in a playlist. Items not included in the payload are not moved. Flips the playlist to manual ordering.\n *\n * @param client - Fetch client instance\n * @param playlist_id - playlist_id\n * @param body - body\n */\nexport async function playlists_items_reorder(\n client: FetchClient,\n playlist_id: string | number,\n body: operations[\"playlists_items_reorder\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"playlists_items_reorder\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(\n `/api/content/playlists/${playlist_id}/items/reorder`,\n body,\n );\n}\n\n/**\n * Remove an item from a playlist\n * Removes a single item from a playlist.\n *\n * @param client - Fetch client instance\n * @param playlist_id - playlist_id\n * @param id - id\n */\nexport async function playlists_items_remove(\n client: FetchClient,\n playlist_id: string | number,\n id: string | number,\n): Promise<\n operations[\"playlists_items_remove\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.delete(`/api/content/playlists/${playlist_id}/items/${id}`);\n}\n\n/**\n * List pages for the company\n * Returns a paginated list of published pages for the authenticated rep's company. Members have read-only access — there is no create, update, or destroy action for pages in the portal BFF. Response shape matches pages_show (PortalTenant::Api::PageBlueprinter).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function pages_list(\n client: FetchClient,\n params?: operations[\"pages_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"pages_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/pages`, params);\n}\n\n/**\n * Get a specific page\n * Returns a single page by ID, scoped to the authenticated rep's company. Response is a lean portal-BFF shape rendered by PortalTenant::Api::PageBlueprinter — not the legacy admin shape. Admin-only fields (html_code, application_theme_template, search_engine_optimizer, open_graph, prompts, etc.) are intentionally omitted.\n *\n * @param client - Fetch client instance\n * @param id - id\n */\nexport async function pages_show(\n client: FetchClient,\n id: string | number,\n): Promise<\n operations[\"pages_show\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/pages/${id}`);\n}\n\n/**\n * List share links for the current user\n * Returns a paginated list of share links.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function shares_list(\n client: FetchClient,\n params?: operations[\"shares_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"shares_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/shares`, params);\n}\n\n/**\n * Create a share link\n * Creates a new share link for content.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function shares_create(\n client: FetchClient,\n body: operations[\"shares_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"shares_create\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/shares`, body);\n}\n\n/**\n * List DAM assets\n * Returns a paginated list of DAM assets for the company.\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function dam_assets_list(\n client: FetchClient,\n params?: operations[\"dam_assets_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"dam_assets_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/dam/assets`, params);\n}\n\n/**\n * Create a DAM asset\n * Creates a new DAM asset. Supports two modes:\n1. **JSON placeholder** — send `application/json` with `asset[name]` to\n create a placeholder record for later file upload.\n\n2. **File upload** — send `multipart/form-data` with `asset[file]`,\n `asset[name]`, and optionally `asset[description]` and `asset[tags]`\n to upload a file and create the full asset with variants.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function dam_assets_create(\n client: FetchClient,\n body: operations[\"dam_assets_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"dam_assets_create\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/dam/assets`, body);\n}\n\n/**\n * List paths for a DAM asset\n * Returns a paginated list of path aliases for a DAM asset.\n *\n * @param client - Fetch client instance\n * @param asset_code - asset_code\n * @param [params] - params\n */\nexport async function dam_asset_paths_list(\n client: FetchClient,\n asset_code: string | number,\n params?: operations[\"dam_asset_paths_list\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"dam_asset_paths_list\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/dam/assets/${asset_code}/paths`, params);\n}\n\n/**\n * Create a path alias for a DAM asset\n * Creates a new path alias for an existing DAM asset.\n *\n * @param client - Fetch client instance\n * @param asset_code - asset_code\n * @param body - body\n */\nexport async function dam_asset_paths_create(\n client: FetchClient,\n asset_code: string | number,\n body: operations[\"dam_asset_paths_create\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"dam_asset_paths_create\"][\"responses\"][201][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/dam/assets/${asset_code}/paths`, body);\n}\n\n/**\n * Query DAM assets using tree paths and tags\n * Searches and retrieves DAM assets using tree path pattern matching, tag-based variant filtering, wildcard name matching, and partial search. Supports cursor pagination for large result sets.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function dam_query(\n client: FetchClient,\n body: operations[\"dam_query\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"dam_query\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/dam/query`, body);\n}\n\n/**\n * Delete a DAM asset\n * Permanently destroys a DAM asset, including its ImageKit storage, variants, and database records.\n *\n * @param client - Fetch client instance\n * @param code - code\n */\nexport async function dam_assets_destroy(\n client: FetchClient,\n code: string | number,\n): Promise<\n operations[\"dam_assets_destroy\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.delete(`/api/content/dam/assets/${code}`);\n}\n\n/**\n * Discard (soft-delete) a DAM asset\n * Soft-deletes a DAM asset. Used to discard an in-progress upload without permanently removing the record.\n *\n * @param client - Fetch client instance\n * @param code - code\n */\nexport async function dam_assets_discard(\n client: FetchClient,\n code: string | number,\n): Promise<\n operations[\"dam_assets_discard\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.patch(`/api/content/dam/assets/${code}/discard`);\n}\n\n/**\n * Toggle favorite status on a content item\n * Toggles the favorite status of a content item for the authenticated member. If the item is not currently favorited, it becomes favorited. If it is already favorited, the favorite is removed.\n *\n * @param client - Fetch client instance\n * @param body - body\n */\nexport async function favorites_toggle(\n client: FetchClient,\n body: operations[\"favorites_toggle\"][\"requestBody\"][\"content\"][\"application/json\"],\n): Promise<\n operations[\"favorites_toggle\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.post(`/api/content/favorites/toggle`, body);\n}\n\n// ============================================================================\n// media_metrics\n// ============================================================================\n\n/**\n * Top media by direct visits\n * Ranked list of the company's media by total visits (aggregates metrics_media_visits across all visit sources).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_media_by_visits(\n client: FetchClient,\n params?: operations[\"content_media_by_visits\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_media_by_visits\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/media/by-visits`, params);\n}\n\n/**\n * Top media by share-link visits\n * Ranked list of the company's media by click-throughs on rep share links (aggregates metrics_share_shareable_visits where shareable_type='Medium').\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_media_by_shares(\n client: FetchClient,\n params?: operations[\"content_media_by_shares\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_media_by_shares\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/media/by-shares`, params);\n}\n\n// ============================================================================\n// playlist_metrics\n// ============================================================================\n\n/**\n * Top playlists by direct visits\n * Ranked list of the company's playlists by total visits (aggregates metrics_library_visits since playlists are stored in the libraries table).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_playlists_by_visits(\n client: FetchClient,\n params?: operations[\"content_playlists_by_visits\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_playlists_by_visits\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/playlists/by-visits`, params);\n}\n\n/**\n * Top playlists by share-link visits\n * Ranked list of the company's playlists by click-throughs on rep share links (aggregates metrics_share_shareable_visits where shareable_type='Library').\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_playlists_by_shares(\n client: FetchClient,\n params?: operations[\"content_playlists_by_shares\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_playlists_by_shares\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/playlists/by-shares`, params);\n}\n\n// ============================================================================\n// page_metrics\n// ============================================================================\n\n/**\n * Top pages by direct visits\n * Ranked list of the company's pages by total visits (aggregates metrics_page_visits across all visit sources).\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_pages_by_visits(\n client: FetchClient,\n params?: operations[\"content_pages_by_visits\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_pages_by_visits\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/pages/by-visits`, params);\n}\n\n/**\n * Top pages by share-link visits\n * Ranked list of the company's pages by click-throughs on rep share links (aggregates metrics_share_shareable_visits where shareable_type='Page').\n *\n * @param client - Fetch client instance\n * @param [params] - params\n */\nexport async function content_pages_by_shares(\n client: FetchClient,\n params?: operations[\"content_pages_by_shares\"][\"parameters\"][\"query\"],\n): Promise<\n operations[\"content_pages_by_shares\"][\"responses\"][200][\"content\"][\"application/json\"]\n> {\n return client.get(`/api/content/pages/by-shares`, params);\n}\n","import { createContext, type Provider, use } from \"react\";\nimport type { FetchClient } from \"@fluid-app/portal-tenant-api-client\";\n\nconst PortalTenantClientContext = createContext<FetchClient | null>(null);\n\nexport const PortalTenantClientProvider: Provider<FetchClient | null> =\n PortalTenantClientContext.Provider;\n\n/**\n * Returns the portal-tenant FetchClient from context.\n * Must be used within a FluidProvider.\n */\nexport function usePortalTenantClient(): FetchClient {\n const client = use(PortalTenantClientContext);\n if (!client) {\n throw new Error(\n \"usePortalTenantClient must be used within a FluidProvider\",\n );\n }\n return client;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAM,oBAAoB,cAAiC,KAAK;AAEhE,MAAa,qBAAqB,kBAAkB;AAEpD,SAAgB,gBAA4B;CAC1C,MAAM,MAAM,IAAI,kBAAkB;AAClC,KAAI,CAAC,IACH,OAAM,IAAI,MAAM,0DAA0D;AAE5E,QAAO;;;;;;;;;;;ACWT,eAAsB,aACpB,QAGA;AACA,QAAO,OAAO,IAAI,eAAe;;;;;;;;;AAUnC,eAAsB,eACpB,QACA,MAGA;AACA,QAAO,OAAO,MAAM,gBAAgB,KAAK;;;;;;;;;AAc3C,eAAsB,WACpB,QAGA;AACA,QAAO,OAAO,IAAI,aAAa;;;;;;;;;AAcjC,eAAsB,kBACpB,QAGA;AACA,QAAO,OAAO,IAAI,oBAAoB;;;;;;;;;AAcxC,eAAsB,qBACpB,QACA,QAGA;AACA,QAAO,OAAO,IAAI,wBAAwB,OAAO;;;;;;;;;AAcnD,eAAsB,gBACpB,QACA,QAGA;AACA,QAAO,OAAO,IAAI,mBAAmB,OAAO;;;;;;;;;AAc9C,eAAsB,eACpB,QACA,QAGA;AACA,QAAO,OAAO,IAAI,kBAAkB,OAAO;;;;;;;;;AAc7C,eAAsB,YACpB,QACA,QAGA;AACA,QAAO,OAAO,IAAI,eAAe,OAAO;;;;;;;;;AAU1C,eA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AEzE,MAAa,6BACX,0BAA0B;;;;;AAM5B,SAAgB,wBAAqC;CACnD,MAAM,SAAS,IAAI,0BAA0B;AAC7C,KAAI,CAAC,OACH,OAAM,IAAI,MACR,4DACD;AAEH,QAAO"}
@@ -1,13 +1,14 @@
1
1
  require("./chunk-9hOWP6kD.cjs");
2
- const require_FluidProvider = require("./FluidProvider-BVJmIM13.cjs");
3
- const require_PortalTenantClientProvider = require("./PortalTenantClientProvider-Bpm-CZq1.cjs");
4
- const require_countries_api_context = require("./countries-api-context-G-NW4BoH.cjs");
2
+ const require_FluidProvider = require("./FluidProvider-CMfpLju8.cjs");
3
+ const require_PortalTenantClientProvider = require("./PortalTenantClientProvider-C0eJp8MN.cjs");
4
+ const require_countries_api_context = require("./countries-api-context-16PZpF7O.cjs");
5
+ const require_static_dict_adapter = require("./static-dict-adapter-BLq4QzCI.cjs");
5
6
  const require_src = require("./src-Cx7UyT_c.cjs");
6
- const require_ScreenHeaderContext = require("./ScreenHeaderContext-BiGgRqjY.cjs");
7
+ const require_ScreenHeaderContext = require("./ScreenHeaderContext-VOp8pVHr.cjs");
7
8
  const require_query_keys = require("./query-keys-elu0svUd.cjs");
8
- const require_use_account = require("./use-account-CQ-mhA3W.cjs");
9
- const require_AddressAutocompleteInput = require("./AddressAutocompleteInput-JBXGT1iL.cjs");
10
- const require_use_mysite_portal = require("./use-mysite-portal-CH9ZQROw.cjs");
9
+ const require_use_account = require("./use-account-DltRHEwC.cjs");
10
+ const require_AddressAutocompleteInput = require("./AddressAutocompleteInput-BQz2jaUO.cjs");
11
+ const require_use_mysite_portal = require("./use-mysite-portal-D3X51_Ax.cjs");
11
12
  let react = require("react");
12
13
  let _tanstack_react_query = require("@tanstack/react-query");
13
14
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -681,6 +682,7 @@ const SOCIAL_PLACEHOLDERS = {
681
682
  };
682
683
  function ProfileContentScreen({ onToast, countryIso }) {
683
684
  const { t } = require_AddressAutocompleteInput.useProfileTranslation();
685
+ const { locale } = require_static_dict_adapter.useActiveLocale();
684
686
  const payApi = require_FluidProvider.usePayApi();
685
687
  const accountApi = require_PortalTenantClientProvider.useAccountApi();
686
688
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
@@ -1109,6 +1111,7 @@ function ProfileContentScreen({ onToast, countryIso }) {
1109
1111
  }),
1110
1112
  selectedAddress: addressDialog.selected,
1111
1113
  defaultCountry: addresses.find((a) => a.default)?.country_code ?? countryIso,
1114
+ languageIso: locale,
1112
1115
  t: (key) => t(key),
1113
1116
  onSubmit: async (formData) => {
1114
1117
  if (addressDialog.selected) await updateAddressMutation.mutateAsync({
@@ -1190,6 +1193,7 @@ function ProfileContentScreen({ onToast, countryIso }) {
1190
1193
  isSubmitting: createAddressMutation.isPending,
1191
1194
  countries: countryOptions,
1192
1195
  fetchStates: fetchStatesFromCountries,
1196
+ languageIso: locale,
1193
1197
  t: (key) => t(key),
1194
1198
  renderAddressAutocomplete: ({ control, setValue, countryCode }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AddressAutocompleteInput.AddressAutocompleteInput, {
1195
1199
  control,
@@ -1376,4 +1380,4 @@ Object.defineProperty(exports, "profileScreenPropertySchema", {
1376
1380
  }
1377
1381
  });
1378
1382
 
1379
- //# sourceMappingURL=ProfileScreen-DxjLSL0A.cjs.map
1383
+ //# sourceMappingURL=ProfileScreen-21MnRuNH.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileScreen-21MnRuNH.cjs","names":["useProfileTranslation","Sparkles","Pencil","User","Mail","Phone","Quote","Link2","Copy","Dialog","DialogContent","DialogHeader","DialogTitle","LogOut","Plus","MapPin","EllipsesDropdown","Linkedin","Facebook","Twitter","Instagram","Youtube","Globe","useProfileTranslation","useActiveLocale","usePayApi","useAccountApi","createFluidPayApiAdapter","usePortalMySiteProfile","usePortalUpdateSettings","useAccount","payKeys","mapToFluidPayPaymentMethod","useCountriesApi","useLanguagesApi","storeKeys","accountKeys","useZodForm","z","FluidPayCoreProvider","UserInfoDialog","AddressFormDialog","AddressAutocompleteInput","ConfirmActionDialog","CreditCardFormDialog","EditPaymentMethodDialog","Dialog","DialogContent","DialogHeader","DialogTitle","Label","Input","DialogFooter","Button","useFluidContext","ProfileTranslationBridge","useProfileTranslation","ScreenHeaderBreadcrumbs","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbPage"],"sources":["../src/screens/profile/derive-last-name.ts","../src/screens/profile/ProfileLayout.tsx","../src/screens/ProfileContentScreen.tsx","../src/screens/ProfileScreen.tsx"],"sourcesContent":["export function deriveLastName(firstName: string, fullName: string): string {\n if (!firstName) return \"\";\n const prefix = `${firstName} `;\n return fullName.startsWith(prefix) ? fullName.slice(prefix.length) : \"\";\n}\n","import { type JSX, type ReactNode, useState, type ComponentType } from \"react\";\nimport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n} from \"@fluid-app/ui-primitives\";\nimport {\n Sparkles,\n Pencil,\n Plus,\n Copy,\n Link2,\n MapPin,\n User,\n Mail,\n Phone,\n Quote,\n Linkedin,\n Facebook,\n Twitter,\n Instagram,\n Youtube,\n Globe,\n LogOut,\n} from \"lucide-react\";\nimport type { fluidPay } from \"@fluid-app/fluid-pay-core\";\nimport type { PointsLedger } from \"@fluid-app/profile-core\";\nimport { useProfileTranslation } from \"@fluid-app/profile-core/translation-api-context\";\nimport { EllipsesDropdown } from \"@fluid-app/profile-ui\";\nimport type { AccountRep } from \"@fluid-app/portal-core/account-types\";\n\ninterface ProfileLayoutProps {\n account: AccountRep;\n pointsBalance: number | undefined;\n pointsLedger?: PointsLedger[];\n rewardsEnabled?: boolean;\n addresses: fluidPay.CustomerAddress[];\n paymentMethods: fluidPay.CustomerPaymentMethod[];\n mySiteDisplayUrl: string;\n socialLinks: Partial<Record<SocialKey, string>>;\n onEditPersonalInfo: () => void;\n onAddAddress: () => void;\n onEditAddress: (address: fluidPay.CustomerAddress) => void;\n onDeleteAddress: (address: fluidPay.CustomerAddress) => void;\n onAddPaymentMethod: () => void;\n onEditPaymentMethod: (method: fluidPay.CustomerPaymentMethod) => void;\n onCopyMySiteLink: () => void;\n onEditMySiteLink?: () => void;\n onConnectSocial: (key: SocialKey) => void;\n onSignOut?: () => void;\n}\n\nexport function ProfileLayout(props: ProfileLayoutProps): JSX.Element {\n const { t } = useProfileTranslation();\n const {\n account,\n pointsBalance,\n pointsLedger,\n rewardsEnabled,\n addresses,\n paymentMethods,\n mySiteDisplayUrl,\n socialLinks,\n onEditPersonalInfo,\n onAddAddress,\n onEditAddress,\n onDeleteAddress,\n onAddPaymentMethod,\n onEditPaymentMethod,\n onCopyMySiteLink,\n onEditMySiteLink,\n onConnectSocial,\n onSignOut,\n } = props;\n\n const fullName =\n `${account.first_name ?? \"\"} ${account.last_name ?? \"\"}`.trim();\n const heroFirstName = (account.first_name || \"\").trim().split(\" \")[0] || \"\";\n const heroDisplay =\n heroFirstName || account.email?.split(\"@\")[0] || t(\"account_fallback\");\n const connectedSocialCount = Object.values(socialLinks).filter(\n (v) => typeof v === \"string\" && v.length > 0,\n ).length;\n const [isPointsHistoryOpen, setIsPointsHistoryOpen] = useState(false);\n const POINTS_PREVIEW_COUNT = 4;\n const ledger = pointsLedger ?? [];\n const ledgerPreview = ledger.slice(0, POINTS_PREVIEW_COUNT);\n const hasMoreLedger = ledger.length > POINTS_PREVIEW_COUNT;\n\n return (\n <div className=\"relative\">\n <div className=\"relative mx-auto max-w-4xl px-5 pt-8 pb-20 md:px-8\">\n {/* Hero */}\n <section className=\"flex items-center gap-3.5\">\n <div className=\"relative size-12 shrink-0 overflow-hidden rounded-full ring-1 ring-black/5 md:size-13\">\n {account.avatar_url ? (\n <img\n src={account.avatar_url}\n alt=\"\"\n className=\"h-full w-full object-cover\"\n />\n ) : (\n <div className=\"bg-primary text-primary-foreground flex h-full w-full items-center justify-center text-lg font-semibold\">\n {heroDisplay.charAt(0).toUpperCase()}\n </div>\n )}\n </div>\n <div className=\"min-w-0 flex-1\">\n <h1 className=\"text-foreground truncate text-xl font-bold tracking-tight md:text-2xl\">\n {heroDisplay}\n </h1>\n <p className=\"text-muted-foreground mt-0.5 truncate text-sm\">\n {account.email}\n </p>\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n {rewardsEnabled && (\n <div className=\"ring-border text-foreground inline-flex items-center gap-1.5 rounded-md bg-transparent px-2.5 py-1 text-xs font-semibold ring-1\">\n <Sparkles className=\"text-primary size-3\" strokeWidth={2.25} />\n {(pointsBalance ?? 0).toLocaleString()} {t(\"pts\")}\n </div>\n )}\n </div>\n </section>\n\n {/* Personal information */}\n <SectionHeader\n title={t(\"personal_information\")}\n action={\n <PillButton\n onClick={onEditPersonalInfo}\n icon={Pencil}\n label={t(\"edit\")}\n />\n }\n />\n <div className=\"ring-border mt-2.5 overflow-hidden rounded-2xl bg-transparent ring-1\">\n <FieldRow\n icon={User}\n label={t(\"name\")}\n value={fullName || account.first_name || \"\"}\n />\n <FieldRow\n icon={Mail}\n label={t(\"email\")}\n value={account.email ?? \"\"}\n />\n <FieldRow\n icon={Phone}\n label={t(\"phone\")}\n value={account.phone ?? \"\"}\n placeholder={t(\"add_phone_number\")}\n />\n <FieldRow\n icon={Quote}\n label={t(\"bio\")}\n value={account.bio ?? \"\"}\n placeholder={t(\"add_a_short_bio\")}\n multiline\n isLast\n />\n </div>\n\n {/* Payment methods */}\n <SectionHeader title={t(\"payment_methods\")} />\n <div className=\"mt-2.5 grid grid-cols-1 gap-2.5 sm:grid-cols-3\">\n {paymentMethods.map((method) => (\n <PaymentCardVisual\n key={method.id}\n method={method}\n onClick={() => onEditPaymentMethod(method)}\n />\n ))}\n <AddPaymentTile onClick={onAddPaymentMethod} />\n </div>\n\n {/* Points history */}\n {rewardsEnabled && (\n <>\n <SectionHeader\n title={t(\"points_history\")}\n action={\n <span className=\"text-muted-foreground/75 text-xs\">\n {t(\"pts_available\", {\n count: String((pointsBalance ?? 0).toLocaleString()),\n })}\n </span>\n }\n />\n {ledger.length > 0 ? (\n <div className=\"ring-border mt-2.5 overflow-hidden rounded-2xl bg-transparent ring-1\">\n {ledgerPreview.map((entry, i) => (\n <PointsLedgerRow\n key={entry.id}\n entry={entry}\n isLast={!hasMoreLedger && i === ledgerPreview.length - 1}\n />\n ))}\n {hasMoreLedger && (\n <button\n type=\"button\"\n onClick={() => setIsPointsHistoryOpen(true)}\n className=\"text-foreground hover:bg-muted flex w-full items-center justify-center gap-1 px-4 py-3 text-xs font-bold transition-colors\"\n >\n {t(\"see_all_transactions\", { count: ledger.length })}\n </button>\n )}\n </div>\n ) : (\n <div className=\"ring-dashed ring-border mt-2.5 flex flex-col items-center justify-center gap-1 rounded-2xl bg-transparent px-4 py-8 text-center ring-1\">\n <Sparkles\n className=\"text-muted-foreground/75 size-5\"\n strokeWidth={1.75}\n />\n <div className=\"text-foreground text-sm font-bold\">\n {t(\"no_points_yet\")}\n </div>\n <div className=\"text-muted-foreground text-xs\">\n {t(\"earn_points_hint\")}\n </div>\n </div>\n )}\n </>\n )}\n\n {/* Your MySite link */}\n <SectionHeader\n title={t(\"your_mysite_link\")}\n action={\n onEditMySiteLink ? (\n <PillButton\n onClick={onEditMySiteLink}\n icon={Pencil}\n label={t(\"edit_link\")}\n />\n ) : undefined\n }\n />\n <div className=\"ring-border mt-2.5 flex items-center gap-3 rounded-2xl bg-transparent p-3.5 ring-1\">\n <div className=\"bg-muted text-foreground flex size-11 shrink-0 items-center justify-center rounded-full\">\n <Link2 className=\"size-[18px]\" strokeWidth={2} />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-muted-foreground/75 text-xs font-bold tracking-widest uppercase\">\n {t(\"public_link\")}\n </div>\n <div className=\"text-foreground mt-0.5 truncate font-mono text-sm font-semibold\">\n {mySiteDisplayUrl || t(\"set_your_mysite_link\")}\n </div>\n </div>\n <button\n type=\"button\"\n onClick={onCopyMySiteLink}\n disabled={!mySiteDisplayUrl}\n className=\"ring-border text-foreground hover:bg-muted inline-flex items-center gap-1 rounded-md bg-transparent px-3 py-1.5 text-xs font-bold ring-1 transition-all disabled:cursor-not-allowed disabled:opacity-40\"\n >\n <Copy className=\"size-3\" strokeWidth={2.25} />\n {t(\"copy\")}\n </button>\n </div>\n\n {/* Shipping addresses */}\n <SectionHeader title={t(\"shipping_addresses\")} />\n <div className=\"mt-2.5 grid grid-cols-1 gap-2.5 sm:grid-cols-2\">\n {addresses.map((address) => (\n <AddressCard\n key={address.id}\n address={address}\n onEdit={() => onEditAddress(address)}\n onDelete={\n address.default ? undefined : () => onDeleteAddress(address)\n }\n />\n ))}\n <AddAddressTile onClick={onAddAddress} />\n </div>\n\n {/* Social media */}\n <SectionHeader\n title={t(\"social_media\")}\n action={\n <span className=\"text-muted-foreground/75 text-xs\">\n {t(\"connected_count\", { count: connectedSocialCount })}\n </span>\n }\n />\n <div className=\"ring-border mt-2.5 overflow-hidden rounded-2xl bg-transparent ring-1\">\n {SOCIAL_ENTRIES.map((entry, i) => (\n <SocialRow\n key={entry.key}\n entry={entry}\n handle={socialLinks[entry.key] ?? \"\"}\n isLast={i === SOCIAL_ENTRIES.length - 1}\n onConnect={() => onConnectSocial(entry.key)}\n />\n ))}\n </div>\n\n <Dialog\n open={isPointsHistoryOpen}\n onOpenChange={setIsPointsHistoryOpen}\n >\n <DialogContent className=\"max-w-md md:max-w-lg\">\n <DialogHeader>\n <DialogTitle>{t(\"points_history\")}</DialogTitle>\n </DialogHeader>\n <div className=\"ring-border max-h-[60vh] overflow-y-auto rounded-2xl bg-transparent ring-1\">\n {ledger.map((entry, i) => (\n <PointsLedgerRow\n key={entry.id}\n entry={entry}\n isLast={i === ledger.length - 1}\n />\n ))}\n </div>\n </DialogContent>\n </Dialog>\n\n {onSignOut && (\n <div className=\"ring-border mt-8 flex flex-wrap items-center justify-between gap-3 rounded-2xl bg-transparent p-3.5 ring-1\">\n <div className=\"flex items-center gap-3\">\n <div className=\"bg-destructive/10 flex size-9 items-center justify-center rounded-md\">\n <LogOut\n className=\"text-destructive size-4\"\n strokeWidth={2.25}\n />\n </div>\n <div>\n <div className=\"text-foreground text-sm font-bold\">\n {t(\"sign_out\")}\n </div>\n <div className=\"text-muted-foreground text-xs\">\n {t(\"sign_out_description\")}\n </div>\n </div>\n </div>\n <button\n type=\"button\"\n onClick={onSignOut}\n className=\"bg-destructive/15 text-destructive hover:bg-destructive/25 rounded-md px-4 py-2 text-xs font-bold transition-colors\"\n >\n {t(\"sign_out\")}\n </button>\n </div>\n )}\n </div>\n </div>\n );\n}\n\nfunction SectionHeader({\n title,\n action,\n}: {\n title: string;\n action?: ReactNode;\n}): JSX.Element {\n return (\n <div className=\"mt-8 flex items-end justify-between\">\n <h2 className=\"text-foreground text-base font-bold tracking-tight\">\n {title}\n </h2>\n {action ?? null}\n </div>\n );\n}\n\nfunction PillButton({\n onClick,\n icon: Icon,\n label,\n disabled,\n}: {\n onClick: () => void;\n icon: ComponentType<{ className?: string; strokeWidth?: number }>;\n label: string;\n disabled?: boolean;\n}): JSX.Element {\n return (\n <button\n type=\"button\"\n onClick={onClick}\n disabled={disabled}\n className=\"ring-border text-foreground hover:bg-muted inline-flex items-center gap-1 rounded-md bg-transparent px-3 py-1.5 text-xs font-bold ring-1 transition-all disabled:cursor-not-allowed disabled:opacity-40\"\n >\n <Icon className=\"size-3\" strokeWidth={2.25} />\n {label}\n </button>\n );\n}\n\nfunction PointsLedgerRow({\n entry,\n isLast,\n}: {\n entry: PointsLedger;\n isLast: boolean;\n}): JSX.Element {\n const { t } = useProfileTranslation();\n const isCredit = entry.amount >= 0;\n const sign = isCredit ? \"+\" : \"−\";\n const magnitude = Math.abs(entry.amount).toLocaleString();\n const amountColor = isCredit ? \"text-emerald-600\" : \"text-destructive\";\n const sourceName = entry.metadata?.source?.name?.trim();\n const transactionType = entry.metadata?.transaction_type;\n const label =\n sourceName ||\n (transactionType\n ? transactionType.charAt(0).toUpperCase() + transactionType.slice(1)\n : isCredit\n ? t(\"points_awarded\")\n : t(\"points_redeemed\"));\n const dateLabel = formatLedgerDate(entry.created_at);\n return (\n <div\n className={`flex items-center gap-3 px-4 py-3.5 ${isLast ? \"\" : \"border-border border-b\"}`}\n >\n <div className=\"bg-muted flex size-9 shrink-0 items-center justify-center rounded-full\">\n <Sparkles\n className={`size-4 ${isCredit ? \"text-primary\" : \"text-muted-foreground\"}`}\n strokeWidth={2}\n />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-foreground truncate text-sm font-medium\">\n {label}\n </div>\n <div className=\"text-muted-foreground text-xs\">{dateLabel}</div>\n </div>\n <div\n className={`shrink-0 font-mono text-sm font-bold tabular-nums ${amountColor}`}\n >\n {sign}\n {magnitude}\n </div>\n </div>\n );\n}\n\nfunction formatLedgerDate(iso: string): string {\n try {\n const d = new Date(iso);\n return d.toLocaleDateString(undefined, {\n month: \"short\",\n day: \"numeric\",\n year: \"numeric\",\n });\n } catch {\n return iso;\n }\n}\n\nfunction FieldRow({\n icon: Icon,\n label,\n value,\n placeholder,\n isLast,\n multiline,\n}: {\n icon: ComponentType<{ className?: string; strokeWidth?: number }>;\n label: string;\n value: string;\n placeholder?: string;\n isLast?: boolean;\n multiline?: boolean;\n}): JSX.Element {\n const display = value || placeholder || \"\";\n const isPlaceholder = !value && Boolean(placeholder);\n const valueClasses = multiline ? \"whitespace-pre-line\" : \"truncate\";\n return (\n <div\n className={`flex gap-3 px-4 py-3.5 ${multiline ? \"items-start\" : \"items-center\"} ${isLast ? \"\" : \"border-border border-b\"}`}\n >\n <div className=\"bg-muted text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full\">\n <Icon className=\"size-4\" strokeWidth={2} />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-muted-foreground/75 text-xs font-bold tracking-widest uppercase\">\n {label}\n </div>\n <div\n className={`mt-0.5 ${valueClasses} text-sm font-medium ${isPlaceholder ? \"text-muted-foreground/55\" : \"text-foreground\"}`}\n >\n {display}\n </div>\n </div>\n </div>\n );\n}\n\nconst CARD_BRAND_LABEL: Record<string, string> = {\n amex: \"AMERICAN EXPRESS\",\n visa: \"VISA\",\n mastercard: \"MASTERCARD\",\n discover: \"DISCOVER\",\n diners: \"DINERS CLUB\",\n jcb: \"JCB\",\n unionpay: \"UNIONPAY\",\n};\n\nconst CARD_BRAND_BADGE: Record<string, string> = {\n amex: \"AMEX\",\n visa: \"VISA\",\n mastercard: \"MC\",\n discover: \"DISC\",\n diners: \"DC\",\n jcb: \"JCB\",\n unionpay: \"UPI\",\n};\n\nfunction PaymentCardVisual({\n method,\n onClick,\n}: {\n method: fluidPay.CustomerPaymentMethod;\n onClick: () => void;\n}): JSX.Element {\n const { t } = useProfileTranslation();\n const brand = (method.details.card_brand || \"\").toLowerCase();\n const brandLabel =\n CARD_BRAND_LABEL[brand] || (brand ? brand.toUpperCase() : \"CARD\");\n const badge = CARD_BRAND_BADGE[brand] || \"CARD\";\n const last4 = method.details.last_four ?? \"••••\";\n const expMonth = String(method.details.exp_month ?? \"\").padStart(2, \"0\");\n const expYear = String(method.details.exp_year ?? \"\").slice(-2);\n const exp = expMonth && expYear ? `${expMonth}/${expYear}` : \"\";\n const holder =\n method.details.card_holder || method.billing_address?.name || \"\";\n const badgeBg =\n brand === \"visa\"\n ? \"bg-[#1A1F71]\"\n : brand === \"mastercard\"\n ? \"bg-[#EB001B]\"\n : \"bg-[#0064D2]\";\n\n return (\n <button\n type=\"button\"\n onClick={onClick}\n className=\"group bg-foreground text-background ring-foreground/10 relative flex aspect-[1.586/1] flex-col justify-between overflow-hidden rounded-xl p-4 text-left shadow-sm ring-1 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-lg\"\n >\n <div\n aria-hidden\n className=\"absolute inset-0 bg-[repeating-linear-gradient(135deg,transparent_0px,transparent_22px,currentColor_22px,currentColor_24px)] opacity-[0.04]\"\n />\n <div className=\"relative flex items-start justify-between\">\n <div>\n <div className=\"text-background/50 text-xs font-semibold tracking-widest uppercase\">\n {brandLabel}\n </div>\n <div className=\"text-background mt-1 font-mono text-xl font-bold tracking-wider\">\n {last4}\n </div>\n </div>\n {method.default && (\n <span className=\"bg-background/10 text-background/80 rounded-md px-2 py-0.5 text-xs font-bold tracking-wider uppercase\">\n {t(\"default\")}\n </span>\n )}\n </div>\n <div className=\"relative flex items-end justify-between gap-2\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-background/40 text-xs font-semibold tracking-widest uppercase\">\n {t(\"cardholder\")}\n </div>\n <div className=\"text-background truncate text-xs font-semibold\">\n {holder || \" \"}\n </div>\n </div>\n <div>\n <div className=\"text-background/40 text-xs font-semibold tracking-widest uppercase\">\n {t(\"card_expires\")}\n </div>\n <div className=\"text-background font-mono text-xs font-semibold\">\n {exp}\n </div>\n </div>\n <div\n className={`shrink-0 rounded px-1.5 py-0.5 text-xs font-bold tracking-wider text-white ${badgeBg}`}\n >\n {badge}\n </div>\n </div>\n </button>\n );\n}\n\nfunction AddPaymentTile({ onClick }: { onClick: () => void }): JSX.Element {\n const { t } = useProfileTranslation();\n return (\n <button\n type=\"button\"\n onClick={onClick}\n className=\"group ring-dashed ring-border text-muted-foreground hover:bg-background hover:text-foreground flex aspect-[1.586/1] flex-col items-center justify-center gap-1.5 rounded-xl bg-transparent ring-1 transition-colors\"\n >\n <div className=\"ring-border flex size-9 items-center justify-center rounded-full bg-transparent ring-1\">\n <Plus className=\"size-4\" strokeWidth={2.25} />\n </div>\n <div className=\"text-foreground text-xs font-bold\">\n {t(\"add_payment_method\")}\n </div>\n <div className=\"text-muted-foreground/75 text-xs\">\n {t(\"accepted_cards\")}\n </div>\n </button>\n );\n}\n\nfunction AddressCard({\n address,\n onEdit,\n onDelete,\n}: {\n address: fluidPay.CustomerAddress;\n onEdit: () => void;\n onDelete?: () => void;\n}): JSX.Element {\n const { t } = useProfileTranslation();\n const label = address.name?.trim() || t(\"address\");\n const cityLine = [address.city, address.state, address.postal_code]\n .filter(Boolean)\n .join(\", \");\n return (\n <div className=\"ring-border hover:bg-muted focus-within:ring-foreground/40 relative flex flex-col rounded-2xl bg-transparent ring-1 transition-all duration-200 focus-within:ring-2 hover:ring-2\">\n <button\n type=\"button\"\n onClick={onEdit}\n className=\"flex w-full flex-col rounded-2xl p-4 pr-12 text-left focus-visible:outline-none\"\n >\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"flex items-center gap-2\">\n <div className=\"bg-muted flex size-8 items-center justify-center rounded-full\">\n <MapPin\n className=\"text-muted-foreground size-4\"\n strokeWidth={2}\n />\n </div>\n <div className=\"text-foreground text-sm font-bold\">{label}</div>\n </div>\n {address.default && (\n <span className=\"bg-primary text-primary-foreground rounded-md px-2 py-0.5 text-xs font-bold tracking-wider uppercase\">\n {t(\"default\")}\n </span>\n )}\n </div>\n <div className=\"text-foreground mt-3 space-y-0.5 text-sm leading-snug\">\n {address.address1 && <div>{address.address1}</div>}\n {address.address2 && <div>{address.address2}</div>}\n {cityLine && <div>{cityLine}</div>}\n {address.country_code && (\n <div className=\"text-muted-foreground\">{address.country_code}</div>\n )}\n </div>\n </button>\n {onDelete && (\n <div className=\"absolute top-2 right-2 z-10\">\n <EllipsesDropdown\n onEdit={onEdit}\n onDelete={onDelete}\n editLabel={t(\"edit\")}\n deleteLabel={t(\"delete\")}\n />\n </div>\n )}\n </div>\n );\n}\n\nfunction AddAddressTile({ onClick }: { onClick: () => void }): JSX.Element {\n const { t } = useProfileTranslation();\n return (\n <button\n type=\"button\"\n onClick={onClick}\n className=\"group ring-dashed ring-border text-muted-foreground hover:bg-background hover:text-foreground flex min-h-37 flex-col items-center justify-center gap-1.5 rounded-2xl bg-transparent ring-1 transition-colors\"\n >\n <div className=\"ring-border flex size-9 items-center justify-center rounded-full bg-transparent ring-1\">\n <Plus className=\"size-4\" strokeWidth={2.25} />\n </div>\n <div className=\"text-foreground text-sm font-bold\">\n {t(\"add_an_address\")}\n </div>\n </button>\n );\n}\n\ntype SocialKey =\n | \"linkedin\"\n | \"facebook\"\n | \"x\"\n | \"instagram\"\n | \"youtube\"\n | \"pinterest\"\n | \"tiktok\";\n\ninterface SocialEntry {\n key: SocialKey;\n label: string;\n icon: ComponentType<{ className?: string; strokeWidth?: number }>;\n placeholder: string;\n}\n\nconst SOCIAL_ENTRIES: readonly SocialEntry[] = [\n {\n key: \"linkedin\",\n label: \"LinkedIn\",\n icon: Linkedin,\n placeholder: \"linkedin.com/in/username\",\n },\n {\n key: \"facebook\",\n label: \"Facebook\",\n icon: Facebook,\n placeholder: \"facebook.com/username\",\n },\n { key: \"x\", label: \"X\", icon: Twitter, placeholder: \"x.com/username\" },\n {\n key: \"instagram\",\n label: \"Instagram\",\n icon: Instagram,\n placeholder: \"instagram.com/username\",\n },\n {\n key: \"youtube\",\n label: \"YouTube\",\n icon: Youtube,\n placeholder: \"youtube.com/@channel\",\n },\n {\n key: \"pinterest\",\n label: \"Pinterest\",\n icon: Globe,\n placeholder: \"pinterest.com/username\",\n },\n {\n key: \"tiktok\",\n label: \"TikTok\",\n icon: Globe,\n placeholder: \"tiktok.com/@username\",\n },\n] as const;\n\nfunction SocialRow({\n entry,\n handle,\n isLast,\n onConnect,\n}: {\n entry: SocialEntry;\n handle: string;\n isLast: boolean;\n onConnect: () => void;\n}): JSX.Element {\n const { t } = useProfileTranslation();\n const Icon = entry.icon;\n return (\n <div\n className={`flex items-center gap-3 px-4 py-3.5 ${isLast ? \"\" : \"border-border border-b\"}`}\n >\n <div className=\"bg-muted text-foreground flex size-9 shrink-0 items-center justify-center rounded-full\">\n <Icon className=\"size-4\" strokeWidth={2} />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"text-foreground text-sm font-bold\">{entry.label}</div>\n <div\n className={`truncate text-xs ${handle ? \"text-muted-foreground\" : \"text-muted-foreground/55\"}`}\n >\n {handle || entry.placeholder}\n </div>\n </div>\n <PillButton\n onClick={onConnect}\n icon={handle ? Pencil : Plus}\n label={handle ? t(\"edit\") : t(\"connect\")}\n />\n </div>\n );\n}\n\nexport type { SocialKey };\n","import { useCallback, useMemo, useState } from \"react\";\nimport { z } from \"zod\";\nimport { useMutation, useQuery, useQueryClient } from \"@tanstack/react-query\";\nimport {\n Button,\n Dialog,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Input,\n Label,\n useZodForm,\n} from \"@fluid-app/ui-primitives\";\nimport { useProfileTranslation } from \"@fluid-app/profile-core/translation-api-context\";\nimport type { Language, PointsLedger } from \"@fluid-app/profile-core\";\nimport {\n AddressFormDialog,\n ConfirmActionDialog,\n CreditCardFormDialog,\n EditPaymentMethodDialog,\n UserInfoDialog,\n socialFields,\n} from \"@fluid-app/profile-ui\";\nimport type {\n UserFormData,\n EditPaymentMethodFormData,\n CreditCardFormSubmitData,\n} from \"@fluid-app/profile-ui\";\nimport {\n FluidPayCoreProvider,\n type fluidPay,\n type State,\n} from \"@fluid-app/fluid-pay-core\";\nimport { TOKEN_PROVIDER_VGS } from \"@fluid-app/portal-core/pay-types\";\nimport type { PayAddress } from \"@fluid-app/portal-core/pay-types\";\nimport {\n createFluidPayApiAdapter,\n mapToFluidPayPaymentMethod,\n} from \"../adapters/fluid-pay-api-adapter\";\nimport type { AccountRep } from \"@fluid-app/portal-core/account-types\";\nimport { useAccountApi } from \"@fluid-app/portal-core/account-api-context\";\nimport { usePayApi } from \"@fluid-app/portal-core/pay-api-context\";\nimport {\n usePortalMySiteProfile,\n usePortalUpdateSettings,\n} from \"@fluid-app/mysite-ui/portal/hooks/use-mysite-portal\";\nimport { useCountriesApi } from \"@fluid-app/store-core/countries-api-context\";\nimport { useLanguagesApi } from \"@fluid-app/store-core/languages-api-context\";\nimport { AddressAutocompleteInput } from \"@fluid-app/address-autocomplete/components/AddressAutocompleteInput\";\nimport { useActiveLocale } from \"@fluid-app/i18n/locale-context\";\nimport { accountKeys, payKeys, storeKeys } from \"../account/query-keys\";\nimport { useAccount } from \"../hooks/use-account\";\nimport { deriveLastName } from \"./profile/derive-last-name\";\nimport { ProfileLayout, type SocialKey } from \"./profile/ProfileLayout\";\n\ninterface ProfileContentScreenProps {\n onToast: (message: string, type: \"success\" | \"error\" | \"warning\") => void;\n countryIso: string;\n}\n\nfunction mapAccountToCustomerAccount(\n raw: AccountRep,\n): fluidPay.CustomerAccount {\n return {\n fluid_pay_account: {\n id: raw.id,\n email: raw.email,\n address_count: 0,\n payment_methods_count: 0,\n language_iso: null,\n },\n customer: {\n id: raw.id,\n active: true,\n active_subscriptions_count: 0,\n display_total_spent: \"0\",\n email: raw.email,\n first_name: raw.first_name,\n full_name: `${raw.first_name} ${raw.last_name}`.trim(),\n inactive_subscriptions_count: 0,\n is_rep: raw.member_type === \"rep\",\n phone: raw.phone,\n orders_count: 0,\n },\n };\n}\n\nfunction composeAddressName(\n firstName: string,\n lastName: string,\n): string | null {\n const combined = `${firstName} ${lastName}`.trim();\n return combined.length > 0 ? combined : null;\n}\n\nfunction mapToFluidPayAddress(raw: PayAddress): fluidPay.CustomerAddress {\n return {\n id: raw.id,\n address1: raw.street1,\n address2: raw.street2,\n city: raw.city,\n country_code: raw.country,\n default: raw.default,\n name: raw.name,\n postal_code: raw.zip,\n state: raw.state,\n subdivision_code: null,\n };\n}\n\ntype SocialFieldKey = (typeof socialFields)[number][\"name\"];\n\nconst SOCIAL_KEY_TO_FIELD: Record<SocialKey, SocialFieldKey | null> = {\n linkedin: \"linkedin\" as SocialFieldKey,\n facebook: \"facebook\" as SocialFieldKey,\n x: \"twitter\" as SocialFieldKey,\n instagram: \"instagram\" as SocialFieldKey,\n youtube: \"youtube\" as SocialFieldKey,\n pinterest: null,\n tiktok: \"tiktok\" as SocialFieldKey,\n};\n\nconst SOCIAL_LABELS: Record<SocialKey, string> = {\n linkedin: \"LinkedIn\",\n facebook: \"Facebook\",\n x: \"X\",\n instagram: \"Instagram\",\n youtube: \"YouTube\",\n pinterest: \"Pinterest\",\n tiktok: \"TikTok\",\n};\n\nconst SOCIAL_PLACEHOLDERS: Record<SocialKey, string> = {\n linkedin: \"linkedin.com/in/username\",\n facebook: \"facebook.com/username\",\n x: \"x.com/username\",\n instagram: \"instagram.com/username\",\n youtube: \"youtube.com/@channel\",\n pinterest: \"pinterest.com/username\",\n tiktok: \"tiktok.com/@username\",\n};\n\nexport function ProfileContentScreen({\n onToast,\n countryIso,\n}: ProfileContentScreenProps): React.JSX.Element {\n const { t } = useProfileTranslation();\n const { locale } = useActiveLocale();\n const payApi = usePayApi();\n const accountApi = useAccountApi();\n const queryClient = useQueryClient();\n const fluidPayShim = useMemo(\n () => createFluidPayApiAdapter(payApi),\n [payApi],\n );\n\n const { data: mySiteProfile } = usePortalMySiteProfile();\n const updateMySiteSettingsMutation = usePortalUpdateSettings();\n\n const mySiteUrl = mySiteProfile?.mysite_url ?? \"\";\n const mySiteDisplayUrl = mySiteUrl\n ? mySiteUrl.replace(/^https?:\\/\\//, \"\")\n : \"\";\n const mySiteLastSlash = mySiteDisplayUrl.lastIndexOf(\"/\");\n const mySiteUrlPrefix =\n mySiteLastSlash >= 0 ? mySiteDisplayUrl.slice(0, mySiteLastSlash + 1) : \"\";\n const mySiteCurrentSlug =\n mySiteLastSlash >= 0\n ? mySiteDisplayUrl.slice(mySiteLastSlash + 1)\n : mySiteDisplayUrl;\n\n // Reuse the app-wide useAccount() cache entry shared with AppShell/PageRouter.\n const {\n data: accountRep,\n isLoading: isLoadingAccount,\n isError: isAccountError,\n } = useAccount();\n\n const accountData = useMemo(\n () => (accountRep ? mapAccountToCustomerAccount(accountRep) : undefined),\n [accountRep],\n );\n\n const { data: addressesData } = useQuery({\n queryKey: payKeys.addresses.list(),\n queryFn: async () => {\n const response = await payApi.fetchAddresses();\n return response.addresses.map(mapToFluidPayAddress);\n },\n enabled: true,\n });\n\n const { data: paymentMethodsData } = useQuery({\n queryKey: payKeys.paymentMethods.list(),\n queryFn: async () => {\n const response = await payApi.fetchPaymentMethods();\n return response.payment_methods.map(mapToFluidPayPaymentMethod);\n },\n enabled: true,\n });\n\n const countriesAdapter = useCountriesApi();\n const languagesAdapter = useLanguagesApi();\n\n const { data: countriesData } = useQuery({\n queryKey: storeKeys.countries(),\n queryFn: () => countriesAdapter.listCountries(),\n enabled: true,\n });\n\n const { data: languagesData } = useQuery({\n queryKey: storeKeys.languages(),\n queryFn: () => languagesAdapter.listLanguages(),\n enabled: true,\n });\n\n const { data: pointsLedgerData, isError: isPointsLedgerError } = useQuery({\n queryKey: payKeys.pointsLedgers.list(),\n queryFn: () => payApi.fetchPointsLedgers(),\n enabled: true,\n retry: (failureCount, error) => {\n if (\n error instanceof Error &&\n \"status\" in error &&\n (error as { status: number }).status === 403\n ) {\n return false;\n }\n return failureCount < 1;\n },\n });\n\n const rewardPointsEnabled = !isPointsLedgerError && pointsLedgerData != null;\n\n const adaptedPointsLedger: PointsLedger[] = useMemo(() => {\n return (pointsLedgerData?.points_ledgers ?? []).map((entry) => {\n const meta = entry.metadata as {\n transaction_type?: string | null;\n source?: {\n name: string;\n email?: string;\n reason?: string;\n user_id?: number;\n } | null;\n } | null;\n return {\n id: entry.id,\n amount: entry.amount,\n company_id: 0,\n created_at: entry.created_at,\n customer_id: 0,\n metadata: {\n transaction_type: meta?.transaction_type ?? undefined,\n source: meta?.source ?? undefined,\n },\n total_balance: entry.total_balance,\n updated_at: entry.created_at,\n };\n });\n }, [pointsLedgerData]);\n\n const updateCustomerMutation = useMutation({\n mutationFn: async (data: UserFormData) => {\n await accountApi.updateAccount({\n account: {\n first_name: data.first_name,\n last_name: data.last_name,\n phone: data.phone_number,\n bio: data.bio,\n },\n });\n },\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: accountKeys.all });\n onToast(t(\"profile_updated\"), \"success\");\n },\n onError: () => {\n onToast(t(\"failed_to_update_profile\"), \"error\");\n },\n });\n\n const deletePaymentMethodMutation = useMutation({\n mutationFn: (paymentMethodId: number) =>\n payApi.deletePaymentMethod(paymentMethodId),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: payKeys.paymentMethods.all,\n });\n },\n onError: () => {\n onToast(t(\"failed_to_delete_payment_method\"), \"error\");\n },\n });\n\n const updatePaymentMethodMutation = useMutation({\n mutationFn: ({\n paymentMethodId,\n data,\n }: {\n paymentMethodId: number;\n data: EditPaymentMethodFormData;\n }) =>\n payApi.updatePaymentMethod(paymentMethodId, {\n payment_method: {\n default: data.set_as_default,\n billing_address: {\n name: data.billing_address.name,\n street1: data.billing_address.address1,\n street2: data.billing_address.address2 ?? null,\n city: data.billing_address.city,\n state: data.billing_address.state,\n zip: data.billing_address.zip,\n country: data.billing_address.country_code,\n },\n },\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: payKeys.paymentMethods.all,\n });\n },\n onError: () => {\n onToast(t(\"failed_to_update_payment_method\"), \"error\");\n },\n });\n\n const createAddressMutation = useMutation({\n // Detect a server-side dedupe (POST /api/pay/addresses returns the existing\n // record when an identical address already exists, ignoring `name`). Snapshot\n // the current id set before the request and compare against the returned id.\n mutationFn: async (body: fluidPay.CreateAddressBody) => {\n const existingIds = new Set((addressesData ?? []).map((a) => a.id));\n const address = await payApi.createAddress({\n address: {\n name: composeAddressName(\n body.address.first_name,\n body.address.last_name,\n ),\n street1: body.address.address1,\n street2: body.address.address2,\n city: body.address.city,\n state: body.address.state,\n zip: body.address.postal_code,\n country: body.address.country_code,\n default: body.address.default,\n },\n });\n return { address, deduped: existingIds.has(address.id) };\n },\n onSuccess: ({ deduped }) => {\n queryClient.invalidateQueries({ queryKey: payKeys.addresses.all });\n if (deduped) {\n onToast(t(\"address_already_exists\"), \"warning\");\n } else {\n onToast(t(\"address_created\"), \"success\");\n }\n },\n onError: () => {\n onToast(t(\"failed_to_create_address\"), \"error\");\n },\n });\n\n const updateAddressMutation = useMutation({\n mutationFn: ({\n addressId,\n body,\n }: {\n addressId: number;\n body: fluidPay.CreateAddressBody;\n }) =>\n payApi.updateAddress(addressId, {\n address: {\n name: composeAddressName(\n body.address.first_name,\n body.address.last_name,\n ),\n street1: body.address.address1,\n street2: body.address.address2,\n city: body.address.city,\n state: body.address.state,\n zip: body.address.postal_code,\n country: body.address.country_code,\n default: body.address.default,\n },\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: payKeys.addresses.all });\n onToast(t(\"address_updated\"), \"success\");\n },\n onError: () => {\n onToast(t(\"failed_to_update_address\"), \"error\");\n },\n });\n\n const deleteAddressMutation = useMutation({\n mutationFn: (addressId: number) => payApi.deleteAddress(addressId),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: payKeys.addresses.all });\n onToast(t(\"address_deleted\"), \"success\");\n },\n onError: () => {\n onToast(t(\"failed_to_delete_address\"), \"error\");\n },\n });\n\n const addCreditCardMutation = useMutation({\n mutationFn: (data: CreditCardFormSubmitData) =>\n payApi.createPaymentMethod({\n payment_method: {\n type: \"card\",\n token: data.payment_method.token,\n token_provider: TOKEN_PROVIDER_VGS,\n exp_month: data.payment_method.exp_month,\n exp_year: data.payment_method.exp_year,\n cvv_token: data.payment_method.cvv_token,\n card_holder: data.payment_method.card_holder,\n default: data.set_as_default,\n },\n billing_address_id: data.billing_address_id,\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: payKeys.paymentMethods.all,\n });\n onToast(t(\"payment_method_added\"), \"success\");\n },\n onError: () => {\n onToast(t(\"failed_to_add_payment_method\"), \"error\");\n },\n });\n\n const addresses = addressesData ?? [];\n const paymentMethods = paymentMethodsData ?? [];\n\n const adaptedLanguages: Language[] = (languagesData?.languages ?? []).map(\n (l, i) => ({ id: i, name: l.name, iso: l.code }),\n );\n\n const countries = countriesData?.countries;\n\n const countryOptions = useMemo(\n () =>\n [...(countries ?? [])]\n .map((c) => ({ iso: c.code, name: c.name }))\n .sort((a, b) => a.name.localeCompare(b.name)),\n [countries],\n );\n\n const statesByCountry = useMemo(() => {\n const map = new Map<string, State[]>();\n for (const c of countries ?? []) {\n map.set(\n c.code,\n c.states.map((s) => ({ name: s.name, isoCode: s.code })),\n );\n }\n return map;\n }, [countries]);\n\n const fetchStatesFromCountries = useCallback(\n (countryCode: string): Promise<State[]> =>\n Promise.resolve(statesByCountry.get(countryCode) ?? []),\n [statesByCountry],\n );\n\n // Dialog open state\n const [isInfoDialogOpen, setIsInfoDialogOpen] = useState(false);\n const [addressDialog, setAddressDialog] = useState<{\n open: boolean;\n selected: fluidPay.CustomerAddress | null;\n }>({ open: false, selected: null });\n const [deletingAddress, setDeletingAddress] =\n useState<fluidPay.CustomerAddress | null>(null);\n const [isAddCardOpen, setIsAddCardOpen] = useState(false);\n const [editPaymentMethod, setEditPaymentMethod] =\n useState<fluidPay.CustomerPaymentMethod | null>(null);\n\n // User-info form (for the existing dialog)\n const userInfoLanguage = useMemo(() => {\n return (\n adaptedLanguages.find(\n (l) => l.iso === accountData?.fluid_pay_account.language_iso,\n )?.name ?? \"\"\n );\n }, [adaptedLanguages, accountData]);\n\n const derivedLastName = useMemo(() => {\n if (!accountData) return \"\";\n const { first_name, full_name } = accountData.customer;\n return deriveLastName(first_name, full_name);\n }, [accountData]);\n\n const userInfoSchema = useMemo(\n () =>\n z.object({\n first_name: z.string().min(1, t(\"first_name_is_required\")),\n last_name: z.string().min(1, t(\"last_name_is_required\")),\n phone_number: z.string().optional(),\n language: z.string().min(1, t(\"language_is_required\")),\n bio: z.string().optional(),\n }),\n [t],\n );\n\n const userInfoForm = useZodForm<UserFormData>(userInfoSchema, {\n defaultValues: {\n first_name: accountData?.customer.first_name ?? \"\",\n last_name: derivedLastName,\n phone_number: accountData?.customer.phone ?? \"\",\n language: userInfoLanguage,\n bio: accountRep?.bio ?? \"\",\n },\n });\n\n const handleOpenInfoDialog = useCallback(() => {\n userInfoForm.reset({\n first_name: accountData?.customer.first_name ?? \"\",\n last_name: derivedLastName,\n phone_number: accountData?.customer.phone ?? \"\",\n language: userInfoLanguage,\n bio: accountRep?.bio ?? \"\",\n });\n setIsInfoDialogOpen(true);\n }, [\n accountData,\n accountRep,\n derivedLastName,\n userInfoLanguage,\n userInfoForm,\n ]);\n\n const onSubmitUserInfo = userInfoForm.handleSubmit(async (data) => {\n try {\n await updateCustomerMutation.mutateAsync(data);\n setIsInfoDialogOpen(false);\n } catch {\n // toast surfaced via onError\n }\n });\n\n const socialLinks = useMemo<Partial<Record<SocialKey, string>>>(() => {\n const src: Partial<Record<SocialFieldKey, string>> =\n accountRep?.social_links ?? {};\n const result: Partial<Record<SocialKey, string>> = {};\n for (const [key, field] of Object.entries(SOCIAL_KEY_TO_FIELD) as [\n SocialKey,\n SocialFieldKey | null,\n ][]) {\n if (!field) continue;\n const v = src[field];\n if (typeof v === \"string\" && v.length > 0) {\n result[key] = v;\n }\n }\n return result;\n }, [accountRep]);\n\n const handleCopyMySiteLink = useCallback(async () => {\n if (!mySiteUrl) return;\n try {\n await navigator.clipboard.writeText(mySiteUrl);\n onToast(t(\"mysite_link_copied\"), \"success\");\n } catch {\n onToast(t(\"failed_to_copy_link\"), \"error\");\n }\n }, [mySiteUrl, onToast, t]);\n\n const [isEditMySiteLinkOpen, setIsEditMySiteLinkOpen] = useState(false);\n const [mySiteSlugDraft, setMySiteSlugDraft] = useState(\"\");\n\n const handleOpenEditMySiteLink = useCallback(() => {\n setMySiteSlugDraft(mySiteCurrentSlug);\n setIsEditMySiteLinkOpen(true);\n }, [mySiteCurrentSlug]);\n\n const handleSubmitMySiteLink = useCallback(async () => {\n const trimmed = mySiteSlugDraft.trim();\n if (!trimmed) {\n onToast(t(\"mysite_link_empty\"), \"error\");\n return;\n }\n if (trimmed === mySiteCurrentSlug) {\n setIsEditMySiteLinkOpen(false);\n return;\n }\n try {\n await updateMySiteSettingsMutation.mutateAsync({ slug: trimmed });\n onToast(t(\"mysite_link_updated\"), \"success\");\n setIsEditMySiteLinkOpen(false);\n } catch {\n onToast(t(\"failed_to_update_mysite_link\"), \"error\");\n }\n }, [\n mySiteSlugDraft,\n mySiteCurrentSlug,\n updateMySiteSettingsMutation,\n onToast,\n t,\n ]);\n\n const [editingSocial, setEditingSocial] = useState<SocialKey | null>(null);\n const [socialDraft, setSocialDraft] = useState(\"\");\n\n const handleConnectSocial = useCallback(\n (key: SocialKey) => {\n const field = SOCIAL_KEY_TO_FIELD[key];\n if (!field) {\n onToast(t(\"platform_not_editable\"), \"warning\");\n return;\n }\n const current = accountRep?.social_links?.[field] ?? \"\";\n setSocialDraft(current);\n setEditingSocial(key);\n },\n [accountRep, onToast, t],\n );\n\n const updateSocialMutation = useMutation({\n mutationFn: async ({\n field,\n value,\n }: {\n field: SocialFieldKey;\n value: string;\n }) => {\n const current = accountRep?.social_links ?? {};\n await accountApi.updateAccount({\n account: {\n social_links: { ...current, [field]: value },\n },\n });\n },\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: accountKeys.all });\n onToast(t(\"social_link_updated\"), \"success\");\n },\n onError: () => {\n onToast(t(\"failed_to_update_social_link\"), \"error\");\n },\n });\n\n const handleSubmitSocial = useCallback(async () => {\n if (!editingSocial) return;\n const field = SOCIAL_KEY_TO_FIELD[editingSocial];\n if (!field) return;\n await updateSocialMutation.mutateAsync({\n field,\n value: socialDraft.trim(),\n });\n setEditingSocial(null);\n }, [editingSocial, socialDraft, updateSocialMutation]);\n\n if (isAccountError && !isLoadingAccount) {\n return (\n <div className=\"px-4 py-8 sm:px-9\">\n <div className=\"text-muted-foreground text-center text-sm\">\n {t(\"unable_to_load_account\")}\n </div>\n </div>\n );\n }\n\n if (isLoadingAccount || !accountData || !accountRep) {\n return (\n <div className=\"px-4 pt-4 sm:px-9 md:pt-8\">\n <div className=\"space-y-4\">\n <div className=\"bg-muted h-16 animate-pulse rounded\" />\n <div className=\"bg-muted h-32 animate-pulse rounded\" />\n <div className=\"bg-muted h-32 animate-pulse rounded\" />\n </div>\n </div>\n );\n }\n\n const pointsBalance = rewardPointsEnabled\n ? (pointsLedgerData?.points_ledgers?.[0]?.total_balance ?? 0)\n : undefined;\n\n return (\n <FluidPayCoreProvider api={fluidPayShim}>\n <ProfileLayout\n account={accountRep}\n pointsBalance={pointsBalance}\n pointsLedger={adaptedPointsLedger}\n rewardsEnabled={rewardPointsEnabled}\n addresses={addresses}\n paymentMethods={paymentMethods}\n mySiteDisplayUrl={mySiteDisplayUrl}\n socialLinks={socialLinks}\n onEditPersonalInfo={handleOpenInfoDialog}\n onAddAddress={() => setAddressDialog({ open: true, selected: null })}\n onEditAddress={(address) =>\n setAddressDialog({ open: true, selected: address })\n }\n onDeleteAddress={(address) => setDeletingAddress(address)}\n onAddPaymentMethod={() => setIsAddCardOpen(true)}\n onEditPaymentMethod={(pm) => setEditPaymentMethod(pm)}\n onCopyMySiteLink={handleCopyMySiteLink}\n onEditMySiteLink={handleOpenEditMySiteLink}\n onConnectSocial={handleConnectSocial}\n />\n\n <UserInfoDialog\n control={userInfoForm.control}\n isOpen={isInfoDialogOpen}\n onSubmit={onSubmitUserInfo}\n handleClose={() => setIsInfoDialogOpen(false)}\n languageOptions={adaptedLanguages.map((l) => ({\n name: l.name,\n value: l.name,\n }))}\n errorMsg={undefined}\n isSubmitting={updateCustomerMutation.isPending}\n email={accountRep.email ?? \"\"}\n />\n\n <AddressFormDialog\n isOpen={addressDialog.open}\n onClose={() => setAddressDialog({ open: false, selected: null })}\n selectedAddress={addressDialog.selected}\n defaultCountry={\n addresses.find((a) => a.default)?.country_code ?? countryIso\n }\n languageIso={locale}\n t={(key: string) => t(key as never)}\n onSubmit={async (formData) => {\n if (addressDialog.selected) {\n await updateAddressMutation.mutateAsync({\n addressId: addressDialog.selected.id,\n body: formData,\n });\n } else {\n await createAddressMutation.mutateAsync(formData);\n }\n setAddressDialog({ open: false, selected: null });\n }}\n isSubmitting={\n createAddressMutation.isPending || updateAddressMutation.isPending\n }\n onDelete={\n addressDialog.selected && !addressDialog.selected.default\n ? async () => {\n if (!addressDialog.selected) return;\n try {\n await deleteAddressMutation.mutateAsync(\n addressDialog.selected.id,\n );\n setAddressDialog({ open: false, selected: null });\n } catch {\n // toast surfaced via onError\n }\n }\n : undefined\n }\n isDeleting={deleteAddressMutation.isPending}\n countries={countryOptions}\n fetchStates={fetchStatesFromCountries}\n renderAddressAutocomplete={({ control, setValue, countryCode }) => (\n <AddressAutocompleteInput\n control={control}\n setValue={setValue}\n countryIso={countryCode}\n addressLineField=\"address1\"\n cityField=\"city\"\n stateField=\"state\"\n postalCodeField=\"postal_code\"\n placeholder={t(\"address_line_1\")}\n />\n )}\n />\n\n <ConfirmActionDialog\n title={t(\"delete_address\")}\n description={t(\"delete_address_message\")}\n openDialog={deletingAddress !== null}\n setOpenDialog={(open) => {\n if (!open) setDeletingAddress(null);\n }}\n onAction={async () => {\n if (!deletingAddress) return;\n try {\n await deleteAddressMutation.mutateAsync(deletingAddress.id);\n setDeletingAddress(null);\n } catch {\n // toast surfaced via onError\n }\n }}\n isLoading={deleteAddressMutation.isPending}\n actionText={t(\"delete\")}\n />\n\n <CreditCardFormDialog\n isOpen={isAddCardOpen}\n onClose={() => setIsAddCardOpen(false)}\n t={(key: string) => t(key as never)}\n onSubmit={async (data) => {\n try {\n await addCreditCardMutation.mutateAsync(data);\n setIsAddCardOpen(false);\n } catch {\n // toast surfaced via onError\n }\n }}\n isSubmitting={addCreditCardMutation.isPending}\n jwt=\"\"\n savedAddresses={addresses}\n defaultBillingAddressId={addresses.find((a) => a.default)?.id}\n renderAddressFormDialog={({ isOpen, onClose, onAddressCreated }) => (\n <AddressFormDialog\n isOpen={isOpen}\n onClose={onClose}\n selectedAddress={null}\n onSubmit={async (data) => {\n try {\n const { address } =\n await createAddressMutation.mutateAsync(data);\n onAddressCreated(mapToFluidPayAddress(address));\n } catch {\n // toast surfaced via onError\n }\n }}\n isSubmitting={createAddressMutation.isPending}\n countries={countryOptions}\n fetchStates={fetchStatesFromCountries}\n languageIso={locale}\n t={(key: string) => t(key as never)}\n renderAddressAutocomplete={({ control, setValue, countryCode }) => (\n <AddressAutocompleteInput\n control={control}\n setValue={setValue}\n countryIso={countryCode}\n addressLineField=\"address1\"\n cityField=\"city\"\n stateField=\"state\"\n postalCodeField=\"postal_code\"\n placeholder={t(\"address_line_1\")}\n />\n )}\n />\n )}\n />\n\n {editPaymentMethod && (\n <EditPaymentMethodDialog\n isOpen\n onClose={() => setEditPaymentMethod(null)}\n paymentMethod={editPaymentMethod}\n billingAddress={editPaymentMethod.billing_address}\n countries={countryOptions}\n onSubmit={(data) => {\n updatePaymentMethodMutation.mutate(\n { paymentMethodId: editPaymentMethod.id, data },\n { onSuccess: () => setEditPaymentMethod(null) },\n );\n }}\n isSubmitting={updatePaymentMethodMutation.isPending}\n onDelete={() => {\n deletePaymentMethodMutation.mutate(editPaymentMethod.id, {\n onSuccess: () => setEditPaymentMethod(null),\n });\n }}\n isDeleting={deletePaymentMethodMutation.isPending}\n />\n )}\n\n <Dialog\n open={isEditMySiteLinkOpen}\n onOpenChange={(open) => {\n if (!open && updateMySiteSettingsMutation.isPending) return;\n setIsEditMySiteLinkOpen(open);\n }}\n >\n <DialogContent className=\"max-w-sm md:max-w-md\">\n <DialogHeader>\n <DialogTitle>{t(\"edit_link\")}</DialogTitle>\n </DialogHeader>\n <div className=\"space-y-2 pt-2\">\n <Label\n htmlFor=\"mysite-slug\"\n className=\"mb-1.5 block text-sm font-medium\"\n >\n {t(\"your_mysite_link\")}\n </Label>\n <div className=\"ring-border focus-within:ring-foreground/40 flex items-center gap-1 rounded-md bg-transparent px-3 py-2 ring-1 transition-all focus-within:ring-2\">\n {mySiteUrlPrefix && (\n <span className=\"text-muted-foreground shrink-0 text-sm\">\n {mySiteUrlPrefix}\n </span>\n )}\n <Input\n id=\"mysite-slug\"\n value={mySiteSlugDraft}\n onChange={(e) => setMySiteSlugDraft(e.target.value)}\n onKeyDown={(e) => {\n if (\n e.key === \"Enter\" &&\n !updateMySiteSettingsMutation.isPending\n ) {\n e.preventDefault();\n void handleSubmitMySiteLink();\n }\n }}\n className=\"h-auto min-w-0 flex-1 border-0 p-0 shadow-none focus-visible:ring-0\"\n autoFocus\n />\n </div>\n </div>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => setIsEditMySiteLinkOpen(false)}\n disabled={updateMySiteSettingsMutation.isPending}\n >\n {t(\"cancel\")}\n </Button>\n <Button\n type=\"button\"\n onClick={() => {\n void handleSubmitMySiteLink();\n }}\n disabled={updateMySiteSettingsMutation.isPending}\n >\n {updateMySiteSettingsMutation.isPending ? t(\"saving\") : t(\"save\")}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n\n <Dialog\n open={editingSocial !== null}\n onOpenChange={(open) => !open && setEditingSocial(null)}\n >\n <DialogContent className=\"max-w-sm md:max-w-md\">\n <DialogHeader>\n <DialogTitle>\n {editingSocial\n ? t(\"edit_platform_link\", {\n platform: SOCIAL_LABELS[editingSocial] ?? \"\",\n })\n : t(\"edit_social_link\")}\n </DialogTitle>\n </DialogHeader>\n <div className=\"space-y-2 pt-2\">\n <Label\n htmlFor=\"social-handle\"\n className=\"mb-1.5 block text-sm font-medium\"\n >\n {t(\"url\")}\n </Label>\n <Input\n id=\"social-handle\"\n value={socialDraft}\n onChange={(e) => setSocialDraft(e.target.value)}\n placeholder={\n editingSocial ? SOCIAL_PLACEHOLDERS[editingSocial] : \"\"\n }\n onKeyDown={(e) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n void handleSubmitSocial();\n }\n }}\n autoFocus\n />\n </div>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => setEditingSocial(null)}\n disabled={updateSocialMutation.isPending}\n >\n {t(\"cancel\")}\n </Button>\n <Button\n type=\"button\"\n onClick={() => {\n void handleSubmitSocial();\n }}\n disabled={updateSocialMutation.isPending}\n >\n {updateSocialMutation.isPending ? t(\"saving\") : t(\"save\")}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </FluidPayCoreProvider>\n );\n}\n","import type { ComponentProps } from \"react\";\nimport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbPage,\n fluidToast,\n} from \"@fluid-app/ui-primitives\";\nimport { ScreenHeaderBreadcrumbs } from \"@fluid-app/portal-react/shell/ScreenHeaderContext\";\nimport { useProfileTranslation } from \"@fluid-app/profile-core/translation-api-context\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { useFluidContext } from \"../providers/FluidProvider\";\nimport { ProfileTranslationBridge } from \"../providers/ProfileTranslationBridge\";\nimport { ProfileContentScreen } from \"./ProfileContentScreen\";\n\ntype ProfileScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n onToast?: (message: string, type: \"success\" | \"error\" | \"warning\") => void;\n};\n\nfunction defaultToast(message: string, type: \"success\" | \"error\" | \"warning\") {\n fluidToast({ title: message, type });\n}\n\nexport function ProfileScreen({\n onToast,\n /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */\n background,\n textColor,\n accentColor,\n padding,\n borderRadius,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...divProps\n}: ProfileScreenProps): React.JSX.Element {\n const { config } = useFluidContext();\n const effectiveToast = onToast ?? defaultToast;\n const countryIso = config.countryIso ?? \"US\";\n\n return (\n <ProfileTranslationBridge>\n <ProfileScreenContent\n onToast={effectiveToast}\n countryIso={countryIso}\n divProps={divProps}\n />\n </ProfileTranslationBridge>\n );\n}\n\nfunction ProfileScreenContent({\n onToast,\n countryIso,\n divProps,\n}: {\n onToast: (message: string, type: \"success\" | \"error\" | \"warning\") => void;\n countryIso: string;\n divProps: ComponentProps<\"div\">;\n}): React.JSX.Element {\n const { t } = useProfileTranslation();\n\n return (\n <>\n <ScreenHeaderBreadcrumbs>\n <Breadcrumb>\n <BreadcrumbList className=\"text-lg\">\n <BreadcrumbItem>\n <BreadcrumbPage className=\"font-semibold\">\n {t(\"breadcrumb\")}\n </BreadcrumbPage>\n </BreadcrumbItem>\n </BreadcrumbList>\n </Breadcrumb>\n </ScreenHeaderBreadcrumbs>\n <div {...divProps}>\n <ProfileContentScreen onToast={onToast} countryIso={countryIso} />\n </div>\n </>\n );\n}\n\nexport const profileScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ProfileScreen\",\n displayName: \"Profile Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAgB,eAAe,WAAmB,UAA0B;AAC1E,KAAI,CAAC,UAAW,QAAO;CACvB,MAAM,SAAS,GAAG,UAAU;AAC5B,QAAO,SAAS,WAAW,OAAO,GAAG,SAAS,MAAM,OAAO,OAAO,GAAG;;;;ACkDvE,SAAgB,cAAc,OAAwC;CACpE,MAAM,EAAE,MAAMA,iCAAAA,uBAAuB;CACrC,MAAM,EACJ,SACA,eACA,cACA,gBACA,WACA,gBACA,kBACA,aACA,oBACA,cACA,eACA,iBACA,oBACA,qBACA,kBACA,kBACA,iBACA,cACE;CAEJ,MAAM,WACJ,GAAG,QAAQ,cAAc,GAAG,GAAG,QAAQ,aAAa,KAAK,MAAM;CAEjE,MAAM,eADiB,QAAQ,cAAc,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,MAEhD,QAAQ,OAAO,MAAM,IAAI,CAAC,MAAM,EAAE,mBAAmB;CACxE,MAAM,uBAAuB,OAAO,OAAO,YAAY,CAAC,QACrD,MAAM,OAAO,MAAM,YAAY,EAAE,SAAS,EAC5C,CAAC;CACF,MAAM,CAAC,qBAAqB,2BAAA,GAAA,MAAA,UAAmC,MAAM;CACrE,MAAM,uBAAuB;CAC7B,MAAM,SAAS,gBAAgB,EAAE;CACjC,MAAM,gBAAgB,OAAO,MAAM,GAAG,qBAAqB;CAC3D,MAAM,gBAAgB,OAAO,SAAS;AAEtC,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,WAAU;YACb,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAK,WAAU;aAAf;IAEE,iBAAA,GAAA,kBAAA,MAAC,WAAD;KAAS,WAAU;eAAnB;MACE,iBAAA,GAAA,kBAAA,KAAC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