@abtnode/webapp 1.17.5-beta-20251209-090953-3a59e7ac → 1.17.5-beta-20251211-104355-426d7eb6

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 (187) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-CBmYJq_c.js → AdapterDayjs-Dcg6AE_r.js} +1 -1
  4. package/dist/assets/{Add-BuqBIDFA.js → Add-CwJyd37s.js} +1 -1
  5. package/dist/assets/ArrowDropDown-BoUU1BUL.js +1 -0
  6. package/dist/assets/{Autocomplete-YxXH99vB.js → Autocomplete-C6KZatsu.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-DngVGj6f.js → Breadcrumbs-Bj53u8dH.js} +1 -1
  8. package/dist/assets/{ButtonGroup-BtGO-VCX.js → ButtonGroup-uhq9NqjP.js} +1 -1
  9. package/dist/assets/{CSSTransition-Cj0uEEEn.js → CSSTransition-5vBScTx4.js} +1 -1
  10. package/dist/assets/{CallMerge-C4Y56e44.js → CallMerge-Div7wiLM.js} +1 -1
  11. package/dist/assets/{CardContent-DIS6zA0P.js → CardContent-BpUbXRgZ.js} +1 -1
  12. package/dist/assets/{ChevronLeft-ByepaSoC.js → ChevronLeft-CsonlqWZ.js} +1 -1
  13. package/dist/assets/{ChevronRight-Cf_5Xzjf.js → ChevronRight-slnHJMMM.js} +1 -1
  14. package/dist/assets/{Clear-Ch6COz32.js → Clear-By_ldZfu.js} +1 -1
  15. package/dist/assets/{DeleteOutline-ebJSYeqv.js → DeleteOutline-C9MsS08w.js} +1 -1
  16. package/dist/assets/{Done--5OjVF1L.js → Done-D3SMiC_1.js} +1 -1
  17. package/dist/assets/{Edit-Dynoa_c5.js → Edit-C2kFF9YJ.js} +1 -1
  18. package/dist/assets/{ErrorOutline-Bre_iFld.js → ErrorOutline-5-zcM4Ne.js} +1 -1
  19. package/dist/assets/{FilterList-DA2GUvmN.js → FilterList-CjwH8Y-X.js} +1 -1
  20. package/dist/assets/{Google-DgctB8-z.js → Google-DafSaE2h.js} +1 -1
  21. package/dist/assets/{HelpOutline-ByUUQACF.js → HelpOutline-BJpW-l3r.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-BW2EjmL2.js → KeyboardArrowDown-TYg9Qprk.js} +1 -1
  23. package/dist/assets/{Launch-O8wdtoRZ.js → Launch-BkIcZSam.js} +1 -1
  24. package/dist/assets/{Link-C0DA-K7d.js → Link-FQWyZFOC.js} +1 -1
  25. package/dist/assets/{ListItemButton-Bi1hEGzW.js → ListItemButton-DvmajTMO.js} +1 -1
  26. package/dist/assets/{ListSubheader-EtXBMK8f.js → ListSubheader-CSUXgXE1.js} +1 -1
  27. package/dist/assets/{LoadingButton-CC22g72o.js → LoadingButton-DHcTITjP.js} +1 -1
  28. package/dist/assets/{MoreVert-DIAAjKU1.js → MoreVert-DuXHnJM1.js} +1 -1
  29. package/dist/assets/{OpenInNew-OpUheJsd.js → OpenInNew-D7AFQ7qH.js} +1 -1
  30. package/dist/assets/{Refresh-wGxvonur.js → Refresh-BLdRb4dq.js} +1 -1
  31. package/dist/assets/{Search-BcGKbDLr.js → Search-CIrZ9Ibh.js} +1 -1
  32. package/dist/assets/{Stepper-WKsCvhQB.js → Stepper-NFExDVoU.js} +1 -1
  33. package/dist/assets/{Switch-BhNob30A.js → Switch-CJHN4f7v.js} +1 -1
  34. package/dist/assets/{TableSearch-DsykJXmz.js → TableSearch-CXlvTHzu.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-BeovK254.js → ToggleButtonGroup-TztJlMu5.js} +1 -1
  36. package/dist/assets/{UnfoldMore-CQwxJsaq.js → UnfoldMore-D4wb4PiB.js} +1 -1
  37. package/dist/assets/{Verified-BBY_HS8b.js → Verified-BIJapS2b.js} +1 -1
  38. package/dist/assets/{VerifiedUser-CsU_SR-Q.js → VerifiedUser-Bo-g1veK.js} +1 -1
  39. package/dist/assets/{ViewList-C5VNy_3l.js → ViewList-CKT7zkn0.js} +1 -1
  40. package/dist/assets/{_createAggregator-E-d6FWvu.js → _createAggregator-xnpdRDuH.js} +1 -1
  41. package/dist/assets/{actions-CfPtVW_5.js → actions-B_In1OEq.js} +1 -1
  42. package/dist/assets/{actions-C85Hfsv7.js → actions-DBjGgaan.js} +1 -1
  43. package/dist/assets/{agreement-BOqKQigq.js → agreement-D9n4TVAm.js} +1 -1
  44. package/dist/assets/api-B50CzjXC.js +1 -0
  45. package/dist/assets/{appearance-CnOE1Lt3.js → appearance-Cme4Q5BD.js} +1 -1
  46. package/dist/assets/{audit-logs-C0TwpEZz.js → audit-logs-C6BCcfl1.js} +1 -1
  47. package/dist/assets/{base-chart-CNeCrWCe.js → base-chart-CUFc4seL.js} +1 -1
  48. package/dist/assets/{blocklet-DrlbndLu.js → blocklet-Co-qXCPC.js} +1 -1
  49. package/dist/assets/{chain-C07zUxjw.js → chain-BWj1yQol.js} +1 -1
  50. package/dist/assets/{click-to-copy-mgbEjAVp.js → click-to-copy-DlpsaegJ.js} +1 -1
  51. package/dist/assets/cloneDeep-DPJyiVhO.js +1 -0
  52. package/dist/assets/{collapse-DPhRCMT_.js → collapse-DOmRxR9w.js} +1 -1
  53. package/dist/assets/{config-navigation-C1AJjTTc.js → config-navigation-3XgnTvq_.js} +3 -3
  54. package/dist/assets/{connect-to-Bng6Y8sS.js → connect-to-Dm8w-7IQ.js} +1 -1
  55. package/dist/assets/{cssMode-DQGyC1Du.js → cssMode-BpJODsaG.js} +1 -1
  56. package/dist/assets/{delete-confirm-DLgDxKNU.js → delete-confirm-DbYfIB8I.js} +1 -1
  57. package/dist/assets/{depsEqual-46Dc4Ni4.js → depsEqual-BHfyIN1m.js} +1 -1
  58. package/dist/assets/{detail-BYCOVu21.js → detail-CDpzlMf3.js} +3 -3
  59. package/dist/assets/{domains-BjHKwYRN.js → domains-CnqIlWBr.js} +1 -1
  60. package/dist/assets/{download-BuSoh4PJ.js → download-BIwYEIAP.js} +1 -1
  61. package/dist/assets/{edit.svg-CCrzTWgj.js → edit.svg-Cy4wFBH9.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-CF7qzYNW.js +1 -0
  63. package/dist/assets/engine-B8GFtkk-.js +1 -0
  64. package/dist/assets/{freemarker2-D8jMF7WR.js → freemarker2-BbsoXP_B.js} +1 -1
  65. package/dist/assets/{get-safe-url-D4wQQAus.js → get-safe-url-14Q6Gfeh.js} +1 -1
  66. package/dist/assets/getValidReactChildren-5khuIcs7.js +1 -0
  67. package/dist/assets/{graphqlMode-gngK04Mz.js → graphqlMode-CzqA5BWs.js} +2 -2
  68. package/dist/assets/{handlebars-CMFIkxCR.js → handlebars-BI7IZI6m.js} +1 -1
  69. package/dist/assets/{html-BJoJrX2a.js → html-C4s2FhZC.js} +1 -1
  70. package/dist/assets/{html-title-CDtGVxaB.js → html-title-CH-hjuPz.js} +1 -1
  71. package/dist/assets/{htmlMode-f2GdVJG0.js → htmlMode-D65ghVka.js} +1 -1
  72. package/dist/assets/{iframe-n69t61B3.js → iframe-CyW0Gy1t.js} +1 -1
  73. package/dist/assets/{index-rdWEFiu5.js → index-55nfVIC0.js} +1 -1
  74. package/dist/assets/{index-TupnUKnA.js → index-B0p2z33B.js} +1 -1
  75. package/dist/assets/{index-ClArlBqp.js → index-B2m_raRS.js} +11 -11
  76. package/dist/assets/{index-CD97LOq3.js → index-B2poRPnp.js} +1 -1
  77. package/dist/assets/{index-qmua1knN.js → index-B5NwSFOK.js} +1 -1
  78. package/dist/assets/{index-CypY1XVU.js → index-B5iZbzm_.js} +9 -9
  79. package/dist/assets/{index-D901ppFO.js → index-BHkNOM9n.js} +1 -1
  80. package/dist/assets/{index-B_0Cq7vU.js → index-BPIqxC-U.js} +2 -2
  81. package/dist/assets/{index-HpSfOeJE.js → index-BVJHTf7X.js} +1 -1
  82. package/dist/assets/{index-DY4IRZzA.js → index-BZORkGy0.js} +2 -2
  83. package/dist/assets/{index-CWIZ2lDN.js → index-BZeOf_Tu.js} +1 -1
  84. package/dist/assets/{index-B8iCpTth.js → index-Bbu_zE3x.js} +1 -1
  85. package/dist/assets/{index-DItDGwwa.js → index-BfVOZvkh.js} +1 -1
  86. package/dist/assets/{index-Cbs-jLgW.js → index-BiQXR3Bm.js} +1 -1
  87. package/dist/assets/{index-CAgAgIsZ.js → index-BmA5kukS.js} +1 -1
  88. package/dist/assets/{index-Dy6LJdxo.js → index-BoA3EH-W.js} +1 -1
  89. package/dist/assets/{index-B6Q2auFe.js → index-BqPjiG1G.js} +8 -8
  90. package/dist/assets/{index-ChDDmSQi.js → index-Bu5d1noc.js} +1 -1
  91. package/dist/assets/{index-XHh_P_2P.js → index-CF3eNUVb.js} +1 -1
  92. package/dist/assets/{index-COOkU215.js → index-CMtLSLIZ.js} +1 -1
  93. package/dist/assets/{index-ocWe7l-X.js → index-CND60QrG.js} +1 -1
  94. package/dist/assets/{index-C4kPl4ke.js → index-CW-42AHU.js} +1 -1
  95. package/dist/assets/{index-CE7lTr2p.js → index-CbWepdE1.js} +1 -1
  96. package/dist/assets/{index-Bf_Lmy-N.js → index-CeKndEzp.js} +1 -1
  97. package/dist/assets/{index-F-kjFBf8.js → index-ChAuk3cl.js} +1 -1
  98. package/dist/assets/{index-CreKO5jV.js → index-CoLKcvy8.js} +1 -1
  99. package/dist/assets/{index-CMIUu1l6.js → index-CoTlorpu.js} +1 -1
  100. package/dist/assets/{index-DI_priH-.js → index-CqjR4hs8.js} +1 -1
  101. package/dist/assets/{index-D-dFB32M.js → index-CwApT1Sd.js} +3 -3
  102. package/dist/assets/{index-BNCPRSyc.js → index-D3hM989k.js} +3 -3
  103. package/dist/assets/{index-B2Wn3GKA.js → index-DFXhXlJk.js} +1 -1
  104. package/dist/assets/{index-rn280PvV.js → index-DScXR38D.js} +1 -1
  105. package/dist/assets/{index-DVercaqG.js → index-DWcU23-2.js} +1 -1
  106. package/dist/assets/{index-DGPreTV-.js → index-DYJtcdqz.js} +1 -1
  107. package/dist/assets/{index-alA_n9r0.js → index-DbucqiHf.js} +1 -1
  108. package/dist/assets/{index-Dvzf_pfH.js → index-DcCauHzD.js} +1 -1
  109. package/dist/assets/index-DmFddMrj.js +1 -0
  110. package/dist/assets/{index-CYKSh2bk.js → index-DmlhRLwb.js} +3 -3
  111. package/dist/assets/{index-Cwqr74ON.js → index-Dmnos1kX.js} +1 -1
  112. package/dist/assets/{index-CYGcc8pV.js → index-DqDJse_r.js} +1 -1
  113. package/dist/assets/{index-C18EUjkb.js → index-DvOpuwAA.js} +1 -1
  114. package/dist/assets/{index-CNTrtWQE.js → index-M2fo3HYF.js} +1 -1
  115. package/dist/assets/{index-C3qhc5Io.js → index-Qj6_gIRY.js} +1 -1
  116. package/dist/assets/{index-B8GICsl0.js → index-WZgGKPGR.js} +1 -1
  117. package/dist/assets/{index-BD8Pal3n.js → index-cF2S-dYj.js} +1 -1
  118. package/dist/assets/{index-BXUBcEWf.js → index-sLr5Ytxz.js} +3 -3
  119. package/dist/assets/{index.esm-CAXrUMkM.js → index.esm-DQbImx_I.js} +1 -1
  120. package/dist/assets/{install-from-url-Wdi4EG68.js → install-from-url-J2LtUMoq.js} +1 -1
  121. package/dist/assets/{invitation-nrKDA1Kn.js → invitation-Y_KT9tdR.js} +1 -1
  122. package/dist/assets/{is-path-prefix-equal-CYEkz2os.js → is-path-prefix-equal-R8kSgKPg.js} +1 -1
  123. package/dist/assets/{item-CqSM8aGX.js → item-BLPIRYzp.js} +1 -1
  124. package/dist/assets/{javascript-B6yQKjiF.js → javascript-CVc_Qgjn.js} +1 -1
  125. package/dist/assets/{jsonMode-DkoM9aoY.js → jsonMode-DgyIRwXr.js} +1 -1
  126. package/dist/assets/{liquid-D7xIqXac.js → liquid-D65B7N7C.js} +1 -1
  127. package/dist/assets/{list-header-BWEUzaBX.js → list-header-DnI-B5kv.js} +1 -1
  128. package/dist/assets/{lock.svg-BSFciPfs.js → lock.svg-hi5yMnJ1.js} +1 -1
  129. package/dist/assets/{log-CdkXyW5t.js → log-B7iwZqYi.js} +1 -1
  130. package/dist/assets/{lottie-react.esm-RgV5Mvhb.js → lottie-react.esm-DNVXvBzr.js} +1 -1
  131. package/dist/assets/{mdx-Ddv0C9rb.js → mdx-BxX4PI2U.js} +1 -1
  132. package/dist/assets/{memory-dEa_r_d8.js → memory-vDDFn9lp.js} +1 -1
  133. package/dist/assets/{metric-Cat2Yufj.js → metric-DQy5zRdQ.js} +1 -1
  134. package/dist/assets/omit-CyaEv8Dl.js +1 -0
  135. package/dist/assets/{overview-DEC4e0Df.js → overview-p214oVcV.js} +1 -1
  136. package/dist/assets/{permission-C1lOJdTa.js → permission-DHM_Uhje.js} +1 -1
  137. package/dist/assets/{preference-BHwgiNrV.js → preference-CnzOTj3F.js} +3 -3
  138. package/dist/assets/{python-9TSgWHrh.js → python-CxsGjqcE.js} +1 -1
  139. package/dist/assets/{raf-schd.esm-CnfzVLep.js → raf-schd.esm-5K54oGhm.js} +1 -1
  140. package/dist/assets/{razor-QGFiiIP_.js → razor-DyGdbkd6.js} +1 -1
  141. package/dist/assets/{rotate-session-key-ICcx3tCe.js → rotate-session-key-D0cclybl.js} +1 -1
  142. package/dist/assets/{runtime-CvzCs6VN.js → runtime-CA_vnels.js} +1 -1
  143. package/dist/assets/schema-B-ts56Ax.js +1 -0
  144. package/dist/assets/sdk-Gp4bri9Y.js +1 -0
  145. package/dist/assets/{service-DSCUseEH.js → service-DA_A2jR4.js} +1 -1
  146. package/dist/assets/{shorten-label-BguF3cwJ.js → shorten-label-DhnoyJGB.js} +1 -1
  147. package/dist/assets/{simple-select-CBZtGNFi.js → simple-select-ooXqK-jE.js} +1 -1
  148. package/dist/assets/{spaces-DWWw-hnQ.js → spaces-pOZOSMK4.js} +1 -1
  149. package/dist/assets/{status-BiPp7u_X.js → status-BzJsqaQ5.js} +1 -1
  150. package/dist/assets/{status-DA56DtZT.js → status-CUv1Zltf.js} +1 -1
  151. package/dist/assets/{switch-control-33eNnRFB.js → switch-control-CGJvFC5A.js} +1 -1
  152. package/dist/assets/{table-icons-Cx2WnWde.js → table-icons-CwKGpe-L.js} +1 -1
  153. package/dist/assets/{team-Bv3LojgN.js → team-Dmx94iJo.js} +1 -1
  154. package/dist/assets/{toLower-uukMw69d.js → toLower-CFmpAjUt.js} +1 -1
  155. package/dist/assets/toUpper-BejUmrup.js +1 -0
  156. package/dist/assets/{traffic-QPS_JGtF.js → traffic-C0kPrhjJ.js} +1 -1
  157. package/dist/assets/{tsMode-CihLBg_5.js → tsMode-jZmbwl1N.js} +1 -1
  158. package/dist/assets/{typescript-CejJAf0y.js → typescript-dLvCYGkn.js} +1 -1
  159. package/dist/assets/{url-evaluation-mbcZFwZv.js → url-evaluation-CwmddBcY.js} +1 -1
  160. package/dist/assets/{url-join-CWTNXc5s.js → url-join-Dsyhdnws.js} +1 -1
  161. package/dist/assets/{use-mobile-v1FgCHxE.js → use-mobile-1I4QCh-N.js} +1 -1
  162. package/dist/assets/{use-mobile-DgLeM-D1.js → use-mobile-DqN9gudu.js} +1 -1
  163. package/dist/assets/{useAsync-qB657l8w.js → useAsync-CQunl03f.js} +1 -1
  164. package/dist/assets/{useAsyncRetry-BM67-AEe.js → useAsyncRetry-CjGr0FZe.js} +1 -1
  165. package/dist/assets/{useLocalStorage-X_cL3pYP.js → useLocalStorage-B6bhow_S.js} +1 -1
  166. package/dist/assets/{useThemeProps-BS8q21Ze.js → useThemeProps-DRCiWG5p.js} +1 -1
  167. package/dist/assets/{util-GsRauHGT.js → util-CJB4l2qD.js} +1 -1
  168. package/dist/assets/{wait-container-B_Dc4NpO.js → wait-container-Do1jfS7d.js} +1 -1
  169. package/dist/assets/{without-wallet-i0gb4gDU.js → without-wallet-BR6Y7zpF.js} +1 -1
  170. package/dist/assets/wrap-locale-CJqYMDgp.js +1 -0
  171. package/dist/assets/{xml-CXKq8G6H.js → xml-CgXlUmBT.js} +1 -1
  172. package/dist/assets/{yaml-DCnIpBTS.js → yaml-Bb8HrmNf.js} +1 -1
  173. package/dist/index.html +1 -1
  174. package/dist/service-worker.js +1 -1
  175. package/package.json +1 -1
  176. package/dist/assets/ArrowDropDown-Dt1OnkjV.js +0 -1
  177. package/dist/assets/api-1_6mJDDc.js +0 -1
  178. package/dist/assets/cloneDeep-iGPmlcW1.js +0 -1
  179. package/dist/assets/emotion-cache.browser.esm-Do6mSgYp.js +0 -1
  180. package/dist/assets/engine-BomELkty.js +0 -1
  181. package/dist/assets/getValidReactChildren-C1VhNdur.js +0 -1
  182. package/dist/assets/index-DYf0NUXR.js +0 -1
  183. package/dist/assets/omit-CfNSSESR.js +0 -1
  184. package/dist/assets/schema-hfM92ahP.js +0 -1
  185. package/dist/assets/sdk-TMvcAePy.js +0 -1
  186. package/dist/assets/toUpper-CEwZrf0n.js +0 -1
  187. package/dist/assets/wrap-locale-LMhScF83.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CWIZ2lDN.js","./index-BojVbZw0.js","./index-C4kPl4ke.js","./metric-Cat2Yufj.js","./click-to-copy-mgbEjAVp.js","./index-CD97LOq3.js","./useLocalStorage-X_cL3pYP.js","./ErrorOutline-Bre_iFld.js","./index-D901ppFO.js","./FilterList-DA2GUvmN.js","./CSSTransition-Cj0uEEEn.js","./emotion-cache.browser.esm-Do6mSgYp.js","./index-C18EUjkb.js","./redux-DfszZyTl.js","./typeof-QjJsDpFa.js","./depsEqual-46Dc4Ni4.js","./index-C3qhc5Io.js","./TableSearch-DsykJXmz.js","./Search-BcGKbDLr.js","./Clear-Ch6COz32.js","./MoreVert-DIAAjKU1.js","./status-DA56DtZT.js","./actions-C85Hfsv7.js","./url-evaluation-mbcZFwZv.js","./get-safe-url-D4wQQAus.js","./ButtonGroup-BtGO-VCX.js","./getValidReactChildren-C1VhNdur.js","./permission-C1lOJdTa.js","./install-from-url-Wdi4EG68.js","./without-wallet-i0gb4gDU.js","./index-HpSfOeJE.js","./cloneDeep-iGPmlcW1.js","./Autocomplete-YxXH99vB.js","./ListSubheader-EtXBMK8f.js","./ListItemButton-Bi1hEGzW.js","./Stepper-WKsCvhQB.js","./Launch-O8wdtoRZ.js","./Add-BuqBIDFA.js","./index-CYGcc8pV.js","./schema-hfM92ahP.js","./index-B2Wn3GKA.js","./toLower-uukMw69d.js","./index-ocWe7l-X.js","./url-join-CWTNXc5s.js","./wait-container-B_Dc4NpO.js","./use-mobile-v1FgCHxE.js","./DeleteOutline-ebJSYeqv.js","./spaces-DWWw-hnQ.js","./api-1_6mJDDc.js","./index-B8iCpTth.js","./item-CqSM8aGX.js","./index-rdWEFiu5.js","./KeyboardArrowDown-BW2EjmL2.js","./ChevronLeft-ByepaSoC.js","./ChevronRight-Cf_5Xzjf.js","./blocklet-DrlbndLu.js","./Verified-BBY_HS8b.js","./VerifiedUser-CsU_SR-Q.js","./Done--5OjVF1L.js","./delete-confirm-DLgDxKNU.js","./item-G0iZE90Q.css","./engine-BomELkty.js","./ArrowDropDown-Dt1OnkjV.js","./Breadcrumbs-DngVGj6f.js","./index-ClArlBqp.js","./html-title-CDtGVxaB.js","./index.esm-CAXrUMkM.js","./switch-control-33eNnRFB.js","./Switch-BhNob30A.js","./Link-C0DA-K7d.js","./actions-CfPtVW_5.js","./logo-BKA11TRi.js","./Refresh-wGxvonur.js","./LoadingButton-CC22g72o.js","./rotate-session-key-ICcx3tCe.js","./visuallyHidden-Dan1xhjv.js","./is-path-prefix-equal-CYEkz2os.js","./Edit-Dynoa_c5.js","./CallMerge-C4Y56e44.js","./CardContent-DIS6zA0P.js","./index-DGPreTV-.js","./download-BuSoh4PJ.js","./index-B6Q2auFe.js","./audit-logs-C0TwpEZz.js","./index-F-kjFBf8.js","./decode-DPztD6kB.js","./index-gnjjKJuC.css","./UnfoldMore-CQwxJsaq.js","./shorten-label-BguF3cwJ.js","./team-Bv3LojgN.js","./index-qmua1knN.js","./ViewList-C5VNy_3l.js","./Google-DgctB8-z.js","./AdapterDayjs-CBmYJq_c.js","./useThemeProps-BS8q21Ze.js","./index-CNTrtWQE.js","./sdk-TMvcAePy.js","./ua-parser-DP5omx3I.js","./index-CE7lTr2p.js","./edit.svg-CCrzTWgj.js","./list-header-BWEUzaBX.js","./chain-C07zUxjw.js","./ToggleButtonGroup-BeovK254.js","./lock.svg-BSFciPfs.js","./useAsyncRetry-BM67-AEe.js","./useAsync-qB657l8w.js","./index-ZgkIHsf0.css","./detail-BYCOVu21.js","./index-alA_n9r0.js","./index-rn280PvV.js","./invitation-nrKDA1Kn.js","./wrap-locale-LMhScF83.js","./index-DItDGwwa.js","./index-BNCPRSyc.js","./index-Cbs-jLgW.js","./index-XHh_P_2P.js","./agreement-BOqKQigq.js","./index-Cwqr74ON.js","./index-Bf_Lmy-N.js","./index-TupnUKnA.js","./traffic-QPS_JGtF.js","./iframe-n69t61B3.js","./index-DBii9-f-.js","./base-chart-CNeCrWCe.js","./index-DVercaqG.js","./index-DRYJ0xIl.js","./memory-dEa_r_d8.js","./index-CAgAgIsZ.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BZeOf_Tu.js","./index-BojVbZw0.js","./index-CW-42AHU.js","./metric-DQy5zRdQ.js","./click-to-copy-DlpsaegJ.js","./index-B2poRPnp.js","./useLocalStorage-B6bhow_S.js","./ErrorOutline-5-zcM4Ne.js","./index-BHkNOM9n.js","./FilterList-CjwH8Y-X.js","./CSSTransition-5vBScTx4.js","./emotion-cache.browser.esm-CF7qzYNW.js","./index-DvOpuwAA.js","./redux-DfszZyTl.js","./typeof-QjJsDpFa.js","./depsEqual-BHfyIN1m.js","./index-Qj6_gIRY.js","./TableSearch-CXlvTHzu.js","./Search-CIrZ9Ibh.js","./Clear-By_ldZfu.js","./MoreVert-DuXHnJM1.js","./status-CUv1Zltf.js","./actions-DBjGgaan.js","./url-evaluation-CwmddBcY.js","./get-safe-url-14Q6Gfeh.js","./ButtonGroup-uhq9NqjP.js","./getValidReactChildren-5khuIcs7.js","./permission-DHM_Uhje.js","./install-from-url-J2LtUMoq.js","./without-wallet-BR6Y7zpF.js","./index-BVJHTf7X.js","./cloneDeep-DPJyiVhO.js","./Autocomplete-C6KZatsu.js","./ListSubheader-CSUXgXE1.js","./ListItemButton-DvmajTMO.js","./Stepper-NFExDVoU.js","./Launch-BkIcZSam.js","./Add-CwJyd37s.js","./index-DqDJse_r.js","./schema-B-ts56Ax.js","./index-DFXhXlJk.js","./toLower-CFmpAjUt.js","./index-CND60QrG.js","./url-join-Dsyhdnws.js","./wait-container-Do1jfS7d.js","./use-mobile-1I4QCh-N.js","./DeleteOutline-C9MsS08w.js","./spaces-pOZOSMK4.js","./api-B50CzjXC.js","./index-Bbu_zE3x.js","./item-BLPIRYzp.js","./index-55nfVIC0.js","./KeyboardArrowDown-TYg9Qprk.js","./ChevronLeft-CsonlqWZ.js","./ChevronRight-slnHJMMM.js","./blocklet-Co-qXCPC.js","./Verified-BIJapS2b.js","./VerifiedUser-Bo-g1veK.js","./Done-D3SMiC_1.js","./delete-confirm-DbYfIB8I.js","./item-G0iZE90Q.css","./engine-B8GFtkk-.js","./ArrowDropDown-BoUU1BUL.js","./Breadcrumbs-Bj53u8dH.js","./index-B2m_raRS.js","./html-title-CH-hjuPz.js","./index.esm-DQbImx_I.js","./switch-control-CGJvFC5A.js","./Switch-CJHN4f7v.js","./Link-FQWyZFOC.js","./actions-B_In1OEq.js","./logo-BKA11TRi.js","./Refresh-BLdRb4dq.js","./LoadingButton-DHcTITjP.js","./rotate-session-key-D0cclybl.js","./visuallyHidden-Dan1xhjv.js","./is-path-prefix-equal-R8kSgKPg.js","./Edit-C2kFF9YJ.js","./CallMerge-Div7wiLM.js","./CardContent-BpUbXRgZ.js","./index-DYJtcdqz.js","./download-BIwYEIAP.js","./index-BqPjiG1G.js","./audit-logs-C6BCcfl1.js","./index-ChAuk3cl.js","./decode-DPztD6kB.js","./index-gnjjKJuC.css","./UnfoldMore-D4wb4PiB.js","./shorten-label-DhnoyJGB.js","./team-Dmx94iJo.js","./index-B5NwSFOK.js","./ViewList-CKT7zkn0.js","./Google-DafSaE2h.js","./AdapterDayjs-Dcg6AE_r.js","./useThemeProps-DRCiWG5p.js","./index-M2fo3HYF.js","./sdk-Gp4bri9Y.js","./ua-parser-DP5omx3I.js","./index-CbWepdE1.js","./edit.svg-Cy4wFBH9.js","./list-header-DnI-B5kv.js","./chain-BWj1yQol.js","./ToggleButtonGroup-TztJlMu5.js","./lock.svg-hi5yMnJ1.js","./useAsyncRetry-CjGr0FZe.js","./useAsync-CQunl03f.js","./index-ZgkIHsf0.css","./detail-CDpzlMf3.js","./index-DbucqiHf.js","./index-DScXR38D.js","./invitation-Y_KT9tdR.js","./wrap-locale-CJqYMDgp.js","./index-BfVOZvkh.js","./index-D3hM989k.js","./index-BiQXR3Bm.js","./index-CF3eNUVb.js","./agreement-D9n4TVAm.js","./index-Dmnos1kX.js","./index-CeKndEzp.js","./index-B0p2z33B.js","./traffic-C0kPrhjJ.js","./iframe-CyW0Gy1t.js","./index-DBii9-f-.js","./base-chart-CUFc4seL.js","./index-DWcU23-2.js","./index-DRYJ0xIl.js","./memory-vDDFn9lp.js","./index-BmA5kukS.js"])))=>i.map(i=>d[i]);
2
2
  function _mergeNamespaces(De,Me){for(var He=0;He<Me.length;He++){const Ge=Me[He];if(typeof Ge!="string"&&!Array.isArray(Ge)){for(const Je in Ge)if(Je!=="default"&&!(Je in De)){const Ye=Object.getOwnPropertyDescriptor(Ge,Je);Ye&&Object.defineProperty(De,Je,Ye.get?Ye:{enumerable:!0,get:()=>Ge[Je]})}}}return Object.freeze(Object.defineProperty(De,Symbol.toStringTag,{value:"Module"}))}(function(){const Me=document.createElement("link").relList;if(Me&&Me.supports&&Me.supports("modulepreload"))return;for(const Je of document.querySelectorAll('link[rel="modulepreload"]'))Ge(Je);new MutationObserver(Je=>{for(const Ye of Je)if(Ye.type==="childList")for(const Ze of Ye.addedNodes)Ze.tagName==="LINK"&&Ze.rel==="modulepreload"&&Ge(Ze)}).observe(document,{childList:!0,subtree:!0});function He(Je){const Ye={};return Je.integrity&&(Ye.integrity=Je.integrity),Je.referrerPolicy&&(Ye.referrerPolicy=Je.referrerPolicy),Je.crossOrigin==="use-credentials"?Ye.credentials="include":Je.crossOrigin==="anonymous"?Ye.credentials="omit":Ye.credentials="same-origin",Ye}function Ge(Je){if(Je.ep)return;Je.ep=!0;const Ye=He(Je);fetch(Je.href,Ye)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(De){return De&&De.__esModule&&Object.prototype.hasOwnProperty.call(De,"default")?De.default:De}function getAugmentedNamespace(De){if(Object.prototype.hasOwnProperty.call(De,"__esModule"))return De;var Me=De.default;if(typeof Me=="function"){var He=function Ge(){var Je=!1;try{Je=this instanceof Ge}catch{}return Je?Reflect.construct(Me,arguments,this.constructor):Me.apply(this,arguments)};He.prototype=Me.prototype}else He={};return Object.defineProperty(He,"__esModule",{value:!0}),Object.keys(De).forEach(function(Ge){var Je=Object.getOwnPropertyDescriptor(De,Ge);Object.defineProperty(He,Ge,Je.get?Je:{enumerable:!0,get:function(){return De[Ge]}})}),He}var jsxRuntime={exports:{}},reactJsxRuntime_production={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -2900,4 +2900,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2900
2900
  padding-top: 16px;
2901
2901
  ${De=>De.scrollable?"":"overflow: hidden"};
2902
2902
  }
2903
- `;function GlobalSubscriber(){const{t:De}=V$2(),{session:Me}=useSessionContext$1(),{info:He,refresh:Ge}=useNodeContext();return useSubscription(constantExports.TeamEvents.userUpdated,({teamDid:Je,user:Ye})=>{Je===He.did&&Ye&&!Ye.approved&&Me&&Me.user&&Me.user.did===Ye.did&&(H$7.warning(De("session.blockAccess"),{autoHideDuration:10*1e3}),Me.logout())}),useSubscription(constantExports$1.EVENTS.NOTIFICATION_CREATE,Je=>{Je.entityType==="node"&&Ge({silent:!0})}),useSubscription(constantExports$1.EVENTS.NODE_UPDATED,()=>{Ge({silent:!0})}),null}const authorize=({user:De,launchType:Me,nftId:He})=>{if(!De)return!1;if(Me==="serverless"){if(!He)throw new Error("nftId is required");return De?.controller?.nftId===He}return(De.permissions||[]).includes("mutate_blocklets")},isServerlessBlockletInstalled=De=>De.isGetBlocklet&&De.runtimeBlocklet?.controller?.consumedAt,getRestoredAccessUrl=async De=>{const Me=getBlockletUrls({blocklet:De});let He="";return He=Me.find(Ge=>{try{const{hostname:Je}=new URL(Ge);return urlEvaluationExports.isSlpDomain(Je)}catch(Je){return console.error(Je),!1}}),He||(He=await getAccessibleUrl(Me)),He},LaunchBlockletContext=reactExports.createContext({}),{Provider:Provider$1,Consumer:Consumer$1}=LaunchBlockletContext;function LaunchBlockletProvider({children:De}){const{session:Me}=useSessionContext$1(),{t:He}=V$2(),{api:Ge,info:Je}=useNodeContext(),[Ye]=useSearchParams(),Ze=Ye.get("launchType"),et=Ye.get("fromLauncher"),Qe=Ye.get("blocklet_meta_url")||"",nt=Ye.get("nftId")||"",tt=Ye.get("from")||"",rt=Ye.get("launcherSessionId")||"",ot=Ye.get("launcherUrl")||"",at=tt==="url",st=tt==="empty",ut=at||st?"":new URL(Qe).origin,[dt,ct]=reactExports.useState({meta:null,appDid:Ye.get("appDid")||null,sessionId:Ye.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),ft=(mt,bt)=>ct(Et=>({...Et,appDid:mt,sessionId:bt})),ht=authorize({user:Me.user,launchType:Ze,nftId:nt}),[yt,gt]=reactExports.useState(null),[Ct,At]=reactExports.useState(!0),_t=reactExports.useMemo(()=>Je?getServerUrl(Je):"",[Je]),Pt=async mt=>{if(!mt)throw new Error("appDid should not be empty");const{blocklet:bt}=await Ge.getBlocklet({input:{did:mt,attachConfig:!1}});if(!bt)return null;const Et=constantExports.BlockletStatus[bt.status],Tt=!!nt,St=Et<constantExports.BlockletStatus.installed,Rt=Et===constantExports.BlockletStatus.installed,kt=Et===constantExports.BlockletStatus.running;return ct(wt=>({...wt,isInstalled:Rt,isRunning:kt,isExternal:Tt,isInstalling:St})),{isInstalled:Rt,isRunning:kt,isExternal:Tt,isInstalling:St}},Lt=async()=>{if(At(!0),st){ct(mt=>({...mt,meta:{title:Ye.get("title")||"",description:Ye.get("description")||""}})),At(!1);return}try{if(!Qe&&!st)throw new Error(He("common.invalidParam"));const[{meta:mt,isFree:bt,registryUrl:Et},{launcherSession:Tt,error:St}]=await Promise.all([Ge.getBlockletMetaFromUrl({input:{url:Qe,checkPrice:!0}}),rt?Ge.getLauncherSession({input:{launcherSessionId:rt,launcherUrl:ot}}):Promise.resolve({})]);if(rt&&!Tt)throw new Error(`Launch session invalid: ${St}`);if(!mt)throw new Error(He("LaunchBlockletBlocklet.error.loadMetaFailed"));let Rt={};ht&&dt.appDid&&(Rt=await Pt(dt.appDid)),ct(kt=>({...kt,...Rt,meta:mt,isFree:bt,registryUrl:Et,launcherSession:Tt}))}catch(mt){console.error(mt),gt(mt.message)}finally{At(!1)}};reactExports.useEffect(()=>{Me?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&Me?.user?.controller?.nftId!==nt&&Me.logout(),Lt()},[]),reactExports.useEffect(()=>{Ct||!dt.meta||(ht?dt.appDid&&Pt(dt.appDid).catch(mt=>{H$7.error(mt.message)}):(ct(mt=>({...mt,isInstalled:!1,isRunning:!1,isExternal:!1})),gt(null)))},[ht]);const Dt={meta:dt.meta,isFree:dt.isFree,appDid:dt.appDid,sessionId:dt.sessionId,isInstalling:dt.isInstalling,isInstalled:dt.isInstalled,isExternal:dt.isExternal,isRunning:dt.isRunning,serverUrl:_t,storeUrl:dt.registryUrl||ut,blockletMetaUrl:Qe,fromLauncher:et,loading:Ct,error:yt,api:Ge,getBlocklet:Pt,setAppDid:ft,launcherUrl:ot,launcherSession:dt.launcherSession,launcherSessionId:rt,launchType:Ze};return jsxRuntimeExports.jsx(Provider$1,{value:Dt,children:De})}function useLaunchBlockletContext(){return reactExports.useContext(LaunchBlockletContext)}var useAsyncExports=requireUseAsync();const useAsync=getDefaultExportFromCjs$1(useAsyncExports);function useQuery(){return new URLSearchParams(useLocation().search)}const BlockletAppContext=reactExports.createContext(),{Provider,Consumer}=BlockletAppContext;function BlockletAppProvider({children:De}){const He=useQuery().get("blocklet_meta_url"),Ge=useAsync(async()=>{const{data:Ye}=await axios.get(He);return Ye});if(Ge.loading)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const Je={meta:Ge.value,error:Ge.error};return jsxRuntimeExports.jsx(Provider,{value:Je,children:De})}BlockletAppProvider.propTypes={children:o$h.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-CWIZ2lDN.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-CD97LOq3.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,2,32,33,34,35,36,37,38,39]),import.meta.url)),BlockletRestore=reactExports.lazy(()=>__vitePreload(()=>import("./index-B2Wn3GKA.js"),__vite__mapDeps([40,41,42,43,44,45,24,6,36,46,47,48,20,16]),import.meta.url)),BlockletStore=reactExports.lazy(()=>__vitePreload(()=>import("./index-B8iCpTth.js"),__vite__mapDeps([49,6,50,51,52,53,54,18,16,55,32,33,56,57,37,36,58,46,59,4,20,24,25,26,60,61,27,62,63]),import.meta.url)),Settings=reactExports.lazy(()=>__vitePreload(()=>import("./index-ClArlBqp.js"),__vite__mapDeps([64,65,62,66,67,68,27,8,9,10,11,12,13,14,15,16,17,18,19,20,69,70,23,59,4,2,71,6,72,73,74,75,37,21,76,54,77,78,79]),import.meta.url)),LogPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-DGPreTV-.js"),__vite__mapDeps([80,81,25,26,6]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-B6Q2auFe.js"),__vite__mapDeps([82,65,83,16,17,18,19,6,84,85,86,87,88,89,55,23,90,37,91,8,9,10,11,12,13,14,15,20,38,25,26,66,92,31,32,33,27,4,93,94,75,2,56,46,7,95,96,51,45,70,97,98,99,100,101,102,103,72,77,1,59,104,105,106]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-BYCOVu21.js"),__vite__mapDeps([107,65,21,22,6,20,23,24,25,26,27,55,108,89,63]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-COOkU215.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-Dvzf_pfH.js"),[],import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-rn280PvV.js"),__vite__mapDeps([109,110,108,95,11,96,111,112,24]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-BNCPRSyc.js"),__vite__mapDeps([113,91,58,95,11,111,112,24,35]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-Cbs-jLgW.js"),__vite__mapDeps([114,111,112,24]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-XHh_P_2P.js"),__vite__mapDeps([115,42,43,44,45,104,105,116,84,85,86,24,29,30,48,39,6,71,61]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-Cwqr74ON.js"),__vite__mapDeps([117,108]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-Bf_Lmy-N.js"),__vite__mapDeps([118,110,108,95,11,96,111,112]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-B_0Cq7vU.js"),[],import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-TupnUKnA.js"),__vite__mapDeps([119,65,120,121,53,54,122,14,123,124,93,94,10,75,8,9,11,12,13,15,16,17,18,19,20,125,126,79,6,102,26]),import.meta.url)),GenKeyPair=reactExports.lazy(()=>__vitePreload(()=>import("./index-CAgAgIsZ.js"),__vite__mapDeps([127,108]),import.meta.url));function useSharedContext(){const De=useNodeContext(),{session:Me}=useSessionContext$1(),{wallet:He}=d$d(),Ge=Me.user&&Me.user.did;return reactExports.useEffect(()=>{const Je=getWsClient();return Ge?Je.connect():Je.isConnected()&&Je.disconnect(),()=>{Je.isConnected()&&Je.disconnect()}},[Ge]),reactExports.useEffect(()=>{if(He)return()=>{};const Je=()=>{document.visibilityState==="visible"&&Me.refresh()};return document.addEventListener("visibilitychange",Je),()=>{document.removeEventListener("visibilitychange",Je)}},[]),{node:De,session:Me}}function ProtectedApp(){const{t:De}=V$2(),{node:Me,session:He}=useSharedContext(),Ge=useLocation();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${Ge.pathname}${Ge.search}`)},[Ge]),reactExports.useEffect(()=>{He?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&He.logout()},[He?.user?.role]);const Je=jsxRuntimeExports.jsx(CircularProgress,{});if(Me.loading||He.loading)return jsxRuntimeExports.jsx(o$f,{children:Je});if(!Me.info.initialized)return getAuthMethodExports.getServerAuthMethod(Me.info)==="nft"?jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"verify-owner"}):jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(NodeConnectOwner,{})});if(Me.info.upgradeSessionId)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})});if(!He.user)return jsxRuntimeExports.jsx(NodeLogin,{loadingEle:Je});const Ye=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(BlockletsProvider,{children:jsxRuntimeExports.jsxs(NotificationProvider,{children:[jsxRuntimeExports.jsx(Health,{}),jsxRuntimeExports.jsx(CheckNodeStatus,{}),jsxRuntimeExports.jsx(GlobalSubscriber,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:Ye,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/dashboard",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.blocklets"),children:jsxRuntimeExports.jsx(BlockletList,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/:did/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Blocklets",children:jsxRuntimeExports.jsx(BlockletDetail,{})})}),jsxRuntimeExports.jsx(Route,{path:"/settings/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.setting"),children:jsxRuntimeExports.jsx(Settings,{})})}),jsxRuntimeExports.jsx(Route,{path:"/eula",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("setup.steps.eula"),children:jsxRuntimeExports.jsx(EULAPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/store",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.store"),children:jsxRuntimeExports.jsx(BlockletStore,{})})}),jsxRuntimeExports.jsx(Route,{path:"/console",element:jsxRuntimeExports.jsx(DashboardRoute,{title:`GraphQL ${De("common.console")}`,scrollable:!1,fullWidth:!0,children:jsxRuntimeExports.jsx(Console,{})})}),jsxRuntimeExports.jsx(Route,{path:"/notifications",element:jsxRuntimeExports.jsx(DashboardRoute,{title:De("notification.title"),children:jsxRuntimeExports.jsx(Notifications,{})})}),jsxRuntimeExports.jsx(Route,{path:"/team/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.team"),children:jsxRuntimeExports.jsx(TeamPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/logs/:name?",element:jsxRuntimeExports.jsx(DashboardRoute,{scrollable:!1,fullWidth:!0,title:De("common.logs"),children:jsxRuntimeExports.jsx(LogPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/analytics/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.analytics"),children:jsxRuntimeExports.jsx(AnalyticsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(Navigate,{to:"/dashboard",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/team",element:jsxRuntimeExports.jsx(Navigate,{to:"/team/members",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/analytics",element:jsxRuntimeExports.jsx(Navigate,{to:"/analytics/traffic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/router",element:jsxRuntimeExports.jsx(Navigate,{to:"/router/rules",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/settings",element:jsxRuntimeExports.jsx(Navigate,{to:"/settings/basic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace",element:jsxRuntimeExports.jsx(Navigate,{to:"/store",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace/:did",element:jsxRuntimeExports.jsx(Navigate,{to:"/store/:did",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})]})})}function UnprotectedWrapper({children:De}){const{node:Me,session:He}=useSharedContext();return Me.loading||!He.initialized&&He.loading?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):Me.info.upgradeSessionId?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})}):De}function App(){const{changeLocale:De}=V$2(),Me=useQuery();reactExports.useEffect(()=>{const Ge=Me.get("locale");Ge&&["zh","en"].includes(Ge)&&De(Ge)},[]);const He=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:He,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(IssuePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LostPassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(ExchangePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:"/accept-server",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"accept-server"})})}),jsxRuntimeExports.jsx(Route,{path:"/gen-key-pair/",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(GenKeyPair,{})})}),jsxRuntimeExports.jsx(Route,{path:"/launch-blocklet/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LaunchBlockletProvider,{children:jsxRuntimeExports.jsx(BlockletLauncher,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/restore/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(BlockletAppProvider,{children:jsxRuntimeExports.jsx(BlockletRestore,{})})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(Invite,{})})}),jsxRuntimeExports.jsx(Route,{path:"/*",element:jsxRuntimeExports.jsx(ProtectedApp,{})})]})})}function AppWrapper(){const De=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return jsxRuntimeExports.jsx(BrowserRouter,{history:history$1,basename:De,children:jsxRuntimeExports.jsx(Root,{children:jsxRuntimeExports.jsx(App,{})})})}const root=clientExports.createRoot(document.getElementById("root"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";register(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:prefix},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(De){console.error("Error during service worker registration:",De)}});export{$$4 as $,useNavigate as A,useSearchParams as B,CircularProgress as C,DialogContentText as D,useMediaQuery as E,libExports$3 as F,Grid$1 as G,H$7 as H,Link$1 as I,BlockletAppAvatar as J,Box as K,Link as L,isEmpty as M,oe as N,Tooltip as O,FormControl as P,InputLabel as Q,MenuItem as R,Select as S,Typography as T,Checkbox as U,V$2 as V,WrappedDidAddress as W,Alert as X,formatError as Y,o$f as Z,CheckIcon$2 as _,useSubscription as a,urlPathFriendlyExports as a$,propTypesExports as a0,api as a1,merge as a2,cloneDeep as a3,IconButton as a4,R$3 as a5,ListItemSecondaryAction as a6,List as a7,ListItem as a8,ListItemText as a9,ErrorBoundary as aA,k$1 as aB,formatRegistryLogoPath as aC,Icon as aD,ListItemIcon as aE,createSvgIcon as aF,ensureDomainAliases as aG,constantExports$1 as aH,normalizePathPrefix as aI,sortBy as aJ,getIp as aK,stringSortHandlerAsc as aL,getAccessUrl as aM,history$1 as aN,semver as aO,useReactive as aP,useAsyncEffect as aQ,InfoOutlinedIcon as aR,sleep as aS,useMemoizedFn as aT,checkInputByType as aU,FormControlLabel as aV,Stack$1 as aW,useAsync as aX,axios as aY,shouldCheckDomainStatus as aZ,formatMountPoint as a_,getServerUrl as aa,useBlockletAppContext as ab,getAuthMethodExports as ac,ConfirmDialog as ad,getRestoredAccessUrl as ae,setSessionToken as af,isEqual as ag,isServerlessBlockletInstalled as ah,Debug as ai,getWsClient as aj,useQuery as ak,getPathPrefix as al,Global as am,Routes as an,Route as ao,Navigate as ap,HeaderAddon as aq,SessionContext as ar,css as as,$$5 as at,formatToDatetime as au,alpha$1 as av,getLaunchAgreementUrl as aw,axios$2 as ax,useSessionContext$1 as ay,getBlockletMetaUrl as az,constantExports as b,emphasize as b$,Menu as b0,checkIsWildcardDomain as b1,Popover as b2,Card as b3,formatToDate as b4,sortDomains as b5,C$9 as b6,Collapse as b7,CheckCircle as b8,styled as b9,f$7 as bA,Button as bB,createPassportSvg as bC,getWalletType as bD,useCreation as bE,BlockletAdminRoles as bF,isInstalling as bG,Badge as bH,createAppPassportSvg as bI,NavLink as bJ,__vitePreload as bK,SetCache as bL,arrayIncludes$1 as bM,arrayIncludesWith as bN,cacheHas as bO,baseUniq as bP,baseFlatten as bQ,baseRest as bR,last as bS,arrayFilter as bT,isArrayLikeObject as bU,t$a as bV,isDownloading as bW,getBlockletUrl as bX,getBlockletUrlParams as bY,ButtonBase as bZ,memoTheme as b_,isUrl as ba,__awaiter as bb,__generator as bc,__spread as bd,getDefaultExportFromCjs$1 as be,U$3 as bf,dayjs$1 as bg,Divider as bh,isCertificateMatch as bi,FormHelperText as bj,FormGroup as bk,o$c as bl,NodeContext as bm,useParams as bn,useNodeContext$1 as bo,uniqBy as bp,l as bq,e$c as br,l$p as bs,copy as bt,libExports$1 as bu,B$4 as bv,o$9 as bw,l$i as bx,BlockletAvatar as by,ClickAwayListener as bz,createCompounder as c,s$8 as c$,generateUtilityClasses as c0,generateUtilityClass as c1,useDefaultProps as c2,useSlotProps as c3,clsx$1 as c4,composeClasses as c5,__read as c6,toSlotDomain as c7,omit as c8,fixBlocklet as c9,d$d as cA,Avatar as cB,isFromWallet as cC,usePassportId as cD,isFunction$3 as cE,Container$3 as cF,K$4 as cG,getLauncherBaseURL as cH,SvgIcon as cI,Buffer$1 as cJ,parseURL as cK,withHttps as cL,useLaunchBlockletContext as cM,z$2 as cN,authorize as cO,ArrowForwardIcon as cP,isNewStoreUrl as cQ,getAccessibleUrl as cR,getBlockletLogoUrl as cS,t as cT,M$9 as cU,__spreadArrays as cV,__assign as cW,h$6 as cX,useLocation as cY,l$8 as cZ,useMount as c_,isProtectedRole as ca,baseOrderBy as cb,isArray$1 as cc,rootShouldForwardProp as cd,useFormControl as ce,createChainedFunction$1 as cf,useSlot as cg,capitalize$1 as ch,SwitchBase as ci,createSimplePaletteValueFilter as cj,useControlled as ck,useForkRef as cl,useId as cm,getBlockletUrls as cn,defaultCheckAccessible as co,urlEvaluationExports as cp,memoize as cq,ButtonGroupContext as cr,ButtonGroupButtonContext as cs,useNotificationContext as ct,utilExports as cu,NotificationList as cv,useRequest as cw,isNumber$3 as cx,useLatest as cy,dayjs as cz,useBlockletsContext as d,afterMain as d$,formatDateTime as d0,getExplorerLink as d1,patchJsxToLocale as d2,T$6 as d3,getSessionToken as d4,LinearProgress as d5,SvgLogo as d6,isNumber$1 as d7,useEnhancedEffect$1 as d8,debounce$2 as d9,requireJsxRuntime as dA,requirePropTypes as dB,requireReactDom as dC,isObject$3 as dD,require$$0$2 as dE,require$$5$1 as dF,requireConstant$1 as dG,$e$1 as dH,noop$1 as dI,Paper as dJ,MenuList as dK,Popper as dL,_inheritsLoose$1 as dM,ReactDOM as dN,_objectWithoutPropertiesLoose$1 as dO,TransitionGroup as dP,ENTERED as dQ,ENTERING as dR,EXITING as dS,TransitionGroupContext as dT,Transition as dU,config$1 as dV,popperGenerator as dW,eventListeners as dX,popperOffsets$1 as dY,computeStyles$1 as dZ,applyStyles$1 as d_,ownerWindow as da,useRtl as db,KeyboardArrowLeft as dc,KeyboardArrowRight as dd,useEventCallback$1 as de,ownerDocument as df,getCommonHtmlTitle as dg,HelmetExport as dh,requireReact as di,i$e as dj,te$2 as dk,se$1 as dl,InfoIcon$2 as dm,upperFirst as dn,camelCase as dp,Skeleton as dq,R$5 as dr,isArrayLike as ds,baseIteratee as dt,keys as du,toInteger as dv,baseFindIndex as dw,commonjsGlobal as dx,getAugmentedNamespace as dy,emotionUtils_browser_esm as dz,useAsyncRetry as e,toString$2 as e$,afterRead as e0,afterWrite as e1,arrow$1 as e2,auto as e3,basePlacements as e4,beforeMain as e5,beforeRead as e6,beforeWrite as e7,bottom as e8,clippingParents as e9,requireLib$4 as eA,requireLib$5 as eB,requireLib$3 as eC,requireConstant$2 as eD,requireUrlPathFriendly as eE,b$8 as eF,data$s as eG,global$2 as eH,hoistStatics as eI,isEqual$3 as eJ,usePreviousProps as eK,setRef as eL,ClearIcon as eM,ArrowDropDownIcon as eN,Chip as eO,filledInputClasses as eP,inputBaseClasses as eQ,outlinedInputClasses as eR,inputClasses as eS,ListContext as eT,getListItemButtonUtilityClass as eU,listItemButtonClasses as eV,emotionReact_browser_esm as eW,emotionCache_browser_esm as eX,cloneDeep$1 as eY,forceReflow as eZ,_extends$2 as e_,createPopper as ea,createPopper$1 as eb,detectOverflow as ec,end as ed,flip$1 as ee,hide$1 as ef,left as eg,main as eh,modifierPhases as ei,offset$1 as ej,placements as ek,popper as el,preventOverflow$1 as em,read as en,reference as eo,right as ep,start as eq,top as er,variationPlacements as es,viewport as et,write as eu,requireReactIs as ev,emotionStyled_browser_esm as ew,emotionSerialize_esm as ex,emotionSheet_esm as ey,process$1 as ez,useTheme as f,requireCryptoBrowserify as f$,mergeThemeOptions as f0,StyledEngineProvider as f1,ThemeProvider as f2,ThemeProvider$3 as f3,s$3 as f4,CloseIcon as f5,isString$1 as f6,createTheme as f7,createAxios as f8,pick as f9,darken as fA,slotShouldForwardProp as fB,requireNormalizePathPrefix as fC,debounce as fD,useInterval as fE,formatTime as fF,CloseFullscreenIcon as fG,S$8 as fH,TablePagination as fI,parseAvatar as fJ,__rest as fK,useEffectWithTarget$1 as fL,__values as fM,tmp as fN,useUpdate as fO,requireUtil$6 as fP,requireObjectKeys$1 as fQ,requireShams$1 as fR,requireCallBound as fS,requireEsObjectAtoms as fT,requireDefineDataProperty as fU,requireHasPropertyDescriptors as fV,requireCallBind as fW,requireCallBound$1 as fX,requireSafeBuffer$1 as fY,requireBrowser$f as fZ,requireElliptic as f_,omitBy as fa,flat as fb,MenuIcon as fc,useDebounceFn as fd,Dialog as fe,OutlinedInput as ff,data as fg,Drawer as fh,parseQuery as fi,parseFilename as fj,stringifyParsedURL as fk,Grow as fl,Wt as fm,InputAdornment as fn,tooltipClasses as fo,requireEngine as fp,__spreadArray as fq,useEventListener as fr,le$7 as fs,getTargetElement as ft,MoreHorizIcon as fu,clamp as fv,extractEventHandlers as fw,isFocusVisible as fx,isHostComponent as fy,lighten as fz,p$3 as g,isServerless as g$,requireRipemd160 as g0,requireLib$1 as g1,requireUtil$2 as g2,uniq as g3,useLocalStorageState as g4,InputBase as g5,useSize as g6,DialogTitle as g7,DialogContent as g8,DialogActions as g9,isPlainObject$2 as gA,require$$12 as gB,throttle$2 as gC,isUndefined$1 as gD,useTimeout as gE,Fade as gF,FocusTrap as gG,dialogClasses as gH,localizedFormatPlugin as gI,n$8 as gJ,purify as gK,Buffer$1$1 as gL,Q$2 as gM,require$$0$1 as gN,requireIsAbsoluteUrl as gO,requireDist$1 as gP,requireBrowser$3 as gQ,require$$3 as gR,resolveProps as gS,useThemeProps as gT,defaultTheme$1 as gU,THEME_ID as gV,en$2 as gW,isIndex as gX,useTheme$4 as gY,objectAssign as gZ,__extends as g_,pickBy as ga,shouldForwardProp as gb,resolveComponentProps as gc,getInviteLink as gd,e$e as ge,getIssuePassportLink as gf,uniqBy$1 as gg,isNodeOwner as gh,isSelf as gi,Q$1 as gj,I$3 as gk,Y$3 as gl,PQueue as gm,getBlockletAccessibleUrl as gn,A$1 as go,createPassportSvg$1 as gp,requireMs as gq,E$3 as gr,trim as gs,getBlockletSDK as gt,identity$1 as gu,arrayEach as gv,baseEach as gw,arrayMap as gx,baseMap as gy,baseForOwn as gz,get$1 as h,amber as h$,requireJsonStableStringify as h0,isFunction$2 as h1,omit$1 as h2,TableContext as h3,Tablelvl2Context as h4,g$e as h5,useUnmount as h6,isDidDomainOrIpEchoDomain as h7,ExpandLess as h8,validateDomain as h9,isBrowser$1 as hA,root$1 as hB,isNil$1 as hC,require$$11 as hD,requireHoistNonReactStatics_cjs as hE,_assertThisInitialized$1 as hF,reactDomExports as hG,loadIcon as hH,withoutLeadingSlash as hI,fetchSvgAsPng as hJ,blobToFile as hK,withoutTrailingSlash as hL,u$2 as hM,Ce as hN,t$g as hO,i as hP,R$8 as hQ,p$f as hR,usePrevious as hS,browserExports$1 as hT,BlockletSDK as hU,highlightExports as hV,funcExports as hW,data$y as hX,useSnackbar as hY,common$3 as hZ,green as h_,requireDist$2 as ha,requireAxios as hb,trim$1 as hc,requirePRetry as hd,TableCell as he,xe$1 as hf,getSystemDomains as hg,copyArray as hh,baseIndexOf as hi,ke as hj,useAppLogo as hk,getTransferAppLink as hl,requireBn$1 as hm,require$$2 as hn,updateWindowEnv as ho,M$5 as hp,isNil as hq,requireBase32 as hr,Re as hs,withTrailingSlash as ht,data$B as hu,keyframes as hv,requireAssertString as hw,isEmail as hx,isURL as hy,createUseStorageState as hz,utilExports$1 as i,n$5 as i$,SnackbarContent as i0,d$f as i1,t$1 as i2,useDebounce as i3,Y as i4,g$3 as i5,b as i6,g$9 as i7,withErrorBoundary as i8,z$1 as i9,hasRequiredSteps as iA,getStoreList as iB,commonjsRequire as iC,require_interface as iD,requireHasown as iE,requireBrowser$1 as iF,requireSemver as iG,require$$4$1 as iH,flatten as iI,trimEnd as iJ,base32Exports as iK,flatExports as iL,Xt as iM,AxiosError as iN,I$6 as iO,isNull as iP,orange as iQ,purple as iR,useStore as iS,createStore as iT,create$1 as iU,t$h as iV,clientExports as iW,ke$1 as iX,retry as iY,isNetworkError as iZ,requirePTimeout as i_,M$6 as ia,Be as ib,G$1 as ic,xe as id,useBlockletLogo as ie,isPlainObject$1 as ig,Toolbar as ih,_setPrototypeOf as ii,isString$3 as ij,FormLabel as ik,RelativeTime as il,isIncludeActivity as im,isUserActor as io,ActorAvatar as ip,SendComponentAvatar as iq,Activity as ir,NotificationContent$1 as is,AvatarGroup as it,requireCjs as iu,useTheme$2 as iv,baseAssignValue as iw,isValidClusterSize as ix,extractStatusUrlFromNextWorkflow as iy,pWaitFor as iz,jsxRuntimeExports as j,Modal as j0,GlobalStyles$2 as j1,filesize as k,prettyMs as l,formatLocale as m,useSessionContext as n,o$h as o,p$e as p,useSetState as q,reactExports as r,styled$3 as s,TextField as t,useNodeContext as u,n$4 as v,lo as w,getWebWalletUrl as x,joinURL as y,withQuery as z};
2903
+ `;function GlobalSubscriber(){const{t:De}=V$2(),{session:Me}=useSessionContext$1(),{info:He,refresh:Ge}=useNodeContext();return useSubscription(constantExports.TeamEvents.userUpdated,({teamDid:Je,user:Ye})=>{Je===He.did&&Ye&&!Ye.approved&&Me&&Me.user&&Me.user.did===Ye.did&&(H$7.warning(De("session.blockAccess"),{autoHideDuration:10*1e3}),Me.logout())}),useSubscription(constantExports$1.EVENTS.NOTIFICATION_CREATE,Je=>{Je.entityType==="node"&&Ge({silent:!0})}),useSubscription(constantExports$1.EVENTS.NODE_UPDATED,()=>{Ge({silent:!0})}),null}const authorize=({user:De,launchType:Me,nftId:He})=>{if(!De)return!1;if(Me==="serverless"){if(!He)throw new Error("nftId is required");return De?.controller?.nftId===He}return(De.permissions||[]).includes("mutate_blocklets")},isServerlessBlockletInstalled=De=>De.isGetBlocklet&&De.runtimeBlocklet?.controller?.consumedAt,getRestoredAccessUrl=async De=>{const Me=getBlockletUrls({blocklet:De});let He="";return He=Me.find(Ge=>{try{const{hostname:Je}=new URL(Ge);return urlEvaluationExports.isSlpDomain(Je)}catch(Je){return console.error(Je),!1}}),He||(He=await getAccessibleUrl(Me)),He},LaunchBlockletContext=reactExports.createContext({}),{Provider:Provider$1,Consumer:Consumer$1}=LaunchBlockletContext;function LaunchBlockletProvider({children:De}){const{session:Me}=useSessionContext$1(),{t:He}=V$2(),{api:Ge,info:Je}=useNodeContext(),[Ye]=useSearchParams(),Ze=Ye.get("launchType"),et=Ye.get("fromLauncher"),Qe=Ye.get("blocklet_meta_url")||"",nt=Ye.get("nftId")||"",tt=Ye.get("from")||"",rt=Ye.get("launcherSessionId")||"",ot=Ye.get("launcherUrl")||"",at=tt==="url",st=tt==="empty",ut=at||st?"":new URL(Qe).origin,[dt,ct]=reactExports.useState({meta:null,appDid:Ye.get("appDid")||null,sessionId:Ye.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),ft=(mt,bt)=>ct(Et=>({...Et,appDid:mt,sessionId:bt})),ht=authorize({user:Me.user,launchType:Ze,nftId:nt}),[yt,gt]=reactExports.useState(null),[Ct,At]=reactExports.useState(!0),_t=reactExports.useMemo(()=>Je?getServerUrl(Je):"",[Je]),Pt=async mt=>{if(!mt)throw new Error("appDid should not be empty");const{blocklet:bt}=await Ge.getBlocklet({input:{did:mt,attachConfig:!1}});if(!bt)return null;const Et=constantExports.BlockletStatus[bt.status],Tt=!!nt,St=Et<constantExports.BlockletStatus.installed,Rt=Et===constantExports.BlockletStatus.installed,kt=Et===constantExports.BlockletStatus.running;return ct(wt=>({...wt,isInstalled:Rt,isRunning:kt,isExternal:Tt,isInstalling:St})),{isInstalled:Rt,isRunning:kt,isExternal:Tt,isInstalling:St}},Lt=async()=>{if(At(!0),st){ct(mt=>({...mt,meta:{title:Ye.get("title")||"",description:Ye.get("description")||""}})),At(!1);return}try{if(!Qe&&!st)throw new Error(He("common.invalidParam"));const[{meta:mt,isFree:bt,registryUrl:Et},{launcherSession:Tt,error:St}]=await Promise.all([Ge.getBlockletMetaFromUrl({input:{url:Qe,checkPrice:!0}}),rt?Ge.getLauncherSession({input:{launcherSessionId:rt,launcherUrl:ot}}):Promise.resolve({})]);if(rt&&!Tt)throw new Error(`Launch session invalid: ${St}`);if(!mt)throw new Error(He("LaunchBlockletBlocklet.error.loadMetaFailed"));let Rt={};ht&&dt.appDid&&(Rt=await Pt(dt.appDid)),ct(kt=>({...kt,...Rt,meta:mt,isFree:bt,registryUrl:Et,launcherSession:Tt}))}catch(mt){console.error(mt),gt(mt.message)}finally{At(!1)}};reactExports.useEffect(()=>{Me?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&Me?.user?.controller?.nftId!==nt&&Me.logout(),Lt()},[]),reactExports.useEffect(()=>{Ct||!dt.meta||(ht?dt.appDid&&Pt(dt.appDid).catch(mt=>{H$7.error(mt.message)}):(ct(mt=>({...mt,isInstalled:!1,isRunning:!1,isExternal:!1})),gt(null)))},[ht]);const Dt={meta:dt.meta,isFree:dt.isFree,appDid:dt.appDid,sessionId:dt.sessionId,isInstalling:dt.isInstalling,isInstalled:dt.isInstalled,isExternal:dt.isExternal,isRunning:dt.isRunning,serverUrl:_t,storeUrl:dt.registryUrl||ut,blockletMetaUrl:Qe,fromLauncher:et,loading:Ct,error:yt,api:Ge,getBlocklet:Pt,setAppDid:ft,launcherUrl:ot,launcherSession:dt.launcherSession,launcherSessionId:rt,launchType:Ze};return jsxRuntimeExports.jsx(Provider$1,{value:Dt,children:De})}function useLaunchBlockletContext(){return reactExports.useContext(LaunchBlockletContext)}var useAsyncExports=requireUseAsync();const useAsync=getDefaultExportFromCjs$1(useAsyncExports);function useQuery(){return new URLSearchParams(useLocation().search)}const BlockletAppContext=reactExports.createContext(),{Provider,Consumer}=BlockletAppContext;function BlockletAppProvider({children:De}){const He=useQuery().get("blocklet_meta_url"),Ge=useAsync(async()=>{const{data:Ye}=await axios.get(He);return Ye});if(Ge.loading)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const Je={meta:Ge.value,error:Ge.error};return jsxRuntimeExports.jsx(Provider,{value:Je,children:De})}BlockletAppProvider.propTypes={children:o$h.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-BZeOf_Tu.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-B2poRPnp.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,2,32,33,34,35,36,37,38,39]),import.meta.url)),BlockletRestore=reactExports.lazy(()=>__vitePreload(()=>import("./index-DFXhXlJk.js"),__vite__mapDeps([40,41,42,43,44,45,24,6,36,46,47,48,20,16]),import.meta.url)),BlockletStore=reactExports.lazy(()=>__vitePreload(()=>import("./index-Bbu_zE3x.js"),__vite__mapDeps([49,6,50,51,52,53,54,18,16,55,32,33,56,57,37,36,58,46,59,4,20,24,25,26,60,61,27,62,63]),import.meta.url)),Settings=reactExports.lazy(()=>__vitePreload(()=>import("./index-B2m_raRS.js"),__vite__mapDeps([64,65,62,66,67,68,27,8,9,10,11,12,13,14,15,16,17,18,19,20,69,70,23,59,4,2,71,6,72,73,74,75,37,21,76,54,77,78,79]),import.meta.url)),LogPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-DYJtcdqz.js"),__vite__mapDeps([80,81,25,26,6]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-BqPjiG1G.js"),__vite__mapDeps([82,65,83,16,17,18,19,6,84,85,86,87,88,89,55,23,90,37,91,8,9,10,11,12,13,14,15,20,38,25,26,66,92,31,32,33,27,4,93,94,75,2,56,46,7,95,96,51,45,70,97,98,99,100,101,102,103,72,77,1,59,104,105,106]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-CDpzlMf3.js"),__vite__mapDeps([107,65,21,22,6,20,23,24,25,26,27,55,108,89,63]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CMtLSLIZ.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-DcCauHzD.js"),[],import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-DScXR38D.js"),__vite__mapDeps([109,110,108,95,11,96,111,112,24]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-D3hM989k.js"),__vite__mapDeps([113,91,58,95,11,111,112,24,35]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-BiQXR3Bm.js"),__vite__mapDeps([114,111,112,24]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-CF3eNUVb.js"),__vite__mapDeps([115,42,43,44,45,104,105,116,84,85,86,24,29,30,48,39,6,71,61]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-Dmnos1kX.js"),__vite__mapDeps([117,108]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-CeKndEzp.js"),__vite__mapDeps([118,110,108,95,11,96,111,112]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-BPIqxC-U.js"),[],import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-B0p2z33B.js"),__vite__mapDeps([119,65,120,121,53,54,122,14,123,124,93,94,10,75,8,9,11,12,13,15,16,17,18,19,20,125,126,79,6,102,26]),import.meta.url)),GenKeyPair=reactExports.lazy(()=>__vitePreload(()=>import("./index-BmA5kukS.js"),__vite__mapDeps([127,108]),import.meta.url));function useSharedContext(){const De=useNodeContext(),{session:Me}=useSessionContext$1(),{wallet:He}=d$d(),Ge=Me.user&&Me.user.did;return reactExports.useEffect(()=>{const Je=getWsClient();return Ge?Je.connect():Je.isConnected()&&Je.disconnect(),()=>{Je.isConnected()&&Je.disconnect()}},[Ge]),reactExports.useEffect(()=>{if(He)return()=>{};const Je=()=>{document.visibilityState==="visible"&&Me.refresh()};return document.addEventListener("visibilitychange",Je),()=>{document.removeEventListener("visibilitychange",Je)}},[]),{node:De,session:Me}}function ProtectedApp(){const{t:De}=V$2(),{node:Me,session:He}=useSharedContext(),Ge=useLocation();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${Ge.pathname}${Ge.search}`)},[Ge]),reactExports.useEffect(()=>{He?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&He.logout()},[He?.user?.role]);const Je=jsxRuntimeExports.jsx(CircularProgress,{});if(Me.loading||He.loading)return jsxRuntimeExports.jsx(o$f,{children:Je});if(!Me.info.initialized)return getAuthMethodExports.getServerAuthMethod(Me.info)==="nft"?jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"verify-owner"}):jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(NodeConnectOwner,{})});if(Me.info.upgradeSessionId)return jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})});if(!He.user)return jsxRuntimeExports.jsx(NodeLogin,{loadingEle:Je});const Ye=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(BlockletsProvider,{children:jsxRuntimeExports.jsxs(NotificationProvider,{children:[jsxRuntimeExports.jsx(Health,{}),jsxRuntimeExports.jsx(CheckNodeStatus,{}),jsxRuntimeExports.jsx(GlobalSubscriber,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:Ye,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/dashboard",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.blocklets"),children:jsxRuntimeExports.jsx(BlockletList,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/:did/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Blocklets",children:jsxRuntimeExports.jsx(BlockletDetail,{})})}),jsxRuntimeExports.jsx(Route,{path:"/settings/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.setting"),children:jsxRuntimeExports.jsx(Settings,{})})}),jsxRuntimeExports.jsx(Route,{path:"/eula",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("setup.steps.eula"),children:jsxRuntimeExports.jsx(EULAPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/store",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.store"),children:jsxRuntimeExports.jsx(BlockletStore,{})})}),jsxRuntimeExports.jsx(Route,{path:"/console",element:jsxRuntimeExports.jsx(DashboardRoute,{title:`GraphQL ${De("common.console")}`,scrollable:!1,fullWidth:!0,children:jsxRuntimeExports.jsx(Console,{})})}),jsxRuntimeExports.jsx(Route,{path:"/notifications",element:jsxRuntimeExports.jsx(DashboardRoute,{title:De("notification.title"),children:jsxRuntimeExports.jsx(Notifications,{})})}),jsxRuntimeExports.jsx(Route,{path:"/team/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.team"),children:jsxRuntimeExports.jsx(TeamPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/logs/:name?",element:jsxRuntimeExports.jsx(DashboardRoute,{scrollable:!1,fullWidth:!0,title:De("common.logs"),children:jsxRuntimeExports.jsx(LogPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/analytics/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:De("common.analytics"),children:jsxRuntimeExports.jsx(AnalyticsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(Navigate,{to:"/dashboard",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/team",element:jsxRuntimeExports.jsx(Navigate,{to:"/team/members",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/analytics",element:jsxRuntimeExports.jsx(Navigate,{to:"/analytics/traffic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/router",element:jsxRuntimeExports.jsx(Navigate,{to:"/router/rules",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/settings",element:jsxRuntimeExports.jsx(Navigate,{to:"/settings/basic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace",element:jsxRuntimeExports.jsx(Navigate,{to:"/store",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace/:did",element:jsxRuntimeExports.jsx(Navigate,{to:"/store/:did",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})]})})}function UnprotectedWrapper({children:De}){const{node:Me,session:He}=useSharedContext();return Me.loading||!He.initialized&&He.loading?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):Me.info.upgradeSessionId?jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(MaintainProgress,{})}):De}function App(){const{changeLocale:De}=V$2(),Me=useQuery();reactExports.useEffect(()=>{const Ge=Me.get("locale");Ge&&["zh","en"].includes(Ge)&&De(Ge)},[]);const He=jsxRuntimeExports.jsx(o$f,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:He,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(IssuePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LostPassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(ExchangePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:"/accept-server",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"accept-server"})})}),jsxRuntimeExports.jsx(Route,{path:"/gen-key-pair/",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(GenKeyPair,{})})}),jsxRuntimeExports.jsx(Route,{path:"/launch-blocklet/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LaunchBlockletProvider,{children:jsxRuntimeExports.jsx(BlockletLauncher,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/restore/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(BlockletAppProvider,{children:jsxRuntimeExports.jsx(BlockletRestore,{})})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(Invite,{})})}),jsxRuntimeExports.jsx(Route,{path:"/*",element:jsxRuntimeExports.jsx(ProtectedApp,{})})]})})}function AppWrapper(){const De=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return jsxRuntimeExports.jsx(BrowserRouter,{history:history$1,basename:De,children:jsxRuntimeExports.jsx(Root,{children:jsxRuntimeExports.jsx(App,{})})})}const root=clientExports.createRoot(document.getElementById("root"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";register(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:prefix},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(De){console.error("Error during service worker registration:",De)}});export{$$4 as $,useNavigate as A,useSearchParams as B,CircularProgress as C,DialogContentText as D,useMediaQuery as E,libExports$3 as F,Grid$1 as G,H$7 as H,Link$1 as I,BlockletAppAvatar as J,Box as K,Link as L,isEmpty as M,oe as N,Tooltip as O,FormControl as P,InputLabel as Q,MenuItem as R,Select as S,Typography as T,Checkbox as U,V$2 as V,WrappedDidAddress as W,Alert as X,formatError as Y,o$f as Z,CheckIcon$2 as _,useSubscription as a,urlPathFriendlyExports as a$,propTypesExports as a0,api as a1,merge as a2,cloneDeep as a3,IconButton as a4,R$3 as a5,ListItemSecondaryAction as a6,List as a7,ListItem as a8,ListItemText as a9,ErrorBoundary as aA,k$1 as aB,formatRegistryLogoPath as aC,Icon as aD,ListItemIcon as aE,createSvgIcon as aF,ensureDomainAliases as aG,constantExports$1 as aH,normalizePathPrefix as aI,sortBy as aJ,getIp as aK,stringSortHandlerAsc as aL,getAccessUrl as aM,history$1 as aN,semver as aO,useReactive as aP,useAsyncEffect as aQ,InfoOutlinedIcon as aR,sleep as aS,useMemoizedFn as aT,checkInputByType as aU,FormControlLabel as aV,Stack$1 as aW,useAsync as aX,axios as aY,shouldCheckDomainStatus as aZ,formatMountPoint as a_,getServerUrl as aa,useBlockletAppContext as ab,getAuthMethodExports as ac,ConfirmDialog as ad,getRestoredAccessUrl as ae,setSessionToken as af,isEqual as ag,isServerlessBlockletInstalled as ah,Debug as ai,getWsClient as aj,useQuery as ak,getPathPrefix as al,Global as am,Routes as an,Route as ao,Navigate as ap,HeaderAddon as aq,SessionContext as ar,css as as,$$5 as at,formatToDatetime as au,alpha$1 as av,getLaunchAgreementUrl as aw,axios$2 as ax,useSessionContext$1 as ay,getBlockletMetaUrl as az,constantExports as b,emphasize as b$,Menu as b0,checkIsWildcardDomain as b1,Popover as b2,Card as b3,formatToDate as b4,sortDomains as b5,C$9 as b6,Collapse as b7,CheckCircle as b8,styled as b9,f$7 as bA,Button as bB,createPassportSvg as bC,getWalletType as bD,useCreation as bE,BlockletAdminRoles as bF,isInstalling as bG,Badge as bH,createAppPassportSvg as bI,NavLink as bJ,__vitePreload as bK,SetCache as bL,arrayIncludes$1 as bM,arrayIncludesWith as bN,cacheHas as bO,baseUniq as bP,baseFlatten as bQ,baseRest as bR,last as bS,arrayFilter as bT,isArrayLikeObject as bU,t$a as bV,isDownloading as bW,getBlockletUrl as bX,getBlockletUrlParams as bY,ButtonBase as bZ,memoTheme as b_,isUrl as ba,__awaiter as bb,__generator as bc,__spread as bd,getDefaultExportFromCjs$1 as be,U$3 as bf,dayjs$1 as bg,Divider as bh,isCertificateMatch as bi,FormHelperText as bj,FormGroup as bk,o$c as bl,NodeContext as bm,useParams as bn,useNodeContext$1 as bo,uniqBy as bp,l as bq,e$c as br,l$p as bs,copy as bt,libExports$1 as bu,B$4 as bv,o$9 as bw,l$i as bx,BlockletAvatar as by,ClickAwayListener as bz,createCompounder as c,s$8 as c$,generateUtilityClasses as c0,generateUtilityClass as c1,useDefaultProps as c2,useSlotProps as c3,clsx$1 as c4,composeClasses as c5,__read as c6,toSlotDomain as c7,omit as c8,fixBlocklet as c9,d$d as cA,Avatar as cB,isFromWallet as cC,usePassportId as cD,isFunction$3 as cE,Container$3 as cF,K$4 as cG,getLauncherBaseURL as cH,SvgIcon as cI,Buffer$1 as cJ,parseURL as cK,withHttps as cL,useLaunchBlockletContext as cM,z$2 as cN,authorize as cO,ArrowForwardIcon as cP,isNewStoreUrl as cQ,getAccessibleUrl as cR,getBlockletLogoUrl as cS,t as cT,M$9 as cU,__spreadArrays as cV,__assign as cW,h$6 as cX,useLocation as cY,l$8 as cZ,useMount as c_,isProtectedRole as ca,baseOrderBy as cb,isArray$1 as cc,rootShouldForwardProp as cd,useFormControl as ce,createChainedFunction$1 as cf,useSlot as cg,capitalize$1 as ch,SwitchBase as ci,createSimplePaletteValueFilter as cj,useControlled as ck,useForkRef as cl,useId as cm,getBlockletUrls as cn,defaultCheckAccessible as co,urlEvaluationExports as cp,memoize as cq,ButtonGroupContext as cr,ButtonGroupButtonContext as cs,useNotificationContext as ct,utilExports as cu,NotificationList as cv,useRequest as cw,isNumber$3 as cx,useLatest as cy,dayjs as cz,useBlockletsContext as d,afterMain as d$,formatDateTime as d0,getExplorerLink as d1,patchJsxToLocale as d2,T$6 as d3,getSessionToken as d4,LinearProgress as d5,SvgLogo as d6,isNumber$1 as d7,useEnhancedEffect$1 as d8,debounce$2 as d9,requireJsxRuntime as dA,requirePropTypes as dB,requireReactDom as dC,isObject$3 as dD,require$$0$2 as dE,require$$5$1 as dF,requireConstant$1 as dG,$e$1 as dH,noop$1 as dI,Paper as dJ,MenuList as dK,Popper as dL,_inheritsLoose$1 as dM,ReactDOM as dN,_objectWithoutPropertiesLoose$1 as dO,TransitionGroup as dP,ENTERED as dQ,ENTERING as dR,EXITING as dS,TransitionGroupContext as dT,Transition as dU,config$1 as dV,popperGenerator as dW,eventListeners as dX,popperOffsets$1 as dY,computeStyles$1 as dZ,applyStyles$1 as d_,ownerWindow as da,useRtl as db,KeyboardArrowLeft as dc,KeyboardArrowRight as dd,useEventCallback$1 as de,ownerDocument as df,getCommonHtmlTitle as dg,HelmetExport as dh,requireReact as di,i$e as dj,te$2 as dk,se$1 as dl,InfoIcon$2 as dm,upperFirst as dn,camelCase as dp,Skeleton as dq,R$5 as dr,isArrayLike as ds,baseIteratee as dt,keys as du,toInteger as dv,baseFindIndex as dw,commonjsGlobal as dx,getAugmentedNamespace as dy,emotionUtils_browser_esm as dz,useAsyncRetry as e,toString$2 as e$,afterRead as e0,afterWrite as e1,arrow$1 as e2,auto as e3,basePlacements as e4,beforeMain as e5,beforeRead as e6,beforeWrite as e7,bottom as e8,clippingParents as e9,requireLib$4 as eA,requireLib$5 as eB,requireLib$3 as eC,requireConstant$2 as eD,requireUrlPathFriendly as eE,b$8 as eF,data$s as eG,global$2 as eH,hoistStatics as eI,isEqual$3 as eJ,usePreviousProps as eK,setRef as eL,ClearIcon as eM,ArrowDropDownIcon as eN,Chip as eO,filledInputClasses as eP,inputBaseClasses as eQ,outlinedInputClasses as eR,inputClasses as eS,ListContext as eT,getListItemButtonUtilityClass as eU,listItemButtonClasses as eV,emotionReact_browser_esm as eW,emotionCache_browser_esm as eX,cloneDeep$1 as eY,forceReflow as eZ,_extends$2 as e_,createPopper as ea,createPopper$1 as eb,detectOverflow as ec,end as ed,flip$1 as ee,hide$1 as ef,left as eg,main as eh,modifierPhases as ei,offset$1 as ej,placements as ek,popper as el,preventOverflow$1 as em,read as en,reference as eo,right as ep,start as eq,top as er,variationPlacements as es,viewport as et,write as eu,requireReactIs as ev,emotionStyled_browser_esm as ew,emotionSerialize_esm as ex,emotionSheet_esm as ey,process$1 as ez,useTheme as f,requireCryptoBrowserify as f$,mergeThemeOptions as f0,StyledEngineProvider as f1,ThemeProvider as f2,ThemeProvider$3 as f3,s$3 as f4,CloseIcon as f5,isString$1 as f6,createTheme as f7,createAxios as f8,pick as f9,darken as fA,slotShouldForwardProp as fB,requireNormalizePathPrefix as fC,debounce as fD,useInterval as fE,formatTime as fF,CloseFullscreenIcon as fG,S$8 as fH,TablePagination as fI,parseAvatar as fJ,__rest as fK,useEffectWithTarget$1 as fL,__values as fM,tmp as fN,useUpdate as fO,requireUtil$6 as fP,requireObjectKeys$1 as fQ,requireShams$1 as fR,requireCallBound as fS,requireEsObjectAtoms as fT,requireDefineDataProperty as fU,requireHasPropertyDescriptors as fV,requireCallBind as fW,requireCallBound$1 as fX,requireSafeBuffer$1 as fY,requireBrowser$f as fZ,requireElliptic as f_,omitBy as fa,flat as fb,MenuIcon as fc,useDebounceFn as fd,Dialog as fe,OutlinedInput as ff,data as fg,Drawer as fh,parseQuery as fi,parseFilename as fj,stringifyParsedURL as fk,Grow as fl,Wt as fm,InputAdornment as fn,tooltipClasses as fo,requireEngine as fp,__spreadArray as fq,useEventListener as fr,le$7 as fs,getTargetElement as ft,MoreHorizIcon as fu,clamp as fv,extractEventHandlers as fw,isFocusVisible as fx,isHostComponent as fy,lighten as fz,p$3 as g,isServerless as g$,requireRipemd160 as g0,requireLib$1 as g1,requireUtil$2 as g2,uniq as g3,useLocalStorageState as g4,InputBase as g5,useSize as g6,DialogTitle as g7,DialogContent as g8,DialogActions as g9,isPlainObject$2 as gA,require$$12 as gB,throttle$2 as gC,isUndefined$1 as gD,useTimeout as gE,Fade as gF,FocusTrap as gG,dialogClasses as gH,localizedFormatPlugin as gI,n$8 as gJ,purify as gK,Buffer$1$1 as gL,Q$2 as gM,require$$0$1 as gN,requireIsAbsoluteUrl as gO,requireDist$1 as gP,requireBrowser$3 as gQ,require$$3 as gR,resolveProps as gS,useThemeProps as gT,defaultTheme$1 as gU,THEME_ID as gV,en$2 as gW,isIndex as gX,useTheme$4 as gY,objectAssign as gZ,__extends as g_,pickBy as ga,shouldForwardProp as gb,resolveComponentProps as gc,getInviteLink as gd,e$e as ge,getIssuePassportLink as gf,uniqBy$1 as gg,isNodeOwner as gh,isSelf as gi,Q$1 as gj,I$3 as gk,Y$3 as gl,PQueue as gm,getBlockletAccessibleUrl as gn,A$1 as go,createPassportSvg$1 as gp,requireMs as gq,E$3 as gr,trim as gs,getBlockletSDK as gt,identity$1 as gu,arrayEach as gv,baseEach as gw,arrayMap as gx,baseMap as gy,baseForOwn as gz,get$1 as h,amber as h$,requireJsonStableStringify as h0,isFunction$2 as h1,omit$1 as h2,TableContext as h3,Tablelvl2Context as h4,g$e as h5,useUnmount as h6,isDidDomainOrIpEchoDomain as h7,ExpandLess as h8,validateDomain as h9,isBrowser$1 as hA,root$1 as hB,isNil$1 as hC,require$$11 as hD,requireHoistNonReactStatics_cjs as hE,_assertThisInitialized$1 as hF,reactDomExports as hG,loadIcon as hH,withoutLeadingSlash as hI,fetchSvgAsPng as hJ,blobToFile as hK,withoutTrailingSlash as hL,u$2 as hM,Ce as hN,t$g as hO,i as hP,R$8 as hQ,p$f as hR,usePrevious as hS,browserExports$1 as hT,BlockletSDK as hU,highlightExports as hV,funcExports as hW,data$y as hX,useSnackbar as hY,common$3 as hZ,green as h_,requireDist$2 as ha,requireAxios as hb,trim$1 as hc,requirePRetry as hd,TableCell as he,xe$1 as hf,getSystemDomains as hg,copyArray as hh,baseIndexOf as hi,ke as hj,useAppLogo as hk,getTransferAppLink as hl,requireBn$1 as hm,require$$2 as hn,updateWindowEnv as ho,M$5 as hp,isNil as hq,requireBase32 as hr,Re as hs,withTrailingSlash as ht,data$B as hu,keyframes as hv,requireAssertString as hw,isEmail as hx,isURL as hy,createUseStorageState as hz,utilExports$1 as i,n$5 as i$,SnackbarContent as i0,d$f as i1,t$1 as i2,useDebounce as i3,Y as i4,g$3 as i5,b as i6,g$9 as i7,withErrorBoundary as i8,z$1 as i9,hasRequiredSteps as iA,getStoreList as iB,commonjsRequire as iC,require_interface as iD,requireHasown as iE,requireBrowser$1 as iF,requireSemver as iG,require$$4$1 as iH,flatten as iI,trimEnd as iJ,base32Exports as iK,flatExports as iL,Xt as iM,AxiosError as iN,I$6 as iO,isNull as iP,orange as iQ,purple as iR,useStore as iS,createStore as iT,create$1 as iU,t$h as iV,clientExports as iW,ke$1 as iX,retry as iY,isNetworkError as iZ,requirePTimeout as i_,M$6 as ia,Be as ib,G$1 as ic,xe as id,useBlockletLogo as ie,isPlainObject$1 as ig,Toolbar as ih,_setPrototypeOf as ii,isString$3 as ij,FormLabel as ik,RelativeTime as il,isIncludeActivity as im,isUserActor as io,ActorAvatar as ip,SendComponentAvatar as iq,Activity as ir,NotificationContent$1 as is,AvatarGroup as it,requireCjs as iu,useTheme$2 as iv,baseAssignValue as iw,isValidClusterSize as ix,extractStatusUrlFromNextWorkflow as iy,pWaitFor as iz,jsxRuntimeExports as j,Modal as j0,GlobalStyles$2 as j1,filesize as k,prettyMs as l,formatLocale as m,useSessionContext as n,o$h as o,p$e as p,useSetState as q,reactExports as r,styled$3 as s,TextField as t,useNodeContext as u,n$4 as v,lo as w,getWebWalletUrl as x,joinURL as y,withQuery as z};
@@ -1,4 +1,4 @@
1
- import{c as H,u as W,r as i,a as R,b as $,j as e,o as y,d as Q,e as Y,p as F,f as X,W as D,L as J,g as j,h as K,i as z,k,T as h,G as v,l as Z,m as B,s as q,C as ee}from"./index-DY4IRZzA.js";import{f as ne}from"./index-BojVbZw0.js";import{v as U}from"./index-C4kPl4ke.js";import{M as V}from"./metric-Cat2Yufj.js";import{C as M}from"./click-to-copy-mgbEjAVp.js";var se=H(function(a,d,r){return a+(r?" ":"")+d.toLowerCase()});const L=i.createContext({}),{Provider:ae,Consumer:he}=L;function te({children:a}){const{api:d,info:r}=W(),[u,l]=i.useState(null),[c,t]=i.useState(!1),[s,p]=i.useState([]),_=4,f=async({silent:o=!0,retries:m=_}={})=>{o||t(!0);try{l(null);const{users:x}=await d.getUsers({input:{teamDid:r.did,paging:{pageSize:100}}});t(!1),p(x)}catch(x){m>0?setTimeout(()=>f({silent:o,retries:m-1}),1e3):(t(!1),l(x))}};i.useEffect(()=>{f({silent:!1})},[]),R($.TeamEvents.userAdded,({teamDid:o})=>{o===r.did&&f()}),R($.TeamEvents.userRemoved,({teamDid:o,user:{did:m}})=>{o===r.did&&p(x=>x.filter(N=>N.did!==m))}),R($.TeamEvents.userUpdated,({teamDid:o})=>{o===r.did&&f()});const b={loading:c,error:u,users:s,refresh:f};return e.jsx(ae,{value:{users:b},children:a})}function re(){const{users:a}=i.useContext(L);return a}const g={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},oe=(a,d)=>{const[r,u]=i.useState(0),l=s=>s>=g.oneDay?g.oneDay:s>=g.oneHour?g.oneHour:s>=g.oneMin?g.oneMin:g.oneSecond,[c,t]=i.useState(l(a/1e3));return i.useEffect(()=>{const s=setInterval(()=>{u(r+c);const p=l(a/1e3+r+c);c!==p&&t(p)},c*1e3);return()=>clearInterval(s)},[c,r]),i.useEffect(()=>{u(0),t(l(a/1e3))},[a]),d(a+r*1e3)};y.number.isRequired,y.func;const ie=async a=>{const d=await a.getNodeEnv();return Object.assign({},d.info||{})};y.number.isRequired;y.string.isRequired,y.string.isRequired,y.string.isRequired;function le(){const{info:a,api:d,loading:r}=W(),{data:u,externalData:l}=Q(),{users:c}=re(),t=Y(()=>ie(d)),{t:s,locale:p}=i.useContext(F),_=X(),f=oe(+new Date-a.startAt,o=>{const m={compact:!0,verbose:!0,locale:B(p)};return Z(o,m)});let b=null;if(r)b=e.jsx(ee,{});else{const o=[{name:s("dashboard.nodeDid"),value:e.jsx(D,{did:a.did,showQrcode:!0})}];a.nodeOwner&&o.push({name:s("dashboard.ownerDid"),value:e.jsx(D,{did:a.nodeOwner.did,showQrcode:!0})});let m=[];a.launcher&&(m=[{name:s("common.did"),value:e.jsx(D,{did:a.launcher.did,showQrcode:!0})},{name:s("common.type"),value:a.launcher.type},{name:s("launcher.provider"),value:a.launcher.provider},{name:s("launcher.adminUrl"),value:e.jsx(J,{target:"_blank",href:a.launcher.url,underline:"hover",children:a.launcher.url})}]);const x=(n,w)=>!n&&!w?"-":n==="-"?n:!w||w==="-"?e.jsxs(h,{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}):e.jsxs(h,{component:"ul",children:[e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}),e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV6"}),e.jsx(M,{children:w})]})]}),N=()=>{const n=[{name:`${s("common.internalIp")}`,value:x(t.value.ip.internalV4,t.value.ip.internalV6)},{name:`${s("common.externalIp")}`,value:x(t.value.ip.externalV4,t.value.ip.externalV6)}];return t.value.docker?[]:n},T=t.value?[{name:`${s("common.version")}`,value:a.version},...N(),{name:`${s("common.os")}`,value:t.value.os},t.value.docker?{name:`${s("common.docker")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null,t.value.gitpod?{name:`${s("common.gitpod")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null].filter(Boolean):[];Array.isArray(K(t,"value.blockletEngines",null))&&t.value.blockletEngines.filter(n=>n.visible&&n.available).forEach(n=>{T.push({name:n.displayName,value:e.jsx(j,{type:"success",children:`${n.version}`||"N/A"})})});const G=c.length,A=c.filter(n=>n.approved).length;let P=G;A&&(P+=`<small><strong>${se(s("common.approved"))} ${A}</strong></small>`);let S=0,C=0;u&&(S=u.length,C=u.filter(n=>z.isBlockletRunning(n)).length),Array.isArray(l)&&(S+=l.length,C+=l.filter(n=>z.isBlockletRunning(n)).length);let I=S;C&&(I+=`<small>${s("common.running")} ${C}</small>`);const O=[{name:s("common.blocklets"),value:I},{name:s("common.members"),value:P},{name:s("common.uptime"),value:f},{name:s("common.created"),value:ne(new Date(a.createdAt).getTime(),B(p))}];let E=[];t.value&&t.value.disk&&Object.values(t.value.disk).some(n=>n>0)&&(E=[{name:s("common.blockletsStorage"),value:k(t.value.disk.blocklets||0).toUpperCase()},{name:s("common.dataStorage"),value:k(t.value.disk.data||0).toUpperCase()},{name:s("common.logStorage"),value:k(t.value.disk.log||0).toUpperCase()},{name:s("common.cacheStorage"),value:k(t.value.disk.cache||0).toUpperCase()},{name:s("common.coreStorage"),value:k(t.value.disk.app||0).toUpperCase()}]),b=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.overview")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:O.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),E.length>0&&e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.storage")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:E.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.meta")}),e.jsxs(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:[e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.dAddress")}),o.map(n=>e.jsx(U,{nameWidth:150,name:n.name,children:n.value},n.name)),m.length>0&&e.jsxs("div",{style:{marginTop:_.spacing(8)},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.launcher")}),m.map(n=>e.jsx(U,{nameWidth:150,name:n.name,children:n.value},n.name))]})]},"address"),e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.env")}),T.map(n=>e.jsx(U,{valueComponent:"div",nameWidth:150,name:n.name,children:n.value},n.name))]},"environment")]})]})]})}return e.jsx(ce,{children:b})}const ce=q.main`
1
+ import{c as H,u as W,r as i,a as R,b as $,j as e,o as y,d as Q,e as Y,p as F,f as X,W as D,L as J,g as j,h as K,i as z,k,T as h,G as v,l as Z,m as B,s as q,C as ee}from"./index-BZORkGy0.js";import{f as ne}from"./index-BojVbZw0.js";import{v as U}from"./index-CW-42AHU.js";import{M as V}from"./metric-DQy5zRdQ.js";import{C as M}from"./click-to-copy-DlpsaegJ.js";var se=H(function(a,d,r){return a+(r?" ":"")+d.toLowerCase()});const L=i.createContext({}),{Provider:ae,Consumer:he}=L;function te({children:a}){const{api:d,info:r}=W(),[u,l]=i.useState(null),[c,t]=i.useState(!1),[s,p]=i.useState([]),_=4,f=async({silent:o=!0,retries:m=_}={})=>{o||t(!0);try{l(null);const{users:x}=await d.getUsers({input:{teamDid:r.did,paging:{pageSize:100}}});t(!1),p(x)}catch(x){m>0?setTimeout(()=>f({silent:o,retries:m-1}),1e3):(t(!1),l(x))}};i.useEffect(()=>{f({silent:!1})},[]),R($.TeamEvents.userAdded,({teamDid:o})=>{o===r.did&&f()}),R($.TeamEvents.userRemoved,({teamDid:o,user:{did:m}})=>{o===r.did&&p(x=>x.filter(N=>N.did!==m))}),R($.TeamEvents.userUpdated,({teamDid:o})=>{o===r.did&&f()});const b={loading:c,error:u,users:s,refresh:f};return e.jsx(ae,{value:{users:b},children:a})}function re(){const{users:a}=i.useContext(L);return a}const g={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},oe=(a,d)=>{const[r,u]=i.useState(0),l=s=>s>=g.oneDay?g.oneDay:s>=g.oneHour?g.oneHour:s>=g.oneMin?g.oneMin:g.oneSecond,[c,t]=i.useState(l(a/1e3));return i.useEffect(()=>{const s=setInterval(()=>{u(r+c);const p=l(a/1e3+r+c);c!==p&&t(p)},c*1e3);return()=>clearInterval(s)},[c,r]),i.useEffect(()=>{u(0),t(l(a/1e3))},[a]),d(a+r*1e3)};y.number.isRequired,y.func;const ie=async a=>{const d=await a.getNodeEnv();return Object.assign({},d.info||{})};y.number.isRequired;y.string.isRequired,y.string.isRequired,y.string.isRequired;function le(){const{info:a,api:d,loading:r}=W(),{data:u,externalData:l}=Q(),{users:c}=re(),t=Y(()=>ie(d)),{t:s,locale:p}=i.useContext(F),_=X(),f=oe(+new Date-a.startAt,o=>{const m={compact:!0,verbose:!0,locale:B(p)};return Z(o,m)});let b=null;if(r)b=e.jsx(ee,{});else{const o=[{name:s("dashboard.nodeDid"),value:e.jsx(D,{did:a.did,showQrcode:!0})}];a.nodeOwner&&o.push({name:s("dashboard.ownerDid"),value:e.jsx(D,{did:a.nodeOwner.did,showQrcode:!0})});let m=[];a.launcher&&(m=[{name:s("common.did"),value:e.jsx(D,{did:a.launcher.did,showQrcode:!0})},{name:s("common.type"),value:a.launcher.type},{name:s("launcher.provider"),value:a.launcher.provider},{name:s("launcher.adminUrl"),value:e.jsx(J,{target:"_blank",href:a.launcher.url,underline:"hover",children:a.launcher.url})}]);const x=(n,w)=>!n&&!w?"-":n==="-"?n:!w||w==="-"?e.jsxs(h,{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}):e.jsxs(h,{component:"ul",children:[e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}),e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV6"}),e.jsx(M,{children:w})]})]}),N=()=>{const n=[{name:`${s("common.internalIp")}`,value:x(t.value.ip.internalV4,t.value.ip.internalV6)},{name:`${s("common.externalIp")}`,value:x(t.value.ip.externalV4,t.value.ip.externalV6)}];return t.value.docker?[]:n},T=t.value?[{name:`${s("common.version")}`,value:a.version},...N(),{name:`${s("common.os")}`,value:t.value.os},t.value.docker?{name:`${s("common.docker")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null,t.value.gitpod?{name:`${s("common.gitpod")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null].filter(Boolean):[];Array.isArray(K(t,"value.blockletEngines",null))&&t.value.blockletEngines.filter(n=>n.visible&&n.available).forEach(n=>{T.push({name:n.displayName,value:e.jsx(j,{type:"success",children:`${n.version}`||"N/A"})})});const G=c.length,A=c.filter(n=>n.approved).length;let P=G;A&&(P+=`<small><strong>${se(s("common.approved"))} ${A}</strong></small>`);let S=0,C=0;u&&(S=u.length,C=u.filter(n=>z.isBlockletRunning(n)).length),Array.isArray(l)&&(S+=l.length,C+=l.filter(n=>z.isBlockletRunning(n)).length);let I=S;C&&(I+=`<small>${s("common.running")} ${C}</small>`);const O=[{name:s("common.blocklets"),value:I},{name:s("common.members"),value:P},{name:s("common.uptime"),value:f},{name:s("common.created"),value:ne(new Date(a.createdAt).getTime(),B(p))}];let E=[];t.value&&t.value.disk&&Object.values(t.value.disk).some(n=>n>0)&&(E=[{name:s("common.blockletsStorage"),value:k(t.value.disk.blocklets||0).toUpperCase()},{name:s("common.dataStorage"),value:k(t.value.disk.data||0).toUpperCase()},{name:s("common.logStorage"),value:k(t.value.disk.log||0).toUpperCase()},{name:s("common.cacheStorage"),value:k(t.value.disk.cache||0).toUpperCase()},{name:s("common.coreStorage"),value:k(t.value.disk.app||0).toUpperCase()}]),b=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.overview")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:O.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),E.length>0&&e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.storage")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:E.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.meta")}),e.jsxs(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:[e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.dAddress")}),o.map(n=>e.jsx(U,{nameWidth:150,name:n.name,children:n.value},n.name)),m.length>0&&e.jsxs("div",{style:{marginTop:_.spacing(8)},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.launcher")}),m.map(n=>e.jsx(U,{nameWidth:150,name:n.name,children:n.value},n.name))]})]},"address"),e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.env")}),T.map(n=>e.jsx(U,{valueComponent:"div",nameWidth:150,name:n.name,children:n.value},n.name))]},"environment")]})]})]})}return e.jsx(ce,{children:b})}const ce=q.main`
2
2
  .page-header {
3
3
  display: flex;
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{ak as ee,A as T,r as f,a as te,b as se,V as S,u as j,x as re,aw as A,i as F,j as t,w as q,ax as oe,T as C,y as k,$,o as m,ay as ne,O as ae,v as _,C as N,az as ie,H as W,Y as O,aA as le,aB as ce,K as E,aC as ue,L as de,aD as pe,aa as he,s as M,a7 as fe,a8 as me,aE as ge,a9 as xe}from"./index-DY4IRZzA.js";import{u as L}from"./useLocalStorage-X_cL3pYP.js";import{C as be,c as ke,e as ye,_ as Se,a as je,d as we,s as ve,S as V,b as Pe,A as Ce}from"./item-CqSM8aGX.js";import{e as D}from"./engine-BomELkty.js";import{g as U}from"./get-safe-url-D4wQQAus.js";import{P as z}from"./permission-C1lOJdTa.js";import{A as Re}from"./ArrowDropDown-Dt1OnkjV.js";import{B as Le}from"./Breadcrumbs-DngVGj6f.js";import"./index-rdWEFiu5.js";import"./KeyboardArrowDown-BW2EjmL2.js";import"./ChevronLeft-ByepaSoC.js";import"./ChevronRight-Cf_5Xzjf.js";import"./Search-BcGKbDLr.js";import"./index-C3qhc5Io.js";import"./blocklet-DrlbndLu.js";import"./Autocomplete-YxXH99vB.js";import"./ListSubheader-EtXBMK8f.js";import"./Verified-BBY_HS8b.js";import"./VerifiedUser-CsU_SR-Q.js";import"./Add-BuqBIDFA.js";import"./Launch-O8wdtoRZ.js";import"./Done--5OjVF1L.js";import"./DeleteOutline-ebJSYeqv.js";import"./delete-confirm-DLgDxKNU.js";import"./click-to-copy-mgbEjAVp.js";import"./MoreVert-DIAAjKU1.js";import"./ButtonGroup-BtGO-VCX.js";import"./getValidReactChildren-C1VhNdur.js";function Be(e){const r=ee(),c=T(),[s,o]=L(`sid:blocklet:purchase:${e}`),[l,u]=f.useState(!1),[d,a]=f.useState(null),p=()=>{const{pathname:n,searchParams:b}=new URL(window.location.href),g=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";b.get("sid")&&(o(""),c(n.replace(g,"/"),{replace:!0}))},i=!!(r.get("assetDid")&&s&&r.get("sid")===s);return te(se.BlockletEvents.purchaseChange,n=>{n.did===e&&(a(n.session),["declined","confirmed","error"].includes(n.session.status)&&(u(!0),setTimeout(p,2e3)))}),f.useEffect(()=>{d&&d.id!==s&&o(d.id)},[d]),{hasCompleted:l,hasPurchased:i,session:d,setSession:a,doRedirect:p}}function De(e){setTimeout(()=>{window.location.href=U(e,{allowDomains:null})},1e3)}function K({meta:e,onCancel:r,handlePaySuccess:c=De,storeUrl:s}){const{t:o}=S(),{info:l}=j(),[u,d]=f.useState("both"),[a,p]=f.useState(1),i=re(l),n=A(e,l,s),b=P=>{P!==u&&d(P)},g=()=>{u&&(p(2),u==="verify"&&(window.location.href=U(n)))},w=(P,B)=>{B!=="backdropClick"&&r()},x=()=>{c(n)},h=F.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(q,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:oe.create({baseURL:k(s,"/store")}).get,onSuccess:x,onClose:r,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:i,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:h}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(C,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(C,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:h})]})]})}});const v=$;return t.jsx(v,{title:o("store.purchase.title",{name:h}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:w,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(be,{action:u,onNext:g,onSelect:b})})})}K.propTypes={...ke,storeUrl:m.string.isRequired,handlePaySuccess:m.func};function H({meta:e,buttonText:r,storeUrl:c,isResource:s=!1}){const{t:o}=S(),l=T(),{info:u}=j(),{api:d}=ne(),a=F.isFreeBlocklet(e)===!1,[p,i]=f.useState(!1),{hasPurchased:n}=Be(e.did),[b,g]=f.useState(!1),[w]=L("instant-blocklet-install",!1),[x,h]=f.useState(!1),v=f.useMemo(()=>p?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[p,o,a]),P=f.useMemo(()=>s?o("blocklet.status.resource"):a?r.purchase:r.launch,[a,r,s]),B=y=>{y.preventDefault(),y.stopPropagation();try{if(i(!0),a){g(!0);return}if(w){h(!0);return}if(!a){const R=A(e,u,c);window.location.href=U(R)}}catch(R){W.error(O(R),{autoHideDuration:5e3}),console.error("Blocklet installed failed",R)}finally{i(!1)}},J=()=>{i(!1),g(!1)},X=y=>{i(!1),h(!1),l(`/blocklets/${y.appDid}/components`)},Z=()=>{i(!1),h(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(z,{permission:"mutate_blocklets",children:y=>t.jsx(ae,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(_,{onClick:B,size:"small",sx:{cursor:s?"not-allowed":"pointer",overflow:"hidden"},disabled:!!(v||!y),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:v?t.jsxs(t.Fragment,{children:[t.jsx(N,{size:16,style:{marginRight:3}}),v]}):P},e.did)})})}),(n||b)&&t.jsx(K,{method:"launch",meta:e,mode:"both",onCancel:J,storeUrl:c}),x&&t.jsx(q,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:d.get,checkTimeout:5*60*1e3,onSuccess:X,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ie(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:Z})]})}H.propTypes={isResource:m.bool,meta:m.object.isRequired,buttonText:m.shape({purchase:m.string.isRequired,launch:m.string.isRequired}).isRequired,storeUrl:m.string.isRequired};const Ee=(e,r,c)=>{const s=he(r);return k(c,`/blocklets/${e.did}/?server-url=${s}`)},I=({meta:e,attribute:r,value:c})=>e._formatted?e._formatted[r]:c,Ue=(e,r)=>{if(!e||!r)return"";try{return k(r,e)}catch(c){return console.warn("Failed to construct avatar URL:",c),""}};function G({blocklet:e,endpoint:r="",serverVersion:c=""}){const{t:s}=S(),o=j();let l=k(o.imgPrefix,"blocklet.png");const u=r;if(u.startsWith("http")&&e.logo)l=k(u,ue(e.did,e.logo,e.version));else{let n=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");n&&(n=`/${n}`),l=k(n,`/blocklet/logo/${e.did}`)}try{const i=new URL(l);i.searchParams.set("v",e.version||+new Date),l=i.href}catch{}const d=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),a={meta:e,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:u},p=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(je,{serverVersion:c,requirementVersion:e.requirements?.server,size:"small",children:t.jsx(H,{isResource:!(D.hasStartEngine(e)||D.isGatewayBlocklet(e)||D.isPackBlocklet(e)),...a})})});return t.jsx(de,{href:Ee(e,o.info,r),style:{color:"initial",textDecoration:"none"},onClick:d,target:"_blank",children:t.jsx(Ie,{title:I({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:I({meta:e,attribute:"description",value:e.description}),cover:e.logo?l:"",version:e.version,onButtonClick:null,icons:e.docker?.image?[{key:"docker",icon:t.jsx(E,{sx:{display:"flex",color:"primary.main"},children:t.jsx(pe,{icon:we})}),title:s("blocklet.dockerImage")}]:[],official:e.isOfficial?{tooltip:s("blocklet.component.isOfficial")}:void 0,author:e.owner.fullName,avatar:Ue(e.owner.avatar,r),download:e.stats.downloads,button:p})})}G.propTypes={blocklet:m.object.isRequired,serverVersion:m.string,endpoint:m.string};function Y({storeUrl:e,handleSearchSelect:r=null,extraFilter:c=void 0,...s}){const{locale:o}=S(),l=j(),[u,d]=f.useState({}),a=n=>{d(n)},p=e,i=l?.info?.version;return f.useEffect(()=>{d({})},[p]),t.jsx(le,{FallbackComponent:ce,resetKeys:[p],children:t.jsx(E,{...s,sx:{"& .title-bar":{pt:0},".blocklet-list":{mt:0},"& h2":{display:"none"}},children:t.jsx(Se,{layout:{showExplore:!1,showTitle:!0},blockletRender:n=>t.jsx(G,{...n,endpoint:p}),baseSearch:!0,endpoint:p,locale:o,onFilterChange:a,onSearchSelect:r,filters:u,extraFilter:c,serverVersion:i})})})}Y.propTypes={storeUrl:m.string.isRequired,handleSearchSelect:m.func,extraFilter:m.func};const Ie=M(ve)`
1
+ import{ak as ee,A as T,r as f,a as te,b as se,V as S,u as j,x as re,aw as A,i as F,j as t,w as q,ax as oe,T as C,y as k,$,o as m,ay as ne,O as ae,v as _,C as N,az as ie,H as W,Y as O,aA as le,aB as ce,K as E,aC as ue,L as de,aD as pe,aa as he,s as M,a7 as fe,a8 as me,aE as ge,a9 as xe}from"./index-BZORkGy0.js";import{u as L}from"./useLocalStorage-B6bhow_S.js";import{C as be,c as ke,e as ye,_ as Se,a as je,d as we,s as ve,S as V,b as Pe,A as Ce}from"./item-BLPIRYzp.js";import{e as D}from"./engine-B8GFtkk-.js";import{g as U}from"./get-safe-url-14Q6Gfeh.js";import{P as z}from"./permission-DHM_Uhje.js";import{A as Re}from"./ArrowDropDown-BoUU1BUL.js";import{B as Le}from"./Breadcrumbs-Bj53u8dH.js";import"./index-55nfVIC0.js";import"./KeyboardArrowDown-TYg9Qprk.js";import"./ChevronLeft-CsonlqWZ.js";import"./ChevronRight-slnHJMMM.js";import"./Search-CIrZ9Ibh.js";import"./index-Qj6_gIRY.js";import"./blocklet-Co-qXCPC.js";import"./Autocomplete-C6KZatsu.js";import"./ListSubheader-CSUXgXE1.js";import"./Verified-BIJapS2b.js";import"./VerifiedUser-Bo-g1veK.js";import"./Add-CwJyd37s.js";import"./Launch-BkIcZSam.js";import"./Done-D3SMiC_1.js";import"./DeleteOutline-C9MsS08w.js";import"./delete-confirm-DbYfIB8I.js";import"./click-to-copy-DlpsaegJ.js";import"./MoreVert-DuXHnJM1.js";import"./ButtonGroup-uhq9NqjP.js";import"./getValidReactChildren-5khuIcs7.js";function Be(e){const r=ee(),c=T(),[s,o]=L(`sid:blocklet:purchase:${e}`),[l,u]=f.useState(!1),[d,a]=f.useState(null),p=()=>{const{pathname:n,searchParams:b}=new URL(window.location.href),g=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";b.get("sid")&&(o(""),c(n.replace(g,"/"),{replace:!0}))},i=!!(r.get("assetDid")&&s&&r.get("sid")===s);return te(se.BlockletEvents.purchaseChange,n=>{n.did===e&&(a(n.session),["declined","confirmed","error"].includes(n.session.status)&&(u(!0),setTimeout(p,2e3)))}),f.useEffect(()=>{d&&d.id!==s&&o(d.id)},[d]),{hasCompleted:l,hasPurchased:i,session:d,setSession:a,doRedirect:p}}function De(e){setTimeout(()=>{window.location.href=U(e,{allowDomains:null})},1e3)}function K({meta:e,onCancel:r,handlePaySuccess:c=De,storeUrl:s}){const{t:o}=S(),{info:l}=j(),[u,d]=f.useState("both"),[a,p]=f.useState(1),i=re(l),n=A(e,l,s),b=P=>{P!==u&&d(P)},g=()=>{u&&(p(2),u==="verify"&&(window.location.href=U(n)))},w=(P,B)=>{B!=="backdropClick"&&r()},x=()=>{c(n)},h=F.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(q,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:oe.create({baseURL:k(s,"/store")}).get,onSuccess:x,onClose:r,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:i,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:h}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(C,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(C,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:h})]})]})}});const v=$;return t.jsx(v,{title:o("store.purchase.title",{name:h}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:w,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(be,{action:u,onNext:g,onSelect:b})})})}K.propTypes={...ke,storeUrl:m.string.isRequired,handlePaySuccess:m.func};function H({meta:e,buttonText:r,storeUrl:c,isResource:s=!1}){const{t:o}=S(),l=T(),{info:u}=j(),{api:d}=ne(),a=F.isFreeBlocklet(e)===!1,[p,i]=f.useState(!1),{hasPurchased:n}=Be(e.did),[b,g]=f.useState(!1),[w]=L("instant-blocklet-install",!1),[x,h]=f.useState(!1),v=f.useMemo(()=>p?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[p,o,a]),P=f.useMemo(()=>s?o("blocklet.status.resource"):a?r.purchase:r.launch,[a,r,s]),B=y=>{y.preventDefault(),y.stopPropagation();try{if(i(!0),a){g(!0);return}if(w){h(!0);return}if(!a){const R=A(e,u,c);window.location.href=U(R)}}catch(R){W.error(O(R),{autoHideDuration:5e3}),console.error("Blocklet installed failed",R)}finally{i(!1)}},J=()=>{i(!1),g(!1)},X=y=>{i(!1),h(!1),l(`/blocklets/${y.appDid}/components`)},Z=()=>{i(!1),h(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(z,{permission:"mutate_blocklets",children:y=>t.jsx(ae,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(_,{onClick:B,size:"small",sx:{cursor:s?"not-allowed":"pointer",overflow:"hidden"},disabled:!!(v||!y),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:v?t.jsxs(t.Fragment,{children:[t.jsx(N,{size:16,style:{marginRight:3}}),v]}):P},e.did)})})}),(n||b)&&t.jsx(K,{method:"launch",meta:e,mode:"both",onCancel:J,storeUrl:c}),x&&t.jsx(q,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:d.get,checkTimeout:5*60*1e3,onSuccess:X,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ie(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:Z})]})}H.propTypes={isResource:m.bool,meta:m.object.isRequired,buttonText:m.shape({purchase:m.string.isRequired,launch:m.string.isRequired}).isRequired,storeUrl:m.string.isRequired};const Ee=(e,r,c)=>{const s=he(r);return k(c,`/blocklets/${e.did}/?server-url=${s}`)},I=({meta:e,attribute:r,value:c})=>e._formatted?e._formatted[r]:c,Ue=(e,r)=>{if(!e||!r)return"";try{return k(r,e)}catch(c){return console.warn("Failed to construct avatar URL:",c),""}};function G({blocklet:e,endpoint:r="",serverVersion:c=""}){const{t:s}=S(),o=j();let l=k(o.imgPrefix,"blocklet.png");const u=r;if(u.startsWith("http")&&e.logo)l=k(u,ue(e.did,e.logo,e.version));else{let n=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");n&&(n=`/${n}`),l=k(n,`/blocklet/logo/${e.did}`)}try{const i=new URL(l);i.searchParams.set("v",e.version||+new Date),l=i.href}catch{}const d=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),a={meta:e,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:u},p=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(je,{serverVersion:c,requirementVersion:e.requirements?.server,size:"small",children:t.jsx(H,{isResource:!(D.hasStartEngine(e)||D.isGatewayBlocklet(e)||D.isPackBlocklet(e)),...a})})});return t.jsx(de,{href:Ee(e,o.info,r),style:{color:"initial",textDecoration:"none"},onClick:d,target:"_blank",children:t.jsx(Ie,{title:I({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:I({meta:e,attribute:"description",value:e.description}),cover:e.logo?l:"",version:e.version,onButtonClick:null,icons:e.docker?.image?[{key:"docker",icon:t.jsx(E,{sx:{display:"flex",color:"primary.main"},children:t.jsx(pe,{icon:we})}),title:s("blocklet.dockerImage")}]:[],official:e.isOfficial?{tooltip:s("blocklet.component.isOfficial")}:void 0,author:e.owner.fullName,avatar:Ue(e.owner.avatar,r),download:e.stats.downloads,button:p})})}G.propTypes={blocklet:m.object.isRequired,serverVersion:m.string,endpoint:m.string};function Y({storeUrl:e,handleSearchSelect:r=null,extraFilter:c=void 0,...s}){const{locale:o}=S(),l=j(),[u,d]=f.useState({}),a=n=>{d(n)},p=e,i=l?.info?.version;return f.useEffect(()=>{d({})},[p]),t.jsx(le,{FallbackComponent:ce,resetKeys:[p],children:t.jsx(E,{...s,sx:{"& .title-bar":{pt:0},".blocklet-list":{mt:0},"& h2":{display:"none"}},children:t.jsx(Se,{layout:{showExplore:!1,showTitle:!0},blockletRender:n=>t.jsx(G,{...n,endpoint:p}),baseSearch:!0,endpoint:p,locale:o,onFilterChange:a,onSearchSelect:r,filters:u,extraFilter:c,serverVersion:i})})})}Y.propTypes={storeUrl:m.string.isRequired,handleSearchSelect:m.func,extraFilter:m.func};const Ie=M(ve)`
2
2
  .ms-highlight {
3
3
  color: ${e=>e.theme.palette.primary.main};
4
4
  }
@@ -1 +1 @@
1
- import{bK as r,fb as _,gW as e}from"./index-DY4IRZzA.js";const i={en:_(e),ar:()=>r(()=>import("./ar-Cwm1-0yA.js"),[],import.meta.url).then(t=>_(t.default)),de:()=>r(()=>import("./de-XQM4sDLo.js"),[],import.meta.url).then(t=>_(t.default)),es:()=>r(()=>import("./es-D4zFwVhj.js"),[],import.meta.url).then(t=>_(t.default)),fr:()=>r(()=>import("./fr-BQXlmrTL.js"),[],import.meta.url).then(t=>_(t.default)),hi:()=>r(()=>import("./hi-Cdz2GskJ.js"),[],import.meta.url).then(t=>_(t.default)),id:()=>r(()=>import("./id-Q9i8FdSt.js"),[],import.meta.url).then(t=>_(t.default)),ja:()=>r(()=>import("./ja-CH8WZngC.js"),[],import.meta.url).then(t=>_(t.default)),ko:()=>r(()=>import("./ko-Nli9PwTV.js"),[],import.meta.url).then(t=>_(t.default)),pt:()=>r(()=>import("./pt-eVksFEJb.js"),[],import.meta.url).then(t=>_(t.default)),ru:()=>r(()=>import("./ru-ycnIgUGb.js"),[],import.meta.url).then(t=>_(t.default)),th:()=>r(()=>import("./th-BvLhxkpi.js"),[],import.meta.url).then(t=>_(t.default)),vi:()=>r(()=>import("./vi-BmM-09Iq.js"),[],import.meta.url).then(t=>_(t.default)),"zh-TW":()=>r(()=>import("./zh-tw-CW4J6ddt.js"),[],import.meta.url).then(t=>_(t.default)),zh:()=>r(()=>import("./zh-BkVzTN9N.js"),[],import.meta.url).then(t=>_(t.default))};export{i as t};
1
+ import{bK as r,fb as _,gW as e}from"./index-BZORkGy0.js";const i={en:_(e),ar:()=>r(()=>import("./ar-Cwm1-0yA.js"),[],import.meta.url).then(t=>_(t.default)),de:()=>r(()=>import("./de-XQM4sDLo.js"),[],import.meta.url).then(t=>_(t.default)),es:()=>r(()=>import("./es-D4zFwVhj.js"),[],import.meta.url).then(t=>_(t.default)),fr:()=>r(()=>import("./fr-BQXlmrTL.js"),[],import.meta.url).then(t=>_(t.default)),hi:()=>r(()=>import("./hi-Cdz2GskJ.js"),[],import.meta.url).then(t=>_(t.default)),id:()=>r(()=>import("./id-Q9i8FdSt.js"),[],import.meta.url).then(t=>_(t.default)),ja:()=>r(()=>import("./ja-CH8WZngC.js"),[],import.meta.url).then(t=>_(t.default)),ko:()=>r(()=>import("./ko-Nli9PwTV.js"),[],import.meta.url).then(t=>_(t.default)),pt:()=>r(()=>import("./pt-eVksFEJb.js"),[],import.meta.url).then(t=>_(t.default)),ru:()=>r(()=>import("./ru-ycnIgUGb.js"),[],import.meta.url).then(t=>_(t.default)),th:()=>r(()=>import("./th-BvLhxkpi.js"),[],import.meta.url).then(t=>_(t.default)),vi:()=>r(()=>import("./vi-BmM-09Iq.js"),[],import.meta.url).then(t=>_(t.default)),"zh-TW":()=>r(()=>import("./zh-tw-CW4J6ddt.js"),[],import.meta.url).then(t=>_(t.default)),zh:()=>r(()=>import("./zh-BkVzTN9N.js"),[],import.meta.url).then(t=>_(t.default))};export{i as t};
@@ -1 +1 @@
1
- import{r as P,V as E,A as C,j as e,Z as W,C as j,cG as I,K as T,w as k,H as u,aH as S,u as U,x as v,ar as N,af as R}from"./index-DY4IRZzA.js";import{w as b}from"./wrap-locale-LMhScF83.js";import{g as L}from"./get-safe-url-D4wQQAus.js";import"./index-DItDGwwa.js";function H({SessionContext:n,webWalletUrl:a,onSuccess:r}){const{api:o,session:t}=P.useContext(n),{t:s,locale:g}=E(),h=C(),{searchParams:l}=new URL(window.location.href),p=l.get("redirect"),f=async(c,w)=>{r(c,w),await t.refresh(),u.success(s("exchangePassport.success")),setTimeout(()=>{if(p){const i=decodeURIComponent(p);i.startsWith(S.WELLKNOWN_SERVICE_PATH_PREFIX)?h(i,{replace:!0}):window.location.href=L(i)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},m=c=>{u.error(c.message)},d={},x=l.get("componentId");return x&&(d.componentId=x),t.loading?e.jsx(W,{children:e.jsx(j,{})}):e.jsx(I,{did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(T,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(k,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:f,onError:m,locale:g,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:d,extraContent:null,hideCloseButton:!0})})})}const K=b(H);function V(){const{info:n}=U(),a=v(n),r=(o,t)=>{o.sessionToken&&R(t(o.sessionToken))};return e.jsx(K,{SessionContext:N,webWalletUrl:a,onSuccess:r})}export{V as default};
1
+ import{r as P,V as E,A as C,j as e,Z as W,C as j,cG as I,K as T,w as k,H as u,aH as S,u as U,x as v,ar as N,af as R}from"./index-BZORkGy0.js";import{w as b}from"./wrap-locale-CJqYMDgp.js";import{g as L}from"./get-safe-url-14Q6Gfeh.js";import"./index-BfVOZvkh.js";function H({SessionContext:n,webWalletUrl:a,onSuccess:r}){const{api:o,session:t}=P.useContext(n),{t:s,locale:g}=E(),h=C(),{searchParams:l}=new URL(window.location.href),p=l.get("redirect"),f=async(c,w)=>{r(c,w),await t.refresh(),u.success(s("exchangePassport.success")),setTimeout(()=>{if(p){const i=decodeURIComponent(p);i.startsWith(S.WELLKNOWN_SERVICE_PATH_PREFIX)?h(i,{replace:!0}):window.location.href=L(i)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},m=c=>{u.error(c.message)},d={},x=l.get("componentId");return x&&(d.componentId=x),t.loading?e.jsx(W,{children:e.jsx(j,{})}):e.jsx(I,{did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(T,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(k,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:f,onError:m,locale:g,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:d,extraContent:null,hideCloseButton:!0})})})}const K=b(H);function V(){const{info:n}=U(),a=v(n),r=(o,t)=>{o.sessionToken&&R(t(o.sessionToken))};return e.jsx(K,{SessionContext:N,webWalletUrl:a,onSuccess:r})}export{V as default};
@@ -1 +1 @@
1
- import{j as e,cG as j,K as v,A as P,r as a,p as S,ay as k,u as w,x as K,f as b,aP as E,dj as W,aT as i,b8 as _,w as U,Z as N,C as R,dk as T,dl as z}from"./index-DY4IRZzA.js";import{p as c}from"./index-alA_n9r0.js";function o({children:r,...s}){return e.jsx(j,{...s,did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(v,{sx:{maxWidth:"100%",height:"100%"},children:r})})}function F(){const r=P(),{t:s,locale:d}=a.useContext(S),{api:l}=k(),{info:u}=w(),p=K(u),f=b(),n=E({ready:!1,success:!1,error:null,invalidSession:!1}),h=W(),m=()=>{try{const t=new URL(window.location.href);if(t.hash.includes("invalid")){n.invalidSession=!0;return}const g=t.searchParams.get("__connect_url__"),y=T(g);if(!z(y))throw new Error;n.ready=!0}catch{n.invalidSession=!0,r("#invalid",{replace:!0})}};a.useLayoutEffect(()=>m(),[]);const x=i(t=>{n.error=t.message,r("#invalid",{replace:!0})}),C=i(()=>{n.success=!0});if(n.invalidSession)return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.invalidSession"),description:s("didConnect.common.invalidSessionDesc")})});if(n.error){const t=n.error;return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.connectionError"),description:t})})}return n.success?e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"info",icon:e.jsx(_,{style:{color:f.palette.success.main,fontSize:72}}),title:s("didConnect.genKeyPair.success"),description:s("didConnect.genKeyPair.successDesc")})}):n.ready?e.jsx(o,{children:e.jsx(U,{className:"connect",action:"gen-key-pair",checkFn:l.get,checkTimeout:10*60*1e3,extraParams:{sourceAppPid:h?.appPid,forceSwitch:!0},saveConnect:!1,forceConnected:!1,webWalletUrl:p,onSuccess:C,onError:x,locale:d,messages:{title:s("didConnect.genKeyPair.title"),scan:s("didConnect.genKeyPair.scan"),confirm:s("auth.confirm"),success:s("didConnect.genKeyPair.success")},popup:!0,open:!0,hideCloseButton:!0})},"ready"):e.jsx(N,{children:e.jsx(R,{})})}export{F as default};
1
+ import{j as e,cG as j,K as v,A as P,r as a,p as S,ay as k,u as w,x as K,f as b,aP as E,dj as W,aT as i,b8 as _,w as U,Z as N,C as R,dk as T,dl as z}from"./index-BZORkGy0.js";import{p as c}from"./index-DbucqiHf.js";function o({children:r,...s}){return e.jsx(j,{...s,did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(v,{sx:{maxWidth:"100%",height:"100%"},children:r})})}function F(){const r=P(),{t:s,locale:d}=a.useContext(S),{api:l}=k(),{info:u}=w(),p=K(u),f=b(),n=E({ready:!1,success:!1,error:null,invalidSession:!1}),h=W(),m=()=>{try{const t=new URL(window.location.href);if(t.hash.includes("invalid")){n.invalidSession=!0;return}const g=t.searchParams.get("__connect_url__"),y=T(g);if(!z(y))throw new Error;n.ready=!0}catch{n.invalidSession=!0,r("#invalid",{replace:!0})}};a.useLayoutEffect(()=>m(),[]);const x=i(t=>{n.error=t.message,r("#invalid",{replace:!0})}),C=i(()=>{n.success=!0});if(n.invalidSession)return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.invalidSession"),description:s("didConnect.common.invalidSessionDesc")})});if(n.error){const t=n.error;return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.connectionError"),description:t})})}return n.success?e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"info",icon:e.jsx(_,{style:{color:f.palette.success.main,fontSize:72}}),title:s("didConnect.genKeyPair.success"),description:s("didConnect.genKeyPair.successDesc")})}):n.ready?e.jsx(o,{children:e.jsx(U,{className:"connect",action:"gen-key-pair",checkFn:l.get,checkTimeout:10*60*1e3,extraParams:{sourceAppPid:h?.appPid,forceSwitch:!0},saveConnect:!1,forceConnected:!1,webWalletUrl:p,onSuccess:C,onError:x,locale:d,messages:{title:s("didConnect.genKeyPair.title"),scan:s("didConnect.genKeyPair.scan"),confirm:s("auth.confirm"),success:s("didConnect.genKeyPair.success")},popup:!0,open:!0,hideCloseButton:!0})},"ready"):e.jsx(N,{children:e.jsx(R,{})})}export{F as default};
@@ -1 +1 @@
1
- import{aF as le,j as e,hw as ce,be as ue,bo as Z,V as G,gk as ee,f9 as te,aP as re,aT as u,H as E,hx as M,K as R,t as x,hy as V,aV as H,P as p,O as de,v as W,s as ie,aW as ne,z as me,y as fe,aH as he,r as B,p as xe,bE as pe}from"./index-DY4IRZzA.js";import{T as ve}from"./html-title-CDtGVxaB.js";import{u as se,C as m}from"./index.esm-CAXrUMkM.js";import{S as h,A as je,a as be,b as ge,c as ye}from"./collapse-DPhRCMT_.js";import{u as ae}from"./blocklet-DrlbndLu.js";import{S as $}from"./Switch-BhNob30A.js";const Re=le(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}));var K={exports:{}},O={exports:{}},z={exports:{}},J;function ke(){return J||(J=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=t;function t(d){return d==null}c.exports=s.default,c.exports.default=s.default}(z,z.exports)),z.exports}var Q;function we(){return Q||(Q=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=S;var t=b(ce()),d=b(ke());function b(n){return n&&n.__esModule?n:{default:n}}var f=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,P=/^[-+]?[0-9]+$/;function S(n,i){(0,t.default)(n),i=i||{};var _=i.allow_leading_zeroes===!1?f:P,q=!i.hasOwnProperty("min")||(0,d.default)(i.min)||n>=i.min,l=!i.hasOwnProperty("max")||(0,d.default)(i.max)||n<=i.max,a=!i.hasOwnProperty("lt")||(0,d.default)(i.lt)||n<i.lt,C=!i.hasOwnProperty("gt")||(0,d.default)(i.gt)||n>i.gt;return _.test(n)&&q&&l&&a&&C}c.exports=s.default,c.exports.default=s.default}(O,O.exports)),O.exports}var X;function Te(){return X||(X=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=b;var t=d(we());function d(f){return f&&f.__esModule?f:{default:f}}function b(f){return(0,t.default)(f,{allow_leading_zeroes:!1,min:0,max:65535})}c.exports=s.default,c.exports.default=s.default}(K,K.exports)),K.exports}var Ee=Te();const Se=ue(Ee),D={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function Ce(){const{api:c}=Z(),{blocklet:s}=ae(),{t}=G(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...D},s?.settings?.notification?.email||{}),{handleSubmit:S,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(D))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(r,g,T=!0)=>{try{const{blocklet:y}=await c.configNotification({input:{did:f,notification:JSON.stringify({email:r})}}),oe=Object.assign({...D},y?.settings?.notification?.email||{});q(oe),T&&E.success(t("oauth.saveSuccess"))}catch(y){if(T)E.error(y.message||t("oauth.saveFailed"));else throw y}}),N=u(async(r,g,T)=>{try{i.isDirty&&await C(r,g,!1),await c.sendEmail({input:{did:f,receiver:T,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),E.success(t("notification.email.testSuccess"))}catch(y){E.error(y.message||t("notification.email.testfailed"))}}),A=u((r,g)=>{l.testReceiver=localStorage.getItem("test-receiver")||"",l.testReceiverError="",d.open({title:t("notification.email.testSendEmail"),content:()=>e.jsx(R,{sx:{width:"300px"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:l.testReceiver,onChange:T=>{l.testReceiver=T.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(T){const y=l.testReceiver?.trim();if(!y){l.testReceiverError=t("notification.email.receiverRequired");return}if(!M(y)){l.testReceiverError=t("notification.email.receiverInvalid");return}l.testReceiverError="",await N(r,g,y),T()}})}),F=u(r=>{const g=r?.trim();return g?M(g)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),L=u(r=>{const g=r?.trim();return g?V(g,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),o=u(r=>r?Se(r)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),k=u(r=>r?.trim()?!0:t("notification.email.userRequired")),v=u(r=>r?.trim()?!0:t("notification.email.passwordRequired")),w=u(r=>r?.trim()&&!V(r,{protocols:["http","https"],require_protocol:!0})?t("notification.email.linkInvalid"):!0),I=u(r=>r?.trim()&&!M(r)?t("notification.email.emailInvalid"):!0),j=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(Pe,{component:"form",onSubmit:S(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.email.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:r})=>e.jsx(H,{control:e.jsx($,{checked:r.value,...r})})})}),e.jsx(h,{title:t("notification.email.from"),children:e.jsx(m,{name:"from",control:n,rules:{validate:a?F:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,label:t("notification.email.from"),error:!!i.errors[r.name],helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.host"),children:e.jsx(m,{name:"host",control:n,rules:{validate:a?L:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.host"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.port"),children:e.jsx(m,{name:"port",control:n,rules:{validate:a?o:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"number",error:!!i.errors[r.name],label:t("notification.email.port"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.user"),children:e.jsx(m,{name:"user",control:n,rules:{validate:a?k:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.user"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.password"),children:e.jsx(m,{name:"password",control:n,rules:{validate:a?v:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"password",error:!!i.errors[r.name],label:t("notification.email.password"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.secure"),children:e.jsx(m,{name:"secure",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(H,{control:e.jsx($,{checked:r.value,...r,disabled:!a})})})})}),e.jsxs(je,{children:[e.jsxs(be,{expandIcon:e.jsx(ge,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[t("notification.email.signature"),e.jsx(de,{title:t("notification.email.signatureTooltip"),children:e.jsx(Re,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(ye,{children:[e.jsx(h,{title:t("notification.email.companyName"),children:e.jsx(m,{name:"companyName",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyName"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyLink"),children:e.jsx(m,{name:"companyLink",control:n,rules:{validate:a?w:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyLink"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyAddress"),children:e.jsx(m,{name:"companyAddress",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyAddress"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.supportEmail"),children:e.jsx(m,{name:"supportEmail",control:n,rules:{validate:a?I:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",type:"email",error:!!i.errors[r.name],label:t("notification.email.supportEmail"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})})]})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(W,{variant:"outlined",color:"warning",onClick:S(A),disabled:!a,children:t("oauth.runTest")}),e.jsx(W,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const Pe=ie(ne)``,U={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function _e(){const{api:c}=Z(),{blocklet:s}=ae(),{t}=G(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...U},s?.settings?.notification?.pushKit||{}),{handleSubmit:S,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(U))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(o,k,v=!0)=>{try{const{blocklet:w}=await c.configNotification({input:{did:f,notification:JSON.stringify({pushKit:o})}}),I=Object.assign({...U},w?.settings?.notification?.pushKit||{});q(I),v&&E.success(t("oauth.saveSuccess"))}catch(w){if(v)E.error(w.message||t("oauth.saveFailed"));else throw w}}),N=u(async(o,k)=>{try{i.isDirty&&await C(o,k,!1);const v=(s?.configs||[]).find(j=>j.key==="BLOCKLET_APP_URL")?.value,w=me(fe(v,he.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:s?.meta?.version,t:new Date(s?.updatedAt||0).getTime()}),I={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:s?.appDid,fullName:s?.meta?.title,avatar:w}}}};await c.sendPush({input:{did:f,receiver:l.testReceiver,notification:JSON.stringify(I)}}),E.success(t("notification.pushKit.testSuccess"))}catch(v){E.error(v.message||t("notification.pushKit.testfailed"))}}),A=u((o,k)=>{l.testReceiverError="",d.open({title:t("notification.pushKit.testSend"),content:()=>e.jsx(R,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:l.testReceiver,onChange:v=>{l.testReceiver=v.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(v){if(!l.testReceiver?.trim()){l.testReceiverError=t("notification.pushKit.receiverRequired");return}l.testReceiverError="",await N(o,k),v()}})}),F=u(o=>{const k=o?.trim();return k?V(k)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),L=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(qe,{component:"form",onSubmit:S(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.pushKit.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:o})=>e.jsx(H,{control:e.jsx($,{checked:o.value,...o})})})}),e.jsx(h,{title:t("notification.pushKit.endpoint"),children:e.jsx(m,{name:"endpoint",control:n,rules:{validate:a?F:L},render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",required:!0,label:t("notification.pushKit.endpoint"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})}),e.jsxs(h,{title:t("notification.pushKit.customOptions"),children:[e.jsx(m,{name:"did",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.did"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})}),e.jsx(m,{name:"pushPath",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.pushPath"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(W,{variant:"outlined",color:"warning",onClick:S(A),disabled:!a,children:t("oauth.runTest")}),e.jsx(W,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const qe=ie(ne)``,Y=[{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"}];function Ae(){const[c,s]=B.useState(Y[0].value),{locale:t}=B.useContext(xe),d=pe(()=>({email:e.jsx(Ce,{}),pushKit:e.jsx(_e,{})}),[t]),b=B.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(R,{children:[e.jsx(ve,{tabs:Y,current:c,onChange:s}),e.jsx(R,{style:b,children:d[c]})]})}export{Ae as B};
1
+ import{aF as le,j as e,hw as ce,be as ue,bo as Z,V as G,gk as ee,f9 as te,aP as re,aT as u,H as E,hx as M,K as R,t as x,hy as V,aV as H,P as p,O as de,v as W,s as ie,aW as ne,z as me,y as fe,aH as he,r as B,p as xe,bE as pe}from"./index-BZORkGy0.js";import{T as ve}from"./html-title-CH-hjuPz.js";import{u as se,C as m}from"./index.esm-DQbImx_I.js";import{S as h,A as je,a as be,b as ge,c as ye}from"./collapse-DOmRxR9w.js";import{u as ae}from"./blocklet-Co-qXCPC.js";import{S as $}from"./Switch-CJHN4f7v.js";const Re=le(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}));var K={exports:{}},O={exports:{}},z={exports:{}},J;function ke(){return J||(J=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=t;function t(d){return d==null}c.exports=s.default,c.exports.default=s.default}(z,z.exports)),z.exports}var Q;function we(){return Q||(Q=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=S;var t=b(ce()),d=b(ke());function b(n){return n&&n.__esModule?n:{default:n}}var f=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,P=/^[-+]?[0-9]+$/;function S(n,i){(0,t.default)(n),i=i||{};var _=i.allow_leading_zeroes===!1?f:P,q=!i.hasOwnProperty("min")||(0,d.default)(i.min)||n>=i.min,l=!i.hasOwnProperty("max")||(0,d.default)(i.max)||n<=i.max,a=!i.hasOwnProperty("lt")||(0,d.default)(i.lt)||n<i.lt,C=!i.hasOwnProperty("gt")||(0,d.default)(i.gt)||n>i.gt;return _.test(n)&&q&&l&&a&&C}c.exports=s.default,c.exports.default=s.default}(O,O.exports)),O.exports}var X;function Te(){return X||(X=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=b;var t=d(we());function d(f){return f&&f.__esModule?f:{default:f}}function b(f){return(0,t.default)(f,{allow_leading_zeroes:!1,min:0,max:65535})}c.exports=s.default,c.exports.default=s.default}(K,K.exports)),K.exports}var Ee=Te();const Se=ue(Ee),D={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function Ce(){const{api:c}=Z(),{blocklet:s}=ae(),{t}=G(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...D},s?.settings?.notification?.email||{}),{handleSubmit:S,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(D))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(r,g,T=!0)=>{try{const{blocklet:y}=await c.configNotification({input:{did:f,notification:JSON.stringify({email:r})}}),oe=Object.assign({...D},y?.settings?.notification?.email||{});q(oe),T&&E.success(t("oauth.saveSuccess"))}catch(y){if(T)E.error(y.message||t("oauth.saveFailed"));else throw y}}),N=u(async(r,g,T)=>{try{i.isDirty&&await C(r,g,!1),await c.sendEmail({input:{did:f,receiver:T,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),E.success(t("notification.email.testSuccess"))}catch(y){E.error(y.message||t("notification.email.testfailed"))}}),A=u((r,g)=>{l.testReceiver=localStorage.getItem("test-receiver")||"",l.testReceiverError="",d.open({title:t("notification.email.testSendEmail"),content:()=>e.jsx(R,{sx:{width:"300px"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:l.testReceiver,onChange:T=>{l.testReceiver=T.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(T){const y=l.testReceiver?.trim();if(!y){l.testReceiverError=t("notification.email.receiverRequired");return}if(!M(y)){l.testReceiverError=t("notification.email.receiverInvalid");return}l.testReceiverError="",await N(r,g,y),T()}})}),F=u(r=>{const g=r?.trim();return g?M(g)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),L=u(r=>{const g=r?.trim();return g?V(g,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),o=u(r=>r?Se(r)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),k=u(r=>r?.trim()?!0:t("notification.email.userRequired")),v=u(r=>r?.trim()?!0:t("notification.email.passwordRequired")),w=u(r=>r?.trim()&&!V(r,{protocols:["http","https"],require_protocol:!0})?t("notification.email.linkInvalid"):!0),I=u(r=>r?.trim()&&!M(r)?t("notification.email.emailInvalid"):!0),j=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(Pe,{component:"form",onSubmit:S(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.email.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:r})=>e.jsx(H,{control:e.jsx($,{checked:r.value,...r})})})}),e.jsx(h,{title:t("notification.email.from"),children:e.jsx(m,{name:"from",control:n,rules:{validate:a?F:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,label:t("notification.email.from"),error:!!i.errors[r.name],helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.host"),children:e.jsx(m,{name:"host",control:n,rules:{validate:a?L:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.host"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.port"),children:e.jsx(m,{name:"port",control:n,rules:{validate:a?o:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"number",error:!!i.errors[r.name],label:t("notification.email.port"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.user"),children:e.jsx(m,{name:"user",control:n,rules:{validate:a?k:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.user"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.password"),children:e.jsx(m,{name:"password",control:n,rules:{validate:a?v:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"password",error:!!i.errors[r.name],label:t("notification.email.password"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.secure"),children:e.jsx(m,{name:"secure",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(H,{control:e.jsx($,{checked:r.value,...r,disabled:!a})})})})}),e.jsxs(je,{children:[e.jsxs(be,{expandIcon:e.jsx(ge,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[t("notification.email.signature"),e.jsx(de,{title:t("notification.email.signatureTooltip"),children:e.jsx(Re,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(ye,{children:[e.jsx(h,{title:t("notification.email.companyName"),children:e.jsx(m,{name:"companyName",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyName"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyLink"),children:e.jsx(m,{name:"companyLink",control:n,rules:{validate:a?w:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyLink"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyAddress"),children:e.jsx(m,{name:"companyAddress",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyAddress"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.supportEmail"),children:e.jsx(m,{name:"supportEmail",control:n,rules:{validate:a?I:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",type:"email",error:!!i.errors[r.name],label:t("notification.email.supportEmail"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})})]})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(W,{variant:"outlined",color:"warning",onClick:S(A),disabled:!a,children:t("oauth.runTest")}),e.jsx(W,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const Pe=ie(ne)``,U={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function _e(){const{api:c}=Z(),{blocklet:s}=ae(),{t}=G(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...U},s?.settings?.notification?.pushKit||{}),{handleSubmit:S,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(U))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(o,k,v=!0)=>{try{const{blocklet:w}=await c.configNotification({input:{did:f,notification:JSON.stringify({pushKit:o})}}),I=Object.assign({...U},w?.settings?.notification?.pushKit||{});q(I),v&&E.success(t("oauth.saveSuccess"))}catch(w){if(v)E.error(w.message||t("oauth.saveFailed"));else throw w}}),N=u(async(o,k)=>{try{i.isDirty&&await C(o,k,!1);const v=(s?.configs||[]).find(j=>j.key==="BLOCKLET_APP_URL")?.value,w=me(fe(v,he.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:s?.meta?.version,t:new Date(s?.updatedAt||0).getTime()}),I={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:s?.appDid,fullName:s?.meta?.title,avatar:w}}}};await c.sendPush({input:{did:f,receiver:l.testReceiver,notification:JSON.stringify(I)}}),E.success(t("notification.pushKit.testSuccess"))}catch(v){E.error(v.message||t("notification.pushKit.testfailed"))}}),A=u((o,k)=>{l.testReceiverError="",d.open({title:t("notification.pushKit.testSend"),content:()=>e.jsx(R,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:l.testReceiver,onChange:v=>{l.testReceiver=v.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(v){if(!l.testReceiver?.trim()){l.testReceiverError=t("notification.pushKit.receiverRequired");return}l.testReceiverError="",await N(o,k),v()}})}),F=u(o=>{const k=o?.trim();return k?V(k)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),L=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(qe,{component:"form",onSubmit:S(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.pushKit.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:o})=>e.jsx(H,{control:e.jsx($,{checked:o.value,...o})})})}),e.jsx(h,{title:t("notification.pushKit.endpoint"),children:e.jsx(m,{name:"endpoint",control:n,rules:{validate:a?F:L},render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",required:!0,label:t("notification.pushKit.endpoint"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})}),e.jsxs(h,{title:t("notification.pushKit.customOptions"),children:[e.jsx(m,{name:"did",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.did"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})}),e.jsx(m,{name:"pushPath",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.pushPath"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(W,{variant:"outlined",color:"warning",onClick:S(A),disabled:!a,children:t("oauth.runTest")}),e.jsx(W,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const qe=ie(ne)``,Y=[{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"}];function Ae(){const[c,s]=B.useState(Y[0].value),{locale:t}=B.useContext(xe),d=pe(()=>({email:e.jsx(Ce,{}),pushKit:e.jsx(_e,{})}),[t]),b=B.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(R,{children:[e.jsx(ve,{tabs:Y,current:c,onChange:s}),e.jsx(R,{style:b,children:d[c]})]})}export{Ae as B};