@abtnode/webapp 1.16.53-beta-20251013-005429-ca3b05de → 1.16.53-beta-20251013-075536-64fcb94b

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 (189) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-wz3uJn5Q.js → AdapterDayjs-DAwAM0K6.js} +1 -1
  4. package/dist/assets/{Add-Cous1ji5.js → Add-B6Cmlfcj.js} +1 -1
  5. package/dist/assets/ArrowDropDown-BoUvFSCc.js +1 -0
  6. package/dist/assets/{Autocomplete-rgPa6avl.js → Autocomplete-BVNyvv5G.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-BkQr1wmD.js → Breadcrumbs-Bt32Cc6o.js} +1 -1
  8. package/dist/assets/{ButtonGroup-8swvzNFE.js → ButtonGroup-BVtAFOxJ.js} +1 -1
  9. package/dist/assets/{CSSTransition-BoWO2BoO.js → CSSTransition-DDXf56QN.js} +1 -1
  10. package/dist/assets/{CallMerge-anZI78Di.js → CallMerge-BHqPVVEo.js} +1 -1
  11. package/dist/assets/{CardContent-DNK9-zja.js → CardContent-uQgjkzlO.js} +1 -1
  12. package/dist/assets/{ChevronLeft-CJzdK2eh.js → ChevronLeft-DI9gCcNA.js} +1 -1
  13. package/dist/assets/{ChevronRight-DLMDPIak.js → ChevronRight-MzIjPo02.js} +1 -1
  14. package/dist/assets/{Clear-DgL5cnLN.js → Clear-DZ2ckQwi.js} +1 -1
  15. package/dist/assets/{DeleteOutline-BJandZby.js → DeleteOutline-J28xWbg8.js} +1 -1
  16. package/dist/assets/{Done-C1929K34.js → Done-BMzuk3oe.js} +1 -1
  17. package/dist/assets/{Edit-CQdeHbZ-.js → Edit-C97KDLkZ.js} +1 -1
  18. package/dist/assets/{ErrorOutline-4kGDns30.js → ErrorOutline-B7uA5ni5.js} +1 -1
  19. package/dist/assets/{FilterList-DcRJLB8M.js → FilterList-DTo_uDHm.js} +1 -1
  20. package/dist/assets/{Google-CWXy-_sb.js → Google-BoK7t5mi.js} +1 -1
  21. package/dist/assets/{HelpOutline-UUyOHo3U.js → HelpOutline-CWnQgCme.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-CgD9B0AF.js → KeyboardArrowDown-DBfKbamv.js} +1 -1
  23. package/dist/assets/{Launch-CryEv1ts.js → Launch-Bztlqboi.js} +1 -1
  24. package/dist/assets/{Link-Dk7IQFgE.js → Link-C1APq_2U.js} +1 -1
  25. package/dist/assets/{ListItemButton-B2QtbVrs.js → ListItemButton-LEdwxWwG.js} +1 -1
  26. package/dist/assets/{ListSubheader-BNX9gO02.js → ListSubheader-Dgw2hpKF.js} +1 -1
  27. package/dist/assets/{LoadingButton-D7vBmBXb.js → LoadingButton-Xh0qplXY.js} +1 -1
  28. package/dist/assets/{MoreVert-D4eir2r_.js → MoreVert-D94k9YTF.js} +1 -1
  29. package/dist/assets/{OpenInNew-BRfvIkPw.js → OpenInNew-fCTiIooX.js} +1 -1
  30. package/dist/assets/{Refresh-CEzviXq3.js → Refresh-BJgI71LN.js} +1 -1
  31. package/dist/assets/{Search-CJFu7Gaf.js → Search-D6dHxdTz.js} +1 -1
  32. package/dist/assets/{Stepper-JC9uh-tv.js → Stepper-C1Gn5a0M.js} +1 -1
  33. package/dist/assets/{Switch-D89bFzHz.js → Switch-9q8pyvkx.js} +1 -1
  34. package/dist/assets/{TableSearch-I0DQoJkT.js → TableSearch-Dgi91c1v.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-B4BB2eWk.js → ToggleButtonGroup-DQOUtUuo.js} +1 -1
  36. package/dist/assets/{UnfoldMore-Bi3VKM-P.js → UnfoldMore-uBcvQq1x.js} +1 -1
  37. package/dist/assets/{Verified-CNu8DyFD.js → Verified-BuOA2crV.js} +1 -1
  38. package/dist/assets/{VerifiedUser-Du1UW169.js → VerifiedUser-mcj_Y-5G.js} +1 -1
  39. package/dist/assets/{ViewList-CJ3pgiPv.js → ViewList-OCDsP8cv.js} +1 -1
  40. package/dist/assets/{_createAggregator-BrIYaxG5.js → _createAggregator-DAT8Viut.js} +1 -1
  41. package/dist/assets/{actions-qegZDW8a.js → actions-DPKf8S9T.js} +1 -1
  42. package/dist/assets/{actions-DiTDvakV.js → actions-wotb2et1.js} +1 -1
  43. package/dist/assets/{agreement-DYlE38yc.js → agreement-aV7npJLg.js} +1 -1
  44. package/dist/assets/api-DxkowFdp.js +1 -0
  45. package/dist/assets/{appearance-DMbZwb6t.js → appearance-DWpfQpUj.js} +1 -1
  46. package/dist/assets/{audit-logs-DypXoccn.js → audit-logs-DB76amdV.js} +1 -1
  47. package/dist/assets/{base-chart-BIsr5drw.js → base-chart-Dul1bHFm.js} +1 -1
  48. package/dist/assets/{blocklet-B517W-Ua.js → blocklet-D-C5_KT8.js} +1 -1
  49. package/dist/assets/{chain-DPDA2EQ2.js → chain-Cvasl9tr.js} +1 -1
  50. package/dist/assets/{click-to-copy-3JN8Y4Er.js → click-to-copy-DbbdyQLf.js} +1 -1
  51. package/dist/assets/client-DfQFJpJj.js +1 -0
  52. package/dist/assets/cloneDeep-CQjbyzNM.js +1 -0
  53. package/dist/assets/{collapse-BKLgvOSl.js → collapse-q4qT0dbm.js} +1 -1
  54. package/dist/assets/{config-navigation-BFkTbhwh.js → config-navigation-B0gxInyZ.js} +3 -3
  55. package/dist/assets/{connect-to-eFzWXxED.js → connect-to-Cajtuexr.js} +1 -1
  56. package/dist/assets/{cssMode-DkRpF_PR.js → cssMode-BmYUsRkQ.js} +1 -1
  57. package/dist/assets/{delete-confirm-CDl-fsIJ.js → delete-confirm-C0C9XNsZ.js} +1 -1
  58. package/dist/assets/{depsEqual-CSi6TcQv.js → depsEqual-BeaaXuRW.js} +1 -1
  59. package/dist/assets/{detail-Duk87a8e.js → detail-D1lWN5Ov.js} +3 -3
  60. package/dist/assets/{domains-CyLqrsuU.js → domains-DB1ZMdkE.js} +1 -1
  61. package/dist/assets/{download-C0UDp2VI.js → download-BjoLmfJN.js} +1 -1
  62. package/dist/assets/{edit.svg-BePrNRJc.js → edit.svg-But1Ec9v.js} +1 -1
  63. package/dist/assets/emotion-cache.browser.esm-Coyusglz.js +1 -0
  64. package/dist/assets/engine-D07huK5X.js +1 -0
  65. package/dist/assets/{freemarker2-D5qOoEBh.js → freemarker2-CRZrhFWr.js} +1 -1
  66. package/dist/assets/{get-safe-url-CUMicCqh.js → get-safe-url-OqBkbBpm.js} +1 -1
  67. package/dist/assets/getValidReactChildren-w4iI7cES.js +1 -0
  68. package/dist/assets/{graphqlMode-BiufiH9I.js → graphqlMode-DtS8CEe7.js} +2 -2
  69. package/dist/assets/{handlebars-C0jC6CCl.js → handlebars-Ck8T285E.js} +1 -1
  70. package/dist/assets/{html-CFsvvZoo.js → html-CSSlD3Xg.js} +1 -1
  71. package/dist/assets/{html-title-DVCSq6YQ.js → html-title-DrqnIfa0.js} +1 -1
  72. package/dist/assets/{htmlMode-CosfhNHV.js → htmlMode-z3pM18ce.js} +1 -1
  73. package/dist/assets/{iframe-D0APLep4.js → iframe-CxoFl3Ji.js} +1 -1
  74. package/dist/assets/{index-DBBnAIQs.js → index-2PDbQPH-.js} +1 -1
  75. package/dist/assets/{index-NuRrhPxS.js → index-3I7DyqhO.js} +1 -1
  76. package/dist/assets/{index-CbcxUqJf.js → index-8awDbg2D.js} +1 -1
  77. package/dist/assets/{index-C-oEFt7E.js → index-B0C2IZV3.js} +1 -1
  78. package/dist/assets/{index-iKywF7nl.js → index-BActWdb3.js} +1 -1
  79. package/dist/assets/index-BOFfy5T3.js +1 -0
  80. package/dist/assets/{index-DufKOlby.js → index-BTWstm49.js} +1 -1
  81. package/dist/assets/{index-p_tMzvnc.js → index-BWZUApiO.js} +1 -1
  82. package/dist/assets/{index-BeysmFqb.js → index-BYq_Oo0p.js} +1 -1
  83. package/dist/assets/{index-XPz8QVj4.js → index-BhhDAIQM.js} +1 -1
  84. package/dist/assets/{index-14CzihO_.js → index-Bj4af6TP.js} +1 -1
  85. package/dist/assets/{index-BFsyziHN.js → index-BwBVntP8.js} +1 -1
  86. package/dist/assets/{index-CwJ8EMCg.js → index-BxqUg2fc.js} +1 -1
  87. package/dist/assets/{index-r-glRWC4.js → index-C176ZrGY.js} +1 -1
  88. package/dist/assets/{index-WMqkdikj.js → index-C30ZGfpc.js} +1 -1
  89. package/dist/assets/{index-DPFLhZbE.js → index-C37AcqWN.js} +3 -3
  90. package/dist/assets/{index-BNZdZk2f.js → index-C6TQlck4.js} +1 -1
  91. package/dist/assets/{index-Bp3J1Bje.js → index-C8X0heNm.js} +9 -9
  92. package/dist/assets/{index-djmnhckV.js → index-CAdkJIOq.js} +1 -1
  93. package/dist/assets/{index-D8YITHzH.js → index-CBC_Wer9.js} +1 -1
  94. package/dist/assets/{index-C6h7Wn7k.js → index-CDHgI8H6.js} +2 -2
  95. package/dist/assets/{index-BOhdDUAw.js → index-CHw20FOr.js} +1 -1
  96. package/dist/assets/{index-OLtm4Vax.js → index-CN6Iz54D.js} +1 -1
  97. package/dist/assets/{index-DYwPfkqM.js → index-COqTHOsy.js} +1 -1
  98. package/dist/assets/{index-CHCOmcv5.js → index-CRA-E7vT.js} +3 -3
  99. package/dist/assets/{index-vAWTvgNz.js → index-Cjuq6jzz.js} +1 -1
  100. package/dist/assets/{index-C0-id_9j.js → index-CoPxD0IK.js} +1 -1
  101. package/dist/assets/{index-DRg3WiNb.js → index-D0FQ0PBW.js} +1 -1
  102. package/dist/assets/{index-DxNJKgOf.js → index-D2L3x-3e.js} +1 -1
  103. package/dist/assets/{index-DMT33Ol-.js → index-D9xx6dQg.js} +1 -1
  104. package/dist/assets/{index-B3tyE5tE.js → index-DDKKzJTd.js} +1 -1
  105. package/dist/assets/{index-0z8Wehkl.js → index-DNbMr0g9.js} +1 -1
  106. package/dist/assets/{index-DvuAChUi.js → index-DP8ZYeBn.js} +1 -1
  107. package/dist/assets/{index-CDcSsFCi.js → index-DQlx7R92.js} +1 -1
  108. package/dist/assets/index-DbnnEsWg.js +602 -0
  109. package/dist/assets/{index-Bae9JCD5.js → index-DkoZJLPb.js} +1 -1
  110. package/dist/assets/{index-BP2ItssN.js → index-Dx67tLI6.js} +1 -1
  111. package/dist/assets/{index-Dt6-hLLE.js → index-DxYmU62h.js} +1 -1
  112. package/dist/assets/{index-8dO6vHSp.js → index-Goo6Xm5g.js} +1 -1
  113. package/dist/assets/{index-BelkuInn.js → index-IFtqR9kB.js} +1 -1
  114. package/dist/assets/{index-CazcQIXS.js → index-UbWS86BP.js} +1 -1
  115. package/dist/assets/{index-DFYle5Dx.js → index-Uh9lnr1l.js} +3 -3
  116. package/dist/assets/{index-z2Pq7re4.js → index-aH2GqWbS.js} +3 -3
  117. package/dist/assets/{index-D82JKtTS.js → index-cqbphrGB.js} +1 -1
  118. package/dist/assets/{index-BnsRewaA.js → index-naTRWvF2.js} +1 -1
  119. package/dist/assets/{index-a5z0oLm0.js → index-xbEyjJXs.js} +1 -1
  120. package/dist/assets/{index.esm-11mV4JTB.js → index.esm-Bxym9bTh.js} +1 -1
  121. package/dist/assets/{install-from-url-DDvu1So2.js → install-from-url-CR63kcrv.js} +1 -1
  122. package/dist/assets/{invitation-CAfUwKLF.js → invitation-e5aFKh62.js} +1 -1
  123. package/dist/assets/{is-path-prefix-equal-BSrFrDnM.js → is-path-prefix-equal-3mf0L7Kv.js} +1 -1
  124. package/dist/assets/{item-BVShF35E.js → item-BTVYfgZy.js} +1 -1
  125. package/dist/assets/{javascript-C-mWITaw.js → javascript-DbOCeLBK.js} +1 -1
  126. package/dist/assets/{jsonMode-zsidC2jX.js → jsonMode-KbdXs3_f.js} +1 -1
  127. package/dist/assets/{liquid-DLrpRYGV.js → liquid-BsIII-5-.js} +1 -1
  128. package/dist/assets/{list-header-D7AmzBnQ.js → list-header-Cgpqt2I_.js} +1 -1
  129. package/dist/assets/{lock.svg-BSMyvmiX.js → lock.svg-BMhEJCg9.js} +1 -1
  130. package/dist/assets/{log-BUaBiHj2.js → log-BWCIKjMX.js} +1 -1
  131. package/dist/assets/{lottie-react.esm-BECODwEW.js → lottie-react.esm-BZrNX8nd.js} +1 -1
  132. package/dist/assets/{mdx-Dg0NgEhj.js → mdx-BAZUiExq.js} +1 -1
  133. package/dist/assets/{memory-CYfF9LNL.js → memory-BpFDRFnL.js} +1 -1
  134. package/dist/assets/{metric-D_Rq7u0J.js → metric-C_oBH6Eh.js} +1 -1
  135. package/dist/assets/omit-B86ZTUNL.js +1 -0
  136. package/dist/assets/{overview-Bf0RacwG.js → overview-BtyHyhYr.js} +1 -1
  137. package/dist/assets/{permission-CE3f6duj.js → permission-Cgr1bkVx.js} +1 -1
  138. package/dist/assets/{preference-uMowSkVr.js → preference-CMBX7HYR.js} +3 -3
  139. package/dist/assets/{python-D4iKigf3.js → python-DDgHlCVD.js} +1 -1
  140. package/dist/assets/{raf-schd.esm-PaDKXX52.js → raf-schd.esm-bUMZC-O2.js} +1 -1
  141. package/dist/assets/{razor-a6RZRy4M.js → razor-BubtFDQk.js} +1 -1
  142. package/dist/assets/{rotate-session-key-D08RekVV.js → rotate-session-key-C_hbLYKj.js} +1 -1
  143. package/dist/assets/{runtime-DK4a2zRH.js → runtime-Do_clgOO.js} +1 -1
  144. package/dist/assets/schema-Dh7IXpmO.js +1 -0
  145. package/dist/assets/sdk-289D2t9a.js +1 -0
  146. package/dist/assets/{service-D-5L0qMb.js → service-h4DCqAhM.js} +1 -1
  147. package/dist/assets/{shorten-label-CnHc5b4P.js → shorten-label-MBA74Aur.js} +1 -1
  148. package/dist/assets/{simple-select-AxSwGalf.js → simple-select-B2DCxKN7.js} +1 -1
  149. package/dist/assets/{spaces-cJ664FRt.js → spaces-DpGRZXdx.js} +1 -1
  150. package/dist/assets/{status-BpSJKdrt.js → status-BWrDIruK.js} +1 -1
  151. package/dist/assets/{status-CqsLbSWy.js → status-CQl0zJ-m.js} +1 -1
  152. package/dist/assets/{switch-control-DoypOh17.js → switch-control-Clt68OLc.js} +1 -1
  153. package/dist/assets/{table-icons-BB3WCZ0c.js → table-icons-Cxo67uuA.js} +1 -1
  154. package/dist/assets/{team-CzLA5Wke.js → team-DiQIdeJt.js} +1 -1
  155. package/dist/assets/{toLower-DwM8Y4G7.js → toLower-BdySL1O3.js} +1 -1
  156. package/dist/assets/toUpper-DGKgw5Tb.js +1 -0
  157. package/dist/assets/{traffic-BvD_sqrg.js → traffic-Dc8IPZxP.js} +1 -1
  158. package/dist/assets/{tsMode-Dk3hYncm.js → tsMode-DtaJSHg3.js} +1 -1
  159. package/dist/assets/{typescript-BWhP65F5.js → typescript-CB-8x_Dv.js} +1 -1
  160. package/dist/assets/{url-evaluation-CeV7iBRh.js → url-evaluation-D57QAxkD.js} +1 -1
  161. package/dist/assets/{url-join-CSV8j2nv.js → url-join-D58Xyg1O.js} +1 -1
  162. package/dist/assets/{use-mobile-DT5aSwoH.js → use-mobile-BFExjs55.js} +1 -1
  163. package/dist/assets/{use-mobile-Dwu9jRCW.js → use-mobile-Dy6kqC8a.js} +1 -1
  164. package/dist/assets/{useAsync-d2jpJBOI.js → useAsync-MGrzXrZd.js} +1 -1
  165. package/dist/assets/{useAsyncRetry-CFOUpvIi.js → useAsyncRetry-BSt33Rd7.js} +1 -1
  166. package/dist/assets/{useLocalStorage-CFg3RYoG.js → useLocalStorage-CkF3pDw8.js} +1 -1
  167. package/dist/assets/{useThemeProps-DDkjiDuo.js → useThemeProps-DqFPOBha.js} +1 -1
  168. package/dist/assets/{util-gAeFf-vQ.js → util-C-akKhsO.js} +1 -1
  169. package/dist/assets/{wait-container-DINf0squ.js → wait-container-zcpyLf3J.js} +1 -1
  170. package/dist/assets/{without-wallet-Bpmf04-L.js → without-wallet-BgAtXg4L.js} +1 -1
  171. package/dist/assets/{wrap-locale-C7tS6amm.js → wrap-locale-B_YK-Dt8.js} +1 -1
  172. package/dist/assets/{xml-CyGyMNDw.js → xml-DtoveOEz.js} +1 -1
  173. package/dist/assets/{yaml-D-MTb9Eh.js → yaml-CZnhOaIo.js} +1 -1
  174. package/dist/index.html +1 -1
  175. package/dist/service-worker.js +1 -1
  176. package/package.json +1 -1
  177. package/dist/assets/ArrowDropDown-BmpWVT5T.js +0 -1
  178. package/dist/assets/api-DK8kaMBV.js +0 -1
  179. package/dist/assets/client-CBX1Obzh.js +0 -1
  180. package/dist/assets/cloneDeep-Djkce8fU.js +0 -1
  181. package/dist/assets/emotion-cache.browser.esm-CTjwgjTJ.js +0 -1
  182. package/dist/assets/engine-DSc6bLAX.js +0 -1
  183. package/dist/assets/getValidReactChildren-B5PKhq5Y.js +0 -1
  184. package/dist/assets/index-BnwXywaJ.js +0 -1
  185. package/dist/assets/index-DDurY-dJ.js +0 -602
  186. package/dist/assets/omit-CoM-kG66.js +0 -1
  187. package/dist/assets/schema-BXwrjjXM.js +0 -1
  188. package/dist/assets/sdk-Z_sZEcD1.js +0 -1
  189. package/dist/assets/toUpper-DkAQpneV.js +0 -1
