@abtnode/webapp 1.16.27 → 1.16.28-beta-23b06b63

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 (205) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{Add-DOwN6I9N.js → Add-BxRt9WAM.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-CEsdzzcK.js → ArrowDropDown-BDCD7rfw.js} +1 -1
  5. package/dist/assets/{Autocomplete-DcC19-q2.js → Autocomplete-mKcnfw_W.js} +1 -1
  6. package/dist/assets/Breadcrumbs-BTPbI2mY.js +1 -0
  7. package/dist/assets/{ButtonGroup-CKY0O7tT.js → ButtonGroup-B4i-HvgZ.js} +1 -1
  8. package/dist/assets/{CheckCircle-BA-bGNdF.js → CheckCircle-DO-RcLP9.js} +1 -1
  9. package/dist/assets/{ChevronLeft-DRzRLgnp.js → ChevronLeft-DF7lcjk8.js} +1 -1
  10. package/dist/assets/{ChevronRight-B2YICLYm.js → ChevronRight-CFOkpNut.js} +1 -1
  11. package/dist/assets/{Close-D9SKZkJ7.js → Close-TuMd444H.js} +1 -1
  12. package/dist/assets/Delete-DDy4lv2l.js +1 -0
  13. package/dist/assets/DeleteOutline-5zk5MLVr.js +1 -0
  14. package/dist/assets/{Done-DaMxTX7e.js → Done-DZAunZvS.js} +1 -1
  15. package/dist/assets/{Edit-B1ySEana.js → Edit-CGEHojUC.js} +1 -1
  16. package/dist/assets/{EditIcon-BQGlXOR3.js → EditIcon-BylMjCE4.js} +1 -1
  17. package/dist/assets/{FilterList-DKFhXHd2.js → FilterList-dxewgEr3.js} +5 -5
  18. package/dist/assets/{Google-D2cPndsH.js → Google-C7F2Ljnc.js} +4 -4
  19. package/dist/assets/{Https-CsiKqkaT.js → Https-Bv4vNlzR.js} +1 -1
  20. package/dist/assets/{InfoOutlined-BUn5fKCT.js → InfoOutlined-BcGJkJJl.js} +1 -1
  21. package/dist/assets/{InputAdornment-DHLm1mFN.js → InputAdornment-CELCg_HF.js} +1 -1
  22. package/dist/assets/{InputLabel-BjbeXM2B.js → InputLabel-Cag35T0N.js} +1 -1
  23. package/dist/assets/{LastPage-DXu9ZGZF.js → LastPage-CHLGEMPh.js} +1 -1
  24. package/dist/assets/{Launch-BIqLZtET.js → Launch-COxUNu4j.js} +1 -1
  25. package/dist/assets/{Link-DN_Lz3rV.js → Link-BkQX3hDp.js} +1 -1
  26. package/dist/assets/{LoadingButton-3UN68oPJ.js → LoadingButton-BeuL1wF-.js} +1 -1
  27. package/dist/assets/{LockIcon-mC00ojRt.js → LockIcon-D_Uy157g.js} +1 -1
  28. package/dist/assets/{Loop-2BGd9rzF.js → Loop-Be9bzVMj.js} +1 -1
  29. package/dist/assets/{MoreVert-BCR8irtL.js → MoreVert-DCY4R0I6.js} +1 -1
  30. package/dist/assets/{Pagination-0NPBd4bk.js → Pagination-B8Go1A0z.js} +1 -1
  31. package/dist/assets/{Public-333jCEeA.js → Public-XvGsN53V.js} +1 -1
  32. package/dist/assets/{SchemaReference.es-oKwgj6eC.js → SchemaReference.es-CnykePQs.js} +1 -1
  33. package/dist/assets/{Search-5iZBDNjz.js → Search-DbENMUmJ.js} +1 -1
  34. package/dist/assets/{Select-CPvSg7uW.js → Select-BDtCsGy7.js} +2 -2
  35. package/dist/assets/{Skeleton-B4-1c0OT.js → Skeleton-D9CMhdYr.js} +4 -4
  36. package/dist/assets/{Slider-DdynydW3.js → Slider-zMdqR1_D.js} +1 -1
  37. package/dist/assets/{Stepper-DpooXZzV.js → Stepper-Df_RHJ43.js} +1 -1
  38. package/dist/assets/{TextField-sj2mcEXD.js → TextField-PSikz4cm.js} +1 -1
  39. package/dist/assets/{ToggleButtonGroup-BKQ2fKoV.js → ToggleButtonGroup-Bnx6aryv.js} +1 -1
  40. package/dist/assets/{ViewList-Cul4OAvz.js → ViewList-B9miFzh4.js} +1 -1
  41. package/dist/assets/{actions-xngcxvp5.js → actions-BRgdN5cj.js} +1 -1
  42. package/dist/assets/actions-D5ZCmrTM.js +11 -0
  43. package/dist/assets/{agreement-DBRJClMM.js → agreement-hUkyT-rU.js} +9 -9
  44. package/dist/assets/api-D8MiIqQL.js +1 -0
  45. package/dist/assets/app-avatar-CxghIswG.js +1 -0
  46. package/dist/assets/{ar-DqmJV4p8.js → ar-DXpJw3XU.js} +1 -1
  47. package/dist/assets/{audit-logs-BkgPztEs.js → audit-logs-Cj79FN7v.js} +1 -1
  48. package/dist/assets/{brace-fold.es-CsornGfx.js → brace-fold.es-D8DT3AwS.js} +1 -1
  49. package/dist/assets/{bundle-avatar-DzcvR6DI.js → bundle-avatar-DsCsmlpx.js} +1 -1
  50. package/dist/assets/chart-CD97eKtM.js +35 -0
  51. package/dist/assets/{click-to-copy-CBs5PKxt.js → click-to-copy-BUpbo6bk.js} +1 -1
  52. package/dist/assets/{closebrackets.es-5NAqcDxa.js → closebrackets.es-6cHaiFAL.js} +1 -1
  53. package/dist/assets/{codemirror.es-CEoouqN7.js → codemirror.es-fM7kqYGL.js} +1 -1
  54. package/dist/assets/{comment.es-DX01jrAI.js → comment.es-ug3wJMDP.js} +1 -1
  55. package/dist/assets/{config-navigation-Ngw7D7GZ.js → config-navigation-BCwYgsZE.js} +2 -2
  56. package/dist/assets/{de-CHOUObJ5.js → de-CWxlIdre.js} +1 -1
  57. package/dist/assets/{delete-confirm-Da1BomBl.js → delete-confirm-D2bWY0RH.js} +1 -1
  58. package/dist/assets/detail-C1AiJgJr.js +58 -0
  59. package/dist/assets/{dialog.es-Oh6qpXQO.js → dialog.es-COYIW3n4.js} +1 -1
  60. package/dist/assets/{download-DHPNYF1S.js → download-Dr-5p0Eo.js} +1 -1
  61. package/dist/assets/{es-aZ4oYeVs.js → es-BmrvDK07.js} +1 -1
  62. package/dist/assets/{foldgutter.es-DqR5-lAT.js → foldgutter.es-C-4TReDS.js} +1 -1
  63. package/dist/assets/{fr-Bi9vptGI.js → fr-B7SxgRy3.js} +1 -1
  64. package/dist/assets/getValidReactChildren-8XnhSvA9.js +1 -0
  65. package/dist/assets/{hi-BXYjfUTP.js → hi-BRRtNIB_.js} +1 -1
  66. package/dist/assets/{hint.es-D5LvE1_r.js → hint.es-D-HPm2KF.js} +1 -1
  67. package/dist/assets/{hint.es2-CgI0iRUf.js → hint.es2-RMq3iMHV.js} +1 -1
  68. package/dist/assets/{id-VVXvzjmO.js → id-D6-Qi7Q1.js} +1 -1
  69. package/dist/assets/{iframe-BcDoraJg.js → iframe-CZCbAGTG.js} +1 -1
  70. package/dist/assets/index-3VaCz9mt.js +58 -0
  71. package/dist/assets/{index-C7GDLIo-.js → index-ANhJ54Qu.js} +1 -1
  72. package/dist/assets/{index--Q6KdM7v.js → index-B-DkREsH.js} +1 -1
  73. package/dist/assets/index-B5LCLWLI.js +262 -0
  74. package/dist/assets/{index-Boqyvc8Q.js → index-B6qhr4Vv.js} +212 -211
  75. package/dist/assets/{index-_NTV4-zc.js → index-BIT8HWlC.js} +5 -5
  76. package/dist/assets/{index-BXmzbebA.js → index-BIi9UAUe.js} +2 -2
  77. package/dist/assets/index-BLP6cSf-.js +1 -0
  78. package/dist/assets/{index-DZnZf-o0.js → index-BR6wAIPR.js} +16 -16
  79. package/dist/assets/{index-zUZPbg2I.js → index-BViEd1Qy.js} +1 -1
  80. package/dist/assets/{index-CWilKNfl.js → index-BWDq0v0v.js} +6 -6
  81. package/dist/assets/{index-B6ReOJJN.js → index-B_hJh8p2.js} +1 -1
  82. package/dist/assets/{index-D81FDm0a.js → index-BdfhWOrS.js} +1 -1
  83. package/dist/assets/index-BeUBkDTf.js +80 -0
  84. package/dist/assets/{index-BCPsngBN.js → index-Bgy25Yn1.js} +1 -1
  85. package/dist/assets/{index-DuwHJNV9.js → index-Boh9o_k5.js} +1 -1
  86. package/dist/assets/index-Bq_hHWAs.js +16 -0
  87. package/dist/assets/{index-DPGsh5ca.js → index-By0wVBLr.js} +1 -1
  88. package/dist/assets/{index-CBdVDTUr.js → index-C-KUrp7f.js} +4 -4
  89. package/dist/assets/{index-opBznRc5.js → index-C9crSSRz.js} +11 -11
  90. package/dist/assets/{index-B-OHtxJg.js → index-CIFB0zK6.js} +57 -57
  91. package/dist/assets/index-CLjGBj9p.js +21 -0
  92. package/dist/assets/{index-DV-pE5RI.js → index-CfEdAej2.js} +3 -3
  93. package/dist/assets/index-Cl-qWd1J.js +54 -0
  94. package/dist/assets/index-CqR2D9OX.js +11 -0
  95. package/dist/assets/{index-CsVg93BX.js → index-CqReN4T9.js} +2 -2
  96. package/dist/assets/{index-Cl7gQviA.js → index-Cqjpq5LF.js} +1 -1
  97. package/dist/assets/{index-DycwPjM3.js → index-Cs9Skmx2.js} +1 -1
  98. package/dist/assets/index-CzRGlzNy.js +530 -0
  99. package/dist/assets/{index-Bvs8qR9r.js → index-D5672HTm.js} +1 -1
  100. package/dist/assets/{index-BwcFSka9.js → index-D7ku2TbR.js} +1 -1
  101. package/dist/assets/{index-DC46OSan.js → index-DFgkZLyi.js} +1 -1
  102. package/dist/assets/{index-BPEtPX12.js → index-DWB-NUab.js} +7 -7
  103. package/dist/assets/{index-BCQQEHyP.js → index-DiW4LiJk.js} +11 -11
  104. package/dist/assets/index-DtPnnuqa.js +85 -0
  105. package/dist/assets/{index-4SJGeyEI.js → index-G8t_K0Nh.js} +1 -1
  106. package/dist/assets/{index-eGpwmK92.js → index-Mhb4iWrQ.js} +3 -3
  107. package/dist/assets/{index-CAH8ukaj.js → index-SNuwf_Y1.js} +4 -4
  108. package/dist/assets/{index-Ct_q9GS4.js → index-Y-bwPY_P.js} +1 -1
  109. package/dist/assets/{index-DoMsU5M2.js → index-hV9d7GzX.js} +1 -1
  110. package/dist/assets/{index-BgqVsUwi.js → index-huf_vvxX.js} +1 -1
  111. package/dist/assets/{index-CtWm5SK6.js → index-neNekbhs.js} +4 -4
  112. package/dist/assets/index-oNZ-9nMm.js +11 -0
  113. package/dist/assets/{index.es-C_vrKJwx.js → index.es-CCaw5_ry.js} +1 -1
  114. package/dist/assets/{index.esm-Cnicyd3_.js → index.esm-Dh5y71gJ.js} +1 -1
  115. package/dist/assets/{info-addon.es-B0sGOwNz.js → info-addon.es-C41XU5oD.js} +1 -1
  116. package/dist/assets/{info.es-x51I_2sm.js → info.es-DH9xH_89.js} +1 -1
  117. package/dist/assets/install-from-url-C-r4nFEl.js +1 -0
  118. package/dist/assets/{invitation-B30vIvMt.js → invitation-DAmBegDM.js} +6 -6
  119. package/dist/assets/{isEqual-DbZp5EUk.js → isEqual-DyC_2mMM.js} +1 -1
  120. package/dist/assets/{item-BdJl6I8q.js → item-DTFWXAzg.js} +13 -13
  121. package/dist/assets/{ja-DqJiajLu.js → ja--dtwu5Xy.js} +1 -1
  122. package/dist/assets/{javascript.es-AOt9muQq.js → javascript.es-BNAO-PTr.js} +1 -1
  123. package/dist/assets/{jump-to-line.es-p4ynQoBS.js → jump-to-line.es-BgSBJjpn.js} +1 -1
  124. package/dist/assets/{jump.es-BrSOPKg0.js → jump.es-C8STSrV8.js} +1 -1
  125. package/dist/assets/{ko-DQKmtlbI.js → ko-DpRJDWhF.js} +1 -1
  126. package/dist/assets/{line-DdSLBn8H.js → line-3blIv37C.js} +4 -4
  127. package/dist/assets/{lint.es-BMdrvXUs.js → lint.es-C9oc6jbS.js} +1 -1
  128. package/dist/assets/{lint.es2-DX4OlyGK.js → lint.es2-B3G36s6A.js} +1 -1
  129. package/dist/assets/{lint.es3-BYQCiNDn.js → lint.es3-Bjrk4lMs.js} +1 -1
  130. package/dist/assets/{list-header-BnipX_Rp.js → list-header-Ft6n4kyL.js} +1 -1
  131. package/dist/assets/{log-i4SQ4Z0y.js → log-CA5Bfm_H.js} +2 -2
  132. package/dist/assets/{lottie-BYxFXW-g.js → lottie-Djo2tbD7.js} +1 -1
  133. package/dist/assets/{matchbrackets.es-aeJus3PD.js → matchbrackets.es-yNyePD2j.js} +1 -1
  134. package/dist/assets/{memory-Cu-5WL0k.js → memory-COJcMqTu.js} +1 -1
  135. package/dist/assets/{mode.es-CXfOP3-9.js → mode.es-ul4Y9zvq.js} +1 -1
  136. package/dist/assets/{mode.es2-DOeKit6c.js → mode.es2-4D-VJI99.js} +1 -1
  137. package/dist/assets/{mode.es3-8pUUSOKg.js → mode.es3-DnIPUjSA.js} +1 -1
  138. package/dist/assets/{onlineParser.es-Bsw_5f31.js → onlineParser.es-DI_N_VZ6.js} +1 -1
  139. package/dist/assets/overview-CpWhs8pb.js +23 -0
  140. package/dist/assets/{pt-si0ACe2m.js → pt-BxA88dKG.js} +1 -1
  141. package/dist/assets/{react-BU7lI6gg.js → react-B-cs_65i.js} +22 -22
  142. package/dist/assets/{redux-07bmubSg.js → redux-DJbvHHJc.js} +1 -1
  143. package/dist/assets/{resource-dialog-Co295aU2.js → resource-dialog-Dwu2vad3.js} +2 -2
  144. package/dist/assets/{ru-B36cpSA6.js → ru-C9WJaQoQ.js} +1 -1
  145. package/dist/assets/runtime-DlE-mVl3.js +1 -0
  146. package/dist/assets/{search.es-ByHwIa0U.js → search.es-DEvV0pC4.js} +1 -1
  147. package/dist/assets/{searchcursor.es-CsQOLBoo.js → searchcursor.es-CbJjnyZ6.js} +1 -1
  148. package/dist/assets/service-CmT6d4X_.js +1 -0
  149. package/dist/assets/{show-hint.es-BY2B9aLR.js → show-hint.es-BAvfzA33.js} +1 -1
  150. package/dist/assets/{slicedToArray-BwJA6b7k.js → slicedToArray-DXz7P6Jc.js} +3 -3
  151. package/dist/assets/spaces-C_MVXqkk.js +1 -0
  152. package/dist/assets/{sublime.es-DZOyVbIC.js → sublime.es-DEVL-EBh.js} +1 -1
  153. package/dist/assets/{switch-control-D1Iqbf5D.js → switch-control-CoAFfWfN.js} +1 -1
  154. package/dist/assets/{table-icons-CB9vK-gH.js → table-icons-D2RHWn5N.js} +10 -10
  155. package/dist/assets/{tag-CANB-Fll.js → tag-CibAXXt2.js} +1 -1
  156. package/dist/assets/team-hCJdZoCR.js +1 -0
  157. package/dist/assets/{th-Dtc8_3Sk.js → th-z7LSYRZi.js} +1 -1
  158. package/dist/assets/toUpper-DN83jaGL.js +1 -0
  159. package/dist/assets/{traffic-CmQ-j2sa.js → traffic-CpCVERHX.js} +5 -5
  160. package/dist/assets/url-evaluation-CpLQCS2C.js +7 -0
  161. package/dist/assets/use-blocklet-info-for-connect-did-spaces-ADtRY_BA.js +1 -0
  162. package/dist/assets/{useLocalStorage-BNvbpN9F.js → useLocalStorage-Dhldbzlz.js} +1 -1
  163. package/dist/assets/util-BSjBcY1Q.js +1 -0
  164. package/dist/assets/{vi-DpH7bkpR.js → vi-CAtyUyNW.js} +1 -1
  165. package/dist/assets/{wait-container-mYVBI-ZE.js → wait-container-CrBtw_vv.js} +4 -4
  166. package/dist/assets/withStyles-BhZN297l.js +1 -0
  167. package/dist/assets/wrap-locale-CA8TyTj3.js +1 -0
  168. package/dist/assets/{zh-Dizc5DZz.js → zh-BVBeddUa.js} +1 -1
  169. package/dist/assets/{zh-tw-Cb93tcSH.js → zh-tw-CoStw7dd.js} +1 -1
  170. package/dist/index.html +1 -1
  171. package/dist/service-worker.js +1 -1
  172. package/package.json +1 -1
  173. package/dist/assets/Breadcrumbs-f87TWJgq.js +0 -1
  174. package/dist/assets/Delete-h8Ye2r4b.js +0 -1
  175. package/dist/assets/DeleteOutline-C-1A8rVu.js +0 -1
  176. package/dist/assets/DeleteOutline-ClZ-ABF-.js +0 -1
  177. package/dist/assets/actions-ByUCXaaH.js +0 -11
  178. package/dist/assets/api-BdOqJGVs.js +0 -1
  179. package/dist/assets/app-avatar-DEqDSBYG.js +0 -1
  180. package/dist/assets/chart-CQeRS3mZ.js +0 -35
  181. package/dist/assets/detail-CaMUtLL5.js +0 -58
  182. package/dist/assets/getValidReactChildren-B_HEoXEd.js +0 -1
  183. package/dist/assets/index-3vcNDYsD.js +0 -530
  184. package/dist/assets/index-B7-XNbV9.js +0 -85
  185. package/dist/assets/index-BMkbX5aS.js +0 -11
  186. package/dist/assets/index-B_M-nPU6.js +0 -58
  187. package/dist/assets/index-DMKpICI6.js +0 -1
  188. package/dist/assets/index-DY9g7uAE.js +0 -54
  189. package/dist/assets/index-DdxWI-QG.js +0 -262
  190. package/dist/assets/index-DwOVPSU7.js +0 -21
  191. package/dist/assets/index-Mr6j5sdU.js +0 -11
  192. package/dist/assets/index-PDofIfka.js +0 -80
  193. package/dist/assets/index-RlfSCcPa.js +0 -16
  194. package/dist/assets/install-from-url-Cnfp9xqR.js +0 -1
  195. package/dist/assets/overview-CnuzNSfm.js +0 -23
  196. package/dist/assets/runtime-CW-W-Oej.js +0 -1
  197. package/dist/assets/service-DNZLEaeT.js +0 -1
  198. package/dist/assets/spaces-CGO2dSgv.js +0 -1
  199. package/dist/assets/team-rrZYIohT.js +0 -1
  200. package/dist/assets/toUpper-D0HPBfn5.js +0 -1
  201. package/dist/assets/url-evaluation-DymLev_N.js +0 -7
  202. package/dist/assets/use-blocklet-info-for-connect-did-spaces-YWN8QaVT.js +0 -1
  203. package/dist/assets/util-CRUZQ4-B.js +0 -1
  204. package/dist/assets/withStyles-CSLQqeaB.js +0 -1
  205. package/dist/assets/wrap-locale-B076jNc7.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as r,m as i,P as e,df as f,dg as c,s as u}from"./index-Boqyvc8Q.js";function l({name:t,nameFormatter:o,layout:a,children:n,valueComponent:s,nameWidth:m,...p}){return r.jsxs(d,{layout:a,width:m,...p,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:o(t)}),n&&r.jsx(i,{color:"textPrimary",component:s,className:"info-row__value",children:n})]})}l.propTypes={name:e.any.isRequired,layout:e.oneOf(["horizontal","vertical"]),children:e.any,nameFormatter:e.func,valueComponent:e.string,nameWidth:e.number};l.defaultProps={children:null,nameWidth:90,nameFormatter:t=>{const o=t.split(" ").map(a=>f(c(a))).join(" ");return typeof t=="string"?o:t},valueComponent:"div",layout:"horizontal"};const d=u("div")`
1
+ import{j as r,m as i,P as e,d6 as c,d7 as f,s as u}from"./index-B6qhr4Vv.js";function l({name:t,nameFormatter:o,layout:a,children:n,valueComponent:s,nameWidth:m,...p}){return r.jsxs(d,{layout:a,width:m,...p,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:o(t)}),n&&r.jsx(i,{color:"textPrimary",component:s,className:"info-row__value",children:n})]})}l.propTypes={name:e.any.isRequired,layout:e.oneOf(["horizontal","vertical"]),children:e.any,nameFormatter:e.func,valueComponent:e.string,nameWidth:e.number};l.defaultProps={children:null,nameWidth:90,nameFormatter:t=>{const o=t.split(" ").map(a=>c(f(a))).join(" ");return typeof t=="string"?o:t},valueComponent:"div",layout:"horizontal"};const d=u("div")`
2
2
  display: flex;
