@abtnode/webapp 1.17.0-beta-20251105-030013-0c24dbf6 → 1.17.0-beta-20251106-075812-7c2fdd58

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 (190) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-Dsdzg0fF.js → AdapterDayjs-DalMJwhD.js} +7 -7
  4. package/dist/assets/{Add-l70J_4yZ.js → Add-BJaOHr9s.js} +1 -1
  5. package/dist/assets/ArrowDropDown-BvfsnZmc.js +1 -0
  6. package/dist/assets/{Autocomplete-BGzNUg3v.js → Autocomplete-BtpXOuNf.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-qX1unYdA.js → Breadcrumbs-CtDi2J-M.js} +1 -1
  8. package/dist/assets/{ButtonGroup-DWV84mOp.js → ButtonGroup-DPiY53vd.js} +1 -1
  9. package/dist/assets/{CSSTransition-D0ZJqc3V.js → CSSTransition-Bw2ddZTQ.js} +1 -1
  10. package/dist/assets/{CallMerge-47e0SFej.js → CallMerge-CGVsnRYH.js} +1 -1
  11. package/dist/assets/{CardContent-049bCJeP.js → CardContent-ByDsC3UC.js} +1 -1
  12. package/dist/assets/{ChevronLeft-xNPAnZUM.js → ChevronLeft-gcWuOwnw.js} +1 -1
  13. package/dist/assets/{ChevronRight-hEVn0ieo.js → ChevronRight-Czhq6YeB.js} +1 -1
  14. package/dist/assets/{Clear-DmQaaBy1.js → Clear-CKva4eBi.js} +1 -1
  15. package/dist/assets/{DeleteOutline-CvnvGjYc.js → DeleteOutline-CpaciU3x.js} +1 -1
  16. package/dist/assets/{Done-rLg9w1bb.js → Done-CLU5BqYw.js} +1 -1
  17. package/dist/assets/{Edit-BLWQBSLN.js → Edit-BjbXvYad.js} +1 -1
  18. package/dist/assets/{ErrorOutline-wpxhPFAL.js → ErrorOutline-CSXVYe6M.js} +1 -1
  19. package/dist/assets/{FilterList-CBCl7dbD.js → FilterList-BJOykCHp.js} +1 -1
  20. package/dist/assets/{Google--H7JIVD-.js → Google-SHWTgP_i.js} +1 -1
  21. package/dist/assets/{HelpOutline-dwnyWw6W.js → HelpOutline-EW7qBW6g.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-CqHZKzOB.js → KeyboardArrowDown-BpcBmZwq.js} +1 -1
  23. package/dist/assets/{Launch-D-brFkhF.js → Launch-DjhPb7Xi.js} +1 -1
  24. package/dist/assets/{Link-D4UceNDZ.js → Link-sU5sIdSA.js} +1 -1
  25. package/dist/assets/{ListItemButton-BbKr2tws.js → ListItemButton-BLIqko7v.js} +1 -1
  26. package/dist/assets/{ListSubheader-CPl5W-Om.js → ListSubheader-Dv-UJcm5.js} +1 -1
  27. package/dist/assets/{LoadingButton-yUpEuEJK.js → LoadingButton-BZ1m9RXg.js} +1 -1
  28. package/dist/assets/{MoreVert-Cy81E-t5.js → MoreVert-DDyUOkUj.js} +1 -1
  29. package/dist/assets/{OpenInNew-B2F4Jqwb.js → OpenInNew-DQYN8Nx1.js} +1 -1
  30. package/dist/assets/{Refresh-C7TD1E1-.js → Refresh-B0XmjeJ3.js} +1 -1
  31. package/dist/assets/{Search-nsuHiAfr.js → Search-DhSwmkQ1.js} +1 -1
  32. package/dist/assets/{Stepper-N4JW-HWm.js → Stepper-Tm_IonK9.js} +1 -1
  33. package/dist/assets/{Switch-Ch-Dpg3J.js → Switch-C5R2keD_.js} +1 -1
  34. package/dist/assets/{TableSearch-B7cAFRBU.js → TableSearch-ChIn3Aak.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-BEbdhUkr.js → ToggleButtonGroup-XnP8cE92.js} +1 -1
  36. package/dist/assets/{UnfoldMore-BJCswty9.js → UnfoldMore-C9BUwV8E.js} +1 -1
  37. package/dist/assets/{Verified-Cj9BE95b.js → Verified-CHOSEVtj.js} +1 -1
  38. package/dist/assets/{VerifiedUser-CzoOgILE.js → VerifiedUser-Dixnu8-0.js} +1 -1
  39. package/dist/assets/{ViewList-DII-BNLQ.js → ViewList-D7yxj6An.js} +1 -1
  40. package/dist/assets/{_createAggregator-C4guq0cF.js → _createAggregator-DfK7n_7j.js} +1 -1
  41. package/dist/assets/{actions-C9R61uoD.js → actions-5Y9-88Ql.js} +1 -1
  42. package/dist/assets/actions-ZeE8iUOI.js +1 -0
  43. package/dist/assets/{agreement-DtxuiQja.js → agreement-CGBcE16y.js} +1 -1
  44. package/dist/assets/api-DSc3pJRw.js +1 -0
  45. package/dist/assets/{appearance-B_sMk1g7.js → appearance-D-m6CFfC.js} +1 -1
  46. package/dist/assets/{audit-logs-DHuwThvE.js → audit-logs-CWTz8UN2.js} +1 -1
  47. package/dist/assets/{base-chart-BuPD5Oqs.js → base-chart-7GQt2N1M.js} +1 -1
  48. package/dist/assets/{blocklet-BMb-DKa8.js → blocklet-CPwKiPX6.js} +1 -1
  49. package/dist/assets/{chain-DG7hV9jl.js → chain-DjrPrtvj.js} +1 -1
  50. package/dist/assets/{click-to-copy-BlUoHpyD.js → click-to-copy-DLb2iRRo.js} +1 -1
  51. package/dist/assets/cloneDeep-DRoc_4OI.js +1 -0
  52. package/dist/assets/{collapse-DKt3eXVz.js → collapse-CC77PAqz.js} +1 -1
  53. package/dist/assets/{config-navigation-C1LKuM9I.js → config-navigation-DCTgQWGc.js} +3 -3
  54. package/dist/assets/{connect-to-UN--0_6w.js → connect-to-CYP6ST4F.js} +2 -2
  55. package/dist/assets/{cssMode-CLw2RNKf.js → cssMode-BmZ3qBXS.js} +1 -1
  56. package/dist/assets/{delete-confirm-CCfwND5U.js → delete-confirm-DSvSyiD8.js} +1 -1
  57. package/dist/assets/{depsEqual-DZ2epQ9y.js → depsEqual-UJplX9mU.js} +1 -1
  58. package/dist/assets/{detail-DT3mxGBF.js → detail-WlrzKwWy.js} +3 -3
  59. package/dist/assets/{domains-ByJxly5j.js → domains-CfqnBD4I.js} +2 -2
  60. package/dist/assets/{download-DYcl5mTN.js → download-H2XmdQXI.js} +1 -1
  61. package/dist/assets/{edit.svg-DYKibMjZ.js → edit.svg-DVuUM3KB.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-CHmknBa-.js +1 -0
  63. package/dist/assets/engine-CIf2Bmdn.js +1 -0
  64. package/dist/assets/{freemarker2-l0VGQqvD.js → freemarker2-DvTkFCdy.js} +1 -1
  65. package/dist/assets/{get-safe-url-I2vTcMcF.js → get-safe-url-BjGmijAx.js} +1 -1
  66. package/dist/assets/getValidReactChildren-DJbrx6gC.js +1 -0
  67. package/dist/assets/{graphqlMode-CA_yndFf.js → graphqlMode-CkxoJJG0.js} +2 -2
  68. package/dist/assets/{handlebars-BILq1CrH.js → handlebars-DACautrS.js} +1 -1
  69. package/dist/assets/{html-CoOIbPZt.js → html-CU4f7WqH.js} +1 -1
  70. package/dist/assets/{html-title-CRD93SB4.js → html-title-Ca-JgCsh.js} +1 -1
  71. package/dist/assets/{htmlMode-C2G2f8dC.js → htmlMode-DqJjXVio.js} +1 -1
  72. package/dist/assets/{iframe-SmTUaAma.js → iframe-2aVrQOtY.js} +1 -1
  73. package/dist/assets/{index-BE13FI7n.js → index-12hGIPsK.js} +1 -1
  74. package/dist/assets/{index-B78zCe1U.js → index-29YXcG1w.js} +1 -1
  75. package/dist/assets/{index-NTEIlaHw.js → index-9LSsWDb7.js} +1 -1
  76. package/dist/assets/{index-CyeREPie.js → index-B2ArczGg.js} +1 -1
  77. package/dist/assets/{index-BJzB0IwK.js → index-B6TuxWTr.js} +1 -1
  78. package/dist/assets/{index-CqGdRTFr.js → index-B83_MINe.js} +1 -1
  79. package/dist/assets/{index-DfDQYXHJ.js → index-BDQcjWHA.js} +1 -1
  80. package/dist/assets/{index-SpBKG2cj.js → index-BN0b1Gve.js} +1 -1
  81. package/dist/assets/{index-Ee8S2Bwe.js → index-BRp5NVGY.js} +1 -1
  82. package/dist/assets/{index-BBJPyEqY.js → index-BgYR95Zy.js} +1 -1
  83. package/dist/assets/{index-CL4In6gd.js → index-Bi0eEFvN.js} +2 -2
  84. package/dist/assets/{index-By5xDEFZ.js → index-BiLgRbWh.js} +1 -1
  85. package/dist/assets/{index-_nnYDXM-.js → index-Bl14cNgY.js} +1 -1
  86. package/dist/assets/{index-1q_fL1CO.js → index-Blu10up0.js} +1 -1
  87. package/dist/assets/{index-CeSi6fPS.js → index-BohzE0_G.js} +1 -1
  88. package/dist/assets/{index-BqE2dSbo.js → index-BqA6qopG.js} +1 -1
  89. package/dist/assets/{index-9AtlSAca.js → index-BtreM3NC.js} +1 -1
  90. package/dist/assets/{index-B7UU2Xx3.js → index-C-_TOagw.js} +1 -1
  91. package/dist/assets/{index-C8GO1leJ.js → index-C9qZuSIK.js} +4 -4
  92. package/dist/assets/{index-CCyFCqBE.js → index-CL7r8f7t.js} +1 -1
  93. package/dist/assets/{index-DjgzvzkV.js → index-CTRqTltQ.js} +1 -1
  94. package/dist/assets/{index-f_-DLUob.js → index-CVfrZI-X.js} +1 -1
  95. package/dist/assets/index-CcyWzATh.js +1 -0
  96. package/dist/assets/{index-_RQVek-9.js → index-CiCnkusy.js} +1 -1
  97. package/dist/assets/{index-DWBKwIO3.js → index-ClN0pNgG.js} +1 -1
  98. package/dist/assets/{index-BKgXnbrz.js → index-CppKRVHi.js} +1 -1
  99. package/dist/assets/{index-BiowOJQr.js → index-DBf8PBYJ.js} +3 -3
  100. package/dist/assets/{index-DFZr7N5Q.js → index-DDhMAVFM.js} +1 -1
  101. package/dist/assets/{index-BcyBYFKw.js → index-DED1KN0e.js} +1 -1
  102. package/dist/assets/{index-cI3GtZiR.js → index-DOMzSGye.js} +1 -1
  103. package/dist/assets/{index-Brhgisql.js → index-DS4UEAMl.js} +3 -3
  104. package/dist/assets/{index-C5xxqnjy.js → index-DVNXXPps.js} +1 -1
  105. package/dist/assets/{index-Di7TwMAz.js → index-DiOAy3AN.js} +1 -1
  106. package/dist/assets/{index-BEjzeaWf.js → index-DmXLaJkF.js} +11 -11
  107. package/dist/assets/{index-B2OP4n2J.js → index-DnM_VmsZ.js} +1 -1
  108. package/dist/assets/{index-DiSjj8dD.js → index-DqVv93zN.js} +1 -1
  109. package/dist/assets/{index-COM-tUig.js → index-DrY1ehLI.js} +1 -1
  110. package/dist/assets/{index-BXhWMfbn.js → index-DsEBS9e4.js} +268 -270
  111. package/dist/assets/{index-BpLexnAZ.js → index-Qsq8NN2R.js} +3 -3
  112. package/dist/assets/index-TbMNXftL.js +375 -0
  113. package/dist/assets/{index-Bz-PgJMC.js → index-ZGyZk2OZ.js} +9 -9
  114. package/dist/assets/{index-CuAcM2e2.js → index-amAPPuMu.js} +1 -1
  115. package/dist/assets/{index-DEOQ0jcQ.js → index-fNQPtBuc.js} +28 -32
  116. package/dist/assets/{index-D4AEyg0i.js → index-hA-y-TpL.js} +1 -1
  117. package/dist/assets/{index-BvBppb16.js → index-imazHEHp.js} +1 -1
  118. package/dist/assets/{index-Cl_OUu5V.js → index-jjbeseev.js} +2 -2
  119. package/dist/assets/{index.esm-DLVaVv6G.js → index.esm-BANIJT6f.js} +1 -1
  120. package/dist/assets/{install-from-url-B-_Dp6ah.js → install-from-url-D1NOT4Pv.js} +1 -1
  121. package/dist/assets/{invitation-BgD3_vhn.js → invitation-O2oACqkb.js} +1 -1
  122. package/dist/assets/{is-path-prefix-equal-BSoCAT8S.js → is-path-prefix-equal-O0yEMjd_.js} +1 -1
  123. package/dist/assets/{item-Cq6FTbYA.js → item-h3ruRo-H.js} +1 -1
  124. package/dist/assets/{javascript-C-FROqLb.js → javascript-DcJGEfYw.js} +1 -1
  125. package/dist/assets/{jsonMode-DPJOjZF1.js → jsonMode-BHZ8m-ds.js} +1 -1
  126. package/dist/assets/{liquid-C2IF5DcJ.js → liquid-DWbey1H2.js} +1 -1
  127. package/dist/assets/{list-header-CGaXNTl1.js → list-header-DyI0QsIk.js} +1 -1
  128. package/dist/assets/{lock.svg-chUJBTRM.js → lock.svg-S4G8_hPn.js} +1 -1
  129. package/dist/assets/{log-CQYCsC7O.js → log-CKSZu6u8.js} +1 -1
  130. package/dist/assets/{lottie-react.esm-BDZ_FnV5.js → lottie-react.esm-Bm0zPrgB.js} +1 -1
  131. package/dist/assets/{mdx-DN-yyYQV.js → mdx-BGp37W7-.js} +1 -1
  132. package/dist/assets/{memory-Cp2D5Xn4.js → memory-CWPB8_i3.js} +1 -1
  133. package/dist/assets/{metric-D8boeqOT.js → metric-DWK7z3FN.js} +1 -1
  134. package/dist/assets/omit-3k34emjP.js +1 -0
  135. package/dist/assets/{overview-CmJ-twrW.js → overview-STHknBJ9.js} +1 -1
  136. package/dist/assets/{permission-yeSmXMT8.js → permission-CW0DzNy6.js} +1 -1
  137. package/dist/assets/{preference-B8o0Jhqm.js → preference-COoVLSH3.js} +4 -4
  138. package/dist/assets/{python-dlp0zMNM.js → python-BC35IEku.js} +1 -1
  139. package/dist/assets/{raf-schd.esm-CrHfyPhA.js → raf-schd.esm-CIAiFP0D.js} +1 -1
  140. package/dist/assets/{razor-BShM2kTq.js → razor-B6vnh7Vd.js} +1 -1
  141. package/dist/assets/{rotate-session-key-cXEhy_K2.js → rotate-session-key-DU1HsGd_.js} +1 -1
  142. package/dist/assets/{runtime-BkYiwqrJ.js → runtime-DUURaTXH.js} +1 -1
  143. package/dist/assets/schema-CqOuaGVk.js +1 -0
  144. package/dist/assets/sdk-BQM2VdGY.js +1 -0
  145. package/dist/assets/{service-CZ6mQjKM.js → service-BJKQP96S.js} +1 -1
  146. package/dist/assets/{shorten-label-B41dh7aP.js → shorten-label-DA5be4J4.js} +1 -1
  147. package/dist/assets/{simple-select-BvGPk5Cy.js → simple-select-CLUHLnUl.js} +1 -1
  148. package/dist/assets/{spaces-C-llvyn7.js → spaces-D-45kKRl.js} +1 -1
  149. package/dist/assets/{status-BX4NNsVD.js → status-CEUgb3XC.js} +1 -1
  150. package/dist/assets/{status-PYw3sa-W.js → status-wht8PoB0.js} +1 -1
  151. package/dist/assets/{switch-control-IXycQg7u.js → switch-control-DiEhPK-D.js} +1 -1
  152. package/dist/assets/{table-icons-PekhxfR1.js → table-icons-OH5JefYD.js} +1 -1
  153. package/dist/assets/{team-C3mY0ELl.js → team-DOKbCs1u.js} +1 -1
  154. package/dist/assets/{toLower-B1XYGfB3.js → toLower-L52TDGAI.js} +1 -1
  155. package/dist/assets/toUpper-s5XxN3Cm.js +1 -0
  156. package/dist/assets/{traffic-Bj6CYWfW.js → traffic-8l-nBZJu.js} +1 -1
  157. package/dist/assets/{tsMode-O71ldBJ0.js → tsMode-rhnC4GCm.js} +1 -1
  158. package/dist/assets/{typescript-awLwl-Q4.js → typescript-C6f--cpD.js} +1 -1
  159. package/dist/assets/{url-evaluation-Dt0gDvx3.js → url-evaluation-DkReRdN8.js} +1 -1
  160. package/dist/assets/{url-join--yrZIt5c.js → url-join-jtosGTU1.js} +1 -1
  161. package/dist/assets/{use-mobile-CMlrBzPG.js → use-mobile-CIJO5Cwx.js} +1 -1
  162. package/dist/assets/{use-mobile-0LaImk5H.js → use-mobile-DDVf02JR.js} +1 -1
  163. package/dist/assets/{useAsync-Drf6IH2B.js → useAsync-CDB8iS9O.js} +1 -1
  164. package/dist/assets/{useAsyncRetry-C9hqas1l.js → useAsyncRetry-D1fZm-7x.js} +1 -1
  165. package/dist/assets/{useLocalStorage-pzfOZ90P.js → useLocalStorage-g990sECo.js} +1 -1
  166. package/dist/assets/useThemeProps-CWahcrog.js +1 -0
  167. package/dist/assets/{util-CHsC18AZ.js → util-BlJo7yLZ.js} +1 -1
  168. package/dist/assets/{wait-container-D-JLmV2c.js → wait-container-Cq3P4_HW.js} +1 -1
  169. package/dist/assets/{without-wallet-BVl72vUK.js → without-wallet-BzSI0Ui2.js} +1 -1
  170. package/dist/assets/wrap-locale-9aJSq-p0.js +1 -0
  171. package/dist/assets/{xml-clTeeJoN.js → xml-BWOkBtfO.js} +1 -1
  172. package/dist/assets/{yaml-D17cEXW_.js → yaml-B2eMN024.js} +1 -1
  173. package/dist/index.html +1 -1
  174. package/dist/service-worker.js +1 -1
  175. package/package.json +1 -1
  176. package/dist/assets/ArrowDropDown-C4ph_aC2.js +0 -1
  177. package/dist/assets/actions-D2ujhOWD.js +0 -1
  178. package/dist/assets/api-W7sKIR80.js +0 -1
  179. package/dist/assets/cloneDeep-yO838gNj.js +0 -1
  180. package/dist/assets/emotion-cache.browser.esm-Bm19UyCk.js +0 -1
  181. package/dist/assets/engine-BX2tPglZ.js +0 -1
  182. package/dist/assets/getValidReactChildren-Ao387m76.js +0 -1
  183. package/dist/assets/index-4__iBGFR.js +0 -376
  184. package/dist/assets/index-CZlN1gWv.js +0 -1
  185. package/dist/assets/omit-BtJfXKsY.js +0 -1
  186. package/dist/assets/schema-CJmd8wL1.js +0 -1
  187. package/dist/assets/sdk-B9JEpY9l.js +0 -1
  188. package/dist/assets/toUpper-BnIypMIu.js +0 -1
  189. package/dist/assets/useThemeProps-BgkGtCgI.js +0 -1
  190. package/dist/assets/wrap-locale-C5BuyfxR.js +0 -1
@@ -1,5 +1,5 @@
1
- import{b$ as Ke,b_ as Fe,r as h,c0 as Ge,j as e,b8 as ee,c2 as $e,cf as Z,c3 as Ye,bY as He,ch as qe,aF as he,M as q,bn as A,cu as Ce,H as B,X as V,bf as E,fC as we,aQ as Be,b as N,iV as Ve,V as D,gL as Qe,o as m,x as Xe,aw as De,y as fe,ak as Je,p as Ze,C as L,T as j,k as et,s as tt,f as ot,iW as X,i5 as J,iX as st,K as S,aV as K,aH as T,L as nt,g as H,dl as at,ay as Se,Q as G,aE as $,a8 as Y,a4 as rt,dI as it,gB as ct,a$ as lt,v as pe,w as dt,G as be,Y as Ee,bC as xe,B as pt}from"./index-BXhWMfbn.js";import{T as ut}from"./html-title-CRD93SB4.js";import{u as U}from"./blocklet-BMb-DKa8.js";import{u as mt}from"./use-mobile-CMlrBzPG.js";import{c as Ie,d as ft,e as xt,f as gt,g as ue,h as ht,b as St,u as yt,C as bt,D as kt,a as jt}from"./connect-to-UN--0_6w.js";import"./index-Di7TwMAz.js";import"./index-BojVbZw0.js";import"./api-W7sKIR80.js";import{d as Ct,a as wt,g as Bt,i as Dt,e as ge,f as Et,h as It,j as Tt}from"./spaces-C-llvyn7.js";import{v as Rt}from"./index-_RQVek-9.js";import{E as zt}from"./index-D4AEyg0i.js";import{H as vt}from"./HelpOutline-dwnyWw6W.js";import{H as Pt}from"./index-B78zCe1U.js";import{x as At}from"./index-DRYJ0xIl.js";import{c as Lt}from"./actions-C9R61uoD.js";import{D as Ut}from"./DeleteOutline-CvnvGjYc.js";import{g as ke}from"./get-safe-url-I2vTcMcF.js";import{S as Ot}from"./switch-control-IXycQg7u.js";import{L as je}from"./list-header-CGaXNTl1.js";import"./OpenInNew-B2F4Jqwb.js";import"./ButtonGroup-DWV84mOp.js";import"./getValidReactChildren-Ao387m76.js";import"./FilterList-CBCl7dbD.js";import"./CSSTransition-D0ZJqc3V.js";import"./emotion-cache.browser.esm-Bm19UyCk.js";import"./index-9AtlSAca.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-DZ2epQ9y.js";import"./index-_nnYDXM-.js";import"./TableSearch-B7cAFRBU.js";import"./Search-nsuHiAfr.js";import"./Clear-DmQaaBy1.js";import"./MoreVert-Cy81E-t5.js";import"./useLocalStorage-pzfOZ90P.js";import"./url-evaluation-Dt0gDvx3.js";import"./permission-yeSmXMT8.js";import"./Switch-Ch-Dpg3J.js";function Mt(t){return Ke("MuiIcon",t)}Fe("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Nt=t=>{const{color:o,fontSize:n,classes:s}=t,r={root:["root",o!=="inherit"&&`color${Z(o)}`,`fontSize${Z(n)}`]};return Ye(r,Mt,s)},_t=ee("span",{name:"MuiIcon",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:n}=t;return[o.root,n.color!=="inherit"&&o[`color${Z(n.color)}`],o[`fontSize${Z(n.fontSize)}`]]}})(He(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,variants:[{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography.pxToRem(20)}},{props:{fontSize:"medium"},style:{fontSize:t.typography.pxToRem(24)}},{props:{fontSize:"large"},style:{fontSize:t.typography.pxToRem(36)}},{props:{color:"action"},style:{color:(t.vars||t).palette.action.active}},{props:{color:"disabled"},style:{color:(t.vars||t).palette.action.disabled}},{props:{color:"inherit"},style:{color:void 0}},...Object.entries(t.palette).filter(qe()).map(([o])=>({props:{color:o},style:{color:(t.vars||t).palette[o].main}}))]}))),ye=h.forwardRef(function(o,n){const s=Ge({props:o,name:"MuiIcon"}),{baseClassName:r="material-icons",className:a,color:c="inherit",component:i="span",fontSize:d="medium",...l}=s,p={...s,baseClassName:r,color:c,component:i,fontSize:d},f=Nt(p);return e.jsx(_t,{as:i,className:$e(r,"notranslate",f.root,a),ownerState:p,"aria-hidden":!0,ref:n,...l})});ye.muiName="Icon";const Wt=he(e.jsx("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"})),Kt=he(e.jsx("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"})),Ft=he(e.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}));async function Gt({blockletDid:t,nodeApi:o,spaceGateways:n}){let s=!1;const r=await Promise.all(n.map(async a=>{let{name:c}=a;const i=await Ct(a.endpoint);return!q(i)&&i!==c&&(c=i,s=!0),{...a,name:c}}));return s&&await Promise.all(r.filter(a=>a.did).map(a=>o.updateBlockletSpaceGateway({input:{did:t,where:{did:a.did},spaceGateway:{...a}}}))),r}function $t({refresh:t}={}){const{blocklet:o}=U(),n=o?.meta?.did,{api:s}=A();return Ce(async()=>{if(!n)return[];const{spaceGateways:r}=await s.getBlockletSpaceGateways({input:{did:n}});return await Gt({blockletDid:n,nodeApi:s,spaceGateways:r})??[]},{refreshDeps:[n,t],onError(r){r?.message?.includes("not logged")?console.warn(r):(console.error(r),B.error(V(r)))}})}function Te({deps:t,setLoading:o,backupDate:n}={deps:[],setLoading:()=>{},backupDate:new Date}){const{blocklet:s}=U(),[r,a]=h.useState([]),{api:c}=A(),[i,d]=h.useMemo(()=>n?[E(n).startOf("day").toISOString(),E(n).endOf("day").toISOString()]:[E().startOf("year").toISOString(),E().endOf("day").toISOString()],[n]),l=we(async()=>{try{if(o(!0),!s){a([]);return}const{backups:p}=await c.getBlockletBackups({input:{did:s.meta.did,startTime:i,endTime:d}});a(p??[])}catch(p){console.error(p),B.error(V(p))}finally{o(!1)}},1e3);return Be(async()=>{l()},[s?.meta?.did].concat(t)),{backups:r}}function Yt({appDid:t}){const{backups:o}=Te(),[n,s]=h.useState({message:"",progress:0,completed:!1}),r=A(),{ws:{useSubscription:a}}=r;return a(N.BlockletEvents.backupProgress,c=>{t===c?.appDid&&s(()=>({...c}))},[t]),h.useEffect(()=>{if(o?.length&&Ve(o[0]?.status)){const[c]=o;s(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[o]),n}function Ht({deps:t=[],setLoading:o=()=>{}}={}){const{blocklet:n}=U(),[s,r]=h.useState([]),{api:a}=A(),c=h.useCallback(we(async()=>{if(!a||!n?.meta?.did){r([]);return}try{o(!0);const i=E(),d=i.subtract(1,"year"),{summary:l}=await a.getBlockletBackupSummary({input:{did:n.meta.did,startTime:d.toISOString(),endTime:i.toISOString()}});r(Array.isArray(l)?l:[])}catch(i){console.error("Failed to fetch backup summary:",i),B.error(V(i)),r([])}finally{o(!1)}},1e3),[]);return Be(async()=>(await c(),()=>{c.cancel()}),[n?.meta?.did].concat(t)),{backupSummary:s}}const Re=h.createContext({}),{Provider:qt,Consumer:Ho}=Re;function ze({children:t}){const{t:o}=D(),{api:n}=A(),{blocklet:s}=U(),[r,a]=h.useState(null),[c,i]=h.useState(!1),{data:d,loading:l,mutate:p}=$t({refresh:c}),f=Qe(d),x=Yt({appDid:s?.appDid}),u=h.useMemo(()=>wt(s?.environments),[s?.environments]),[k,w]=h.useState(!1),[y,b]=h.useState(0),{backups:te}=Te({deps:[y,r],setLoading:w,backupDate:r}),[oe,se]=h.useState(0),{backupSummary:ne}=Ht({deps:[oe]}),[_,M]=h.useState(d?.find(g=>g.endpoint===u)),I=s?.settings?.autoBackup,z=()=>{i(g=>!g)},ae=()=>{se(g=>g+1)},re=()=>{b(g=>g+1)},F=async g=>{await n.updateAutoBackup({input:{did:s.meta.did,autoBackup:g}})},Q=async()=>{await n.abortBlockletBackup({input:{appPid:s.meta.did}})},ie=async(g,P)=>{try{p(R=>{const v=[...R];return v.push({...g,loading:!0}),v}),await n.addBlockletSpaceGateway({input:{did:s.meta.did,spaceGateway:g}}),u!==P&&await n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:P}]}}),M(g),z(),B.success(o("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"}))}catch(R){throw console.error(R),p(v=>[...v].filter(W=>W.did!==g.did)),R}},ce=async g=>{g&&(g.endpoint===u&&(await n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I?.enabled&&await F({enabled:!1})),await n.deleteBlockletSpaceGateway({input:{did:s.meta.did,spaceGatewayDid:g?.did}}),p(P=>{const R=[...P];return R.splice(R.indexOf(g),1),R}),M(g),z())},le=async g=>{await Promise.all([n.updateBlockletSpaceGateway({input:{did:s.meta.did,where:{did:g.did},spaceGateway:g}}),u!==g.endpoint&&n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:g.endpoint}]}})]),B.success(o("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"})),z()},C=g=>g?.endpoint===u;return e.jsx(qt,{value:{spaceGateways:d||[],selectedSpaceGateway:_,addSpaceGateway:ie,deleteSpaceGateway:ce,updateSpaceGateway:le,refreshSpaceGateways:z,spaceGatewaysLoading:l,spaceGatewaysFirstLoading:f,spaceGatewayIsSelected:C,updateAutoBackup:F,abortBlockletBackup:Q,backupEndpoint:u,backupProgress:x,backups:te,backupSummary:ne,refreshBackupSummary:ae,refreshBackups:re,setBackupDate:a,backupsLoading:k,autoBackup:I},children:t})}ze.propTypes={children:m.any.isRequired};function O(){return h.useContext(Re)}function ve({...t}){const{blocklet:o}=U(),{info:n}=A(),{t:s}=D(),r=Ie({blocklet:o}),a=Xe(n),{spaceGateways:c,addSpaceGateway:i}=O(),d={checkFn:De.create({baseURL:fe(window.location.origin,Je())}).get,webWalletUrl:a,extraParams:{appPid:o.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:n.did}},l=async({endpoint:f,name:x,did:u})=>{const k=await Bt(f);if(!await Dt(k)){B.error(s("storage.spaces.gateway.add.invalidUrl"));return}if(c.some(b=>b.endpoint===f)){B.error(s("storage.spaces.gateway.add.duplicate",{name:x}));return}await i({name:x,did:u,url:k,endpoint:f},f)},p=async({spaceGateway:f})=>{try{await l(f)}catch(x){console.error(x),B.error(V(x))}};return e.jsx(ft,{...t,connectScope:"app",options:d,onSuccess:p})}function Vt(){const{api:t}=A(),{blocklet:o}=U(),{data:n,loading:s}=Ce(()=>t.getBlocklet({input:{did:o?.meta?.did,attachDiskInfo:!0,attachRuntimeInfo:!0}}),{ready:!!o?.meta?.did,refreshDeps:[o?.meta?.did]});return{blocklet:n?.blocklet??null,loading:s}}function Pe({...t}){const{t:o}=h.useContext(Ze),{blocklet:n,loading:s}=Vt();if(n?.diskInfo){const r=(i,d,l)=>e.jsxs(j,{children:[i," ",e.jsx("strong",{children:d?et(d):"empty"})]}),a=n.environments.reduce((i,d)=>(i[d.key]=d.value,i),{}),c=[{key:"appDir",name:o("blocklet.diskInfo.appDir"),value:r(a.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:o("blocklet.diskInfo.dataDir"),value:r(a.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:o("blocklet.diskInfo.logDir"),value:r(a.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:o("blocklet.diskInfo.cacheDir"),value:r(a.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return e.jsx(Qt,{component:"div",...t,children:c.map(i=>e.jsx(Rt,{valueComponent:"div",nameWidth:120,name:i.name,children:i.value},i.key))})}return s?e.jsx(L,{}):e.jsx(j,{children:o("blocklet.diskInfo.empty")})}const Qt=tt(j)``;function Ae(){const{t}=D(),{setBackupDate:o,backupSummary:n}=O(),s=xt({key:"lg"}),r=h.useRef(null),a=ot(),c=h.useCallback(l=>{o(l)},[o]),i=h.useMemo(()=>{const l=E().add(1,"day"),p=l.subtract(1,"year"),f=new Map(n.map(u=>[u.date,{date:u.date,successCount:u.successCount,errorCount:u.errorCount}])),x=[];for(let u=p.clone();E(u).isBefore(l);u=u.add(1,"day")){const k=u.format("YYYY-MM-DD");x.push(f.get(k)||{date:k,successCount:0,errorCount:0})}return x},[n]),d=h.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:12},tooltip:{formatter:k=>{const{date:w,successCount:y,errorCount:b}=i[k.dataIndex]||{date:k.data[0],successCount:0,errorCount:0};return[`<div>${t("common.time")}: ${w}</div>`,`<div>${t("common.succeeded")}: ${y}</div>`,`<div>${t("common.failed")}: ${b}</div>`].join(`
2
- `)},backgroundColor:a.palette.background.paper,borderColor:a.palette.divider,textStyle:{color:a.palette.text.primary,fontSize:14},extraCssText:`box-shadow: ${a.shadows[2]}; border-radius: 4px;`,padding:[8,10]},visualMap:{show:!1,min:-12,max:12,pieces:[{min:Number.MIN_SAFE_INTEGER,max:-9,color:X[600]},{min:-9,max:-6,color:X[500]},{min:-6,max:-3,color:X[400]},{min:-3,max:-1,color:X[300]},{min:0,max:0,color:a.palette.grey[200]},{min:1,max:3,color:J[300]},{min:3,max:6,color:J[400]},{min:6,max:9,color:J[500]},{min:9,max:Number.MAX_SAFE_INTEGER,color:J[600]}],orient:"horizontal",left:"center",bottom:12,itemWidth:12,itemHeight:12,textStyle:{color:a.palette.text.secondary,fontSize:12}},calendar:{top:30,left:50,right:10,bottom:4,cellSize:[8,8],splitLine:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,color:a.palette.background.default},dayLabel:{show:!0,firstDay:0,nameMap:["","Mon","","Wed","","Fri",""],position:"start",margin:4,fontSize:10,color:a.palette.text.primary,fontWeight:"400",width:20},monthLabel:{show:!0,nameMap:"cn",align:"left",color:a.palette.text.primary,fontWeight:"400",fontSize:12,position:"start",margin:4,width:30,padding:[0,2]},yearLabel:{show:!1},range:[E().subtract(11,"month").startOf("month").format("YYYY-MM-DD"),E().endOf("month").format("YYYY-MM-DD")],orient:"horizontal"},series:{type:"heatmap",coordinateSystem:"calendar",data:i.map(k=>[k.date,k.errorCount?-k.errorCount:k.successCount]),label:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,borderRadius:4},emphasis:{itemStyle:{borderWidth:2,borderColor:st[200],color:"inherit"}}}}),[i,t,a]);return e.jsxs(e.Fragment,{children:[e.jsx(S,{ref:r,sx:{maxWidth:"1280px",border:"1px solid",borderColor:"divider",padding:"8px",overflowX:"auto"},children:e.jsx(S,{sx:{width:"1200px",height:"180px",position:"relative"},children:e.jsx(zt,{option:d,style:{height:"100%",width:"100%"},notMerge:!0,lazyUpdate:!1,opts:{renderer:"canvas"},onEvents:{click:l=>{l.componentType==="series"&&l.data&&c(l.data[0])}}})})}),e.jsx(S,{sx:{display:"flex",justifyContent:"flex-end",mt:1,mr:s?2:5,mb:2},children:e.jsxs(K,{direction:s?"column":"row",spacing:s?2:1,sx:{width:"100%",justifyContent:"flex-start",alignItems:s?"flex-start":"center"},children:[e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #8B5000 0%, #A36200 33%, #C17700 66%, #E29000 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.failed")})]}),e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,bgcolor:"grey.200",border:"1px solid",borderColor:"grey.200"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.without")})]}),e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #9be9a8 0%, #40c463 33%, #30a14e 66%, #216e39 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.succeeded")})]})]})})]})}const Xt=ee(({className:t,...o})=>e.jsx(Se,{...o,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function Le({status:t,message:o="",createdAt:n}){const{t:s}=D(),r=t===T.BACKUPS.STATUS.PROGRESS&&E().diff(n,"hours")>=T.BACKUPS.TIMEOUT_HOURS,a=r&&s("common.timeoutError"),c=t===T.BACKUPS.STATUS.PROGRESS&&!r,i=t===T.BACKUPS.STATUS.SUCCEEDED&&!r;return c?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(L,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):i?e.jsx(H,{type:"success",children:s("common.succeeded")}):e.jsxs(S,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(H,{type:"error",children:s("common.failed")}),e.jsx(Se,{style:{display:"flex",alignItems:"center",flexShrink:0},title:o||a,children:e.jsx(ye,{children:e.jsx(vt,{style:{width:"24px",height:"24px"},color:"error"})})})]})}Le.propTypes={status:m.string.isRequired,message:m.string,createdAt:m.string.isRequired};function Ue({metadata:t={}}){const{t:o}=D();if(q(t))return e.jsx(H,{type:"success",children:o("common.succeeded")});const n=t.count||0,s=t.size||0,r=At(s,{iec:!0}),a=e.jsxs(S,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:[e.jsxs(j,{variant:"body2",children:[o("common.fileCount"),": ",n]}),e.jsxs(j,{variant:"body2",children:[o("common.fileSize"),": ",r]})]});return e.jsxs(S,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(H,{type:"success",children:o("common.succeeded")}),e.jsx(Xt,{title:a,style:{display:"flex",alignItems:"center",flexShrink:0},placement:"left",children:e.jsx(ye,{children:e.jsx(at,{style:{width:"24px",height:"24px"},color:"primary"})})})]})}Ue.propTypes={metadata:m.object};function Oe(){const{t,locale:o}=D(),{spaceGateways:n,backups:s,backupsLoading:r}=O(),a=h.useMemo(()=>[{label:"DID Space",name:"target",options:{customBodyRenderLite:i=>{const{targetUrl:d,targetName:l,status:p,createdAt:f}=s[i],x=p===T.BACKUPS.STATUS.PROGRESS&&E().diff(f,"hours")>=T.BACKUPS.TIMEOUT_HOURS,u=p===T.BACKUPS.STATUS.SUCCEEDED&&!x,k=l||n.find(w=>d?.includes(ge(w?.endpoint)))?.name||"Unknown DID Space";return u?e.jsx(nt,{href:d,target:"_blank",sx:{fontSize:"16px"},children:k}):e.jsx(j,{variant:"body1",sx:{fontSize:"16px"},children:k})}}},{label:t("common.strategy"),name:"strategy",options:{customBodyRender:i=>{const d=t(i===0?"common.auto":"common.manual");return e.jsx(H,{children:d})}}},{label:t("common.startTime"),name:"createdAt",options:{customBodyRender:i=>E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.endTime"),name:"updatedAt",options:{customBodyRender:i=>q(i)?"":E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.status"),name:"status",options:{customBodyRenderLite:i=>{const d=s?.[i]??{},{status:l,message:p,createdAt:f,metadata:x}=d,u=l===T.BACKUPS.STATUS.PROGRESS&&E().diff(f,"hours")>=T.BACKUPS.TIMEOUT_HOURS,k=l===T.BACKUPS.STATUS.PROGRESS&&!u,w=l===T.BACKUPS.STATUS.SUCCEEDED&&!u;return k?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(L,{sx:{marginRight:"4px"},size:"12px"}),t("common.progress")]}):w?e.jsx(Ue,{metadata:x}):e.jsx(Le,{status:l,message:p,createdAt:f})}}}],[s,n,t]),c=h.useMemo(()=>!s?.length,[s]);return e.jsx(e.Fragment,{children:c?e.jsx(S,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",color:"#9397A1",marginTop:"16px",marginBottom:"24px"},children:t("storage.spaces.record.emptyData")}):e.jsx(Pt,{title:"",loading:r,data:s,columns:a,emptyNode:t("storage.spaces.record.emptyData",o),options:{download:!1,filter:!1,print:!1,search:!1,viewColumns:!1}})})}function Jt(){const{t}=D();return e.jsxs(S,{children:[e.jsxs(S,{sx:{display:"flex",gap:3,flexDirection:{xs:"column",md:"row"}},children:[e.jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",minWidth:240},children:[e.jsx(gt,{style:{cursor:"pointer",width:"150px",height:"100%",maxHeight:160}}),e.jsx(j,{sx:{my:2,textAlign:"center",color:"text.secondary"},children:t("storage.spaces.connect.provider")}),e.jsx(ve,{})]}),e.jsxs(S,{sx:{flexGrow:1,minWidth:0},children:[e.jsx(S,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.spaces.backup.records")})}),e.jsx(Ae,{})]})]}),e.jsx(Oe,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function Me({spaceGateway:t,onConfirm:o=()=>{},onCancel:n=()=>{}}){const{t:s}=D(),[r,a]=h.useState(!1),[c,i]=h.useState(!1),d=(f,x)=>{f?.preventDefault(),f?.stopPropagation(),a(x)},l=async f=>{try{f?.stopPropagation(),i(!0),await o?.(t),a(!1)}catch(x){console.error(x),B.error(`${s("storage.space.gateway.delete.failed")}: ${V(x)}`)}finally{a(!1),i(!1)}},p=f=>{d(f,!1),n?.(f)};return e.jsxs(e.Fragment,{children:[e.jsxs(G,{color:"red",onClick:f=>d(f,!0),children:[e.jsx($,{style:{minWidth:24,color:"red"},children:e.jsx(Ut,{fontSize:"small"})}),e.jsx(Y,{style:{color:"red"},children:s("common.disconnect")})]}),e.jsx(rt,{title:s("storage.spaces.gateway.delete.title"),open:r,confirmButton:{text:s("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:c}},cancelButton:{text:s("common.cancel"),props:{size:"small",variant:"outlined",disabled:c}},onConfirm:l,onCancel:p,children:e.jsx(j,{sx:{wordWrap:"break-word"},children:s("storage.spaces.gateway.delete.descForBackup",{name:`${t?.name}`})})})]})}Me.propTypes={spaceGateway:m.shape({name:m.string.isRequired,url:m.string.isRequired,protected:m.bool}).isRequired,onConfirm:m.func,onCancel:m.func};function Ne({spaceGateway:t,selected:o,onDelete:n=()=>{},onConnect:s=()=>{},enableSwitchToSpace:r=!0,backupInProgress:a=!1,...c}){const{abortBlockletBackup:i}=O(),[d,l]=h.useState(null),{t:p}=D(),[f,x]=h.useState(!1),u=(y,b)=>{y.stopPropagation(),y.preventDefault(),l(b&&y.currentTarget)},k=async y=>{try{x(!0),u(y,!1),await s(t)}catch(b){console.error(b),B.error(b.message)}finally{x(!1)}},w=async y=>{try{x(!0),u(y,!1),await i()}catch(b){console.error(b),B.error(b.message)}finally{x(!1)}};return e.jsxs(e.Fragment,{children:[f||t?.loading?e.jsx(L,{sx:{ml:1},size:"24px"}):e.jsx(it,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:y=>u(y,!0),...c,children:e.jsx(ct,{})}),e.jsxs(lt,{id:"simple-menu",anchorEl:d,keepMounted:!0,open:!!d,onClose:y=>u(y,!1),children:[e.jsxs(G,{onClick:y=>{u(y,!1),window.open(ke(t.endpoint?Et(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Wt,{fontSize:"small"})}),e.jsx(Y,{children:p("common.open")})]}),e.jsxs(G,{onClick:y=>{u(y,!1),window.open(ke(It(t.endpoint),{allowDomains:null}))},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Ft,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.strategy.viewBackupFiles")})]}),!o&&r&&e.jsxs(G,{onClick:k,children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Kt,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.connect.switchToSpace")})]}),a&&e.jsxs(G,{onClick:w,children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Lt,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.connect.abortBlockletBackup")})]}),!a&&e.jsx(Me,{spaceGateway:t,onConfirm:async()=>{l(null),await n?.(t)},onCancel:()=>l(null)})]})]})}Ne.propTypes={spaceGateway:m.shape({name:m.string.isRequired,url:m.string.isRequired,protected:m.bool,endpoint:m.string.isRequired,loading:m.bool}).isRequired,selected:m.bool.isRequired,enableSwitchToSpace:m.bool,onDelete:m.func,onConnect:m.func,backupInProgress:m.bool};const Zt=ee(({className:t,...o})=>e.jsx(Se,{...o,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function _e({spaceGateway:t,spaceStatus:o,selected:n,onConnected:s=()=>{},onDeleted:r=()=>{},onBackedUp:a=()=>{}}){const{t:c,locale:i}=D(),{blocklet:d}=U(),{api:l,info:{did:p}}=A(),{appDid:f,appName:x,appDescription:u,scopes:k,appUrl:w,referrer:y}=Ie({blocklet:d}),{backupProgress:b,updateSpaceGateway:te,deleteSpaceGateway:oe,refreshBackupSummary:se,refreshBackups:ne}=O(),[_,M]=h.useState(!1),[I,z]=h.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:c("storage.spaces.authorize.title",{appName:x},i),scan:c("storage.spaces.authorize.scan",{appName:x},i),confirm:"",success:e.jsx(j,{gutterBottom:!0,children:c("storage.spaces.authorize.success")})},onClose:()=>{z(C=>({...C,open:!1}))}}),ae=n&&!_&&o===ue.DISCONNECTED,re=n&&!_&&!t.loading&&o===ue.CONNECTED,F=n&&_&&o===ue.CONNECTED&&b?.progress>=0,Q=async()=>{try{if(await Tt(t?.endpoint)){await l.configBlocklet({input:{did:[d.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),B.success(c("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),s?.(null,t);return}}catch(C){console.error(C),s?.(C,t);return}z(C=>({...C,open:!0,prefix:fe(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:De.create({baseURL:fe(t.url,"space")}).get,extraParams:{appDid:f,appName:x,appDescription:u,scopes:k,appUrl:w,referrer:y,nodeDid:p,spaceDid:t.did}}))},ie=async(C,g)=>{const P=g(C.endpoint),R=ge(P),v=C.space?g(C.space):{};if(t.did&&R!==t.did){z(We=>({...We,open:!1}));const W=c("storage.spaces.gateway.switch.failedForMismatchSpace",{name:v?.name?v.name:""});B.error(W),s?.(new Error(W),t);return}const de={...t,name:v.name??"DID Space",did:v.did??ge(P),endpoint:P};await te(de),z(W=>({...W,open:!1})),s?.(null,de)},ce=async()=>{try{if(_)return;M(!0),await l.backupBlocklet({input:{appDid:d.appDid,to:"spaces"}})}catch(C){console.error(C),B.error(C.message),a?.(C,t)}finally{M(!0)}},le=async()=>{try{await oe(t),B.success(c("storage.spaces.gateway.delete.succeeded",{name:t.name?`(${t.name})`:""})),r?.(null,t)}catch(C){console.error(C),r?.(C,t)}};return h.useEffect(()=>{b?.completed?(n&&(b?.progress===100?(B.success(c("storage.spaces.backupSuccessfully")),a?.(null,t)):b.message&&a?.(new Error(b?.message),t),b.progress=0,b.message=""),M(!1),se(),ne()):b.progress&&M(!0)},[b]),e.jsxs(e.Fragment,{children:[e.jsxs(S,{sx:{display:"flex",alignItems:"center",".action-btn":{borderRadius:1,marginLeft:1}},children:[re&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:ce,children:c("storage.spaces.strategy.backupNow")}),ae&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:Q,children:c("storage.spaces.disconnected.reconnectNow")}),F&&e.jsx(Zt,{title:b?.message&&e.jsx(S,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:e.jsx(j,{variant:"body2",children:b.message})}),children:e.jsxs(pe,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(L,{variant:"determinate",value:b?.progress,size:14,sx:{mr:1}}),b?.progress,"%"]})}),e.jsx(dt,{forceConnected:!1,saveConnect:!1,prefix:I.prefix,open:I.open,popup:!0,action:I.action,baseUrl:I.baseUrl,checkFn:I.checkFn,onSuccess:ie,onClose:I.onClose,checkTimeout:I.checkTimeout,extraParams:I.extraParams,messages:I.messages,locale:i},"get-endpoint")]}),e.jsx(Ne,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:n,onDelete:le,onConnect:Q,enableSwitchToSpace:b?.completed||q(b?.message),backupInProgress:F})]})}_e.propTypes={spaceGateway:m.shape({did:m.string.isRequired,name:m.string.isRequired,url:m.string.isRequired,endpoint:m.string.isRequired,protected:m.bool,loading:m.bool}).isRequired,spaceStatus:m.string.isRequired,selected:m.bool.isRequired,onConnected:m.func,onDeleted:m.func,onBackedUp:m.func};function eo({...t}){const{t:o}=D();return e.jsxs(S,{...t,children:[e.jsx(S,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:o("storage.spaces.backup.records")})}),e.jsx(Ae,{}),e.jsx(Oe,{})]})}function to({...t}){const{t:o}=D(),{autoBackup:n,updateAutoBackup:s}=O(),r=async()=>{try{const a=!n?.enabled;await s({enabled:a}),B.success(o(a?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(a){B.error(a.message)}};return e.jsx(Ot,{checked:!!n?.enabled,onChange:r,name:"enableWelcomePage",labelProps:{label:e.jsx(j,{sx:{marginRight:"8px"},children:e.jsx("span",{children:o("storage.spaces.autoBackup.title")})})},style:{...t.style}})}function oo(){const{t}=D(),{spaceGateways:o,spaceGatewaysLoading:n,spaceGatewayIsSelected:s}=O(),r=n&&!o?.length,a=({spaceGateway:c,spaceStatus:i,selected:d,refresh:l})=>e.jsx(_e,{spaceGateway:c,spaceStatus:i,selected:d,onConnected:()=>l(),onBackedUp:p=>p&&l()});return e.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(S,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:{xs:1,md:2},justifyContent:{xs:"center",md:"flex-start"},alignItems:{xs:"flex-start",md:"center"}},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1},children:t("storage.spaces.connected.title")}),e.jsx(to,{}),e.jsx(ve,{})]}),e.jsx(S,{sx:{mt:2},children:r?e.jsx(S,{sx:{display:"flex",justifyContent:"center"},children:e.jsx(L,{})}):e.jsx(be,{container:!0,spacing:2,children:e.jsx(e.Fragment,{children:o.map(c=>e.jsx(be,{size:{xs:12,md:6},children:e.jsx(ht,{endpoint:c.endpoint,selected:s(c),action:a},c.endpoint)},c.endpoint))})})}),e.jsx(eo,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function so(){const{spaceGatewaysFirstLoading:t,spaceGateways:o}=O();return t?e.jsx(Ee,{relative:"parent",children:e.jsx(L,{})}):q(o)?e.jsx(Jt,{}):e.jsx(oo,{})}function no(){return e.jsx(ze,{children:e.jsx(so,{})})}function ao(){const{spaceGateway:t,settingStorageEndpoint:o,updateSpaceGateway:n,hasStorageEndpoint:s,loading:r,storageEndpoint:a}=yt(),c=xe(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return r?e.jsx(Ee,{relative:"parent",children:e.jsx(L,{})}):e.jsxs(S,{sx:{maxWidth:"md",position:"relative"},children:[s?e.jsx(bt,{spaceGateway:t,settingStorageEndpoint:o}):e.jsx(kt,{}),e.jsx(S,{sx:c,children:e.jsx(jt,{onConnect:n,storageEndpoint:a})})]})}function ro(){const{t}=D();return e.jsxs(St,{children:[e.jsxs(K,{spacing:1,sx:{marginBottom:2},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.appLevel.title")}),e.jsx(j,{sx:{color:"text.secondary"},children:t("storage.appLevel.description")})]}),e.jsx(ao,{})]})}function io({navOrientation:t="vertical",...o}){const{t:n,locale:s}=D(),{blocklet:r}=U(),a=mt({key:"md"}),[c,i]=pt(),d=c.get("tab")||"backup",l=a?"horizontal":t,p=xe(()=>{const w=[{label:n("common.backup"),value:"backup"}],y=r?.capabilities?.didSpace;return(y===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||y===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&w.push({label:n("common.storage"),value:"storage"}),w},[s,l]),x=xe(()=>({backup:e.jsx(no,{}),storage:e.jsx(ro,{})}))[d],u=w=>{i(y=>(w==="backup"?y.delete("tab"):y.set("tab",w),y))};if(p.length<=1)return e.jsx(me,{children:x});const k=e.jsx(ut,{tabs:p,current:d,orientation:l,onChange:u,sx:[{borderRight:1,height:"100%",borderColor:"divider"},l==="horizontal"&&{borderRight:0}]});if(l==="vertical")return e.jsx(S,{...o,children:e.jsxs(K,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(S,{sx:{flexShrink:0},children:e.jsx(je,{left:k})}),e.jsx(S,{sx:{flexGrow:1,minWidth:0},children:e.jsx(me,{sx:{mt:1},children:x})})]})});if(l==="horizontal")return e.jsxs(S,{...o,children:[e.jsx(je,{left:k}),e.jsx(me,{sx:{mt:2},children:x})]})}io.propTypes={navOrientation:m.oneOf(["vertical","horizontal"])};const me=ee(S)`
1
+ import{b$ as Ke,b_ as Fe,r as h,c0 as Ge,j as e,b8 as ee,c2 as $e,cf as J,c3 as Ye,bY as He,ch as qe,aF as he,M as q,bn as A,cu as Ce,H as B,X as V,bf as E,fC as we,aQ as Be,b as N,iO as Ve,V as D,gD as Qe,o as m,x as Xe,aw as De,y as fe,ak as Ze,p as Je,C as L,T as j,k as et,s as tt,f as ot,iP as X,hZ as Z,iQ as st,K as S,aV as K,aH as T,L as nt,g as H,dl as at,ay as Se,Q as G,aE as $,a8 as Y,a4 as rt,dI as it,gt as ct,a$ as lt,v as pe,w as dt,G as be,Y as Ee,bC as xe,B as pt}from"./index-DsEBS9e4.js";import{T as ut}from"./html-title-Ca-JgCsh.js";import{u as U}from"./blocklet-CPwKiPX6.js";import{u as mt}from"./use-mobile-CIJO5Cwx.js";import{c as Ie,d as ft,e as xt,f as gt,g as ue,h as ht,b as St,u as yt,C as bt,D as kt,a as jt}from"./connect-to-CYP6ST4F.js";import"./index-DiOAy3AN.js";import"./index-BojVbZw0.js";import"./api-DSc3pJRw.js";import{d as Ct,a as wt,g as Bt,i as Dt,e as ge,f as Et,h as It,j as Tt}from"./spaces-D-45kKRl.js";import{v as Rt}from"./index-CiCnkusy.js";import{E as zt}from"./index-hA-y-TpL.js";import{H as vt}from"./HelpOutline-EW7qBW6g.js";import{H as Pt}from"./index-29YXcG1w.js";import{x as At}from"./index-DRYJ0xIl.js";import{c as Lt}from"./actions-5Y9-88Ql.js";import{D as Ut}from"./DeleteOutline-CpaciU3x.js";import{g as ke}from"./get-safe-url-BjGmijAx.js";import{S as Ot}from"./switch-control-DiEhPK-D.js";import{L as je}from"./list-header-DyI0QsIk.js";import"./OpenInNew-DQYN8Nx1.js";import"./ButtonGroup-DPiY53vd.js";import"./getValidReactChildren-DJbrx6gC.js";import"./FilterList-BJOykCHp.js";import"./CSSTransition-Bw2ddZTQ.js";import"./emotion-cache.browser.esm-CHmknBa-.js";import"./index-BtreM3NC.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-UJplX9mU.js";import"./index-Bl14cNgY.js";import"./TableSearch-ChIn3Aak.js";import"./Search-DhSwmkQ1.js";import"./Clear-CKva4eBi.js";import"./MoreVert-DDyUOkUj.js";import"./useLocalStorage-g990sECo.js";import"./url-evaluation-DkReRdN8.js";import"./permission-CW0DzNy6.js";import"./Switch-C5R2keD_.js";function Mt(t){return Ke("MuiIcon",t)}Fe("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Nt=t=>{const{color:o,fontSize:n,classes:s}=t,r={root:["root",o!=="inherit"&&`color${J(o)}`,`fontSize${J(n)}`]};return Ye(r,Mt,s)},_t=ee("span",{name:"MuiIcon",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:n}=t;return[o.root,n.color!=="inherit"&&o[`color${J(n.color)}`],o[`fontSize${J(n.fontSize)}`]]}})(He(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,variants:[{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography.pxToRem(20)}},{props:{fontSize:"medium"},style:{fontSize:t.typography.pxToRem(24)}},{props:{fontSize:"large"},style:{fontSize:t.typography.pxToRem(36)}},{props:{color:"action"},style:{color:(t.vars||t).palette.action.active}},{props:{color:"disabled"},style:{color:(t.vars||t).palette.action.disabled}},{props:{color:"inherit"},style:{color:void 0}},...Object.entries(t.palette).filter(qe()).map(([o])=>({props:{color:o},style:{color:(t.vars||t).palette[o].main}}))]}))),ye=h.forwardRef(function(o,n){const s=Ge({props:o,name:"MuiIcon"}),{baseClassName:r="material-icons",className:a,color:c="inherit",component:i="span",fontSize:d="medium",...l}=s,p={...s,baseClassName:r,color:c,component:i,fontSize:d},f=Nt(p);return e.jsx(_t,{as:i,className:$e(r,"notranslate",f.root,a),ownerState:p,"aria-hidden":!0,ref:n,...l})});ye.muiName="Icon";const Wt=he(e.jsx("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"})),Kt=he(e.jsx("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"})),Ft=he(e.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}));async function Gt({blockletDid:t,nodeApi:o,spaceGateways:n}){let s=!1;const r=await Promise.all(n.map(async a=>{let{name:c}=a;const i=await Ct(a.endpoint);return!q(i)&&i!==c&&(c=i,s=!0),{...a,name:c}}));return s&&await Promise.all(r.filter(a=>a.did).map(a=>o.updateBlockletSpaceGateway({input:{did:t,where:{did:a.did},spaceGateway:{...a}}}))),r}function $t({refresh:t}={}){const{blocklet:o}=U(),n=o?.meta?.did,{api:s}=A();return Ce(async()=>{if(!n)return[];const{spaceGateways:r}=await s.getBlockletSpaceGateways({input:{did:n}});return await Gt({blockletDid:n,nodeApi:s,spaceGateways:r})??[]},{refreshDeps:[n,t],onError(r){r?.message?.includes("not logged")?console.warn(r):(console.error(r),B.error(V(r)))}})}function Te({deps:t,setLoading:o,backupDate:n}={deps:[],setLoading:()=>{},backupDate:new Date}){const{blocklet:s}=U(),[r,a]=h.useState([]),{api:c}=A(),[i,d]=h.useMemo(()=>n?[E(n).startOf("day").toISOString(),E(n).endOf("day").toISOString()]:[E().startOf("year").toISOString(),E().endOf("day").toISOString()],[n]),l=we(async()=>{try{if(o(!0),!s){a([]);return}const{backups:p}=await c.getBlockletBackups({input:{did:s.meta.did,startTime:i,endTime:d}});a(p??[])}catch(p){console.error(p),B.error(V(p))}finally{o(!1)}},1e3);return Be(async()=>{l()},[s?.meta?.did].concat(t)),{backups:r}}function Yt({appDid:t}){const{backups:o}=Te(),[n,s]=h.useState({message:"",progress:0,completed:!1}),r=A(),{ws:{useSubscription:a}}=r;return a(N.BlockletEvents.backupProgress,c=>{t===c?.appDid&&s(()=>({...c}))},[t]),h.useEffect(()=>{if(o?.length&&Ve(o[0]?.status)){const[c]=o;s(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[o]),n}function Ht({deps:t=[],setLoading:o=()=>{}}={}){const{blocklet:n}=U(),[s,r]=h.useState([]),{api:a}=A(),c=h.useCallback(we(async()=>{if(!a||!n?.meta?.did){r([]);return}try{o(!0);const i=E(),d=i.subtract(1,"year"),{summary:l}=await a.getBlockletBackupSummary({input:{did:n.meta.did,startTime:d.toISOString(),endTime:i.toISOString()}});r(Array.isArray(l)?l:[])}catch(i){console.error("Failed to fetch backup summary:",i),B.error(V(i)),r([])}finally{o(!1)}},1e3),[]);return Be(async()=>(await c(),()=>{c.cancel()}),[n?.meta?.did].concat(t)),{backupSummary:s}}const Re=h.createContext({}),{Provider:qt,Consumer:Ho}=Re;function ze({children:t}){const{t:o}=D(),{api:n}=A(),{blocklet:s}=U(),[r,a]=h.useState(null),[c,i]=h.useState(!1),{data:d,loading:l,mutate:p}=$t({refresh:c}),f=Qe(d),x=Yt({appDid:s?.appDid}),u=h.useMemo(()=>wt(s?.environments),[s?.environments]),[k,w]=h.useState(!1),[y,b]=h.useState(0),{backups:te}=Te({deps:[y,r],setLoading:w,backupDate:r}),[oe,se]=h.useState(0),{backupSummary:ne}=Ht({deps:[oe]}),[_,M]=h.useState(d?.find(g=>g.endpoint===u)),I=s?.settings?.autoBackup,z=()=>{i(g=>!g)},ae=()=>{se(g=>g+1)},re=()=>{b(g=>g+1)},F=async g=>{await n.updateAutoBackup({input:{did:s.meta.did,autoBackup:g}})},Q=async()=>{await n.abortBlockletBackup({input:{appPid:s.meta.did}})},ie=async(g,P)=>{try{p(R=>{const v=[...R];return v.push({...g,loading:!0}),v}),await n.addBlockletSpaceGateway({input:{did:s.meta.did,spaceGateway:g}}),u!==P&&await n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:P}]}}),M(g),z(),B.success(o("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"}))}catch(R){throw console.error(R),p(v=>[...v].filter(W=>W.did!==g.did)),R}},ce=async g=>{g&&(g.endpoint===u&&(await n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I?.enabled&&await F({enabled:!1})),await n.deleteBlockletSpaceGateway({input:{did:s.meta.did,spaceGatewayDid:g?.did}}),p(P=>{const R=[...P];return R.splice(R.indexOf(g),1),R}),M(g),z())},le=async g=>{await Promise.all([n.updateBlockletSpaceGateway({input:{did:s.meta.did,where:{did:g.did},spaceGateway:g}}),u!==g.endpoint&&n.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:g.endpoint}]}})]),B.success(o("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"})),z()},C=g=>g?.endpoint===u;return e.jsx(qt,{value:{spaceGateways:d||[],selectedSpaceGateway:_,addSpaceGateway:ie,deleteSpaceGateway:ce,updateSpaceGateway:le,refreshSpaceGateways:z,spaceGatewaysLoading:l,spaceGatewaysFirstLoading:f,spaceGatewayIsSelected:C,updateAutoBackup:F,abortBlockletBackup:Q,backupEndpoint:u,backupProgress:x,backups:te,backupSummary:ne,refreshBackupSummary:ae,refreshBackups:re,setBackupDate:a,backupsLoading:k,autoBackup:I},children:t})}ze.propTypes={children:m.any.isRequired};function O(){return h.useContext(Re)}function ve({...t}){const{blocklet:o}=U(),{info:n}=A(),{t:s}=D(),r=Ie({blocklet:o}),a=Xe(n),{spaceGateways:c,addSpaceGateway:i}=O(),d={checkFn:De.create({baseURL:fe(window.location.origin,Ze())}).get,webWalletUrl:a,extraParams:{appPid:o.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:n.did}},l=async({endpoint:f,name:x,did:u})=>{const k=await Bt(f);if(!await Dt(k)){B.error(s("storage.spaces.gateway.add.invalidUrl"));return}if(c.some(b=>b.endpoint===f)){B.error(s("storage.spaces.gateway.add.duplicate",{name:x}));return}await i({name:x,did:u,url:k,endpoint:f},f)},p=async({spaceGateway:f})=>{try{await l(f)}catch(x){console.error(x),B.error(V(x))}};return e.jsx(ft,{...t,connectScope:"app",options:d,onSuccess:p})}function Vt(){const{api:t}=A(),{blocklet:o}=U(),{data:n,loading:s}=Ce(()=>t.getBlocklet({input:{did:o?.meta?.did,attachDiskInfo:!0,attachRuntimeInfo:!0}}),{ready:!!o?.meta?.did,refreshDeps:[o?.meta?.did]});return{blocklet:n?.blocklet??null,loading:s}}function Pe({...t}){const{t:o}=h.useContext(Je),{blocklet:n,loading:s}=Vt();if(n?.diskInfo){const r=(i,d,l)=>e.jsxs(j,{children:[i," ",e.jsx("strong",{children:d?et(d):"empty"})]}),a=n.environments.reduce((i,d)=>(i[d.key]=d.value,i),{}),c=[{key:"appDir",name:o("blocklet.diskInfo.appDir"),value:r(a.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:o("blocklet.diskInfo.dataDir"),value:r(a.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:o("blocklet.diskInfo.logDir"),value:r(a.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:o("blocklet.diskInfo.cacheDir"),value:r(a.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return e.jsx(Qt,{component:"div",...t,children:c.map(i=>e.jsx(Rt,{valueComponent:"div",nameWidth:120,name:i.name,children:i.value},i.key))})}return s?e.jsx(L,{}):e.jsx(j,{children:o("blocklet.diskInfo.empty")})}const Qt=tt(j)``;function Ae(){const{t}=D(),{setBackupDate:o,backupSummary:n}=O(),s=xt({key:"lg"}),r=h.useRef(null),a=ot(),c=h.useCallback(l=>{o(l)},[o]),i=h.useMemo(()=>{const l=E().add(1,"day"),p=l.subtract(1,"year"),f=new Map(n.map(u=>[u.date,{date:u.date,successCount:u.successCount,errorCount:u.errorCount}])),x=[];for(let u=p.clone();E(u).isBefore(l);u=u.add(1,"day")){const k=u.format("YYYY-MM-DD");x.push(f.get(k)||{date:k,successCount:0,errorCount:0})}return x},[n]),d=h.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:12},tooltip:{formatter:k=>{const{date:w,successCount:y,errorCount:b}=i[k.dataIndex]||{date:k.data[0],successCount:0,errorCount:0};return[`<div>${t("common.time")}: ${w}</div>`,`<div>${t("common.succeeded")}: ${y}</div>`,`<div>${t("common.failed")}: ${b}</div>`].join(`
2
+ `)},backgroundColor:a.palette.background.paper,borderColor:a.palette.divider,textStyle:{color:a.palette.text.primary,fontSize:14},extraCssText:`box-shadow: ${a.shadows[2]}; border-radius: 4px;`,padding:[8,10]},visualMap:{show:!1,min:-12,max:12,pieces:[{min:Number.MIN_SAFE_INTEGER,max:-9,color:X[600]},{min:-9,max:-6,color:X[500]},{min:-6,max:-3,color:X[400]},{min:-3,max:-1,color:X[300]},{min:0,max:0,color:a.palette.grey[200]},{min:1,max:3,color:Z[300]},{min:3,max:6,color:Z[400]},{min:6,max:9,color:Z[500]},{min:9,max:Number.MAX_SAFE_INTEGER,color:Z[600]}],orient:"horizontal",left:"center",bottom:12,itemWidth:12,itemHeight:12,textStyle:{color:a.palette.text.secondary,fontSize:12}},calendar:{top:30,left:50,right:10,bottom:4,cellSize:[8,8],splitLine:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,color:a.palette.background.default},dayLabel:{show:!0,firstDay:0,nameMap:["","Mon","","Wed","","Fri",""],position:"start",margin:4,fontSize:10,color:a.palette.text.primary,fontWeight:"400",width:20},monthLabel:{show:!0,nameMap:"cn",align:"left",color:a.palette.text.primary,fontWeight:"400",fontSize:12,position:"start",margin:4,width:30,padding:[0,2]},yearLabel:{show:!1},range:[E().subtract(11,"month").startOf("month").format("YYYY-MM-DD"),E().endOf("month").format("YYYY-MM-DD")],orient:"horizontal"},series:{type:"heatmap",coordinateSystem:"calendar",data:i.map(k=>[k.date,k.errorCount?-k.errorCount:k.successCount]),label:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,borderRadius:4},emphasis:{itemStyle:{borderWidth:2,borderColor:st[200],color:"inherit"}}}}),[i,t,a]);return e.jsxs(e.Fragment,{children:[e.jsx(S,{ref:r,sx:{maxWidth:"1280px",border:"1px solid",borderColor:"divider",padding:"8px",overflowX:"auto"},children:e.jsx(S,{sx:{width:"1200px",height:"180px",position:"relative"},children:e.jsx(zt,{option:d,style:{height:"100%",width:"100%"},notMerge:!0,lazyUpdate:!1,opts:{renderer:"canvas"},onEvents:{click:l=>{l.componentType==="series"&&l.data&&c(l.data[0])}}})})}),e.jsx(S,{sx:{display:"flex",justifyContent:"flex-end",mt:1,mr:s?2:5,mb:2},children:e.jsxs(K,{direction:s?"column":"row",spacing:s?2:1,sx:{width:"100%",justifyContent:"flex-start",alignItems:s?"flex-start":"center"},children:[e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #8B5000 0%, #A36200 33%, #C17700 66%, #E29000 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.failed")})]}),e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,bgcolor:"grey.200",border:"1px solid",borderColor:"grey.200"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.without")})]}),e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #9be9a8 0%, #40c463 33%, #30a14e 66%, #216e39 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.succeeded")})]})]})})]})}const Xt=ee(({className:t,...o})=>e.jsx(Se,{...o,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function Le({status:t,message:o="",createdAt:n}){const{t:s}=D(),r=t===T.BACKUPS.STATUS.PROGRESS&&E().diff(n,"hours")>=T.BACKUPS.TIMEOUT_HOURS,a=r&&s("common.timeoutError"),c=t===T.BACKUPS.STATUS.PROGRESS&&!r,i=t===T.BACKUPS.STATUS.SUCCEEDED&&!r;return c?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(L,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):i?e.jsx(H,{type:"success",children:s("common.succeeded")}):e.jsxs(S,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(H,{type:"error",children:s("common.failed")}),e.jsx(Se,{style:{display:"flex",alignItems:"center",flexShrink:0},title:o||a,children:e.jsx(ye,{children:e.jsx(vt,{style:{width:"24px",height:"24px"},color:"error"})})})]})}Le.propTypes={status:m.string.isRequired,message:m.string,createdAt:m.string.isRequired};function Ue({metadata:t={}}){const{t:o}=D();if(q(t))return e.jsx(H,{type:"success",children:o("common.succeeded")});const n=t.count||0,s=t.size||0,r=At(s,{iec:!0}),a=e.jsxs(S,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:[e.jsxs(j,{variant:"body2",children:[o("common.fileCount"),": ",n]}),e.jsxs(j,{variant:"body2",children:[o("common.fileSize"),": ",r]})]});return e.jsxs(S,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(H,{type:"success",children:o("common.succeeded")}),e.jsx(Xt,{title:a,style:{display:"flex",alignItems:"center",flexShrink:0},placement:"left",children:e.jsx(ye,{children:e.jsx(at,{style:{width:"24px",height:"24px"},color:"primary"})})})]})}Ue.propTypes={metadata:m.object};function Oe(){const{t,locale:o}=D(),{spaceGateways:n,backups:s,backupsLoading:r}=O(),a=h.useMemo(()=>[{label:"DID Space",name:"target",options:{customBodyRenderLite:i=>{const{targetUrl:d,targetName:l,status:p,createdAt:f}=s[i],x=p===T.BACKUPS.STATUS.PROGRESS&&E().diff(f,"hours")>=T.BACKUPS.TIMEOUT_HOURS,u=p===T.BACKUPS.STATUS.SUCCEEDED&&!x,k=l||n.find(w=>d?.includes(ge(w?.endpoint)))?.name||"Unknown DID Space";return u?e.jsx(nt,{href:d,target:"_blank",sx:{fontSize:"16px"},children:k}):e.jsx(j,{variant:"body1",sx:{fontSize:"16px"},children:k})}}},{label:t("common.strategy"),name:"strategy",options:{customBodyRender:i=>{const d=t(i===0?"common.auto":"common.manual");return e.jsx(H,{children:d})}}},{label:t("common.startTime"),name:"createdAt",options:{customBodyRender:i=>E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.endTime"),name:"updatedAt",options:{customBodyRender:i=>q(i)?"":E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.status"),name:"status",options:{customBodyRenderLite:i=>{const d=s?.[i]??{},{status:l,message:p,createdAt:f,metadata:x}=d,u=l===T.BACKUPS.STATUS.PROGRESS&&E().diff(f,"hours")>=T.BACKUPS.TIMEOUT_HOURS,k=l===T.BACKUPS.STATUS.PROGRESS&&!u,w=l===T.BACKUPS.STATUS.SUCCEEDED&&!u;return k?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(L,{sx:{marginRight:"4px"},size:"12px"}),t("common.progress")]}):w?e.jsx(Ue,{metadata:x}):e.jsx(Le,{status:l,message:p,createdAt:f})}}}],[s,n,t]),c=h.useMemo(()=>!s?.length,[s]);return e.jsx(e.Fragment,{children:c?e.jsx(S,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",color:"#9397A1",marginTop:"16px",marginBottom:"24px"},children:t("storage.spaces.record.emptyData")}):e.jsx(Pt,{title:"",loading:r,data:s,columns:a,emptyNode:t("storage.spaces.record.emptyData",o),options:{download:!1,filter:!1,print:!1,search:!1,viewColumns:!1}})})}function Zt(){const{t}=D();return e.jsxs(S,{children:[e.jsxs(S,{sx:{display:"flex",gap:3,flexDirection:{xs:"column",md:"row"}},children:[e.jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",minWidth:240},children:[e.jsx(gt,{style:{cursor:"pointer",width:"150px",height:"100%",maxHeight:160}}),e.jsx(j,{sx:{my:2,textAlign:"center",color:"text.secondary"},children:t("storage.spaces.connect.provider")}),e.jsx(ve,{})]}),e.jsxs(S,{sx:{flexGrow:1,minWidth:0},children:[e.jsx(S,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.spaces.backup.records")})}),e.jsx(Ae,{})]})]}),e.jsx(Oe,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function Me({spaceGateway:t,onConfirm:o=()=>{},onCancel:n=()=>{}}){const{t:s}=D(),[r,a]=h.useState(!1),[c,i]=h.useState(!1),d=(f,x)=>{f?.preventDefault(),f?.stopPropagation(),a(x)},l=async f=>{try{f?.stopPropagation(),i(!0),await o?.(t),a(!1)}catch(x){console.error(x),B.error(`${s("storage.space.gateway.delete.failed")}: ${V(x)}`)}finally{a(!1),i(!1)}},p=f=>{d(f,!1),n?.(f)};return e.jsxs(e.Fragment,{children:[e.jsxs(G,{color:"red",onClick:f=>d(f,!0),children:[e.jsx($,{style:{minWidth:24,color:"red"},children:e.jsx(Ut,{fontSize:"small"})}),e.jsx(Y,{style:{color:"red"},children:s("common.disconnect")})]}),e.jsx(rt,{title:s("storage.spaces.gateway.delete.title"),open:r,confirmButton:{text:s("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:c}},cancelButton:{text:s("common.cancel"),props:{size:"small",variant:"outlined",disabled:c}},onConfirm:l,onCancel:p,children:e.jsx(j,{sx:{wordWrap:"break-word"},children:s("storage.spaces.gateway.delete.descForBackup",{name:`${t?.name}`})})})]})}Me.propTypes={spaceGateway:m.shape({name:m.string.isRequired,url:m.string.isRequired,protected:m.bool}).isRequired,onConfirm:m.func,onCancel:m.func};function Ne({spaceGateway:t,selected:o,onDelete:n=()=>{},onConnect:s=()=>{},enableSwitchToSpace:r=!0,backupInProgress:a=!1,...c}){const{abortBlockletBackup:i}=O(),[d,l]=h.useState(null),{t:p}=D(),[f,x]=h.useState(!1),u=(y,b)=>{y.stopPropagation(),y.preventDefault(),l(b&&y.currentTarget)},k=async y=>{try{x(!0),u(y,!1),await s(t)}catch(b){console.error(b),B.error(b.message)}finally{x(!1)}},w=async y=>{try{x(!0),u(y,!1),await i()}catch(b){console.error(b),B.error(b.message)}finally{x(!1)}};return e.jsxs(e.Fragment,{children:[f||t?.loading?e.jsx(L,{sx:{ml:1},size:"24px"}):e.jsx(it,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:y=>u(y,!0),...c,children:e.jsx(ct,{})}),e.jsxs(lt,{id:"simple-menu",anchorEl:d,keepMounted:!0,open:!!d,onClose:y=>u(y,!1),children:[e.jsxs(G,{onClick:y=>{u(y,!1),window.open(ke(t.endpoint?Et(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Wt,{fontSize:"small"})}),e.jsx(Y,{children:p("common.open")})]}),e.jsxs(G,{onClick:y=>{u(y,!1),window.open(ke(It(t.endpoint),{allowDomains:null}))},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Ft,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.strategy.viewBackupFiles")})]}),!o&&r&&e.jsxs(G,{onClick:k,children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Kt,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.connect.switchToSpace")})]}),a&&e.jsxs(G,{onClick:w,children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Lt,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.connect.abortBlockletBackup")})]}),!a&&e.jsx(Me,{spaceGateway:t,onConfirm:async()=>{l(null),await n?.(t)},onCancel:()=>l(null)})]})]})}Ne.propTypes={spaceGateway:m.shape({name:m.string.isRequired,url:m.string.isRequired,protected:m.bool,endpoint:m.string.isRequired,loading:m.bool}).isRequired,selected:m.bool.isRequired,enableSwitchToSpace:m.bool,onDelete:m.func,onConnect:m.func,backupInProgress:m.bool};const Jt=ee(({className:t,...o})=>e.jsx(Se,{...o,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function _e({spaceGateway:t,spaceStatus:o,selected:n,onConnected:s=()=>{},onDeleted:r=()=>{},onBackedUp:a=()=>{}}){const{t:c,locale:i}=D(),{blocklet:d}=U(),{api:l,info:{did:p}}=A(),{appDid:f,appName:x,appDescription:u,scopes:k,appUrl:w,referrer:y}=Ie({blocklet:d}),{backupProgress:b,updateSpaceGateway:te,deleteSpaceGateway:oe,refreshBackupSummary:se,refreshBackups:ne}=O(),[_,M]=h.useState(!1),[I,z]=h.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:c("storage.spaces.authorize.title",{appName:x},i),scan:c("storage.spaces.authorize.scan",{appName:x},i),confirm:"",success:e.jsx(j,{gutterBottom:!0,children:c("storage.spaces.authorize.success")})},onClose:()=>{z(C=>({...C,open:!1}))}}),ae=n&&!_&&o===ue.DISCONNECTED,re=n&&!_&&!t.loading&&o===ue.CONNECTED,F=n&&_&&o===ue.CONNECTED&&b?.progress>=0,Q=async()=>{try{if(await Tt(t?.endpoint)){await l.configBlocklet({input:{did:[d.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),B.success(c("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),s?.(null,t);return}}catch(C){console.error(C),s?.(C,t);return}z(C=>({...C,open:!0,prefix:fe(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:De.create({baseURL:fe(t.url,"space")}).get,extraParams:{appDid:f,appName:x,appDescription:u,scopes:k,appUrl:w,referrer:y,nodeDid:p,spaceDid:t.did}}))},ie=async(C,g)=>{const P=g(C.endpoint),R=ge(P),v=C.space?g(C.space):{};if(t.did&&R!==t.did){z(We=>({...We,open:!1}));const W=c("storage.spaces.gateway.switch.failedForMismatchSpace",{name:v?.name?v.name:""});B.error(W),s?.(new Error(W),t);return}const de={...t,name:v.name??"DID Space",did:v.did??ge(P),endpoint:P};await te(de),z(W=>({...W,open:!1})),s?.(null,de)},ce=async()=>{try{if(_)return;M(!0),await l.backupBlocklet({input:{appDid:d.appDid,to:"spaces"}})}catch(C){console.error(C),B.error(C.message),a?.(C,t)}finally{M(!0)}},le=async()=>{try{await oe(t),B.success(c("storage.spaces.gateway.delete.succeeded",{name:t.name?`(${t.name})`:""})),r?.(null,t)}catch(C){console.error(C),r?.(C,t)}};return h.useEffect(()=>{b?.completed?(n&&(b?.progress===100?(B.success(c("storage.spaces.backupSuccessfully")),a?.(null,t)):b.message&&a?.(new Error(b?.message),t),b.progress=0,b.message=""),M(!1),se(),ne()):b.progress&&M(!0)},[b]),e.jsxs(e.Fragment,{children:[e.jsxs(S,{sx:{display:"flex",alignItems:"center",".action-btn":{borderRadius:1,marginLeft:1}},children:[re&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:ce,children:c("storage.spaces.strategy.backupNow")}),ae&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:Q,children:c("storage.spaces.disconnected.reconnectNow")}),F&&e.jsx(Jt,{title:b?.message&&e.jsx(S,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:e.jsx(j,{variant:"body2",children:b.message})}),children:e.jsxs(pe,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(L,{variant:"determinate",value:b?.progress,size:14,sx:{mr:1}}),b?.progress,"%"]})}),e.jsx(dt,{forceConnected:!1,saveConnect:!1,prefix:I.prefix,open:I.open,popup:!0,action:I.action,baseUrl:I.baseUrl,checkFn:I.checkFn,onSuccess:ie,onClose:I.onClose,checkTimeout:I.checkTimeout,extraParams:I.extraParams,messages:I.messages,locale:i},"get-endpoint")]}),e.jsx(Ne,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:n,onDelete:le,onConnect:Q,enableSwitchToSpace:b?.completed||q(b?.message),backupInProgress:F})]})}_e.propTypes={spaceGateway:m.shape({did:m.string.isRequired,name:m.string.isRequired,url:m.string.isRequired,endpoint:m.string.isRequired,protected:m.bool,loading:m.bool}).isRequired,spaceStatus:m.string.isRequired,selected:m.bool.isRequired,onConnected:m.func,onDeleted:m.func,onBackedUp:m.func};function eo({...t}){const{t:o}=D();return e.jsxs(S,{...t,children:[e.jsx(S,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:o("storage.spaces.backup.records")})}),e.jsx(Ae,{}),e.jsx(Oe,{})]})}function to({...t}){const{t:o}=D(),{autoBackup:n,updateAutoBackup:s}=O(),r=async()=>{try{const a=!n?.enabled;await s({enabled:a}),B.success(o(a?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(a){B.error(a.message)}};return e.jsx(Ot,{checked:!!n?.enabled,onChange:r,name:"enableWelcomePage",labelProps:{label:e.jsx(j,{sx:{marginRight:"8px"},children:e.jsx("span",{children:o("storage.spaces.autoBackup.title")})})},style:{...t.style}})}function oo(){const{t}=D(),{spaceGateways:o,spaceGatewaysLoading:n,spaceGatewayIsSelected:s}=O(),r=n&&!o?.length,a=({spaceGateway:c,spaceStatus:i,selected:d,refresh:l})=>e.jsx(_e,{spaceGateway:c,spaceStatus:i,selected:d,onConnected:()=>l(),onBackedUp:p=>p&&l()});return e.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(S,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:{xs:1,md:2},justifyContent:{xs:"center",md:"flex-start"},alignItems:{xs:"flex-start",md:"center"}},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1},children:t("storage.spaces.connected.title")}),e.jsx(to,{}),e.jsx(ve,{})]}),e.jsx(S,{sx:{mt:2},children:r?e.jsx(S,{sx:{display:"flex",justifyContent:"center"},children:e.jsx(L,{})}):e.jsx(be,{container:!0,spacing:2,children:e.jsx(e.Fragment,{children:o.map(c=>e.jsx(be,{size:{xs:12,md:6},children:e.jsx(ht,{endpoint:c.endpoint,selected:s(c),action:a},c.endpoint)},c.endpoint))})})}),e.jsx(eo,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function so(){const{spaceGatewaysFirstLoading:t,spaceGateways:o}=O();return t?e.jsx(Ee,{relative:"parent",children:e.jsx(L,{})}):q(o)?e.jsx(Zt,{}):e.jsx(oo,{})}function no(){return e.jsx(ze,{children:e.jsx(so,{})})}function ao(){const{spaceGateway:t,settingStorageEndpoint:o,updateSpaceGateway:n,hasStorageEndpoint:s,loading:r,storageEndpoint:a}=yt(),c=xe(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return r?e.jsx(Ee,{relative:"parent",children:e.jsx(L,{})}):e.jsxs(S,{sx:{maxWidth:"md",position:"relative"},children:[s?e.jsx(bt,{spaceGateway:t,settingStorageEndpoint:o}):e.jsx(kt,{}),e.jsx(S,{sx:c,children:e.jsx(jt,{onConnect:n,storageEndpoint:a})})]})}function ro(){const{t}=D();return e.jsxs(St,{children:[e.jsxs(K,{spacing:1,sx:{marginBottom:2},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.appLevel.title")}),e.jsx(j,{sx:{color:"text.secondary"},children:t("storage.appLevel.description")})]}),e.jsx(ao,{})]})}function io({navOrientation:t="vertical",...o}){const{t:n,locale:s}=D(),{blocklet:r}=U(),a=mt({key:"md"}),[c,i]=pt(),d=c.get("tab")||"backup",l=a?"horizontal":t,p=xe(()=>{const w=[{label:n("common.backup"),value:"backup"}],y=r?.capabilities?.didSpace;return(y===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||y===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&w.push({label:n("common.storage"),value:"storage"}),w},[s,l]),x=xe(()=>({backup:e.jsx(no,{}),storage:e.jsx(ro,{})}))[d],u=w=>{i(y=>(w==="backup"?y.delete("tab"):y.set("tab",w),y))};if(p.length<=1)return e.jsx(me,{children:x});const k=e.jsx(ut,{tabs:p,current:d,orientation:l,onChange:u,sx:[{borderRight:1,height:"100%",borderColor:"divider"},l==="horizontal"&&{borderRight:0}]});if(l==="vertical")return e.jsx(S,{...o,children:e.jsxs(K,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(S,{sx:{flexShrink:0},children:e.jsx(je,{left:k})}),e.jsx(S,{sx:{flexGrow:1,minWidth:0},children:e.jsx(me,{sx:{mt:1},children:x})})]})});if(l==="horizontal")return e.jsxs(S,{...o,children:[e.jsx(je,{left:k}),e.jsx(me,{sx:{mt:2},children:x})]})}io.propTypes={navOrientation:m.oneOf(["vertical","horizontal"])};const me=ee(S)`
3
3
  position: relative;
4
4
  min-height: 66vh;
5
5
  overflow: hidden;
@@ -1,4 +1,4 @@
1
- import{c as H,u as W,r as i,a as R,b as $,j as e,o as y,d as Q,e as Y,p as F,f as X,W as D,L as J,g as j,h as K,i as z,k,T as h,G as v,l as Z,m as B,s as q,C as ee}from"./index-BXhWMfbn.js";import{f as ne}from"./index-BojVbZw0.js";import{v as U}from"./index-_RQVek-9.js";import{M as V}from"./metric-D8boeqOT.js";import{C as M}from"./click-to-copy-BlUoHpyD.js";var se=H(function(a,d,r){return a+(r?" ":"")+d.toLowerCase()});const L=i.createContext({}),{Provider:ae,Consumer:he}=L;function te({children:a}){const{api:d,info:r}=W(),[u,l]=i.useState(null),[c,t]=i.useState(!1),[s,p]=i.useState([]),_=4,f=async({silent:o=!0,retries:m=_}={})=>{o||t(!0);try{l(null);const{users:x}=await d.getUsers({input:{teamDid:r.did,paging:{pageSize:100}}});t(!1),p(x)}catch(x){m>0?setTimeout(()=>f({silent:o,retries:m-1}),1e3):(t(!1),l(x))}};i.useEffect(()=>{f({silent:!1})},[]),R($.TeamEvents.userAdded,({teamDid:o})=>{o===r.did&&f()}),R($.TeamEvents.userRemoved,({teamDid:o,user:{did:m}})=>{o===r.did&&p(x=>x.filter(N=>N.did!==m))}),R($.TeamEvents.userUpdated,({teamDid:o})=>{o===r.did&&f()});const b={loading:c,error:u,users:s,refresh:f};return e.jsx(ae,{value:{users:b},children:a})}function re(){const{users:a}=i.useContext(L);return a}const g={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},oe=(a,d)=>{const[r,u]=i.useState(0),l=s=>s>=g.oneDay?g.oneDay:s>=g.oneHour?g.oneHour:s>=g.oneMin?g.oneMin:g.oneSecond,[c,t]=i.useState(l(a/1e3));return i.useEffect(()=>{const s=setInterval(()=>{u(r+c);const p=l(a/1e3+r+c);c!==p&&t(p)},c*1e3);return()=>clearInterval(s)},[c,r]),i.useEffect(()=>{u(0),t(l(a/1e3))},[a]),d(a+r*1e3)};y.number.isRequired,y.func;const ie=async a=>{const d=await a.getNodeEnv();return Object.assign({},d.info||{})};y.number.isRequired;y.string.isRequired,y.string.isRequired,y.string.isRequired;function le(){const{info:a,api:d,loading:r}=W(),{data:u,externalData:l}=Q(),{users:c}=re(),t=Y(()=>ie(d)),{t:s,locale:p}=i.useContext(F),_=X(),f=oe(+new Date-a.startAt,o=>{const m={compact:!0,verbose:!0,locale:B(p)};return Z(o,m)});let b=null;if(r)b=e.jsx(ee,{});else{const o=[{name:s("dashboard.nodeDid"),value:e.jsx(D,{did:a.did,showQrcode:!0})}];a.nodeOwner&&o.push({name:s("dashboard.ownerDid"),value:e.jsx(D,{did:a.nodeOwner.did,showQrcode:!0})});let m=[];a.launcher&&(m=[{name:s("common.did"),value:e.jsx(D,{did:a.launcher.did,showQrcode:!0})},{name:s("common.type"),value:a.launcher.type},{name:s("launcher.provider"),value:a.launcher.provider},{name:s("launcher.adminUrl"),value:e.jsx(J,{target:"_blank",href:a.launcher.url,underline:"hover",children:a.launcher.url})}]);const x=(n,w)=>!n&&!w?"-":n==="-"?n:!w||w==="-"?e.jsxs(h,{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}):e.jsxs(h,{component:"ul",children:[e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}),e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV6"}),e.jsx(M,{children:w})]})]}),N=()=>{const n=[{name:`${s("common.internalIp")}`,value:x(t.value.ip.internalV4,t.value.ip.internalV6)},{name:`${s("common.externalIp")}`,value:x(t.value.ip.externalV4,t.value.ip.externalV6)}];return t.value.docker?[]:n},T=t.value?[{name:`${s("common.version")}`,value:a.version},...N(),{name:`${s("common.os")}`,value:t.value.os},t.value.docker?{name:`${s("common.docker")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null,t.value.gitpod?{name:`${s("common.gitpod")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null].filter(Boolean):[];Array.isArray(K(t,"value.blockletEngines",null))&&t.value.blockletEngines.filter(n=>n.visible&&n.available).forEach(n=>{T.push({name:n.displayName,value:e.jsx(j,{type:"success",children:`${n.version}`||"N/A"})})});const G=c.length,A=c.filter(n=>n.approved).length;let P=G;A&&(P+=`<small><strong>${se(s("common.approved"))} ${A}</strong></small>`);let S=0,C=0;u&&(S=u.length,C=u.filter(n=>z.isBlockletRunning(n)).length),Array.isArray(l)&&(S+=l.length,C+=l.filter(n=>z.isBlockletRunning(n)).length);let I=S;C&&(I+=`<small>${s("common.running")} ${C}</small>`);const O=[{name:s("common.blocklets"),value:I},{name:s("common.members"),value:P},{name:s("common.uptime"),value:f},{name:s("common.created"),value:ne(new Date(a.createdAt).getTime(),B(p))}];let E=[];t.value&&t.value.disk&&Object.values(t.value.disk).some(n=>n>0)&&(E=[{name:s("common.blockletsStorage"),value:k(t.value.disk.blocklets||0).toUpperCase()},{name:s("common.dataStorage"),value:k(t.value.disk.data||0).toUpperCase()},{name:s("common.logStorage"),value:k(t.value.disk.log||0).toUpperCase()},{name:s("common.cacheStorage"),value:k(t.value.disk.cache||0).toUpperCase()},{name:s("common.coreStorage"),value:k(t.value.disk.app||0).toUpperCase()}]),b=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.overview")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:O.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),E.length>0&&e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.storage")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:E.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.meta")}),e.jsxs(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:[e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.dAddress")}),o.map(n=>e.jsx(U,{nameWidth:150,name:n.name,children:n.value},n.name)),m.length>0&&e.jsxs("div",{style:{marginTop:_.spacing(8)},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.launcher")}),m.map(n=>e.jsx(U,{nameWidth:150,name:n.name,children:n.value},n.name))]})]},"address"),e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.env")}),T.map(n=>e.jsx(U,{valueComponent:"div",nameWidth:150,name:n.name,children:n.value},n.name))]},"environment")]})]})]})}return e.jsx(ce,{children:b})}const ce=q.main`
1
+ import{c as H,u as W,r as i,a as R,b as $,j as e,o as y,d as Q,e as Y,p as F,f as X,W as D,L as J,g as j,h as K,i as z,k,T as h,G as v,l as Z,m as B,s as q,C as ee}from"./index-DsEBS9e4.js";import{f as ne}from"./index-BojVbZw0.js";import{v as U}from"./index-CiCnkusy.js";import{M as V}from"./metric-DWK7z3FN.js";import{C as M}from"./click-to-copy-DLb2iRRo.js";var se=H(function(a,d,r){return a+(r?" ":"")+d.toLowerCase()});const L=i.createContext({}),{Provider:ae,Consumer:he}=L;function te({children:a}){const{api:d,info:r}=W(),[u,l]=i.useState(null),[c,t]=i.useState(!1),[s,p]=i.useState([]),_=4,f=async({silent:o=!0,retries:m=_}={})=>{o||t(!0);try{l(null);const{users:x}=await d.getUsers({input:{teamDid:r.did,paging:{pageSize:100}}});t(!1),p(x)}catch(x){m>0?setTimeout(()=>f({silent:o,retries:m-1}),1e3):(t(!1),l(x))}};i.useEffect(()=>{f({silent:!1})},[]),R($.TeamEvents.userAdded,({teamDid:o})=>{o===r.did&&f()}),R($.TeamEvents.userRemoved,({teamDid:o,user:{did:m}})=>{o===r.did&&p(x=>x.filter(N=>N.did!==m))}),R($.TeamEvents.userUpdated,({teamDid:o})=>{o===r.did&&f()});const b={loading:c,error:u,users:s,refresh:f};return e.jsx(ae,{value:{users:b},children:a})}function re(){const{users:a}=i.useContext(L);return a}const g={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},oe=(a,d)=>{const[r,u]=i.useState(0),l=s=>s>=g.oneDay?g.oneDay:s>=g.oneHour?g.oneHour:s>=g.oneMin?g.oneMin:g.oneSecond,[c,t]=i.useState(l(a/1e3));return i.useEffect(()=>{const s=setInterval(()=>{u(r+c);const p=l(a/1e3+r+c);c!==p&&t(p)},c*1e3);return()=>clearInterval(s)},[c,r]),i.useEffect(()=>{u(0),t(l(a/1e3))},[a]),d(a+r*1e3)};y.number.isRequired,y.func;const ie=async a=>{const d=await a.getNodeEnv();return Object.assign({},d.info||{})};y.number.isRequired;y.string.isRequired,y.string.isRequired,y.string.isRequired;function le(){const{info:a,api:d,loading:r}=W(),{data:u,externalData:l}=Q(),{users:c}=re(),t=Y(()=>ie(d)),{t:s,locale:p}=i.useContext(F),_=X(),f=oe(+new Date-a.startAt,o=>{const m={compact:!0,verbose:!0,locale:B(p)};return Z(o,m)});let b=null;if(r)b=e.jsx(ee,{});else{const o=[{name:s("dashboard.nodeDid"),value:e.jsx(D,{did:a.did,showQrcode:!0})}];a.nodeOwner&&o.push({name:s("dashboard.ownerDid"),value:e.jsx(D,{did:a.nodeOwner.did,showQrcode:!0})});let m=[];a.launcher&&(m=[{name:s("common.did"),value:e.jsx(D,{did:a.launcher.did,showQrcode:!0})},{name:s("common.type"),value:a.launcher.type},{name:s("launcher.provider"),value:a.launcher.provider},{name:s("launcher.adminUrl"),value:e.jsx(J,{target:"_blank",href:a.launcher.url,underline:"hover",children:a.launcher.url})}]);const x=(n,w)=>!n&&!w?"-":n==="-"?n:!w||w==="-"?e.jsxs(h,{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}):e.jsxs(h,{component:"ul",children:[e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}),e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV6"}),e.jsx(M,{children:w})]})]}),N=()=>{const n=[{name:`${s("common.internalIp")}`,value:x(t.value.ip.internalV4,t.value.ip.internalV6)},{name:`${s("common.externalIp")}`,value:x(t.value.ip.externalV4,t.value.ip.externalV6)}];return t.value.docker?[]:n},T=t.value?[{name:`${s("common.version")}`,value:a.version},...N(),{name:`${s("common.os")}`,value:t.value.os},t.value.docker?{name:`${s("common.docker")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null,t.value.gitpod?{name:`${s("common.gitpod")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null].filter(Boolean):[];Array.isArray(K(t,"value.blockletEngines",null))&&t.value.blockletEngines.filter(n=>n.visible&&n.available).forEach(n=>{T.push({name:n.displayName,value:e.jsx(j,{type:"success",children:`${n.version}`||"N/A"})})});const G=c.length,A=c.filter(n=>n.approved).length;let P=G;A&&(P+=`<small><strong>${se(s("common.approved"))} ${A}</strong></small>`);let S=0,C=0;u&&(S=u.length,C=u.filter(n=>z.isBlockletRunning(n)).length),Array.isArray(l)&&(S+=l.length,C+=l.filter(n=>z.isBlockletRunning(n)).length);let I=S;C&&(I+=`<small>${s("common.running")} ${C}</small>`);const O=[{name:s("common.blocklets"),value:I},{name:s("common.members"),value:P},{name:s("common.uptime"),value:f},{name:s("common.created"),value:ne(new Date(a.createdAt).getTime(),B(p))}];let E=[];t.value&&t.value.disk&&Object.values(t.value.disk).some(n=>n>0)&&(E=[{name:s("common.blockletsStorage"),value:k(t.value.disk.blocklets||0).toUpperCase()},{name:s("common.dataStorage"),value:k(t.value.disk.data||0).toUpperCase()},{name:s("common.logStorage"),value:k(t.value.disk.log||0).toUpperCase()},{name:s("common.cacheStorage"),value:k(t.value.disk.cache||0).toUpperCase()},{name:s("common.coreStorage"),value:k(t.value.disk.app||0).toUpperCase()}]),b=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.overview")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:O.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),E.length>0&&e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.storage")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:E.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.meta")}),e.jsxs(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:[e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.dAddress")}),o.map(n=>e.jsx(U,{nameWidth:150,name:n.name,children:n.value},n.name)),m.length>0&&e.jsxs("div",{style:{marginTop:_.spacing(8)},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.launcher")}),m.map(n=>e.jsx(U,{nameWidth:150,name:n.name,children:n.value},n.name))]})]},"address"),e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.env")}),T.map(n=>e.jsx(U,{valueComponent:"div",nameWidth:150,name:n.name,children:n.value},n.name))]},"environment")]})]})]})}return e.jsx(ce,{children:b})}const ce=q.main`
2
2
  .page-header {
3
3
  display: flex;
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{r as i,j as t,K as o,br as c,o as n}from"./index-BXhWMfbn.js";const h=e=>i.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.36096 2.3999C7.04725 2.3999 6.76249 2.58326 6.63267 2.86886L0.872671 15.5409C0.825415 15.6448 0.800964 15.7577 0.800964 15.8719V15.9999V27.3919C0.800964 27.8337 1.15914 28.1919 1.60096 28.1919H30.401C30.8428 28.1919 31.201 27.8337 31.201 27.3919V15.8719C31.201 15.7577 31.1765 15.6448 31.1293 15.5409L25.3693 2.86886C25.2394 2.58326 24.9547 2.3999 24.641 2.3999H7.36096ZM2.40096 16.7999V26.5919H29.601V16.7932C29.5669 16.7976 29.5321 16.7999 29.4968 16.7999H22.3993L20.3328 19.8997C20.1845 20.1222 19.9347 20.2559 19.6672 20.2559H11.6032C11.3357 20.2559 11.0859 20.1222 10.9375 19.8997L8.87104 16.7999H2.40096ZM29.2167 15.1999H21.9712C21.7037 15.1999 21.4539 15.3336 21.3056 15.5561L19.239 18.6559H12.0313L9.96483 15.5561C9.81645 15.3336 9.56667 15.1999 9.29919 15.1999H2.78519L7.8761 3.9999H24.1258L29.2167 15.1999Z",fill:"currentColor"})),a=c(o)`
1
+ import{r as i,j as t,K as o,br as c,o as n}from"./index-DsEBS9e4.js";const h=e=>i.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.36096 2.3999C7.04725 2.3999 6.76249 2.58326 6.63267 2.86886L0.872671 15.5409C0.825415 15.6448 0.800964 15.7577 0.800964 15.8719V15.9999V27.3919C0.800964 27.8337 1.15914 28.1919 1.60096 28.1919H30.401C30.8428 28.1919 31.201 27.8337 31.201 27.3919V15.8719C31.201 15.7577 31.1765 15.6448 31.1293 15.5409L25.3693 2.86886C25.2394 2.58326 24.9547 2.3999 24.641 2.3999H7.36096ZM2.40096 16.7999V26.5919H29.601V16.7932C29.5669 16.7976 29.5321 16.7999 29.4968 16.7999H22.3993L20.3328 19.8997C20.1845 20.1222 19.9347 20.2559 19.6672 20.2559H11.6032C11.3357 20.2559 11.0859 20.1222 10.9375 19.8997L8.87104 16.7999H2.40096ZM29.2167 15.1999H21.9712C21.7037 15.1999 21.4539 15.3336 21.3056 15.5561L19.239 18.6559H12.0313L9.96483 15.5561C9.81645 15.3336 9.56667 15.1999 9.29919 15.1999H2.78519L7.8761 3.9999H24.1258L29.2167 15.1999Z",fill:"currentColor"})),a=c(o)`
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  align-items: center;
@@ -1 +1 @@
1
- import{u as f,j as s,C as d,A as w,ax as v,cu as C,cv as u,ae as j,aH as I,K as P,bA as S}from"./index-BXhWMfbn.js";import{I as E}from"./invitation-BgD3_vhn.js";import{g as R}from"./get-safe-url-I2vTcMcF.js";import"./index-SpBKG2cj.js";import"./index-C8GO1leJ.js";import"./emotion-cache.browser.esm-Bm19UyCk.js";import"./sdk-B9JEpY9l.js";import"./wrap-locale-C5BuyfxR.js";import"./index-f_-DLUob.js";function T(n){const{searchParams:a}=new URL(window.location.href),g=w(),{api:i,session:r}=v(),{info:l}=f(),c=a.get("redirect"),p=a.get("id"),o=C(async()=>{if(!p)return null;const{data:t}=await i.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=u(()=>{if(o.error)throw o.error;return o?.data}),x=u(async(t,h=e=>e)=>{t&&(t.sessionToken&&j(h(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const e=decodeURIComponent(c);e.startsWith(I.WELLKNOWN_SERVICE_PATH_PREFIX)?g(e,{replace:!0}):window.location.href=R(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return o.loading?s.jsx(d,{}):s.jsx(P,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(E,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>S(t,l),checkFn:i.get,onLoginSuccess:x,passportColor:"default",onLogin:r.login})})}function _(){return f().loading?s.jsx(d,{}):s.jsx(T,{})}export{_ as default};
1
+ import{u as f,j as s,C as d,A as w,ax as v,cu as C,cv as u,ae as j,aH as I,K as P,bA as S}from"./index-DsEBS9e4.js";import{I as E}from"./invitation-O2oACqkb.js";import{g as R}from"./get-safe-url-BjGmijAx.js";import"./index-BN0b1Gve.js";import"./index-C9qZuSIK.js";import"./emotion-cache.browser.esm-CHmknBa-.js";import"./sdk-BQM2VdGY.js";import"./wrap-locale-9aJSq-p0.js";import"./index-CVfrZI-X.js";function T(n){const{searchParams:a}=new URL(window.location.href),g=w(),{api:i,session:r}=v(),{info:l}=f(),c=a.get("redirect"),p=a.get("id"),o=C(async()=>{if(!p)return null;const{data:t}=await i.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=u(()=>{if(o.error)throw o.error;return o?.data}),x=u(async(t,h=e=>e)=>{t&&(t.sessionToken&&j(h(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const e=decodeURIComponent(c);e.startsWith(I.WELLKNOWN_SERVICE_PATH_PREFIX)?g(e,{replace:!0}):window.location.href=R(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return o.loading?s.jsx(d,{}):s.jsx(P,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(E,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>S(t,l),checkFn:i.get,onLoginSuccess:x,passportColor:"default",onLogin:r.login})})}function _(){return f().loading?s.jsx(d,{}):s.jsx(T,{})}export{_ as default};
@@ -1 +1 @@
1
- import{cr as x,r as o,p as g,cs as r,B as u,j as s,K as m,ct as d}from"./index-BXhWMfbn.js";function P(){const i=x(),{blocklets:c,refresh:l}=i,{t:p}=o.useContext(g),y=r.generateKey(),[a]=u();return o.useEffect(()=>{const n=r.getNotificationQueryParams(y)??{},t=a.get("entityId"),e=a.get("severity"),f={...n,...e?{severity:e==="all"?[]:e.split(","),paging:{...n.paging,page:1}}:{},...t?{entityId:t==="all"?[]:t.split(",")}:{},componentDid:[]};l(f)},[]),s.jsxs(m,{children:[s.jsx("h1",{children:p("notification.title")}),s.jsx(d,{tabType:"line",blocklets:c,context:i,filterType:"entity",type:"server"})]})}export{P as default};
1
+ import{cr as x,r as o,p as g,cs as r,B as u,j as s,K as m,ct as d}from"./index-DsEBS9e4.js";function P(){const i=x(),{blocklets:c,refresh:l}=i,{t:p}=o.useContext(g),y=r.generateKey(),[a]=u();return o.useEffect(()=>{const n=r.getNotificationQueryParams(y)??{},t=a.get("entityId"),e=a.get("severity"),f={...n,...e?{severity:e==="all"?[]:e.split(","),paging:{...n.paging,page:1}}:{},...t?{entityId:t==="all"?[]:t.split(",")}:{},componentDid:[]};l(f)},[]),s.jsxs(m,{children:[s.jsx("h1",{children:p("notification.title")}),s.jsx(d,{tabType:"line",blocklets:c,context:i,filterType:"entity",type:"server"})]})}export{P as default};
@@ -1,4 +1,4 @@
1
- import{aF as Ge,j as e,bn as gt,r as g,bC as Q,bf as H,H as q,aH as D,g as xt,o as d,h as ee,at as bt,ay as jt,K as C,T as U,V as X,eO as Fe,O as Pe,is as Ye,bj as Te,aU as Ie,R as Ee,dI as Ne,b3 as qe,b1 as Ae,C as Qe,f as Xe,f0 as Je,aP as De,W as yt,as as Ze,it as et,v as Oe,f2 as tt,bq as je,fI as st,dC as St,s as ie,af as pe,G as Ue,au as vt,iu as Ct,iv as Nt,$ as nt,iw as wt,ix as Rt,iy as Tt,iz as It,N as Et,bx as it,E as At,J as Dt,P as Ot,S as Lt,Q as $e,iA as kt,a3 as Ft}from"./index-BXhWMfbn.js";import{d as Pt,H as at,g as _t}from"./index-B78zCe1U.js";import{R as _e,S as Bt}from"./actions-C9R61uoD.js";import{B as zt}from"./index-DfDQYXHJ.js";import{S as me}from"./shorten-label-B41dh7aP.js";import{v as ot}from"./index-_RQVek-9.js";import{T as Wt}from"./html-title-CRD93SB4.js";import{R as Mt}from"./Refresh-C7TD1E1-.js";import{D as Kt,g as Ht}from"./traffic-Bj6CYWfW.js";import{u as qt}from"./use-mobile-CMlrBzPG.js";import"./FilterList-CBCl7dbD.js";import"./CSSTransition-D0ZJqc3V.js";import"./emotion-cache.browser.esm-Bm19UyCk.js";import"./index-9AtlSAca.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-DZ2epQ9y.js";import"./index-_nnYDXM-.js";import"./TableSearch-B7cAFRBU.js";import"./Search-nsuHiAfr.js";import"./Clear-DmQaaBy1.js";import"./MoreVert-Cy81E-t5.js";import"./useLocalStorage-pzfOZ90P.js";import"./url-evaluation-Dt0gDvx3.js";import"./get-safe-url-I2vTcMcF.js";import"./ButtonGroup-DWV84mOp.js";import"./getValidReactChildren-Ao387m76.js";import"./permission-yeSmXMT8.js";import"./index.esm-DLVaVv6G.js";import"./collapse-DKt3eXVz.js";import"./blocklet-BMb-DKa8.js";import"./Switch-Ch-Dpg3J.js";import"./iframe-SmTUaAma.js";import"./ChevronLeft-xNPAnZUM.js";import"./ChevronRight-hEVn0ieo.js";import"./index-DBii9-f-.js";import"./base-chart-BuPD5Oqs.js";import"./index-D4AEyg0i.js";import"./AdapterDayjs-Dsdzg0fF.js";import"./useThemeProps-BgkGtCgI.js";import"./visuallyHidden-Dan1xhjv.js";const Ut=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"})),$t=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:Vt,Consumer:on}=rt;function Gt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:o}}=gt(),[l,x]=g.useState([]),[f,y]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),h=Q(()=>s.meta?.did,[s]),[b,S]=g.useState([]),[B,_]=g.useState({}),R=Q(()=>l.length?new Set(l.map(m=>m.id)):new Set,[l]),$=async({page:m=1,pageSize:N=20,...O}={})=>{if(!h)return[];try{const A={paging:{page:m,pageSize:N},...O,teamDid:h,dateRange:O.dateRange?[H(O.dateRange[0]).toISOString(),H(O.dateRange[1]).toISOString()]:void 0},{dids:w,...L}=A;let P="";w&&w.includes("system")&&(P="system");const ae=w?w.filter(oe=>oe!=="system"):[],se={...L,source:P,componentDids:ae},Z=await n.getNotificationSendLog({input:se});return _(se),x(Z.list),y(Z.paging),Z.list}catch(A){return q.error(A.message),[]}},M=async()=>{const m=await n.getNotificationComponents({input:{teamDid:h}});S(m.componentDids)},k=g.useCallback(m=>{const N=s.children.find(O=>O.meta?.did===m);if(N)return N.ancestors=[s],N},[s]),F=async({notificationId:m,receivers:N,channels:O,...A})=>{await n.resendNotification({input:{teamDid:h,notificationId:m,receivers:N,channels:O.map(w=>w==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:w==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:w),...A}})},V=g.useCallback(async m=>(await n.getUser({input:{teamDid:h,user:{did:m},options:{enableConnectedAccount:!0}}})).user,[n,h]),G=g.useCallback(async({page:m=1,pageSize:N=20,...O}={})=>{try{const A={paging:{page:m,pageSize:N},...O,userName:O.searchText||"",teamDid:h,dateRange:O.dateRange?[H(O.dateRange[0]).toISOString(),H(O.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:A})}catch(A){throw q.error(A.message),A}},[n,h]);g.useEffect(()=>{h&&M()},[h]),o(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,m=>{R.has(m.notificationId)&&$(B)},[R,B]),o(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,m=>{R.has(m.id)||$(B)},[R,B]);const J={fetch:$,data:l,paging:f,blocklet:s,getComponent:k,resendNotification:F,getUser:V,componentDids:b,getReceivers:G,inService:r,teamDid:h};return e.jsx(Vt,{value:{notificationRecords:J},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 Yt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Yt[t],children:t})}const Qt=(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:o,reason:l="",channel:x="wallet"}=n,f=o?t("notification.sendStatus.sentTime",{date:bt(o,s)}):"",y=Qt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:f,reason:y}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:f}:{status:"pending",title:t("notification.sendStatus.pending"),reason:y,sentTime:f}}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=ee(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Jt=(t,s)=>{const n=ee(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Zt=t=>({enabled:ee(t,"extra.notifications.wallet",!0)}),es=t=>({enabled:ee(t,"extra.webhooks",[]).length>0}),xe=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),ts=(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})}]:[],be=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},ss=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=ee(t,l,[]);return be(x)}const n=ee(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return be(l)}const o={};return ke.forEach(l=>{const x=`${l}SendRecord`,f=ee(t,x,[]),y=be(f);o[l]=y}),r.length>0&&r.forEach(l=>{const x=n[l]??[],f=be(x);o[l]=f}),o},ye=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},Se=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ns=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 te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:o,title:l="",sentTime:x="",reason:f=""}=t,y=[l,f].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(U,{color:"inherit",sx:{fontSize:12},children:y}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(C,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(C,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(C,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[o]}}),e.jsx(C,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[o]}})]}),e.jsx(U,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ve.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function ve({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:o}=X();return e.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(U,{children:[s,": "]}),t.map(l=>{const x=lt(r,o,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(C,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(te,{config:x,enableTooltip:!1,children:x.title})}),onDelete:f=>n(f,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:o,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:o.map(f=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(f.value??f)>-1,onChange:y=>{const h=[...t];y.target.checked?h[n]=[...h[n],f.value??f]:h[n]=h[n].filter(b=>b!==(f.value??f)),s(h[n],n,r)},name:f.value??f}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(f)})},f.value??f))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(te,{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:o}){const{t:l,locale:x}=X(),f=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(te,{config:f,showTitle:!0}),f.status!=="success"&&e.jsx(Ne,{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:o,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=X(),r=H().toDate(),[o,l]=g.useState(null),x=g.useCallback(h=>{l(o?null:h.currentTarget)},[o]),f=!!o,y=g.useCallback(h=>{if(!h.startDate||!h.endDate){q.error("Please select a date range");return}if(H(h.startDate).isAfter(h.endDate)||!H(h.startDate).isValid()||!H(h.endDate).isValid()){q.error("Invalid date range");return}s([h.startDate,h.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(U,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(Ne,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[qe(t[0],n)," - ",qe(t[1],n)]})}),e.jsx(Ae,{open:f,anchorEl:o,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Kt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Ht(r),onChange:y})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=X();return!s?.filterList?.filter(o=>o.length).length?null:e.jsxs(C,{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(Pt.TableFilterList,{...s,ItemComponent:t})})]})}function Ke({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const o=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",...o&&l?{onDelete:o}:{}})}Ke.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const is=[{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}=X(),[o,l]=g.useState(is),[x,f]=g.useState(!0),y=(b,S)=>{S.checked=b.target.checked;const B=o.map(_=>({..._,checked:_.value===S.value?S.checked:_.checked}));l(B)},h=b=>{b.stopPropagation(),n({channels:o.filter(S=>S.checked).map(S=>S.value),isResendFailedOnly:x})};return e.jsxs(C,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(U,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(C,{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:o.map(b=>e.jsx(Ie,{control:e.jsx(Ee,{checked:b.checked,onChange:S=>y(S,b),name:b.value}),label:b.label},b.value))})]})}),e.jsx(C,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:b=>f(b.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(C,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(Ne,{onClick:b=>{b.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Ne,{onClick:h,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Qe,{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:o}=X(),l=Xe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:f,inService:y,teamDid:h,getUser:b,blocklet:S}=Be(),[B,_]=g.useState(!1),[R,$]=g.useState([]),M=De({anchorEl:null,position:null}),k=De({anchorEl:null,position:null}),[F,V]=g.useState(null),[G,J]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[m,N]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[O,A]=g.useState([]),w=[{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"}],L=async()=>{if(!B&&t)try{_(!0);const i=await f({notificationId:t,...m}),a=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,h,y)}}));$(a),J(i.paging),_(!1)}catch(i){q.error(i.message),_(!1)}};g.useEffect(()=>{L()},[m]);const P=i=>{i.stopPropagation();const a=i.currentTarget;k.anchorEl=a;const c=a.getBoundingClientRect();k.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:P,children:r("notification.resend")})}):null,se={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:G.page-1,rowsPerPage:G.pageSize,count:G.total,searchText:m.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:O,onRowSelectionChange:(i,a)=>{A(a.map(c=>c.dataIndex))},customToolbarSelect:ae},Z=({page:i,rowsPerPage:a,searchText:c,filterList:v})=>{const[,z=[],Y=[],K=[]]=v;m.pageSize!==a?N(W=>({...W,pageSize:a,page:1})):m.page!==i+1?N(W=>({...W,page:i+1})):m.searchText!==c?N(W=>({...W,searchText:c,page:1})):pe(z,m.walletSendStatus)?pe(Y,m.pushKitSendStatus)?pe(K,m.emailSendStatus)||N(W=>({...W,emailSendStatus:K,page:1})):N(W=>({...W,pushKitSendStatus:Y,page:1})):N(W=>({...W,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,a)=>{if(!a)return!1;const c=await b(a);return c?i==="wallet"?Zt(c):i==="email"?Xt(S,c):i==="pushKit"?Jt(S,c):i==="webhook"?es(c):!0:!1},[b,S]),we=g.useCallback(i=>ts(r,i),[r]),ne=()=>{M.anchorEl=null,M.position=null,V(null)},re=()=>{k.anchorEl=null,k.position=null},ge=async(i,a,c=!0,v="")=>{if(!(!a.length||!i.length))try{s(i,a,c,v),k.anchorEl||(await xe(.5),ne())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:a})=>{const c=O.map(v=>R[v].receiver);await ge(i,c,a),await xe(.5),re(),A([])},u=async(i,a=[],c=!0)=>{try{await ge(["webhook"],[i.receiver],c,a)}catch(v){q.error(v.response?v.response.statusText:v.message)}},j=async(i,a,c,v=[],z=!0)=>{if(i.stopPropagation(),ss(a,c)>=4){q.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await u(a,v,z);return}if(i){const K=i.currentTarget,W=K.getBoundingClientRect();M.anchorEl=K,M.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}V({channel:c});try{const K=await oe(c,a.receiver);await xe(1),V({channel:c,result:K}),(typeof K=="boolean"&&K||St(K)&&Object.values(K).every(W=>!!W))&&(await s([c],[a.receiver],z),k.anchorEl||(await xe(.5),ne()))}catch(K){q.error(K.message)}},I=i=>{N(a=>({...a,dateRange:i,page:1}))},E=(i,a,c,v)=>{i.stopPropagation();const z=c.filter(Y=>Y!==a);N(Y=>({...Y,[v]:z,page:1}))},T=Q(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:a,receiver:c}=R[i];return a?e.jsxs(C,{"data-cy":`member-name-${a.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${a.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:a.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:m.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Wallet",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[1].options.filterList,"walletSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:a,index:c,column:v,filterValues:w})},customBodyRenderLite:i=>{const{walletSendStatus:a,walletSendAt:c,walletSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"wallet",onResend:z=>j(z,R[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:a,pushKitSendAt:c,pushKitSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"pushkit",onResend:z=>j(z,R[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:m.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Push Kit",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[2].options.filterList,"pushKitSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:a,emailSendAt:c,emailSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"email",onResend:z=>j(z,R[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:m.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Email",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[3].options.filterList,"emailSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Email",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:a}=R[i];if(!a)return null;const c=Object.entries(a)[0];if(!c)return null;const[v,z]=c,Y=z[0];return e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(C,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:v},v),e.jsx(ce,{status:Y.status,updatedAt:Y.sendAt,reason:Y.failedReason,channel:"webhook",onResend:K=>j(K,R[i],"webhook",[v],!1)})]},v)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:a}=R[i];return e.jsx(et,{value:a,locale:o,shouldUpdate:!0})}}}],[R,o,m,r]),le=[e.jsx(We,{value:m.dateRange,onChange:I},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:B,startIcon:e.jsx(Mt,{}),onClick:()=>L(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(C,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(os,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:o,loading:B,columns:T,data:R,onChange:Z,options:se,customButtons:le,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:a=>e.jsx(Ke,{...a,canDelete:()=>!1})})}}),M.anchorEl&&e.jsx(Ae,{open:!!M.anchorEl,anchorReference:"anchorPosition",anchorPosition:M.position,onClose:ne,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(rs,{children:[e.jsxs(U,{variant:"body1",component:"div",className:"check-title",children:[F?.channel," Checking"]}),e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:we(F?.channel).map(i=>{const{type:a,pass:c,fail:v}=i;return!F?.result||F?.result?.[a]?e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:F?.result?.[a]?je.success.main:"inherit"},children:[F?.result?e.jsx($t,{}):e.jsx(Qe,{size:12,sx:{color:je.primary.main}}),e.jsx("span",{children:c})]},a):e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:je.error.main},children:[e.jsx(Ut,{}),e.jsx("span",{children:v})]},a)})})]})}),k.anchorEl&&e.jsx(Ae,{open:!!k.anchorEl,anchorReference:"anchorPosition",anchorPosition:k.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:re,onConfirm:p})})]})})})}const as=g.memo(ft),os=ie.div`
1
+ import{aF as Ge,j as e,bn as gt,r as g,bC as Q,bf as H,H as q,aH as D,g as xt,o as d,h as ee,at as bt,ay as jt,K as C,T as U,V as X,eO as Fe,O as Pe,ij as Ye,bj as Te,aU as Ie,R as Ee,dI as Ne,b3 as qe,b1 as Ae,C as Qe,f as Xe,f0 as Je,aP as De,W as yt,as as Ze,ik as et,v as Oe,f2 as tt,bq as je,fI as st,dC as St,s as ie,af as pe,G as Ue,au as vt,il as Ct,im as Nt,$ as nt,io as wt,ip as Rt,iq as Tt,ir as It,N as Et,bx as it,E as At,J as Dt,P as Ot,S as Lt,Q as $e,is as kt,a3 as Ft}from"./index-DsEBS9e4.js";import{d as Pt,H as at,g as _t}from"./index-29YXcG1w.js";import{R as _e,S as Bt}from"./actions-5Y9-88Ql.js";import{B as zt}from"./index-BDQcjWHA.js";import{S as me}from"./shorten-label-DA5be4J4.js";import{v as ot}from"./index-CiCnkusy.js";import{T as Wt}from"./html-title-Ca-JgCsh.js";import{R as Mt}from"./Refresh-B0XmjeJ3.js";import{D as Kt,g as Ht}from"./traffic-8l-nBZJu.js";import{u as qt}from"./use-mobile-CIJO5Cwx.js";import"./FilterList-BJOykCHp.js";import"./CSSTransition-Bw2ddZTQ.js";import"./emotion-cache.browser.esm-CHmknBa-.js";import"./index-BtreM3NC.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-UJplX9mU.js";import"./index-Bl14cNgY.js";import"./TableSearch-ChIn3Aak.js";import"./Search-DhSwmkQ1.js";import"./Clear-CKva4eBi.js";import"./MoreVert-DDyUOkUj.js";import"./useLocalStorage-g990sECo.js";import"./url-evaluation-DkReRdN8.js";import"./get-safe-url-BjGmijAx.js";import"./ButtonGroup-DPiY53vd.js";import"./getValidReactChildren-DJbrx6gC.js";import"./permission-CW0DzNy6.js";import"./index.esm-BANIJT6f.js";import"./collapse-CC77PAqz.js";import"./blocklet-CPwKiPX6.js";import"./Switch-C5R2keD_.js";import"./iframe-2aVrQOtY.js";import"./ChevronLeft-gcWuOwnw.js";import"./ChevronRight-Czhq6YeB.js";import"./index-DBii9-f-.js";import"./base-chart-7GQt2N1M.js";import"./index-hA-y-TpL.js";import"./AdapterDayjs-DalMJwhD.js";import"./useThemeProps-CWahcrog.js";import"./visuallyHidden-Dan1xhjv.js";const Ut=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"})),$t=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:Vt,Consumer:on}=rt;function Gt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:o}}=gt(),[l,x]=g.useState([]),[f,y]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),h=Q(()=>s.meta?.did,[s]),[b,S]=g.useState([]),[B,_]=g.useState({}),R=Q(()=>l.length?new Set(l.map(m=>m.id)):new Set,[l]),$=async({page:m=1,pageSize:N=20,...O}={})=>{if(!h)return[];try{const A={paging:{page:m,pageSize:N},...O,teamDid:h,dateRange:O.dateRange?[H(O.dateRange[0]).toISOString(),H(O.dateRange[1]).toISOString()]:void 0},{dids:w,...L}=A;let P="";w&&w.includes("system")&&(P="system");const ae=w?w.filter(oe=>oe!=="system"):[],se={...L,source:P,componentDids:ae},Z=await n.getNotificationSendLog({input:se});return _(se),x(Z.list),y(Z.paging),Z.list}catch(A){return q.error(A.message),[]}},M=async()=>{const m=await n.getNotificationComponents({input:{teamDid:h}});S(m.componentDids)},k=g.useCallback(m=>{const N=s.children.find(O=>O.meta?.did===m);if(N)return N.ancestors=[s],N},[s]),F=async({notificationId:m,receivers:N,channels:O,...A})=>{await n.resendNotification({input:{teamDid:h,notificationId:m,receivers:N,channels:O.map(w=>w==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:w==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:w),...A}})},V=g.useCallback(async m=>(await n.getUser({input:{teamDid:h,user:{did:m},options:{enableConnectedAccount:!0}}})).user,[n,h]),G=g.useCallback(async({page:m=1,pageSize:N=20,...O}={})=>{try{const A={paging:{page:m,pageSize:N},...O,userName:O.searchText||"",teamDid:h,dateRange:O.dateRange?[H(O.dateRange[0]).toISOString(),H(O.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:A})}catch(A){throw q.error(A.message),A}},[n,h]);g.useEffect(()=>{h&&M()},[h]),o(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,m=>{R.has(m.notificationId)&&$(B)},[R,B]),o(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,m=>{R.has(m.id)||$(B)},[R,B]);const J={fetch:$,data:l,paging:f,blocklet:s,getComponent:k,resendNotification:F,getUser:V,componentDids:b,getReceivers:G,inService:r,teamDid:h};return e.jsx(Vt,{value:{notificationRecords:J},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 Yt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Yt[t],children:t})}const Qt=(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:o,reason:l="",channel:x="wallet"}=n,f=o?t("notification.sendStatus.sentTime",{date:bt(o,s)}):"",y=Qt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:f,reason:y}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:f}:{status:"pending",title:t("notification.sendStatus.pending"),reason:y,sentTime:f}}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=ee(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Jt=(t,s)=>{const n=ee(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Zt=t=>({enabled:ee(t,"extra.notifications.wallet",!0)}),es=t=>({enabled:ee(t,"extra.webhooks",[]).length>0}),xe=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),ts=(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})}]:[],be=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},ss=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=ee(t,l,[]);return be(x)}const n=ee(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return be(l)}const o={};return ke.forEach(l=>{const x=`${l}SendRecord`,f=ee(t,x,[]),y=be(f);o[l]=y}),r.length>0&&r.forEach(l=>{const x=n[l]??[],f=be(x);o[l]=f}),o},ye=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},Se=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ns=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 te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:o,title:l="",sentTime:x="",reason:f=""}=t,y=[l,f].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(U,{color:"inherit",sx:{fontSize:12},children:y}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(C,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(C,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(C,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[o]}}),e.jsx(C,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[o]}})]}),e.jsx(U,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ve.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function ve({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:o}=X();return e.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(U,{children:[s,": "]}),t.map(l=>{const x=lt(r,o,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(C,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(te,{config:x,enableTooltip:!1,children:x.title})}),onDelete:f=>n(f,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:o,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:o.map(f=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(f.value??f)>-1,onChange:y=>{const h=[...t];y.target.checked?h[n]=[...h[n],f.value??f]:h[n]=h[n].filter(b=>b!==(f.value??f)),s(h[n],n,r)},name:f.value??f}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(f)})},f.value??f))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(te,{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:o}){const{t:l,locale:x}=X(),f=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(te,{config:f,showTitle:!0}),f.status!=="success"&&e.jsx(Ne,{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:o,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=X(),r=H().toDate(),[o,l]=g.useState(null),x=g.useCallback(h=>{l(o?null:h.currentTarget)},[o]),f=!!o,y=g.useCallback(h=>{if(!h.startDate||!h.endDate){q.error("Please select a date range");return}if(H(h.startDate).isAfter(h.endDate)||!H(h.startDate).isValid()||!H(h.endDate).isValid()){q.error("Invalid date range");return}s([h.startDate,h.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(U,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(Ne,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[qe(t[0],n)," - ",qe(t[1],n)]})}),e.jsx(Ae,{open:f,anchorEl:o,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Kt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Ht(r),onChange:y})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=X();return!s?.filterList?.filter(o=>o.length).length?null:e.jsxs(C,{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(Pt.TableFilterList,{...s,ItemComponent:t})})]})}function Ke({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const o=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",...o&&l?{onDelete:o}:{}})}Ke.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const is=[{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}=X(),[o,l]=g.useState(is),[x,f]=g.useState(!0),y=(b,S)=>{S.checked=b.target.checked;const B=o.map(_=>({..._,checked:_.value===S.value?S.checked:_.checked}));l(B)},h=b=>{b.stopPropagation(),n({channels:o.filter(S=>S.checked).map(S=>S.value),isResendFailedOnly:x})};return e.jsxs(C,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(U,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(C,{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:o.map(b=>e.jsx(Ie,{control:e.jsx(Ee,{checked:b.checked,onChange:S=>y(S,b),name:b.value}),label:b.label},b.value))})]})}),e.jsx(C,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:b=>f(b.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(C,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(Ne,{onClick:b=>{b.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Ne,{onClick:h,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Qe,{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:o}=X(),l=Xe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:f,inService:y,teamDid:h,getUser:b,blocklet:S}=Be(),[B,_]=g.useState(!1),[R,$]=g.useState([]),M=De({anchorEl:null,position:null}),k=De({anchorEl:null,position:null}),[F,V]=g.useState(null),[G,J]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[m,N]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[O,A]=g.useState([]),w=[{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"}],L=async()=>{if(!B&&t)try{_(!0);const i=await f({notificationId:t,...m}),a=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,h,y)}}));$(a),J(i.paging),_(!1)}catch(i){q.error(i.message),_(!1)}};g.useEffect(()=>{L()},[m]);const P=i=>{i.stopPropagation();const a=i.currentTarget;k.anchorEl=a;const c=a.getBoundingClientRect();k.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:P,children:r("notification.resend")})}):null,se={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:G.page-1,rowsPerPage:G.pageSize,count:G.total,searchText:m.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:O,onRowSelectionChange:(i,a)=>{A(a.map(c=>c.dataIndex))},customToolbarSelect:ae},Z=({page:i,rowsPerPage:a,searchText:c,filterList:v})=>{const[,z=[],Y=[],K=[]]=v;m.pageSize!==a?N(W=>({...W,pageSize:a,page:1})):m.page!==i+1?N(W=>({...W,page:i+1})):m.searchText!==c?N(W=>({...W,searchText:c,page:1})):pe(z,m.walletSendStatus)?pe(Y,m.pushKitSendStatus)?pe(K,m.emailSendStatus)||N(W=>({...W,emailSendStatus:K,page:1})):N(W=>({...W,pushKitSendStatus:Y,page:1})):N(W=>({...W,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,a)=>{if(!a)return!1;const c=await b(a);return c?i==="wallet"?Zt(c):i==="email"?Xt(S,c):i==="pushKit"?Jt(S,c):i==="webhook"?es(c):!0:!1},[b,S]),we=g.useCallback(i=>ts(r,i),[r]),ne=()=>{M.anchorEl=null,M.position=null,V(null)},re=()=>{k.anchorEl=null,k.position=null},ge=async(i,a,c=!0,v="")=>{if(!(!a.length||!i.length))try{s(i,a,c,v),k.anchorEl||(await xe(.5),ne())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:a})=>{const c=O.map(v=>R[v].receiver);await ge(i,c,a),await xe(.5),re(),A([])},u=async(i,a=[],c=!0)=>{try{await ge(["webhook"],[i.receiver],c,a)}catch(v){q.error(v.response?v.response.statusText:v.message)}},j=async(i,a,c,v=[],z=!0)=>{if(i.stopPropagation(),ss(a,c)>=4){q.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await u(a,v,z);return}if(i){const K=i.currentTarget,W=K.getBoundingClientRect();M.anchorEl=K,M.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}V({channel:c});try{const K=await oe(c,a.receiver);await xe(1),V({channel:c,result:K}),(typeof K=="boolean"&&K||St(K)&&Object.values(K).every(W=>!!W))&&(await s([c],[a.receiver],z),k.anchorEl||(await xe(.5),ne()))}catch(K){q.error(K.message)}},I=i=>{N(a=>({...a,dateRange:i,page:1}))},E=(i,a,c,v)=>{i.stopPropagation();const z=c.filter(Y=>Y!==a);N(Y=>({...Y,[v]:z,page:1}))},T=Q(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:a,receiver:c}=R[i];return a?e.jsxs(C,{"data-cy":`member-name-${a.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${a.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:a.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:m.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Wallet",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[1].options.filterList,"walletSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:a,index:c,column:v,filterValues:w})},customBodyRenderLite:i=>{const{walletSendStatus:a,walletSendAt:c,walletSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"wallet",onResend:z=>j(z,R[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:a,pushKitSendAt:c,pushKitSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"pushkit",onResend:z=>j(z,R[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:m.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Push Kit",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[2].options.filterList,"pushKitSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:a,emailSendAt:c,emailSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"email",onResend:z=>j(z,R[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:m.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Email",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[3].options.filterList,"emailSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Email",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:a}=R[i];if(!a)return null;const c=Object.entries(a)[0];if(!c)return null;const[v,z]=c,Y=z[0];return e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(C,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:v},v),e.jsx(ce,{status:Y.status,updatedAt:Y.sendAt,reason:Y.failedReason,channel:"webhook",onResend:K=>j(K,R[i],"webhook",[v],!1)})]},v)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:a}=R[i];return e.jsx(et,{value:a,locale:o,shouldUpdate:!0})}}}],[R,o,m,r]),le=[e.jsx(We,{value:m.dateRange,onChange:I},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:B,startIcon:e.jsx(Mt,{}),onClick:()=>L(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(C,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(os,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:o,loading:B,columns:T,data:R,onChange:Z,options:se,customButtons:le,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:a=>e.jsx(Ke,{...a,canDelete:()=>!1})})}}),M.anchorEl&&e.jsx(Ae,{open:!!M.anchorEl,anchorReference:"anchorPosition",anchorPosition:M.position,onClose:ne,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(rs,{children:[e.jsxs(U,{variant:"body1",component:"div",className:"check-title",children:[F?.channel," Checking"]}),e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:we(F?.channel).map(i=>{const{type:a,pass:c,fail:v}=i;return!F?.result||F?.result?.[a]?e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:F?.result?.[a]?je.success.main:"inherit"},children:[F?.result?e.jsx($t,{}):e.jsx(Qe,{size:12,sx:{color:je.primary.main}}),e.jsx("span",{children:c})]},a):e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:je.error.main},children:[e.jsx(Ut,{}),e.jsx("span",{children:v})]},a)})})]})}),k.anchorEl&&e.jsx(Ae,{open:!!k.anchorEl,anchorReference:"anchorPosition",anchorPosition:k.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:re,onConfirm:p})})]})})})}const as=g.memo(ft),os=ie.div`
2
2
  td.MuiTableCell-footer {
3
3
  border: none !important;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{dw as W,eH as ne,r as C,eI as La,dx as Ci}from"./index-BXhWMfbn.js";import{c as Ii}from"./redux-DfszZyTl.js";var me,Sr;function wi(){if(Sr)return me;Sr=1;function e(){this.__data__=[],this.size=0}return me=e,me}var _e,Or;function Ha(){if(Or)return _e;Or=1;function e(t,r){return t===r||t!==t&&r!==r}return _e=e,_e}var De,Tr;function ue(){if(Tr)return De;Tr=1;var e=Ha();function t(r,n){for(var a=r.length;a--;)if(e(r[a][0],n))return a;return-1}return De=t,De}var Se,Cr;function Ei(){if(Cr)return Se;Cr=1;var e=ue(),t=Array.prototype,r=t.splice;function n(a){var i=this.__data__,o=e(i,a);if(o<0)return!1;var u=i.length-1;return o==u?i.pop():r.call(i,o,1),--this.size,!0}return Se=n,Se}var Oe,Ir;function Pi(){if(Ir)return Oe;Ir=1;var e=ue();function t(r){var n=this.__data__,a=e(n,r);return a<0?void 0:n[a][1]}return Oe=t,Oe}var Te,wr;function Ai(){if(wr)return Te;wr=1;var e=ue();function t(r){return e(this.__data__,r)>-1}return Te=t,Te}var Ce,Er;function Ri(){if(Er)return Ce;Er=1;var e=ue();function t(r,n){var a=this.__data__,i=e(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return Ce=t,Ce}var Ie,Pr;function se(){if(Pr)return Ie;Pr=1;var e=wi(),t=Ei(),r=Pi(),n=Ai(),a=Ri();function i(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Ie=i,Ie}var we,Ar;function ki(){if(Ar)return we;Ar=1;var e=se();function t(){this.__data__=new e,this.size=0}return we=t,we}var Ee,Rr;function qi(){if(Rr)return Ee;Rr=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Ee=e,Ee}var Pe,kr;function Mi(){if(kr)return Pe;kr=1;function e(t){return this.__data__.get(t)}return Pe=e,Pe}var Ae,qr;function ji(){if(qr)return Ae;qr=1;function e(t){return this.__data__.has(t)}return Ae=e,Ae}var Re,Mr;function Ua(){if(Mr)return Re;Mr=1;var e=typeof W=="object"&&W&&W.Object===Object&&W;return Re=e,Re}var ke,jr;function j(){if(jr)return ke;jr=1;var e=Ua(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return ke=r,ke}var qe,xr;function fr(){if(xr)return qe;xr=1;var e=j(),t=e.Symbol;return qe=t,qe}var Me,Nr;function xi(){if(Nr)return Me;Nr=1;var e=fr(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function i(o){var u=r.call(o,a),s=o[a];try{o[a]=void 0;var c=!0}catch{}var l=n.call(o);return c&&(u?o[a]=s:delete o[a]),l}return Me=i,Me}var je,$r;function Ni(){if($r)return je;$r=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return je=r,je}var xe,Lr;function ce(){if(Lr)return xe;Lr=1;var e=fr(),t=xi(),r=Ni(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?a:n:i&&i in Object(u)?t(u):r(u)}return xe=o,xe}var Ne,Hr;function Fa(){if(Hr)return Ne;Hr=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Ne=e,Ne}var $e,Ur;function Ga(){if(Ur)return $e;Ur=1;var e=ce(),t=Fa(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(u){if(!t(u))return!1;var s=e(u);return s==n||s==a||s==r||s==i}return $e=o,$e}var Le,Fr;function $i(){if(Fr)return Le;Fr=1;var e=j(),t=e["__core-js_shared__"];return Le=t,Le}var He,Gr;function Li(){if(Gr)return He;Gr=1;var e=$i(),t=function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!t&&t in n}return He=r,He}var Ue,Br;function Ba(){if(Br)return Ue;Br=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return Ue=r,Ue}var Fe,Kr;function Hi(){if(Kr)return Fe;Kr=1;var e=Ga(),t=Li(),r=Fa(),n=Ba(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,s=o.toString,c=u.hasOwnProperty,l=RegExp("^"+s.call(c).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(v){if(!r(v)||t(v))return!1;var h=e(v)?l:i;return h.test(n(v))}return Fe=d,Fe}var Ge,Wr;function Ui(){if(Wr)return Ge;Wr=1;function e(t,r){return t?.[r]}return Ge=e,Ge}var Be,zr;function N(){if(zr)return Be;zr=1;var e=Hi(),t=Ui();function r(n,a){var i=t(n,a);return e(i)?i:void 0}return Be=r,Be}var Ke,Vr;function lr(){if(Vr)return Ke;Vr=1;var e=N(),t=j(),r=e(t,"Map");return Ke=r,Ke}var We,Xr;function fe(){if(Xr)return We;Xr=1;var e=N(),t=e(Object,"create");return We=t,We}var ze,Yr;function Fi(){if(Yr)return ze;Yr=1;var e=fe();function t(){this.__data__=e?e(null):{},this.size=0}return ze=t,ze}var Ve,Jr;function Gi(){if(Jr)return Ve;Jr=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Ve=e,Ve}var Xe,Qr;function Bi(){if(Qr)return Xe;Qr=1;var e=fe(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var o=this.__data__;if(e){var u=o[i];return u===t?void 0:u}return n.call(o,i)?o[i]:void 0}return Xe=a,Xe}var Ye,Zr;function Ki(){if(Zr)return Ye;Zr=1;var e=fe(),t=Object.prototype,r=t.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:r.call(i,a)}return Ye=n,Ye}var Je,en;function Wi(){if(en)return Je;en=1;var e=fe(),t="__lodash_hash_undefined__";function r(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&a===void 0?t:a,this}return Je=r,Je}var Qe,tn;function zi(){if(tn)return Qe;tn=1;var e=Fi(),t=Gi(),r=Bi(),n=Ki(),a=Wi();function i(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Qe=i,Qe}var Ze,rn;function Vi(){if(rn)return Ze;rn=1;var e=zi(),t=se(),r=lr();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Ze=n,Ze}var et,nn;function Xi(){if(nn)return et;nn=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return et=e,et}var tt,an;function le(){if(an)return tt;an=1;var e=Xi();function t(r,n){var a=r.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return tt=t,tt}var rt,on;function Yi(){if(on)return rt;on=1;var e=le();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return rt=t,rt}var nt,un;function Ji(){if(un)return nt;un=1;var e=le();function t(r){return e(this,r).get(r)}return nt=t,nt}var at,sn;function Qi(){if(sn)return at;sn=1;var e=le();function t(r){return e(this,r).has(r)}return at=t,at}var it,cn;function Zi(){if(cn)return it;cn=1;var e=le();function t(r,n){var a=e(this,r),i=a.size;return a.set(r,n),this.size+=a.size==i?0:1,this}return it=t,it}var ot,fn;function Ka(){if(fn)return ot;fn=1;var e=Vi(),t=Yi(),r=Ji(),n=Qi(),a=Zi();function i(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,ot=i,ot}var ut,ln;function eo(){if(ln)return ut;ln=1;var e=se(),t=lr(),r=Ka(),n=200;function a(i,o){var u=this.__data__;if(u instanceof e){var s=u.__data__;if(!t||s.length<n-1)return s.push([i,o]),this.size=++u.size,this;u=this.__data__=new r(s)}return u.set(i,o),this.size=u.size,this}return ut=a,ut}var st,dn;function to(){if(dn)return st;dn=1;var e=se(),t=ki(),r=qi(),n=Mi(),a=ji(),i=eo();function o(u){var s=this.__data__=new e(u);this.size=s.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,st=o,st}var ct,gn;function ro(){if(gn)return ct;gn=1;function e(t,r){for(var n=-1,a=Array(t);++n<t;)a[n]=r(n);return a}return ct=e,ct}var ft,hn;function de(){if(hn)return ft;hn=1;function e(t){return t!=null&&typeof t=="object"}return ft=e,ft}var lt,vn;function no(){if(vn)return lt;vn=1;var e=ce(),t=de(),r="[object Arguments]";function n(a){return t(a)&&e(a)==r}return lt=n,lt}var dt,pn;function ao(){if(pn)return dt;pn=1;var e=no(),t=de(),r=Object.prototype,n=r.hasOwnProperty,a=r.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(o){return t(o)&&n.call(o,"callee")&&!a.call(o,"callee")};return dt=i,dt}var gt,yn;function dr(){if(yn)return gt;yn=1;var e=Array.isArray;return gt=e,gt}var H={exports:{}},ht,bn;function io(){if(bn)return ht;bn=1;function e(){return!1}return ht=e,ht}H.exports;var mn;function Wa(){return mn||(mn=1,function(e,t){var r=j(),n=io(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,u=o?r.Buffer:void 0,s=u?u.isBuffer:void 0,c=s||n;e.exports=c}(H,H.exports)),H.exports}var vt,_n;function oo(){if(_n)return vt;_n=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,a){var i=typeof n;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<a}return vt=r,vt}var pt,Dn;function za(){if(Dn)return pt;Dn=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return pt=t,pt}var yt,Sn;function uo(){if(Sn)return yt;Sn=1;var e=ce(),t=za(),r=de(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",u="[object Error]",s="[object Function]",c="[object Map]",l="[object Number]",d="[object Object]",v="[object RegExp]",h="[object Set]",b="[object String]",_="[object WeakMap]",S="[object ArrayBuffer]",O="[object DataView]",p="[object Float32Array]",m="[object Float64Array]",f="[object Int8Array]",T="[object Int16Array]",D="[object Int32Array]",y="[object Uint8Array]",w="[object Uint8ClampedArray]",E="[object Uint16Array]",P="[object Uint32Array]",I={};I[p]=I[m]=I[f]=I[T]=I[D]=I[y]=I[w]=I[E]=I[P]=!0,I[n]=I[a]=I[S]=I[i]=I[O]=I[o]=I[u]=I[s]=I[c]=I[l]=I[d]=I[v]=I[h]=I[b]=I[_]=!1;function M(k){return r(k)&&t(k.length)&&!!I[e(k)]}return yt=M,yt}var bt,On;function so(){if(On)return bt;On=1;function e(t){return function(r){return t(r)}}return bt=e,bt}var U={exports:{}};U.exports;var Tn;function co(){return Tn||(Tn=1,function(e,t){var r=Ua(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,u=function(){try{var s=a&&a.require&&a.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}}();e.exports=u}(U,U.exports)),U.exports}var mt,Cn;function Va(){if(Cn)return mt;Cn=1;var e=uo(),t=so(),r=co(),n=r&&r.isTypedArray,a=n?t(n):e;return mt=a,mt}var _t,In;function fo(){if(In)return _t;In=1;var e=ro(),t=ao(),r=dr(),n=Wa(),a=oo(),i=Va(),o=Object.prototype,u=o.hasOwnProperty;function s(c,l){var d=r(c),v=!d&&t(c),h=!d&&!v&&n(c),b=!d&&!v&&!h&&i(c),_=d||v||h||b,S=_?e(c.length,String):[],O=S.length;for(var p in c)(l||u.call(c,p))&&!(_&&(p=="length"||h&&(p=="offset"||p=="parent")||b&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||a(p,O)))&&S.push(p);return S}return _t=s,_t}var Dt,wn;function lo(){if(wn)return Dt;wn=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return Dt=t,Dt}var St,En;function go(){if(En)return St;En=1;function e(t,r){return function(n){return t(r(n))}}return St=e,St}var Ot,Pn;function ho(){if(Pn)return Ot;Pn=1;var e=go(),t=e(Object.keys,Object);return Ot=t,Ot}var Tt,An;function vo(){if(An)return Tt;An=1;var e=lo(),t=ho(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!e(i))return t(i);var o=[];for(var u in Object(i))n.call(i,u)&&u!="constructor"&&o.push(u);return o}return Tt=a,Tt}var Ct,Rn;function po(){if(Rn)return Ct;Rn=1;var e=Ga(),t=za();function r(n){return n!=null&&t(n.length)&&!e(n)}return Ct=r,Ct}var It,kn;function yo(){if(kn)return It;kn=1;var e=fo(),t=vo(),r=po();function n(a){return r(a)?e(a):t(a)}return It=n,It}var wt,qn;function bo(){if(qn)return wt;qn=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=0,o=[];++n<a;){var u=t[n];r(u,n,t)&&(o[i++]=u)}return o}return wt=e,wt}var Et,Mn;function mo(){if(Mn)return Et;Mn=1;function e(){return[]}return Et=e,Et}var Pt,jn;function _o(){if(jn)return Pt;jn=1;var e=bo(),t=mo(),r=Object.prototype,n=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(o){return o==null?[]:(o=Object(o),e(a(o),function(u){return n.call(o,u)}))}:t;return Pt=i,Pt}var At,xn;function Do(){if(xn)return At;xn=1;function e(t,r){for(var n=-1,a=r.length,i=t.length;++n<a;)t[i+n]=r[n];return t}return At=e,At}var Rt,Nn;function So(){if(Nn)return Rt;Nn=1;var e=Do(),t=dr();function r(n,a,i){var o=a(n);return t(n)?o:e(o,i(n))}return Rt=r,Rt}var kt,$n;function Oo(){if($n)return kt;$n=1;var e=So(),t=_o(),r=yo();function n(a){return e(a,r,t)}return kt=n,kt}var qt,Ln;function To(){if(Ln)return qt;Ln=1;var e=N(),t=j(),r=e(t,"DataView");return qt=r,qt}var Mt,Hn;function Co(){if(Hn)return Mt;Hn=1;var e=N(),t=j(),r=e(t,"Promise");return Mt=r,Mt}var jt,Un;function Io(){if(Un)return jt;Un=1;var e=N(),t=j(),r=e(t,"Set");return jt=r,jt}var xt,Fn;function wo(){if(Fn)return xt;Fn=1;var e=N(),t=j(),r=e(t,"WeakMap");return xt=r,xt}var Nt,Gn;function Eo(){if(Gn)return Nt;Gn=1;var e=To(),t=lr(),r=Co(),n=Io(),a=wo(),i=ce(),o=Ba(),u="[object Map]",s="[object Object]",c="[object Promise]",l="[object Set]",d="[object WeakMap]",v="[object DataView]",h=o(e),b=o(t),_=o(r),S=o(n),O=o(a),p=i;return(e&&p(new e(new ArrayBuffer(1)))!=v||t&&p(new t)!=u||r&&p(r.resolve())!=c||n&&p(new n)!=l||a&&p(new a)!=d)&&(p=function(m){var f=i(m),T=f==s?m.constructor:void 0,D=T?o(T):"";if(D)switch(D){case h:return v;case b:return u;case _:return c;case S:return l;case O:return d}return f}),Nt=p,Nt}var $t,Bn;function Po(){if(Bn)return $t;Bn=1;var e=j(),t=e.Uint8Array;return $t=t,$t}var Lt,Kn;function Ao(){if(Kn)return Lt;Kn=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Lt=t,Lt}var Ht,Wn;function Ro(){if(Wn)return Ht;Wn=1;function e(t){return this.__data__.has(t)}return Ht=e,Ht}var Ut,zn;function ko(){if(zn)return Ut;zn=1;var e=Ka(),t=Ao(),r=Ro();function n(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new e;++i<o;)this.add(a[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Ut=n,Ut}var Ft,Vn;function qo(){if(Vn)return Ft;Vn=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(t[n],n,t))return!0;return!1}return Ft=e,Ft}var Gt,Xn;function Mo(){if(Xn)return Gt;Xn=1;function e(t,r){return t.has(r)}return Gt=e,Gt}var Bt,Yn;function Xa(){if(Yn)return Bt;Yn=1;var e=ko(),t=qo(),r=Mo(),n=1,a=2;function i(o,u,s,c,l,d){var v=s&n,h=o.length,b=u.length;if(h!=b&&!(v&&b>h))return!1;var _=d.get(o),S=d.get(u);if(_&&S)return _==u&&S==o;var O=-1,p=!0,m=s&a?new e:void 0;for(d.set(o,u),d.set(u,o);++O<h;){var f=o[O],T=u[O];if(c)var D=v?c(T,f,O,u,o,d):c(f,T,O,o,u,d);if(D!==void 0){if(D)continue;p=!1;break}if(m){if(!t(u,function(y,w){if(!r(m,w)&&(f===y||l(f,y,s,c,d)))return m.push(w)})){p=!1;break}}else if(!(f===T||l(f,T,s,c,d))){p=!1;break}}return d.delete(o),d.delete(u),p}return Bt=i,Bt}var Kt,Jn;function jo(){if(Jn)return Kt;Jn=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a,i){n[++r]=[i,a]}),n}return Kt=e,Kt}var Wt,Qn;function xo(){if(Qn)return Wt;Qn=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a){n[++r]=a}),n}return Wt=e,Wt}var zt,Zn;function No(){if(Zn)return zt;Zn=1;var e=fr(),t=Po(),r=Ha(),n=Xa(),a=jo(),i=xo(),o=1,u=2,s="[object Boolean]",c="[object Date]",l="[object Error]",d="[object Map]",v="[object Number]",h="[object RegExp]",b="[object Set]",_="[object String]",S="[object Symbol]",O="[object ArrayBuffer]",p="[object DataView]",m=e?e.prototype:void 0,f=m?m.valueOf:void 0;function T(D,y,w,E,P,I,M){switch(w){case p:if(D.byteLength!=y.byteLength||D.byteOffset!=y.byteOffset)return!1;D=D.buffer,y=y.buffer;case O:return!(D.byteLength!=y.byteLength||!I(new t(D),new t(y)));case s:case c:case v:return r(+D,+y);case l:return D.name==y.name&&D.message==y.message;case h:case _:return D==y+"";case d:var k=a;case b:var be=E&o;if(k||(k=i),D.size!=y.size&&!be)return!1;var K=M.get(D);if(K)return K==y;E|=u,M.set(D,y);var Ti=n(k(D),k(y),E,P,I,M);return M.delete(D),Ti;case S:if(f)return f.call(D)==f.call(y)}return!1}return zt=T,zt}var Vt,ea;function $o(){if(ea)return Vt;ea=1;var e=Oo(),t=1,r=Object.prototype,n=r.hasOwnProperty;function a(i,o,u,s,c,l){var d=u&t,v=e(i),h=v.length,b=e(o),_=b.length;if(h!=_&&!d)return!1;for(var S=h;S--;){var O=v[S];if(!(d?O in o:n.call(o,O)))return!1}var p=l.get(i),m=l.get(o);if(p&&m)return p==o&&m==i;var f=!0;l.set(i,o),l.set(o,i);for(var T=d;++S<h;){O=v[S];var D=i[O],y=o[O];if(s)var w=d?s(y,D,O,o,i,l):s(D,y,O,i,o,l);if(!(w===void 0?D===y||c(D,y,u,s,l):w)){f=!1;break}T||(T=O=="constructor")}if(f&&!T){var E=i.constructor,P=o.constructor;E!=P&&"constructor"in i&&"constructor"in o&&!(typeof E=="function"&&E instanceof E&&typeof P=="function"&&P instanceof P)&&(f=!1)}return l.delete(i),l.delete(o),f}return Vt=a,Vt}var Xt,ta;function Lo(){if(ta)return Xt;ta=1;var e=to(),t=Xa(),r=No(),n=$o(),a=Eo(),i=dr(),o=Wa(),u=Va(),s=1,c="[object Arguments]",l="[object Array]",d="[object Object]",v=Object.prototype,h=v.hasOwnProperty;function b(_,S,O,p,m,f){var T=i(_),D=i(S),y=T?l:a(_),w=D?l:a(S);y=y==c?d:y,w=w==c?d:w;var E=y==d,P=w==d,I=y==w;if(I&&o(_)){if(!o(S))return!1;T=!0,E=!1}if(I&&!E)return f||(f=new e),T||u(_)?t(_,S,O,p,m,f):r(_,S,y,O,p,m,f);if(!(O&s)){var M=E&&h.call(_,"__wrapped__"),k=P&&h.call(S,"__wrapped__");if(M||k){var be=M?_.value():_,K=k?S.value():S;return f||(f=new e),m(be,K,O,p,f)}}return I?(f||(f=new e),n(_,S,O,p,m,f)):!1}return Xt=b,Xt}var Yt,ra;function Ho(){if(ra)return Yt;ra=1;var e=Lo(),t=de();function r(n,a,i,o,u){return n===a?!0:n==null||a==null||!t(n)&&!t(a)?n!==n&&a!==a:e(n,a,i,o,r,u)}return Yt=r,Yt}var Jt,na;function Hf(){if(na)return Jt;na=1;var e=Ho();function t(r,n){return e(r,n)}return Jt=t,Jt}var R;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(R||(R={}));function g(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];if(!e){var i;if(t===void 0)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;i=new Error(t.replace(/%s/g,function(){return n[o++]})),i.name="Invariant Violation"}throw i.framesToPop=1,i}}var gr="dnd-core/INIT_COORDS",ge="dnd-core/BEGIN_DRAG",hr="dnd-core/PUBLISH_DRAG_SOURCE",he="dnd-core/HOVER",ve="dnd-core/DROP",pe="dnd-core/END_DRAG";function aa(e,t){return{type:gr,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function X(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?X=function(r){return typeof r}:X=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},X(e)}function Uo(e,t,r){return t.split(".").reduce(function(n,a){return n&&n[a]?n[a]:r||null},e)}function Fo(e,t){return e.filter(function(r){return r!==t})}function Ya(e){return X(e)==="object"}function Go(e,t){var r=new Map,n=function(o){r.set(o,r.has(o)?r.get(o)+1:1)};e.forEach(n),t.forEach(n);var a=[];return r.forEach(function(i,o){i===1&&a.push(o)}),a}function Bo(e,t){return e.filter(function(r){return t.indexOf(r)>-1})}var Ko={type:gr,payload:{clientOffset:null,sourceClientOffset:null}};function Wo(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},a=n.publishSource,i=a===void 0?!0:a,o=n.clientOffset,u=n.getSourceClientOffset,s=e.getMonitor(),c=e.getRegistry();e.dispatch(aa(o)),zo(r,s,c);var l=Yo(r,s);if(l===null){e.dispatch(Ko);return}var d=null;if(o){if(!u)throw new Error("getSourceClientOffset must be defined");Vo(u),d=u(l)}e.dispatch(aa(o,d));var v=c.getSource(l),h=v.beginDrag(s,l);Xo(h),c.pinSource(l);var b=c.getSourceType(l);return{type:ge,payload:{itemType:b,item:h,sourceId:l,clientOffset:o||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}}function zo(e,t,r){g(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){g(r.getSource(n),"Expected sourceIds to be registered.")})}function Vo(e){g(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Xo(e){g(Ya(e),"Item must be an object.")}function Yo(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Jo(e){return function(){var r=e.getMonitor();if(r.isDragging())return{type:hr}}}function nr(e,t){return t===null?e===null:Array.isArray(e)?e.some(function(r){return r===t}):e===t}function Qo(e){return function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.clientOffset;Zo(r);var i=r.slice(0),o=e.getMonitor(),u=e.getRegistry();eu(i,o,u);var s=o.getItemType();return tu(i,u,s),ru(i,o,u),{type:he,payload:{targetIds:i,clientOffset:a||null}}}}function Zo(e){g(Array.isArray(e),"Expected targetIds to be an array.")}function eu(e,t,r){g(t.isDragging(),"Cannot call hover while not dragging."),g(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var a=e[n];g(e.lastIndexOf(a)===n,"Expected targetIds to be unique in the passed array.");var i=r.getTarget(a);g(i,"Expected targetIds to be registered.")}}function tu(e,t,r){for(var n=e.length-1;n>=0;n--){var a=e[n],i=t.getTargetType(a);nr(i,r)||e.splice(n,1)}}function ru(e,t,r){e.forEach(function(n){var a=r.getTarget(n);a.hover(t,n)})}function ia(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function oa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ia(Object(r),!0).forEach(function(n){nu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ia(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function au(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.getMonitor(),a=e.getRegistry();iu(n);var i=su(n);i.forEach(function(o,u){var s=ou(o,u,a,n),c={type:ve,payload:{dropResult:oa(oa({},r),s)}};e.dispatch(c)})}}function iu(e){g(e.isDragging(),"Cannot call drop while not dragging."),g(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function ou(e,t,r,n){var a=r.getTarget(e),i=a?a.drop(n,e):void 0;return uu(i),typeof i>"u"&&(i=t===0?{}:n.getDropResult()),i}function uu(e){g(typeof e>"u"||Ya(e),"Drop result must either be an object or undefined.")}function su(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function cu(e){return function(){var r=e.getMonitor(),n=e.getRegistry();fu(r);var a=r.getSourceId();if(a!=null){var i=n.getSource(a,!0);i.endDrag(r,a),n.unpinSource()}return{type:pe}}}function fu(e){g(e.isDragging(),"Cannot call endDrag while not dragging.")}function lu(e){return{beginDrag:Wo(e),publishDragSource:Jo(e),hover:Qo(e),drop:au(e),endDrag:cu(e)}}var du=function(t,r){return t===r};function gu(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function hu(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:du;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function ua(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function sa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ua(Object(r),!0).forEach(function(n){vu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ua(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ca={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function pu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ca,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case gr:case ge:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case he:return gu(e.clientOffset,r.clientOffset)?e:sa(sa({},e),{},{clientOffset:r.clientOffset});case pe:case ve:return ca;default:return e}}var vr="dnd-core/ADD_SOURCE",pr="dnd-core/ADD_TARGET",yr="dnd-core/REMOVE_SOURCE",ye="dnd-core/REMOVE_TARGET";function yu(e){return{type:vr,payload:{sourceId:e}}}function bu(e){return{type:pr,payload:{targetId:e}}}function mu(e){return{type:yr,payload:{sourceId:e}}}function _u(e){return{type:ye,payload:{targetId:e}}}function fa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fa(Object(r),!0).forEach(function(n){Du(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fa(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Du(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Su={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ou(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Su,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case ge:return A(A({},e),{},{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case hr:return A(A({},e),{},{isSourcePublic:!0});case he:return A(A({},e),{},{targetIds:r.targetIds});case ye:return e.targetIds.indexOf(r.targetId)===-1?e:A(A({},e),{},{targetIds:Fo(e.targetIds,r.targetId)});case ve:return A(A({},e),{},{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case pe:return A(A({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Tu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case vr:case pr:return e+1;case yr:case ye:return e-1;default:return e}}var ae=[],br=[];ae.__IS_NONE__=!0;br.__IS_ALL__=!0;function Cu(e,t){if(e===ae)return!1;if(e===br||typeof t>"u")return!0;var r=Bo(t,e);return r.length>0}function Iu(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case he:break;case vr:case pr:case ye:case yr:return ae;case ge:case hr:case pe:case ve:default:return br}var t=e.payload,r=t.targetIds,n=r===void 0?[]:r,a=t.prevTargetIds,i=a===void 0?[]:a,o=Go(n,i),u=o.length>0||!hu(n,i);if(!u)return ae;var s=i[i.length-1],c=n[n.length-1];return s!==c&&(s&&o.push(s),c&&o.push(c)),o}function wu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return e+1}function la(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function da(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?la(Object(r),!0).forEach(function(n){Eu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):la(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:Iu(e.dirtyHandlerIds,{type:t.type,payload:da(da({},t.payload),{},{prevTargetIds:Uo(e,"dragOperation.targetIds",[])})}),dragOffset:pu(e.dragOffset,t),refCount:Tu(e.refCount,t),dragOperation:Ou(e.dragOperation,t),stateId:wu(e.stateId)}}function Au(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ja(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ru(e){var t=e.clientOffset,r=e.initialClientOffset,n=e.initialSourceClientOffset;return!t||!r||!n?null:Ja(Au(t,n),r)}function ku(e){var t=e.clientOffset,r=e.initialClientOffset;return!t||!r?null:Ja(t,r)}function qu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ju(e,t,r){return t&&Mu(e.prototype,t),e}var xu=function(){function e(t,r){qu(this,e),this.store=t,this.registry=r}return ju(e,[{key:"subscribeToStateChange",value:function(r){var n=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},i=a.handlerIds;g(typeof r=="function","listener must be a function."),g(typeof i>"u"||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId,u=function(){var c=n.store.getState(),l=c.stateId;try{var d=l===o||l===o+1&&!Cu(c.dirtyHandlerIds,i);d||r()}finally{o=l}};return this.store.subscribe(u)}},{key:"subscribeToOffsetChange",value:function(r){var n=this;g(typeof r=="function","listener must be a function.");var a=this.store.getState().dragOffset,i=function(){var u=n.store.getState().dragOffset;u!==a&&(a=u,r())};return this.store.subscribe(i)}},{key:"canDragSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r);return g(n,"Expected to find a valid source."),this.isDragging()?!1:n.canDrag(this,r)}},{key:"canDropOnTarget",value:function(r){if(!r)return!1;var n=this.registry.getTarget(r);if(g(n,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var a=this.registry.getTargetType(r),i=this.getItemType();return nr(a,i)&&n.canDrop(this,r)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r,!0);if(g(n,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var a=this.registry.getSourceType(r),i=this.getItemType();return a!==i?!1:n.isDragging(this,r)}},{key:"isOverTarget",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!r)return!1;var a=n.shallow;if(!this.isDragging())return!1;var i=this.registry.getTargetType(r),o=this.getItemType();if(o&&!nr(i,o))return!1;var u=this.getTargetIds();if(!u.length)return!1;var s=u.indexOf(r);return a?s===u.length-1:s>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return Ru(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return ku(this.store.getState().dragOffset)}}]),e}(),Nu=0;function $u(){return Nu++}function Y(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Y=function(r){return typeof r}:Y=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Y(e)}function Lu(e){g(typeof e.canDrag=="function","Expected canDrag to be a function."),g(typeof e.beginDrag=="function","Expected beginDrag to be a function."),g(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Hu(e){g(typeof e.canDrop=="function","Expected canDrop to be a function."),g(typeof e.hover=="function","Expected hover to be a function."),g(typeof e.drop=="function","Expected beginDrag to be a function.")}function ar(e,t){if(t&&Array.isArray(e)){e.forEach(function(r){return ar(r,!1)});return}g(typeof e=="string"||Y(e)==="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const ga=typeof ne<"u"?ne:self,Qa=ga.MutationObserver||ga.WebKitMutationObserver;function Za(e){return function(){const r=setTimeout(a,0),n=setInterval(a,50);function a(){clearTimeout(r),clearInterval(n),e()}}}function Uu(e){let t=1;const r=new Qa(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const Fu=typeof Qa=="function"?Uu:Za;class Gu{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,a=t.length-this.index;n<a;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Fu(this.flush),this.requestErrorThrow=Za(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Bu{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class Ku{create(t){const r=this.freeTasks,n=r.length?r.pop():new Bu(this.onError,a=>r[r.length]=a);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const ei=new Gu,Wu=new Ku(ei.registerPendingError);function zu(e){ei.enqueueTask(Wu.create(e))}function Vu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yu(e,t,r){return t&&Xu(e.prototype,t),e}function Ju(e,t){return ts(e)||es(e,t)||Zu(e,t)||Qu()}function Qu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{dw as W,eH as ne,r as C,eI as La,dx as Ci}from"./index-DsEBS9e4.js";import{c as Ii}from"./redux-DfszZyTl.js";var me,Sr;function wi(){if(Sr)return me;Sr=1;function e(){this.__data__=[],this.size=0}return me=e,me}var _e,Or;function Ha(){if(Or)return _e;Or=1;function e(t,r){return t===r||t!==t&&r!==r}return _e=e,_e}var De,Tr;function ue(){if(Tr)return De;Tr=1;var e=Ha();function t(r,n){for(var a=r.length;a--;)if(e(r[a][0],n))return a;return-1}return De=t,De}var Se,Cr;function Ei(){if(Cr)return Se;Cr=1;var e=ue(),t=Array.prototype,r=t.splice;function n(a){var i=this.__data__,o=e(i,a);if(o<0)return!1;var u=i.length-1;return o==u?i.pop():r.call(i,o,1),--this.size,!0}return Se=n,Se}var Oe,Ir;function Pi(){if(Ir)return Oe;Ir=1;var e=ue();function t(r){var n=this.__data__,a=e(n,r);return a<0?void 0:n[a][1]}return Oe=t,Oe}var Te,wr;function Ai(){if(wr)return Te;wr=1;var e=ue();function t(r){return e(this.__data__,r)>-1}return Te=t,Te}var Ce,Er;function Ri(){if(Er)return Ce;Er=1;var e=ue();function t(r,n){var a=this.__data__,i=e(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return Ce=t,Ce}var Ie,Pr;function se(){if(Pr)return Ie;Pr=1;var e=wi(),t=Ei(),r=Pi(),n=Ai(),a=Ri();function i(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Ie=i,Ie}var we,Ar;function ki(){if(Ar)return we;Ar=1;var e=se();function t(){this.__data__=new e,this.size=0}return we=t,we}var Ee,Rr;function qi(){if(Rr)return Ee;Rr=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Ee=e,Ee}var Pe,kr;function Mi(){if(kr)return Pe;kr=1;function e(t){return this.__data__.get(t)}return Pe=e,Pe}var Ae,qr;function ji(){if(qr)return Ae;qr=1;function e(t){return this.__data__.has(t)}return Ae=e,Ae}var Re,Mr;function Ua(){if(Mr)return Re;Mr=1;var e=typeof W=="object"&&W&&W.Object===Object&&W;return Re=e,Re}var ke,jr;function j(){if(jr)return ke;jr=1;var e=Ua(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return ke=r,ke}var qe,xr;function fr(){if(xr)return qe;xr=1;var e=j(),t=e.Symbol;return qe=t,qe}var Me,Nr;function xi(){if(Nr)return Me;Nr=1;var e=fr(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function i(o){var u=r.call(o,a),s=o[a];try{o[a]=void 0;var c=!0}catch{}var l=n.call(o);return c&&(u?o[a]=s:delete o[a]),l}return Me=i,Me}var je,$r;function Ni(){if($r)return je;$r=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return je=r,je}var xe,Lr;function ce(){if(Lr)return xe;Lr=1;var e=fr(),t=xi(),r=Ni(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?a:n:i&&i in Object(u)?t(u):r(u)}return xe=o,xe}var Ne,Hr;function Fa(){if(Hr)return Ne;Hr=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Ne=e,Ne}var $e,Ur;function Ga(){if(Ur)return $e;Ur=1;var e=ce(),t=Fa(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(u){if(!t(u))return!1;var s=e(u);return s==n||s==a||s==r||s==i}return $e=o,$e}var Le,Fr;function $i(){if(Fr)return Le;Fr=1;var e=j(),t=e["__core-js_shared__"];return Le=t,Le}var He,Gr;function Li(){if(Gr)return He;Gr=1;var e=$i(),t=function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!t&&t in n}return He=r,He}var Ue,Br;function Ba(){if(Br)return Ue;Br=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return Ue=r,Ue}var Fe,Kr;function Hi(){if(Kr)return Fe;Kr=1;var e=Ga(),t=Li(),r=Fa(),n=Ba(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,s=o.toString,c=u.hasOwnProperty,l=RegExp("^"+s.call(c).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(v){if(!r(v)||t(v))return!1;var h=e(v)?l:i;return h.test(n(v))}return Fe=d,Fe}var Ge,Wr;function Ui(){if(Wr)return Ge;Wr=1;function e(t,r){return t?.[r]}return Ge=e,Ge}var Be,zr;function N(){if(zr)return Be;zr=1;var e=Hi(),t=Ui();function r(n,a){var i=t(n,a);return e(i)?i:void 0}return Be=r,Be}var Ke,Vr;function lr(){if(Vr)return Ke;Vr=1;var e=N(),t=j(),r=e(t,"Map");return Ke=r,Ke}var We,Xr;function fe(){if(Xr)return We;Xr=1;var e=N(),t=e(Object,"create");return We=t,We}var ze,Yr;function Fi(){if(Yr)return ze;Yr=1;var e=fe();function t(){this.__data__=e?e(null):{},this.size=0}return ze=t,ze}var Ve,Jr;function Gi(){if(Jr)return Ve;Jr=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Ve=e,Ve}var Xe,Qr;function Bi(){if(Qr)return Xe;Qr=1;var e=fe(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var o=this.__data__;if(e){var u=o[i];return u===t?void 0:u}return n.call(o,i)?o[i]:void 0}return Xe=a,Xe}var Ye,Zr;function Ki(){if(Zr)return Ye;Zr=1;var e=fe(),t=Object.prototype,r=t.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:r.call(i,a)}return Ye=n,Ye}var Je,en;function Wi(){if(en)return Je;en=1;var e=fe(),t="__lodash_hash_undefined__";function r(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&a===void 0?t:a,this}return Je=r,Je}var Qe,tn;function zi(){if(tn)return Qe;tn=1;var e=Fi(),t=Gi(),r=Bi(),n=Ki(),a=Wi();function i(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Qe=i,Qe}var Ze,rn;function Vi(){if(rn)return Ze;rn=1;var e=zi(),t=se(),r=lr();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Ze=n,Ze}var et,nn;function Xi(){if(nn)return et;nn=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return et=e,et}var tt,an;function le(){if(an)return tt;an=1;var e=Xi();function t(r,n){var a=r.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return tt=t,tt}var rt,on;function Yi(){if(on)return rt;on=1;var e=le();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return rt=t,rt}var nt,un;function Ji(){if(un)return nt;un=1;var e=le();function t(r){return e(this,r).get(r)}return nt=t,nt}var at,sn;function Qi(){if(sn)return at;sn=1;var e=le();function t(r){return e(this,r).has(r)}return at=t,at}var it,cn;function Zi(){if(cn)return it;cn=1;var e=le();function t(r,n){var a=e(this,r),i=a.size;return a.set(r,n),this.size+=a.size==i?0:1,this}return it=t,it}var ot,fn;function Ka(){if(fn)return ot;fn=1;var e=Vi(),t=Yi(),r=Ji(),n=Qi(),a=Zi();function i(o){var u=-1,s=o==null?0:o.length;for(this.clear();++u<s;){var c=o[u];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,ot=i,ot}var ut,ln;function eo(){if(ln)return ut;ln=1;var e=se(),t=lr(),r=Ka(),n=200;function a(i,o){var u=this.__data__;if(u instanceof e){var s=u.__data__;if(!t||s.length<n-1)return s.push([i,o]),this.size=++u.size,this;u=this.__data__=new r(s)}return u.set(i,o),this.size=u.size,this}return ut=a,ut}var st,dn;function to(){if(dn)return st;dn=1;var e=se(),t=ki(),r=qi(),n=Mi(),a=ji(),i=eo();function o(u){var s=this.__data__=new e(u);this.size=s.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,st=o,st}var ct,gn;function ro(){if(gn)return ct;gn=1;function e(t,r){for(var n=-1,a=Array(t);++n<t;)a[n]=r(n);return a}return ct=e,ct}var ft,hn;function de(){if(hn)return ft;hn=1;function e(t){return t!=null&&typeof t=="object"}return ft=e,ft}var lt,vn;function no(){if(vn)return lt;vn=1;var e=ce(),t=de(),r="[object Arguments]";function n(a){return t(a)&&e(a)==r}return lt=n,lt}var dt,pn;function ao(){if(pn)return dt;pn=1;var e=no(),t=de(),r=Object.prototype,n=r.hasOwnProperty,a=r.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(o){return t(o)&&n.call(o,"callee")&&!a.call(o,"callee")};return dt=i,dt}var gt,yn;function dr(){if(yn)return gt;yn=1;var e=Array.isArray;return gt=e,gt}var H={exports:{}},ht,bn;function io(){if(bn)return ht;bn=1;function e(){return!1}return ht=e,ht}H.exports;var mn;function Wa(){return mn||(mn=1,function(e,t){var r=j(),n=io(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,u=o?r.Buffer:void 0,s=u?u.isBuffer:void 0,c=s||n;e.exports=c}(H,H.exports)),H.exports}var vt,_n;function oo(){if(_n)return vt;_n=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,a){var i=typeof n;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<a}return vt=r,vt}var pt,Dn;function za(){if(Dn)return pt;Dn=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return pt=t,pt}var yt,Sn;function uo(){if(Sn)return yt;Sn=1;var e=ce(),t=za(),r=de(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",u="[object Error]",s="[object Function]",c="[object Map]",l="[object Number]",d="[object Object]",v="[object RegExp]",h="[object Set]",b="[object String]",_="[object WeakMap]",S="[object ArrayBuffer]",O="[object DataView]",p="[object Float32Array]",m="[object Float64Array]",f="[object Int8Array]",T="[object Int16Array]",D="[object Int32Array]",y="[object Uint8Array]",w="[object Uint8ClampedArray]",E="[object Uint16Array]",P="[object Uint32Array]",I={};I[p]=I[m]=I[f]=I[T]=I[D]=I[y]=I[w]=I[E]=I[P]=!0,I[n]=I[a]=I[S]=I[i]=I[O]=I[o]=I[u]=I[s]=I[c]=I[l]=I[d]=I[v]=I[h]=I[b]=I[_]=!1;function M(k){return r(k)&&t(k.length)&&!!I[e(k)]}return yt=M,yt}var bt,On;function so(){if(On)return bt;On=1;function e(t){return function(r){return t(r)}}return bt=e,bt}var U={exports:{}};U.exports;var Tn;function co(){return Tn||(Tn=1,function(e,t){var r=Ua(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,u=function(){try{var s=a&&a.require&&a.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}}();e.exports=u}(U,U.exports)),U.exports}var mt,Cn;function Va(){if(Cn)return mt;Cn=1;var e=uo(),t=so(),r=co(),n=r&&r.isTypedArray,a=n?t(n):e;return mt=a,mt}var _t,In;function fo(){if(In)return _t;In=1;var e=ro(),t=ao(),r=dr(),n=Wa(),a=oo(),i=Va(),o=Object.prototype,u=o.hasOwnProperty;function s(c,l){var d=r(c),v=!d&&t(c),h=!d&&!v&&n(c),b=!d&&!v&&!h&&i(c),_=d||v||h||b,S=_?e(c.length,String):[],O=S.length;for(var p in c)(l||u.call(c,p))&&!(_&&(p=="length"||h&&(p=="offset"||p=="parent")||b&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||a(p,O)))&&S.push(p);return S}return _t=s,_t}var Dt,wn;function lo(){if(wn)return Dt;wn=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return Dt=t,Dt}var St,En;function go(){if(En)return St;En=1;function e(t,r){return function(n){return t(r(n))}}return St=e,St}var Ot,Pn;function ho(){if(Pn)return Ot;Pn=1;var e=go(),t=e(Object.keys,Object);return Ot=t,Ot}var Tt,An;function vo(){if(An)return Tt;An=1;var e=lo(),t=ho(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!e(i))return t(i);var o=[];for(var u in Object(i))n.call(i,u)&&u!="constructor"&&o.push(u);return o}return Tt=a,Tt}var Ct,Rn;function po(){if(Rn)return Ct;Rn=1;var e=Ga(),t=za();function r(n){return n!=null&&t(n.length)&&!e(n)}return Ct=r,Ct}var It,kn;function yo(){if(kn)return It;kn=1;var e=fo(),t=vo(),r=po();function n(a){return r(a)?e(a):t(a)}return It=n,It}var wt,qn;function bo(){if(qn)return wt;qn=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=0,o=[];++n<a;){var u=t[n];r(u,n,t)&&(o[i++]=u)}return o}return wt=e,wt}var Et,Mn;function mo(){if(Mn)return Et;Mn=1;function e(){return[]}return Et=e,Et}var Pt,jn;function _o(){if(jn)return Pt;jn=1;var e=bo(),t=mo(),r=Object.prototype,n=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(o){return o==null?[]:(o=Object(o),e(a(o),function(u){return n.call(o,u)}))}:t;return Pt=i,Pt}var At,xn;function Do(){if(xn)return At;xn=1;function e(t,r){for(var n=-1,a=r.length,i=t.length;++n<a;)t[i+n]=r[n];return t}return At=e,At}var Rt,Nn;function So(){if(Nn)return Rt;Nn=1;var e=Do(),t=dr();function r(n,a,i){var o=a(n);return t(n)?o:e(o,i(n))}return Rt=r,Rt}var kt,$n;function Oo(){if($n)return kt;$n=1;var e=So(),t=_o(),r=yo();function n(a){return e(a,r,t)}return kt=n,kt}var qt,Ln;function To(){if(Ln)return qt;Ln=1;var e=N(),t=j(),r=e(t,"DataView");return qt=r,qt}var Mt,Hn;function Co(){if(Hn)return Mt;Hn=1;var e=N(),t=j(),r=e(t,"Promise");return Mt=r,Mt}var jt,Un;function Io(){if(Un)return jt;Un=1;var e=N(),t=j(),r=e(t,"Set");return jt=r,jt}var xt,Fn;function wo(){if(Fn)return xt;Fn=1;var e=N(),t=j(),r=e(t,"WeakMap");return xt=r,xt}var Nt,Gn;function Eo(){if(Gn)return Nt;Gn=1;var e=To(),t=lr(),r=Co(),n=Io(),a=wo(),i=ce(),o=Ba(),u="[object Map]",s="[object Object]",c="[object Promise]",l="[object Set]",d="[object WeakMap]",v="[object DataView]",h=o(e),b=o(t),_=o(r),S=o(n),O=o(a),p=i;return(e&&p(new e(new ArrayBuffer(1)))!=v||t&&p(new t)!=u||r&&p(r.resolve())!=c||n&&p(new n)!=l||a&&p(new a)!=d)&&(p=function(m){var f=i(m),T=f==s?m.constructor:void 0,D=T?o(T):"";if(D)switch(D){case h:return v;case b:return u;case _:return c;case S:return l;case O:return d}return f}),Nt=p,Nt}var $t,Bn;function Po(){if(Bn)return $t;Bn=1;var e=j(),t=e.Uint8Array;return $t=t,$t}var Lt,Kn;function Ao(){if(Kn)return Lt;Kn=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Lt=t,Lt}var Ht,Wn;function Ro(){if(Wn)return Ht;Wn=1;function e(t){return this.__data__.has(t)}return Ht=e,Ht}var Ut,zn;function ko(){if(zn)return Ut;zn=1;var e=Ka(),t=Ao(),r=Ro();function n(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new e;++i<o;)this.add(a[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Ut=n,Ut}var Ft,Vn;function qo(){if(Vn)return Ft;Vn=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(t[n],n,t))return!0;return!1}return Ft=e,Ft}var Gt,Xn;function Mo(){if(Xn)return Gt;Xn=1;function e(t,r){return t.has(r)}return Gt=e,Gt}var Bt,Yn;function Xa(){if(Yn)return Bt;Yn=1;var e=ko(),t=qo(),r=Mo(),n=1,a=2;function i(o,u,s,c,l,d){var v=s&n,h=o.length,b=u.length;if(h!=b&&!(v&&b>h))return!1;var _=d.get(o),S=d.get(u);if(_&&S)return _==u&&S==o;var O=-1,p=!0,m=s&a?new e:void 0;for(d.set(o,u),d.set(u,o);++O<h;){var f=o[O],T=u[O];if(c)var D=v?c(T,f,O,u,o,d):c(f,T,O,o,u,d);if(D!==void 0){if(D)continue;p=!1;break}if(m){if(!t(u,function(y,w){if(!r(m,w)&&(f===y||l(f,y,s,c,d)))return m.push(w)})){p=!1;break}}else if(!(f===T||l(f,T,s,c,d))){p=!1;break}}return d.delete(o),d.delete(u),p}return Bt=i,Bt}var Kt,Jn;function jo(){if(Jn)return Kt;Jn=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a,i){n[++r]=[i,a]}),n}return Kt=e,Kt}var Wt,Qn;function xo(){if(Qn)return Wt;Qn=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a){n[++r]=a}),n}return Wt=e,Wt}var zt,Zn;function No(){if(Zn)return zt;Zn=1;var e=fr(),t=Po(),r=Ha(),n=Xa(),a=jo(),i=xo(),o=1,u=2,s="[object Boolean]",c="[object Date]",l="[object Error]",d="[object Map]",v="[object Number]",h="[object RegExp]",b="[object Set]",_="[object String]",S="[object Symbol]",O="[object ArrayBuffer]",p="[object DataView]",m=e?e.prototype:void 0,f=m?m.valueOf:void 0;function T(D,y,w,E,P,I,M){switch(w){case p:if(D.byteLength!=y.byteLength||D.byteOffset!=y.byteOffset)return!1;D=D.buffer,y=y.buffer;case O:return!(D.byteLength!=y.byteLength||!I(new t(D),new t(y)));case s:case c:case v:return r(+D,+y);case l:return D.name==y.name&&D.message==y.message;case h:case _:return D==y+"";case d:var k=a;case b:var be=E&o;if(k||(k=i),D.size!=y.size&&!be)return!1;var K=M.get(D);if(K)return K==y;E|=u,M.set(D,y);var Ti=n(k(D),k(y),E,P,I,M);return M.delete(D),Ti;case S:if(f)return f.call(D)==f.call(y)}return!1}return zt=T,zt}var Vt,ea;function $o(){if(ea)return Vt;ea=1;var e=Oo(),t=1,r=Object.prototype,n=r.hasOwnProperty;function a(i,o,u,s,c,l){var d=u&t,v=e(i),h=v.length,b=e(o),_=b.length;if(h!=_&&!d)return!1;for(var S=h;S--;){var O=v[S];if(!(d?O in o:n.call(o,O)))return!1}var p=l.get(i),m=l.get(o);if(p&&m)return p==o&&m==i;var f=!0;l.set(i,o),l.set(o,i);for(var T=d;++S<h;){O=v[S];var D=i[O],y=o[O];if(s)var w=d?s(y,D,O,o,i,l):s(D,y,O,i,o,l);if(!(w===void 0?D===y||c(D,y,u,s,l):w)){f=!1;break}T||(T=O=="constructor")}if(f&&!T){var E=i.constructor,P=o.constructor;E!=P&&"constructor"in i&&"constructor"in o&&!(typeof E=="function"&&E instanceof E&&typeof P=="function"&&P instanceof P)&&(f=!1)}return l.delete(i),l.delete(o),f}return Vt=a,Vt}var Xt,ta;function Lo(){if(ta)return Xt;ta=1;var e=to(),t=Xa(),r=No(),n=$o(),a=Eo(),i=dr(),o=Wa(),u=Va(),s=1,c="[object Arguments]",l="[object Array]",d="[object Object]",v=Object.prototype,h=v.hasOwnProperty;function b(_,S,O,p,m,f){var T=i(_),D=i(S),y=T?l:a(_),w=D?l:a(S);y=y==c?d:y,w=w==c?d:w;var E=y==d,P=w==d,I=y==w;if(I&&o(_)){if(!o(S))return!1;T=!0,E=!1}if(I&&!E)return f||(f=new e),T||u(_)?t(_,S,O,p,m,f):r(_,S,y,O,p,m,f);if(!(O&s)){var M=E&&h.call(_,"__wrapped__"),k=P&&h.call(S,"__wrapped__");if(M||k){var be=M?_.value():_,K=k?S.value():S;return f||(f=new e),m(be,K,O,p,f)}}return I?(f||(f=new e),n(_,S,O,p,m,f)):!1}return Xt=b,Xt}var Yt,ra;function Ho(){if(ra)return Yt;ra=1;var e=Lo(),t=de();function r(n,a,i,o,u){return n===a?!0:n==null||a==null||!t(n)&&!t(a)?n!==n&&a!==a:e(n,a,i,o,r,u)}return Yt=r,Yt}var Jt,na;function Hf(){if(na)return Jt;na=1;var e=Ho();function t(r,n){return e(r,n)}return Jt=t,Jt}var R;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(R||(R={}));function g(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];if(!e){var i;if(t===void 0)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;i=new Error(t.replace(/%s/g,function(){return n[o++]})),i.name="Invariant Violation"}throw i.framesToPop=1,i}}var gr="dnd-core/INIT_COORDS",ge="dnd-core/BEGIN_DRAG",hr="dnd-core/PUBLISH_DRAG_SOURCE",he="dnd-core/HOVER",ve="dnd-core/DROP",pe="dnd-core/END_DRAG";function aa(e,t){return{type:gr,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function X(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?X=function(r){return typeof r}:X=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},X(e)}function Uo(e,t,r){return t.split(".").reduce(function(n,a){return n&&n[a]?n[a]:r||null},e)}function Fo(e,t){return e.filter(function(r){return r!==t})}function Ya(e){return X(e)==="object"}function Go(e,t){var r=new Map,n=function(o){r.set(o,r.has(o)?r.get(o)+1:1)};e.forEach(n),t.forEach(n);var a=[];return r.forEach(function(i,o){i===1&&a.push(o)}),a}function Bo(e,t){return e.filter(function(r){return t.indexOf(r)>-1})}var Ko={type:gr,payload:{clientOffset:null,sourceClientOffset:null}};function Wo(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},a=n.publishSource,i=a===void 0?!0:a,o=n.clientOffset,u=n.getSourceClientOffset,s=e.getMonitor(),c=e.getRegistry();e.dispatch(aa(o)),zo(r,s,c);var l=Yo(r,s);if(l===null){e.dispatch(Ko);return}var d=null;if(o){if(!u)throw new Error("getSourceClientOffset must be defined");Vo(u),d=u(l)}e.dispatch(aa(o,d));var v=c.getSource(l),h=v.beginDrag(s,l);Xo(h),c.pinSource(l);var b=c.getSourceType(l);return{type:ge,payload:{itemType:b,item:h,sourceId:l,clientOffset:o||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}}function zo(e,t,r){g(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){g(r.getSource(n),"Expected sourceIds to be registered.")})}function Vo(e){g(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Xo(e){g(Ya(e),"Item must be an object.")}function Yo(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Jo(e){return function(){var r=e.getMonitor();if(r.isDragging())return{type:hr}}}function nr(e,t){return t===null?e===null:Array.isArray(e)?e.some(function(r){return r===t}):e===t}function Qo(e){return function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.clientOffset;Zo(r);var i=r.slice(0),o=e.getMonitor(),u=e.getRegistry();eu(i,o,u);var s=o.getItemType();return tu(i,u,s),ru(i,o,u),{type:he,payload:{targetIds:i,clientOffset:a||null}}}}function Zo(e){g(Array.isArray(e),"Expected targetIds to be an array.")}function eu(e,t,r){g(t.isDragging(),"Cannot call hover while not dragging."),g(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var a=e[n];g(e.lastIndexOf(a)===n,"Expected targetIds to be unique in the passed array.");var i=r.getTarget(a);g(i,"Expected targetIds to be registered.")}}function tu(e,t,r){for(var n=e.length-1;n>=0;n--){var a=e[n],i=t.getTargetType(a);nr(i,r)||e.splice(n,1)}}function ru(e,t,r){e.forEach(function(n){var a=r.getTarget(n);a.hover(t,n)})}function ia(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function oa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ia(Object(r),!0).forEach(function(n){nu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ia(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function au(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.getMonitor(),a=e.getRegistry();iu(n);var i=su(n);i.forEach(function(o,u){var s=ou(o,u,a,n),c={type:ve,payload:{dropResult:oa(oa({},r),s)}};e.dispatch(c)})}}function iu(e){g(e.isDragging(),"Cannot call drop while not dragging."),g(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function ou(e,t,r,n){var a=r.getTarget(e),i=a?a.drop(n,e):void 0;return uu(i),typeof i>"u"&&(i=t===0?{}:n.getDropResult()),i}function uu(e){g(typeof e>"u"||Ya(e),"Drop result must either be an object or undefined.")}function su(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function cu(e){return function(){var r=e.getMonitor(),n=e.getRegistry();fu(r);var a=r.getSourceId();if(a!=null){var i=n.getSource(a,!0);i.endDrag(r,a),n.unpinSource()}return{type:pe}}}function fu(e){g(e.isDragging(),"Cannot call endDrag while not dragging.")}function lu(e){return{beginDrag:Wo(e),publishDragSource:Jo(e),hover:Qo(e),drop:au(e),endDrag:cu(e)}}var du=function(t,r){return t===r};function gu(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function hu(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:du;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function ua(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function sa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ua(Object(r),!0).forEach(function(n){vu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ua(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ca={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function pu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ca,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case gr:case ge:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case he:return gu(e.clientOffset,r.clientOffset)?e:sa(sa({},e),{},{clientOffset:r.clientOffset});case pe:case ve:return ca;default:return e}}var vr="dnd-core/ADD_SOURCE",pr="dnd-core/ADD_TARGET",yr="dnd-core/REMOVE_SOURCE",ye="dnd-core/REMOVE_TARGET";function yu(e){return{type:vr,payload:{sourceId:e}}}function bu(e){return{type:pr,payload:{targetId:e}}}function mu(e){return{type:yr,payload:{sourceId:e}}}function _u(e){return{type:ye,payload:{targetId:e}}}function fa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fa(Object(r),!0).forEach(function(n){Du(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fa(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Du(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Su={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ou(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Su,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case ge:return A(A({},e),{},{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case hr:return A(A({},e),{},{isSourcePublic:!0});case he:return A(A({},e),{},{targetIds:r.targetIds});case ye:return e.targetIds.indexOf(r.targetId)===-1?e:A(A({},e),{},{targetIds:Fo(e.targetIds,r.targetId)});case ve:return A(A({},e),{},{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case pe:return A(A({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Tu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case vr:case pr:return e+1;case yr:case ye:return e-1;default:return e}}var ae=[],br=[];ae.__IS_NONE__=!0;br.__IS_ALL__=!0;function Cu(e,t){if(e===ae)return!1;if(e===br||typeof t>"u")return!0;var r=Bo(t,e);return r.length>0}function Iu(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case he:break;case vr:case pr:case ye:case yr:return ae;case ge:case hr:case pe:case ve:default:return br}var t=e.payload,r=t.targetIds,n=r===void 0?[]:r,a=t.prevTargetIds,i=a===void 0?[]:a,o=Go(n,i),u=o.length>0||!hu(n,i);if(!u)return ae;var s=i[i.length-1],c=n[n.length-1];return s!==c&&(s&&o.push(s),c&&o.push(c)),o}function wu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return e+1}function la(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function da(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?la(Object(r),!0).forEach(function(n){Eu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):la(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:Iu(e.dirtyHandlerIds,{type:t.type,payload:da(da({},t.payload),{},{prevTargetIds:Uo(e,"dragOperation.targetIds",[])})}),dragOffset:pu(e.dragOffset,t),refCount:Tu(e.refCount,t),dragOperation:Ou(e.dragOperation,t),stateId:wu(e.stateId)}}function Au(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ja(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ru(e){var t=e.clientOffset,r=e.initialClientOffset,n=e.initialSourceClientOffset;return!t||!r||!n?null:Ja(Au(t,n),r)}function ku(e){var t=e.clientOffset,r=e.initialClientOffset;return!t||!r?null:Ja(t,r)}function qu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ju(e,t,r){return t&&Mu(e.prototype,t),e}var xu=function(){function e(t,r){qu(this,e),this.store=t,this.registry=r}return ju(e,[{key:"subscribeToStateChange",value:function(r){var n=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},i=a.handlerIds;g(typeof r=="function","listener must be a function."),g(typeof i>"u"||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId,u=function(){var c=n.store.getState(),l=c.stateId;try{var d=l===o||l===o+1&&!Cu(c.dirtyHandlerIds,i);d||r()}finally{o=l}};return this.store.subscribe(u)}},{key:"subscribeToOffsetChange",value:function(r){var n=this;g(typeof r=="function","listener must be a function.");var a=this.store.getState().dragOffset,i=function(){var u=n.store.getState().dragOffset;u!==a&&(a=u,r())};return this.store.subscribe(i)}},{key:"canDragSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r);return g(n,"Expected to find a valid source."),this.isDragging()?!1:n.canDrag(this,r)}},{key:"canDropOnTarget",value:function(r){if(!r)return!1;var n=this.registry.getTarget(r);if(g(n,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var a=this.registry.getTargetType(r),i=this.getItemType();return nr(a,i)&&n.canDrop(this,r)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r,!0);if(g(n,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var a=this.registry.getSourceType(r),i=this.getItemType();return a!==i?!1:n.isDragging(this,r)}},{key:"isOverTarget",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!r)return!1;var a=n.shallow;if(!this.isDragging())return!1;var i=this.registry.getTargetType(r),o=this.getItemType();if(o&&!nr(i,o))return!1;var u=this.getTargetIds();if(!u.length)return!1;var s=u.indexOf(r);return a?s===u.length-1:s>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return Ru(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return ku(this.store.getState().dragOffset)}}]),e}(),Nu=0;function $u(){return Nu++}function Y(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Y=function(r){return typeof r}:Y=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Y(e)}function Lu(e){g(typeof e.canDrag=="function","Expected canDrag to be a function."),g(typeof e.beginDrag=="function","Expected beginDrag to be a function."),g(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Hu(e){g(typeof e.canDrop=="function","Expected canDrop to be a function."),g(typeof e.hover=="function","Expected hover to be a function."),g(typeof e.drop=="function","Expected beginDrag to be a function.")}function ar(e,t){if(t&&Array.isArray(e)){e.forEach(function(r){return ar(r,!1)});return}g(typeof e=="string"||Y(e)==="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const ga=typeof ne<"u"?ne:self,Qa=ga.MutationObserver||ga.WebKitMutationObserver;function Za(e){return function(){const r=setTimeout(a,0),n=setInterval(a,50);function a(){clearTimeout(r),clearInterval(n),e()}}}function Uu(e){let t=1;const r=new Qa(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const Fu=typeof Qa=="function"?Uu:Za;class Gu{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,a=t.length-this.index;n<a;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Fu(this.flush),this.requestErrorThrow=Za(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Bu{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class Ku{create(t){const r=this.freeTasks,n=r.length?r.pop():new Bu(this.onError,a=>r[r.length]=a);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const ei=new Gu,Wu=new Ku(ei.registerPendingError);function zu(e){ei.enqueueTask(Wu.create(e))}function Vu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yu(e,t,r){return t&&Xu(e.prototype,t),e}function Ju(e,t){return ts(e)||es(e,t)||Zu(e,t)||Qu()}function Qu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zu(e,t){if(e){if(typeof e=="string")return ha(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ha(e,t)}}function ha(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function es(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),u;!(n=(u=o.next()).done)&&(r.push(u.value),!(t&&r.length===t));n=!0);}catch(s){a=!0,i=s}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function ts(e){if(Array.isArray(e))return e}function rs(e){var t=$u().toString();switch(e){case R.SOURCE:return"S".concat(t);case R.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}function va(e){switch(e[0]){case"S":return R.SOURCE;case"T":return R.TARGET;default:g(!1,"Cannot parse handler ID: ".concat(e))}}function pa(e,t){var r=e.entries(),n=!1;do{var a=r.next(),i=a.done,o=Ju(a.value,2),u=o[1];if(u===t)return!0;n=!!i}while(!n);return!1}var ns=function(){function e(t){Vu(this,e),this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}return Yu(e,[{key:"addSource",value:function(r,n){ar(r),Lu(n);var a=this.addHandler(R.SOURCE,r,n);return this.store.dispatch(yu(a)),a}},{key:"addTarget",value:function(r,n){ar(r,!0),Hu(n);var a=this.addHandler(R.TARGET,r,n);return this.store.dispatch(bu(a)),a}},{key:"containsHandler",value:function(r){return pa(this.dragSources,r)||pa(this.dropTargets,r)}},{key:"getSource",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;g(this.isSourceId(r),"Expected a valid source ID.");var a=n&&r===this.pinnedSourceId,i=a?this.pinnedSource:this.dragSources.get(r);return i}},{key:"getTarget",value:function(r){return g(this.isTargetId(r),"Expected a valid target ID."),this.dropTargets.get(r)}},{key:"getSourceType",value:function(r){return g(this.isSourceId(r),"Expected a valid source ID."),this.types.get(r)}},{key:"getTargetType",value:function(r){return g(this.isTargetId(r),"Expected a valid target ID."),this.types.get(r)}},{key:"isSourceId",value:function(r){var n=va(r);return n===R.SOURCE}},{key:"isTargetId",value:function(r){var n=va(r);return n===R.TARGET}},{key:"removeSource",value:function(r){var n=this;g(this.getSource(r),"Expected an existing source."),this.store.dispatch(mu(r)),zu(function(){n.dragSources.delete(r),n.types.delete(r)})}},{key:"removeTarget",value:function(r){g(this.getTarget(r),"Expected an existing target."),this.store.dispatch(_u(r)),this.dropTargets.delete(r),this.types.delete(r)}},{key:"pinSource",value:function(r){var n=this.getSource(r);g(n,"Expected an existing source."),this.pinnedSourceId=r,this.pinnedSource=n}},{key:"unpinSource",value:function(){g(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(r,n,a){var i=rs(r);return this.types.set(i,n),r===R.SOURCE?this.dragSources.set(i,a):r===R.TARGET&&this.dropTargets.set(i,a),i}}]),e}();function as(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function is(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function os(e,t,r){return t&&is(e.prototype,t),e}function us(e){var t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Ii(Pu,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var ss=function(){function e(){var t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;as(this,e),this.isSetUp=!1,this.handleRefCountChange=function(){var a=t.store.getState().refCount>0;t.backend&&(a&&!t.isSetUp?(t.backend.setup(),t.isSetUp=!0):!a&&t.isSetUp&&(t.backend.teardown(),t.isSetUp=!1))};var n=us(r);this.store=n,this.monitor=new xu(n,new ns(n)),n.subscribe(this.handleRefCountChange)}return os(e,[{key:"receiveBackend",value:function(r){this.backend=r}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var r=this,n=this.store.dispatch;function a(o){return function(){for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];var l=o.apply(r,s);typeof l<"u"&&n(l)}}var i=lu(this);return Object.keys(i).reduce(function(o,u){var s=i[u];return o[u]=a(s),o},{})}},{key:"dispatch",value:function(r){this.store.dispatch(r)}}]),e}();function cs(e,t,r,n){var a=new ss(n),i=e(a,t,r);return a.receiveBackend(i),a}var B=C.createContext({dragDropManager:void 0});function ti(e,t,r,n){return{dragDropManager:cs(e,t,r,n)}}function fs(e,t){return hs(e)||gs(e,t)||ds(e,t)||ls()}function ls(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ds(e,t){if(e){if(typeof e=="string")return ya(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ya(e,t)}}function ya(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function gs(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),u;!(n=(u=o.next()).done)&&(r.push(u.value),!(t&&r.length===t));n=!0);}catch(s){a=!0,i=s}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function hs(e){if(Array.isArray(e))return e}function vs(e,t){if(e==null)return{};var r=ps(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ps(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var Qt=0,ri=C.memo(function(e){var t=e.children,r=vs(e,["children"]),n=ys(r),a=fs(n,2),i=a[0],o=a[1];return C.useEffect(function(){return o&&Qt++,function(){if(o&&(Qt--,Qt===0)){var u=ni();u[J]=null}}},[]),C.createElement(B.Provider,{value:i},t)});ri.displayName="DndProvider";function ys(e){if("manager"in e){var t={dragDropManager:e.manager};return[t,!1]}var r=bs(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[r,n]}var J=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");function bs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ni(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,a=t;return a[J]||(a[J]=ti(e,t,r,n)),a[J]}function ni(){return typeof ne<"u"?ne:window}var ai=C.memo(function(e){var t=e.connect,r=e.src;return C.useEffect(function(){if(!(typeof Image>"u")){var n=!1,a=new Image;return a.src=r,a.onload=function(){t(a),n=!0},function(){n&&t(null)}}}),null});ai.displayName="DragPreviewImage";var x=typeof window<"u"?C.useLayoutEffect:C.useEffect;function q(e,t,r,n){var a=r?r.call(n,e,t):void 0;if(a!==void 0)return!!a;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(t),s=0;s<i.length;s++){var c=i[s];if(!u(c))return!1;var l=e[c],d=t[c];if(a=r?r.call(n,l,d,c):void 0,a===!1||a===void 0&&l!==d)return!1}return!0}function ms(e,t){return Os(e)||Ss(e,t)||Ds(e,t)||_s()}function _s(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ds(e,t){if(e){if(typeof e=="string")return ba(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ba(e,t)}}function ba(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ss(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),u;!(n=(u=o.next()).done)&&(r.push(u.value),!(t&&r.length===t));n=!0);}catch(s){a=!0,i=s}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function Os(e){if(Array.isArray(e))return e}function ii(e,t,r){var n=C.useState(function(){return t(e)}),a=ms(n,2),i=a[0],o=a[1],u=C.useCallback(function(){var s=t(e);q(i,s)||(o(s),r&&r())},[i,e,r]);return x(u,[]),[i,u]}function Ts(e,t){return Es(e)||ws(e,t)||Is(e,t)||Cs()}function Cs(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.