@abtnode/webapp 1.16.45-beta-20250630-024910-24ef8c24 → 1.16.45-beta-20250630-233332-04c2bd6f

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 (202) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-BLLKfYiI.js → AdapterDayjs-BHlyhiPJ.js} +1 -1
  4. package/dist/assets/{Add-BVWbq3cG.js → Add-CKZvwomV.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-ne3bM_Jg.js → ArrowDropDown-CTqTvgvP.js} +1 -1
  6. package/dist/assets/{Autocomplete-CkTshmb5.js → Autocomplete-BSy3e1ZV.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-DhLLsWLK.js → Breadcrumbs-Dx36e97U.js} +1 -1
  8. package/dist/assets/{ButtonGroup-BVpxfmxe.js → ButtonGroup-Cv9T_ybJ.js} +1 -1
  9. package/dist/assets/{CSSTransition-W0nvNM-W.js → CSSTransition-D_ivveoB.js} +1 -1
  10. package/dist/assets/{CallMerge-Bj9l8yA0.js → CallMerge-1pQL6_dZ.js} +1 -1
  11. package/dist/assets/{CardContent-6Zxnd1pt.js → CardContent-Bht0UPSu.js} +1 -1
  12. package/dist/assets/{ChevronLeft-BYG5wavx.js → ChevronLeft-DlyVdCfr.js} +1 -1
  13. package/dist/assets/{ChevronRight-DMCQWR-9.js → ChevronRight-DoFFwAxz.js} +1 -1
  14. package/dist/assets/{Clear-D_9cXytM.js → Clear-h2RSseCa.js} +1 -1
  15. package/dist/assets/{Close-Pgfa3TO6.js → Close-L6Q6a3RE.js} +1 -1
  16. package/dist/assets/{Community-CRpBq74w.js → Community-OIzGuElq.js} +1 -1
  17. package/dist/assets/{Delete-DmSssFpY.js → Delete-DSwbRjGm.js} +1 -1
  18. package/dist/assets/{DeleteOutline-DRNLR9y7.js → DeleteOutline-BbkjMdAN.js} +1 -1
  19. package/dist/assets/{Done-B13j0VZG.js → Done-B9t-lcQ7.js} +1 -1
  20. package/dist/assets/{Edit-CheQvE1d.js → Edit-B7OHuMt8.js} +1 -1
  21. package/dist/assets/{ErrorOutline-CSTCrXXN.js → ErrorOutline-Dj5RjmYU.js} +1 -1
  22. package/dist/assets/{HelpOutline-BoQhPL02.js → HelpOutline-BFcbReM4.js} +1 -1
  23. package/dist/assets/{Holiday-OAdFki18.js → Holiday-DLceWWRW.js} +1 -1
  24. package/dist/assets/{Launch-D_WpKovx.js → Launch-BZfUR2wT.js} +1 -1
  25. package/dist/assets/{Link-C8h2XRwG.js → Link-CkeMp94q.js} +1 -1
  26. package/dist/assets/{ListItemButton-DD_v2iCZ.js → ListItemButton-D3dXwiba.js} +1 -1
  27. package/dist/assets/{ListSubheader-C5v2mm8b.js → ListSubheader-OdrZyzwN.js} +1 -1
  28. package/dist/assets/{LoadingButton-tRr47UnA.js → LoadingButton-BfU5BygV.js} +1 -1
  29. package/dist/assets/{LockIcon-C1fHdS5t.js → LockIcon-tb1yw67V.js} +1 -1
  30. package/dist/assets/{Meeting-BfpFLvCf.js → Meeting-Bl59MmZs.js} +1 -1
  31. package/dist/assets/{MoreHoriz-DsbeJTxh.js → MoreHoriz-BREqCusY.js} +1 -1
  32. package/dist/assets/{MoreVert-BAMY4knD.js → MoreVert-6SZ5-4Oc.js} +1 -1
  33. package/dist/assets/{OffSick-DtrRE0R4.js → OffSick-D_SYzKwE.js} +1 -1
  34. package/dist/assets/{OpenInNew-i69UfT5i.js → OpenInNew-DJezkARI.js} +1 -1
  35. package/dist/assets/{Public-CVzkpCXA.js → Public-Cgg-rE8P.js} +1 -1
  36. package/dist/assets/{Refresh-BaWfmwoN.js → Refresh-CToXYqtZ.js} +1 -1
  37. package/dist/assets/{SchemaReference.es--YL7flxa.js → SchemaReference.es-DON6qWUb.js} +1 -1
  38. package/dist/assets/{Search--E9n9O1E.js → Search-BWsSz0TZ.js} +1 -1
  39. package/dist/assets/{Slider-0msbOAE-.js → Slider-qd584sGN.js} +1 -1
  40. package/dist/assets/{Stepper-CH7hAe1O.js → Stepper-D5qb4eez.js} +1 -1
  41. package/dist/assets/{Switch-BJwf5ceb.js → Switch-B5mZ5gaW.js} +1 -1
  42. package/dist/assets/{TableRow-Blprpgh0.js → TableRow-Cm_wAjgF.js} +1 -1
  43. package/dist/assets/{TableSearch-jwWcMcmv.js → TableSearch-CbLOqG0x.js} +1 -1
  44. package/dist/assets/{ToggleButtonGroup--k0S5SsC.js → ToggleButtonGroup-BsAN6BnK.js} +1 -1
  45. package/dist/assets/{Verified-C0PvivLo.js → Verified-FiZjuwhy.js} +1 -1
  46. package/dist/assets/{VerifiedUser-CL646Ek5.js → VerifiedUser-CzSXnLhU.js} +1 -1
  47. package/dist/assets/{ViewColumn-BapDz7iW.js → ViewColumn-B1nkIYjz.js} +1 -1
  48. package/dist/assets/{ViewList-Dk8IoszY.js → ViewList-COZmXWce.js} +1 -1
  49. package/dist/assets/{WorkingRemotely-BEVNIhgO.js → WorkingRemotely-DwhCL9h1.js} +1 -1
  50. package/dist/assets/{_createAggregator-P2JOu3CO.js → _createAggregator-BdCza_P-.js} +1 -1
  51. package/dist/assets/{actions-B1_nu8vo.js → actions-BTcKDonC.js} +1 -1
  52. package/dist/assets/{actions-BP2ClATn.js → actions-Bvcwob0t.js} +1 -1
  53. package/dist/assets/{agreement-yxrIlkuz.js → agreement-EANMw4mp.js} +1 -1
  54. package/dist/assets/api-BJ-yIghe.js +1 -0
  55. package/dist/assets/{appearance-9huYXZXF.js → appearance-CZSOZlgx.js} +1 -1
  56. package/dist/assets/{audit-logs-BRYpi6Xi.js → audit-logs-vOsLrHtf.js} +1 -1
  57. package/dist/assets/{base-chart-BgHr2sw6.js → base-chart-DMVk_dMy.js} +1 -1
  58. package/dist/assets/{blocklet-CPAxSvIz.js → blocklet-DfNwfvjT.js} +1 -1
  59. package/dist/assets/{brace-fold.es-WbMhWVim.js → brace-fold.es-CESAnWUV.js} +1 -1
  60. package/dist/assets/{chain-56ZtWjYO.js → chain-DaWBsVEZ.js} +1 -1
  61. package/dist/assets/{click-to-copy-D1iXJHKS.js → click-to-copy-Bx0WCh-p.js} +1 -1
  62. package/dist/assets/cloneDeep-CvMji3zz.js +1 -0
  63. package/dist/assets/{closebrackets.es-C-Rz5Bf6.js → closebrackets.es-C817QEGa.js} +1 -1
  64. package/dist/assets/{codemirror.es-BJNxIChi.js → codemirror.es-gmfriNw8.js} +1 -1
  65. package/dist/assets/{collapse-DDN2E1dI.js → collapse-Ds1jlCkQ.js} +1 -1
  66. package/dist/assets/{comment.es-HNBjewoI.js → comment.es-DO9iblZv.js} +1 -1
  67. package/dist/assets/{config-navigation-Bn7KKQfH.js → config-navigation-DmriUtLF.js} +3 -3
  68. package/dist/assets/{connect-to-gUeeLOJv.js → connect-to-8NfHLbgD.js} +1 -1
  69. package/dist/assets/{delete-confirm-DSAA7ROU.js → delete-confirm-BbG1Njy7.js} +1 -1
  70. package/dist/assets/{detail-D_EQ0ZbU.js → detail-Bwjs-FKS.js} +3 -3
  71. package/dist/assets/{dialog.es-D0sbGrsI.js → dialog.es-DunCYlTS.js} +1 -1
  72. package/dist/assets/{domains-Dgvglcai.js → domains-3lFyCckU.js} +1 -1
  73. package/dist/assets/{download-BY7fzLnz.js → download-DhL2-FKU.js} +1 -1
  74. package/dist/assets/emotion-react.browser.esm-CH16KKaA.js +1 -0
  75. package/dist/assets/{foldgutter.es-9hEiyVTc.js → foldgutter.es-Caubyucg.js} +1 -1
  76. package/dist/assets/{get-safe-url-CNBKUnSh.js → get-safe-url-CIlQ_jPL.js} +1 -1
  77. package/dist/assets/{get-safe-url-P6A_Ruhz.js → get-safe-url-DdRvX178.js} +1 -1
  78. package/dist/assets/getValidReactChildren-Ds2y77el.js +1 -0
  79. package/dist/assets/{hint.es-B5wxstsV.js → hint.es-CruRhaN-.js} +1 -1
  80. package/dist/assets/{hint.es2-xDGsoJI9.js → hint.es2-DQ7u-Cnl.js} +1 -1
  81. package/dist/assets/{iframe-Cb4eAId6.js → iframe-CoA6LAJN.js} +1 -1
  82. package/dist/assets/{index-gE5md_vb.js → index-6QG0eJbd.js} +1 -1
  83. package/dist/assets/{index-CwgnMewz.js → index-B3guyKGC.js} +1 -1
  84. package/dist/assets/{index-AURPWKpp.js → index-B77QTgjk.js} +1 -1
  85. package/dist/assets/{index-DV_Y6g5I.js → index-BCBJCT1W.js} +1 -1
  86. package/dist/assets/{index-NDcAY1VU.js → index-BI05or-g.js} +1 -1
  87. package/dist/assets/{index-CMK70DfJ.js → index-BJcQfMN9.js} +1 -1
  88. package/dist/assets/{index-Dz4Wt9_z.js → index-BRwxtxxr.js} +1 -1
  89. package/dist/assets/{index-BrhHzrec.js → index-BVFznPvg.js} +1 -1
  90. package/dist/assets/{index-BrHzFWdY.js → index-BXLWgGxr.js} +1 -1
  91. package/dist/assets/{index-D9Lnr2pF.js → index-BXZ_Sepb.js} +1 -1
  92. package/dist/assets/{index-D_17kArk.js → index-Bd9sXNp9.js} +1 -1
  93. package/dist/assets/{index-BUgKJph9.js → index-BdgxyWV7.js} +1 -1
  94. package/dist/assets/{index-CC4O0ytJ.js → index-C5kA3CHn.js} +1 -1
  95. package/dist/assets/{index-BJ6_e_05.js → index-C6SovgLi.js} +3 -3
  96. package/dist/assets/{index-fQo5Ya2Z.js → index-CHE9ROUg.js} +1 -1
  97. package/dist/assets/{index-Dftx17o7.js → index-CIbq35qJ.js} +1 -1
  98. package/dist/assets/{index-DtHvk8jF.js → index-CJ2iy25m.js} +1 -1
  99. package/dist/assets/{index-D1pStVEE.js → index-CKT_pMKI.js} +1 -1
  100. package/dist/assets/{index-BStdxycA.js → index-CKzGu37_.js} +1 -1
  101. package/dist/assets/{index-OyGBJ3_y.js → index-CMclvolP.js} +1 -1
  102. package/dist/assets/{index-DjrrwepA.js → index-COTljNoO.js} +1 -1
  103. package/dist/assets/{index-_KFAQh0f.js → index-CPbeDmEg.js} +1 -1
  104. package/dist/assets/{index-LSDsoYSO.js → index-CVGZhJsl.js} +1 -1
  105. package/dist/assets/{index-Cpp27b72.js → index-C_KkIIIE.js} +1 -1
  106. package/dist/assets/{index-BbBhNeKh.js → index-C_tSdokL.js} +1 -1
  107. package/dist/assets/{index-CZV27bp2.js → index-CdkvSBOv.js} +3 -3
  108. package/dist/assets/{index-DySitdBx.js → index-D-VVWMa1.js} +1 -1
  109. package/dist/assets/{index-DFYQOPh8.js → index-D0_0NC6P.js} +1 -1
  110. package/dist/assets/{index-BmROMgh0.js → index-DAf-iI_f.js} +3 -3
  111. package/dist/assets/{index-CZ4ZJqi2.js → index-DDknB2BQ.js} +5 -5
  112. package/dist/assets/{index-C6Izz9No.js → index-DMUuXkl-.js} +2 -2
  113. package/dist/assets/{index-DbmHElt1.js → index-DPATNeV7.js} +1 -1
  114. package/dist/assets/{index-BJh5ubZu.js → index-DRrTj2G2.js} +1 -1
  115. package/dist/assets/{index-CkjaiqX3.js → index-DZdK0rK2.js} +1 -1
  116. package/dist/assets/{index-DyZgZOmW.js → index-DerOS-xf.js} +1 -1
  117. package/dist/assets/index-Dhf9-L3G.js +1 -0
  118. package/dist/assets/{index-DahCIi0O.js → index-DtQKM-2h.js} +1 -1
  119. package/dist/assets/{index-DC9xEwcp.js → index-Dw2CfFb3.js} +1 -1
  120. package/dist/assets/{index-BSXcaNTS.js → index-Dymg9lqV.js} +1 -1
  121. package/dist/assets/{index-DgFZqRZ8.js → index-IyfTJp8i.js} +1 -1
  122. package/dist/assets/{index-C6pg-LcE.js → index-MHcWBGOV.js} +1 -1
  123. package/dist/assets/{index-8q40O-7w.js → index-Myd8Qh5l.js} +1 -1
  124. package/dist/assets/{index-XnCKkv5i.js → index-OGZG8xfM.js} +1 -1
  125. package/dist/assets/{index-CF5KyBKJ.js → index-Z8_Ea0J-.js} +1 -1
  126. package/dist/assets/{index-D_HV8Z5P.js → index-e8rMD6ce.js} +1 -1
  127. package/dist/assets/{index-BkHlq1lh.js → index-nWbwSxF7.js} +3 -3
  128. package/dist/assets/{index-DYl86Rhy.js → index-qDvx2LXA.js} +1 -1
  129. package/dist/assets/{index.esm-BKQxKid3.js → index.esm-CBxLPn81.js} +1 -1
  130. package/dist/assets/{info-addon.es-njnSsaN8.js → info-addon.es-BuNfOlP_.js} +1 -1
  131. package/dist/assets/{info.es-CK0-2M8L.js → info.es-BT9LKStO.js} +1 -1
  132. package/dist/assets/{install-from-url-BxsfwyuB.js → install-from-url-BjMqGDXD.js} +1 -1
  133. package/dist/assets/{invitation-Dy26pV3p.js → invitation-OOnB1MnQ.js} +1 -1
  134. package/dist/assets/is-path-prefix-equal-DWu51fPZ.js +1 -0
  135. package/dist/assets/{item-GhBGVVVW.js → item-D_npg1xG.js} +1 -1
  136. package/dist/assets/{javascript.es-DC6TymIg.js → javascript.es-DoVgWSqA.js} +1 -1
  137. package/dist/assets/{jump-to-line.es-BCxJkWPP.js → jump-to-line.es-Ki36SaHt.js} +1 -1
  138. package/dist/assets/{jump.es-BobOCfl4.js → jump.es-BQrn6url.js} +1 -1
  139. package/dist/assets/{lint.es-DpU9tcYu.js → lint.es-DuK-tdYT.js} +1 -1
  140. package/dist/assets/{lint.es2-D4m8zvmF.js → lint.es2-BqlbRgHH.js} +1 -1
  141. package/dist/assets/{lint.es3-DI432prj.js → lint.es3-BSjWl5oo.js} +1 -1
  142. package/dist/assets/{list-header-Vnt3xfaU.js → list-header-I7ATqJra.js} +1 -1
  143. package/dist/assets/{log-wP1GfM4n.js → log-CQlLgXdp.js} +1 -1
  144. package/dist/assets/{lottie-react.esm-37CFPyuW.js → lottie-react.esm-CbT2RfxS.js} +1 -1
  145. package/dist/assets/{matchbrackets.es-BBmsNsCT.js → matchbrackets.es-Bjw4wGxG.js} +1 -1
  146. package/dist/assets/{memory-DioB05aG.js → memory-tq4C79oI.js} +1 -1
  147. package/dist/assets/{metric-B40GYWCj.js → metric-x46WB9O0.js} +1 -1
  148. package/dist/assets/{mode.es-D9aSpR_G.js → mode.es-mTcaUWXB.js} +1 -1
  149. package/dist/assets/{mode.es2-qaT1q5PJ.js → mode.es2-jKnc5kyz.js} +1 -1
  150. package/dist/assets/{mode.es3-F_nRYBrv.js → mode.es3-N6hg3bf1.js} +1 -1
  151. package/dist/assets/omit-DEm0zn3R.js +1 -0
  152. package/dist/assets/{onlineParser.es-MRv98OV7.js → onlineParser.es-B1S8nTp7.js} +1 -1
  153. package/dist/assets/{overview-CDdJyzBm.js → overview-YkRHSame.js} +1 -1
  154. package/dist/assets/{permission-h2Mie7R_.js → permission-BrGI8BrM.js} +1 -1
  155. package/dist/assets/{preference-BoukVJNS.js → preference-C3tBNpJ3.js} +4 -4
  156. package/dist/assets/{raf-schd.esm-lyZe_MLj.js → raf-schd.esm-BlF__8ph.js} +1 -1
  157. package/dist/assets/refType-BK4ojMi7.js +1 -0
  158. package/dist/assets/{resource-dialog-C4zmx3k7.js → resource-dialog-CroWtX8l.js} +4 -4
  159. package/dist/assets/{runtime-TMYd6jSU.js → runtime-BfH0pVsh.js} +1 -1
  160. package/dist/assets/sdk-B0fHGxCR.js +1 -0
  161. package/dist/assets/{search.es-CSnJU1OC.js → search.es-DPfw_MLi.js} +1 -1
  162. package/dist/assets/{searchcursor.es-Ck43PcqM.js → searchcursor.es-BeD7-C_W.js} +1 -1
  163. package/dist/assets/{service-Jn14v9Qy.js → service-BUPvoyUe.js} +1 -1
  164. package/dist/assets/{shorten-label-D4HQkind.js → shorten-label-Dkc-R7Pf.js} +1 -1
  165. package/dist/assets/{show-hint.es-DG97VqqG.js → show-hint.es-BY6EKf_p.js} +1 -1
  166. package/dist/assets/{simple-select-Bj5jAnRF.js → simple-select-oRYcfFfP.js} +1 -1
  167. package/dist/assets/{spaces-Cu-7CWUs.js → spaces-B_XtvGWM.js} +1 -1
  168. package/dist/assets/{status-D9FD3H9a.js → status-BYq6QPRF.js} +1 -1
  169. package/dist/assets/{status-TrPzrseV.js → status-FCdb54YV.js} +1 -1
  170. package/dist/assets/{sublime.es-D1igTCA9.js → sublime.es-CaTcUGtb.js} +1 -1
  171. package/dist/assets/{switch-control-CD3FrJIj.js → switch-control-BkMzTiNZ.js} +1 -1
  172. package/dist/assets/{table-icons-CexR6BP4.js → table-icons-BWE8DLba.js} +1 -1
  173. package/dist/assets/{team-D-oi6CUU.js → team-DXOr-ygw.js} +1 -1
  174. package/dist/assets/{toLower-BEHeFOeZ.js → toLower-lEcIAc-C.js} +1 -1
  175. package/dist/assets/toUpper-Z-pEvLY8.js +1 -0
  176. package/dist/assets/{traffic-BNw_hUMg.js → traffic-Baaukshm.js} +1 -1
  177. package/dist/assets/{url-evaluation-1fghsAUh.js → url-evaluation-D2uxzb5w.js} +1 -1
  178. package/dist/assets/{url-join-BqAR6NcU.js → url-join-DU6UdRf1.js} +1 -1
  179. package/dist/assets/{use-mobile-CaTlJeOV.js → use-mobile-BknAfbf7.js} +1 -1
  180. package/dist/assets/{use-mobile-BsssLiyX.js → use-mobile-hZxK6-uz.js} +1 -1
  181. package/dist/assets/{useAsync-Bp4AJMSF.js → useAsync-CbClB-AN.js} +1 -1
  182. package/dist/assets/{useAsyncRetry-By0_Waxi.js → useAsyncRetry-foiApHTO.js} +1 -1
  183. package/dist/assets/{useLocalStorage-CptlIDth.js → useLocalStorage-rbap7GBn.js} +1 -1
  184. package/dist/assets/{useThemeProps-D_kbBiom.js → useThemeProps-CWjJ-DWG.js} +1 -1
  185. package/dist/assets/{util-BO0XP_iE.js → util-DMr4hgRJ.js} +1 -1
  186. package/dist/assets/{wait-container-t8SFcQLe.js → wait-container-5RrJBT1J.js} +1 -1
  187. package/dist/assets/{withStyles-357xB96Z.js → withStyles-DD62sUmT.js} +1 -1
  188. package/dist/assets/{without-wallet-BH2vteYj.js → without-wallet-MfTWOoXr.js} +1 -1
  189. package/dist/assets/{wrap-locale-BHn2Bnsl.js → wrap-locale-Cm4YHFCT.js} +1 -1
  190. package/dist/index.html +1 -1
  191. package/dist/service-worker.js +1 -1
  192. package/package.json +1 -1
  193. package/dist/assets/api-C91R2vN_.js +0 -1
  194. package/dist/assets/cloneDeep-DciNVKm5.js +0 -1
  195. package/dist/assets/emotion-react.browser.esm-CRwHqkji.js +0 -1
  196. package/dist/assets/getValidReactChildren-BvOfvno3.js +0 -1
  197. package/dist/assets/index-DhHQOa0s.js +0 -1
  198. package/dist/assets/is-path-prefix-equal-KwvbiEVE.js +0 -1
  199. package/dist/assets/omit-BS9XV_gA.js +0 -1
  200. package/dist/assets/refType-DXPWPdNY.js +0 -1
  201. package/dist/assets/sdk-DdkQ3E0T.js +0 -1
  202. package/dist/assets/toUpper-Cjc9aTZN.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as be,r as he,bZ as xt,dz as gi,dA as Ew,b$ as Da,dB as $o,dC as nu,dD as Dw,dE as Aw,dF as jw,dG as kw,dH as ks,dI as Ut,dJ as Wt,dK as ts,dL as rs,dM as ti,dN as Mw,dO as fg,dP as dg,dQ as Lw,dR as pg,dS as vg,dT as Fw,dU as Nw,ay as Bw,dV as Hw,av as sf,dW as Uw,dX as Ww,dY as zw,dZ as Gw,d_ as qw,b9 as di,d$ as Kw,e0 as Vw,e1 as Yw,e2 as Xw,e3 as Jw,e4 as Qw,e5 as Zw,e6 as e_,e7 as t_,e8 as r_,e9 as n_,ea as a_,am as hg,eb as o_,ec as i_,ed as s_,a5 as ws,ee as l_,ef as u_,k as c_,eg as f_,eh as d_,ei as p_,ej as v_,ek as h_,el as g_,em as y_,en as m_,eo as b_,ep as S_,eq as w_,er as __,X as T_,es as $_,Q as C_,et as O_,eu as x_,ev as I_,aZ as P_,ew as R_,ex as E_,bo as D_,ey as A_,ez as j_,G as k_,eA as M_,eB as L_,eC as F_,eD as N_,eE as B_,eF as H_,S as U_,eG as W_,eH as z_,ab as xc,eI as G_,eJ as q_,eK as K_,eL as V_,b6 as gg,eM as Y_,eN as X_,eO as J_,eP as Q_,V as Ic,eQ as Z_,eR as eT,U as tT,eS as rT,eT as nT,aC as Pc,eU as aT,eV as oT,eW as iT,eX as sT,eY as lT,c1 as yg,c0 as mg,c2 as bg,eZ as uT,c4 as Co,c5 as Sg,e_ as cT,e$ as fT,f0 as dT,f1 as pT,f2 as vT,f3 as hT,bX as gT,bY as yT,cf as wg,t as mT,f4 as bT,f5 as ST,f6 as wT,f7 as _g,f8 as _T,f9 as TT,fa as $T,d8 as Xe,d3 as ct,fb as CT,fc as OT,bm as lf,aQ as yi,aR as mi,d6 as Ms,dg as Tg,fd as xT,a0 as IT,fe as PT,P as rt,dq as bi,aJ as Sd,b4 as RT,L as ET,H as DT,ff as wd,a2 as AT,h as jT,C as kT}from"./index-C6Izz9No.js";import{T as MT,g as LT,t as FT,a as NT,b as BT,c as HT,d as UT,e as WT,f as zT,h as GT,i as qT,j as KT}from"./TableRow-Blprpgh0.js";import{u as VT}from"./useThemeProps-D_kbBiom.js";import{r as YT,a as $g}from"./emotion-react.browser.esm-CRwHqkji.js";import{c as XT,R as JT,V as QT,d as ZT}from"./ViewColumn-BapDz7iW.js";import{S as e$}from"./Search--E9n9O1E.js";import{C as t$}from"./Clear-D_9cXytM.js";import{D as r$}from"./Delete-DmSssFpY.js";import{E as _d}from"./index-CF5KyBKJ.js";import{d as n$}from"./MoreVert-BAMY4knD.js";import{u as el,T as a$,D as o$}from"./TableSearch-jwWcMcmv.js";const uf="mode",cf="color-scheme",Cg="data-color-scheme";function i$(e){const{defaultMode:t="light",defaultLightColorScheme:r="light",defaultDarkColorScheme:n="dark",modeStorageKey:a=uf,colorSchemeStorageKey:o=cf,attribute:l=Cg,colorSchemeNode:f="document.documentElement",nonce:d}=e||{};return be.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(function() {
1
+ import{j as be,r as he,bZ as xt,dz as gi,dA as Ew,b$ as Da,dB as $o,dC as nu,dD as Dw,dE as Aw,dF as jw,dG as kw,dH as ks,dI as Ut,dJ as Wt,dK as ts,dL as rs,dM as ti,dN as Mw,dO as fg,dP as dg,dQ as Lw,dR as pg,dS as vg,dT as Fw,dU as Nw,ay as Bw,dV as Hw,av as sf,dW as Uw,dX as Ww,dY as zw,dZ as Gw,d_ as qw,b9 as di,d$ as Kw,e0 as Vw,e1 as Yw,e2 as Xw,e3 as Jw,e4 as Qw,e5 as Zw,e6 as e_,e7 as t_,e8 as r_,e9 as n_,ea as a_,am as hg,eb as o_,ec as i_,ed as s_,a5 as ws,ee as l_,ef as u_,k as c_,eg as f_,eh as d_,ei as p_,ej as v_,ek as h_,el as g_,em as y_,en as m_,eo as b_,ep as S_,eq as w_,er as __,X as T_,es as $_,Q as C_,et as O_,eu as x_,ev as I_,aZ as P_,ew as R_,ex as E_,bo as D_,ey as A_,ez as j_,G as k_,eA as M_,eB as L_,eC as F_,eD as N_,eE as B_,eF as H_,S as U_,eG as W_,eH as z_,ab as xc,eI as G_,eJ as q_,eK as K_,eL as V_,b6 as gg,eM as Y_,eN as X_,eO as J_,eP as Q_,V as Ic,eQ as Z_,eR as eT,U as tT,eS as rT,eT as nT,aC as Pc,eU as aT,eV as oT,eW as iT,eX as sT,eY as lT,c1 as yg,c0 as mg,c2 as bg,eZ as uT,c4 as Co,c5 as Sg,e_ as cT,e$ as fT,f0 as dT,f1 as pT,f2 as vT,f3 as hT,bX as gT,bY as yT,cf as wg,t as mT,f4 as bT,f5 as ST,f6 as wT,f7 as _g,f8 as _T,f9 as TT,fa as $T,d8 as Xe,d3 as ct,fb as CT,fc as OT,bm as lf,aQ as yi,aR as mi,d6 as Ms,dg as Tg,fd as xT,a0 as IT,fe as PT,P as rt,dq as bi,aJ as Sd,b4 as RT,L as ET,H as DT,ff as wd,a2 as AT,h as jT,C as kT}from"./index-DMUuXkl-.js";import{T as MT,g as LT,t as FT,a as NT,b as BT,c as HT,d as UT,e as WT,f as zT,h as GT,i as qT,j as KT}from"./TableRow-Cm_wAjgF.js";import{u as VT}from"./useThemeProps-CWjJ-DWG.js";import{r as YT,a as $g}from"./emotion-react.browser.esm-CH16KKaA.js";import{c as XT,R as JT,V as QT,d as ZT}from"./ViewColumn-B1nkIYjz.js";import{S as e$}from"./Search-BWsSz0TZ.js";import{C as t$}from"./Clear-h2RSseCa.js";import{D as r$}from"./Delete-DSwbRjGm.js";import{E as _d}from"./index-Z8_Ea0J-.js";import{d as n$}from"./MoreVert-6SZ5-4Oc.js";import{u as el,T as a$,D as o$}from"./TableSearch-CbLOqG0x.js";const uf="mode",cf="color-scheme",Cg="data-color-scheme";function i$(e){const{defaultMode:t="light",defaultLightColorScheme:r="light",defaultDarkColorScheme:n="dark",modeStorageKey:a=uf,colorSchemeStorageKey:o=cf,attribute:l=Cg,colorSchemeNode:f="document.documentElement",nonce:d}=e||{};return be.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(function() {
2
2
  try {
3
3
  var mode = localStorage.getItem('${a}') || '${t}';
4
4
  var colorScheme = '';
@@ -1,4 +1,4 @@
1
- import{r as y,u as J,_ as Me,aK as ii,j as e,F as D,aL as In,aM as pr,aN as oi,aO as Ln,aP as rt,aQ as Ce,aR as Se,P as f,n as re,m as z,af as le,aS as On,aT as ai,aU as Fn,aV as si,A as se,O as Nn,k as A,t as G,aC as pe,aW as Oe,C as Y,Y as je,B as X,aX as gr,Z as xe,N as q,e as Kt,R as it,aY as li,d as Yt,aZ as $e,a_ as fe,ac as ci,a$ as di,b0 as ui,x as mi,z as hr,W as $n,T as Un,h as ne,b1 as Vt,a as Nt,V as Z,b as pt,b2 as xr,b3 as yr,X as br,a5 as $t,b4 as fi,b5 as pi,b6 as gi,b7 as hi,b8 as ot,b9 as vr,aa as xi,J as yi,ba as bi,aJ as Ze,bb as vi,ab as Et,a8 as At,bc as ji,a9 as Ut,g as Xt,K as wi,bd as Ci,be as jr,bf as Ee,bg as Ae,bh as Si,bi as Di,D as wr,s as zt,am as _i,f as ki,bj as Ri,bk as zn,an as Ti,bl as Pi,bm as Cr,bn as te,bo as Ei,U as Bn,p as Mn,l as Wn,bp as Ai,bq as Ii}from"./index-C6Izz9No.js";import{T as Li}from"./index-CMK70DfJ.js";import{d as Oi}from"./ArrowDropDown-ne3bM_Jg.js";import{u as Qt,C as M,a as qn}from"./index.esm-BKQxKid3.js";import{S as ae}from"./switch-control-CD3FrJIj.js";import{P as ie}from"./permission-h2Mie7R_.js";import{D as Sr,g as Fi}from"./index-DahCIi0O.js";import{d as Dr}from"./Link-C8h2XRwG.js";import{d as we}from"./Delete-DmSssFpY.js";import{D as gt}from"./delete-confirm-DSAA7ROU.js";import{I as at}from"./index-DgFZqRZ8.js";import{s as Ni}from"./logo-BKA11TRi.js";import{R as _r,a as Bt,b as $i,W as Je}from"./url-evaluation-1fghsAUh.js";import{_ as Ui}from"./useLocalStorage-CptlIDth.js";import{d as zi}from"./Refresh-BaWfmwoN.js";import{L as Bi}from"./LoadingButton-tRr47UnA.js";import{C as Mi,R as Wi,d as kr}from"./Public-CVzkpCXA.js";import{d as Ue}from"./Add-BVWbq3cG.js";import{B as Rr,D as Hn}from"./status-TrPzrseV.js";import{i as qi}from"./is-path-prefix-equal-KwvbiEVE.js";import{d as Hi}from"./ChevronRight-DMCQWR-9.js";import{d as Gi}from"./MoreVert-BAMY4knD.js";import{d as Tr}from"./Edit-CheQvE1d.js";import{d as Ki}from"./CallMerge-Bj9l8yA0.js";import{C as Yi}from"./CardContent-6Zxnd1pt.js";import{w as Vi}from"./withStyles-357xB96Z.js";import{S as Xi}from"./Slider-0msbOAE-.js";import"./index-BrhHzrec.js";import"./Switch-BJwf5ceb.js";import"./TableRow-Blprpgh0.js";import"./useThemeProps-D_kbBiom.js";import"./emotion-react.browser.esm-CRwHqkji.js";import"./ViewColumn-BapDz7iW.js";import"./Search--E9n9O1E.js";import"./Clear-D_9cXytM.js";import"./index-CF5KyBKJ.js";import"./TableSearch-jwWcMcmv.js";import"./click-to-copy-D1iXJHKS.js";const ve="Dashboard",Pr=y.createContext({}),{Provider:Qi,Consumer:Hs}=Pr,Gn=[ve,D.DOMAIN_FOR_IP_SITE,D.DOMAIN_FOR_IP_SITE_REGEXP],Zi=(t,n)=>{if(t.name===D.DOMAIN_FOR_DEFAULT_SITE)return-1;if(n.name===D.DOMAIN_FOR_DEFAULT_SITE)return 1;const r=Gn.includes(t.name),i=Gn.includes(n.name);return r&&i?Ln(t.name,n.name):r?-1:i?1:Ln(t.name,n.name)},Ji=({sites:t,nodePort:n})=>{const r=window.location.hostname,o=(t||[]).map(a=>{const{id:s,rules:d=[],corsAllowedOrigins:x=[]}=a;let{domain:c,domainAliases:u}=a;u=u||[],[D.DOMAIN_FOR_IP_SITE,D.DOMAIN_FOR_IP_SITE_REGEXP].includes(c)&&(c=ve,u.find(w=>w.value===r)||u.unshift({protected:!1,value:r}));const p={id:s,name:c,type:"domain",items:[],domainAliases:u,isProtected:a.isProtected,corsAllowedOrigins:x};return(d||[]).forEach(w=>{const{id:j,isProtected:R,from:{pathPrefix:v},to:S}=w;if(S.type===D.ROUTING_RULE_TYPES.BLOCKLET){let _="";Number.parseInt(S.port,10)===Number.parseInt(n,10)?(_="Blocklet Server Dashboard",S.type=D.ROUTING_RULE_TYPES.DAEMON):_=S.did,p.items.push({id:j,name:In(v||"/"),title:_,type:"rule",isProtected:R,pathPrefix:v,to:S})}else p.items.push({id:j,pathPrefix:v,name:In(v||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:R,to:S})}),p.items=pr(p.items,w=>w.name),p}).sort(Zi),l=o.reduce((a,s)=>{let{name:d}=s;return d.endsWith(D.BLOCKLET_SITE_GROUP_SUFFIX)&&([d]=d.split(".")),a[d]={...s,rules:s.items},a},{});return{sites:o,siteMap:l}},eo=({did:t,domain:n,mountPoint:r,siteMap:i,params:o}={})=>{if(!i)return null;const l=i[t];if(!l)return null;const a=n||(l.domainAliases||[])[0];if(!a)return null;let s=r;if(!s){const d=l.rules.filter(x=>!x.name.startsWith(D.WELLKNOWN_PATH_PREFIX))[0];s=d?d.name:"/"}return rt(a.value,s,o)},to=({did:t,mountPoint:n,siteMap:r,params:i}={})=>{if(!r)return[];const o=r[t];if(!o)return[];const l=o.domainAliases||[];if(!l.length)return[];let a=n;if(!a){const s=o.rules.filter(d=>!d.name.startsWith(D.WELLKNOWN_PATH_PREFIX))[0];a=s?s.name:"/"}return l.map(s=>rt(s.value,a,i))},no=t=>{const n=t.map(i=>i.domain).filter(i=>![D.DOMAIN_FOR_IP_SITE_REGEXP,D.DOMAIN_FOR_DEFAULT_SITE].includes(i));let r=[];return t.forEach(i=>r.push(...i.domainAliases||[])),r=r.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:n,domainsAliases:r}};function Kn({children:t}){const{api:n,info:r}=J(),[i,o]=y.useState([]),[l,a]=y.useState([]),[s,d]=y.useState([]),x=Me(async()=>{const{sites:O}=await n.getRoutingSites({input:{snapshotHash:""}}),b=O||[];await Promise.all(b.map(async g=>(g.domainAliases=await ii(g.domainAliases,{getIP:oi}),g)));const m=no(b);o(b),a(m.domains),d([window.location.hostname,...m.domains,...m.domainsAliases.map(g=>g.value)])},[r]),c=(O,b)=>{o(m=>m.map(g=>g.id===O?b.domain?b:{...b,domain:g.domain}:g))},u=O=>n.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(O)}}),p=async O=>{const b=await n.addRoutingSite({input:O});o(i.concat(b.site))},w=async(O,b)=>{const m=await n.updateRoutingSite({input:{id:O,...b}});if(m.site&&m.site.id){const g=i.findIndex(k=>k.id===m.site.id);g!==-1&&(i.splice(g,1,m.site),o([].concat(i)))}},j=async O=>{await n.deleteRoutingSite({input:{id:O}}),o(i.filter(b=>b.id!==O))},R=async(O,b,m)=>{const g=await n.addDomainAlias({input:{id:O,domainAlias:b,force:m}});c(O,g.site)},v=async(O,b)=>{const m=await n.deleteDomainAlias({input:{id:O,domainAlias:b}});c(O,m.site)},S=async(O,b)=>{const{site:m}=await n.addRoutingRule({input:{id:O,rule:b}});c(O,m)},_=async(O,b)=>{const{site:m}=await n.updateRoutingRule({input:{id:O,rule:b}});c(O,m)},C=async(O,b)=>{const{site:m}=await n.deleteRoutingRule({input:{id:O,ruleId:b}});c(O,m)},h={loading:x.loading,error:x.error,refresh:x.retry,api:n,actions:{addSite:p,updateSite:w,deleteSite:j,addDomainAlias:R,deleteDomainAlias:v,takeSnapshot:u,addRule:S,updateRule:_,deleteRule:C}},{sites:P,siteMap:I}=Ji({sites:i,nodePort:r.port});return h.sites=P,h.siteMap=I,h.domains=l,h.allDomains=s,h.getBlockletUrl=({did:O,domain:b,mountPoint:m,params:g})=>eo({did:O,domain:b,mountPoint:m,siteMap:h.siteMap,params:g}),h.getBlockletUrls=({did:O,mountPoint:b,params:m})=>to({did:O,mountPoint:b,siteMap:h.siteMap,params:m}),e.jsx(Qi,{value:{routing:h},children:t})}function ue(){const{routing:t}=y.useContext(Pr);return t}function Zt(t){const n=[D.DOMAIN_FOR_IP_SITE_REGEXP,D.DOMAIN_FOR_DEFAULT_SITE,D.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&n.push(window.location.hostname),n.includes(t)}var Jt={},ro=Se;Object.defineProperty(Jt,"__esModule",{value:!0});var Er=Jt.default=void 0,io=ro(Ce()),oo=e;Er=Jt.default=(0,io.default)((0,oo.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");function ao(){return null}function en({confirm:t}){const[n,r]=y.useState(null),{t:i}=z(),o=()=>{r(null)},l=async s=>{if(s){let d=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";d==="/"?On.push(`${s.pathname}`):(d.endsWith("/")&&(d=d.substring(0,d.length-1)),On.push(`${d}${s.pathname}`)),window.location.reload()}},a=(s,...d)=>{let x=typeof t=="function"?t(s,...d):t;return x?(typeof x=="string"&&(x={description:x}),r({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>l(s),onCancel:()=>o(),...x}),!1):!0};return e.jsxs(so,{children:[e.jsx(ao,{message:a}),n&&e.jsx(le,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}en.propTypes={confirm:f.oneOfType([f.object,f.string,f.func])};en.defaultProps={confirm:null};const so=re.div`
1
+ import{r as y,u as J,_ as Me,aK as ii,j as e,F as D,aL as In,aM as pr,aN as oi,aO as Ln,aP as rt,aQ as Ce,aR as Se,P as f,n as re,m as z,af as le,aS as On,aT as ai,aU as Fn,aV as si,A as se,O as Nn,k as A,t as G,aC as pe,aW as Oe,C as Y,Y as je,B as X,aX as gr,Z as xe,N as q,e as Kt,R as it,aY as li,d as Yt,aZ as $e,a_ as fe,ac as ci,a$ as di,b0 as ui,x as mi,z as hr,W as $n,T as Un,h as ne,b1 as Vt,a as Nt,V as Z,b as pt,b2 as xr,b3 as yr,X as br,a5 as $t,b4 as fi,b5 as pi,b6 as gi,b7 as hi,b8 as ot,b9 as vr,aa as xi,J as yi,ba as bi,aJ as Ze,bb as vi,ab as Et,a8 as At,bc as ji,a9 as Ut,g as Xt,K as wi,bd as Ci,be as jr,bf as Ee,bg as Ae,bh as Si,bi as Di,D as wr,s as zt,am as _i,f as ki,bj as Ri,bk as zn,an as Ti,bl as Pi,bm as Cr,bn as te,bo as Ei,U as Bn,p as Mn,l as Wn,bp as Ai,bq as Ii}from"./index-DMUuXkl-.js";import{T as Li}from"./index-BJcQfMN9.js";import{d as Oi}from"./ArrowDropDown-CTqTvgvP.js";import{u as Qt,C as M,a as qn}from"./index.esm-CBxLPn81.js";import{S as ae}from"./switch-control-BkMzTiNZ.js";import{P as ie}from"./permission-BrGI8BrM.js";import{D as Sr,g as Fi}from"./index-DtQKM-2h.js";import{d as Dr}from"./Link-CkeMp94q.js";import{d as we}from"./Delete-DSwbRjGm.js";import{D as gt}from"./delete-confirm-BbG1Njy7.js";import{I as at}from"./index-IyfTJp8i.js";import{s as Ni}from"./logo-BKA11TRi.js";import{R as _r,a as Bt,b as $i,W as Je}from"./url-evaluation-D2uxzb5w.js";import{_ as Ui}from"./useLocalStorage-rbap7GBn.js";import{d as zi}from"./Refresh-CToXYqtZ.js";import{L as Bi}from"./LoadingButton-BfU5BygV.js";import{C as Mi,R as Wi,d as kr}from"./Public-Cgg-rE8P.js";import{d as Ue}from"./Add-CKZvwomV.js";import{B as Rr,D as Hn}from"./status-FCdb54YV.js";import{i as qi}from"./is-path-prefix-equal-DWu51fPZ.js";import{d as Hi}from"./ChevronRight-DoFFwAxz.js";import{d as Gi}from"./MoreVert-6SZ5-4Oc.js";import{d as Tr}from"./Edit-B7OHuMt8.js";import{d as Ki}from"./CallMerge-1pQL6_dZ.js";import{C as Yi}from"./CardContent-Bht0UPSu.js";import{w as Vi}from"./withStyles-DD62sUmT.js";import{S as Xi}from"./Slider-qd584sGN.js";import"./index-BVFznPvg.js";import"./Switch-B5mZ5gaW.js";import"./TableRow-Cm_wAjgF.js";import"./useThemeProps-CWjJ-DWG.js";import"./emotion-react.browser.esm-CH16KKaA.js";import"./ViewColumn-B1nkIYjz.js";import"./Search-BWsSz0TZ.js";import"./Clear-h2RSseCa.js";import"./index-Z8_Ea0J-.js";import"./TableSearch-CbLOqG0x.js";import"./click-to-copy-Bx0WCh-p.js";const ve="Dashboard",Pr=y.createContext({}),{Provider:Qi,Consumer:Hs}=Pr,Gn=[ve,D.DOMAIN_FOR_IP_SITE,D.DOMAIN_FOR_IP_SITE_REGEXP],Zi=(t,n)=>{if(t.name===D.DOMAIN_FOR_DEFAULT_SITE)return-1;if(n.name===D.DOMAIN_FOR_DEFAULT_SITE)return 1;const r=Gn.includes(t.name),i=Gn.includes(n.name);return r&&i?Ln(t.name,n.name):r?-1:i?1:Ln(t.name,n.name)},Ji=({sites:t,nodePort:n})=>{const r=window.location.hostname,o=(t||[]).map(a=>{const{id:s,rules:d=[],corsAllowedOrigins:x=[]}=a;let{domain:c,domainAliases:u}=a;u=u||[],[D.DOMAIN_FOR_IP_SITE,D.DOMAIN_FOR_IP_SITE_REGEXP].includes(c)&&(c=ve,u.find(w=>w.value===r)||u.unshift({protected:!1,value:r}));const p={id:s,name:c,type:"domain",items:[],domainAliases:u,isProtected:a.isProtected,corsAllowedOrigins:x};return(d||[]).forEach(w=>{const{id:j,isProtected:R,from:{pathPrefix:v},to:S}=w;if(S.type===D.ROUTING_RULE_TYPES.BLOCKLET){let _="";Number.parseInt(S.port,10)===Number.parseInt(n,10)?(_="Blocklet Server Dashboard",S.type=D.ROUTING_RULE_TYPES.DAEMON):_=S.did,p.items.push({id:j,name:In(v||"/"),title:_,type:"rule",isProtected:R,pathPrefix:v,to:S})}else p.items.push({id:j,pathPrefix:v,name:In(v||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:R,to:S})}),p.items=pr(p.items,w=>w.name),p}).sort(Zi),l=o.reduce((a,s)=>{let{name:d}=s;return d.endsWith(D.BLOCKLET_SITE_GROUP_SUFFIX)&&([d]=d.split(".")),a[d]={...s,rules:s.items},a},{});return{sites:o,siteMap:l}},eo=({did:t,domain:n,mountPoint:r,siteMap:i,params:o}={})=>{if(!i)return null;const l=i[t];if(!l)return null;const a=n||(l.domainAliases||[])[0];if(!a)return null;let s=r;if(!s){const d=l.rules.filter(x=>!x.name.startsWith(D.WELLKNOWN_PATH_PREFIX))[0];s=d?d.name:"/"}return rt(a.value,s,o)},to=({did:t,mountPoint:n,siteMap:r,params:i}={})=>{if(!r)return[];const o=r[t];if(!o)return[];const l=o.domainAliases||[];if(!l.length)return[];let a=n;if(!a){const s=o.rules.filter(d=>!d.name.startsWith(D.WELLKNOWN_PATH_PREFIX))[0];a=s?s.name:"/"}return l.map(s=>rt(s.value,a,i))},no=t=>{const n=t.map(i=>i.domain).filter(i=>![D.DOMAIN_FOR_IP_SITE_REGEXP,D.DOMAIN_FOR_DEFAULT_SITE].includes(i));let r=[];return t.forEach(i=>r.push(...i.domainAliases||[])),r=r.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:n,domainsAliases:r}};function Kn({children:t}){const{api:n,info:r}=J(),[i,o]=y.useState([]),[l,a]=y.useState([]),[s,d]=y.useState([]),x=Me(async()=>{const{sites:O}=await n.getRoutingSites({input:{snapshotHash:""}}),b=O||[];await Promise.all(b.map(async g=>(g.domainAliases=await ii(g.domainAliases,{getIP:oi}),g)));const m=no(b);o(b),a(m.domains),d([window.location.hostname,...m.domains,...m.domainsAliases.map(g=>g.value)])},[r]),c=(O,b)=>{o(m=>m.map(g=>g.id===O?b.domain?b:{...b,domain:g.domain}:g))},u=O=>n.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(O)}}),p=async O=>{const b=await n.addRoutingSite({input:O});o(i.concat(b.site))},w=async(O,b)=>{const m=await n.updateRoutingSite({input:{id:O,...b}});if(m.site&&m.site.id){const g=i.findIndex(k=>k.id===m.site.id);g!==-1&&(i.splice(g,1,m.site),o([].concat(i)))}},j=async O=>{await n.deleteRoutingSite({input:{id:O}}),o(i.filter(b=>b.id!==O))},R=async(O,b,m)=>{const g=await n.addDomainAlias({input:{id:O,domainAlias:b,force:m}});c(O,g.site)},v=async(O,b)=>{const m=await n.deleteDomainAlias({input:{id:O,domainAlias:b}});c(O,m.site)},S=async(O,b)=>{const{site:m}=await n.addRoutingRule({input:{id:O,rule:b}});c(O,m)},_=async(O,b)=>{const{site:m}=await n.updateRoutingRule({input:{id:O,rule:b}});c(O,m)},C=async(O,b)=>{const{site:m}=await n.deleteRoutingRule({input:{id:O,ruleId:b}});c(O,m)},h={loading:x.loading,error:x.error,refresh:x.retry,api:n,actions:{addSite:p,updateSite:w,deleteSite:j,addDomainAlias:R,deleteDomainAlias:v,takeSnapshot:u,addRule:S,updateRule:_,deleteRule:C}},{sites:P,siteMap:I}=Ji({sites:i,nodePort:r.port});return h.sites=P,h.siteMap=I,h.domains=l,h.allDomains=s,h.getBlockletUrl=({did:O,domain:b,mountPoint:m,params:g})=>eo({did:O,domain:b,mountPoint:m,siteMap:h.siteMap,params:g}),h.getBlockletUrls=({did:O,mountPoint:b,params:m})=>to({did:O,mountPoint:b,siteMap:h.siteMap,params:m}),e.jsx(Qi,{value:{routing:h},children:t})}function ue(){const{routing:t}=y.useContext(Pr);return t}function Zt(t){const n=[D.DOMAIN_FOR_IP_SITE_REGEXP,D.DOMAIN_FOR_DEFAULT_SITE,D.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&n.push(window.location.hostname),n.includes(t)}var Jt={},ro=Se;Object.defineProperty(Jt,"__esModule",{value:!0});var Er=Jt.default=void 0,io=ro(Ce()),oo=e;Er=Jt.default=(0,io.default)((0,oo.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");function ao(){return null}function en({confirm:t}){const[n,r]=y.useState(null),{t:i}=z(),o=()=>{r(null)},l=async s=>{if(s){let d=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";d==="/"?On.push(`${s.pathname}`):(d.endsWith("/")&&(d=d.substring(0,d.length-1)),On.push(`${d}${s.pathname}`)),window.location.reload()}},a=(s,...d)=>{let x=typeof t=="function"?t(s,...d):t;return x?(typeof x=="string"&&(x={description:x}),r({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>l(s),onCancel:()=>o(),...x}),!1):!0};return e.jsxs(so,{children:[e.jsx(ao,{message:a}),n&&e.jsx(le,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}en.propTypes={confirm:f.oneOfType([f.object,f.string,f.func])};en.defaultProps={confirm:null};const so=re.div`
2
2
  margin-bottom: 24px;
3
3
  .top-btns-alert {
4
4
  @media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
@@ -1,4 +1,4 @@
1
- import{an as ee,z as q,r as p,a as te,b as se,P as b,m as j,u as w,w as oe,az as _,J as O,j as t,v as W,aA as re,x as y,k as R,D as M,aB as ne,aC as ae,B as z,C as V,aD as le,A as K,Z as G,aE as ie,aF as ce,N as E,aG as ue,F as de,aH as D,g as pe,aI as he,n as H,ac as fe,a7 as me,a9 as ge,aa as xe,aJ as be,ab as ke}from"./index-C6Izz9No.js";import{_ as B}from"./useLocalStorage-CptlIDth.js";import{c as ye,C as Se,A as je,j as we,a as ve,d as Pe,B as Re,S as J,b as Ce,e as Be}from"./item-GhBGVVVW.js";import{g as T}from"./get-safe-url-CNBKUnSh.js";import{P as Q}from"./permission-h2Mie7R_.js";import{d as Le}from"./ArrowDropDown-ne3bM_Jg.js";import{B as De}from"./Breadcrumbs-DhLLsWLK.js";import"./ChevronLeft-BYG5wavx.js";import"./ChevronRight-DMCQWR-9.js";import"./Search--E9n9O1E.js";import"./index-CF5KyBKJ.js";import"./blocklet-CPAxSvIz.js";import"./Autocomplete-CkTshmb5.js";import"./ListSubheader-C5v2mm8b.js";import"./Verified-C0PvivLo.js";import"./VerifiedUser-CL646Ek5.js";import"./Add-BVWbq3cG.js";import"./Launch-D_WpKovx.js";import"./Done-B13j0VZG.js";import"./DeleteOutline-DRNLR9y7.js";import"./delete-confirm-DSAA7ROU.js";import"./click-to-copy-D1iXJHKS.js";import"./MoreVert-BAMY4knD.js";import"./get-safe-url-P6A_Ruhz.js";import"./ButtonGroup-BVpxfmxe.js";import"./getValidReactChildren-BvOfvno3.js";function Ee(e){const r=ee(),c=q(),[s,o]=B(`sid:blocklet:purchase:${e}`),[a,u]=p.useState(!1),[h,l]=p.useState(null),f=()=>{const{pathname:n,searchParams:d}=new URL(window.location.href),i=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";d.get("sid")&&(o(""),c(n.replace(i,"/"),{replace:!0}))},m=!!(r.get("assetDid")&&s&&r.get("sid")===s);return te(se.BlockletEvents.purchaseChange,n=>{n.did===e&&(l(n.session),["declined","confirmed","error"].includes(n.session.status)&&(u(!0),setTimeout(f,2e3)))}),p.useEffect(()=>{h&&h.id!==s&&o(h.id)},[h]),{hasCompleted:a,hasPurchased:m,session:h,setSession:l,doRedirect:f}}function U({meta:e,onCancel:r,handlePaySuccess:c,storeUrl:s}){const{t:o}=j(),{info:a}=w(),[u,h]=p.useState("both"),[l,f]=p.useState(1),m=oe(a),n=_(e,a,s),d=P=>{P!==u&&h(P)},i=()=>{u&&(f(2),u==="verify"&&(window.location.href=T(n)))},k=(P,L)=>{L!=="backdropClick"&&r()},v=()=>{c(n)},g=O.getDisplayName({meta:e});if(u==="purchase"&&l===2)return t.jsx(W,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:re.create({baseURL:y(s,"/store")}).get,onSuccess:v,onClose:r,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:m,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:g}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(R,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(R,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:g})]})]})}});const x=M;return t.jsx(x,{title:o("store.purchase.title",{name:g}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:k,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(Se,{action:u,onNext:i,onSelect:d})})})}U.propTypes={...ye,storeUrl:b.string.isRequired,handlePaySuccess:b.func};U.defaultProps={handlePaySuccess:e=>{setTimeout(()=>{window.location.href=T(e,{allowDomains:null})},1e3)}};function I({meta:e,buttonText:r,storeUrl:c,isResource:s}){const{t:o}=j(),a=q(),{info:u}=w(),{api:h}=ne(),l=O.isFreeBlocklet(e)===!1,[f,m]=p.useState(!1),{hasPurchased:n}=Ee(e.did),[d,i]=p.useState(!1),[k]=B("instant-blocklet-install",!1),[v,g]=p.useState(!1),x=p.useMemo(()=>f?o(l?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[f,o,l]),P=p.useMemo(()=>s?o("blocklet.status.resource"):l?r.purchase:r.launch,[l,r,s]),L=S=>{S.preventDefault(),S.stopPropagation();try{if(m(!0),l){i(!0);return}if(k){g(!0);return}if(!l){const C=_(e,u,c);window.location.href=T(C)}}catch(C){K.error(G(C),{autoHideDuration:5e3}),console.error("Blocklet installed failed",C)}finally{m(!1)}},Y=()=>{m(!1),i(!1)},Z=S=>{m(!1),g(!1),a(`/blocklets/${S.appDid}/components`)},X=()=>{m(!1),g(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(je,{children:t.jsx(Q,{permission:"mutate_blocklets",children:S=>t.jsx(ae,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(z,{onClick:L,size:"small",sx:{cursor:s?"not-allowed":"pointer",overflow:"hidden"},disabled:!!(x||!S),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:x?t.jsxs(t.Fragment,{children:[t.jsx(V,{size:16,style:{marginRight:3}}),x]}):P},e.did)})})}),(n||d)&&t.jsx(U,{method:"launch",meta:e,mode:"both",onCancel:Y,storeUrl:c}),v&&t.jsx(W,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:h.get,checkTimeout:5*60*1e3,onSuccess:Z,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(le(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:X})]})}I.propTypes={isResource:b.bool,meta:b.object.isRequired,buttonText:b.shape({purchase:b.string.isRequired,launch:b.string.isRequired}).isRequired,storeUrl:b.string.isRequired};I.defaultProps={isResource:!1};const Te=(e,r,c)=>{const s=fe(r);return y(c,`/blocklets/${e.did}/?server-url=${s}`)},$=({meta:e,attribute:r,value:c})=>e._formatted?e._formatted[r]:c,Ue=(e,r)=>{if(!e||!r)return"";try{return y(r,e)}catch(c){return console.warn("Failed to construct avatar URL:",c),""}};function F({blocklet:e,endpoint:r,serverVersion:c}){var n,d;const{t:s}=j(),o=w();let a=y(o.imgPrefix,"blocklet.png");const u=r;if(u.startsWith("http")&&e.logo)a=y(u,ue(e.did,e.logo,e.version));else{let k=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");k&&(k=`/${k}`),a=y(k,`/blocklet/logo/${e.did}`)}try{const i=new URL(a);i.searchParams.set("v",e.version||+new Date),a=i.href}catch{}const h=(o==null?void 0:o.info.mode)!==de.NODE_MODES.SERVERLESS,l=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),f={meta:e,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:u};let m=null;return h&&(m=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(ve,{serverVersion:c,requirementVersion:(n=e.requirements)==null?void 0:n.server,size:"small",children:t.jsx(I,{isResource:!(D.hasStartEngine(e)||D.isGatewayBlocklet(e)||D.isPackBlocklet(e)),...f})})})),t.jsx(pe,{href:Te(e,o.info,r),style:{color:"initial",textDecoration:"none"},onClick:l,target:"_blank",children:t.jsx(Ie,{title:$({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:$({meta:e,attribute:"description",value:e.description}),cover:e.logo?a:"",version:e.version,onButtonClick:null,icons:(d=e.docker)!=null&&d.image?[{key:"docker",icon:t.jsx(E,{display:"flex",color:"primary.main",children:t.jsx(he,{icon:Pe})}),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:m})})}F.propTypes={blocklet:b.object.isRequired,serverVersion:b.string,endpoint:b.string};F.defaultProps={endpoint:"",serverVersion:""};function A({storeUrl:e,handleSearchSelect:r,extraFilter:c,...s}){var n;const{locale:o}=j(),a=w(),[u,h]=p.useState({}),l=d=>{h(d)},f=e,m=(n=a==null?void 0:a.info)==null?void 0:n.version;return p.useEffect(()=>{h({})},[f]),t.jsx(ie,{FallbackComponent:ce,resetKeys:[f],children:t.jsx(E,{...s,sx:{"& .title-bar":{pt:0},".blocklet-list":{mt:0},"& h2":{display:"none"}},children:t.jsx(we,{layout:{showExplore:!1,showTitle:!0},blockletRender:d=>{const i={...d,endpoint:f};return t.jsx(F,{...i})},baseSearch:!0,endpoint:f,locale:o,onFilterChange:l,onSearchSelect:r,filters:u,extraFilter:c,serverVersion:m})})})}A.propTypes={storeUrl:b.string.isRequired,handleSearchSelect:b.func,extraFilter:b.func};A.defaultProps={handleSearchSelect:null,extraFilter:void 0};const Ie=H(Re)`
1
+ import{an as ee,z as q,r as p,a as te,b as se,P as b,m as j,u as w,w as oe,az as _,J as O,j as t,v as W,aA as re,x as y,k as R,D as M,aB as ne,aC as ae,B as z,C as V,aD as le,A as K,Z as G,aE as ie,aF as ce,N as E,aG as ue,F as de,aH as D,g as pe,aI as he,n as H,ac as fe,a7 as me,a9 as ge,aa as xe,aJ as be,ab as ke}from"./index-DMUuXkl-.js";import{_ as B}from"./useLocalStorage-rbap7GBn.js";import{c as ye,C as Se,A as je,j as we,a as ve,d as Pe,B as Re,S as J,b as Ce,e as Be}from"./item-D_npg1xG.js";import{g as T}from"./get-safe-url-CIlQ_jPL.js";import{P as Q}from"./permission-BrGI8BrM.js";import{d as Le}from"./ArrowDropDown-CTqTvgvP.js";import{B as De}from"./Breadcrumbs-Dx36e97U.js";import"./ChevronLeft-DlyVdCfr.js";import"./ChevronRight-DoFFwAxz.js";import"./Search-BWsSz0TZ.js";import"./index-Z8_Ea0J-.js";import"./blocklet-DfNwfvjT.js";import"./Autocomplete-BSy3e1ZV.js";import"./ListSubheader-OdrZyzwN.js";import"./Verified-FiZjuwhy.js";import"./VerifiedUser-CzSXnLhU.js";import"./Add-CKZvwomV.js";import"./Launch-BZfUR2wT.js";import"./Done-B9t-lcQ7.js";import"./DeleteOutline-BbkjMdAN.js";import"./delete-confirm-BbG1Njy7.js";import"./click-to-copy-Bx0WCh-p.js";import"./MoreVert-6SZ5-4Oc.js";import"./get-safe-url-DdRvX178.js";import"./ButtonGroup-Cv9T_ybJ.js";import"./getValidReactChildren-Ds2y77el.js";function Ee(e){const r=ee(),c=q(),[s,o]=B(`sid:blocklet:purchase:${e}`),[a,u]=p.useState(!1),[h,l]=p.useState(null),f=()=>{const{pathname:n,searchParams:d}=new URL(window.location.href),i=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";d.get("sid")&&(o(""),c(n.replace(i,"/"),{replace:!0}))},m=!!(r.get("assetDid")&&s&&r.get("sid")===s);return te(se.BlockletEvents.purchaseChange,n=>{n.did===e&&(l(n.session),["declined","confirmed","error"].includes(n.session.status)&&(u(!0),setTimeout(f,2e3)))}),p.useEffect(()=>{h&&h.id!==s&&o(h.id)},[h]),{hasCompleted:a,hasPurchased:m,session:h,setSession:l,doRedirect:f}}function U({meta:e,onCancel:r,handlePaySuccess:c,storeUrl:s}){const{t:o}=j(),{info:a}=w(),[u,h]=p.useState("both"),[l,f]=p.useState(1),m=oe(a),n=_(e,a,s),d=P=>{P!==u&&h(P)},i=()=>{u&&(f(2),u==="verify"&&(window.location.href=T(n)))},k=(P,L)=>{L!=="backdropClick"&&r()},v=()=>{c(n)},g=O.getDisplayName({meta:e});if(u==="purchase"&&l===2)return t.jsx(W,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:re.create({baseURL:y(s,"/store")}).get,onSuccess:v,onClose:r,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:m,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:g}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(R,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(R,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:g})]})]})}});const x=M;return t.jsx(x,{title:o("store.purchase.title",{name:g}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:k,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(Se,{action:u,onNext:i,onSelect:d})})})}U.propTypes={...ye,storeUrl:b.string.isRequired,handlePaySuccess:b.func};U.defaultProps={handlePaySuccess:e=>{setTimeout(()=>{window.location.href=T(e,{allowDomains:null})},1e3)}};function I({meta:e,buttonText:r,storeUrl:c,isResource:s}){const{t:o}=j(),a=q(),{info:u}=w(),{api:h}=ne(),l=O.isFreeBlocklet(e)===!1,[f,m]=p.useState(!1),{hasPurchased:n}=Ee(e.did),[d,i]=p.useState(!1),[k]=B("instant-blocklet-install",!1),[v,g]=p.useState(!1),x=p.useMemo(()=>f?o(l?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[f,o,l]),P=p.useMemo(()=>s?o("blocklet.status.resource"):l?r.purchase:r.launch,[l,r,s]),L=S=>{S.preventDefault(),S.stopPropagation();try{if(m(!0),l){i(!0);return}if(k){g(!0);return}if(!l){const C=_(e,u,c);window.location.href=T(C)}}catch(C){K.error(G(C),{autoHideDuration:5e3}),console.error("Blocklet installed failed",C)}finally{m(!1)}},Y=()=>{m(!1),i(!1)},Z=S=>{m(!1),g(!1),a(`/blocklets/${S.appDid}/components`)},X=()=>{m(!1),g(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(je,{children:t.jsx(Q,{permission:"mutate_blocklets",children:S=>t.jsx(ae,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(z,{onClick:L,size:"small",sx:{cursor:s?"not-allowed":"pointer",overflow:"hidden"},disabled:!!(x||!S),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:x?t.jsxs(t.Fragment,{children:[t.jsx(V,{size:16,style:{marginRight:3}}),x]}):P},e.did)})})}),(n||d)&&t.jsx(U,{method:"launch",meta:e,mode:"both",onCancel:Y,storeUrl:c}),v&&t.jsx(W,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:h.get,checkTimeout:5*60*1e3,onSuccess:Z,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(le(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:X})]})}I.propTypes={isResource:b.bool,meta:b.object.isRequired,buttonText:b.shape({purchase:b.string.isRequired,launch:b.string.isRequired}).isRequired,storeUrl:b.string.isRequired};I.defaultProps={isResource:!1};const Te=(e,r,c)=>{const s=fe(r);return y(c,`/blocklets/${e.did}/?server-url=${s}`)},$=({meta:e,attribute:r,value:c})=>e._formatted?e._formatted[r]:c,Ue=(e,r)=>{if(!e||!r)return"";try{return y(r,e)}catch(c){return console.warn("Failed to construct avatar URL:",c),""}};function F({blocklet:e,endpoint:r,serverVersion:c}){var n,d;const{t:s}=j(),o=w();let a=y(o.imgPrefix,"blocklet.png");const u=r;if(u.startsWith("http")&&e.logo)a=y(u,ue(e.did,e.logo,e.version));else{let k=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");k&&(k=`/${k}`),a=y(k,`/blocklet/logo/${e.did}`)}try{const i=new URL(a);i.searchParams.set("v",e.version||+new Date),a=i.href}catch{}const h=(o==null?void 0:o.info.mode)!==de.NODE_MODES.SERVERLESS,l=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),f={meta:e,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:u};let m=null;return h&&(m=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(ve,{serverVersion:c,requirementVersion:(n=e.requirements)==null?void 0:n.server,size:"small",children:t.jsx(I,{isResource:!(D.hasStartEngine(e)||D.isGatewayBlocklet(e)||D.isPackBlocklet(e)),...f})})})),t.jsx(pe,{href:Te(e,o.info,r),style:{color:"initial",textDecoration:"none"},onClick:l,target:"_blank",children:t.jsx(Ie,{title:$({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:$({meta:e,attribute:"description",value:e.description}),cover:e.logo?a:"",version:e.version,onButtonClick:null,icons:(d=e.docker)!=null&&d.image?[{key:"docker",icon:t.jsx(E,{display:"flex",color:"primary.main",children:t.jsx(he,{icon:Pe})}),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:m})})}F.propTypes={blocklet:b.object.isRequired,serverVersion:b.string,endpoint:b.string};F.defaultProps={endpoint:"",serverVersion:""};function A({storeUrl:e,handleSearchSelect:r,extraFilter:c,...s}){var n;const{locale:o}=j(),a=w(),[u,h]=p.useState({}),l=d=>{h(d)},f=e,m=(n=a==null?void 0:a.info)==null?void 0:n.version;return p.useEffect(()=>{h({})},[f]),t.jsx(ie,{FallbackComponent:ce,resetKeys:[f],children:t.jsx(E,{...s,sx:{"& .title-bar":{pt:0},".blocklet-list":{mt:0},"& h2":{display:"none"}},children:t.jsx(we,{layout:{showExplore:!1,showTitle:!0},blockletRender:d=>{const i={...d,endpoint:f};return t.jsx(F,{...i})},baseSearch:!0,endpoint:f,locale:o,onFilterChange:l,onSearchSelect:r,filters:u,extraFilter:c,serverVersion:m})})})}A.propTypes={storeUrl:b.string.isRequired,handleSearchSelect:b.func,extraFilter:b.func};A.defaultProps={handleSearchSelect:null,extraFilter:void 0};const Ie=H(Re)`
2
2
  .ms-highlight {
3
3
  color: ${e=>e.theme.palette.primary.main};
4
4
  }
@@ -1,4 +1,4 @@
1
- import{j as e,k as i,dv as x,dw as c,dq as p}from"./index-C6Izz9No.js";function w({name:t,nameFormatter:a=o=>typeof o=="string"?o.split(" ").map(m=>x(c(m))).join(" "):o,layout:n="horizontal",children:r,valueComponent:l="div",nameWidth:s=90,...f}){return e.jsxs(d,{layout:n,width:s,...f,children:[e.jsx(i,{color:"textSecondary",className:"info-row__name",children:a(t)}),r&&e.jsx(i,{color:"textPrimary",component:l,className:"info-row__value",children:r})]})}const d=p("div")`
1
+ import{j as e,k as i,dv as x,dw as c,dq as p}from"./index-DMUuXkl-.js";function w({name:t,nameFormatter:a=o=>typeof o=="string"?o.split(" ").map(m=>x(c(m))).join(" "):o,layout:n="horizontal",children:r,valueComponent:l="div",nameWidth:s=90,...f}){return e.jsxs(d,{layout:n,width:s,...f,children:[e.jsx(i,{color:"textSecondary",className:"info-row__name",children:a(t)}),r&&e.jsx(i,{color:"textPrimary",component:l,className:"info-row__value",children:r})]})}const d=p("div")`
2
2
  display: flex;
3
3
  flex-direction: ${t=>t.layout==="vertical"?"column":"row"};
4
4
  justify-content: flex-start;
@@ -1,4 +1,4 @@
1
- import{u as k,j as o,C,aB as W,cW as b,z as U,m as _,cM as D,r,a$ as E,h as d,x,ao as P,ag as R,v as O,aA as $,w as A,F as K,bA as M,n as z}from"./index-C6Izz9No.js";import{I as B}from"./invitation-Dy26pV3p.js";import"./index-CwgnMewz.js";import"./index-OyGBJ3_y.js";import"./emotion-react.browser.esm-CRwHqkji.js";import"./index-DtHvk8jF.js";import"./sdk-DdkQ3E0T.js";import"./wrap-locale-BHn2Bnsl.js";function H(p){const{api:i,session:f}=W(),{info:s}=k(),c=b(),v=U(),{t:l,locale:m}=_(),{encryptKey:N,decrypt:y}=D(),[L,g]=r.useState(!1),h=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),a=E(async()=>{if(!h)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:h}}),t=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(t){const u=new URL(window.location.href);u.pathname=x(P(),"/api/did/invite/token"),u.searchParams.set("_ek_",N),u.searchParams.set("inviteId",h);const{data:j}=await i.get(u.href);e=j}return{invitation:n,nextWorkflow:e,needReceiveNFT:t}}),S=r.useCallback(()=>{g(!0)},[]),I=r.useCallback(()=>{if(a.error)throw a.error;return a.value.invitation},[a]),w=r.useCallback(async e=>{e&&(Object.prototype.hasOwnProperty.call(e,"encrypted")&&!e.encrypted?R(e.sessionToken):R(y(e.sessionToken)));const n=new URLSearchParams(c.search);n.delete("inviteId");const t=n.toString();await f.refresh(),v(`/${t&&`?${t}`}`,{replace:!0})},[c,v,f]);if(a.loading)return o.jsx(C,{});const F=()=>{const e=new URL(window.location.href);e.pathname=x(P(),"/api/did/invite/status"),e.searchParams.set("_t_",a.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:t}=await i.get(e.href);t.status==="succeed"&&(clearInterval(n),f.updateConnectedInfo(t),w(t))},2e3)},T=()=>{g(!1)};return o.jsxs(V,{className:"page-invite",children:[d(a,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:L,locale:m,baseUrl:s.launcher.url,checkFn:$.create({baseURL:s.launcher.url}).get,onSuccess:F,onClose:T,checkTimeout:5*60*1e3,webWalletUrl:A(s),extraParams:{nw:d(a,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:`${K.WELLKNOWN_SERVICE_PATH_PREFIX}/api/did`}),o.jsx(B,{...p,getDataFn:I,createPassportSvg:e=>M(e,s),checkFn:i.get,onLoginSuccess:w,passportColor:"default",onReceive:d(a,"value.needReceiveNFT")?S:null})]})}const V=z.div`
1
+ import{u as k,j as o,C,aB as W,cW as b,z as U,m as _,cM as D,r,a$ as E,h as d,x,ao as P,ag as R,v as O,aA as $,w as A,F as K,bA as M,n as z}from"./index-DMUuXkl-.js";import{I as B}from"./invitation-OOnB1MnQ.js";import"./index-B3guyKGC.js";import"./index-CMclvolP.js";import"./emotion-react.browser.esm-CH16KKaA.js";import"./index-CJ2iy25m.js";import"./sdk-B0fHGxCR.js";import"./wrap-locale-Cm4YHFCT.js";function H(p){const{api:i,session:f}=W(),{info:s}=k(),c=b(),v=U(),{t:l,locale:m}=_(),{encryptKey:N,decrypt:y}=D(),[L,g]=r.useState(!1),h=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),a=E(async()=>{if(!h)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:h}}),t=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(t){const u=new URL(window.location.href);u.pathname=x(P(),"/api/did/invite/token"),u.searchParams.set("_ek_",N),u.searchParams.set("inviteId",h);const{data:j}=await i.get(u.href);e=j}return{invitation:n,nextWorkflow:e,needReceiveNFT:t}}),S=r.useCallback(()=>{g(!0)},[]),I=r.useCallback(()=>{if(a.error)throw a.error;return a.value.invitation},[a]),w=r.useCallback(async e=>{e&&(Object.prototype.hasOwnProperty.call(e,"encrypted")&&!e.encrypted?R(e.sessionToken):R(y(e.sessionToken)));const n=new URLSearchParams(c.search);n.delete("inviteId");const t=n.toString();await f.refresh(),v(`/${t&&`?${t}`}`,{replace:!0})},[c,v,f]);if(a.loading)return o.jsx(C,{});const F=()=>{const e=new URL(window.location.href);e.pathname=x(P(),"/api/did/invite/status"),e.searchParams.set("_t_",a.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:t}=await i.get(e.href);t.status==="succeed"&&(clearInterval(n),f.updateConnectedInfo(t),w(t))},2e3)},T=()=>{g(!1)};return o.jsxs(V,{className:"page-invite",children:[d(a,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:L,locale:m,baseUrl:s.launcher.url,checkFn:$.create({baseURL:s.launcher.url}).get,onSuccess:F,onClose:T,checkTimeout:5*60*1e3,webWalletUrl:A(s),extraParams:{nw:d(a,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:`${K.WELLKNOWN_SERVICE_PATH_PREFIX}/api/did`}),o.jsx(B,{...p,getDataFn:I,createPassportSvg:e=>M(e,s),checkFn:i.get,onLoginSuccess:w,passportColor:"default",onReceive:d(a,"value.needReceiveNFT")?S:null})]})}const V=z.div`
2
2
  width: 100vw;
3
3
  height: 100%;
4
4
  min-height: 100vh;
@@ -1,4 +1,4 @@
1
- import{fQ as $e,am as Ut,H as vr,cu as jt,be as et,hE as Vt,m as xr,cv as Er,hc as Mt,hF as Ar,r as c,x as L,O as kr,aQ as wr,aR as br,j as p,fY as Sr,hd as _r,a5 as Dr,bD as De,dx as Zt,N as W,g as Ce,dq as Ir,hG as Ht,a_ as Or,fi as Br,aT as re,y as fe,aC as Pt,hH as Tr,fL as Fr,I as Lr,ff as Rr,k as ye,D as Nr,B as ot,C as Ur,s as jr,t as Vr,hI as ct,v as Mr,hJ as Zr,ep as Hr,h1 as Pr}from"./index-C6Izz9No.js";import{d as Jt}from"./OpenInNew-i69UfT5i.js";import{x as Jr}from"./index-BJHGOv7L.js";import{f as Qr}from"./index-BojVbZw0.js";import{d as Gr}from"./HelpOutline-BoQhPL02.js";import{S as lt}from"./index-BStdxycA.js";const we=$e({});function zr({key:r}={key:"md"}){const e=Ut();return vr(e.breakpoints.down(r))}const T={NETWORK_ERROR:1001,UNAUTHORIZED:1002,EXPIRED:1003,PAST_DUE:1004,INVALID:1005,UNIT_LIMIT:1006,CORS_BLOCKED:1007,INCOMPATIBLE:1008};function Xr({endpoint:r,deps:e=[]}){return jt(async()=>{if(!et(r))return;const{headers:t}=await we.head(r,{timeout:1e3*30,params:{withExtras:!0}}),[n,a,s,i,o,u,d,f,b,_]=[t["x-space-name"],t["x-subscription-id"],t["x-listable"]==="true",t["x-readable"]==="true",t["x-writeable"]==="true",t["x-space-version"],t["x-space-owner-did"],t["x-space-is-available"],t["x-error-code"],t["x-is-site-admin"]],S=n?decodeURIComponent(n):"";if(f===void 0||b===void 0){const I=s&&i&&o;return{version:u,name:S,subscriptionId:a,ownerDid:d||"",isAvailable:I,errorCode:I?0:T.UNAUTHORIZED,isSiteAdmin:_==="true"}}return{version:u,name:S,subscriptionId:a,ownerDid:d,isAvailable:f==="true",errorCode:parseInt(b,10),isSiteAdmin:_==="true"}},{refreshDeps:[r].concat(e),onError(t){console.error(t)}})}const Kr=Vt.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
1
+ import{fQ as $e,am as Ut,H as vr,cu as jt,be as et,hE as Vt,m as xr,cv as Er,hc as Mt,hF as Ar,r as c,x as L,O as kr,aQ as wr,aR as br,j as p,fY as Sr,hd as _r,a5 as Dr,bD as De,dx as Zt,N as W,g as Ce,dq as Ir,hG as Ht,a_ as Or,fi as Br,aT as re,y as fe,aC as Pt,hH as Tr,fL as Fr,I as Lr,ff as Rr,k as ye,D as Nr,B as ot,C as Ur,s as jr,t as Vr,hI as ct,v as Mr,hJ as Zr,ep as Hr,h1 as Pr}from"./index-DMUuXkl-.js";import{d as Jt}from"./OpenInNew-DJezkARI.js";import{x as Jr}from"./index-BJHGOv7L.js";import{f as Qr}from"./index-BojVbZw0.js";import{d as Gr}from"./HelpOutline-BFcbReM4.js";import{S as lt}from"./index-CKzGu37_.js";const we=$e({});function zr({key:r}={key:"md"}){const e=Ut();return vr(e.breakpoints.down(r))}const T={NETWORK_ERROR:1001,UNAUTHORIZED:1002,EXPIRED:1003,PAST_DUE:1004,INVALID:1005,UNIT_LIMIT:1006,CORS_BLOCKED:1007,INCOMPATIBLE:1008};function Xr({endpoint:r,deps:e=[]}){return jt(async()=>{if(!et(r))return;const{headers:t}=await we.head(r,{timeout:1e3*30,params:{withExtras:!0}}),[n,a,s,i,o,u,d,f,b,_]=[t["x-space-name"],t["x-subscription-id"],t["x-listable"]==="true",t["x-readable"]==="true",t["x-writeable"]==="true",t["x-space-version"],t["x-space-owner-did"],t["x-space-is-available"],t["x-error-code"],t["x-is-site-admin"]],S=n?decodeURIComponent(n):"";if(f===void 0||b===void 0){const I=s&&i&&o;return{version:u,name:S,subscriptionId:a,ownerDid:d||"",isAvailable:I,errorCode:I?0:T.UNAUTHORIZED,isSiteAdmin:_==="true"}}return{version:u,name:S,subscriptionId:a,ownerDid:d,isAvailable:f==="true",errorCode:parseInt(b,10),isSiteAdmin:_==="true"}},{refreshDeps:[r].concat(e),onError(t){console.error(t)}})}const Kr=Vt.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
2
2
  1. Please contact the DID Space administrator to verify the relevant configuration.
3
3
  2. If you are the administrator, click the link below to view the detailed setup guide and resolve the issue.`,networkError:"DID Space is currently unreachable due to potential server issues, network problems, or maintenance. Please click the link to visit the homepage and check its status.",incompatible:`The current connection of DID Spaces version ({spaceVersion}) is not compatible with the component version ({expectVersion}). Please contact the administrator for adjustments.
4
4
  If you are the administrator, you can click the link below to take action.`},gateway:{add:{invalidUrl:"Invalid DID Spaces gateway url",label:"Enter the url of the DID Spaces",title:"Add DID Spaces"}},provideNFT:{title:"Please show the DID Spaces NFT for {appName}",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} show DID Spaces NFT",success:"Connected successfully"},helperText:{fixCorsError:"Fixing CORS Errors When Connecting to DID Spaces"}}},auditLog:{backup:{description:"A backup operation was completed {relativeTime}"},restore:{description:"A restore operation was completed {relativeTime}"},connected:{description:"A connection was established {relativeTime}"},disconnected:{description:"The connection was disconnected {relativeTime}"},objectsSync:{description:"{totalCount} objects ({size}) were synchronized {relativeTime}"}}}),Wr=Vt.flatten({common:{cancel:"取消",confirm:"确认",delete:"删除",error:"错误",open:"打开",unknown:"未知",invalidUrl:"无效的 url: {url}",upgrade:"升级",viewMore:"查看更多"},storage:{spaces:{authorize:{title:"连接 {appName} 至 DID Spaces",scan:"使用你的 DID Wallet 扫描下面的二维码以允许应用 {appName} 连接至 DID Spaces",success:"连接成功"},connect:{reconnect:"立即重连",useSpaceGateway:"使用 DID Spaces 网关连接",useWallet:"连接至 DID Spaces",howToGetGatewayUrl:"如何获取 DID Spaces 的网关地址",providerForStorage:"请连接您的 DID Spaces"},connected:{title:"已连接的 DID Spaces",tag:"已连接"},disconnected:{tag:"连接已断开"},error:{tag:"需要关注",blockedByCors:"因 CORS 限制,访问被阻止",unreachable:"DID Space 无法访问",expired:"DID Spaces 已过期,点击此链接重新订阅",pastDue:"DID Spaces 有未支付账单,点击此链接完成支付",invalid:"DID Spaces 订阅异常,点击此链接检查",unitLimit:"DID Spaces 免费额度已用完,点击此链接付费升级",cors:`连接请求可能因 CORS 限制而失败:
@@ -1,4 +1,4 @@
1
- import{n as q,P as E,r as p,e as Se,j as e,C as J,g as Be,u as pe,m as Y,o as De,q as Ee,D as Te,B as H,s as Le,k as F,t as le,v as Ae,w as Ie,x as _e,y as Pe,z as fe,A as z,E as Re,d as Fe,F as oe,H as Ne,I as Ue,J as O,K as ne,M as ae,N as B,O as Me,R as W,Q as re,S as Oe,U as ie,V as ce,X as We,Y as me,Z as $e,$ as ze}from"./index-C6Izz9No.js";import{_ as Ve}from"./useLocalStorage-CptlIDth.js";import{g as qe,D as Ke}from"./index-DahCIi0O.js";import{E as Qe}from"./index-CF5KyBKJ.js";import{B as P}from"./status-TrPzrseV.js";import{D as Xe,u as He,B as de,j as Je}from"./actions-B1_nu8vo.js";import{u as xe,W as Ye}from"./url-evaluation-1fghsAUh.js";import{I as Ze,B as Ge}from"./install-from-url-BxsfwyuB.js";import{d as et}from"./Launch-D_WpKovx.js";import{d as tt}from"./Add-BVWbq3cG.js";import{S as R}from"./index-BStdxycA.js";import{i as st,a as lt}from"./without-wallet-BH2vteYj.js";import{P as ot}from"./permission-h2Mie7R_.js";import"./TableRow-Blprpgh0.js";import"./useThemeProps-D_kbBiom.js";import"./emotion-react.browser.esm-CRwHqkji.js";import"./ViewColumn-BapDz7iW.js";import"./Search--E9n9O1E.js";import"./Clear-D_9cXytM.js";import"./Delete-DmSssFpY.js";import"./MoreVert-BAMY4knD.js";import"./TableSearch-jwWcMcmv.js";import"./get-safe-url-P6A_Ruhz.js";import"./ButtonGroup-BVpxfmxe.js";import"./getValidReactChildren-BvOfvno3.js";import"./cloneDeep-DciNVKm5.js";import"./index-DgFZqRZ8.js";import"./Autocomplete-CkTshmb5.js";import"./ListSubheader-C5v2mm8b.js";import"./ListItemButton-DD_v2iCZ.js";import"./Stepper-CH7hAe1O.js";import"./index-BUgKJph9.js";function V({blocklet:j,skipAccessibilityCheck:m=!1,...u}){const{t:r}=p.useContext(Se),{urls:C,loading:n,recommendedUrl:h}=xe(j);if(n&&!m)return e.jsx(J,{size:12,...u});const k=m?C[0]:h;return k?e.jsx(at,{...u,children:e.jsx(nt,{children:e.jsxs(Be,{href:k,target:"_blank",className:"blocklet-interface",underline:"hover",children:[r("common.visit"),e.jsx(et,{fontSize:"12",sx:{marginLeft:.5}})]})})}):r("blocklet.router.noAccessibleUrl")}const nt=q.div`
1
+ import{n as q,P as E,r as p,e as Se,j as e,C as J,g as Be,u as pe,m as Y,o as De,q as Ee,D as Te,B as H,s as Le,k as F,t as le,v as Ae,w as Ie,x as _e,y as Pe,z as fe,A as z,E as Re,d as Fe,F as oe,H as Ne,I as Ue,J as O,K as ne,M as ae,N as B,O as Me,R as W,Q as re,S as Oe,U as ie,V as ce,X as We,Y as me,Z as $e,$ as ze}from"./index-DMUuXkl-.js";import{_ as Ve}from"./useLocalStorage-rbap7GBn.js";import{g as qe,D as Ke}from"./index-DtQKM-2h.js";import{E as Qe}from"./index-Z8_Ea0J-.js";import{B as P}from"./status-FCdb54YV.js";import{D as Xe,u as He,B as de,j as Je}from"./actions-BTcKDonC.js";import{u as xe,W as Ye}from"./url-evaluation-D2uxzb5w.js";import{I as Ze,B as Ge}from"./install-from-url-BjMqGDXD.js";import{d as et}from"./Launch-BZfUR2wT.js";import{d as tt}from"./Add-CKZvwomV.js";import{S as R}from"./index-CKzGu37_.js";import{i as st,a as lt}from"./without-wallet-MfTWOoXr.js";import{P as ot}from"./permission-BrGI8BrM.js";import"./TableRow-Cm_wAjgF.js";import"./useThemeProps-CWjJ-DWG.js";import"./emotion-react.browser.esm-CH16KKaA.js";import"./ViewColumn-B1nkIYjz.js";import"./Search-BWsSz0TZ.js";import"./Clear-h2RSseCa.js";import"./Delete-DSwbRjGm.js";import"./MoreVert-6SZ5-4Oc.js";import"./TableSearch-CbLOqG0x.js";import"./get-safe-url-DdRvX178.js";import"./ButtonGroup-Cv9T_ybJ.js";import"./getValidReactChildren-Ds2y77el.js";import"./cloneDeep-CvMji3zz.js";import"./index-IyfTJp8i.js";import"./Autocomplete-BSy3e1ZV.js";import"./ListSubheader-OdrZyzwN.js";import"./ListItemButton-D3dXwiba.js";import"./Stepper-D5qb4eez.js";import"./index-BdgxyWV7.js";function V({blocklet:j,skipAccessibilityCheck:m=!1,...u}){const{t:r}=p.useContext(Se),{urls:C,loading:n,recommendedUrl:h}=xe(j);if(n&&!m)return e.jsx(J,{size:12,...u});const k=m?C[0]:h;return k?e.jsx(at,{...u,children:e.jsx(nt,{children:e.jsxs(Be,{href:k,target:"_blank",className:"blocklet-interface",underline:"hover",children:[r("common.visit"),e.jsx(et,{fontSize:"12",sx:{marginLeft:.5}})]})})}):r("blocklet.router.noAccessibleUrl")}const nt=q.div`
2
2
  display: flex;
3
3
  margin: 4px 0;
4
4
  `,at=q.div`
@@ -1,4 +1,4 @@
1
- import{j as e,dq as c,N as l,P as n}from"./index-C6Izz9No.js";var i=function(t){return e.jsx("svg",{...t,children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.36096 2.3999C7.04725 2.3999 6.76249 2.58326 6.63267 2.86886L0.872671 15.5409C0.825415 15.6448 0.800964 15.7577 0.800964 15.8719V15.9999V27.3919C0.800964 27.8337 1.15914 28.1919 1.60096 28.1919H30.401C30.8428 28.1919 31.201 27.8337 31.201 27.3919V15.8719C31.201 15.7577 31.1765 15.6448 31.1293 15.5409L25.3693 2.86886C25.2394 2.58326 24.9547 2.3999 24.641 2.3999H7.36096ZM2.40096 16.7999V26.5919H29.601V16.7932C29.5669 16.7976 29.5321 16.7999 29.4968 16.7999H22.3993L20.3328 19.8997C20.1845 20.1222 19.9347 20.2559 19.6672 20.2559H11.6032C11.3357 20.2559 11.0859 20.1222 10.9375 19.8997L8.87104 16.7999H2.40096ZM29.2167 15.1999H21.9712C21.7037 15.1999 21.4539 15.3336 21.3056 15.5561L19.239 18.6559H12.0313L9.96483 15.5561C9.81645 15.3336 9.56667 15.1999 9.29919 15.1999H2.78519L7.8761 3.9999H24.1258L29.2167 15.1999Z",fill:"currentColor"})})};i.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};i.displayName="empty";const a=c(l)`
1
+ import{j as e,dq as c,N as l,P as n}from"./index-DMUuXkl-.js";var i=function(t){return e.jsx("svg",{...t,children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.36096 2.3999C7.04725 2.3999 6.76249 2.58326 6.63267 2.86886L0.872671 15.5409C0.825415 15.6448 0.800964 15.7577 0.800964 15.8719V15.9999V27.3919C0.800964 27.8337 1.15914 28.1919 1.60096 28.1919H30.401C30.8428 28.1919 31.201 27.8337 31.201 27.3919V15.8719C31.201 15.7577 31.1765 15.6448 31.1293 15.5409L25.3693 2.86886C25.2394 2.58326 24.9547 2.3999 24.641 2.3999H7.36096ZM2.40096 16.7999V26.5919H29.601V16.7932C29.5669 16.7976 29.5321 16.7999 29.4968 16.7999H22.3993L20.3328 19.8997C20.1845 20.1222 19.9347 20.2559 19.6672 20.2559H11.6032C11.3357 20.2559 11.0859 20.1222 10.9375 19.8997L8.87104 16.7999H2.40096ZM29.2167 15.1999H21.9712C21.7037 15.1999 21.4539 15.3336 21.3056 15.5561L19.239 18.6559H12.0313L9.96483 15.5561C9.81645 15.3336 9.56667 15.1999 9.29919 15.1999H2.78519L7.8761 3.9999H24.1258L29.2167 15.1999Z",fill:"currentColor"})})};i.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};i.displayName="empty";const a=c(l)`
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  align-items: center;
@@ -1 +1 @@
1
- import{r as E,m as W,z as j,j as e,$ as I,C as T,cF as k,N as v,v as L,A as h,F as N,u as S,w as U,aq as R,ag as b}from"./index-C6Izz9No.js";import{w as F}from"./wrap-locale-BHn2Bnsl.js";import{g as _}from"./get-safe-url-P6A_Ruhz.js";function A({SessionContext:n,webWalletUrl:a,onSuccess:r}){var g,u;const{api:o,session:t}=E.useContext(n),{t:s,locale:m}=W(),f=j(),{searchParams:l}=new URL(window.location.href),d=l.get("redirect"),w=async(c,C)=>{r(c,C),await t.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(d){const i=decodeURIComponent(d);i.startsWith(N.WELLKNOWN_SERVICE_PATH_PREFIX)?f(i,{replace:!0}):window.location.href=_(i)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},P=c=>{h.error(c.message)},p={},x=l.get("componentId");return x&&(p.componentId=x),t.loading?e.jsx(I,{children:e.jsx(T,{})}):e.jsx(k,{did:((g=window==null?void 0:window.blocklet)==null?void 0:g.appPid)||((u=window==null?void 0:window.env)==null?void 0:u.appPid),children:e.jsx(v,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(L,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:w,onError:P,locale:m,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:p,extraContent:null,hideCloseButton:!0})})})}const B=F(A);function z(){const{info:n}=S(),a=U(n),r=(o,t)=>{o.sessionToken&&b(t(o.sessionToken))};return e.jsx(B,{SessionContext:R,webWalletUrl:a,onSuccess:r})}export{z as default};
1
+ import{r as E,m as W,z as j,j as e,$ as I,C as T,cF as k,N as v,v as L,A as h,F as N,u as S,w as U,aq as R,ag as b}from"./index-DMUuXkl-.js";import{w as F}from"./wrap-locale-Cm4YHFCT.js";import{g as _}from"./get-safe-url-DdRvX178.js";function A({SessionContext:n,webWalletUrl:a,onSuccess:r}){var g,u;const{api:o,session:t}=E.useContext(n),{t:s,locale:m}=W(),f=j(),{searchParams:l}=new URL(window.location.href),d=l.get("redirect"),w=async(c,C)=>{r(c,C),await t.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(d){const i=decodeURIComponent(d);i.startsWith(N.WELLKNOWN_SERVICE_PATH_PREFIX)?f(i,{replace:!0}):window.location.href=_(i)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},P=c=>{h.error(c.message)},p={},x=l.get("componentId");return x&&(p.componentId=x),t.loading?e.jsx(I,{children:e.jsx(T,{})}):e.jsx(k,{did:((g=window==null?void 0:window.blocklet)==null?void 0:g.appPid)||((u=window==null?void 0:window.env)==null?void 0:u.appPid),children:e.jsx(v,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(L,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:w,onError:P,locale:m,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:p,extraContent:null,hideCloseButton:!0})})})}const B=F(A);function z(){const{info:n}=S(),a=U(n),r=(o,t)=>{o.sessionToken&&b(t(o.sessionToken))};return e.jsx(B,{SessionContext:R,webWalletUrl:a,onSuccess:r})}export{z as default};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-NDcAY1VU.js","./index-C6Izz9No.js","./index-Cp6LwWOU.css"])))=>i.map(i=>d[i]);
2
- import{r as u,cw as X,c6 as H,cx as q,cy as G,aQ as O,aR as Q,j as s,n as E,P as y,H as V,aU as J,e as K,cz as Y,v as _,N as x,cA as Z,W as ee,B as I,bd as te,k as M,cB as $,g as se,cC as ae,bC as oe,cD as ne,cE as re,u as ie,w as ce,aq as le,bA as pe,ag as de}from"./index-C6Izz9No.js";import{d as ue}from"./ViewList-Dk8IoszY.js";import{d as me}from"./Done-B13j0VZG.js";import{N as fe}from"./index-OyGBJ3_y.js";import{w as he}from"./wrap-locale-BHn2Bnsl.js";import{g as xe}from"./get-safe-url-P6A_Ruhz.js";import{S as ge,a as ve,b as be}from"./Stepper-CH7hAe1O.js";import"./emotion-react.browser.esm-CRwHqkji.js";var k=function(t){if(!t)return 0;var r=G(t).valueOf()-Date.now();return r<0?0:r},we=function(t){return{days:Math.floor(t/864e5),hours:Math.floor(t/36e5)%24,minutes:Math.floor(t/6e4)%60,seconds:Math.floor(t/1e3)%60,milliseconds:Math.floor(t)%1e3}},ye=function(t){t===void 0&&(t={});var r=t||{},l=r.leftTime,c=r.targetDate,m=r.interval,w=m===void 0?1e3:m,g=r.onEnd,j=u.useMemo(function(){return X(l)&&l>0?Date.now()+l:void 0},[l]),p="leftTime"in t?j:c,a=H(u.useState(function(){return k(p)}),2),d=a[0],f=a[1],v=q(g);u.useEffect(function(){if(!p){f(0);return}f(k(p));var b=setInterval(function(){var o,i=k(p);f(i),i===0&&(clearInterval(b),(o=v.current)===null||o===void 0||o.call(v))},w);return function(){return clearInterval(b)}},[p,w]);var n=u.useMemo(function(){return we(d)},[d]);return[d,n]},P={},je=Q;Object.defineProperty(P,"__esModule",{value:!0});var R=P.default=void 0,Se=je(O()),ke=s;R=P.default=(0,Se.default)((0,ke.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp");function T({list:t,width:r,height:l,cardSpace:c,onSelect:m,defaultIndex:w}){const[g,j]=u.useState(0),[p,a]=u.useState(0),d=u.useRef(null),f=o=>{if(o<0||o>t.length-1)return;j(o);const i=d.current.clientWidth;a(o*(r+c)-(i-r)/2+c*.5),m(o)};u.useEffect(()=>{f(w);const o=i=>i.preventDefault();d.current.addEventListener("touchmove",o,{passive:!1})},[]);let v;const n=o=>{v=o.touches[0].clientX},b=o=>{const i=o.changedTouches[0],S=v-i.clientX;Math.abs(S)>60&&(S>0?f(g+1):f(g-1))};return s.jsx(Pe,{ref:d,onTouchStart:n,onTouchEnd:b,children:s.jsx("div",{className:"card-container",style:{transform:`translate(${-p}px, 0)`},children:t.map((o,i)=>s.jsx("div",{className:`card-item ${i===g?"selected":""}`,style:{width:r,height:l,margin:c/2},onClick:()=>f(i),children:o.display?s.jsx("div",{className:"card-content",children:s.jsx(fe,{data:o.display,style:{width:"100%",height:"100%"}})}):s.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:o.src}})},o.id))})})}const Pe=E.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BI05or-g.js","./index-DMUuXkl-.js","./index-Cp6LwWOU.css"])))=>i.map(i=>d[i]);
2
+ import{r as u,cw as X,c6 as H,cx as q,cy as G,aQ as O,aR as Q,j as s,n as E,P as y,H as V,aU as J,e as K,cz as Y,v as _,N as x,cA as Z,W as ee,B as I,bd as te,k as M,cB as $,g as se,cC as ae,bC as oe,cD as ne,cE as re,u as ie,w as ce,aq as le,bA as pe,ag as de}from"./index-DMUuXkl-.js";import{d as ue}from"./ViewList-COZmXWce.js";import{d as me}from"./Done-B9t-lcQ7.js";import{N as fe}from"./index-CMclvolP.js";import{w as he}from"./wrap-locale-Cm4YHFCT.js";import{g as xe}from"./get-safe-url-DdRvX178.js";import{S as ge,a as ve,b as be}from"./Stepper-D5qb4eez.js";import"./emotion-react.browser.esm-CH16KKaA.js";var k=function(t){if(!t)return 0;var r=G(t).valueOf()-Date.now();return r<0?0:r},we=function(t){return{days:Math.floor(t/864e5),hours:Math.floor(t/36e5)%24,minutes:Math.floor(t/6e4)%60,seconds:Math.floor(t/1e3)%60,milliseconds:Math.floor(t)%1e3}},ye=function(t){t===void 0&&(t={});var r=t||{},l=r.leftTime,c=r.targetDate,m=r.interval,w=m===void 0?1e3:m,g=r.onEnd,j=u.useMemo(function(){return X(l)&&l>0?Date.now()+l:void 0},[l]),p="leftTime"in t?j:c,a=H(u.useState(function(){return k(p)}),2),d=a[0],f=a[1],v=q(g);u.useEffect(function(){if(!p){f(0);return}f(k(p));var b=setInterval(function(){var o,i=k(p);f(i),i===0&&(clearInterval(b),(o=v.current)===null||o===void 0||o.call(v))},w);return function(){return clearInterval(b)}},[p,w]);var n=u.useMemo(function(){return we(d)},[d]);return[d,n]},P={},je=Q;Object.defineProperty(P,"__esModule",{value:!0});var R=P.default=void 0,Se=je(O()),ke=s;R=P.default=(0,Se.default)((0,ke.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}),"GetApp");function T({list:t,width:r,height:l,cardSpace:c,onSelect:m,defaultIndex:w}){const[g,j]=u.useState(0),[p,a]=u.useState(0),d=u.useRef(null),f=o=>{if(o<0||o>t.length-1)return;j(o);const i=d.current.clientWidth;a(o*(r+c)-(i-r)/2+c*.5),m(o)};u.useEffect(()=>{f(w);const o=i=>i.preventDefault();d.current.addEventListener("touchmove",o,{passive:!1})},[]);let v;const n=o=>{v=o.touches[0].clientX},b=o=>{const i=o.changedTouches[0],S=v-i.clientX;Math.abs(S)>60&&(S>0?f(g+1):f(g-1))};return s.jsx(Pe,{ref:d,onTouchStart:n,onTouchEnd:b,children:s.jsx("div",{className:"card-container",style:{transform:`translate(${-p}px, 0)`},children:t.map((o,i)=>s.jsx("div",{className:`card-item ${i===g?"selected":""}`,style:{width:r,height:l,margin:c/2},onClick:()=>f(i),children:o.display?s.jsx("div",{className:"card-content",children:s.jsx(fe,{data:o.display,style:{width:"100%",height:"100%"}})}):s.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:o.src}})},o.id))})})}const Pe=E.div`
3
3
  overflow: hidden;
4
4
  mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
5
5
  overflow: hidden;
@@ -33,7 +33,7 @@ import{r as u,cw as X,c6 as H,cx as q,cy as G,aQ as O,aR as Q,j as s,n as E,P as
33
33
  }
34
34
  }
35
35
  }
36
- `;T.propTypes={list:y.array,width:y.number,height:y.number,cardSpace:y.number,onSelect:y.func,defaultIndex:y.number};T.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};function Te({icon:t,active:r,completed:l}){const c={1:s.jsx(ue,{className:"step-icon"}),2:s.jsx(R,{className:"step-icon"}),3:s.jsx(me,{className:"step-icon"})},m=["step-icon-w"];return r&&m.push("step-icon-w--active"),l&&m.push("step-icon-w--completed"),s.jsx("div",{className:m.join(" "),children:c[String(t)]})}function Ce({SessionContext:t,webWalletUrl:r,createPassportSvg:l,passportColor:c,onLogin:m,teamDid:w}){const{api:g,session:j}=u.useContext(t),p=V(e=>e.breakpoints.down("sm")),a=J({user:null,passport:null,success:!1,activeStep:0}),d=u.useRef({sessionToken:"",refreshToken:""}),{setPassportId:f,clearPassportId:v}=re(),{t:n,locale:b}=u.useContext(K),{wallet:o}=Y(),[i,S]=u.useState(0),{searchParams:W}=new URL(window.location.href),C=()=>{a.activeStep++},A=e=>{a.user=e.user},z=()=>{C()},U=(e,h)=>{e!=null&&e.passportId&&f(e.passportId),e!=null&&e.sessionToken&&(d.current.sessionToken=h(e.sessionToken)),e!=null&&e.refreshToken&&(d.current.refreshToken=h(e.refreshToken)),a.success=!0,C()},B=async()=>{try{await j.logout()}catch(e){console.warn(e)}},D=async()=>{if(o&&$()){oe(()=>import("./index-NDcAY1VU.js").then(h=>h.i),__vite__mapDeps([0,1,2]),import.meta.url).then(h=>{h.call("arcClosePage")});return}await B(),ne(m)&&m({sessionToken:d.current.sessionToken,refreshToken:d.current.refreshToken});const e=W.get("redirect");if(e){window.location.replace(xe(e));return}v(),window.location.replace("/")},F=e=>{a.passport=e.target.value},[N]=ye({leftTime:i,onEnd:()=>{D()}}),L=[{label:n("lostPassport.recoverPassport"),content:()=>a.user?s.jsxs(x,{className:"select-passport",children:[s.jsxs(x,{my:1,display:"flex",alignItems:"center",className:"user-info",children:[s.jsx(Z,{src:a.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),s.jsxs(x,{children:[s.jsx(x,{className:"name",children:a.user.fullName}),s.jsx(x,{className:"did",mt:1,children:s.jsx(ee,{responsive:!p,compact:p,did:a.user.did})})]})]}),s.jsx("div",{children:s.jsx(T,{width:p?180:230,height:p?240:306,cardSpace:24,list:a.user.passportTypes.map(e=>({src:l({scope:e.scope,role:e.role,title:e.scope==="kyc"?e.name:e.title,issuer:e.issuer.name,issuerDid:e.issuer.id,ownerDid:a.user.did,ownerName:a.user.fullName,ownerAvatarUrl:a.user.avatar,preferredColor:c||"auto",extra:e.scope==="kyc"?{key:"Email",value:e.name}:void 0}),name:e.title,id:e.id,display:e.display})),onSelect:e=>F({target:{value:a.user.passportTypes[e].id}}),defaultIndex:0})}),s.jsx(x,{textAlign:"center",children:s.jsx(I,{variant:"contained",color:"primary",onClick:()=>z(),disabled:!a.passport,children:n("common.next")})})]}):s.jsx(_,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:g.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:A,locale:b,messages:{title:n("lostPassport.recoverDialog.title"),scan:n("lostPassport.recoverDialog.scan"),confirm:n("lostPassport.recoverDialog.confirm"),success:n("lostPassport.recoverDialog.success")}})},{label:n("lostPassport.receivePassport"),content:()=>{var h;const e={receiverDid:a.user.did,passportId:a.passport,teamDid:w||((h=window==null?void 0:window.blocklet)==null?void 0:h.did)};return s.jsx(_,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:g.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:U,forceConnected:!1,locale:b,messages:{title:`${n("lostPassport.receiveDialog.title")}`,scan:n("lostPassport.receiveDialog.scan"),confirm:n("lostPassport.receiveDialog.confirm"),success:n("lostPassport.receiveDialog.success")},extraParams:e})}},{label:n("common.complete"),content:()=>(i===0&&S(3e3),s.jsxs(x,{textAlign:"center",children:[s.jsx(x,{mb:3,color:"success.main",children:s.jsx(te,{style:{fontSize:60}})}),s.jsx(M,{component:"p",variant:"body1",className:"subheader",children:n("issuePassport.dialog.success")}),s.jsx(M,{component:"p",variant:"body2",color:"gray",children:o&&$()?n("issuePassport.dialog.autoClose",{seconds:Math.round(N/1e3)}):n("issuePassport.dialog.autoJump",{seconds:Math.round(N/1e3)})}),s.jsx(I,{style:{marginTop:40},variant:"contained",color:"primary",onClick:D,children:n("issuePassport.dialog.loginWithPassport")})]}))}];return s.jsx(De,{children:s.jsxs("div",{className:"stepper",children:[s.jsx(ge,{className:"stepper-progress",alternativeLabel:!0,activeStep:a.activeStep,children:L.map(({label:e})=>s.jsx(ve,{children:s.jsx(be,{StepIconComponent:Te,children:e})},e))}),s.jsx("div",{className:"stepper-content",children:L[a.activeStep].content()}),!a.success&&s.jsx(x,{textAlign:"center",fontSize:12,children:s.jsx(se,{href:"/",sx:{color:"#4598FA",textDecoration:"none"},children:n("lostPassport.return")})})]})})}const De=E(ae)`
36
+ `;T.propTypes={list:y.array,width:y.number,height:y.number,cardSpace:y.number,onSelect:y.func,defaultIndex:y.number};T.defaultProps={list:"",width:300,height:400,cardSpace:40,onSelect:()=>{},defaultIndex:0};function Te({icon:t,active:r,completed:l}){const c={1:s.jsx(ue,{className:"step-icon"}),2:s.jsx(R,{className:"step-icon"}),3:s.jsx(me,{className:"step-icon"})},m=["step-icon-w"];return r&&m.push("step-icon-w--active"),l&&m.push("step-icon-w--completed"),s.jsx("div",{className:m.join(" "),children:c[String(t)]})}function Ce({SessionContext:t,webWalletUrl:r,createPassportSvg:l,passportColor:c,onLogin:m,teamDid:w}){const{api:g,session:j}=u.useContext(t),p=V(e=>e.breakpoints.down("sm")),a=J({user:null,passport:null,success:!1,activeStep:0}),d=u.useRef({sessionToken:"",refreshToken:""}),{setPassportId:f,clearPassportId:v}=re(),{t:n,locale:b}=u.useContext(K),{wallet:o}=Y(),[i,S]=u.useState(0),{searchParams:W}=new URL(window.location.href),C=()=>{a.activeStep++},A=e=>{a.user=e.user},z=()=>{C()},U=(e,h)=>{e!=null&&e.passportId&&f(e.passportId),e!=null&&e.sessionToken&&(d.current.sessionToken=h(e.sessionToken)),e!=null&&e.refreshToken&&(d.current.refreshToken=h(e.refreshToken)),a.success=!0,C()},B=async()=>{try{await j.logout()}catch(e){console.warn(e)}},D=async()=>{if(o&&$()){oe(()=>import("./index-BI05or-g.js").then(h=>h.i),__vite__mapDeps([0,1,2]),import.meta.url).then(h=>{h.call("arcClosePage")});return}await B(),ne(m)&&m({sessionToken:d.current.sessionToken,refreshToken:d.current.refreshToken});const e=W.get("redirect");if(e){window.location.replace(xe(e));return}v(),window.location.replace("/")},F=e=>{a.passport=e.target.value},[N]=ye({leftTime:i,onEnd:()=>{D()}}),L=[{label:n("lostPassport.recoverPassport"),content:()=>a.user?s.jsxs(x,{className:"select-passport",children:[s.jsxs(x,{my:1,display:"flex",alignItems:"center",className:"user-info",children:[s.jsx(Z,{src:a.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),s.jsxs(x,{children:[s.jsx(x,{className:"name",children:a.user.fullName}),s.jsx(x,{className:"did",mt:1,children:s.jsx(ee,{responsive:!p,compact:p,did:a.user.did})})]})]}),s.jsx("div",{children:s.jsx(T,{width:p?180:230,height:p?240:306,cardSpace:24,list:a.user.passportTypes.map(e=>({src:l({scope:e.scope,role:e.role,title:e.scope==="kyc"?e.name:e.title,issuer:e.issuer.name,issuerDid:e.issuer.id,ownerDid:a.user.did,ownerName:a.user.fullName,ownerAvatarUrl:a.user.avatar,preferredColor:c||"auto",extra:e.scope==="kyc"?{key:"Email",value:e.name}:void 0}),name:e.title,id:e.id,display:e.display})),onSelect:e=>F({target:{value:a.user.passportTypes[e].id}}),defaultIndex:0})}),s.jsx(x,{textAlign:"center",children:s.jsx(I,{variant:"contained",color:"primary",onClick:()=>z(),disabled:!a.passport,children:n("common.next")})})]}):s.jsx(_,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:g.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:A,locale:b,messages:{title:n("lostPassport.recoverDialog.title"),scan:n("lostPassport.recoverDialog.scan"),confirm:n("lostPassport.recoverDialog.confirm"),success:n("lostPassport.recoverDialog.success")}})},{label:n("lostPassport.receivePassport"),content:()=>{var h;const e={receiverDid:a.user.did,passportId:a.passport,teamDid:w||((h=window==null?void 0:window.blocklet)==null?void 0:h.did)};return s.jsx(_,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:g.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:U,forceConnected:!1,locale:b,messages:{title:`${n("lostPassport.receiveDialog.title")}`,scan:n("lostPassport.receiveDialog.scan"),confirm:n("lostPassport.receiveDialog.confirm"),success:n("lostPassport.receiveDialog.success")},extraParams:e})}},{label:n("common.complete"),content:()=>(i===0&&S(3e3),s.jsxs(x,{textAlign:"center",children:[s.jsx(x,{mb:3,color:"success.main",children:s.jsx(te,{style:{fontSize:60}})}),s.jsx(M,{component:"p",variant:"body1",className:"subheader",children:n("issuePassport.dialog.success")}),s.jsx(M,{component:"p",variant:"body2",color:"gray",children:o&&$()?n("issuePassport.dialog.autoClose",{seconds:Math.round(N/1e3)}):n("issuePassport.dialog.autoJump",{seconds:Math.round(N/1e3)})}),s.jsx(I,{style:{marginTop:40},variant:"contained",color:"primary",onClick:D,children:n("issuePassport.dialog.loginWithPassport")})]}))}];return s.jsx(De,{children:s.jsxs("div",{className:"stepper",children:[s.jsx(ge,{className:"stepper-progress",alternativeLabel:!0,activeStep:a.activeStep,children:L.map(({label:e})=>s.jsx(ve,{children:s.jsx(be,{StepIconComponent:Te,children:e})},e))}),s.jsx("div",{className:"stepper-content",children:L[a.activeStep].content()}),!a.success&&s.jsx(x,{textAlign:"center",fontSize:12,children:s.jsx(se,{href:"/",sx:{color:"#4598FA",textDecoration:"none"},children:n("lostPassport.return")})})]})})}const De=E(ae)`
37
37
  padding-top: 46px;
38
38
  padding-bottom: 46px;
39
39
  height: 100%;