3
3
  flex-direction: ${t=>t.layout==="vertical"?"column":"row"};
4
4
  justify-content: flex-start;
@@ -1 +1 @@
1
- import{bY as $,bZ as x,bT as d,c4 as e,c3 as y,c5 as k,eW as m,eX as C,r as M,bX as z,bV as l,j as i,c0 as j,fr as R,c1 as B,s as T,P,aY as E}from"./index-Boqyvc8Q.js";function N(t){return x("MuiSwitch",t)}const o=$("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),O=["className","color","edge","size","sx"],_=R(),D=t=>{const{classes:a,edge:s,size:r,color:p,checked:u,disabled:h}=t,b={root:["root",s&&`edge${e(s)}`,`size${e(r)}`],switchBase:["switchBase",`color${e(p)}`,u&&"checked",h&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},g=B(b,N,a);return l({},a,g)},I=d("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.root,s.edge&&a[`edge${e(s.edge)}`],a[`size${e(s.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${o.thumb}`]:{width:16,height:16},[`& .${o.switchBase}`]:{padding:4,[`&.${o.checked}`]:{transform:"translateX(16px)"}}}}]}),U=d(y,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.switchBase,{[`& .${o.input}`]:a.input},s.color!=="default"&&a[`color${e(s.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${o.checked}`]:{transform:"translateX(20px)"},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${o.checked} + .${o.track}`]:{opacity:.5},[`&.${o.disabled} + .${o.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${o.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,a])=>a.main&&a.light).map(([a])=>({props:{color:a},style:{[`&.${o.checked}`]:{color:(t.vars||t).palette[a].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[a].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette[a].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${a}DisabledColor`]:`${t.palette.mode==="light"?m(t.palette[a].main,.62):C(t.palette[a].main,.55)}`}},[`&.${o.checked} + .${o.track}`]:{backgroundColor:(t.vars||t).palette[a].main}}}))]})),X=d("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,a)=>a.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),A=d("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,a)=>a.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),V=M.forwardRef(function(a,s){const r=_({props:a,name:"MuiSwitch"}),{className:p,color:u="primary",edge:h=!1,size:b="medium",sx:g}=r,f=z(r,O),c=l({},r,{color:u,edge:h,size:b}),n=D(c),w=i.jsx(A,{className:n.thumb,ownerState:c});return i.jsxs(I,{className:j(n.root,p),sx:g,ownerState:c,children:[i.jsx(U,l({type:"checkbox",icon:w,checkedIcon:w,ref:s,ownerState:c},f,{classes:l({},n,{root:n.switchBase})})),i.jsx(X,{className:n.track,ownerState:c})]})}),L=V,v=T(t=>i.jsx(L,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...t}))(({theme:t})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:t.palette.mode==="dark"?"#2ECA45":"#65C466",opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:"#33cf4d",border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:t.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:26/2,backgroundColor:t.palette.mode==="light"?"#E9E9EA":"#39393D",opacity:1,transition:t.transitions.create(["background-color"],{duration:500})}}));function S({labelProps:t,...a}){return t?i.jsx(E,{control:i.jsx(v,{...a}),...t}):i.jsx(v,{...a})}S.propTypes={labelProps:P.object};S.defaultProps={labelProps:null};export{S,L as a};
1
+ import{bQ as $,bR as x,bL as d,bY as e,bX as y,bZ as k,eN as m,eO as C,r as M,bP as z,bN as l,j as i,bU as j,fi as R,bV as B,s as T,P,aW as N}from"./index-B6qhr4Vv.js";function E(t){return x("MuiSwitch",t)}const o=$("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),O=["className","color","edge","size","sx"],U=R(),_=t=>{const{classes:a,edge:s,size:r,color:p,checked:u,disabled:h}=t,b={root:["root",s&&`edge${e(s)}`,`size${e(r)}`],switchBase:["switchBase",`color${e(p)}`,u&&"checked",h&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},g=B(b,E,a);return l({},a,g)},D=d("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.root,s.edge&&a[`edge${e(s.edge)}`],a[`size${e(s.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${o.thumb}`]:{width:16,height:16},[`& .${o.switchBase}`]:{padding:4,[`&.${o.checked}`]:{transform:"translateX(16px)"}}}}]}),I=d(y,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.switchBase,{[`& .${o.input}`]:a.input},s.color!=="default"&&a[`color${e(s.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${o.checked}`]:{transform:"translateX(20px)"},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${o.checked} + .${o.track}`]:{opacity:.5},[`&.${o.disabled} + .${o.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${o.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,a])=>a.main&&a.light).map(([a])=>({props:{color:a},style:{[`&.${o.checked}`]:{color:(t.vars||t).palette[a].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[a].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette[a].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${a}DisabledColor`]:`${t.palette.mode==="light"?m(t.palette[a].main,.62):C(t.palette[a].main,.55)}`}},[`&.${o.checked} + .${o.track}`]:{backgroundColor:(t.vars||t).palette[a].main}}}))]})),A=d("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,a)=>a.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),L=d("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,a)=>a.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),V=M.forwardRef(function(a,s){const r=U({props:a,name:"MuiSwitch"}),{className:p,color:u="primary",edge:h=!1,size:b="medium",sx:g}=r,f=z(r,O),c=l({},r,{color:u,edge:h,size:b}),n=_(c),w=i.jsx(L,{className:n.thumb,ownerState:c});return i.jsxs(D,{className:j(n.root,p),sx:g,ownerState:c,children:[i.jsx(I,l({type:"checkbox",icon:w,checkedIcon:w,ref:s,ownerState:c},f,{classes:l({},n,{root:n.switchBase})})),i.jsx(A,{className:n.track,ownerState:c})]})}),X=V,v=T(t=>i.jsx(X,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...t}))(({theme:t})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:t.palette.mode==="dark"?"#2ECA45":"#65C466",opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:"#33cf4d",border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:t.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:26/2,backgroundColor:t.palette.mode==="light"?"#E9E9EA":"#39393D",opacity:1,transition:t.transitions.create(["background-color"],{duration:500})}}));function S({labelProps:t,...a}){return t?i.jsx(N,{control:i.jsx(v,{...a}),...t}):i.jsx(v,{...a})}S.propTypes={labelProps:P.object};S.defaultProps={labelProps:null};export{S,X as a};
@@ -0,0 +1,80 @@
1
+ import{n as $,P,r as w,f as ge,j as e,C as V,i as ke,u as me,q,t as je,v as ye,D as Ce,B as W,w as ve,m as L,x as Se,y as Be,z as de,A as z,E as we,d as Ae,F as De,H as Te,J as ee,K as Ee,M as T,N as te,O as y,Q as Ie,R as F,S as Le,U as Pe,V as Re}from"./index-B6qhr4Vv.js";import{_ as se}from"./useLocalStorage-Dhldbzlz.js";import{g as _e,D as Fe}from"./index-neNekbhs.js";import{E as Ne}from"./index-BIi9UAUe.js";import{u as $e,B as oe}from"./url-evaluation-CpLQCS2C.js";import{D as Ue,u as Me,B as ne}from"./actions-D5ZCmrTM.js";import{l as le}from"./index-Bgy25Yn1.js";import{W as Oe}from"./tag-CibAXXt2.js";import{I as We,B as ze}from"./install-from-url-C-r4nFEl.js";import{B as ae}from"./app-avatar-CxghIswG.js";import{d as Ve}from"./Add-BxRt9WAM.js";import{S as E}from"./index-Bq_hHWAs.js";import{T as re}from"./TextField-PSikz4cm.js";import{F as qe,S as Ke}from"./Select-BDtCsGy7.js";import"./FilterList-dxewgEr3.js";import"./Delete-DDy4lv2l.js";import"./InputLabel-Cag35T0N.js";import"./LastPage-CHLGEMPh.js";import"./index-BIT8HWlC.js";import"./redux-DJbvHHJc.js";import"./Search-DbENMUmJ.js";import"./MoreVert-DCY4R0I6.js";import"./ButtonGroup-B4i-HvgZ.js";import"./getValidReactChildren-8XnhSvA9.js";import"./isEqual-DyC_2mMM.js";import"./index-B_hJh8p2.js";import"./Stepper-Df_RHJ43.js";function N({blocklet:g,skipAccessibilityCheck:c=!1,...p}){const{t:a}=w.useContext(ge),{urls:C,loading:o,recommendedUrl:m}=$e(g);if(o&&!c)return e.jsx(V,{size:12,...p});const x=c?C[0]:m;return x?e.jsx(He,{...p,children:e.jsx(Qe,{children:e.jsx(ke,{href:x,target:"_blank",className:"blocklet-interface",underline:"hover",children:a("common.open")})})}):a("blocklet.router.noAccessibleUrl")}const Qe=$.div`
2
+ display: flex;
3
+ margin: 4px 0;
4
+ `,He=$.div`
5
+ .blocklet-interface {
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: flex-start;
9
+ white-space: nowrap;
10
+
11
+ img {
12
+ margin-right: 4px;
13
+ }
14
+ }
15
+ `;N.propTypes={blocklet:P.object.isRequired,skipAccessibilityCheck:P.bool};N.defaultProps={skipAccessibilityCheck:!1};const ie={title:/^.{3,40}$/,description:/^.{3,160}$/};function K({onCancel:g,onSuccess:c}){const{info:p}=me(),{t:a}=q(),{api:C}=je(),[o,m]=ye({loading:!1,title:"",titleError:"",description:"",descriptionError:"",isConnectOpen:!1}),x=()=>{m({loading:!0,isConnectOpen:!0})},b=d=>{m({loading:!1,isConnectOpen:!1}),c(d)},v=()=>{m({loading:!1,isConnectOpen:!1})},k=d=>{const{value:n,name:r}=d.target;m({[`${r}Error`]:n&&!ie[r].test(n)?a(`blocklet.${r}ValidationError`):""})},S=d=>{const{value:n,name:r}=d.target,u=`${r}Error`;o[u]?m({[r]:n,[u]:n&&!ie[r].test(n)?a(`blocklet.${r}ValidationError`):""}):m({[r]:n})};return e.jsxs(e.Fragment,{children:[e.jsx(Ce,{title:a("blocklet.installFromCreate"),fullWidth:!0,maxWidth:"sm",onClose:()=>g(),showCloseButton:!0,open:!0,actions:e.jsxs(e.Fragment,{children:[e.jsx(W,{onClick:d=>{d.stopPropagation(),g()},color:"inherit",children:a("common.cancel")}),e.jsxs(W,{onClick:d=>{d.stopPropagation(),x()},color:"primary","data-cy":"install-blocklet-next-step",variant:"contained",disabled:o.loading||o.titleError||o.descriptionError||!o.title||!o.description,style:{marginLeft:8},children:[o.loading&&e.jsx(V,{size:16}),a("common.create")]})]}),children:e.jsx(ve,{component:"div",children:e.jsxs(L,{component:"div",children:[e.jsx(re,{style:{marginBottom:24},label:`Blocklet ${a("common.title")}`,autoComplete:"off",variant:"outlined",fullWidth:!0,autoFocus:!0,name:"title",value:o.title,onBlur:k,onChange:S,error:!!o.titleError,helperText:o.titleError,disabled:o.loading}),e.jsx(re,{label:`Blocklet ${a("common.description")}`,autoComplete:"off",variant:"outlined",fullWidth:!0,name:"description",value:o.description,onBlur:k,onChange:S,error:!!o.descriptionError,helperText:o.descriptionError,disabled:o.loading})]})})}),e.jsx(Se,{popup:!0,open:o.isConnectOpen,forceConnected:!1,className:"launch-from-create-auth",action:"launch-free-blocklet-by-session",checkFn:C.get,checkTimeout:5*60*1e3,webWalletUrl:Be(p),onSuccess:b,extraParams:{title:o.title,description:o.description},messages:{title:a("setup.keyPair.title"),scan:a("setup.keyPair.scan"),confirm:a("setup.keyPair.confirm"),success:a("setup.keyPair.success")},onClose:v})]})}K.propTypes={onCancel:P.func.isRequired,onSuccess:P.func.isRequired};K.defaultProps={};function Q({onCreate:g}){const c=de(),{t:p}=q(),[a,C]=w.useState(""),[o,m]=w.useState(""),[x,b]=w.useState(null),[v,k]=w.useState(null),S=()=>{b(null)},d=()=>{b({onCancel:()=>{S(),b(null)},onSuccess:()=>{S()}})},n=()=>{k({onCancel:()=>{k(null)},onSuccess:(...j)=>{k(null),g(...j)}})},r=()=>{const j=new URL("http://localhost");j.searchParams.set("restoreFrom","server"),j.searchParams.set("serverUrl",window.location.href),c(`/blocklets/restore${j.search}`)},u=()=>{c("/blocklets/restore")};return e.jsxs(e.Fragment,{children:[e.jsxs(E,{onClick:()=>c("/store"),menuButtonProps:{"data-cy":"open-install-menu"},menu:[e.jsx(E.Item,{"data-cy":"open-install-form",onClick:()=>d(),children:p("blocklet.installFromUrl")},"1"),e.jsx(E.Item,{"data-cy":"open-create-form",onClick:()=>n(),children:p("blocklet.installFromCreate")},"2"),e.jsx(E.Item,{"data-cy":"open-install-from-spaces",onClick:()=>u(),children:p("blocklet.restoreFromSpaces.title")},"3"),e.jsx(E.Item,{"data-cy":"open-install-from-spaces",onClick:()=>r(),children:p("blocklet.installFromDiskBackup")},"3")].filter(Boolean),children:[e.jsx(Ve,{}),p("blocklet.installFromMarket")]}),!!a&&e.jsx(z,{variant:"error",message:a,onClose:()=>C("")}),!!o&&e.jsx(z,{variant:"success",duration:3e3,message:o,onClose:()=>m("")}),x&&e.jsx(We,{onCancel:x.onCancel,onSuccess:x.onSuccess}),v&&e.jsx(K,{onCancel:v.onCancel,onSuccess:v.onSuccess})]})}Q.propTypes={onCreate:P.func};Q.defaultProps={onCreate:()=>{}};const I="internal",ce="external";function Bt(){return e.jsx(Ue,{children:e.jsx(Je,{})})}function Je(){const g=de(),c=me(),[p,a]=we(),{data:C,externalData:o,error:m,refresh:x,loading:b}=Ae(),{deletingBlocklets:v,addDeletingDid:k,removeDeletingDid:S,matchDeletingDid:d}=Me(),{t:n,locale:r}=q(),[u,j]=w.useState(p.get("searchText")),[pe]=se("show-external-blocklet-actions",!1),ue=[{id:I,name:n("blocklet.internal")},{id:ce,name:n("blocklet.external")}],[A,fe]=se("blocklet-type-filter",I),H=A===I?C:o,xe=(c==null?void 0:c.info.mode)!==De.NODE_MODES.SERVERLESS;d(H.map(l=>l.meta.did));const J=({action:l,blocklet:_})=>{l==="remove"&&k(_.meta.did)},X=l=>{if(l.error){z.error(l.error.message),l.action==="remove"&&S(l.blocklet.meta.did);return}l.action==="remove"&&c.refresh({silent:!0})},G=Te(l=>l.breakpoints.up("md"));let R=null;const U=H||[];if(m)R=e.jsx(ee,{type:"error",variant:"icon",children:e.jsxs("div",{children:[Ee(m),e.jsx(W,{onClick:()=>x({silent:!1}),children:e.jsx("span",{style:{color:"#44cdc6",textDecoration:"underline"},children:n("common.retry")})})]})});else if(U.length>0||b){const l=["installedAt","startedAt","stoppedAt","createdAt"],_=s=>{if(s.status==="starting")return new Date("2199").getTime();if(s.status==="running"){if(s.appRuntimeInfo)return s.appRuntimeInfo.startAt;if(s.startedAt)return s.startedAt.getTime()}return 0};let f=U.map(s=>(l.forEach(t=>{if(s[t]){const h=new Date(s[t]);s[t]=h}}),s)).sort((s,t)=>{const h=_(s);return _(t)-h});u&&(f=f.filter(s=>{var i;const t=T.getDisplayName(s)||"",h=((i=s.site)==null?void 0:i.domainAliases)||[],B=le.isValid(u)?le.toAddress(u):u,D=u.trim().toLocaleLowerCase();return s.appDid===B||s.appPid===B||t.toLocaleLowerCase().includes(D)||h.some(O=>{var Z;return(Z=O.value)==null?void 0:Z.toLocaleLowerCase().includes(D)})}));const M=_e("blocklets-list");M.searchText&&!u&&j(M.searchText);const be=[{label:n("common.name"),name:"meta.title",options:{customBodyRenderLite(s){const t=f[s],h=T.getAppMissingConfigs(t).length>0?"components":"overview";return e.jsx(te,{to:`/blocklets/${t.meta.did}/${h}`,className:"blocklet-name-wrapper",children:e.jsxs(L,{component:"strong",variant:"body1",className:"blocklet-name",children:[e.jsx(ae,{blocklet:t,style:{marginRight:8}}),e.jsxs(y,{children:[e.jsx(y,{children:T.getDisplayName(t)}),e.jsxs(y,{children:[e.jsx(ze,{mode:t.mode||""}),!Ie(t.controller)&&e.jsx(Oe,{type:"primary",children:n("blocklet.external")})]})]})]})},t.meta.did)}}},A===I?{label:n("common.visit"),name:"runtimeInfo.pid",align:"left",options:{sort:!1,customBodyRenderLite(s){const t=f[s];return e.jsx(N,{blocklet:t},t.meta.did)}}}:null,{label:n("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(s){const t=f[s];return t.status==="running"&&t.appRuntimeInfo?e.jsx(F,{value:t.appRuntimeInfo.startAt,locale:r},t.meta.did):""}}},{label:n("common.installedAt"),name:"installedAt",options:{customBodyRenderLite(s){const t=f[s];return t.installedAt?e.jsx(F,{value:t.installedAt.getTime(),locale:r},t.meta.did):t.createdAt?e.jsx(F,{value:t.createdAt.getTime(),locale:r},t.meta.did):""}}},{label:n("common.updatedAt"),name:"updatedAt",options:{customBodyRenderLite(s){const t=f[s];return e.jsx(F,{value:t.updatedAt,locale:r},t.meta.did)}}},{label:n("common.status"),name:"status",width:120,align:"center",options:{customBodyRenderLite(s){const t=f[s];return e.jsx(oe,{"data-cy":"blocklet-status","status-blocklet-did":t.meta.did,status:v.includes(t.meta.did)?"deleting":t.status,source:t.source,progress:t.progress},t.meta.did)}}},A===I||pe?{label:n("common.actions"),name:"",width:90,options:{sort:!1,customBodyRenderLite(s){const t=f[s];return e.jsx(ne,{blocklet:t,variant:"menu",onStart:J,onComplete:X},t.meta.did)}}}:null].filter(Boolean),Y={};G||(Y.TableBody=function(t){if(b)return e.jsx(Re,{relative:"parent",children:e.jsx(V,{})});const{page:h,rowsPerPage:B}=t,D=f.slice(h*B,(h+1)*B);return D.length?e.jsx("div",{children:D.map(i=>{const O=T.getAppMissingConfigs(i).length>0?"components":"overview";return e.jsxs(y,{className:"blocklet-item--mobile",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(ae,{className:"blocklet__avatar",blocklet:i,size:G?40:60}),e.jsxs(te,{className:"blocklet__content",to:`/blocklets/${i.meta.did}/${O}`,children:[e.jsxs(y,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[e.jsx(L,{component:"strong",variant:"body1",className:"blocklet__name",children:T.getDisplayName(i,!0)}),e.jsx(ne,{blocklet:i,variant:"menu",onStart:J,onComplete:X},i.meta.did)]}),e.jsxs(L,{component:"small",className:"blocklet__addons",children:[e.jsx(y,{display:"flex",alignItems:"center",children:e.jsx(N,{blocklet:i,style:{marginLeft:16,fontSize:14}})}),e.jsx(oe,{"status-blocklet-did":i.meta.did,status:i.status,source:i.source,progress:i.progress},i.meta.did)]})]})]})})}):e.jsx(Ne,{children:n("common.empty")})}),R=e.jsx(Xe,{children:e.jsx(Fe,{loading:b,className:"blocklet-list",title:e.jsx(y,{display:"flex",alignItems:"center",children:n("blocklet.index.tableTitle")}),locale:r,data:f,columns:be,durable:"blocklets-list",options:{download:!1,filter:!1,print:!1,searchPlaceholder:n("common.search"),searchAlwaysOpen:!1,sortOrder:{name:"uptime",direction:"desc"},searchDebounceTime:300,onSearchChange:s=>{j(s),a({searchText:s??""})},customSearch:()=>!0,...M,searchText:u},components:Y})})}else U.length===0&&(R=e.jsx(ee,{type:"warning",variant:"icon",children:n("blocklet.index.noBlocklet")}));const he=o&&o.length>0;return e.jsxs(Ge,{children:[e.jsxs(L,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[e.jsxs(y,{display:"flex",alignItems:"center",children:[n("common.blocklets"),(he||A===ce)&&e.jsx(qe,{sx:{ml:1},children:e.jsx(Ke,{value:A,onChange:l=>fe(l.target.value),size:"small",children:ue.map(l=>e.jsx(Le,{value:l.id,children:n(l.name)},l.id))})})]}),e.jsx(Pe,{permission:"mutate_blocklets",children:xe&&e.jsx(Q,{onCreate:l=>{g(`/blocklets/${l.appDid}/components`)}})})]}),R]})}const Xe=$.div`
16
+ .blocklet-item--mobile {
17
+ padding: 16px 0;
18
+ }
19
+ `,Ge=$.main`
20
+ .page-header {
21
+ display: flex;
22
+ justify-content: space-between;
23
+ align-items: center;
24
+ }
25
+
26
+ .blocklet-list {
27
+ .blocklet-item--mobile {
28
+ .blocklet__avatar {
29
+ margin-right: -60px;
30
+ }
31
+ .blocklet__content {
32
+ padding-left: 68px;
33
+ flex: 1;
34
+ display: flex;
35
+ flex-direction: column;
36
+ z-index: 1;
37
+ }
38
+ .blocklet__name {
39
+ font-weight: bold;
40
+ text-decoration: none;
41
+ white-space: normal;
42
+ word-break: break-all;
43
+ }
44
+ .blocklet__addons {
45
+ display: flex;
46
+ justify-content: space-between;
47
+ margin-top: 5px;
48
+ margin-bottom: -10px;
49
+ }
50
+ }
51
+ .blocklet-name-wrapper {
52
+ display: flex;
53
+ flex-direction: row;
54
+ align-items: center;
55
+ justify-content: flex-start;
56
+ }
57
+ .blocklet-name {
58
+ font-weight: bold;
59
+ text-decoration: underline;
60
+ display: flex;
61
+ align-items: center;
62
+ white-space: normal;
63
+ word-break: break-all;
64
+ }
65
+
66
+ .blocklet-interface {
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: flex-start;
70
+
71
+ img {
72
+ margin-right: 4px;
73
+ }
74
+ }
75
+
76
+ .MuiToolbar-root {
77
+ display: flex;
78
+ }
79
+ }
80
+ `;export{Je as BlockletList,Bt as default};
@@ -1 +1 @@
1
- import{cY as P,dH as M,dI as E,dJ as g,dK as Y,dL as N,dM as j}from"./index-Boqyvc8Q.js";import{a as X}from"./isEqual-DbZp5EUk.js";var V={},i={},d={},J=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(d,"__esModule",{value:!0});d.toStrictHex=d.toBytes=d.toBits=d.DID_PREFIX=void 0;const K=J(M),H=g,v="did:abt:";d.DID_PREFIX=v;const q=e=>{try{if((0,H.isHexStrict)(e))return E.from((0,H.stripHexPrefix)(e),"hex");let t=(0,H.fromBase58)(e.replace(v,""));for(;t.length<26;)t=E.concat([E.from([0]),t]);return t}catch(t){throw new Error(`Cannot convert DID string to byte array: ${t.message}`)}};d.toBytes=q;const G=(e,t)=>(0,K.default)((0,H.toBN)(e).toString(2),t,"0");d.toBits=G;const W=(e,t)=>{const s=e.replace(/^0x/i,"");return typeof t=="number"&&t%2===0?(0,K.default)(e,t,"0"):s.length%2===0?s:`0${s}`};d.toStrictHex=W;var $=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});i.DidType=i.toChecksumAddress=i.isEthereumDid=i.isEthereumType=i.toTypeInfoStr=i.toTypeInfo=i.fromTypeInfo=i.DID_TYPE_ETHEREUM=i.DID_TYPE_ARCBLOCK=void 0;const m=g,b=$(Y),z=$(X),C=$(N),o=j,T=d,D={pk:"key",address:"encoding"},B={role:o.types.RoleType.ROLE_ACCOUNT,pk:o.types.KeyType.ED25519,hash:o.types.HashType.SHA3,address:o.types.EncodingType.BASE58};i.DID_TYPE_ARCBLOCK=B;const R={role:o.types.RoleType.ROLE_ACCOUNT,pk:o.types.KeyType.ETHEREUM,hash:o.types.HashType.KECCAK,address:o.types.EncodingType.BASE16};i.DID_TYPE_ETHEREUM=R;const L=e=>{const t=["pk","hash","address"];return(0,z.default)((0,C.default)(e,t),(0,C.default)(R,t))};i.isEthereumType=L;const F=e=>{const t=(0,m.toAddress)(e);return/^(0x)?[0-9a-f]{40}$/i.test(t)?/^(0x|0X)?[0-9a-f]{40}$/.test(t)||/^(0x|0X)?[0-9A-F]{40}$/.test(t)?!0:Q(t):!1};i.isEthereumDid=F;const Q=e=>{const t=e.replace(/^0x/i,""),s=o.Hasher.Keccak.hash256(t.toLowerCase()).replace(/^0x/i,"");for(let r=0;r<40;r++)if(parseInt(s[r],16)>7&&t[r].toUpperCase()!==t[r]||parseInt(s[r],16)<=7&&t[r].toLowerCase()!==t[r])return!1;return!0},Z=e=>{if(typeof e>"u")return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(e))throw new Error(`Given address "${e}" is not a valid Ethereum address.`);const t=e.toLowerCase().replace(/^0x/i,""),s=o.Hasher.Keccak.hash256(t).replace(/^0x/i,"");let r="0x";for(let n=0;n<t.length;n++)parseInt(s[n],16)>7?r+=t[n].toUpperCase():r+=t[n];return r};i.toChecksumAddress=Z;function k(e={}){let t={};["default","arcblock"].includes(e)?t=B:["eth","ethereum"].includes(e)?t=R:t={...B,...e};const{role:s,pk:r,hash:n,address:u}=t;Object.keys(t).forEach(l=>{const _=(0,b.default)(`${D[l]||l}Type`);if(Object.values(o.types[_]).includes(t[l])===!1)throw new Error(`Unsupported ${l} type: ${t[l]}`)});const p={role:s,pk:r,hash:n,address:u};return L(p)===!1&&[o.types.RoleType.ROLE_NODE,o.types.RoleType.ROLE_VALIDATOR,o.types.RoleType.ROLE_TETHER,o.types.RoleType.ROLE_SWAP].includes(p.role)&&(p.hash=o.types.HashType.SHA2),p}i.DidType=k;k.toJSON=e=>Object.keys(e).reduce((t,s)=>{const r=(0,b.default)(`${D[s]||s}Type`),n=Object.keys(o.types[r]),u=Object.values(o.types[r]);return t[s]=n[u.indexOf(e[s])],t},{});k.fromJSON=e=>Object.keys(e).reduce((t,s)=>{const r=(0,b.default)(`${D[s]||s}Type`),n=Object.keys(o.types[r]),u=Object.values(o.types[r]);return t[s]=u[n.indexOf(e[s])],t},{});const x=e=>{const t=k(e),s=(0,T.toBits)(t.role,6),r=(0,T.toBits)(t.pk,5),n=(0,T.toBits)(t.hash,5),u=`${s}${r}${n}`,p=(0,m.stripHexPrefix)((0,m.numberToHex)(parseInt(u,2)));return(0,T.toStrictHex)(p,4)};i.fromTypeInfo=x;const w=e=>{let t={};try{if(F(e))t=R;else{const r=(0,T.toBytes)(e).slice(0,2),n=(0,T.toStrictHex)(E.from(r).toString("hex")),u=(0,T.toBits)(new m.BN(n,16),16),p=u.slice(0,6),l=u.slice(6,11),_=u.slice(11,16);t={role:parseInt(p,2),pk:parseInt(l,2),hash:parseInt(_,2),address:(0,m.isHex)((0,m.toAddress)(e))?o.types.EncodingType.BASE16:o.types.EncodingType.BASE58}}return Object.keys(t).forEach(s=>{Object.values(o.types[`${(0,b.default)(D[s]||s)}Type`]).includes(t[s])===!1&&delete t[s]}),t}catch{return t}};i.toTypeInfo=w;const ee=e=>{const t=w(e);return Object.keys(t).reduce((s,r)=>{const n=o.types[`${(0,b.default)(D[r]||r)}Type`];return s[r]=Object.keys(n).find(u=>n[u]===t[r]),s},{})};i.toTypeInfoStr=ee;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DID_TYPE_ETHEREUM=e.DID_TYPE_ARCBLOCK=e.DID_PREFIX=e.DidType=e.fromTypeInfo=e.toTypeInfoStr=e.toTypeInfo=e.isEthereumType=e.isEthereumDid=e.isValid=e.isFromPublicKey=e.toDid=e.toAddress=e.fromHash=e.fromPublicKeyHash=e.fromPublicKey=e.fromSecretKey=e.toStrictHex=e.types=void 0;const t=j;Object.defineProperty(e,"types",{enumerable:!0,get:function(){return t.types}});const s=g;Object.defineProperty(e,"toAddress",{enumerable:!0,get:function(){return s.toAddress}}),Object.defineProperty(e,"toDid",{enumerable:!0,get:function(){return s.toDid}});const r=i;Object.defineProperty(e,"DidType",{enumerable:!0,get:function(){return r.DidType}}),Object.defineProperty(e,"DID_TYPE_ARCBLOCK",{enumerable:!0,get:function(){return r.DID_TYPE_ARCBLOCK}}),Object.defineProperty(e,"DID_TYPE_ETHEREUM",{enumerable:!0,get:function(){return r.DID_TYPE_ETHEREUM}}),Object.defineProperty(e,"fromTypeInfo",{enumerable:!0,get:function(){return r.fromTypeInfo}}),Object.defineProperty(e,"isEthereumDid",{enumerable:!0,get:function(){return r.isEthereumDid}}),Object.defineProperty(e,"isEthereumType",{enumerable:!0,get:function(){return r.isEthereumType}}),Object.defineProperty(e,"toTypeInfo",{enumerable:!0,get:function(){return r.toTypeInfo}}),Object.defineProperty(e,"toTypeInfoStr",{enumerable:!0,get:function(){return r.toTypeInfoStr}});const n=d;Object.defineProperty(e,"DID_PREFIX",{enumerable:!0,get:function(){return n.DID_PREFIX}}),Object.defineProperty(e,"toStrictHex",{enumerable:!0,get:function(){return n.toStrictHex}});const u=(y,a)=>{const c=(0,r.DidType)(a),f=(0,t.getSigner)(c.pk).getPublicKey(y);return p(f.indexOf("0x")===0?f:`0x${f}`,c)};e.fromSecretKey=u;const p=(y,a)=>{const c=(0,r.DidType)(a),h=(0,t.getHasher)(c.hash)(y,1);return l(h,c)};e.fromPublicKey=p;const l=(y,a)=>{const c=(0,r.DidType)(a),f=(0,s.stripHexPrefix)(y).slice(0,40),h=(0,t.getHasher)(c.hash),I=(0,r.fromTypeInfo)(c),S=(0,s.stripHexPrefix)(h(`0x${I}${f}`,1)).slice(0,8),O=`0x${I}${f}${S}`;return(0,r.isEthereumType)(c)?(0,r.toChecksumAddress)(`0x${y.slice(-40)}`):c.address===t.types.EncodingType.BASE58?(0,s.toBase58)(O):O};e.fromPublicKeyHash=l;const _=(y,a=t.types.RoleType.ROLE_ACCOUNT)=>{const c=Object.keys(t.types.RoleType),f=Object.values(t.types.RoleType);if(f.indexOf(a)===-1)throw new Error(`Unsupported role type ${a} when gen ddi from hash`);const h=(0,r.DidType)({role:t.types.RoleType[c[f.indexOf(a)]]});return l(y,h)};e.fromHash=_;const U=(y,a)=>{if(A(y)===!1)return!1;const c=(0,r.toTypeInfo)(y),f=p(a,c),h=y.replace(n.DID_PREFIX,"");return f===h};e.isFromPublicKey=U;const A=y=>{if(!y)return!1;const a=(0,s.toAddress)(String(y)),{hash:c}=(0,r.toTypeInfo)(a);if(typeof c>"u")return!1;if((0,r.isEthereumDid)(a))return!0;const f=(0,t.getHasher)(c),h=(0,n.toBytes)(a),I=(0,n.toStrictHex)(E.from(h.slice(0,22)).toString("hex")),S=(0,n.toStrictHex)(E.from(h.slice(22,26)).toString("hex")),O=(0,s.stripHexPrefix)(f(`0x${I}`,1)).slice(0,8);return S===O};e.isValid=A})(V);export{V as l};
1
+ import{cP as H,dy as M,dz as E,dA as g,dB as Y,dC as N,dD as j}from"./index-B6qhr4Vv.js";import{a as X}from"./isEqual-DyC_2mMM.js";var V={},i={},d={},q=H&&H.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(d,"__esModule",{value:!0});d.toStrictHex=d.toBytes=d.toBits=d.DID_PREFIX=void 0;const K=q(M),P=g,v="did:abt:";d.DID_PREFIX=v;const G=e=>{try{if((0,P.isHexStrict)(e))return E.from((0,P.stripHexPrefix)(e),"hex");let t=(0,P.fromBase58)(e.replace(v,""));for(;t.length<26;)t=E.concat([E.from([0]),t]);return t}catch(t){throw new Error(`Cannot convert DID string to byte array: ${t.message}`)}};d.toBytes=G;const J=(e,t)=>(0,K.default)((0,P.toBN)(e).toString(2),t,"0");d.toBits=J;const z=(e,t)=>{const s=e.replace(/^0x/i,"");return typeof t=="number"&&t%2===0?(0,K.default)(e,t,"0"):s.length%2===0?s:`0${s}`};d.toStrictHex=z;var A=H&&H.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});i.DidType=i.toChecksumAddress=i.isEthereumDid=i.isEthereumType=i.toTypeInfoStr=i.toTypeInfo=i.fromTypeInfo=i.DID_TYPE_ETHEREUM=i.DID_TYPE_ARCBLOCK=void 0;const m=g,D=A(Y),W=A(X),$=A(N),o=j,T=d,b={pk:"key",address:"encoding"},B={role:o.types.RoleType.ROLE_ACCOUNT,pk:o.types.KeyType.ED25519,hash:o.types.HashType.SHA3,address:o.types.EncodingType.BASE58};i.DID_TYPE_ARCBLOCK=B;const R={role:o.types.RoleType.ROLE_ACCOUNT,pk:o.types.KeyType.ETHEREUM,hash:o.types.HashType.KECCAK,address:o.types.EncodingType.BASE16};i.DID_TYPE_ETHEREUM=R;const F=e=>{const t=["pk","hash","address"];return(0,W.default)((0,$.default)(e,t),(0,$.default)(R,t))};i.isEthereumType=F;const L=e=>{const t=(0,m.toAddress)(e);return/^(0x)?[0-9a-f]{40}$/i.test(t)?/^(0x|0X)?[0-9a-f]{40}$/.test(t)||/^(0x|0X)?[0-9A-F]{40}$/.test(t)?!0:Q(t):!1};i.isEthereumDid=L;const Q=e=>{const t=e.replace(/^0x/i,""),s=o.Hasher.Keccak.hash256(t.toLowerCase()).replace(/^0x/i,"");for(let r=0;r<40;r++)if(parseInt(s[r],16)>7&&t[r].toUpperCase()!==t[r]||parseInt(s[r],16)<=7&&t[r].toLowerCase()!==t[r])return!1;return!0},Z=e=>{if(typeof e>"u")return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(e))throw new Error(`Given address "${e}" is not a valid Ethereum address.`);const t=e.toLowerCase().replace(/^0x/i,""),s=o.Hasher.Keccak.hash256(t).replace(/^0x/i,"");let r="0x";for(let n=0;n<t.length;n++)parseInt(s[n],16)>7?r+=t[n].toUpperCase():r+=t[n];return r};i.toChecksumAddress=Z;function k(e={}){let t={};["default","arcblock"].includes(e)?t=B:["eth","ethereum"].includes(e)?t=R:t={...B,...e};const{role:s,pk:r,hash:n,address:u}=t;Object.keys(t).forEach(l=>{const _=(0,D.default)(`${b[l]||l}Type`);if(Object.values(o.types[_]).includes(t[l])===!1)throw new Error(`Unsupported ${l} type: ${t[l]}`)});const p={role:s,pk:r,hash:n,address:u};return F(p)===!1&&[o.types.RoleType.ROLE_NODE,o.types.RoleType.ROLE_VALIDATOR,o.types.RoleType.ROLE_TETHER,o.types.RoleType.ROLE_SWAP].includes(p.role)&&(p.hash=o.types.HashType.SHA2),p}i.DidType=k;k.toJSON=e=>Object.keys(e).reduce((t,s)=>{const r=(0,D.default)(`${b[s]||s}Type`),n=Object.keys(o.types[r]),u=Object.values(o.types[r]);return t[s]=n[u.indexOf(e[s])],t},{});k.fromJSON=e=>Object.keys(e).reduce((t,s)=>{const r=(0,D.default)(`${b[s]||s}Type`),n=Object.keys(o.types[r]),u=Object.values(o.types[r]);return t[s]=u[n.indexOf(e[s])],t},{});const x=e=>{const t=k(e),s=(0,T.toBits)(t.role,6),r=(0,T.toBits)(t.pk,5),n=(0,T.toBits)(t.hash,5),u=`${s}${r}${n}`,p=(0,m.stripHexPrefix)((0,m.numberToHex)(parseInt(u,2)));return(0,T.toStrictHex)(p,4)};i.fromTypeInfo=x;const w=e=>{let t={};try{if(L(e))t=R;else{const r=(0,T.toBytes)(e).slice(0,2),n=(0,T.toStrictHex)(E.from(r).toString("hex")),u=(0,T.toBits)(new m.BN(n,16),16),p=u.slice(0,6),l=u.slice(6,11),_=u.slice(11,16);t={role:parseInt(p,2),pk:parseInt(l,2),hash:parseInt(_,2),address:(0,m.isHex)((0,m.toAddress)(e))?o.types.EncodingType.BASE16:o.types.EncodingType.BASE58}}return Object.keys(t).forEach(s=>{Object.values(o.types[`${(0,D.default)(b[s]||s)}Type`]).includes(t[s])===!1&&delete t[s]}),t}catch{return t}};i.toTypeInfo=w;const ee=e=>{const t=w(e);return Object.keys(t).reduce((s,r)=>{const n=o.types[`${(0,D.default)(b[r]||r)}Type`];return s[r]=Object.keys(n).find(u=>n[u]===t[r]),s},{})};i.toTypeInfoStr=ee;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DID_TYPE_ETHEREUM=e.DID_TYPE_ARCBLOCK=e.DID_PREFIX=e.DidType=e.fromTypeInfo=e.toTypeInfoStr=e.toTypeInfo=e.isEthereumType=e.isEthereumDid=e.isValid=e.isFromPublicKey=e.toDid=e.toAddress=e.fromHash=e.fromPublicKeyHash=e.fromPublicKey=e.fromSecretKey=e.toStrictHex=e.types=void 0;const t=j;Object.defineProperty(e,"types",{enumerable:!0,get:function(){return t.types}});const s=g;Object.defineProperty(e,"toAddress",{enumerable:!0,get:function(){return s.toAddress}}),Object.defineProperty(e,"toDid",{enumerable:!0,get:function(){return s.toDid}});const r=i;Object.defineProperty(e,"DidType",{enumerable:!0,get:function(){return r.DidType}}),Object.defineProperty(e,"DID_TYPE_ARCBLOCK",{enumerable:!0,get:function(){return r.DID_TYPE_ARCBLOCK}}),Object.defineProperty(e,"DID_TYPE_ETHEREUM",{enumerable:!0,get:function(){return r.DID_TYPE_ETHEREUM}}),Object.defineProperty(e,"fromTypeInfo",{enumerable:!0,get:function(){return r.fromTypeInfo}}),Object.defineProperty(e,"isEthereumDid",{enumerable:!0,get:function(){return r.isEthereumDid}}),Object.defineProperty(e,"isEthereumType",{enumerable:!0,get:function(){return r.isEthereumType}}),Object.defineProperty(e,"toTypeInfo",{enumerable:!0,get:function(){return r.toTypeInfo}}),Object.defineProperty(e,"toTypeInfoStr",{enumerable:!0,get:function(){return r.toTypeInfoStr}});const n=d;Object.defineProperty(e,"DID_PREFIX",{enumerable:!0,get:function(){return n.DID_PREFIX}}),Object.defineProperty(e,"toStrictHex",{enumerable:!0,get:function(){return n.toStrictHex}});const u=(y,a)=>{const c=(0,r.DidType)(a),f=(0,t.getSigner)(c.pk).getPublicKey(y);return p(f.indexOf("0x")===0?f:`0x${f}`,c)};e.fromSecretKey=u;const p=(y,a)=>{const c=(0,r.DidType)(a),h=(0,t.getHasher)(c.hash)(y,1);return l(h,c)};e.fromPublicKey=p;const l=(y,a)=>{const c=(0,r.DidType)(a),f=(0,s.stripHexPrefix)(y).slice(0,40),h=(0,t.getHasher)(c.hash),I=(0,r.fromTypeInfo)(c),S=(0,s.stripHexPrefix)(h(`0x${I}${f}`,1)).slice(0,8),O=`0x${I}${f}${S}`;return(0,r.isEthereumType)(c)?(0,r.toChecksumAddress)(`0x${y.slice(-40)}`):c.address===t.types.EncodingType.BASE58?(0,s.toBase58)(O):O};e.fromPublicKeyHash=l;const _=(y,a=t.types.RoleType.ROLE_ACCOUNT)=>{const c=Object.keys(t.types.RoleType),f=Object.values(t.types.RoleType);if(f.indexOf(a)===-1)throw new Error(`Unsupported role type ${a} when gen ddi from hash`);const h=(0,r.DidType)({role:t.types.RoleType[c[f.indexOf(a)]]});return l(y,h)};e.fromHash=_;const U=(y,a)=>{if(C(y)===!1)return!1;const c=(0,r.toTypeInfo)(y),f=p(a,c),h=y.replace(n.DID_PREFIX,"");return f===h};e.isFromPublicKey=U;const C=y=>{if(!y)return!1;const a=(0,s.toAddress)(String(y)),{hash:c}=(0,r.toTypeInfo)(a);if(typeof c>"u")return!1;if((0,r.isEthereumDid)(a))return!0;const f=(0,t.getHasher)(c),h=(0,n.toBytes)(a),I=(0,n.toStrictHex)(E.from(h.slice(0,22)).toString("hex")),S=(0,n.toStrictHex)(E.from(h.slice(22,26)).toString("hex")),O=(0,s.stripHexPrefix)(f(`0x${I}`,1)).slice(0,8);return S===O};e.isValid=C})(V);export{V as l};
@@ -1 +1 @@
1
- import{r as o,f as n,j as t,n as e}from"./index-Boqyvc8Q.js";import{R as r}from"./index-CsVg93BX.js";function i(){const{t:s}=o.useContext(n);return t.jsx(a,{style:{paddingTop:"25vh"},children:t.jsx(r,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const a=e.main``;export{i as default};
1
+ import{r as o,f as n,j as t,n as e}from"./index-B6qhr4Vv.js";import{R as r}from"./index-CqReN4T9.js";function i(){const{t:s}=o.useContext(n);return t.jsx(a,{style:{paddingTop:"25vh"},children:t.jsx(r,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const a=e.main``;export{i as default};
@@ -0,0 +1,16 @@
1
+ import{r,S as u,j as e,dM as p,b3 as I,dN as b,dO as z,dP as O,P as o,dv as S,s as m,dQ as v}from"./index-B6qhr4Vv.js";import{B as E}from"./ButtonGroup-B4i-HvgZ.js";function d(s){const{size:f,color:a,menu:i,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),t=r.useRef(null),P=Array.isArray(i)?i.map((n,M)=>r.isValidElement(n)?n:r.createElement(u,{...n,key:M})):i,k=()=>{c(n=>!n)},B=n=>{t.current&&t.current.contains(n.target)||c(!1)},C=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(A,{variant:h,size:f,color:a,ref:t,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:a,children:l}),e.jsx(p,{onClick:k,color:a,...y,"aria-label":"more functions",children:e.jsx(I,{})})]}),e.jsx(L,{open:j,anchorEl:t.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(b,{children:e.jsx(z,{onClickAway:B,children:e.jsx(O,{onClick:C,children:P})})})})]})}d.propTypes={size:o.oneOf(["small","medium","large"]),color:o.oneOf(["primary","secondary","inherit"]),menu:o.oneOfType([o.node,o.array]),children:o.node,variant:o.oneOf(["outlined","contained"]),onClick:o.func,menuButtonProps:o.object};d.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:S,menuButtonProps:{}};d.Item=u;const A=m(E)`
2
+ > .MuiButtonBase-root:last-of-type {
3
+ min-width: 2em;
4
+ padding-left: 0;
5
+ padding-right: 0;
6
+ }
7
+ `,L=m(v)`
8
+ z-index: ${s=>s.theme.zIndex.tooltip};
9
+ .MuiList-root {
10
+ padding: 4px 0;
11
+ }
12
+ .MuiListItem-root {
13
+ padding-top: 4px;
14
+ padding-bottom: 4px;
15
+ }
16
+ `;export{d as S};
@@ -1 +1 @@
1
- import{P as s,j as t,B as i,gj as r}from"./index-Boqyvc8Q.js";function n({children:e,...o}){return t.jsxs(i,{color:"did",variant:"contained",...o,children:[t.jsx("span",{style:{fontWeight:400},children:e||"Continue With"}),t.jsx(r,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}n.propTypes={children:s.any};n.defaultProps={children:""};export{n as C};
1
+ import{P as s,j as t,B as i,ga as r}from"./index-B6qhr4Vv.js";function n({children:e,...o}){return t.jsxs(i,{color:"did",variant:"contained",...o,children:[t.jsx("span",{style:{fontWeight:400},children:e||"Continue With"}),t.jsx(r,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}n.propTypes={children:s.any};n.defaultProps={children:""};export{n as C};
@@ -1,4 +1,4 @@
1
- import{r as P,j as n,q as ee,u as te,ak as Re,cC as ne,M as J,n as B,B as Je,P as G,ax as Ye,z as Ne,cD as Ze,v as et,cE as tt,ad as nt,aw as ve,bn as xe,a2 as Q,b as le,A as ie,K as be,ai as st,R as X,X as Y,C as T,O as $e,i as at,W as rt,x as ot,y as De,ah as lt,cF as it,af as ct,cc as ze,cG as Ee,ab as dt,F as ut,cH as pt,H as ht,al as mt,am as ft,an as gt,cI as vt,ao as xt,J as bt,ap as yt,aq as K,ar as kt,as as jt}from"./index-Boqyvc8Q.js";import{L as Z,P as Ie,A as wt,S as Ct,a as Pt}from"./index-Bvs8qR9r.js";import{u as Lt,A as _t,W as Ut,P as Bt,D as ye,L as ke,d as je,a as we}from"./wait-container-mYVBI-ZE.js";import{C as Te,d as St,A as Ot}from"./agreement-DBRJClMM.js";import{a as Rt}from"./api-BdOqJGVs.js";import{i as Nt}from"./isEqual-DbZp5EUk.js";import{_ as $t}from"./useLocalStorage-BNvbpN9F.js";import{s as Dt}from"./logo-BKA11TRi.js";import"./Skeleton-B4-1c0OT.js";import"./Close-D9SKZkJ7.js";import"./lottie-BYxFXW-g.js";import"./index-DycwPjM3.js";var ce={};Object.defineProperty(ce,"__esModule",{value:!0});var Ae=ce.default=void 0;zt(P);var C=n;function zt(e){return e&&e.__esModule?e:{default:e}}function Ce(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function Pe(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Ce(Object(s),!0).forEach(function(r){Et(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Ce(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Et(e,t,s){return t=It(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function It(e){var t=Tt(e,"string");return typeof t=="symbol"?t:String(t)}function Tt(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var de=function(t){return(0,C.jsxs)("svg",Pe(Pe({},t),{},{children:[(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,C.jsxs)("defs",{children:[(0,C.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,C.jsx)("stop",{stopColor:"#0FA4B7"}),(0,C.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,C.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,C.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,C.jsx)("stop",{stopColor:"#0FA4B7"}),(0,C.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,C.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};de.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};de.displayName="launcher-logo-notext";Ae=ce.default=de;var ue={};Object.defineProperty(ue,"__esModule",{value:!0});var Me=ue.default=void 0;At(P);var b=n;function At(e){return e&&e.__esModule?e:{default:e}}function Le(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function _e(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Le(Object(s),!0).forEach(function(r){Mt(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Le(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Mt(e,t,s){return t=Vt(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Vt(e){var t=Ft(e,"string");return typeof t=="symbol"?t:String(t)}function Ft(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pe=function(t){return(0,b.jsxs)("svg",_e(_e({},t),{},{children:[(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,b.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,b.jsxs)("defs",{children:[(0,b.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,b.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};pe.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};pe.displayName="launcher-logo";Me=ue.default=pe;function Wt(){const{t:e}=ee(),{info:t}=te(),s=Re(),r=decodeURIComponent(s.get("accessUrl")||""),{meta:l}=ne();return n.jsx(qt,{children:n.jsx("div",{className:"body",children:n.jsx(Z,{variant:"success",title:J({meta:l},!0),subTitle:e("launchBlocklet.installSuccess",{serverName:t.name}),footer:n.jsx(Ht,{href:r,rel:"noreferrer","data-cy":"open-blocklet",children:e("common.open")})})})})}const Ht=B.a`
1
+ import{r as C,j as n,q as ee,u as te,aj as Ne,ct as ne,M as X,n as B,B as Xe,P as G,aw as Ye,z as Re,cu as Ze,v as et,cv as tt,ac as nt,av as ve,bl as xe,a1 as Q,b as le,A as ie,K as be,ah as st,Q as J,V as Y,C as T,N as De,i as at,W as rt,x as ot,y as $e,ag as lt,cw as it,ae as ct,c4 as ze,cx as Ee,aa as ut,F as dt,cy as pt,H as ht,ak as mt,al as ft,am as gt,cz as vt,an as xt,J as bt,ao as yt,ap as K,aq as kt,ar as jt}from"./index-B6qhr4Vv.js";import{L as Z,P as Ie,A as wt,S as Pt,a as Ct}from"./index-D5672HTm.js";import{u as Lt,A as _t,W as Ut,P as Bt,D as ye,L as ke,d as je,a as we}from"./wait-container-CrBtw_vv.js";import{C as Te,d as St,A as Ot}from"./agreement-hUkyT-rU.js";import{a as Nt}from"./api-D8MiIqQL.js";import{i as Rt}from"./isEqual-DyC_2mMM.js";import{_ as Dt}from"./useLocalStorage-Dhldbzlz.js";import{s as $t}from"./logo-BKA11TRi.js";import"./Skeleton-D9CMhdYr.js";import"./Close-TuMd444H.js";import"./lottie-Djo2tbD7.js";import"./index-Cs9Skmx2.js";var ce={};Object.defineProperty(ce,"__esModule",{value:!0});var Ae=ce.default=void 0;zt(C);var P=n;function zt(e){return e&&e.__esModule?e:{default:e}}function Pe(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function Ce(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Pe(Object(s),!0).forEach(function(r){Et(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Pe(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Et(e,t,s){return t=It(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function It(e){var t=Tt(e,"string");return typeof t=="symbol"?t:String(t)}function Tt(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ue=function(t){return(0,P.jsxs)("svg",Ce(Ce({},t),{},{children:[(0,P.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,P.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,P.jsxs)("defs",{children:[(0,P.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,P.jsx)("stop",{stopColor:"#0FA4B7"}),(0,P.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,P.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,P.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,P.jsx)("stop",{stopColor:"#0FA4B7"}),(0,P.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,P.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};ue.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};ue.displayName="launcher-logo-notext";Ae=ce.default=ue;var de={};Object.defineProperty(de,"__esModule",{value:!0});var Me=de.default=void 0;At(C);var b=n;function At(e){return e&&e.__esModule?e:{default:e}}function Le(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),s.push.apply(s,r)}return s}function _e(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?Le(Object(s),!0).forEach(function(r){Mt(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):Le(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}function Mt(e,t,s){return t=Vt(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Vt(e){var t=Ft(e,"string");return typeof t=="symbol"?t:String(t)}function Ft(e,t){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pe=function(t){return(0,b.jsxs)("svg",_e(_e({},t),{},{children:[(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,b.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,b.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,b.jsxs)("defs",{children:[(0,b.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,b.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,b.jsx)("stop",{stopColor:"#0FA4B7"}),(0,b.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,b.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};pe.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};pe.displayName="launcher-logo";Me=de.default=pe;function Wt(){const{t:e}=ee(),{info:t}=te(),s=Ne(),r=decodeURIComponent(s.get("accessUrl")||""),{meta:l}=ne();return n.jsx(qt,{children:n.jsx("div",{className:"body",children:n.jsx(Z,{variant:"success",title:X.getDisplayName({meta:l},!0),subTitle:e("launchBlocklet.installSuccess",{serverName:t.name}),footer:n.jsx(Ht,{href:r,rel:"noreferrer","data-cy":"open-blocklet",children:e("common.open")})})})})}const Ht=B.a`
2
2
  display: block;
3
3
  height: 36px;
4
4
  color: ${e=>e.theme.palette.primary.main};
@@ -25,7 +25,7 @@ import{r as P,j as n,q as ee,u as te,ak as Re,cC as ne,M as J,n as B,B as Je,P a
25
25
  font-size: 58px;
26
26
  color: ${e=>e.variant==="error"?e.theme.palette.error.main:e.theme.palette.success.main};
27
27
  }
28
- `;function Ve({children:e,...t}){return n.jsx(Je,{variant:"contained",color:"primary",...t,children:e})}Ve.propTypes={children:G.any.isRequired};const A=P.forwardRef((e,t)=>n.jsx(Ve,{...e,forwardedRef:t})),W=lt("@abtnode/webapp:launch-blocklet:step-install"),Ue=(e,t)=>!t.statusChanged&&(e==="installed"||e==="running")&&!t.launching,Kt=(e,t,s)=>s(t==="nft"?e?"launchBlocklet.dialog.nftFreeDescription":"launchBlocklet.dialog.nftPaidDescription":e?"launchBlocklet.dialog.freeDescription":"launchBlocklet.dialog.paidDescription"),he="setup_token",Gt=e=>{sessionStorage.setItem(he,e)},Qt=()=>{sessionStorage.removeItem(he)},Xt=()=>sessionStorage.getItem(he);function Jt(){const e=Re(),{t,locale:s}=ee(),{api:r,info:l}=te(),{session:u,api:M}=Ye(),k=Ne(),{loading:g,meta:d,isFree:N,appDid:_,sessionId:j,storeUrl:U,blockletMetaUrl:y,isExternal:S,setAppDid:D,launcherUrl:L,launcherSessionId:O,isInstalling:V,isInstalled:$}=ne(),R=d?J({meta:d},!0):null,p=e.get("launchType"),z=e.get("chainHost"),H=!!e.get("onlyRequired"),h=e.get("nftId"),E=P.useRef(null),{decrypt:F,encryptKey:Fe}=Ze(),[We]=$t("skip-blocklet-setup",!1),[a,m]=et({launching:!1,visiting:!1,statusChanged:!1,isConnectOpen:!1,nextAccessUrl:"",loaded:!1,installError:null,progressIndex:0,connectData:{action:"",baseUrl:"",checkFn:()=>{},extraParams:{}}}),fe=tt({user:u.user,launchType:p,nftId:h}),se=nt.getServerAuthMethod(l,p,O,fe),w=Lt(fe?_:""),{status:v,eventName:ae}=w,ge=e.get("from");P.useEffect(()=>{g||(!$&&!V&&re(),m({loaded:!0}))},[g]);const He=async()=>{const{isNew:i,decoded:o}=it(U,l.blockletRegistryList);i&&await r.addBlockletStore({input:{teamDid:l.did,url:o}})},re=async()=>{var o,f;const i=u.user?`${u.user.fullName}'s ${R}`:R;if(m({installError:null}),u!=null&&u.user&&!S&&p!=="serverless")try{await He()}catch(c){console.error("addNewRegistryToRegistryList error:",c)}if(N){const c=`launch-free-blocklet-by-${se}`;m({isConnectOpen:!0,connectData:{action:c,baseUrl:"",checkFn:ve.create({baseURL:((o=window==null?void 0:window.env)==null?void 0:o.apiPrefix)??"/"}).get,extraParams:{wt:xe(d),title:i,blockletMetaUrl:y,launchType:p,nftId:h,chainHost:decodeURIComponent(z),launcherUrl:L,launcherSessionId:O,onlyRequired:H}}})}else{const c=`launch-paid-blocklet-by-${se}`,x=new URL(window.location.href);x.pathname=Q(((f=window==null?void 0:window.env)==null?void 0:f.apiPrefix)??"/",`/api/did/${c}/token`),x.searchParams.set("wt",xe(d)),x.searchParams.set("_ek_",Fe),x.searchParams.set("title",i),x.searchParams.set("autoConnect",!1),x.searchParams.set("blockletMetaUrl",y),p&&x.searchParams.set("launchType",p),h&&x.searchParams.set("nftId",h),L&&x.searchParams.set("launcherUrl",L),O&&x.searchParams.set("launcherSessionId",O);const{data:q}=await Rt.get(x.href);m({isConnectOpen:!0,connectData:{action:"verify-purchase-blocklet",baseUrl:new URL(y).origin,checkFn:ve.create({baseURL:new URL(y).origin}).get,extraParams:{serverDid:l.did,blockletDid:d==null?void 0:d.did,nw:q.url}}})}},qe=async i=>{ie.success(t("launchBlocklet.dialog.success"));const o=Array.isArray(i)?i[i.length-1]:i;if(o.sessionToken&&(ct(F(o.sessionToken)),await u.refresh()),o.setupToken&&Gt(o.setupToken),m({launching:!o.isInstalled,isConnectOpen:!1}),o.appDid){D(o.appDid,o.sessionId);const f=new URL(window.location.href);f.searchParams.set("appDid",o.appDid),f.searchParams.set("sessionId",o.sessionId),window.history.replaceState(null,"",f.toString())}},Ke=i=>{const o=`/${l.routing.adminPath}/blocklets/${i.meta.did}/configuration`.replace(/\/+/g,"/");let f=`/launch-blocklet/complete?status=installed&name=${encodeURIComponent(R)}&accessUrl=${encodeURIComponent(o)}&blocklet_meta_url=${y}`;const c=e.get("fromLauncher");c&&(f+=`&fromLauncher=${c}`),p&&(f+=`&launchType=${p}`),z&&(f+=`&chainHost=${z}`),k(f)},Ge=async i=>{if(W("visitBlocklet",{status:v,state:a,appDid:_}),a.visiting)return;m({visiting:!0});const o=ze({blocklet:i}),f=await Ee(o);if(X(f)&&p!=="serverless"||We){m({visiting:!1}),setTimeout(()=>{Ke(i)},1e3);return}if(X(f)){m({visiting:!1});return}if(Ue(v,a)===!1)try{await M.post(`/api/launch/${j}`)}catch(Xe){W("end launch failed",{error:be(Xe)})}const c=new URL(f);c.searchParams.set("serverUrl",dt(l)),i.status!=="running"&&c.searchParams.set("__start__","1");const x=e.get("fromLauncher");x&&c.searchParams.set("fromLauncher",x),p&&c.searchParams.set("launchType",p),h&&c.searchParams.set("nftId",h),z&&c.searchParams.set("chainHost",z);const q=Xt();q&&c.searchParams.set("setupToken",q),m({nextAccessUrl:c.href,visiting:!1}),setTimeout(()=>{Qt(),window.location.href=c.href},1e3)},Qe=[t("launchBlocklet.waiting.verifying"),t("launchBlocklet.waiting.downloading"),t("launchBlocklet.waiting.extracting"),t(v==="upgrading"?"common.upgrading":"launchBlocklet.waiting.installing"),t("launchBlocklet.waiting.done")],I=()=>{W("handleInstalledProgress",{status:v,state:a}),v&&(m({progressIndex:4}),E.current&&(clearTimeout(E.current),E.current=null),E.current=setTimeout(()=>{r.getBlocklet({input:{did:_,attachRuntimeInfo:!0}}).then(i=>{i.blocklet&&Ge(i.blocklet)})},500))};if(P.useEffect(()=>{V&&m({launching:!0}),$&&I()},[$,V]),P.useEffect(()=>{var i;if(p==="serverless"&&ae===le.BlockletEvents.nftConsumed){I();return}switch(v){case"waiting":m({progressIndex:1,statusChanged:!0});break;case"downloading":m({progressIndex:2,statusChanged:!0});break;case"installing":case"upgrading":m({progressIndex:3,statusChanged:!0});break;case"installed":if(p==="serverless"&&!st(w))break;I();break;case"starting":I();break;case"running":I();break;case"stopped":I();break;case"corrupted":case"error":{const o={message:w.error.message,name:w.eventName};[le.BlockletEvents.downloadFailed,le.BlockletEvents.installFailed].includes(w.eventName)?o.action="retry":(v==="error"||v==="corrupted")&&(o.action="view"),Nt(o,a.installError)||(i=w==null?void 0:w.error)!=null&&i.message&&ie.error(be(w.error))}break}},[v,ae,w]),W("render",{status:v,eventName:ae,launchType:p,runtimeBlockletState:w,state:a}),g||u.user&&v===null||X(d))return n.jsx(Y,{relative:"parent",children:n.jsx(T,{})});if(a.installError){const i={view:!S&&n.jsx(A,{className:"bottom-button",component:$e,to:`/blocklets/${_}/overview`,"data-cy":"view-blocklet",color:"primary",variant:"contained",children:t("launchBlocklet.viewApplication")}),retry:n.jsxs(en,{children:[ge&&n.jsx(A,{variant:"text",className:"bottom-button","data-cy":"go-back",disabled:a.isConnectOpen,onClick:()=>{window.location.href=ge},children:t("common.back")}),n.jsxs(A,{className:"bottom-button","data-cy":"retry-install",disabled:a.isConnectOpen,onClick:re,children:[a.isConnectOpen&&n.jsx(T,{size:16}),t("common.retry")]})]})},o=a.installError.name?a.installError.name.replace("blocklet.",""):"installFailed";return n.jsx(Be,{variant:"error",title:R,subTitle:n.jsxs(Zt,{children:[n.jsx("div",{children:t(`launchBlocklet.error.${o}`)}),a.installError.message&&n.jsx("div",{className:"error-desc",children:t("common.errorMessage")+a.installError.message})]}),footer:i[a.installError.action]})}if(Ue(v,a))return W("alreadyExists",{status:v,state:a,runtimeBlockletState:w}),n.jsx(Be,{variant:"info",title:t("common.reminder"),subTitle:t("launchBlocklet.alreadyExists",{name:J({meta:d},!0)}),footer:n.jsxs("div",{children:[!a.nextAccessUrl&&n.jsx(T,{size:16}),a.nextAccessUrl&&n.jsx(at,{href:a.nextAccessUrl,"data-cy":"open-blocklet",children:t("launchBlocklet.redirect")})]})});const oe=!a.launching&&!v;return n.jsxs(Yt,{children:[n.jsx("div",{className:"header",children:n.jsx(Ie,{title:t(oe?"common.install":"common.installing"),subTitle:oe?t("launchBlocklet.subTitle",{appName:R,serverName:l.name}):""})}),n.jsxs("div",{className:"body",children:[oe&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"illustrations",children:[n.jsx("div",{className:"ills-block ills-block-left",children:n.jsxs("div",{className:"ills-block-inner",children:[n.jsx(_t,{className:"i-icon",blocklet:{meta:d},blockletMetaUrl:y}),n.jsx("div",{className:"i-name",children:R})]})}),n.jsx(St,{className:"arrow-icon"}),n.jsx("div",{className:"ills-block ills-block-right",children:n.jsxs("div",{className:"ills-block-inner",children:[n.jsx("img",{width:"64",height:"64",src:Dt,alt:""}),n.jsx("div",{className:"i-name",children:l.name}),n.jsx(rt,{size:12,responsive:!1,compact:!0,did:l.did})]})})]}),a.loaded&&!$&&!a.launching&&n.jsxs(A,{className:"bottom-button","data-cy":"start-launch",disabled:a.isConnectOpen,onClick:re,children:[a.isConnectOpen&&n.jsx(T,{size:16}),t("launchBlocklet.confirmInstall")]})]}),a.launching&&n.jsxs(Ut,{children:[n.jsx(wt,{increaseSpeed:.3,messageLoop:!1,message:n.jsx(Bt,{steps:Qe,stepIndex:a.progressIndex,autoGrowth:a.progressIndex===4?1e3:4e3})}),[1,2].includes(a.progressIndex)&&n.jsx(ye,{appDid:_})]})]}),a.isConnectOpen&&n.jsx(ye,{appDid:_,visible:!1}),n.jsx(ot,{open:a.isConnectOpen,popup:!0,saveConnect:!1,className:"connect",baseUrl:a.connectData.baseUrl,action:a.connectData.action,checkFn:a.connectData.checkFn,extraParams:a.connectData.extraParams,checkTimeout:10*60*1e3,webWalletUrl:De(l),onSuccess:qe,onClose:()=>m({isConnectOpen:!1}),locale:s,messages:{title:`${t("launchBlocklet.dialog.title")}`,scan:Kt(N,se,t),confirm:t("launchBlocklet.dialog.confirm"),success:t("launchBlocklet.dialog.success")}})]})}const Yt=B(Te)`
28
+ `;function Ve({children:e,...t}){return n.jsx(Xe,{variant:"contained",color:"primary",...t,children:e})}Ve.propTypes={children:G.any.isRequired};const A=C.forwardRef((e,t)=>n.jsx(Ve,{...e,forwardedRef:t})),W=lt("@abtnode/webapp:launch-blocklet:step-install"),Ue=(e,t)=>!t.statusChanged&&(e==="installed"||e==="running")&&!t.launching,Kt=(e,t,s)=>s(t==="nft"?e?"launchBlocklet.dialog.nftFreeDescription":"launchBlocklet.dialog.nftPaidDescription":e?"launchBlocklet.dialog.freeDescription":"launchBlocklet.dialog.paidDescription"),he="setup_token",Gt=e=>{sessionStorage.setItem(he,e)},Qt=()=>{sessionStorage.removeItem(he)},Jt=()=>sessionStorage.getItem(he);function Xt(){const e=Ne(),{t,locale:s}=ee(),{api:r,info:l}=te(),{session:d,api:M}=Ye(),k=Re(),{loading:g,meta:u,isFree:R,appDid:_,sessionId:j,storeUrl:U,blockletMetaUrl:y,isExternal:S,setAppDid:$,launcherUrl:L,launcherSessionId:O,isInstalling:V,isInstalled:D}=ne(),N=u?X.getDisplayName({meta:u},!0):null,p=e.get("launchType"),z=e.get("chainHost"),H=!!e.get("onlyRequired"),h=e.get("nftId"),E=C.useRef(null),{decrypt:F,encryptKey:Fe}=Ze(),[We]=Dt("skip-blocklet-setup",!1),[a,m]=et({launching:!1,visiting:!1,statusChanged:!1,isConnectOpen:!1,nextAccessUrl:"",loaded:!1,installError:null,progressIndex:0,connectData:{action:"",baseUrl:"",checkFn:()=>{},extraParams:{}}}),fe=tt({user:d.user,launchType:p,nftId:h}),se=nt.getServerAuthMethod(l,p,O,fe),w=Lt(fe?_:""),{status:v,eventName:ae}=w,ge=e.get("from");C.useEffect(()=>{g||(!D&&!V&&re(),m({loaded:!0}))},[g]);const He=async()=>{const{isNew:i,decoded:o}=it(U,l.blockletRegistryList);i&&await r.addBlockletStore({input:{teamDid:l.did,url:o}})},re=async()=>{var o,f;const i=d.user?`${d.user.fullName}'s ${N}`:N;if(m({installError:null}),d!=null&&d.user&&!S&&p!=="serverless")try{await He()}catch(c){console.error("addNewRegistryToRegistryList error:",c)}if(R){const c=`launch-free-blocklet-by-${se}`;m({isConnectOpen:!0,connectData:{action:c,baseUrl:"",checkFn:ve.create({baseURL:((o=window==null?void 0:window.env)==null?void 0:o.apiPrefix)??"/"}).get,extraParams:{wt:xe(u),title:i,blockletMetaUrl:y,launchType:p,nftId:h,chainHost:decodeURIComponent(z),launcherUrl:L,launcherSessionId:O,onlyRequired:H}}})}else{const c=`launch-paid-blocklet-by-${se}`,x=new URL(window.location.href);x.pathname=Q(((f=window==null?void 0:window.env)==null?void 0:f.apiPrefix)??"/",`/api/did/${c}/token`),x.searchParams.set("wt",xe(u)),x.searchParams.set("_ek_",Fe),x.searchParams.set("title",i),x.searchParams.set("autoConnect",!1),x.searchParams.set("blockletMetaUrl",y),p&&x.searchParams.set("launchType",p),h&&x.searchParams.set("nftId",h),L&&x.searchParams.set("launcherUrl",L),O&&x.searchParams.set("launcherSessionId",O);const{data:q}=await Nt.get(x.href);m({isConnectOpen:!0,connectData:{action:"verify-purchase-blocklet",baseUrl:new URL(y).origin,checkFn:ve.create({baseURL:new URL(y).origin}).get,extraParams:{serverDid:l.did,blockletDid:u==null?void 0:u.did,nw:q.url}}})}},qe=async i=>{ie.success(t("launchBlocklet.dialog.success"));const o=Array.isArray(i)?i[i.length-1]:i;if(o.sessionToken&&(ct(F(o.sessionToken)),await d.refresh()),o.setupToken&&Gt(o.setupToken),m({launching:!o.isInstalled,isConnectOpen:!1}),o.appDid){$(o.appDid,o.sessionId);const f=new URL(window.location.href);f.searchParams.set("appDid",o.appDid),f.searchParams.set("sessionId",o.sessionId),window.history.replaceState(null,"",f.toString())}},Ke=i=>{const o=`/${l.routing.adminPath}/blocklets/${i.meta.did}/configuration`.replace(/\/+/g,"/");let f=`/launch-blocklet/complete?status=installed&name=${encodeURIComponent(N)}&accessUrl=${encodeURIComponent(o)}&blocklet_meta_url=${y}`;const c=e.get("fromLauncher");c&&(f+=`&fromLauncher=${c}`),p&&(f+=`&launchType=${p}`),z&&(f+=`&chainHost=${z}`),k(f)},Ge=async i=>{if(W("visitBlocklet",{status:v,state:a,appDid:_}),a.visiting)return;m({visiting:!0});const o=ze({blocklet:i}),f=await Ee(o);if(J(f)&&p!=="serverless"||We){m({visiting:!1}),setTimeout(()=>{Ke(i)},1e3);return}if(J(f)){m({visiting:!1});return}if(Ue(v,a)===!1)try{await M.post(`/api/launch/${j}`)}catch(Je){W("end launch failed",{error:be(Je)})}const c=new URL(f);c.searchParams.set("serverUrl",ut(l)),i.status!=="running"&&c.searchParams.set("__start__","1");const x=e.get("fromLauncher");x&&c.searchParams.set("fromLauncher",x),p&&c.searchParams.set("launchType",p),h&&c.searchParams.set("nftId",h),z&&c.searchParams.set("chainHost",z);const q=Jt();q&&c.searchParams.set("setupToken",q),m({nextAccessUrl:c.href,visiting:!1}),setTimeout(()=>{Qt(),window.location.href=c.href},1e3)},Qe=[t("launchBlocklet.waiting.verifying"),t("launchBlocklet.waiting.downloading"),t("launchBlocklet.waiting.extracting"),t(v==="upgrading"?"common.upgrading":"launchBlocklet.waiting.installing"),t("launchBlocklet.waiting.done")],I=()=>{W("handleInstalledProgress",{status:v,state:a}),v&&(m({progressIndex:4}),E.current&&(clearTimeout(E.current),E.current=null),E.current=setTimeout(()=>{r.getBlocklet({input:{did:_,attachRuntimeInfo:!0}}).then(i=>{i.blocklet&&Ge(i.blocklet)})},500))};if(C.useEffect(()=>{V&&m({launching:!0}),D&&I()},[D,V]),C.useEffect(()=>{var i;if(p==="serverless"&&ae===le.BlockletEvents.nftConsumed){I();return}switch(v){case"waiting":m({progressIndex:1,statusChanged:!0});break;case"downloading":m({progressIndex:2,statusChanged:!0});break;case"installing":case"upgrading":m({progressIndex:3,statusChanged:!0});break;case"installed":if(p==="serverless"&&!st(w))break;I();break;case"starting":I();break;case"running":I();break;case"stopped":I();break;case"corrupted":case"error":{const o={message:w.error.message,name:w.eventName};[le.BlockletEvents.downloadFailed,le.BlockletEvents.installFailed].includes(w.eventName)?o.action="retry":(v==="error"||v==="corrupted")&&(o.action="view"),Rt(o,a.installError)||(i=w==null?void 0:w.error)!=null&&i.message&&ie.error(be(w.error))}break}},[v,ae,w]),W("render",{status:v,eventName:ae,launchType:p,runtimeBlockletState:w,state:a}),g||d.user&&v===null||J(u))return n.jsx(Y,{relative:"parent",children:n.jsx(T,{})});if(a.installError){const i={view:!S&&n.jsx(A,{className:"bottom-button",component:De,to:`/blocklets/${_}/overview`,"data-cy":"view-blocklet",color:"primary",variant:"contained",children:t("launchBlocklet.viewApplication")}),retry:n.jsxs(en,{children:[ge&&n.jsx(A,{variant:"text",className:"bottom-button","data-cy":"go-back",disabled:a.isConnectOpen,onClick:()=>{window.location.href=ge},children:t("common.back")}),n.jsxs(A,{className:"bottom-button","data-cy":"retry-install",disabled:a.isConnectOpen,onClick:re,children:[a.isConnectOpen&&n.jsx(T,{size:16}),t("common.retry")]})]})},o=a.installError.name?a.installError.name.replace("blocklet.",""):"installFailed";return n.jsx(Be,{variant:"error",title:N,subTitle:n.jsxs(Zt,{children:[n.jsx("div",{children:t(`launchBlocklet.error.${o}`)}),a.installError.message&&n.jsx("div",{className:"error-desc",children:t("common.errorMessage")+a.installError.message})]}),footer:i[a.installError.action]})}if(Ue(v,a))return W("alreadyExists",{status:v,state:a,runtimeBlockletState:w}),n.jsx(Be,{variant:"info",title:t("common.reminder"),subTitle:t("launchBlocklet.alreadyExists",{name:X.getDisplayName({meta:u},!0)}),footer:n.jsxs("div",{children:[!a.nextAccessUrl&&n.jsx(T,{size:16}),a.nextAccessUrl&&n.jsx(at,{href:a.nextAccessUrl,"data-cy":"open-blocklet",children:t("launchBlocklet.redirect")})]})});const oe=!a.launching&&!v;return n.jsxs(Yt,{children:[n.jsx("div",{className:"header",children:n.jsx(Ie,{title:t(oe?"common.install":"common.installing"),subTitle:oe?t("launchBlocklet.subTitle",{appName:N,serverName:l.name}):""})}),n.jsxs("div",{className:"body",children:[oe&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"illustrations",children:[n.jsx("div",{className:"ills-block ills-block-left",children:n.jsxs("div",{className:"ills-block-inner",children:[n.jsx(_t,{className:"i-icon",blocklet:{meta:u},blockletMetaUrl:y}),n.jsx("div",{className:"i-name",children:N})]})}),n.jsx(St,{className:"arrow-icon"}),n.jsx("div",{className:"ills-block ills-block-right",children:n.jsxs("div",{className:"ills-block-inner",children:[n.jsx("img",{width:"64",height:"64",src:$t,alt:""}),n.jsx("div",{className:"i-name",children:l.name}),n.jsx(rt,{size:12,responsive:!1,compact:!0,did:l.did})]})})]}),a.loaded&&!D&&!a.launching&&n.jsxs(A,{className:"bottom-button","data-cy":"start-launch",disabled:a.isConnectOpen,onClick:re,children:[a.isConnectOpen&&n.jsx(T,{size:16}),t("launchBlocklet.confirmInstall")]})]}),a.launching&&n.jsxs(Ut,{children:[n.jsx(wt,{increaseSpeed:.3,messageLoop:!1,message:n.jsx(Bt,{steps:Qe,stepIndex:a.progressIndex,autoGrowth:a.progressIndex===4?1e3:4e3})}),[1,2].includes(a.progressIndex)&&n.jsx(ye,{appDid:_})]})]}),a.isConnectOpen&&n.jsx(ye,{appDid:_,visible:!1}),n.jsx(ot,{open:a.isConnectOpen,popup:!0,saveConnect:!1,className:"connect",baseUrl:a.connectData.baseUrl,action:a.connectData.action,checkFn:a.connectData.checkFn,extraParams:a.connectData.extraParams,checkTimeout:10*60*1e3,webWalletUrl:$e(l),onSuccess:qe,onClose:()=>m({isConnectOpen:!1}),locale:s,messages:{title:`${t("launchBlocklet.dialog.title")}`,scan:Kt(R,se,t),confirm:t("launchBlocklet.dialog.confirm"),success:t("launchBlocklet.dialog.success")}})]})}const Yt=B(Te)`
29
29
  .body {
30
30
  align-items: center;
31
31
  animation: fadein ease 0.3s;
@@ -106,7 +106,7 @@ import{r as P,j as n,q as ee,u as te,ak as Re,cC as ne,M as J,n as B,B as Je,P a
106
106
  .result-footer {
107
107
  height: auto;
108
108
  }
109
- `;function me({onClickNext:e,handleDescEle:t,showPageHeader:s}){var H;const r=Ne(),[l,u]=P.useState(null),[M,k]=P.useState(!1),{t:g}=ee(),{info:d,api:N}=te(),{loading:_,meta:j,isRunning:U,isInstalled:y,isInstalling:S,appDid:D,isExternal:L}=ne(),[O,V]=P.useState(!0),$=P.useMemo(()=>L?l?`${new URL(l).origin}${ut.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`:"":`/blocklets/${D}/overview`,[l,L,D]),R=()=>{const h=new URLSearchParams(window.location.search);O||h.set("onlyRequired","1"),r(`/launch-blocklet/install?${h.toString()}`)},p=e||R,z=async()=>{try{k(!0);const{blocklet:h}=await N.getBlocklet({input:{did:j.did,attachRuntimeInfo:!0}}),E=ze({blocklet:h}),F=await Ee(E);if(!F&&X(F)){u(null);return}u(new URL(F).href)}catch(h){ie.error(h.message)}finally{k(!1)}};if(P.useEffect(()=>{if(!_){if(S){R();return}(U||y&&L)&&z()}},[U,L,y,S]),y){const h=U?"alreadyRunning":"alreadyInstalled";return n.jsx(Z,{variant:"info",title:g("common.reminder"),subTitle:g(`launchBlocklet.${h}`,{name:J({meta:j},!0)}),footer:n.jsxs(tn,{children:[n.jsx(A,{loading:!$,"data-cy":"view-blocklet",component:L?void 0:$e,to:$,href:$,variant:U?"outlined":"contained",color:"primary",children:g("launchBlocklet.viewApplication")}),U&&n.jsx(A,{loading:M,className:"last-button",disabled:!l,href:l,"data-cy":"open-blocklet",children:g("common.open")})]})})}return d?!pt(j)&&!((H=j==null?void 0:j.components)!=null&&H.length)?n.jsx(Se,{className:"center",children:n.jsx(Z,{variant:"error",subTitle:g("launchBlocklet.error.resourceBlocklet")})}):n.jsxs(Se,{children:[s&&n.jsx(Ie,{title:g("launchBlocklet.introduction"),subTitle:g("launchBlocklet.welcome")}),n.jsx(Ot,{installRelated:O,onChangeInstallRelated:V,meta:j,onClickNext:p,handleDescEle:t})]}):n.jsx(Y,{relative:"parent",children:n.jsx(T,{})})}me.propTypes={onClickNext:G.func,handleDescEle:G.node,showPageHeader:G.bool};me.defaultProps={onClickNext:null,handleDescEle:"",showPageHeader:!0};const Se=B.div`
109
+ `;function me({onClickNext:e,handleDescEle:t,showPageHeader:s}){var H;const r=Re(),[l,d]=C.useState(null),[M,k]=C.useState(!1),{t:g}=ee(),{info:u,api:R}=te(),{loading:_,meta:j,isRunning:U,isInstalled:y,isInstalling:S,appDid:$,isExternal:L}=ne(),[O,V]=C.useState(!0),D=C.useMemo(()=>L?l?`${new URL(l).origin}${dt.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`:"":`/blocklets/${$}/overview`,[l,L,$]),N=()=>{const h=new URLSearchParams(window.location.search);O||h.set("onlyRequired","1"),r(`/launch-blocklet/install?${h.toString()}`)},p=e||N,z=async()=>{try{k(!0);const{blocklet:h}=await R.getBlocklet({input:{did:j.did,attachRuntimeInfo:!0}}),E=ze({blocklet:h}),F=await Ee(E);if(!F&&J(F)){d(null);return}d(new URL(F).href)}catch(h){ie.error(h.message)}finally{k(!1)}};if(C.useEffect(()=>{if(!_){if(S){N();return}(U||y&&L)&&z()}},[U,L,y,S]),y){const h=U?"alreadyRunning":"alreadyInstalled";return n.jsx(Z,{variant:"info",title:g("common.reminder"),subTitle:g(`launchBlocklet.${h}`,{name:X.getDisplayName({meta:j},!0)}),footer:n.jsxs(tn,{children:[n.jsx(A,{loading:!D,"data-cy":"view-blocklet",component:L?void 0:De,to:D,href:D,variant:U?"outlined":"contained",color:"primary",children:g("launchBlocklet.viewApplication")}),U&&n.jsx(A,{loading:M,className:"last-button",disabled:!l,href:l,"data-cy":"open-blocklet",children:g("common.open")})]})})}return u?!pt.hasStartEngine(j)&&!((H=j==null?void 0:j.components)!=null&&H.length)?n.jsx(Se,{className:"center",children:n.jsx(Z,{variant:"error",subTitle:g("launchBlocklet.error.resourceBlocklet")})}):n.jsxs(Se,{children:[s&&n.jsx(Ie,{title:g("launchBlocklet.introduction"),subTitle:g("launchBlocklet.welcome")}),n.jsx(Ot,{installRelated:O,onChangeInstallRelated:V,meta:j,onClickNext:p,handleDescEle:t})]}):n.jsx(Y,{relative:"parent",children:n.jsx(T,{})})}me.propTypes={onClickNext:G.func,handleDescEle:G.node,showPageHeader:G.bool};me.defaultProps={onClickNext:null,handleDescEle:"",showPageHeader:!0};const Se=B.div`
110
110
  display: flex;
111
111
  flex-direction: column;
112
112
  align-items: center;
@@ -124,7 +124,7 @@ import{r as P,j as n,q as ee,u as te,ak as Re,cC as ne,M as J,n as B,B as Je,P a
124
124
  .last-button {
125
125
  margin-left: ${e=>e.theme.spacing(2)};
126
126
  }
127
- `;function vn(){const e=ht(O=>O.breakpoints.down("md")),{t,locale:s}=ee(),{info:r}=te(),l=De(r),{serverUrl:u,fromLauncher:M,meta:k,isFree:g,loading:d,error:N,storeUrl:_}=ne(),j=Q(mt(),"/launch-blocklet"),U=[{key:"install",name:t("launchBlocklet.steps.installApp"),path:Q(j,"install")},{key:"setup",name:t("setup.steps.launchApp")}];let y=[{key:"agreement",name:t("launchBlocklet.introduction"),path:Q(j,"agreement")},...U];const S=()=>{u&&window.open(u)};let D=n.jsx(Oe,{className:`${u?"logo-can-click":""}`,children:n.jsx(ke,{onClick:S,logo:e?n.jsx(we,{width:"32",height:"32"}):n.jsx(je,{width:"128",height:"48"})})});M&&(y=[{key:"purchase-space",name:t("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:t("launchBlocklet.steps.prepareSpace")},...U],D=n.jsx(Oe,{className:`${u?"logo-can-click":""}`,children:n.jsx(ke,{logo:e?n.jsx(we,{onClick:S,width:"32",height:"32"}):n.jsx(je,{onClick:S,width:"128",height:"48"}),previousData:{logo:e?n.jsx(Ae,{width:"32",height:"32"}):n.jsx(Me,{width:"145",height:"48"})}})}));const L={meta:k,isFree:g};return n.jsx(Ct,{steps:y,children:n.jsx(Pt,{locale:s,loading:d,blockletMeta:{...k,isFree:g},useOfSkeleton:!1,navLogo:D,headerEndAddons:n.jsx(ft,{webWalletUrl:l,SessionContext:gt}),pcWidth:"80%",style:{height:"100%"},logoUrl:k&&k.logo?vt({did:k.did,version:k.version,baseUrl:_,logoPath:k.logo}):null,children:n.jsxs(sn,{children:[n.jsx(xt,{styles:nn}),d&&n.jsx(Y,{relative:"parent",children:n.jsx(T,{})}),!d&&N&&n.jsx(Y,{relative:"parent",children:n.jsx(bt,{style:{wordBreak:"break-all"},variant:"icon",type:"error",children:N})}),!d&&!N&&n.jsxs(yt,{children:[n.jsx(K,{path:"agreement",element:n.jsx(me,{})}),n.jsx(K,{path:"install",element:n.jsx(Jt,{})}),n.jsx(K,{path:"complete",element:n.jsx(Wt,{blocklet:L})}),n.jsx(K,{path:"*",element:n.jsx(kt,{to:`agreement${window.location.search}`,replace:!0})})]})]})})})}const nn=jt`
127
+ `;function vn(){const e=ht(O=>O.breakpoints.down("md")),{t,locale:s}=ee(),{info:r}=te(),l=$e(r),{serverUrl:d,fromLauncher:M,meta:k,isFree:g,loading:u,error:R,storeUrl:_}=ne(),j=Q(mt(),"/launch-blocklet"),U=[{key:"install",name:t("launchBlocklet.steps.installApp"),path:Q(j,"install")},{key:"setup",name:t("setup.steps.launchApp")}];let y=[{key:"agreement",name:t("launchBlocklet.introduction"),path:Q(j,"agreement")},...U];const S=()=>{d&&window.open(d)};let $=n.jsx(Oe,{className:`${d?"logo-can-click":""}`,children:n.jsx(ke,{onClick:S,logo:e?n.jsx(we,{width:"32",height:"32"}):n.jsx(je,{width:"128",height:"48"})})});M&&(y=[{key:"purchase-space",name:t("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:t("launchBlocklet.steps.prepareSpace")},...U],$=n.jsx(Oe,{className:`${d?"logo-can-click":""}`,children:n.jsx(ke,{logo:e?n.jsx(we,{onClick:S,width:"32",height:"32"}):n.jsx(je,{onClick:S,width:"128",height:"48"}),previousData:{logo:e?n.jsx(Ae,{width:"32",height:"32"}):n.jsx(Me,{width:"145",height:"48"})}})}));const L={meta:k,isFree:g};return n.jsx(Pt,{steps:y,children:n.jsx(Ct,{locale:s,loading:u,blockletMeta:{...k,isFree:g},useOfSkeleton:!1,navLogo:$,headerEndAddons:n.jsx(ft,{webWalletUrl:l,SessionContext:gt}),pcWidth:"80%",style:{height:"100%"},logoUrl:k&&k.logo?vt({did:k.did,version:k.version,baseUrl:_,logoPath:k.logo}):null,children:n.jsxs(sn,{children:[n.jsx(xt,{styles:nn}),u&&n.jsx(Y,{relative:"parent",children:n.jsx(T,{})}),!u&&R&&n.jsx(Y,{relative:"parent",children:n.jsx(bt,{style:{wordBreak:"break-all"},variant:"icon",type:"error",children:R})}),!u&&!R&&n.jsxs(yt,{children:[n.jsx(K,{path:"agreement",element:n.jsx(me,{})}),n.jsx(K,{path:"install",element:n.jsx(Xt,{})}),n.jsx(K,{path:"complete",element:n.jsx(Wt,{blocklet:L})}),n.jsx(K,{path:"*",element:n.jsx(kt,{to:`agreement${window.location.search}`,replace:!0})})]})]})})})}const nn=jt`
128
128
  html,
129
129
  body,
130
130
  #root,