@abtnode/webapp 1.17.3-beta-20251128-095123-a76cb6bc → 1.17.4-beta-20251201-095907-eebbbbce

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 (188) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-jQWZxlKZ.js → AdapterDayjs-DFNTS6uL.js} +1 -1
  4. package/dist/assets/{Add-CM0i44L2.js → Add-DMoAJUVW.js} +1 -1
  5. package/dist/assets/ArrowDropDown-BS1FI8Dx.js +1 -0
  6. package/dist/assets/{Autocomplete-BBHR-e2e.js → Autocomplete-DzPelkmw.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-BaZ8MiUq.js → Breadcrumbs-4tdPlLhJ.js} +1 -1
  8. package/dist/assets/{ButtonGroup-B_6MNBFc.js → ButtonGroup-Dlkb94HL.js} +1 -1
  9. package/dist/assets/{CSSTransition-C6uS6QtZ.js → CSSTransition-Cp9IAg_E.js} +1 -1
  10. package/dist/assets/{CallMerge-CQP5GPxe.js → CallMerge-B41lkD5_.js} +1 -1
  11. package/dist/assets/{CardContent-Ck7ja9MC.js → CardContent-yvDYaO_0.js} +1 -1
  12. package/dist/assets/{ChevronLeft-C7cSHp9l.js → ChevronLeft-CZ7VDJCP.js} +1 -1
  13. package/dist/assets/{ChevronRight-BUUZmp3v.js → ChevronRight-W_01-zFQ.js} +1 -1
  14. package/dist/assets/{Clear-CFi5u92e.js → Clear-3aQ_ViuO.js} +1 -1
  15. package/dist/assets/{DeleteOutline-BHEKXTkO.js → DeleteOutline-CduYjOSi.js} +1 -1
  16. package/dist/assets/{Done-DXPJGUWm.js → Done-D_cfJoKY.js} +1 -1
  17. package/dist/assets/{Edit-JIlB-sRA.js → Edit-CAoHCh26.js} +1 -1
  18. package/dist/assets/{ErrorOutline-DBqK27X8.js → ErrorOutline-ClBFY-zS.js} +1 -1
  19. package/dist/assets/{FilterList-DqZHJbRG.js → FilterList-CoyfX8VL.js} +1 -1
  20. package/dist/assets/{Google-KJc6rb0J.js → Google-QOJseWnL.js} +1 -1
  21. package/dist/assets/{HelpOutline-DswUhBxG.js → HelpOutline-DNkRe_xv.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-BRIRZ0lk.js → KeyboardArrowDown-DACNodoq.js} +1 -1
  23. package/dist/assets/{Launch-_uZBB3hy.js → Launch-BOUgHkwm.js} +1 -1
  24. package/dist/assets/{Link-CvXyobEJ.js → Link-BFLUKKmj.js} +1 -1
  25. package/dist/assets/{ListItemButton-BRQYff97.js → ListItemButton-BrJjYcfY.js} +1 -1
  26. package/dist/assets/{ListSubheader-BHGxSe1E.js → ListSubheader-Dz5YbKqQ.js} +1 -1
  27. package/dist/assets/{LoadingButton-BhZ8iOtK.js → LoadingButton-DSQ0SJvD.js} +1 -1
  28. package/dist/assets/{MoreVert-Ck4O28kx.js → MoreVert-Crfla2Nw.js} +1 -1
  29. package/dist/assets/{OpenInNew-BJk7hIVB.js → OpenInNew-CMikwXJg.js} +1 -1
  30. package/dist/assets/{Refresh-kyiL1qX1.js → Refresh-BRw0lNlx.js} +1 -1
  31. package/dist/assets/{Search-BiQ8hlgr.js → Search-DihRAr8J.js} +1 -1
  32. package/dist/assets/{Stepper-BJZfb2Le.js → Stepper-DSYfudJh.js} +1 -1
  33. package/dist/assets/{Switch-UORzToTA.js → Switch-DXK3jQx6.js} +1 -1
  34. package/dist/assets/{TableSearch-BQiqRB7D.js → TableSearch-DTa-kQYq.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-CbzWaH4A.js → ToggleButtonGroup-BgcjoBhH.js} +1 -1
  36. package/dist/assets/{UnfoldMore-DZ3laWH7.js → UnfoldMore-Obeukjjc.js} +1 -1
  37. package/dist/assets/{Verified-M-1m4RTW.js → Verified-BkNsmE5y.js} +1 -1
  38. package/dist/assets/{VerifiedUser-C7mhQBkH.js → VerifiedUser-DF0KlG8V.js} +1 -1
  39. package/dist/assets/{ViewList-DC04kVZ7.js → ViewList-Dsx5HTn1.js} +1 -1
  40. package/dist/assets/{_createAggregator-BcN4GRYz.js → _createAggregator-ysrcf9Bc.js} +1 -1
  41. package/dist/assets/{actions-DSVBY-iK.js → actions-B68pZ6f6.js} +1 -1
  42. package/dist/assets/{actions-e0cgLZ3F.js → actions-BQYoCyzD.js} +1 -1
  43. package/dist/assets/{agreement-CMStdtDl.js → agreement-3umjEU1n.js} +1 -1
  44. package/dist/assets/api-DtECYdKn.js +1 -0
  45. package/dist/assets/{appearance-BbYVAqwM.js → appearance-BYqWOedE.js} +1 -1
  46. package/dist/assets/{audit-logs-B2Hvy3ws.js → audit-logs-C8Rj-VnC.js} +1 -1
  47. package/dist/assets/{base-chart-Do9WtdQs.js → base-chart-C7SG2Os5.js} +1 -1
  48. package/dist/assets/{blocklet-Cu8go6Cl.js → blocklet-BwZNRhqB.js} +1 -1
  49. package/dist/assets/{chain-tpP2d9Lm.js → chain-BLr2de5j.js} +1 -1
  50. package/dist/assets/{click-to-copy-BpBPaRWz.js → click-to-copy-_XuYTLfd.js} +1 -1
  51. package/dist/assets/cloneDeep-9Rjs5zfn.js +1 -0
  52. package/dist/assets/{collapse-DRRC0SCd.js → collapse-C4RswaYj.js} +1 -1
  53. package/dist/assets/{config-navigation-Ntc_O8HF.js → config-navigation-m1HAHHAI.js} +3 -3
  54. package/dist/assets/{connect-to-CTjQfAN3.js → connect-to-CQeSm0MO.js} +1 -1
  55. package/dist/assets/{cssMode-MKOimR8r.js → cssMode-CMNPagen.js} +1 -1
  56. package/dist/assets/{delete-confirm-DwwucGed.js → delete-confirm-B3AhdXCf.js} +1 -1
  57. package/dist/assets/{depsEqual-DJ4V1mTU.js → depsEqual-C1JyiMkY.js} +1 -1
  58. package/dist/assets/{detail-BAwVCAFb.js → detail-C3pyFMHM.js} +3 -3
  59. package/dist/assets/{domains-rlp68m61.js → domains-DIeIwNFc.js} +1 -1
  60. package/dist/assets/{download-CizjGT3a.js → download-PFug1xLJ.js} +1 -1
  61. package/dist/assets/{edit.svg-CpLTrX1j.js → edit.svg-BWsZcaur.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-DR87qH_k.js +1 -0
  63. package/dist/assets/engine-XiroAPK-.js +1 -0
  64. package/dist/assets/{freemarker2-dI1M-X6u.js → freemarker2-D3LU0XC5.js} +1 -1
  65. package/dist/assets/{get-safe-url-CHuz2b-I.js → get-safe-url-B8fUDSaQ.js} +1 -1
  66. package/dist/assets/getValidReactChildren-Dxx0sUSA.js +1 -0
  67. package/dist/assets/{graphqlMode-B_WmUdLw.js → graphqlMode-CZh0WEg3.js} +2 -2
  68. package/dist/assets/{handlebars-CRMti49n.js → handlebars-BoyJQaGG.js} +1 -1
  69. package/dist/assets/{html-ermJICEG.js → html-DiNtivy_.js} +1 -1
  70. package/dist/assets/{html-title-BQwqe1Ck.js → html-title-DZPr9ErN.js} +1 -1
  71. package/dist/assets/{htmlMode-B0bBi3DI.js → htmlMode-swm5QVbw.js} +1 -1
  72. package/dist/assets/{iframe-9SAgwJDT.js → iframe-DloJgn9Q.js} +1 -1
  73. package/dist/assets/{index-BGQR0TyN.js → index-1u2jtyuS.js} +1 -1
  74. package/dist/assets/{index-DuqULJQe.js → index-2MD_vALi.js} +1 -1
  75. package/dist/assets/{index-CcHEbeR3.js → index-B-t0c3Sa.js} +1 -1
  76. package/dist/assets/{index-D1jZ55Sb.js → index-B0J8LV_Q.js} +1 -1
  77. package/dist/assets/{index-mI9L2BhQ.js → index-BBE5QVnT.js} +1 -1
  78. package/dist/assets/{index-CNd2lEI7.js → index-BNSnUR0A.js} +1 -1
  79. package/dist/assets/{index-Bkx9VtR1.js → index-BOgaS_mp.js} +3 -3
  80. package/dist/assets/{index-CeI21XVA.js → index-BPL2xXU0.js} +1 -1
  81. package/dist/assets/{index-CBDLDE06.js → index-BScjYdDP.js} +3 -3
  82. package/dist/assets/{index-C3PPN1sd.js → index-B_irEVal.js} +1 -1
  83. package/dist/assets/{index-CTialFzy.js → index-BiECtx8f.js} +1 -1
  84. package/dist/assets/{index-DtnSIrsF.js → index-BktUsUuI.js} +1 -1
  85. package/dist/assets/{index-DcBZKU5L.js → index-BoLEbVjY.js} +1 -1
  86. package/dist/assets/{index-Dz_Rmjb-.js → index-BpTQAo8p.js} +1 -1
  87. package/dist/assets/{index-B6xNHlEj.js → index-BsUgU8Em.js} +3 -3
  88. package/dist/assets/{index-IfVDnuZk.js → index-C1n8OjtU.js} +1 -1
  89. package/dist/assets/{index-D9QeG2FZ.js → index-C6qm0jMc.js} +1 -1
  90. package/dist/assets/{index-zysAnh52.js → index-CCqeWXbH.js} +2 -2
  91. package/dist/assets/{index-yXEFoIGg.js → index-CI77BW6M.js} +1 -1
  92. package/dist/assets/{index-D6WMVz-u.js → index-CIJ5EXA3.js} +1 -1
  93. package/dist/assets/{index-BR8r-K4S.js → index-CKHzfPKz.js} +1 -1
  94. package/dist/assets/{index-CmgnJ9Ac.js → index-CSzOTG6W.js} +9 -9
  95. package/dist/assets/{index-DO977Avs.js → index-C_lSg5BT.js} +1 -1
  96. package/dist/assets/index-ClIHkf52.js +1 -0
  97. package/dist/assets/{index-BkBk9uDM.js → index-ClciYnBs.js} +1 -1
  98. package/dist/assets/{index-BC4-BsXp.js → index-Cm4YjlwL.js} +1 -1
  99. package/dist/assets/{index-CCDLY5yo.js → index-CqjL56RL.js} +1 -1
  100. package/dist/assets/{index-BNQ03H5g.js → index-Cwj1cT7X.js} +1 -1
  101. package/dist/assets/{index-2c1VoOd9.js → index-DN1FR838.js} +3 -3
  102. package/dist/assets/{index-CeMW5u5M.js → index-DS6pTkmU.js} +1 -1
  103. package/dist/assets/{index-C34tPvay.js → index-DW37Hc5m.js} +1 -1
  104. package/dist/assets/{index-DtbxvdaD.js → index-D_Ja8zFw.js} +1 -1
  105. package/dist/assets/{index-DCmGZYYq.js → index-D_vvbtGZ.js} +1 -1
  106. package/dist/assets/{index-D-Q5yWhn.js → index-DalOLs5N.js} +1 -1
  107. package/dist/assets/{index-CuNku1ac.js → index-Dcx5YP4F.js} +1 -1
  108. package/dist/assets/{index-OJESZDQE.js → index-Dosi9lN2.js} +1 -1
  109. package/dist/assets/{index-CZVLqYhR.js → index-DtEm4DlR.js} +1 -1
  110. package/dist/assets/{index-DUpNrHpg.js → index-DzIQue5G.js} +1 -1
  111. package/dist/assets/{index-vpxPTR3F.js → index-DzMTdOui.js} +1 -1
  112. package/dist/assets/{index-EhtXyCtH.js → index-EO1T3ubZ.js} +1 -1
  113. package/dist/assets/{index-DF8exUsL.js → index-PexLSZpT.js} +1 -1
  114. package/dist/assets/index-UxFoihcG.js +606 -0
  115. package/dist/assets/{index-DGZbMOLi.js → index-aZK5B1rf.js} +1 -1
  116. package/dist/assets/{index-DOFLIkPm.js → index-aiY7k_D_.js} +1 -1
  117. package/dist/assets/{index-n0Dm2HUt.js → index-oVsaWj9v.js} +1 -1
  118. package/dist/assets/{index-gDj2o7RF.js → index-p4uzP6uF.js} +1 -1
  119. package/dist/assets/{index.esm-CgpVcU8p.js → index.esm-0qTLMRcM.js} +1 -1
  120. package/dist/assets/{install-from-url-jU_rZbjX.js → install-from-url-D4BZhujU.js} +1 -1
  121. package/dist/assets/{invitation-DX_ynvNX.js → invitation-7JPfzYsz.js} +1 -1
  122. package/dist/assets/{is-path-prefix-equal-VKe4yShn.js → is-path-prefix-equal-By5q4Tar.js} +1 -1
  123. package/dist/assets/{item-D0BOEDZA.js → item-BIq4iEQn.js} +1 -1
  124. package/dist/assets/{javascript-DCfUrb2b.js → javascript-B_b2FAHq.js} +1 -1
  125. package/dist/assets/{jsonMode-DflwradV.js → jsonMode-De4-g9Kb.js} +1 -1
  126. package/dist/assets/{liquid-v5CyzMO1.js → liquid-gACWVLj5.js} +1 -1
  127. package/dist/assets/{list-header-BsNw1q-X.js → list-header-DLDug_Pi.js} +1 -1
  128. package/dist/assets/{lock.svg-DcfL5WSZ.js → lock.svg-BzS6KpeB.js} +1 -1
  129. package/dist/assets/{log-v9e9l2M0.js → log-B-hBZSCU.js} +1 -1
  130. package/dist/assets/{lottie-react.esm-CCtixTZh.js → lottie-react.esm-CIMHKb6b.js} +1 -1
  131. package/dist/assets/{mdx-Ctxzc90y.js → mdx-QEop8_Eo.js} +1 -1
  132. package/dist/assets/{memory-BBW5cukR.js → memory-B3cgfihx.js} +1 -1
  133. package/dist/assets/{metric-gyu0g4Df.js → metric-Cof1oNBC.js} +1 -1
  134. package/dist/assets/omit-B3Qfr75J.js +1 -0
  135. package/dist/assets/{overview-CGezXNcq.js → overview-Bg8w97tG.js} +1 -1
  136. package/dist/assets/{permission-Dh9Y-pMK.js → permission-BFEhHSn7.js} +1 -1
  137. package/dist/assets/{preference-CSylIZyx.js → preference-BruWxN0I.js} +3 -3
  138. package/dist/assets/{python-OTBVRvfx.js → python-BjdcRw1L.js} +1 -1
  139. package/dist/assets/{raf-schd.esm-CeLqNu5n.js → raf-schd.esm-CzegtaBG.js} +1 -1
  140. package/dist/assets/{razor-Dz96HacP.js → razor-IcRt_b4C.js} +1 -1
  141. package/dist/assets/{rotate-session-key-sNZ4agRi.js → rotate-session-key-168u3XBv.js} +1 -1
  142. package/dist/assets/{runtime-44wcxPEo.js → runtime-_J5cuOkf.js} +1 -1
  143. package/dist/assets/schema-C7mAV9wx.js +1 -0
  144. package/dist/assets/sdk-Dn9cGqw6.js +1 -0
  145. package/dist/assets/{service-CrTKbt09.js → service-C07l8A9I.js} +1 -1
  146. package/dist/assets/{shorten-label-azqzn6Q0.js → shorten-label-lyN5fJdD.js} +1 -1
  147. package/dist/assets/{simple-select-Cjwynh2P.js → simple-select-DstcGmRv.js} +1 -1
  148. package/dist/assets/{spaces-CImRuKfl.js → spaces-DJOIEEkJ.js} +1 -1
  149. package/dist/assets/{status-BVLGfZ_U.js → status-DQyrCw3T.js} +1 -1
  150. package/dist/assets/{status-DqZQuuxT.js → status-DjHRNPcT.js} +1 -1
  151. package/dist/assets/{switch-control-uPmfeqt7.js → switch-control-BmkF4vyJ.js} +1 -1
  152. package/dist/assets/{table-icons-j1shPhg0.js → table-icons-GRr0eBoB.js} +1 -1
  153. package/dist/assets/{team-BOavcC7l.js → team-Dn5co06a.js} +1 -1
  154. package/dist/assets/{toLower-DFhqc1Tx.js → toLower-ysbVZcXo.js} +1 -1
  155. package/dist/assets/toUpper-B_tZoZUo.js +1 -0
  156. package/dist/assets/{traffic-Dk3MPYPo.js → traffic-DlmGH1wr.js} +1 -1
  157. package/dist/assets/{tsMode-DtrLBL88.js → tsMode-CApNVpTQ.js} +1 -1
  158. package/dist/assets/{typescript-B_jxVxfT.js → typescript-C-UJmhZH.js} +1 -1
  159. package/dist/assets/{url-evaluation-CKpb4hS-.js → url-evaluation-D0KhcJoH.js} +1 -1
  160. package/dist/assets/{url-join-_MGxS-GP.js → url-join-DF4J2tJs.js} +1 -1
  161. package/dist/assets/{use-mobile-CYJJmSLZ.js → use-mobile-BN298Cwf.js} +1 -1
  162. package/dist/assets/{use-mobile-DehCuxqg.js → use-mobile-BRO-uubG.js} +1 -1
  163. package/dist/assets/{useAsync-EJ0V06fl.js → useAsync-ihOYfxyw.js} +1 -1
  164. package/dist/assets/{useAsyncRetry-DTCkIRbI.js → useAsyncRetry-Bo43j2ED.js} +1 -1
  165. package/dist/assets/{useLocalStorage-C5c8IOKv.js → useLocalStorage-DdFQ0H8D.js} +1 -1
  166. package/dist/assets/{useThemeProps-Ddo6kYr5.js → useThemeProps-7IPePURq.js} +1 -1
  167. package/dist/assets/{util-CQYGkX3v.js → util-B8wHWVVx.js} +1 -1
  168. package/dist/assets/{wait-container-Dt2QEBDD.js → wait-container-CYtuj1LZ.js} +1 -1
  169. package/dist/assets/{without-wallet-DwaGUGcr.js → without-wallet-BBF6F6X8.js} +1 -1
  170. package/dist/assets/wrap-locale-C5FvK0v2.js +1 -0
  171. package/dist/assets/{xml-TYsadqlU.js → xml-CtHgzjfR.js} +1 -1
  172. package/dist/assets/{yaml-BeTZvw1b.js → yaml-UcfMMR9d.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-BrtzEFq8.js +0 -1
  177. package/dist/assets/api-DxqoYz8S.js +0 -1
  178. package/dist/assets/cloneDeep-BAowUJcW.js +0 -1
  179. package/dist/assets/emotion-cache.browser.esm-BLI6o2QB.js +0 -1
  180. package/dist/assets/engine-d9ZSaCl8.js +0 -1
  181. package/dist/assets/getValidReactChildren-C8GIEouH.js +0 -1
  182. package/dist/assets/index-B0_NefDz.js +0 -1
  183. package/dist/assets/index-BVtHC_qD.js +0 -606
  184. package/dist/assets/omit-B1xspwKB.js +0 -1
  185. package/dist/assets/schema-DTRR0KGi.js +0 -1
  186. package/dist/assets/sdk-DH9OjvLO.js +0 -1
  187. package/dist/assets/toUpper-BIz-OTsX.js +0 -1
  188. package/dist/assets/wrap-locale-BSXSKo1t.js +0 -1
@@ -1,4 +1,4 @@
1
- import{bd as c}from"./index-2c1VoOd9.js";var n={exports:{}};/*!
1
+ import{bd as c}from"./index-DN1FR838.js";var n={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
@@ -0,0 +1 @@
1
+ import{c5 as c,r as _,cw as f,h1 as S,cW as r}from"./index-DN1FR838.js";var d=function(n){var a=c(_.useState(n),2),u=a[0],o=a[1],i=f(function(t){o(function(e){var s=S(t)?t(e):t;return s?r(r({},e),s):e})});return[u,i]};export{d as u};
@@ -1,4 +1,4 @@
1
- import{aF as de,j as e,hh as Es,hi as Is,bQ as Ds,r as q,s as xe,K as $,f5 as kt,t as U,eO as ft,a3 as ae,C as Ee,bi as zt,dL as Ls,o as T,hj as qs,b2 as Ht,cB as Ms,cU as Bs,dq as zs,T as Y,dH as it,bn as ne,bE as mt,p as ue,hk as Hs,bF as pt,b as W,bg as G,bA as ee,H as Z,aV as ie,V as oe,n as Nt,q as Ns,w as Ft,ac as Fs,i as Zt,ge as Zs,hl as Vs,at as Us,aU as X,R as Te,$ as ke,D as Ws,U as Js,v as re,X as at,hm as Ks,hn as Gs,eA as Ys,eC as Xs,F as je,aH as J,g3 as Qs,d0 as St,W as er,fn as Vt,ay as te,aR as Ct,ho as tr,f9 as Re,cw as E,bD as ge,aD as se,O as Q,aP as ye,hp as qe,a1 as sr,hq as Je,c7 as Ce,eD as rr,hr as nr,dI as ce,f as Oe,y as Ut,bz as ot,M as ir,cI as Wt,bs as ar,gk as Ze,hs as or,b9 as lr,L as cr,cv as Be,aK as He,ht as dr,Q as ur,bp as hr,af as Rt,a2 as Jt,bj as Ne,hu as Kt,b6 as fr,gD as we,fa as Gt,c_ as Yt,B as mr,b5 as Ot,fc as pr,fh as gr,G as Ke,J as yr,bx as xr}from"./index-2c1VoOd9.js";import{F as vr,a as lt,s as br,L as _e,S as jr,B as _r}from"./preference-CSylIZyx.js";import{N as $t}from"./ChevronRight-BUUZmp3v.js";import{T as Fe}from"./html-title-BQwqe1Ck.js";import{w as Ie,P as wr}from"./permission-Dh9Y-pMK.js";import{u as gt}from"./index-B0_NefDz.js";import{D as kr}from"./Done-DXPJGUWm.js";import{R as Sr,S as M}from"./collapse-DRRC0SCd.js";import{A as Cr,a as At}from"./Autocomplete-BBHR-e2e.js";import{C as Rr,R as Or,S as $r,P as Ar}from"./rotate-session-key-sNZ4agRi.js";import{u as le}from"./blocklet-Cu8go6Cl.js";import{C as Xt}from"./click-to-copy-BpBPaRWz.js";import{u as Ve}from"./team-BOavcC7l.js";import{v as Qt}from"./index-BNQ03H5g.js";import{g as Pr}from"./chain-tpP2d9Lm.js";import{V as Tr,d as Er}from"./status-DqZQuuxT.js";import{S as pe}from"./Switch-UORzToTA.js";import{B as Ir}from"./index-C3PPN1sd.js";import{y as Dr}from"./index-DOFLIkPm.js";import{I as Lr,J as qr,K as Mr,L as Br}from"./index-D6WMVz-u.js";import{u as ve,C as H,b as Pt}from"./index.esm-CgpVcU8p.js";import{S as ze,u as zr}from"./switch-control-uPmfeqt7.js";import{D as Tt,R as es,a as ts}from"./url-evaluation-CKpb4hS-.js";import{A as Et}from"./Add-CM0i44L2.js";import{H as Ue}from"./index-CZVLqYhR.js";import{u as ss}from"./use-mobile-DehCuxqg.js";import{S as Ge}from"./simple-select-Cjwynh2P.js";import{G as Hr}from"./actions-e0cgLZ3F.js";import{C as Nr}from"./CardContent-Ck7ja9MC.js";import"./omit-B1xspwKB.js";import"./index-CuNku1ac.js";import"./edit.svg-CpLTrX1j.js";import"./ArrowDropDown-BrtzEFq8.js";import"./ButtonGroup-B_6MNBFc.js";import"./getValidReactChildren-C8GIEouH.js";import"./index-DO977Avs.js";import"./iframe-9SAgwJDT.js";import"./ListSubheader-BHGxSe1E.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-DBqK27X8.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-DqZHJbRG.js";import"./CSSTransition-C6uS6QtZ.js";import"./emotion-cache.browser.esm-BLI6o2QB.js";import"./depsEqual-DJ4V1mTU.js";import"./TableSearch-BQiqRB7D.js";import"./Search-BiQ8hlgr.js";import"./Clear-CFi5u92e.js";import"./MoreVert-Ck4O28kx.js";import"./useLocalStorage-C5c8IOKv.js";import"./get-safe-url-CHuz2b-I.js";const rs=de([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),Fr=de([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Zr=de(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),Vr=de(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),Ur=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),Wr=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),ct=de(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),Jr=de([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),Kr=de(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),Gr=de(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),ns=de(e.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),Yr=de(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),Xr=de(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var Qr=Array.prototype,It=Qr.splice;function en(v,R,O,C){var _=Is,j=-1,p=R.length,i=v;for(v===R&&(R=Es(R));++j<p;)for(var m=0,f=R[j],h=f;(m=_(i,h,m))>-1;)i!==v&&It.call(i,m,1),It.call(v,m,1);return v}function tn(v,R){return v&&v.length&&R&&R.length?en(v,R):v}var sn=Ds(tn);const rn={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function is({label:v="",disabled:R=!1,required:O=!1,initialValue:C="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:i=[],options:m=[],formatterBeforeSubmit:f=n=>n.join(","),helperText:h="",placeholder:t="",renderImage:l=()=>null,renderLabel:o=()=>"",filterKeys:r=["name"],noEmpty:s=!1,...c}){const[n,a]=q.useState(!1),[u,g]=q.useState(!1),[y,k]=q.useState(""),w=q.useRef(null),[d,x]=q.useState(C),[b,S]=q.useState(d),A=q.useMemo(()=>{if(!m)return{};const z={};return m.forEach(I=>{z[I.code]=I}),z},[m]),P=()=>{if(!m)return[];if(!y)return m.map(I=>I.code);const z=new RegExp(y.toLowerCase());return m.filter(I=>{for(let B=0;B<r.length;B++){const F=r[B];if(z.test(I[F]?.toLowerCase()))return!0}return!1}).map(I=>I.code)},L=async()=>{g(!0);try{await p(typeof f=="function"?f(b):b)===!1?S(d):s&&!b.length?(S(C),x(C)):(S(b),x(b))}catch{S(d)}finally{g(!1),a(!1)}},D=(z,I)=>{if(!Array.isArray(I)){S([]),_([]);return}const B=I.filter(F=>A[F]);if(!B.length){S([]),_([]);return}S(B),_(B)},N=z=>{z.stopPropagation(),a(!0),setTimeout(()=>{if(w.current){const I=w.current.querySelector("input");I&&I.focus()}},500)},V=n?e.jsx(Cr,{ref:w,options:m,value:b,onChange:D,inputValue:y,onInputChange:(z,I)=>{k(I)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:z=>A[z]?.name,renderInput:z=>e.jsx(U,{...z,label:"",placeholder:t}),renderOption:(z,I)=>{const B=b.indexOf(I)!==-1;return q.createElement(nn,{component:"li",...z,key:I},l(A[I]||{}),e.jsx($,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:B?"700":"normal"},children:o(I,A[I])||A[I]?.name}),e.jsx($,{component:kt,sx:{opacity:.5,width:18,height:18},style:{visibility:B?"visible":"hidden"}}))},...c,slots:{popper:an}}):e.jsx($,{className:"form-item-input slot",onClick:N,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(z=>m.some(I=>I.code===z)).map(z=>e.jsx(ft,{label:m.find(I=>I.code===z).name,style:{marginRight:8},size:"small"},z))});return e.jsx(vr,{className:"form",style:j,children:e.jsxs($,{className:"form-item",children:[e.jsxs($,{className:"form-item-label",children:[v,O&&e.jsx(Sr,{})]}),e.jsxs($,{className:"form-item-body",children:[e.jsx($,{className:"form-item-input",children:V}),n?e.jsx($,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ae,{"data-cy":"schema-form-item-confirm",onClick:L,disabled:R||u,size:"large",children:u?e.jsx(Ee,{size:24}):e.jsx(kr,{})}),e.jsx(ae,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),a(!1)},disabled:R||u,size:"large",children:e.jsx(kt,{})})]})}):null]}),n&&h&&e.jsx(zt,{children:h})]})})}is.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const nn=xe.div`
1
+ import{aF as de,j as e,hh as Es,hi as Is,bQ as Ds,r as q,s as xe,K as $,f5 as kt,t as U,eO as ft,a3 as ae,C as Ee,bi as zt,dL as Ls,o as T,hj as qs,b2 as Ht,cB as Ms,cU as Bs,dq as zs,T as Y,dH as it,bn as ne,bE as mt,p as ue,hk as Hs,bF as pt,b as W,bg as G,bA as ee,H as Z,aV as ie,V as oe,n as Nt,q as Ns,w as Ft,ac as Fs,i as Zt,ge as Zs,hl as Vs,at as Us,aU as X,R as Te,$ as ke,D as Ws,U as Js,v as re,X as at,hm as Ks,hn as Gs,eA as Ys,eC as Xs,F as je,aH as J,g3 as Qs,d0 as St,W as er,fn as Vt,ay as te,aR as Ct,ho as tr,f9 as Re,cw as E,bD as ge,aD as se,O as Q,aP as ye,hp as qe,a1 as sr,hq as Je,c7 as Ce,eD as rr,hr as nr,dI as ce,f as Oe,y as Ut,bz as ot,M as ir,cI as Wt,bs as ar,gk as Ze,hs as or,b9 as lr,L as cr,cv as Be,aK as He,ht as dr,Q as ur,bp as hr,af as Rt,a2 as Jt,bj as Ne,hu as Kt,b6 as fr,gD as we,fa as Gt,c_ as Yt,B as mr,b5 as Ot,fc as pr,fh as gr,G as Ke,J as yr,bx as xr}from"./index-DN1FR838.js";import{F as vr,a as lt,s as br,L as _e,S as jr,B as _r}from"./preference-BruWxN0I.js";import{N as $t}from"./ChevronRight-W_01-zFQ.js";import{T as Fe}from"./html-title-DZPr9ErN.js";import{w as Ie,P as wr}from"./permission-BFEhHSn7.js";import{u as gt}from"./index-ClIHkf52.js";import{D as kr}from"./Done-D_cfJoKY.js";import{R as Sr,S as M}from"./collapse-C4RswaYj.js";import{A as Cr,a as At}from"./Autocomplete-DzPelkmw.js";import{C as Rr,R as Or,S as $r,P as Ar}from"./rotate-session-key-168u3XBv.js";import{u as le}from"./blocklet-BwZNRhqB.js";import{C as Xt}from"./click-to-copy-_XuYTLfd.js";import{u as Ve}from"./team-Dn5co06a.js";import{v as Qt}from"./index-Cwj1cT7X.js";import{g as Pr}from"./chain-BLr2de5j.js";import{V as Tr,d as Er}from"./status-DjHRNPcT.js";import{S as pe}from"./Switch-DXK3jQx6.js";import{B as Ir}from"./index-B_irEVal.js";import{y as Dr}from"./index-aiY7k_D_.js";import{I as Lr,J as qr,K as Mr,L as Br}from"./index-CIJ5EXA3.js";import{u as ve,C as H,b as Pt}from"./index.esm-0qTLMRcM.js";import{S as ze,u as zr}from"./switch-control-BmkF4vyJ.js";import{D as Tt,R as es,a as ts}from"./url-evaluation-D0KhcJoH.js";import{A as Et}from"./Add-DMoAJUVW.js";import{H as Ue}from"./index-DtEm4DlR.js";import{u as ss}from"./use-mobile-BRO-uubG.js";import{S as Ge}from"./simple-select-DstcGmRv.js";import{G as Hr}from"./actions-BQYoCyzD.js";import{C as Nr}from"./CardContent-yvDYaO_0.js";import"./omit-B3Qfr75J.js";import"./index-Dcx5YP4F.js";import"./edit.svg-BWsZcaur.js";import"./ArrowDropDown-BS1FI8Dx.js";import"./ButtonGroup-Dlkb94HL.js";import"./getValidReactChildren-Dxx0sUSA.js";import"./index-C_lSg5BT.js";import"./iframe-DloJgn9Q.js";import"./ListSubheader-Dz5YbKqQ.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-ClBFY-zS.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-CoyfX8VL.js";import"./CSSTransition-Cp9IAg_E.js";import"./emotion-cache.browser.esm-DR87qH_k.js";import"./depsEqual-C1JyiMkY.js";import"./TableSearch-DTa-kQYq.js";import"./Search-DihRAr8J.js";import"./Clear-3aQ_ViuO.js";import"./MoreVert-Crfla2Nw.js";import"./useLocalStorage-DdFQ0H8D.js";import"./get-safe-url-B8fUDSaQ.js";const rs=de([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),Fr=de([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Zr=de(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),Vr=de(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),Ur=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),Wr=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),ct=de(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),Jr=de([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),Kr=de(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),Gr=de(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),ns=de(e.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),Yr=de(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),Xr=de(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var Qr=Array.prototype,It=Qr.splice;function en(v,R,O,C){var _=Is,j=-1,p=R.length,i=v;for(v===R&&(R=Es(R));++j<p;)for(var m=0,f=R[j],h=f;(m=_(i,h,m))>-1;)i!==v&&It.call(i,m,1),It.call(v,m,1);return v}function tn(v,R){return v&&v.length&&R&&R.length?en(v,R):v}var sn=Ds(tn);const rn={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function is({label:v="",disabled:R=!1,required:O=!1,initialValue:C="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:i=[],options:m=[],formatterBeforeSubmit:f=n=>n.join(","),helperText:h="",placeholder:t="",renderImage:l=()=>null,renderLabel:o=()=>"",filterKeys:r=["name"],noEmpty:s=!1,...c}){const[n,a]=q.useState(!1),[u,g]=q.useState(!1),[y,k]=q.useState(""),w=q.useRef(null),[d,x]=q.useState(C),[b,S]=q.useState(d),A=q.useMemo(()=>{if(!m)return{};const z={};return m.forEach(I=>{z[I.code]=I}),z},[m]),P=()=>{if(!m)return[];if(!y)return m.map(I=>I.code);const z=new RegExp(y.toLowerCase());return m.filter(I=>{for(let B=0;B<r.length;B++){const F=r[B];if(z.test(I[F]?.toLowerCase()))return!0}return!1}).map(I=>I.code)},L=async()=>{g(!0);try{await p(typeof f=="function"?f(b):b)===!1?S(d):s&&!b.length?(S(C),x(C)):(S(b),x(b))}catch{S(d)}finally{g(!1),a(!1)}},D=(z,I)=>{if(!Array.isArray(I)){S([]),_([]);return}const B=I.filter(F=>A[F]);if(!B.length){S([]),_([]);return}S(B),_(B)},N=z=>{z.stopPropagation(),a(!0),setTimeout(()=>{if(w.current){const I=w.current.querySelector("input");I&&I.focus()}},500)},V=n?e.jsx(Cr,{ref:w,options:m,value:b,onChange:D,inputValue:y,onInputChange:(z,I)=>{k(I)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:z=>A[z]?.name,renderInput:z=>e.jsx(U,{...z,label:"",placeholder:t}),renderOption:(z,I)=>{const B=b.indexOf(I)!==-1;return q.createElement(nn,{component:"li",...z,key:I},l(A[I]||{}),e.jsx($,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:B?"700":"normal"},children:o(I,A[I])||A[I]?.name}),e.jsx($,{component:kt,sx:{opacity:.5,width:18,height:18},style:{visibility:B?"visible":"hidden"}}))},...c,slots:{popper:an}}):e.jsx($,{className:"form-item-input slot",onClick:N,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(z=>m.some(I=>I.code===z)).map(z=>e.jsx(ft,{label:m.find(I=>I.code===z).name,style:{marginRight:8},size:"small"},z))});return e.jsx(vr,{className:"form",style:j,children:e.jsxs($,{className:"form-item",children:[e.jsxs($,{className:"form-item-label",children:[v,O&&e.jsx(Sr,{})]}),e.jsxs($,{className:"form-item-body",children:[e.jsx($,{className:"form-item-input",children:V}),n?e.jsx($,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ae,{"data-cy":"schema-form-item-confirm",onClick:L,disabled:R||u,size:"large",children:u?e.jsx(Ee,{size:24}):e.jsx(kr,{})}),e.jsx(ae,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),a(!1)},disabled:R||u,size:"large",children:e.jsx(kt,{})})]})}):null]}),n&&h&&e.jsx(zt,{children:h})]})})}is.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const nn=xe.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{c0 as Ke,b$ as Fe,r as h,c1 as Ge,j as e,b8 as ee,c3 as $e,cg as J,c4 as Ye,bZ as He,ci as qe,aF as he,M as q,bn as A,cv as Ce,H as B,X as V,bf as E,fD as we,aQ as Be,b as N,iP 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,iQ as X,h_ as Z,iR as st,K as S,aV as K,aH as T,L as nt,g as H,dm as at,ay as Se,Q as G,aE as $,a8 as Y,a4 as rt,bA as it,fu as ct,a$ as lt,v as pe,w as dt,G as be,Y as Ee,bD as xe,B as pt}from"./index-2c1VoOd9.js";import{T as ut}from"./html-title-BQwqe1Ck.js";import{u as U}from"./blocklet-Cu8go6Cl.js";import{u as mt}from"./use-mobile-DehCuxqg.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-CTjQfAN3.js";import"./index-CeMW5u5M.js";import"./index-BojVbZw0.js";import"./api-DxqoYz8S.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-CImRuKfl.js";import{v as Rt}from"./index-BNQ03H5g.js";import{E as zt}from"./index-IfVDnuZk.js";import{H as vt}from"./HelpOutline-DswUhBxG.js";import{H as Pt}from"./index-CZVLqYhR.js";import{x as At}from"./index-DRYJ0xIl.js";import{c as Lt}from"./actions-e0cgLZ3F.js";import{D as Ut}from"./DeleteOutline-BHEKXTkO.js";import{g as ke}from"./get-safe-url-CHuz2b-I.js";import{S as Ot}from"./switch-control-uPmfeqt7.js";import{L as je}from"./list-header-BsNw1q-X.js";import"./OpenInNew-BJk7hIVB.js";import"./ButtonGroup-B_6MNBFc.js";import"./getValidReactChildren-C8GIEouH.js";import"./FilterList-DqZHJbRG.js";import"./CSSTransition-C6uS6QtZ.js";import"./emotion-cache.browser.esm-BLI6o2QB.js";import"./index-D6WMVz-u.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-DJ4V1mTU.js";import"./index-DOFLIkPm.js";import"./TableSearch-BQiqRB7D.js";import"./Search-BiQ8hlgr.js";import"./Clear-CFi5u92e.js";import"./MoreVert-Ck4O28kx.js";import"./useLocalStorage-C5c8IOKv.js";import"./url-evaluation-CKpb4hS-.js";import"./permission-Dh9Y-pMK.js";import"./Switch-UORzToTA.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(`
1
+ import{c0 as Ke,b$ as Fe,r as h,c1 as Ge,j as e,b8 as ee,c3 as $e,cg as J,c4 as Ye,bZ as He,ci as qe,aF as he,M as q,bn as A,cv as Ce,H as B,X as V,bf as E,fD as we,aQ as Be,b as N,iP 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,iQ as X,h_ as Z,iR as st,K as S,aV as K,aH as T,L as nt,g as H,dm as at,ay as Se,Q as G,aE as $,a8 as Y,a4 as rt,bA as it,fu as ct,a$ as lt,v as pe,w as dt,G as be,Y as Ee,bD as xe,B as pt}from"./index-DN1FR838.js";import{T as ut}from"./html-title-DZPr9ErN.js";import{u as U}from"./blocklet-BwZNRhqB.js";import{u as mt}from"./use-mobile-BRO-uubG.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-CQeSm0MO.js";import"./index-DS6pTkmU.js";import"./index-BojVbZw0.js";import"./api-DtECYdKn.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-DJOIEEkJ.js";import{v as Rt}from"./index-Cwj1cT7X.js";import{E as zt}from"./index-C1n8OjtU.js";import{H as vt}from"./HelpOutline-DNkRe_xv.js";import{H as Pt}from"./index-DtEm4DlR.js";import{x as At}from"./index-DRYJ0xIl.js";import{c as Lt}from"./actions-BQYoCyzD.js";import{D as Ut}from"./DeleteOutline-CduYjOSi.js";import{g as ke}from"./get-safe-url-B8fUDSaQ.js";import{S as Ot}from"./switch-control-BmkF4vyJ.js";import{L as je}from"./list-header-DLDug_Pi.js";import"./OpenInNew-CMikwXJg.js";import"./ButtonGroup-Dlkb94HL.js";import"./getValidReactChildren-Dxx0sUSA.js";import"./FilterList-CoyfX8VL.js";import"./CSSTransition-Cp9IAg_E.js";import"./emotion-cache.browser.esm-DR87qH_k.js";import"./index-CIJ5EXA3.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-C1JyiMkY.js";import"./index-aiY7k_D_.js";import"./TableSearch-DTa-kQYq.js";import"./Search-DihRAr8J.js";import"./Clear-3aQ_ViuO.js";import"./MoreVert-Crfla2Nw.js";import"./useLocalStorage-DdFQ0H8D.js";import"./url-evaluation-D0KhcJoH.js";import"./permission-BFEhHSn7.js";import"./Switch-DXK3jQx6.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
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;
@@ -1 +1 @@
1
- import{bd as x}from"./index-2c1VoOd9.js";function D(a,i){for(var r=0;r<i.length;r++){const e=i[r];if(typeof e!="string"&&!Array.isArray(e)){for(const s in e)if(s!=="default"&&!(s in a)){const t=Object.getOwnPropertyDescriptor(e,s);t&&Object.defineProperty(a,s,t.get?t:{enumerable:!0,get:()=>e[s]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var l,w;function J(){if(w)return l;w=1;var a={default:l,call:function(i,r,e){var s="";typeof r=="function"&&(e=r,r={});var t={data:r===void 0?null:r};if(typeof e=="function"){var d="dscb"+window.dscb++;window[d]=e,t._dscbstub=d}return t=JSON.stringify(t),window._dsbridge?s=_dsbridge.call(i,t):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(s=prompt("_dsbridge="+i,t)),JSON.parse(s||"{}").data},register:function(i,r,e){var s=e?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){a.call("_dsb.dsinit")},0)),typeof r=="object"?s._obs[i]=r:s[i]=r},registerAsyn:function(i,r){this.register(i,r,!0)},hasNativeMethod:function(i,r){return this.call("_dsb.hasNativeMethod",{name:i,type:r||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};return function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:a,close:function(){a.call("_dsb.closePage")},_handleMessageFromNative:function(e){var s=JSON.parse(e.data),t={id:e.callbackId,complete:!0},d=this._dsf[e.method],o=this._dsaf[e.method],v=function(_,p){t.data=_.apply(p,s),a.call("_dsb.returnValue",t)},g=function(_,p){s.push(function(O,j){t.data=O,t.complete=j!==!1,a.call("_dsb.returnValue",t)}),_.apply(p,s)};if(d)v(d,this._dsf);else if(o)g(o,this._dsaf);else{var u=e.method.split(".");if(u.length<2)return;var b=u.pop(),h=u.join("."),c=this._dsf._obs,f=c[h]||{},n=f[b];if(n&&typeof n=="function"){v(n,f);return}if(c=this._dsaf._obs,f=c[h]||{},n=f[b],n&&typeof n=="function"){g(n,f);return}}}};for(var r in i)window[r]=i[r];a.register("_hasJavascriptMethod",function(e,s){var t=e.split(".");if(t.length<2)return!!(_dsf[t]||_dsaf[t]);var e=t.pop(),d=t.join("."),o=_dsf._obs[d]||_dsaf._obs[d];return o&&!!o[e]})}}(),l=a,l}var y=J();const N=x(y),k=D({__proto__:null,default:N},[y]);export{k as i};
1
+ import{bd as x}from"./index-DN1FR838.js";function D(a,i){for(var r=0;r<i.length;r++){const e=i[r];if(typeof e!="string"&&!Array.isArray(e)){for(const s in e)if(s!=="default"&&!(s in a)){const t=Object.getOwnPropertyDescriptor(e,s);t&&Object.defineProperty(a,s,t.get?t:{enumerable:!0,get:()=>e[s]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var l,w;function J(){if(w)return l;w=1;var a={default:l,call:function(i,r,e){var s="";typeof r=="function"&&(e=r,r={});var t={data:r===void 0?null:r};if(typeof e=="function"){var d="dscb"+window.dscb++;window[d]=e,t._dscbstub=d}return t=JSON.stringify(t),window._dsbridge?s=_dsbridge.call(i,t):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(s=prompt("_dsbridge="+i,t)),JSON.parse(s||"{}").data},register:function(i,r,e){var s=e?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){a.call("_dsb.dsinit")},0)),typeof r=="object"?s._obs[i]=r:s[i]=r},registerAsyn:function(i,r){this.register(i,r,!0)},hasNativeMethod:function(i,r){return this.call("_dsb.hasNativeMethod",{name:i,type:r||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};return function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:a,close:function(){a.call("_dsb.closePage")},_handleMessageFromNative:function(e){var s=JSON.parse(e.data),t={id:e.callbackId,complete:!0},d=this._dsf[e.method],o=this._dsaf[e.method],v=function(_,p){t.data=_.apply(p,s),a.call("_dsb.returnValue",t)},g=function(_,p){s.push(function(O,j){t.data=O,t.complete=j!==!1,a.call("_dsb.returnValue",t)}),_.apply(p,s)};if(d)v(d,this._dsf);else if(o)g(o,this._dsaf);else{var u=e.method.split(".");if(u.length<2)return;var b=u.pop(),h=u.join("."),c=this._dsf._obs,f=c[h]||{},n=f[b];if(n&&typeof n=="function"){v(n,f);return}if(c=this._dsaf._obs,f=c[h]||{},n=f[b],n&&typeof n=="function"){g(n,f);return}}}};for(var r in i)window[r]=i[r];a.register("_hasJavascriptMethod",function(e,s){var t=e.split(".");if(t.length<2)return!!(_dsf[t]||_dsaf[t]);var e=t.pop(),d=t.join("."),o=_dsf._obs[d]||_dsaf._obs[d];return o&&!!o[e]})}}(),l=a,l}var y=J();const N=x(y),k=D({__proto__:null,default:N},[y]);export{k as i};
@@ -1,4 +1,4 @@
1
- import{j as o,T as i,dn as p,dp as x,br as f}from"./index-2c1VoOd9.js";function w({name:t,nameFormatter:r=e=>typeof e=="string"?e.split(" ").map(c=>p(x(c))).join(" "):e,layout:n="horizontal",children:a,valueComponent:l="div",nameWidth:s=90,...m}){return o.jsxs(d,{layout:n,width:s,...m,children:[o.jsx(i,{color:"textSecondary",className:"info-row__name",children:r(t)}),a&&o.jsx(i,{color:"textPrimary",component:l,className:"info-row__value",children:a})]})}const d=f("div")`
1
+ import{j as o,T as i,dn as p,dp as x,br as f}from"./index-DN1FR838.js";function w({name:t,nameFormatter:r=e=>typeof e=="string"?e.split(" ").map(c=>p(x(c))).join(" "):e,layout:n="horizontal",children:a,valueComponent:l="div",nameWidth:s=90,...m}){return o.jsxs(d,{layout:n,width:s,...m,children:[o.jsx(i,{color:"textSecondary",className:"info-row__name",children:r(t)}),a&&o.jsx(i,{color:"textPrimary",component:l,className:"info-row__value",children:a})]})}const d=f("div")`
2
2
  display: flex;
3
3
  flex-direction: ${t=>t.layout==="vertical"?"column":"row"};
4
4
  justify-content: flex-start;