@@ -1,4 +1,4 @@
1
- import{aF as Ge,j as e,bn as gt,r as g,bz as X,bf as H,H as U,aH as D,p as xt,o as d,h as te,at as bt,ay as jt,M as y,T as $,n as Q,eO as Fe,P as Pe,il as Ye,bj as Te,aU as Ie,U as Ee,dI as we,b3 as qe,b1 as Ae,C as Xe,f as Qe,f0 as Je,aP as De,W as yt,as as Ze,im as et,w as Oe,f2 as tt,fo as ye,fI as st,dC as St,s as ie,af as pe,G as Ue,au as vt,io as Ct,ip as Nt,$ as nt,iq as wt,ir as Rt,is as Tt,it as It,O as Et,bu as it,K as At,Q as Dt,S as Ot,R as $e,iu as Lt,a3 as kt}from"./index-z2Pq7re4.js";import{d as Ft,H as at,g as Pt}from"./index-DxNJKgOf.js";import{R as _e,S as _t}from"./actions-DiTDvakV.js";import{B as Bt}from"./index-CazcQIXS.js";import{S as me}from"./shorten-label-CnHc5b4P.js";import{v as ot}from"./index-0z8Wehkl.js";import{T as zt}from"./html-title-DVCSq6YQ.js";import{R as Wt}from"./Refresh-CEzviXq3.js";import{D as Mt,g as Kt}from"./traffic-BvD_sqrg.js";import{u as Ht}from"./use-mobile-Dwu9jRCW.js";import"./FilterList-DcRJLB8M.js";import"./CSSTransition-BoWO2BoO.js";import"./emotion-cache.browser.esm-CTjwgjTJ.js";import"./index-CwJ8EMCg.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-CSi6TcQv.js";import"./index-p_tMzvnc.js";import"./TableSearch-I0DQoJkT.js";import"./Search-CJFu7Gaf.js";import"./Clear-DgL5cnLN.js";import"./MoreVert-D4eir2r_.js";import"./useLocalStorage-CFg3RYoG.js";import"./url-evaluation-CeV7iBRh.js";import"./get-safe-url-CUMicCqh.js";import"./ButtonGroup-8swvzNFE.js";import"./getValidReactChildren-B5PKhq5Y.js";import"./permission-CE3f6duj.js";import"./index.esm-11mV4JTB.js";import"./collapse-BKLgvOSl.js";import"./blocklet-B517W-Ua.js";import"./Switch-D89bFzHz.js";import"./iframe-D0APLep4.js";import"./ChevronLeft-CJzdK2eh.js";import"./ChevronRight-DLMDPIak.js";import"./index-DBii9-f-.js";import"./base-chart-BIsr5drw.js";import"./index-BOhdDUAw.js";import"./AdapterDayjs-wz3uJn5Q.js";import"./useThemeProps-DDkjiDuo.js";import"./visuallyHidden-Dan1xhjv.js";const qt=Ge(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"})),Ut=Ge(e.jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),rt=g.createContext({}),{Provider:$t,Consumer:an}=rt;function Vt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:a}}=gt(),[l,x]=g.useState([]),[u,T]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),f=X(()=>s.meta?.did,[s]),[v,C]=g.useState([]),[F,_]=g.useState({}),N=X(()=>l.length?new Set(l.map(h=>h.id)):new Set,[l]),V=async({page:h=1,pageSize:S=20,...I}={})=>{if(!f)return[];try{const w={paging:{page:h,pageSize:S},...I,teamDid:f,dateRange:I.dateRange?[H(I.dateRange[0]).toISOString(),H(I.dateRange[1]).toISOString()]:void 0},{dids:E,...k}=w;let B="";E&&E.includes("system")&&(B="system");const ae=E?E.filter(oe=>oe!=="system"):[],ne={...k,source:B,componentDids:ae},ee=await n.getNotificationSendLog({input:ne});return _(ne),x(ee.list),T(ee.paging),ee.list}catch(w){return U.error(w.message),[]}},P=async()=>{const h=await n.getNotificationComponents({input:{teamDid:f}});C(h.componentDids)},L=g.useCallback(h=>{const S=s.children.find(I=>I.meta?.did===h);if(S)return S.ancestors=[s],S},[s]),W=async({notificationId:h,receivers:S,channels:I,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:h,receivers:S,channels:I.map(E=>E==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:E==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:E),...w}})},q=g.useCallback(async h=>(await n.getUser({input:{teamDid:f,user:{did:h},options:{enableConnectedAccount:!0}}})).user,[n,f]),Y=g.useCallback(async({page:h=1,pageSize:S=20,...I}={})=>{try{const w={paging:{page:h,pageSize:S},...I,userName:I.searchText||"",teamDid:f,dateRange:I.dateRange?[H(I.dateRange[0]).toISOString(),H(I.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw U.error(w.message),w}},[n,f]);g.useEffect(()=>{f&&P()},[f]),a(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,h=>{N.has(h.notificationId)&&V(F)},[N,F]),a(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,h=>{N.has(h.id)||V(F)},[N,F]);const Z={fetch:V,data:l,paging:u,blocklet:s,getComponent:L,resendNotification:W,getUser:q,componentDids:v,getReceivers:Y,inService:r,teamDid:f};return e.jsx($t,{value:{notificationRecords:Z},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Gt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Gt[t],children:t})}const Yt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:a,reason:l="",channel:x="wallet"}=n,u=a?t("notification.sendStatus.sentTime",{date:bt(a,s)}):"",T=Yt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:T}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:T,sentTime:u}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Xt=(t,s)=>{const n=te(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Qt=(t,s)=>{const n=te(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Jt=t=>({enabled:te(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:te(t,"extra.webhooks",[]).length>0}),be=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),es=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],je=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},ts=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=te(t,l,[]);return je(x)}const n=te(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return je(l)}const a={};return ke.forEach(l=>{const x=`${l}SendRecord`,u=te(t,x,[]),T=je(u);a[l]=T}),r.length>0&&r.forEach(l=>{const x=n[l]??[],u=je(x);a[l]=u}),a},Se=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},ve=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ss=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function se({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:a,title:l="",sentTime:x="",reason:u=""}=t,T=[l,u].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx($,{color:"inherit",sx:{fontSize:12},children:T}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(y,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(y,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(y,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a]}}),e.jsx(y,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]}})]}),e.jsx($,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}se.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};Ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function Ce({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:a}=Q();return e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs($,{children:[s,": "]}),t.map(l=>{const x=lt(r,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(y,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(se,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,l)},l)})]})}ze.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function ze({filterList:t,onChange:s,index:n,column:r,filterValues:a,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(u=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(u.value??u)>-1,onChange:T=>{const f=[...t];T.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(v=>v!==(u.value??u)),s(f[n],n,r)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(se,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:a}){const{t:l,locale:x}=Q(),u=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(y,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(se,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=Q(),r=H().toDate(),[a,l]=g.useState(null),x=g.useCallback(f=>{l(a?null:f.currentTarget)},[a]),u=!!a,T=g.useCallback(f=>{if(!f.startDate||!f.endDate){U.error("Please select a date range");return}if(H(f.startDate).isAfter(f.endDate)||!H(f.startDate).isValid()||!H(f.endDate).isValid()){U.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx($,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(we,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[qe(t[0],n)," - ",qe(t[1],n)]})}),e.jsx(Ae,{open:u,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Mt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Kt(r),onChange:T})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=Q();return!s?.filterList?.filter(a=>a.length).length?null:e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Ft.TableFilterList,{...s,ItemComponent:t})})]})}function Ke({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const a=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}Ke.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const ns=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=Q(),[a,l]=g.useState(ns),[x,u]=g.useState(!0),T=(v,C)=>{C.checked=v.target.checked;const F=a.map(_=>({..._,checked:_.value===C.value?C.checked:_.checked}));l(F)},f=v=>{v.stopPropagation(),n({channels:a.filter(C=>C.checked).map(C=>C.value),isResendFailedOnly:x})};return e.jsxs(y,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx($,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(y,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(v=>e.jsx(Ie,{control:e.jsx(Ee,{checked:v.checked,onChange:C=>T(C,v),name:v.value}),label:v.label},v.value))})]})}),e.jsx(y,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:v=>u(v.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(y,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(we,{onClick:v=>{v.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Xe,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:a}=Q(),l=Qe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:u,inService:T,teamDid:f,getUser:v,blocklet:C}=Be(),[F,_]=g.useState(!1),[N,V]=g.useState([]),P=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[W,q]=g.useState(null),[Y,Z]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[h,S]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[I,w]=g.useState([]),E=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],k=async()=>{if(!F&&t)try{_(!0);const i=await u({notificationId:t,...h}),o=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,f,T)}}));V(o),Z(i.paging),_(!1)}catch(i){U.error(i.message),_(!1)}};g.useEffect(()=>{k()},[h]);const B=i=>{i.stopPropagation();const o=i.currentTarget;L.anchorEl=o;const c=o.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:B,children:r("notification.resend")})}):null,ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:Y.page-1,rowsPerPage:Y.pageSize,count:Y.total,searchText:h.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:I,onRowSelectionChange:(i,o)=>{w(o.map(c=>c.dataIndex))},customToolbarSelect:ae},ee=({page:i,rowsPerPage:o,searchText:c,filterList:j})=>{const[,z=[],G=[],K=[]]=j;h.pageSize!==o?S(M=>({...M,pageSize:o,page:1})):h.page!==i+1?S(M=>({...M,page:i+1})):h.searchText!==c?S(M=>({...M,searchText:c,page:1})):pe(z,h.walletSendStatus)?pe(G,h.pushKitSendStatus)?pe(K,h.emailSendStatus)||S(M=>({...M,emailSendStatus:K,page:1})):S(M=>({...M,pushKitSendStatus:G,page:1})):S(M=>({...M,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,o)=>{if(!o)return!1;const c=await v(o);return c?i==="wallet"?Jt(c):i==="email"?Xt(C,c):i==="pushKit"?Qt(C,c):i==="webhook"?Zt(c):!0:!1},[v,C]),ge=g.useCallback(i=>es(r,i),[r]),re=()=>{P.anchorEl=null,P.position=null,q(null)},le=()=>{L.anchorEl=null,L.position=null},m=async(i,o,c=!0,j="")=>{if(!(!o.length||!i.length))try{s(i,o,c,j),L.anchorEl||(await be(.5),re())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:o})=>{const c=I.map(j=>N[j].receiver);await m(i,c,o),await be(.5),le(),w([])},b=async(i,o=[],c=!0)=>{try{await m(["webhook"],[i.receiver],c,o)}catch(j){U.error(j.response?j.response.statusText:j.message)}},R=async(i,o,c,j=[],z=!0)=>{if(i.stopPropagation(),ts(o,c)>=4){U.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await b(o,j,z);return}if(i){const K=i.currentTarget,M=K.getBoundingClientRect();P.anchorEl=K,P.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}q({channel:c});try{const K=await oe(c,o.receiver);await be(1),q({channel:c,result:K}),(typeof K=="boolean"&&K||St(K)&&Object.values(K).every(M=>!!M))&&(await s([c],[o.receiver],z),L.anchorEl||(await be(.5),re()))}catch(K){U.error(K.message)}},O=i=>{S(o=>({...o,dateRange:i,page:1}))},A=(i,o,c,j)=>{i.stopPropagation();const z=c.filter(G=>G!==o);S(G=>({...G,[j]:z,page:1}))},J=X(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:o,receiver:c}=N[i];return o?e.jsxs(y,{"data-cy":`member-name-${o.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${o.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:o.fullName})]},c):e.jsx(yt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:h.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Wallet",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[1].options.filterList,"walletSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:o,index:c,column:j,filterValues:E})},customBodyRenderLite:i=>{const{walletSendStatus:o,walletSendAt:c,walletSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"wallet",onResend:z=>R(z,N[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:o,pushKitSendAt:c,pushKitSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"pushkit",onResend:z=>R(z,N[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:h.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Push Kit",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[2].options.filterList,"pushKitSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:o,emailSendAt:c,emailSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"email",onResend:z=>R(z,N[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:h.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Email",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[3].options.filterList,"emailSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Email",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:o}=N[i];if(!o)return null;const c=Object.entries(o)[0];if(!c)return null;const[j,z]=c,G=z[0];return e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(y,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:j},j),e.jsx(ce,{status:G.status,updatedAt:G.sendAt,reason:G.failedReason,channel:"webhook",onResend:K=>R(K,N[i],"webhook",[j],!1)})]},j)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:o}=N[i];return e.jsx(et,{value:o,locale:a,shouldUpdate:!0})}}}],[N,a,h,r]),xe=[e.jsx(We,{value:h.dateRange,onChange:O},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:F,startIcon:e.jsx(Wt,{}),onClick:()=>k(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(y,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(as,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:a,loading:F,columns:J,data:N,onChange:ee,options:ne,customButtons:xe,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:o=>e.jsx(Ke,{...o,canDelete:()=>!1})})}}),P.anchorEl&&e.jsx(Ae,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(os,{children:[e.jsxs($,{variant:"body1",component:"div",className:"check-title",children:[W?.channel," Checking"]}),e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:ge(W?.channel).map(i=>{const{type:o,pass:c,fail:j}=i;return!W?.result||W?.result?.[o]?e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:W?.result?.[o]?ye.success.main:"inherit"},children:[W?.result?e.jsx(Ut,{}):e.jsx(Xe,{size:12,sx:{color:ye.primary.main}}),e.jsx("span",{children:c})]},o):e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:ye.error.main},children:[e.jsx(qt,{}),e.jsx("span",{children:j})]},o)})})]})}),L.anchorEl&&e.jsx(Ae,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:le,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:le,onConfirm:p})})]})})})}const is=g.memo(ft),as=ie.div`
1
+ import{aF as Ge,j as e,bn as gt,r as g,bz as X,bf as H,H as U,aH as D,p as xt,o as d,h as te,at as bt,ay as jt,M as y,T as $,n as Q,eO as Fe,P as Pe,il as Ye,bj as Te,aU as Ie,U as Ee,dI as we,b3 as qe,b1 as Ae,C as Xe,f as Qe,f0 as Je,aP as De,W as yt,as as Ze,im as et,w as Oe,f2 as tt,fo as ye,fI as st,dC as St,s as ie,af as pe,G as Ue,au as vt,io as Ct,ip as Nt,$ as nt,iq as wt,ir as Rt,is as Tt,it as It,O as Et,bu as it,K as At,Q as Dt,S as Ot,R as $e,iu as Lt,a3 as kt}from"./index-aH2GqWbS.js";import{d as Ft,H as at,g as Pt}from"./index-D2L3x-3e.js";import{R as _e,S as _t}from"./actions-wotb2et1.js";import{B as Bt}from"./index-UbWS86BP.js";import{S as me}from"./shorten-label-MBA74Aur.js";import{v as ot}from"./index-DNbMr0g9.js";import{T as zt}from"./html-title-DrqnIfa0.js";import{R as Wt}from"./Refresh-BJgI71LN.js";import{D as Mt,g as Kt}from"./traffic-Dc8IPZxP.js";import{u as Ht}from"./use-mobile-Dy6kqC8a.js";import"./FilterList-DTo_uDHm.js";import"./CSSTransition-DDXf56QN.js";import"./emotion-cache.browser.esm-Coyusglz.js";import"./index-BxqUg2fc.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-BeaaXuRW.js";import"./index-BWZUApiO.js";import"./TableSearch-Dgi91c1v.js";import"./Search-D6dHxdTz.js";import"./Clear-DZ2ckQwi.js";import"./MoreVert-D94k9YTF.js";import"./useLocalStorage-CkF3pDw8.js";import"./url-evaluation-D57QAxkD.js";import"./get-safe-url-OqBkbBpm.js";import"./ButtonGroup-BVtAFOxJ.js";import"./getValidReactChildren-w4iI7cES.js";import"./permission-Cgr1bkVx.js";import"./index.esm-Bxym9bTh.js";import"./collapse-q4qT0dbm.js";import"./blocklet-D-C5_KT8.js";import"./Switch-9q8pyvkx.js";import"./iframe-CxoFl3Ji.js";import"./ChevronLeft-DI9gCcNA.js";import"./ChevronRight-MzIjPo02.js";import"./index-DBii9-f-.js";import"./base-chart-Dul1bHFm.js";import"./index-CHw20FOr.js";import"./AdapterDayjs-DAwAM0K6.js";import"./useThemeProps-DqFPOBha.js";import"./visuallyHidden-Dan1xhjv.js";const qt=Ge(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"})),Ut=Ge(e.jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),rt=g.createContext({}),{Provider:$t,Consumer:an}=rt;function Vt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:a}}=gt(),[l,x]=g.useState([]),[u,T]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),f=X(()=>s.meta?.did,[s]),[v,C]=g.useState([]),[F,_]=g.useState({}),N=X(()=>l.length?new Set(l.map(h=>h.id)):new Set,[l]),V=async({page:h=1,pageSize:S=20,...I}={})=>{if(!f)return[];try{const w={paging:{page:h,pageSize:S},...I,teamDid:f,dateRange:I.dateRange?[H(I.dateRange[0]).toISOString(),H(I.dateRange[1]).toISOString()]:void 0},{dids:E,...k}=w;let B="";E&&E.includes("system")&&(B="system");const ae=E?E.filter(oe=>oe!=="system"):[],ne={...k,source:B,componentDids:ae},ee=await n.getNotificationSendLog({input:ne});return _(ne),x(ee.list),T(ee.paging),ee.list}catch(w){return U.error(w.message),[]}},P=async()=>{const h=await n.getNotificationComponents({input:{teamDid:f}});C(h.componentDids)},L=g.useCallback(h=>{const S=s.children.find(I=>I.meta?.did===h);if(S)return S.ancestors=[s],S},[s]),W=async({notificationId:h,receivers:S,channels:I,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:h,receivers:S,channels:I.map(E=>E==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:E==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:E),...w}})},q=g.useCallback(async h=>(await n.getUser({input:{teamDid:f,user:{did:h},options:{enableConnectedAccount:!0}}})).user,[n,f]),Y=g.useCallback(async({page:h=1,pageSize:S=20,...I}={})=>{try{const w={paging:{page:h,pageSize:S},...I,userName:I.searchText||"",teamDid:f,dateRange:I.dateRange?[H(I.dateRange[0]).toISOString(),H(I.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw U.error(w.message),w}},[n,f]);g.useEffect(()=>{f&&P()},[f]),a(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,h=>{N.has(h.notificationId)&&V(F)},[N,F]),a(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,h=>{N.has(h.id)||V(F)},[N,F]);const Z={fetch:V,data:l,paging:u,blocklet:s,getComponent:L,resendNotification:W,getUser:q,componentDids:v,getReceivers:Y,inService:r,teamDid:f};return e.jsx($t,{value:{notificationRecords:Z},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Gt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Gt[t],children:t})}const Yt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:a,reason:l="",channel:x="wallet"}=n,u=a?t("notification.sendStatus.sentTime",{date:bt(a,s)}):"",T=Yt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:T}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:T,sentTime:u}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Xt=(t,s)=>{const n=te(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Qt=(t,s)=>{const n=te(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Jt=t=>({enabled:te(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:te(t,"extra.webhooks",[]).length>0}),be=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),es=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],je=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},ts=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=te(t,l,[]);return je(x)}const n=te(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return je(l)}const a={};return ke.forEach(l=>{const x=`${l}SendRecord`,u=te(t,x,[]),T=je(u);a[l]=T}),r.length>0&&r.forEach(l=>{const x=n[l]??[],u=je(x);a[l]=u}),a},Se=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},ve=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ss=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function se({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:a,title:l="",sentTime:x="",reason:u=""}=t,T=[l,u].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx($,{color:"inherit",sx:{fontSize:12},children:T}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(y,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(y,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(y,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a]}}),e.jsx(y,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]}})]}),e.jsx($,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}se.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};Ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function Ce({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:a}=Q();return e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs($,{children:[s,": "]}),t.map(l=>{const x=lt(r,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(y,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(se,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,l)},l)})]})}ze.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function ze({filterList:t,onChange:s,index:n,column:r,filterValues:a,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(u=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(u.value??u)>-1,onChange:T=>{const f=[...t];T.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(v=>v!==(u.value??u)),s(f[n],n,r)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(se,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:a}){const{t:l,locale:x}=Q(),u=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(y,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(se,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=Q(),r=H().toDate(),[a,l]=g.useState(null),x=g.useCallback(f=>{l(a?null:f.currentTarget)},[a]),u=!!a,T=g.useCallback(f=>{if(!f.startDate||!f.endDate){U.error("Please select a date range");return}if(H(f.startDate).isAfter(f.endDate)||!H(f.startDate).isValid()||!H(f.endDate).isValid()){U.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx($,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(we,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[qe(t[0],n)," - ",qe(t[1],n)]})}),e.jsx(Ae,{open:u,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Mt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Kt(r),onChange:T})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=Q();return!s?.filterList?.filter(a=>a.length).length?null:e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Ft.TableFilterList,{...s,ItemComponent:t})})]})}function Ke({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const a=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}Ke.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const ns=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=Q(),[a,l]=g.useState(ns),[x,u]=g.useState(!0),T=(v,C)=>{C.checked=v.target.checked;const F=a.map(_=>({..._,checked:_.value===C.value?C.checked:_.checked}));l(F)},f=v=>{v.stopPropagation(),n({channels:a.filter(C=>C.checked).map(C=>C.value),isResendFailedOnly:x})};return e.jsxs(y,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx($,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(y,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(v=>e.jsx(Ie,{control:e.jsx(Ee,{checked:v.checked,onChange:C=>T(C,v),name:v.value}),label:v.label},v.value))})]})}),e.jsx(y,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:v=>u(v.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(y,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(we,{onClick:v=>{v.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Xe,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:a}=Q(),l=Qe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:u,inService:T,teamDid:f,getUser:v,blocklet:C}=Be(),[F,_]=g.useState(!1),[N,V]=g.useState([]),P=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[W,q]=g.useState(null),[Y,Z]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[h,S]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[I,w]=g.useState([]),E=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],k=async()=>{if(!F&&t)try{_(!0);const i=await u({notificationId:t,...h}),o=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,f,T)}}));V(o),Z(i.paging),_(!1)}catch(i){U.error(i.message),_(!1)}};g.useEffect(()=>{k()},[h]);const B=i=>{i.stopPropagation();const o=i.currentTarget;L.anchorEl=o;const c=o.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:B,children:r("notification.resend")})}):null,ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:Y.page-1,rowsPerPage:Y.pageSize,count:Y.total,searchText:h.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:I,onRowSelectionChange:(i,o)=>{w(o.map(c=>c.dataIndex))},customToolbarSelect:ae},ee=({page:i,rowsPerPage:o,searchText:c,filterList:j})=>{const[,z=[],G=[],K=[]]=j;h.pageSize!==o?S(M=>({...M,pageSize:o,page:1})):h.page!==i+1?S(M=>({...M,page:i+1})):h.searchText!==c?S(M=>({...M,searchText:c,page:1})):pe(z,h.walletSendStatus)?pe(G,h.pushKitSendStatus)?pe(K,h.emailSendStatus)||S(M=>({...M,emailSendStatus:K,page:1})):S(M=>({...M,pushKitSendStatus:G,page:1})):S(M=>({...M,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,o)=>{if(!o)return!1;const c=await v(o);return c?i==="wallet"?Jt(c):i==="email"?Xt(C,c):i==="pushKit"?Qt(C,c):i==="webhook"?Zt(c):!0:!1},[v,C]),ge=g.useCallback(i=>es(r,i),[r]),re=()=>{P.anchorEl=null,P.position=null,q(null)},le=()=>{L.anchorEl=null,L.position=null},m=async(i,o,c=!0,j="")=>{if(!(!o.length||!i.length))try{s(i,o,c,j),L.anchorEl||(await be(.5),re())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:o})=>{const c=I.map(j=>N[j].receiver);await m(i,c,o),await be(.5),le(),w([])},b=async(i,o=[],c=!0)=>{try{await m(["webhook"],[i.receiver],c,o)}catch(j){U.error(j.response?j.response.statusText:j.message)}},R=async(i,o,c,j=[],z=!0)=>{if(i.stopPropagation(),ts(o,c)>=4){U.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await b(o,j,z);return}if(i){const K=i.currentTarget,M=K.getBoundingClientRect();P.anchorEl=K,P.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}q({channel:c});try{const K=await oe(c,o.receiver);await be(1),q({channel:c,result:K}),(typeof K=="boolean"&&K||St(K)&&Object.values(K).every(M=>!!M))&&(await s([c],[o.receiver],z),L.anchorEl||(await be(.5),re()))}catch(K){U.error(K.message)}},O=i=>{S(o=>({...o,dateRange:i,page:1}))},A=(i,o,c,j)=>{i.stopPropagation();const z=c.filter(G=>G!==o);S(G=>({...G,[j]:z,page:1}))},J=X(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:o,receiver:c}=N[i];return o?e.jsxs(y,{"data-cy":`member-name-${o.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${o.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:o.fullName})]},c):e.jsx(yt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:h.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Wallet",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[1].options.filterList,"walletSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:o,index:c,column:j,filterValues:E})},customBodyRenderLite:i=>{const{walletSendStatus:o,walletSendAt:c,walletSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"wallet",onResend:z=>R(z,N[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:o,pushKitSendAt:c,pushKitSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"pushkit",onResend:z=>R(z,N[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:h.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Push Kit",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[2].options.filterList,"pushKitSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:o,emailSendAt:c,emailSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"email",onResend:z=>R(z,N[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:h.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Email",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[3].options.filterList,"emailSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Email",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:o}=N[i];if(!o)return null;const c=Object.entries(o)[0];if(!c)return null;const[j,z]=c,G=z[0];return e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(y,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:j},j),e.jsx(ce,{status:G.status,updatedAt:G.sendAt,reason:G.failedReason,channel:"webhook",onResend:K=>R(K,N[i],"webhook",[j],!1)})]},j)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:o}=N[i];return e.jsx(et,{value:o,locale:a,shouldUpdate:!0})}}}],[N,a,h,r]),xe=[e.jsx(We,{value:h.dateRange,onChange:O},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:F,startIcon:e.jsx(Wt,{}),onClick:()=>k(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(y,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(as,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:a,loading:F,columns:J,data:N,onChange:ee,options:ne,customButtons:xe,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:o=>e.jsx(Ke,{...o,canDelete:()=>!1})})}}),P.anchorEl&&e.jsx(Ae,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(os,{children:[e.jsxs($,{variant:"body1",component:"div",className:"check-title",children:[W?.channel," Checking"]}),e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:ge(W?.channel).map(i=>{const{type:o,pass:c,fail:j}=i;return!W?.result||W?.result?.[o]?e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:W?.result?.[o]?ye.success.main:"inherit"},children:[W?.result?e.jsx(Ut,{}):e.jsx(Xe,{size:12,sx:{color:ye.primary.main}}),e.jsx("span",{children:c})]},o):e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:ye.error.main},children:[e.jsx(qt,{}),e.jsx("span",{children:j})]},o)})})]})}),L.anchorEl&&e.jsx(Ae,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:le,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:le,onConfirm:p})})]})})})}const is=g.memo(ft),as=ie.div`
2
2
  td.MuiTableCell-footer {
3
3
  border: none !important;
4
4
  }