@abtnode/webapp 1.16.46-beta-20250709-123154-c05c363c → 1.16.47-beta-20250710-073736-01b9c1bc

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 (185) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-B4EEI1nK.js → AdapterDayjs-B8AEZ3l4.js} +1 -1
  4. package/dist/assets/{Add-Clw8RkKN.js → Add-DyeL4-IK.js} +1 -1
  5. package/dist/assets/ArrowDropDown-QRrV-SM6.js +1 -0
  6. package/dist/assets/{Autocomplete-gxYza7s5.js → Autocomplete-B_fjNjcC.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-C4BEBPis.js → Breadcrumbs-mIV7Y6jS.js} +1 -1
  8. package/dist/assets/{ButtonGroup-CPPdPq8H.js → ButtonGroup-gQqTXUWb.js} +1 -1
  9. package/dist/assets/{CSSTransition-CujxmWeH.js → CSSTransition-Cwsw3O0v.js} +1 -1
  10. package/dist/assets/{CallMerge-CcRkZzxX.js → CallMerge-_wPMIobV.js} +1 -1
  11. package/dist/assets/{CardContent-DiPVtGg0.js → CardContent-DZxc1v9r.js} +1 -1
  12. package/dist/assets/{ChevronLeft-BNoaRf3a.js → ChevronLeft-GfW6gg_h.js} +1 -1
  13. package/dist/assets/{ChevronRight-A_-fTRIz.js → ChevronRight-B3AWRgjb.js} +1 -1
  14. package/dist/assets/{Clear-ClQc69CC.js → Clear-TURgqjBD.js} +1 -1
  15. package/dist/assets/{DeleteOutline-BhORbRJB.js → DeleteOutline-BIpkPzjr.js} +1 -1
  16. package/dist/assets/{Done-De6rOS7P.js → Done-BI8Oqec5.js} +1 -1
  17. package/dist/assets/{Edit-CvUxpqSV.js → Edit-BBaBN2Wx.js} +1 -1
  18. package/dist/assets/{ErrorOutline-QvbHz9Zz.js → ErrorOutline-CGBCMbTc.js} +1 -1
  19. package/dist/assets/{FilterList-DrVbs05B.js → FilterList-CAcGuUFu.js} +1 -1
  20. package/dist/assets/{Google-BiT-YaK5.js → Google-VPfEXNga.js} +1 -1
  21. package/dist/assets/{HelpOutline-D_WMmdX2.js → HelpOutline-2t-W2bUr.js} +1 -1
  22. package/dist/assets/{Launch-p44wWut-.js → Launch-Cb9G2ztN.js} +1 -1
  23. package/dist/assets/{Link-BLZtgQVF.js → Link-DcMufYsw.js} +1 -1
  24. package/dist/assets/{ListItemButton-BCmmmtlq.js → ListItemButton-AVCY9rM6.js} +1 -1
  25. package/dist/assets/{ListSubheader-D4-WSAvX.js → ListSubheader-Y2ncSEte.js} +1 -1
  26. package/dist/assets/{LoadingButton-DYH4mgxh.js → LoadingButton-52ZmFaE1.js} +1 -1
  27. package/dist/assets/{MoreVert-3Ril4BaF.js → MoreVert-DrYkNse4.js} +1 -1
  28. package/dist/assets/{OpenInNew-Dg_PVVYU.js → OpenInNew-ChbbxgvU.js} +1 -1
  29. package/dist/assets/{Refresh-BuspPECP.js → Refresh-vx7O7y4X.js} +1 -1
  30. package/dist/assets/{Search-CveVLYRK.js → Search-DkAocH6B.js} +1 -1
  31. package/dist/assets/{Slider-CESm5SzK.js → Slider-Da_17JQt.js} +1 -1
  32. package/dist/assets/{Stepper-CazqSP6B.js → Stepper-D3djW5EG.js} +1 -1
  33. package/dist/assets/{Switch-Ce-0Lc8M.js → Switch-CnG_p51w.js} +1 -1
  34. package/dist/assets/{TableSearch-BezFlhKc.js → TableSearch-CcKxCotp.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-CBj3NmRn.js → ToggleButtonGroup-B6TeC2WF.js} +1 -1
  36. package/dist/assets/{Verified-aOhYddnX.js → Verified-BdjRVajU.js} +1 -1
  37. package/dist/assets/{VerifiedUser-BWVM02FY.js → VerifiedUser-DW1wXQJo.js} +1 -1
  38. package/dist/assets/{ViewList-5nfbahYZ.js → ViewList-19cDup6i.js} +1 -1
  39. package/dist/assets/{_createAggregator-Bw2sNslm.js → _createAggregator-BMD9-JvY.js} +1 -1
  40. package/dist/assets/{actions-DUHD3OYP.js → actions-dM1fFrJf.js} +1 -1
  41. package/dist/assets/{actions-BFpxkOZ3.js → actions-pcPb_nyk.js} +1 -1
  42. package/dist/assets/{agreement-B1qJWzXq.js → agreement-3xBCMj9y.js} +1 -1
  43. package/dist/assets/api-BMl09Q0w.js +1 -0
  44. package/dist/assets/{appearance-BYuAhb11.js → appearance-mGPlk6SZ.js} +1 -1
  45. package/dist/assets/{audit-logs-CrbGepG6.js → audit-logs-CeGg2JLb.js} +1 -1
  46. package/dist/assets/{base-chart-C8SmgApV.js → base-chart-BF6eAaCN.js} +1 -1
  47. package/dist/assets/{blocklet-DXJr-xZq.js → blocklet-C7W1PCuU.js} +1 -1
  48. package/dist/assets/{chain-DZSCXq3Z.js → chain-tijIKSX3.js} +1 -1
  49. package/dist/assets/{click-to-copy-CTJTNpA1.js → click-to-copy-DO0vuZcs.js} +1 -1
  50. package/dist/assets/client-CchI0TAL.js +1 -0
  51. package/dist/assets/cloneDeep-CsZdKnsl.js +1 -0
  52. package/dist/assets/{collapse-CYNTI7Qd.js → collapse-DP5fcjjp.js} +1 -1
  53. package/dist/assets/{config-navigation-B2RlmMVN.js → config-navigation-B788AN8W.js} +3 -3
  54. package/dist/assets/{connect-to-CmnXJqsQ.js → connect-to-Ot5rJo4-.js} +1 -1
  55. package/dist/assets/{cssMode-DZxnsnyP.js → cssMode-CYkNuyBG.js} +1 -1
  56. package/dist/assets/{delete-confirm-itV6yjjb.js → delete-confirm-PlNf3ZY8.js} +1 -1
  57. package/dist/assets/{depsEqual-B5cFAumu.js → depsEqual-DTCuMri4.js} +1 -1
  58. package/dist/assets/{detail-nzbwZA_l.js → detail-VYVYEsd7.js} +3 -3
  59. package/dist/assets/{domains-DEBNKwmg.js → domains-DqEQeXv2.js} +1 -1
  60. package/dist/assets/{download-hD5L8LfI.js → download-CdhYUH8K.js} +1 -1
  61. package/dist/assets/emotion-cache.browser.esm-lCkFhcap.js +1 -0
  62. package/dist/assets/engine-1UwJZH7E.js +1 -0
  63. package/dist/assets/{freemarker2-B8K0tUnT.js → freemarker2-4v6jPdR9.js} +1 -1
  64. package/dist/assets/{get-safe-url-CkVD5JZ8.js → get-safe-url-DQLWIOcC.js} +1 -1
  65. package/dist/assets/getValidReactChildren-CCHlzmWC.js +1 -0
  66. package/dist/assets/{graphqlMode-qoJCyPf8.js → graphqlMode-vAk3UAoz.js} +2 -2
  67. package/dist/assets/{handlebars-DSYs6ELw.js → handlebars-DNYWpg3P.js} +1 -1
  68. package/dist/assets/{html-BQrix1LQ.js → html-CeoZB4uy.js} +1 -1
  69. package/dist/assets/{htmlMode-CvDerMSw.js → htmlMode-Wlt7zMIN.js} +1 -1
  70. package/dist/assets/{iframe-d_LXZhpi.js → iframe-cPjusDrL.js} +1 -1
  71. package/dist/assets/{index-Ci5mHjJo.js → index-7bdhHiFd.js} +1 -1
  72. package/dist/assets/{index-CkVoL_FA.js → index-B0gFqLsw.js} +1 -1
  73. package/dist/assets/{index-51UuxJbA.js → index-B4EnYouc.js} +1 -1
  74. package/dist/assets/{index-HQ4TKOad.js → index-B77hR8tk.js} +1 -1
  75. package/dist/assets/{index-CXW6fl1B.js → index-B8KJR-kx.js} +3 -3
  76. package/dist/assets/{index-BQ9Ts5av.js → index-BMjpfJjp.js} +1 -1
  77. package/dist/assets/{index-_ISHsU4A.js → index-BOa0y9pw.js} +1 -1
  78. package/dist/assets/{index--ktJL2Tx.js → index-BSnpJGoE.js} +3 -3
  79. package/dist/assets/{index-Ur2CzPm7.js → index-BT8ElUR8.js} +1 -1
  80. package/dist/assets/{index-CZH7Mn5H.js → index-Bn_tCgMM.js} +1 -1
  81. package/dist/assets/{index-DgeSWvC7.js → index-BopL1gny.js} +1 -1
  82. package/dist/assets/{index-B73hHdUc.js → index-C3Q09qgh.js} +1 -1
  83. package/dist/assets/{index-C4ni3qSD.js → index-CEerh854.js} +1 -1
  84. package/dist/assets/{index-Dp5rYjgm.js → index-CL-lqorQ.js} +1 -1
  85. package/dist/assets/{index-DTRD5V4Z.js → index-CLzlZAUr.js} +1 -1
  86. package/dist/assets/{index-CbZ9lYQN.js → index-CW3YXBwi.js} +1 -1
  87. package/dist/assets/{index-BMN0G3TX.js → index-CWJxufpA.js} +1 -1
  88. package/dist/assets/index-Ca_LO4tk.js +1 -0
  89. package/dist/assets/{index-CjyGkLY6.js → index-CaacW8ab.js} +1 -1
  90. package/dist/assets/{index-BQhkQ0WB.js → index-CcYCgG1Z.js} +1 -1
  91. package/dist/assets/{index-CgR_UwLm.js → index-ClxTVhfK.js} +1 -1
  92. package/dist/assets/{index-BJFK1iYB.js → index-CtqzIHrc.js} +1 -1
  93. package/dist/assets/{index-FTSHH2z1.js → index-D4cctk8L.js} +1 -1
  94. package/dist/assets/{index-Crckurao.js → index-D9724EWR.js} +1 -1
  95. package/dist/assets/{index-MAh0KZHB.js → index-DAE9de69.js} +1 -1
  96. package/dist/assets/{index-CGnZOo7d.js → index-DCks6vHm.js} +1 -1
  97. package/dist/assets/{index-MeuqPgEE.js → index-DDPnmngo.js} +3 -3
  98. package/dist/assets/{index-B9t-nPIq.js → index-DF5RUkIE.js} +9 -9
  99. package/dist/assets/{index-vh4u80PB.js → index-DLek0c1M.js} +1 -1
  100. package/dist/assets/{index-D8SeMuuf.js → index-DSNc2KaD.js} +1 -1
  101. package/dist/assets/{index-CEX6125H.js → index-Dea_aYC4.js} +1 -1
  102. package/dist/assets/{index-BbU3n2Hk.js → index-DhnJyZwE.js} +1 -1
  103. package/dist/assets/{index-BJrvhEw-.js → index-DkCZntCT.js} +1 -1
  104. package/dist/assets/{index-5o6sB1f4.js → index-Ds9W4oy6.js} +1 -1
  105. package/dist/assets/{index-DFZwyC09.js → index-FX5iYsIB.js} +3 -3
  106. package/dist/assets/{index-f15iWus7.js → index-GY5yIEI_.js} +1 -1
  107. package/dist/assets/{index-iLrPvwdH.js → index-LaWosXhV.js} +1 -1
  108. package/dist/assets/{index-Dv5txe8G.js → index-LkgRhqPx.js} +1 -1
  109. package/dist/assets/{index-DodEGet5.js → index-PhxXoWyN.js} +2 -2
  110. package/dist/assets/{index-a0VOLesk.js → index-SE-GYB_5.js} +1 -1
  111. package/dist/assets/{index-Clb2HKeU.js → index-Tlo-w0hj.js} +1 -1
  112. package/dist/assets/{index-DYPal8XU.js → index-W9Gf1H9j.js} +1 -1
  113. package/dist/assets/{index-BKrngGDQ.js → index-WqL2nOOx.js} +1 -1
  114. package/dist/assets/{index-DRXdQRdu.js → index-aIFNWMe4.js} +1 -1
  115. package/dist/assets/{index-VibrsnfQ.js → index-g74PYCpk.js} +3 -3
  116. package/dist/assets/{index-CPtXYlM0.js → index-qnSWPvFZ.js} +1 -1
  117. package/dist/assets/{index-Dv9qlze4.js → index-zkZ28xVo.js} +1 -1
  118. package/dist/assets/{index.esm-Dqj7a_ya.js → index.esm-D_e-DGUA.js} +1 -1
  119. package/dist/assets/{install-from-url-B4rawAqf.js → install-from-url-BPDe_bKf.js} +1 -1
  120. package/dist/assets/{invitation-DyVYJveL.js → invitation-6hqyeU5m.js} +1 -1
  121. package/dist/assets/{is-path-prefix-equal-RJLchj2H.js → is-path-prefix-equal-C3txExEQ.js} +1 -1
  122. package/dist/assets/{item-DqvYl0Bz.js → item--P9-hN20.js} +1 -1
  123. package/dist/assets/{javascript-D_OdapPL.js → javascript-kIEugVVR.js} +1 -1
  124. package/dist/assets/{jsonMode-iE2OrXad.js → jsonMode-ONNR1nc9.js} +1 -1
  125. package/dist/assets/{liquid-egzKcszN.js → liquid-CMNUpoTf.js} +1 -1
  126. package/dist/assets/{list-header-s7KnhaJP.js → list-header-BUNKlhMR.js} +1 -1
  127. package/dist/assets/{log-BO9Yemek.js → log-dlwp3mLo.js} +1 -1
  128. package/dist/assets/{lottie-react.esm-D0Of1jq5.js → lottie-react.esm-BljEU_TC.js} +1 -1
  129. package/dist/assets/{mdx--E2h1g-2.js → mdx-DgUx7uoV.js} +1 -1
  130. package/dist/assets/{memory-FyikFhq4.js → memory-Chxl7x-V.js} +1 -1
  131. package/dist/assets/{metric-Bbm9krzb.js → metric-NP4oz2zf.js} +1 -1
  132. package/dist/assets/omit-C_8qTv_V.js +1 -0
  133. package/dist/assets/{overview-ZNI6zxFE.js → overview-CszsVFZE.js} +1 -1
  134. package/dist/assets/{permission-Bd240jHS.js → permission-H1evTnCb.js} +1 -1
  135. package/dist/assets/{preference-DHBc5A-p.js → preference-BfV_QTqs.js} +3 -3
  136. package/dist/assets/{python-giqpzHx_.js → python-CjGdR_GC.js} +1 -1
  137. package/dist/assets/{raf-schd.esm-QI9cu6Me.js → raf-schd.esm-HKMr2ACZ.js} +1 -1
  138. package/dist/assets/{razor-C_I2nnqk.js → razor-DsHellmc.js} +1 -1
  139. package/dist/assets/{rotate-session-key-WcsLllKv.js → rotate-session-key-DQ5udzPb.js} +1 -1
  140. package/dist/assets/{runtime-beCFfh_D.js → runtime-ZzV-XHTb.js} +1 -1
  141. package/dist/assets/schema-D5kZzngV.js +1 -0
  142. package/dist/assets/sdk-DyOTm4mE.js +1 -0
  143. package/dist/assets/{service-Boq6QtTB.js → service-7YmgYbKe.js} +1 -1
  144. package/dist/assets/{shorten-label-BsB05cbU.js → shorten-label-CFhfsEFi.js} +1 -1
  145. package/dist/assets/{simple-select-CwzHbqQD.js → simple-select-Dzvve8t_.js} +1 -1
  146. package/dist/assets/{spaces-CO7vXdm4.js → spaces-DWMGdRvw.js} +1 -1
  147. package/dist/assets/{status-g9gqtunL.js → status-Bn1Jy6BO.js} +1 -1
  148. package/dist/assets/{status-CqnKmWlH.js → status-DRq_orW0.js} +1 -1
  149. package/dist/assets/{switch-control-DwCkU90q.js → switch-control-BRUsn1QH.js} +1 -1
  150. package/dist/assets/{table-icons-vuWhvyxJ.js → table-icons-BZwhGgGx.js} +1 -1
  151. package/dist/assets/{team-BroofdgP.js → team-Bs7pamcj.js} +1 -1
  152. package/dist/assets/{toLower-Co1lWVoz.js → toLower-CwadW2WB.js} +1 -1
  153. package/dist/assets/toUpper--bb03ucw.js +1 -0
  154. package/dist/assets/{traffic-D-aoJfLs.js → traffic-Dt3pbHoj.js} +1 -1
  155. package/dist/assets/{tsMode-yvNR09fH.js → tsMode-BPt1tSa5.js} +1 -1
  156. package/dist/assets/{typescript-CMLS3uhm.js → typescript-CNxwEuoy.js} +1 -1
  157. package/dist/assets/{url-evaluation-udVYSMO4.js → url-evaluation-CtqrahAV.js} +1 -1
  158. package/dist/assets/{url-join-vuArvvL1.js → url-join-Bq2inMBc.js} +1 -1
  159. package/dist/assets/{use-mobile-BM273ejS.js → use-mobile-CS1doB6k.js} +1 -1
  160. package/dist/assets/{use-mobile-DwZO5be8.js → use-mobile-Ln-4uJJU.js} +1 -1
  161. package/dist/assets/{useAsync-DLvWuoz4.js → useAsync-BD7m2qf0.js} +1 -1
  162. package/dist/assets/{useAsyncRetry-D5p_7oRt.js → useAsyncRetry-DbnUx5lB.js} +1 -1
  163. package/dist/assets/{useLocalStorage-Bj7q_OT_.js → useLocalStorage-BfxLT4Rw.js} +1 -1
  164. package/dist/assets/{useThemeProps-GIAqgoE8.js → useThemeProps-Drx-8hAL.js} +1 -1
  165. package/dist/assets/{util-SXSVGHBg.js → util-B5EfMVt6.js} +1 -1
  166. package/dist/assets/{wait-container-CDKA5Gem.js → wait-container-C3c19zLe.js} +1 -1
  167. package/dist/assets/{without-wallet-D7xWotBX.js → without-wallet-BI_47-FN.js} +2 -2
  168. package/dist/assets/{wrap-locale-DR1zYzoA.js → wrap-locale-D_s0ePXc.js} +1 -1
  169. package/dist/assets/{xml-B0YAwXot.js → xml-Dhxlz3O6.js} +1 -1
  170. package/dist/assets/{yaml-fECgnKXj.js → yaml-CqAJzLYA.js} +1 -1
  171. package/dist/index.html +1 -1
  172. package/dist/service-worker.js +1 -1
  173. package/package.json +2 -2
  174. package/dist/assets/ArrowDropDown-B47EydNm.js +0 -1
  175. package/dist/assets/api-BcYW4RGg.js +0 -1
  176. package/dist/assets/client-Bq43pXAg.js +0 -1
  177. package/dist/assets/cloneDeep-Q4iUxm_j.js +0 -1
  178. package/dist/assets/emotion-cache.browser.esm-BUnXReBA.js +0 -1
  179. package/dist/assets/engine-BwbWZmR_.js +0 -1
  180. package/dist/assets/getValidReactChildren-CutnuaBi.js +0 -1
  181. package/dist/assets/index-CCptkWcP.js +0 -1
  182. package/dist/assets/omit-BOKRrWcI.js +0 -1
  183. package/dist/assets/schema-DloAUG7Z.js +0 -1
  184. package/dist/assets/sdk-FGFC0J6F.js +0 -1
  185. package/dist/assets/toUpper-DEqJjuKZ.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-VibrsnfQ.js","./index--ktJL2Tx.js","./index-DGkT7afN.css","./url-join-vuArvvL1.js","./index-Clb2HKeU.js","./_createAggregator-Bw2sNslm.js","./depsEqual-B5cFAumu.js","./index-Dp5rYjgm.js","./index-DRYJ0xIl.js","./toUpper-DEqJjuKZ.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
- import{aG as Ve,j as e,dn as vo,gp as Ro,io as So,m as A,bn as H,N as b,az as xe,H as N,o as r,f as lt,r as d,g as Ce,bA as Me,b as K,J as L,X as Tt,bz as Ge,Y as ae,ip as ko,t as Z,s as B,a4 as J,aV as bn,T as te,$ as ct,dD as Xt,y as Ye,b8 as wo,bE as Eo,E as U,b1 as To,gc as Io,gd as Po,C as me,f1 as Uo,hd as _o,x as Do,ax as Jt,w as No,iq as Lo,ir as Bo,v as pe,is as Oo,Z as Mo,a0 as Ao,it as jn,bo as vn,U as Re,f7 as qo,e_ as Fo,aB as $o,aC as zo,bk as Go,aD as Wo,aE as X,aO as Vo,cN as Yo,F as Rn,bm as Ko,_ as Ho,O as ot,aZ as Nt,iu as Zo,a_ as ye,hn as Qo,aA as en,cL as Xo,ad as Ae,aM as Sn,bS as Lt,cw as Jo,L as dt,iv as es,b9 as ts,A as kn,aU as It,h as ns,aS as ze,P as vt,W as os,bB as wn,fI as ss,cr as rs,aJ as is,bt as as,aR as ls,dE as cs,fd as tn,iw as nn,gH as on,V as sn,G as st,cK as ds,gF as us,bR as ps,ix as ms}from"./index--ktJL2Tx.js";import{y as fs}from"./index-CPtXYlM0.js";import{a as hs,c as gs,d as xs,u as Bt,R as ys}from"./actions-DUHD3OYP.js";import{S as Cs}from"./switch-control-DwCkU90q.js";import{u as fe}from"./blocklet-DXJr-xZq.js";import{P as Pt,w as ut}from"./permission-Bd240jHS.js";import{E as En}from"./Edit-CvUxpqSV.js";import{T as bs,M as js,t as vs}from"./table-icons-vuWhvyxJ.js";import{s as Rs,F as Ss,R as it,L as ks,S as ws,B as Es}from"./preference-DHBc5A-p.js";import{C as rn}from"./click-to-copy-CTJTNpA1.js";import{v as Rt}from"./index-CEX6125H.js";import{A as Ts}from"./Add-Clw8RkKN.js";import{A as Ot}from"./Link-BLZtgQVF.js";import{C as Is,c as Ps,b as Us,f as Tn,A as _s,_ as Ds,a as Ns,e as Ls,d as In,s as Bs,g as Os,S as Ms}from"./item-DqvYl0Bz.js";import{T as As,L as qs,a as Pn,u as an,W as Fs,P as $s}from"./index-Ci5mHjJo.js";import{e as Un}from"./engine-BwbWZmR_.js";import{u as zs,C as Gs,D as Ws,a as Vs,b as Ys}from"./connect-to-CmnXJqsQ.js";import{C as Ks,u as Hs,A as Zs}from"./agreement-B1qJWzXq.js";import{D as Qs}from"./Done-De6rOS7P.js";import{A as Xs,a as Js,b as er,c as tr}from"./collapse-CYNTI7Qd.js";import{C as nr,a as or}from"./Google-BiT-YaK5.js";import{I as _n,f as sr,a as rr,B as ir}from"./install-from-url-B4rawAqf.js";import{a as ln}from"./api-BcYW4RGg.js";import{v as Dn,e as ar,a as at}from"./util-SXSVGHBg.js";import{u as Nn}from"./use-mobile-DwZO5be8.js";import{A as lr}from"./ArrowDropDown-B47EydNm.js";import{u as cr}from"./useLocalStorage-Bj7q_OT_.js";import{D as pt,W as We,R as dr,a as cn}from"./url-evaluation-udVYSMO4.js";import{L as Ln}from"./Launch-p44wWut-.js";import{D as ur}from"./delete-confirm-itV6yjjb.js";import{B as Bn}from"./status-g9gqtunL.js";import{A as On}from"./actions-BFpxkOZ3.js";import{v as St}from"./index-DYPal8XU.js";import{t as pr}from"./toUpper-DEqJjuKZ.js";import{S as mr}from"./Switch-Ce-0Lc8M.js";import{a as fr}from"./team-BroofdgP.js";import"./MoreVert-3Ril4BaF.js";import"./get-safe-url-CkVD5JZ8.js";import"./ButtonGroup-CPPdPq8H.js";import"./getValidReactChildren-CutnuaBi.js";import"./FilterList-DrVbs05B.js";import"./CSSTransition-CujxmWeH.js";import"./emotion-cache.browser.esm-BUnXReBA.js";import"./index-DBii9-f-.js";import"./typeof-QjJsDpFa.js";import"./raf-schd.esm-QI9cu6Me.js";import"./redux-DfszZyTl.js";import"./useThemeProps-GIAqgoE8.js";import"./index-BMN0G3TX.js";import"./Clear-ClQc69CC.js";import"./ChevronRight-A_-fTRIz.js";import"./ChevronLeft-BNoaRf3a.js";import"./Search-CveVLYRK.js";import"./omit-BOKRrWcI.js";import"./index-Clb2HKeU.js";import"./index-Dp5rYjgm.js";import"./iframe-d_LXZhpi.js";import"./Autocomplete-gxYza7s5.js";import"./ListSubheader-D4-WSAvX.js";import"./Verified-aOhYddnX.js";import"./VerifiedUser-BWVM02FY.js";import"./DeleteOutline-BhORbRJB.js";import"./url-join-vuArvvL1.js";import"./index-BojVbZw0.js";import"./spaces-CO7vXdm4.js";import"./OpenInNew-Dg_PVVYU.js";import"./index-DRYJ0xIl.js";import"./HelpOutline-D_WMmdX2.js";import"./index-HQ4TKOad.js";import"./decode-DPztD6kB.js";import"./cloneDeep-Q4iUxm_j.js";import"./without-wallet-D7xWotBX.js";import"./ListItemButton-BCmmmtlq.js";import"./Stepper-CazqSP6B.js";import"./is-path-prefix-equal-RJLchj2H.js";const hr=Ve(e.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"})),gr=Ve(e.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"})),Mn=Ve(e.jsx("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"})),xr=Ve(e.jsx("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"})),yr=Ve(e.jsx("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}));function dn(t,o){var n={};return o=vo(o),Ro(t,function(a,s,i){So(n,s,o(a,s,i))}),n}function An({children:t=null,...o}){const{t:n}=A(),{api:a}=H(),{blocklet:s}=fe(),i=s?.settings?.autoCheckUpdate,f=async h=>{await a.updateAutoCheckUpdate({input:{did:s.meta.did,autoCheckUpdate:h}})},c=async()=>{try{const h=!i?.enabled;await f({enabled:h}),N.success(n(h?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(h){N.error(h.message)}},u=!!i?.enabled;return e.jsxs(b,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[t,e.jsx(xe,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:e.jsx("div",{children:e.jsx(Cs,{checked:u,onChange:c,name:"enableWelcomePage",style:{...o.style,zoom:.8}})})})]})}An.propTypes={children:r.any};function un(t){function o({sx:n,...a}){return e.jsx(t,{...a,sx:{color:"text.primary",...n}})}return o}const Cr={...dn(vs,un),...dn(hs,un)},br=(t,o)=>{let{description:n}=t;return(Object.values(K.CHAIN_PROP_MAP).includes(t.key)||L.isEnvShareable(t))&&(n?n=`${n} (${o("blocklet.config.sharedToAllComponents")})`:n=o("blocklet.config.sharedToAllComponents")),n&&e.jsx("div",{style:{marginLeft:12},children:n})},kt=(t,o,n=[])=>!n?.length&&!t.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(t.key)&&!o.meta.environments.find(a=>a.name===t.key)&&o.children.every(a=>!a.meta.environments.find(s=>s.name===t.key))?!0:t.custom,pn=t=>[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)?!0:!(t.startsWith("BLOCKLET_")||t.startsWith("COMPONENT_")),wt=t=>[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)===!1;function qn({blocklet:t,ancestors:o=[]}){const n=H(),{palette:a}=lt(),{inService:s}=n,{t:i}=d.useContext(Ce),f=[...o.map(m=>m.meta.did),t.meta.did],c=()=>N.success(i("blocklet.config.changedTip")),u=m=>kt(m,t,o);if(Me(t.status)||t.status==="unknown"&&Me(t.status))return null;const h=m=>new Promise(async(g,v)=>{if(!m.key.trim()||!m.value.trim()){N.error(i("blocklet.config.environment.keyValueRequired")),v();return}if(pn(m.key)===!1){N.error(i("blocklet.config.environment.invalidKey")),v();return}m.custom=wt(m.key);try{const k=await n.api.configBlocklet({input:{did:f,configs:[m]}});c(k.blocklet),g()}catch(k){N.error(ae(k)),v()}}),y=(m,g)=>new Promise(async(v,k)=>{if(m.required&&(!m.key.trim()||!m.value.trim())){N.error(i("blocklet.config.environment.keyValueRequired")),k();return}if(pn(m.key)===!1){N.error(i("blocklet.config.environment.invalidKey")),k();return}if(m.key===K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const O=ko(m);if(O){N.error(O),k();return}}const j=[{...m,value:m.secure&&m.value==="__encrypted__"?"":m.value}];if(m.key!==g.key){if(!kt(m,t,o)){N.error("Only key of custom env can be changed"),k();return}j.push({key:g.key,custom:wt(m.key)})}try{const O=await n.api.configBlocklet({input:{did:f,configs:j}});c(O.blocklet),v()}catch(O){N.error(ae(O)),k()}}),l=m=>new Promise(async(g,v)=>{if(m.required){N.error(i("blocklet.config.environment.deleteForbidden")),v();return}if(!kt(m,t,o)){N.error("Only key of custom env can be changed"),v();return}try{const k=await n.api.configBlocklet({input:{did:f,configs:[{key:m.key,custom:wt(m.key)}]}});c(k.blocklet),g()}catch(k){N.error(ae(k)),v()}}),R=(t.configs||[]).filter(m=>!K.BLOCKLET_CONFIGURABLE_KEY[m.key]||[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(m.key)),C=L.getSharedConfigObj(o[0],t),p=L.getComponentMissingConfigs(t,o[0]),E=R.map(m=>({...m,value:Object.values(K.CHAIN_PROP_MAP).includes(m.key)&&Object.keys(C).includes(m.key)?C[m.key]:C[m.key]||m.value})),S=E.some(m=>m.key&&m.key.startsWith("BWA_")),w={onRowAdd:h,onRowUpdate:y,onRowDelete:l,isDeletable:u},x=()=>[{title:i("common.key"),field:"key",initialEditValue:"",width:"30%",render:m=>e.jsx(rn,{value:m.value,style:{color:m.required&&!m.value?a.error.main:a.text.primary,fontWeight:m.required?"bold":"normal"},children:m.key}),editComponent:m=>{const{value:g,rowData:v,onChange:k}=m;return e.jsx(mn,{children:e.jsx(Z,{fullWidth:!0,size:"small",value:Rs.escapeTag(g),onChange:j=>k(j.target.value),variant:"outlined",label:"Key",placeholder:i("blocklet.config.environment.key"),margin:"dense",autoFocus:!0,slotProps:{input:{readOnly:u(v)===!1}}})})}},{title:i("common.value"),field:"value",initialEditValue:"",width:"calc((100% - (96px + 30%)) / 1)",render:m=>m.value?m.secure?"******":e.jsx(rn,{unstyled:!0,value:m.value,style:{wordBreak:"break-all"},children:m.value}):null,editComponent:m=>{const{value:g,rowData:v,onChange:k}=m;return e.jsxs(mn,{children:[e.jsx(Z,{fullWidth:!0,size:"small",value:g==="__encrypted__"?"":g,onChange:j=>k(j.target.value),variant:"outlined",label:i("common.value"),placeholder:i("blocklet.config.environment.value"),margin:"dense"}),br(v,i)]})}}];return e.jsxs(jr,{children:[!!p.length&&e.jsx(Tt,{severity:"error",style:{marginTop:24},children:i("blocklet.config.missingRequired")}),S&&e.jsx(Tt,{severity:"info",children:i("blocklet.config.environment.tip")}),e.jsx(Pt,{permission:s?"":"mutate_blocklets",role:s?Ge:[],children:m=>e.jsx(bs,{className:"config-table",children:e.jsx(js,{title:e.jsx(b,{sx:{fontWeight:"bold"},children:i("common.environments")}),columns:x(),icons:Cr,options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1,actionsCellStyle:{padding:"0",textAlign:"right",width:"80px"}},localization:{header:{actions:i("common.actions")},body:{emptyDataSourceMessage:i("common.noData")}},data:E,editable:m?w:{}})})})]})}qn.propTypes={blocklet:r.object.isRequired,ancestors:r.array};const jr=B.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-g74PYCpk.js","./index-BSnpJGoE.js","./index-DGkT7afN.css","./url-join-Bq2inMBc.js","./index-Tlo-w0hj.js","./_createAggregator-BMD9-JvY.js","./depsEqual-DTCuMri4.js","./index-CL-lqorQ.js","./index-DRYJ0xIl.js","./toUpper--bb03ucw.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
+ import{aG as Ve,j as e,dn as vo,gp as Ro,io as So,m as A,bn as H,N as b,az as xe,H as N,o as r,f as lt,r as d,g as Ce,bA as Me,b as K,J as L,X as Tt,bz as Ge,Y as ae,ip as ko,t as Z,s as B,a4 as J,aV as bn,T as te,$ as ct,dD as Xt,y as Ye,b8 as wo,bE as Eo,E as U,b1 as To,gc as Io,gd as Po,C as me,f1 as Uo,hd as _o,x as Do,ax as Jt,w as No,iq as Lo,ir as Bo,v as pe,is as Oo,Z as Mo,a0 as Ao,it as jn,bo as vn,U as Re,f7 as qo,e_ as Fo,aB as $o,aC as zo,bk as Go,aD as Wo,aE as X,aO as Vo,cN as Yo,F as Rn,bm as Ko,_ as Ho,O as ot,aZ as Nt,iu as Zo,a_ as ye,hn as Qo,aA as en,cL as Xo,ad as Ae,aM as Sn,bS as Lt,cw as Jo,L as dt,iv as es,b9 as ts,A as kn,aU as It,h as ns,aS as ze,P as vt,W as os,bB as wn,fI as ss,cr as rs,aJ as is,bt as as,aR as ls,dE as cs,fd as tn,iw as nn,gH as on,V as sn,G as st,cK as ds,gF as us,bR as ps,ix as ms}from"./index-BSnpJGoE.js";import{y as fs}from"./index-qnSWPvFZ.js";import{a as hs,c as gs,d as xs,u as Bt,R as ys}from"./actions-dM1fFrJf.js";import{S as Cs}from"./switch-control-BRUsn1QH.js";import{u as fe}from"./blocklet-C7W1PCuU.js";import{P as Pt,w as ut}from"./permission-H1evTnCb.js";import{E as En}from"./Edit-BBaBN2Wx.js";import{T as bs,M as js,t as vs}from"./table-icons-BZwhGgGx.js";import{s as Rs,F as Ss,R as it,L as ks,S as ws,B as Es}from"./preference-BfV_QTqs.js";import{C as rn}from"./click-to-copy-DO0vuZcs.js";import{v as Rt}from"./index-Dea_aYC4.js";import{A as Ts}from"./Add-DyeL4-IK.js";import{A as Ot}from"./Link-DcMufYsw.js";import{C as Is,c as Ps,b as Us,f as Tn,A as _s,_ as Ds,a as Ns,e as Ls,d as In,s as Bs,g as Os,S as Ms}from"./item--P9-hN20.js";import{T as As,L as qs,a as Pn,u as an,W as Fs,P as $s}from"./index-7bdhHiFd.js";import{e as Un}from"./engine-1UwJZH7E.js";import{u as zs,C as Gs,D as Ws,a as Vs,b as Ys}from"./connect-to-Ot5rJo4-.js";import{C as Ks,u as Hs,A as Zs}from"./agreement-3xBCMj9y.js";import{D as Qs}from"./Done-BI8Oqec5.js";import{A as Xs,a as Js,b as er,c as tr}from"./collapse-DP5fcjjp.js";import{C as nr,a as or}from"./Google-VPfEXNga.js";import{I as _n,f as sr,a as rr,B as ir}from"./install-from-url-BPDe_bKf.js";import{a as ln}from"./api-BMl09Q0w.js";import{v as Dn,e as ar,a as at}from"./util-B5EfMVt6.js";import{u as Nn}from"./use-mobile-Ln-4uJJU.js";import{A as lr}from"./ArrowDropDown-QRrV-SM6.js";import{u as cr}from"./useLocalStorage-BfxLT4Rw.js";import{D as pt,W as We,R as dr,a as cn}from"./url-evaluation-CtqrahAV.js";import{L as Ln}from"./Launch-Cb9G2ztN.js";import{D as ur}from"./delete-confirm-PlNf3ZY8.js";import{B as Bn}from"./status-Bn1Jy6BO.js";import{A as On}from"./actions-pcPb_nyk.js";import{v as St}from"./index-W9Gf1H9j.js";import{t as pr}from"./toUpper--bb03ucw.js";import{S as mr}from"./Switch-CnG_p51w.js";import{a as fr}from"./team-Bs7pamcj.js";import"./MoreVert-DrYkNse4.js";import"./get-safe-url-DQLWIOcC.js";import"./ButtonGroup-gQqTXUWb.js";import"./getValidReactChildren-CCHlzmWC.js";import"./FilterList-CAcGuUFu.js";import"./CSSTransition-Cwsw3O0v.js";import"./emotion-cache.browser.esm-lCkFhcap.js";import"./index-DBii9-f-.js";import"./typeof-QjJsDpFa.js";import"./raf-schd.esm-HKMr2ACZ.js";import"./redux-DfszZyTl.js";import"./useThemeProps-Drx-8hAL.js";import"./index-CWJxufpA.js";import"./Clear-TURgqjBD.js";import"./ChevronRight-B3AWRgjb.js";import"./ChevronLeft-GfW6gg_h.js";import"./Search-DkAocH6B.js";import"./omit-C_8qTv_V.js";import"./index-Tlo-w0hj.js";import"./index-CL-lqorQ.js";import"./iframe-cPjusDrL.js";import"./Autocomplete-B_fjNjcC.js";import"./ListSubheader-Y2ncSEte.js";import"./Verified-BdjRVajU.js";import"./VerifiedUser-DW1wXQJo.js";import"./DeleteOutline-BIpkPzjr.js";import"./url-join-Bq2inMBc.js";import"./index-BojVbZw0.js";import"./spaces-DWMGdRvw.js";import"./OpenInNew-ChbbxgvU.js";import"./index-DRYJ0xIl.js";import"./HelpOutline-2t-W2bUr.js";import"./index-B77hR8tk.js";import"./decode-DPztD6kB.js";import"./cloneDeep-CsZdKnsl.js";import"./without-wallet-BI_47-FN.js";import"./ListItemButton-AVCY9rM6.js";import"./Stepper-D3djW5EG.js";import"./is-path-prefix-equal-C3txExEQ.js";const hr=Ve(e.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"})),gr=Ve(e.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"})),Mn=Ve(e.jsx("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"})),xr=Ve(e.jsx("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"})),yr=Ve(e.jsx("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}));function dn(t,o){var n={};return o=vo(o),Ro(t,function(a,s,i){So(n,s,o(a,s,i))}),n}function An({children:t=null,...o}){const{t:n}=A(),{api:a}=H(),{blocklet:s}=fe(),i=s?.settings?.autoCheckUpdate,f=async h=>{await a.updateAutoCheckUpdate({input:{did:s.meta.did,autoCheckUpdate:h}})},c=async()=>{try{const h=!i?.enabled;await f({enabled:h}),N.success(n(h?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(h){N.error(h.message)}},u=!!i?.enabled;return e.jsxs(b,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[t,e.jsx(xe,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:e.jsx("div",{children:e.jsx(Cs,{checked:u,onChange:c,name:"enableWelcomePage",style:{...o.style,zoom:.8}})})})]})}An.propTypes={children:r.any};function un(t){function o({sx:n,...a}){return e.jsx(t,{...a,sx:{color:"text.primary",...n}})}return o}const Cr={...dn(vs,un),...dn(hs,un)},br=(t,o)=>{let{description:n}=t;return(Object.values(K.CHAIN_PROP_MAP).includes(t.key)||L.isEnvShareable(t))&&(n?n=`${n} (${o("blocklet.config.sharedToAllComponents")})`:n=o("blocklet.config.sharedToAllComponents")),n&&e.jsx("div",{style:{marginLeft:12},children:n})},kt=(t,o,n=[])=>!n?.length&&!t.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(t.key)&&!o.meta.environments.find(a=>a.name===t.key)&&o.children.every(a=>!a.meta.environments.find(s=>s.name===t.key))?!0:t.custom,pn=t=>[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)?!0:!(t.startsWith("BLOCKLET_")||t.startsWith("COMPONENT_")),wt=t=>[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)===!1;function qn({blocklet:t,ancestors:o=[]}){const n=H(),{palette:a}=lt(),{inService:s}=n,{t:i}=d.useContext(Ce),f=[...o.map(m=>m.meta.did),t.meta.did],c=()=>N.success(i("blocklet.config.changedTip")),u=m=>kt(m,t,o);if(Me(t.status)||t.status==="unknown"&&Me(t.status))return null;const h=m=>new Promise(async(g,v)=>{if(!m.key.trim()||!m.value.trim()){N.error(i("blocklet.config.environment.keyValueRequired")),v();return}if(pn(m.key)===!1){N.error(i("blocklet.config.environment.invalidKey")),v();return}m.custom=wt(m.key);try{const k=await n.api.configBlocklet({input:{did:f,configs:[m]}});c(k.blocklet),g()}catch(k){N.error(ae(k)),v()}}),y=(m,g)=>new Promise(async(v,k)=>{if(m.required&&(!m.key.trim()||!m.value.trim())){N.error(i("blocklet.config.environment.keyValueRequired")),k();return}if(pn(m.key)===!1){N.error(i("blocklet.config.environment.invalidKey")),k();return}if(m.key===K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const O=ko(m);if(O){N.error(O),k();return}}const j=[{...m,value:m.secure&&m.value==="__encrypted__"?"":m.value}];if(m.key!==g.key){if(!kt(m,t,o)){N.error("Only key of custom env can be changed"),k();return}j.push({key:g.key,custom:wt(m.key)})}try{const O=await n.api.configBlocklet({input:{did:f,configs:j}});c(O.blocklet),v()}catch(O){N.error(ae(O)),k()}}),l=m=>new Promise(async(g,v)=>{if(m.required){N.error(i("blocklet.config.environment.deleteForbidden")),v();return}if(!kt(m,t,o)){N.error("Only key of custom env can be changed"),v();return}try{const k=await n.api.configBlocklet({input:{did:f,configs:[{key:m.key,custom:wt(m.key)}]}});c(k.blocklet),g()}catch(k){N.error(ae(k)),v()}}),R=(t.configs||[]).filter(m=>!K.BLOCKLET_CONFIGURABLE_KEY[m.key]||[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(m.key)),C=L.getSharedConfigObj(o[0],t),p=L.getComponentMissingConfigs(t,o[0]),E=R.map(m=>({...m,value:Object.values(K.CHAIN_PROP_MAP).includes(m.key)&&Object.keys(C).includes(m.key)?C[m.key]:C[m.key]||m.value})),S=E.some(m=>m.key&&m.key.startsWith("BWA_")),w={onRowAdd:h,onRowUpdate:y,onRowDelete:l,isDeletable:u},x=()=>[{title:i("common.key"),field:"key",initialEditValue:"",width:"30%",render:m=>e.jsx(rn,{value:m.value,style:{color:m.required&&!m.value?a.error.main:a.text.primary,fontWeight:m.required?"bold":"normal"},children:m.key}),editComponent:m=>{const{value:g,rowData:v,onChange:k}=m;return e.jsx(mn,{children:e.jsx(Z,{fullWidth:!0,size:"small",value:Rs.escapeTag(g),onChange:j=>k(j.target.value),variant:"outlined",label:"Key",placeholder:i("blocklet.config.environment.key"),margin:"dense",autoFocus:!0,slotProps:{input:{readOnly:u(v)===!1}}})})}},{title:i("common.value"),field:"value",initialEditValue:"",width:"calc((100% - (96px + 30%)) / 1)",render:m=>m.value?m.secure?"******":e.jsx(rn,{unstyled:!0,value:m.value,style:{wordBreak:"break-all"},children:m.value}):null,editComponent:m=>{const{value:g,rowData:v,onChange:k}=m;return e.jsxs(mn,{children:[e.jsx(Z,{fullWidth:!0,size:"small",value:g==="__encrypted__"?"":g,onChange:j=>k(j.target.value),variant:"outlined",label:i("common.value"),placeholder:i("blocklet.config.environment.value"),margin:"dense"}),br(v,i)]})}}];return e.jsxs(jr,{children:[!!p.length&&e.jsx(Tt,{severity:"error",style:{marginTop:24},children:i("blocklet.config.missingRequired")}),S&&e.jsx(Tt,{severity:"info",children:i("blocklet.config.environment.tip")}),e.jsx(Pt,{permission:s?"":"mutate_blocklets",role:s?Ge:[],children:m=>e.jsx(bs,{className:"config-table",children:e.jsx(js,{title:e.jsx(b,{sx:{fontWeight:"bold"},children:i("common.environments")}),columns:x(),icons:Cr,options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1,actionsCellStyle:{padding:"0",textAlign:"right",width:"80px"}},localization:{header:{actions:i("common.actions")},body:{emptyDataSourceMessage:i("common.noData")}},data:E,editable:m?w:{}})})})]})}qn.propTypes={blocklet:r.object.isRequired,ancestors:r.array};const jr=B.div`
3
3
  .config-table {
4
4
  margin-bottom: 24px;
5
5
  position: relative;
@@ -66,7 +66,7 @@ import{aG as Ve,j as e,dn as vo,gp as Ro,io as So,m as A,bn as H,N as b,az as xe
66
66
  .ux-dialog_closeButton {
67
67
  margin: 0;
68
68
  }
69
- `,Rr=d.lazy(()=>Eo(()=>import("./index-VibrsnfQ.js").then(t=>t.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(t=>({default:t.Uploader}))),Sr="/blocklet/component/upload",fn=[".html",".htm",".tgz",".zip"],kr=Number(window.env?.MAX_UPLOAD_FILE_SIZE)||U.MAX_UPLOAD_FILE_SIZE,wr=kr*1024*1024;function Fn({did:t,prefix:o,headers:n=()=>({}),onUploaded:a=Xt,open:s=!1,onClose:i=Xt}){const{t:f,locale:c}=A(),u=d.useRef(null),h=d.useCallback(y=>{const{status:l,data:R}=y;if(l===200){a(R);return}N.error(f("blocklet.component.addComponentTip.uploadFailed"))},[a,f]);return d.useEffect(()=>{s?u.current?.open():u.current?.close()},[s]),e.jsx(Er,{id:`component-uploader-${t}`,children:e.jsx(Rr,{ref:u,locale:c,popup:!0,onUploadFinish:h,plugins:[],onClose:i,installerProps:{disabled:!0},apiPathProps:{uploader:Ye(o,Sr,t),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:fn,maxFileSize:wr,maxNumberOfFiles:1}},tusProps:{headers:n},dashboardProps:{note:f("blocklet.component.addComponentTip.allowedFileTypes",{types:fn.map(y=>y.replace(".","")).join(", ")})}})},`component-uploader-${t}`)}Fn.propTypes={did:r.string.isRequired,prefix:r.string.isRequired,open:r.bool,headers:r.func,onUploaded:r.func,onClose:r.func};const Er=wo(b)`
69
+ `,Rr=d.lazy(()=>Eo(()=>import("./index-g74PYCpk.js").then(t=>t.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(t=>({default:t.Uploader}))),Sr="/blocklet/component/upload",fn=[".html",".htm",".tgz",".zip"],kr=Number(window.env?.MAX_UPLOAD_FILE_SIZE)||U.MAX_UPLOAD_FILE_SIZE,wr=kr*1024*1024;function Fn({did:t,prefix:o,headers:n=()=>({}),onUploaded:a=Xt,open:s=!1,onClose:i=Xt}){const{t:f,locale:c}=A(),u=d.useRef(null),h=d.useCallback(y=>{const{status:l,data:R}=y;if(l===200){a(R);return}N.error(f("blocklet.component.addComponentTip.uploadFailed"))},[a,f]);return d.useEffect(()=>{s?u.current?.open():u.current?.close()},[s]),e.jsx(Er,{id:`component-uploader-${t}`,children:e.jsx(Rr,{ref:u,locale:c,popup:!0,onUploadFinish:h,plugins:[],onClose:i,installerProps:{disabled:!0},apiPathProps:{uploader:Ye(o,Sr,t),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:fn,maxFileSize:wr,maxNumberOfFiles:1}},tusProps:{headers:n},dashboardProps:{note:f("blocklet.component.addComponentTip.allowedFileTypes",{types:fn.map(y=>y.replace(".","")).join(", ")})}})},`component-uploader-${t}`)}Fn.propTypes={did:r.string.isRequired,prefix:r.string.isRequired,open:r.bool,headers:r.func,onUploaded:r.func,onClose:r.func};const Er=wo(b)`
70
70
  .uploader-wrapper {
71
71
  display: inline-flex;
72
72
  position: relative;
@@ -1 +1 @@
1
- import{A as g,bm as v,u as y,j as r,Q as f,S as x,U as h}from"./index--ktJL2Tx.js";import{L as S,D as j}from"./download-hD5L8LfI.js";import{u as L}from"./useLocalStorage-Bj7q_OT_.js";import"./ButtonGroup-CPPdPq8H.js";import"./getValidReactChildren-CutnuaBi.js";function I(){const c=g(),[s,i]=L("server-logs-filter",{name:"abtnode",type:{abtnode:"error"}}),{name:t=s.name}=v(),{info:l}=y(),n=l.routing.provider,a=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(n){const e=`Service Gateway(${n})`;a.push({id:`service-gateway-${n}`,name:e,types:["error","access","security"]})}const d=e=>{i({...s,name:e.target.value}),c(`/logs/${e.target.value}`)},m=r.jsx(f,{sx:{minWidth:240},children:r.jsx(x,{value:t,onChange:d,size:"small",children:a.map(e=>r.jsx(h,{value:e.id,children:e.name},e.id))})}),o=a.find(e=>e.id===t)||a[0],p=o.types.indexOf(s.type[t]||"error"),u=e=>{i({name:t,type:{...s.type,[t]:e}})};return r.jsx(S,{name:o.name,logId:o.id,types:o.types,prepend:m,postpend:r.jsx(j,{id:l.did,name:"blocklet-server"}),defaultTypeIndex:p,onTypeChange:u},o.id)}export{I as default};
1
+ import{A as g,bm as v,u as y,j as r,Q as f,S as x,U as h}from"./index-BSnpJGoE.js";import{L as S,D as j}from"./download-CdhYUH8K.js";import{u as L}from"./useLocalStorage-BfxLT4Rw.js";import"./ButtonGroup-gQqTXUWb.js";import"./getValidReactChildren-CCHlzmWC.js";function I(){const c=g(),[s,i]=L("server-logs-filter",{name:"abtnode",type:{abtnode:"error"}}),{name:t=s.name}=v(),{info:l}=y(),n=l.routing.provider,a=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(n){const e=`Service Gateway(${n})`;a.push({id:`service-gateway-${n}`,name:e,types:["error","access","security"]})}const d=e=>{i({...s,name:e.target.value}),c(`/logs/${e.target.value}`)},m=r.jsx(f,{sx:{minWidth:240},children:r.jsx(x,{value:t,onChange:d,size:"small",children:a.map(e=>r.jsx(h,{value:e.id,children:e.name},e.id))})}),o=a.find(e=>e.id===t)||a[0],p=o.types.indexOf(s.type[t]||"error"),u=e=>{i({name:t,type:{...s.type,[t]:e}})};return r.jsx(S,{name:o.name,logId:o.id,types:o.types,prepend:m,postpend:r.jsx(j,{id:l.did,name:"blocklet-server"}),defaultTypeIndex:p,onTypeChange:u},o.id)}export{I as default};
@@ -1 +1 @@
1
- import{j as e,cB as j,N as v,A as P,r as a,g as S,ay as w,u as k,x as b,f as E,aP as K,de as W,cr as i,b7 as _,w as N,Z as U,C as B,df as R,dg as z}from"./index--ktJL2Tx.js";import{p as c}from"./index-BQhkQ0WB.js";function o({children:r,...s}){return e.jsx(j,{...s,did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(v,{sx:{maxWidth:"100%",height:"100%"},children:r})})}function L(){const r=P(),{t:s,locale:d}=a.useContext(S),{api:l}=w(),{info:u}=k(),p=b(u),f=E(),n=K({ready:!1,success:!1,error:null,invalidSession:!1}),h=W(),m=()=>{try{const t=new URL(window.location.href);if(t.hash.includes("invalid")){n.invalidSession=!0;return}const g=t.searchParams.get("__connect_url__"),y=R(g);if(!z(y))throw new Error;n.ready=!0}catch{n.invalidSession=!0,r("#invalid",{replace:!0})}};a.useLayoutEffect(()=>m(),[]);const x=i(t=>{n.error=t.message,r("#invalid",{replace:!0})}),C=i(()=>{n.success=!0});if(n.invalidSession)return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.invalidSession"),description:s("didConnect.common.invalidSessionDesc")})});if(n.error){const t=n.error;return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.connectionError"),description:t})})}return n.success?e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"info",icon:e.jsx(_,{style:{color:f.palette.success.main,fontSize:72}}),title:s("didConnect.genKeyPair.success"),description:s("didConnect.genKeyPair.successDesc")})}):n.ready?e.jsx(o,{children:e.jsx(N,{className:"connect",action:"gen-key-pair",checkFn:l.get,checkTimeout:10*60*1e3,extraParams:{sourceAppPid:h?.appPid,forceSwitch:!0},saveConnect:!1,forceConnected:!1,webWalletUrl:p,onSuccess:C,onError:x,locale:d,messages:{title:s("didConnect.genKeyPair.title"),scan:s("didConnect.genKeyPair.scan"),confirm:s("auth.confirm"),success:s("didConnect.genKeyPair.success")},popup:!0,open:!0,hideCloseButton:!0})},"ready"):e.jsx(U,{children:e.jsx(B,{})})}export{L as default};
1
+ import{j as e,cB as j,N as v,A as P,r as a,g as S,ay as w,u as k,x as b,f as E,aP as K,de as W,cr as i,b7 as _,w as N,Z as U,C as B,df as R,dg as z}from"./index-BSnpJGoE.js";import{p as c}from"./index-CcYCgG1Z.js";function o({children:r,...s}){return e.jsx(j,{...s,did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(v,{sx:{maxWidth:"100%",height:"100%"},children:r})})}function L(){const r=P(),{t:s,locale:d}=a.useContext(S),{api:l}=w(),{info:u}=k(),p=b(u),f=E(),n=K({ready:!1,success:!1,error:null,invalidSession:!1}),h=W(),m=()=>{try{const t=new URL(window.location.href);if(t.hash.includes("invalid")){n.invalidSession=!0;return}const g=t.searchParams.get("__connect_url__"),y=R(g);if(!z(y))throw new Error;n.ready=!0}catch{n.invalidSession=!0,r("#invalid",{replace:!0})}};a.useLayoutEffect(()=>m(),[]);const x=i(t=>{n.error=t.message,r("#invalid",{replace:!0})}),C=i(()=>{n.success=!0});if(n.invalidSession)return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.invalidSession"),description:s("didConnect.common.invalidSessionDesc")})});if(n.error){const t=n.error;return e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"error",title:s("didConnect.common.connectionError"),description:t})})}return n.success?e.jsx(o,{children:e.jsx(c,{style:{backgroundColor:"transparent"},status:"info",icon:e.jsx(_,{style:{color:f.palette.success.main,fontSize:72}}),title:s("didConnect.genKeyPair.success"),description:s("didConnect.genKeyPair.successDesc")})}):n.ready?e.jsx(o,{children:e.jsx(N,{className:"connect",action:"gen-key-pair",checkFn:l.get,checkTimeout:10*60*1e3,extraParams:{sourceAppPid:h?.appPid,forceSwitch:!0},saveConnect:!1,forceConnected:!1,webWalletUrl:p,onSuccess:C,onError:x,locale:d,messages:{title:s("didConnect.genKeyPair.title"),scan:s("didConnect.genKeyPair.scan"),confirm:s("auth.confirm"),success:s("didConnect.genKeyPair.success")},popup:!0,open:!0,hideCloseButton:!0})},"ready"):e.jsx(U,{children:e.jsx(B,{})})}export{L as default};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DgeSWvC7.js","./index-BojVbZw0.js","./index-DYPal8XU.js","./metric-Bbm9krzb.js","./click-to-copy-CTJTNpA1.js","./index-BJFK1iYB.js","./useLocalStorage-Bj7q_OT_.js","./index-DTRD5V4Z.js","./FilterList-DrVbs05B.js","./CSSTransition-CujxmWeH.js","./emotion-cache.browser.esm-BUnXReBA.js","./index-FTSHH2z1.js","./redux-DfszZyTl.js","./typeof-QjJsDpFa.js","./depsEqual-B5cFAumu.js","./index-CPtXYlM0.js","./TableSearch-BezFlhKc.js","./Search-CveVLYRK.js","./Clear-ClQc69CC.js","./MoreVert-3Ril4BaF.js","./status-g9gqtunL.js","./url-evaluation-udVYSMO4.js","./actions-DUHD3OYP.js","./get-safe-url-CkVD5JZ8.js","./ButtonGroup-CPPdPq8H.js","./getValidReactChildren-CutnuaBi.js","./permission-Bd240jHS.js","./install-from-url-B4rawAqf.js","./without-wallet-D7xWotBX.js","./index-Clb2HKeU.js","./cloneDeep-Q4iUxm_j.js","./Autocomplete-gxYza7s5.js","./ListSubheader-D4-WSAvX.js","./ListItemButton-BCmmmtlq.js","./Stepper-CazqSP6B.js","./Launch-p44wWut-.js","./Add-Clw8RkKN.js","./index-CEX6125H.js","./schema-DloAUG7Z.js","./index-CGnZOo7d.js","./toLower-Co1lWVoz.js","./index-Ci5mHjJo.js","./url-join-vuArvvL1.js","./wait-container-CDKA5Gem.js","./use-mobile-DwZO5be8.js","./DeleteOutline-BhORbRJB.js","./spaces-CO7vXdm4.js","./api-BcYW4RGg.js","./index-C4ni3qSD.js","./item-DqvYl0Bz.js","./ChevronLeft-BNoaRf3a.js","./ChevronRight-A_-fTRIz.js","./blocklet-DXJr-xZq.js","./Verified-aOhYddnX.js","./VerifiedUser-BWVM02FY.js","./Done-De6rOS7P.js","./delete-confirm-itV6yjjb.js","./item-G0iZE90Q.css","./engine-BwbWZmR_.js","./ArrowDropDown-B47EydNm.js","./Breadcrumbs-C4BEBPis.js","./index-DRXdQRdu.js","./index-BMN0G3TX.js","./index.esm-Dqj7a_ya.js","./switch-control-DwCkU90q.js","./Switch-Ce-0Lc8M.js","./Link-BLZtgQVF.js","./logo-BKA11TRi.js","./Refresh-BuspPECP.js","./LoadingButton-DYH4mgxh.js","./rotate-session-key-WcsLllKv.js","./is-path-prefix-equal-RJLchj2H.js","./Edit-CvUxpqSV.js","./CallMerge-CcRkZzxX.js","./CardContent-DiPVtGg0.js","./Slider-CESm5SzK.js","./visuallyHidden-Dan1xhjv.js","./index-BQ9Ts5av.js","./download-hD5L8LfI.js","./download-1sZ_L4eJ.css","./index-CjyGkLY6.js","./audit-logs-CrbGepG6.js","./index-HQ4TKOad.js","./decode-DPztD6kB.js","./index-gnjjKJuC.css","./shorten-label-BsB05cbU.js","./team-BroofdgP.js","./index-D8SeMuuf.js","./ViewList-5nfbahYZ.js","./use-mobile-BM273ejS.js","./client-Bq43pXAg.js","./AdapterDayjs-B4EEI1nK.js","./useThemeProps-GIAqgoE8.js","./ErrorOutline-QvbHz9Zz.js","./index-BKrngGDQ.js","./sdk-FGFC0J6F.js","./actions-BFpxkOZ3.js","./index-f15iWus7.js","./Google-BiT-YaK5.js","./chain-DZSCXq3Z.js","./list-header-s7KnhaJP.js","./ToggleButtonGroup-CBj3NmRn.js","./index-5o6sB1f4.js","./index-ZgkIHsf0.css","./useAsyncRetry-D5p_7oRt.js","./useAsync-DLvWuoz4.js","./detail-nzbwZA_l.js","./index-BQhkQ0WB.js","./index-vh4u80PB.js","./invitation-DyVYJveL.js","./index-CZH7Mn5H.js","./wrap-locale-DR1zYzoA.js","./index-MeuqPgEE.js","./index-Crckurao.js","./index-51UuxJbA.js","./agreement-B1qJWzXq.js","./index-CbZ9lYQN.js","./index-Ur2CzPm7.js","./index-MAh0KZHB.js","./traffic-D-aoJfLs.js","./iframe-d_LXZhpi.js","./index-DBii9-f-.js","./base-chart-C8SmgApV.js","./index-Dv5txe8G.js","./index-DRYJ0xIl.js","./memory-FyikFhq4.js","./index-_ISHsU4A.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BopL1gny.js","./index-BojVbZw0.js","./index-W9Gf1H9j.js","./metric-NP4oz2zf.js","./click-to-copy-DO0vuZcs.js","./index-CtqzIHrc.js","./useLocalStorage-BfxLT4Rw.js","./index-CLzlZAUr.js","./FilterList-CAcGuUFu.js","./CSSTransition-Cwsw3O0v.js","./emotion-cache.browser.esm-lCkFhcap.js","./index-D4cctk8L.js","./redux-DfszZyTl.js","./typeof-QjJsDpFa.js","./depsEqual-DTCuMri4.js","./index-qnSWPvFZ.js","./TableSearch-CcKxCotp.js","./Search-DkAocH6B.js","./Clear-TURgqjBD.js","./MoreVert-DrYkNse4.js","./status-Bn1Jy6BO.js","./url-evaluation-CtqrahAV.js","./actions-dM1fFrJf.js","./get-safe-url-DQLWIOcC.js","./ButtonGroup-gQqTXUWb.js","./getValidReactChildren-CCHlzmWC.js","./permission-H1evTnCb.js","./install-from-url-BPDe_bKf.js","./without-wallet-BI_47-FN.js","./index-Tlo-w0hj.js","./cloneDeep-CsZdKnsl.js","./Autocomplete-B_fjNjcC.js","./ListSubheader-Y2ncSEte.js","./ListItemButton-AVCY9rM6.js","./Stepper-D3djW5EG.js","./Launch-Cb9G2ztN.js","./Add-DyeL4-IK.js","./index-Dea_aYC4.js","./schema-D5kZzngV.js","./index-DCks6vHm.js","./toLower-CwadW2WB.js","./index-7bdhHiFd.js","./url-join-Bq2inMBc.js","./wait-container-C3c19zLe.js","./use-mobile-Ln-4uJJU.js","./DeleteOutline-BIpkPzjr.js","./spaces-DWMGdRvw.js","./api-BMl09Q0w.js","./index-CEerh854.js","./item--P9-hN20.js","./ChevronLeft-GfW6gg_h.js","./ChevronRight-B3AWRgjb.js","./blocklet-C7W1PCuU.js","./Verified-BdjRVajU.js","./VerifiedUser-DW1wXQJo.js","./Done-BI8Oqec5.js","./delete-confirm-PlNf3ZY8.js","./item-G0iZE90Q.css","./engine-1UwJZH7E.js","./ArrowDropDown-QRrV-SM6.js","./Breadcrumbs-mIV7Y6jS.js","./index-aIFNWMe4.js","./index-CWJxufpA.js","./index.esm-D_e-DGUA.js","./switch-control-BRUsn1QH.js","./Switch-CnG_p51w.js","./Link-DcMufYsw.js","./logo-BKA11TRi.js","./Refresh-vx7O7y4X.js","./LoadingButton-52ZmFaE1.js","./rotate-session-key-DQ5udzPb.js","./is-path-prefix-equal-C3txExEQ.js","./Edit-BBaBN2Wx.js","./CallMerge-_wPMIobV.js","./CardContent-DZxc1v9r.js","./Slider-Da_17JQt.js","./visuallyHidden-Dan1xhjv.js","./index-BMjpfJjp.js","./download-CdhYUH8K.js","./download-1sZ_L4eJ.css","./index-CaacW8ab.js","./audit-logs-CeGg2JLb.js","./index-B77hR8tk.js","./decode-DPztD6kB.js","./index-gnjjKJuC.css","./shorten-label-CFhfsEFi.js","./team-Bs7pamcj.js","./index-DSNc2KaD.js","./ViewList-19cDup6i.js","./use-mobile-CS1doB6k.js","./client-CchI0TAL.js","./AdapterDayjs-B8AEZ3l4.js","./useThemeProps-Drx-8hAL.js","./ErrorOutline-CGBCMbTc.js","./index-WqL2nOOx.js","./sdk-DyOTm4mE.js","./actions-pcPb_nyk.js","./index-GY5yIEI_.js","./Google-VPfEXNga.js","./chain-tijIKSX3.js","./list-header-BUNKlhMR.js","./ToggleButtonGroup-B6TeC2WF.js","./index-Ds9W4oy6.js","./index-ZgkIHsf0.css","./useAsyncRetry-DbnUx5lB.js","./useAsync-BD7m2qf0.js","./detail-VYVYEsd7.js","./index-CcYCgG1Z.js","./index-DLek0c1M.js","./invitation-6hqyeU5m.js","./index-Bn_tCgMM.js","./wrap-locale-D_s0ePXc.js","./index-DDPnmngo.js","./index-D9724EWR.js","./index-B4EnYouc.js","./agreement-3xBCMj9y.js","./index-CW3YXBwi.js","./index-BT8ElUR8.js","./index-DAE9de69.js","./traffic-Dt3pbHoj.js","./iframe-cPjusDrL.js","./index-DBii9-f-.js","./base-chart-BF6eAaCN.js","./index-LkgRhqPx.js","./index-DRYJ0xIl.js","./memory-Chxl7x-V.js","./index-BOa0y9pw.js"])))=>i.map(i=>d[i]);
2
2
  function _mergeNamespaces(be,Ce){for(var Se=0;Se<Ce.length;Se++){const Te=Ce[Se];if(typeof Te!="string"&&!Array.isArray(Te)){for(const Re in Te)if(Re!=="default"&&!(Re in be)){const ke=Object.getOwnPropertyDescriptor(Te,Re);ke&&Object.defineProperty(be,Re,ke.get?ke:{enumerable:!0,get:()=>Te[Re]})}}}return Object.freeze(Object.defineProperty(be,Symbol.toStringTag,{value:"Module"}))}(function(){const Ce=document.createElement("link").relList;if(Ce&&Ce.supports&&Ce.supports("modulepreload"))return;for(const Re of document.querySelectorAll('link[rel="modulepreload"]'))Te(Re);new MutationObserver(Re=>{for(const ke of Re)if(ke.type==="childList")for(const Le of ke.addedNodes)Le.tagName==="LINK"&&Le.rel==="modulepreload"&&Te(Le)}).observe(document,{childList:!0,subtree:!0});function Se(Re){const ke={};return Re.integrity&&(ke.integrity=Re.integrity),Re.referrerPolicy&&(ke.referrerPolicy=Re.referrerPolicy),Re.crossOrigin==="use-credentials"?ke.credentials="include":Re.crossOrigin==="anonymous"?ke.credentials="omit":ke.credentials="same-origin",ke}function Te(Re){if(Re.ep)return;Re.ep=!0;const ke=Se(Re);fetch(Re.href,ke)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(be){return be&&be.__esModule&&Object.prototype.hasOwnProperty.call(be,"default")?be.default:be}function getAugmentedNamespace(be){if(Object.prototype.hasOwnProperty.call(be,"__esModule"))return be;var Ce=be.default;if(typeof Ce=="function"){var Se=function Te(){var Re=!1;try{Re=this instanceof Te}catch{}return Re?Reflect.construct(Ce,arguments,this.constructor):Ce.apply(this,arguments)};Se.prototype=Ce.prototype}else Se={};return Object.defineProperty(Se,"__esModule",{value:!0}),Object.keys(be).forEach(function(Te){var Re=Object.getOwnPropertyDescriptor(be,Te);Object.defineProperty(Se,Te,Re.get?Re:{enumerable:!0,get:function(){return be[Te]}})}),Se}var jsxRuntime={exports:{}},reactJsxRuntime_production={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -522,7 +522,7 @@ ${Re}-----END CERTIFICATE-----
522
522
  `+Ce+Ke.join(`,
523
523
  `+Ce)+`
524
524
  `+Ge+"}":"{"+Ke.join(",")+"}",Ce=Ge,Fe}}return stringify=function(Pe,Oe,qe){var je;if(Ce="",Se="",typeof qe=="number")for(je=0;je<qe;je+=1)Se+=" ";else typeof qe=="string"&&(Se=qe);if(Re=Oe,Oe&&typeof Oe!="function"&&(typeof Oe!="object"||typeof Oe.length!="number"))throw new Error("JSON.stringify");return Le("",{"":Pe})},stringify}var hasRequiredJsonify;function requireJsonify(){return hasRequiredJsonify||(hasRequiredJsonify=1,jsonify.parse=requireParse$1(),jsonify.stringify=requireStringify()),jsonify}var isarray$1,hasRequiredIsarray$1;function requireIsarray$1(){if(hasRequiredIsarray$1)return isarray$1;hasRequiredIsarray$1=1;var be={}.toString;return isarray$1=Array.isArray||function(Ce){return be.call(Ce)=="[object Array]"},isarray$1}var isArguments,hasRequiredIsArguments;function requireIsArguments(){if(hasRequiredIsArguments)return isArguments;hasRequiredIsArguments=1;var be=Object.prototype.toString;return isArguments=function(Se){var Te=be.call(Se),Re=Te==="[object Arguments]";return Re||(Re=Te!=="[object Array]"&&Se!==null&&typeof Se=="object"&&typeof Se.length=="number"&&Se.length>=0&&be.call(Se.callee)==="[object Function]"),Re},isArguments}var implementation,hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var be;if(!Object.keys){var Ce=Object.prototype.hasOwnProperty,Se=Object.prototype.toString,Te=requireIsArguments(),Re=Object.prototype.propertyIsEnumerable,ke=!Re.call({toString:null},"toString"),Le=Re.call(function(){},"prototype"),Pe=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Oe=function(He){var Ge=He.constructor;return Ge&&Ge.prototype===He},qe={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},je=function(){if(typeof window>"u")return!1;for(var He in window)try{if(!qe["$"+He]&&Ce.call(window,He)&&window[He]!==null&&typeof window[He]=="object")try{Oe(window[He])}catch{return!0}}catch{return!0}return!1}(),Fe=function(He){if(typeof window>"u"||!je)return Oe(He);try{return Oe(He)}catch{return!1}};be=function(Ge){var Ke=Ge!==null&&typeof Ge=="object",Je=Se.call(Ge)==="[object Function]",Ze=Te(Ge),Ye=Ke&&Se.call(Ge)==="[object String]",tt=[];if(!Ke&&!Je&&!Ze)throw new TypeError("Object.keys called on a non-object");var nt=Le&&Je;if(Ye&&Ge.length>0&&!Ce.call(Ge,0))for(var rt=0;rt<Ge.length;++rt)tt.push(String(rt));if(Ze&&Ge.length>0)for(var ot=0;ot<Ge.length;++ot)tt.push(String(ot));else for(var ft in Ge)!(nt&&ft==="prototype")&&Ce.call(Ge,ft)&&tt.push(String(ft));if(ke)for(var St=Fe(Ge),Ct=0;Ct<Pe.length;++Ct)!(St&&Pe[Ct]==="constructor")&&Ce.call(Ge,Pe[Ct])&&tt.push(Pe[Ct]);return tt}}return implementation=be,implementation}var objectKeys$1,hasRequiredObjectKeys$1;function requireObjectKeys$1(){if(hasRequiredObjectKeys$1)return objectKeys$1;hasRequiredObjectKeys$1=1;var be=Array.prototype.slice,Ce=requireIsArguments(),Se=Object.keys,Te=Se?function(Le){return Se(Le)}:requireImplementation(),Re=Object.keys;return Te.shim=function(){if(Object.keys){var Le=function(){var Pe=Object.keys(arguments);return Pe&&Pe.length===arguments.length}(1,2);Le||(Object.keys=function(Oe){return Ce(Oe)?Re(be.call(Oe)):Re(Oe)})}else Object.keys=Te;return Object.keys||Te},objectKeys$1=Te,objectKeys$1}var jsonStableStringify,hasRequiredJsonStableStringify;function requireJsonStableStringify(){if(hasRequiredJsonStableStringify)return jsonStableStringify;hasRequiredJsonStableStringify=1;var be=(typeof JSON<"u"?JSON:requireJsonify()).stringify,Ce=requireIsarray$1(),Se=requireObjectKeys$1(),Te=requireCallBind(),Re=requireCallBound(),ke=Re("Array.prototype.join"),Le=Re("Array.prototype.indexOf"),Pe=Re("Array.prototype.splice"),Oe=Re("Array.prototype.sort"),qe=function(He,Ge){for(var Ke="",Je=0;Je<He;Je+=1)Ke+=Ge;return Ke},je=function(Fe,He,Ge){return Ge};return jsonStableStringify=function(He){var Ge=arguments.length>1?arguments[1]:void 0,Ke=Ge&&Ge.space||"";typeof Ke=="number"&&(Ke=qe(Ke," "));var Je=!!Ge&&typeof Ge.cycles=="boolean"&&Ge.cycles,Ze=Ge&&Ge.replacer?Te(Ge.replacer):je;if(Ge&&typeof Ge.collapseEmpty<"u"&&typeof Ge.collapseEmpty!="boolean")throw new TypeError("`collapseEmpty` must be a boolean, if provided");var Ye=!!Ge&&Ge.collapseEmpty,tt=typeof Ge=="function"?Ge:Ge&&Ge.cmp,nt=tt&&function(ot){var ft=tt.length>2&&function(Ct){return ot[Ct]};return function(St,Ct){return tt({key:St,value:ot[St]},{key:Ct,value:ot[Ct]},ft?{__proto__:null,get:ft}:void 0)}},rt=[];return function ot(ft,St,Ct,Ht){var Bt=Ke?`
525
- `+qe(Ht,Ke):"",qt=Ke?": ":":";if(Ct&&Ct.toJSON&&typeof Ct.toJSON=="function"&&(Ct=Ct.toJSON()),Ct=Ze(ft,St,Ct),Ct!==void 0){if(typeof Ct!="object"||Ct===null)return be(Ct);var it=function(_t,st){return Ye&&_t.length===0?st:(st==="[]"?"[":"{")+ke(_t,",")+Bt+(st==="[]"?"]":"}")};if(Ce(Ct)){for(var bt=[],ut=0;ut<Ct.length;ut++){var gt=ot(Ct,ut,Ct[ut],Ht+1)||be(null);bt[bt.length]=Bt+Ke+gt}return it(bt,"[]")}if(Le(rt,Ct)!==-1){if(Je)return be("__cycle__");throw new TypeError("Converting circular structure to JSON")}else rt[rt.length]=Ct;for(var Tt=Oe(Se(Ct),nt&&nt(Ct)),bt=[],ut=0;ut<Tt.length;ut++){var St=Tt[ut],wt=ot(Ct,St,Ct[St],Ht+1);if(wt){var It=be(St)+qt+wt;bt[bt.length]=Bt+Ke+It}}return Pe(rt,Le(rt,Ct),1),it(bt,"{}")}}({"":He},"",He,0)},jsonStableStringify}var jsonStableStringifyExports=requireJsonStableStringify();const Wt=getDefaultExportFromCjs$1(jsonStableStringifyExports);var lib$1={},hasRequiredLib$1;function requireLib$1(){if(hasRequiredLib$1)return lib$1;hasRequiredLib$1=1,Object.defineProperty(lib$1,"__esModule",{value:!0}),lib$1.WalletType=void 0,lib$1.Wallet=Te,lib$1.fromSecretKey=Re,lib$1.fromPublicKey=ke,lib$1.fromAddress=Le,lib$1.fromRandom=Pe,lib$1.fromJSON=Oe,lib$1.isValid=qe;const be=requireLib$4(),Ce=requireLib$3(),Se=requireLib$2();lib$1.WalletType=Se.DidType;function Te(je,Fe="default"){const He=(0,Se.DidType)(Fe),Ge=(0,Ce.getSigner)(He.pk),Ke=(0,Ce.getHasher)(He.hash);return{type:He,secretKey:je.sk,publicKey:je.pk,address:je.pk?(0,Se.fromPublicKey)(je.pk,He):je.address,hash(Je,Ze=1,Ye="hex"){return Ke(Je,Ze,Ye)},sign(Je,Ze=!0,Ye="hex"){if(!je.sk)throw new Error("Cannot sign data without a secretKey");if(Ze){const tt=Ke(Je,1);return Ge.sign(tt,je.sk,Ye)}return Ge.sign(Je,je.sk,Ye)},async verify(Je,Ze,Ye=!0,tt){if(!je.pk)throw new Error("Cannot verify data without a publicKey");const nt=Ye?Ke(Je,1):Je;return Ge.verify(nt,Ze,je.pk,tt)},ethHash(Je){if(typeof Ge.ethHash!="function")throw new Error("ethHash is not supported by signer");return Ge.ethHash(Je)},ethSign(Je,Ze=!0){if(!je.sk)throw new Error("Cannot sign data without a secretKey");if(typeof Ge.ethHash!="function")throw new Error("ethSign is not supported by signer");return Ze?Ge.ethSign(Ge.ethHash(Je),(0,be.toHex)(je.sk)):Ge.ethSign(Je,(0,be.toHex)(je.sk))},ethVerify(Je,Ze,Ye=!0){if(typeof Ge.ethHash!="function")throw new Error("ethVerify is not supported by signer");const tt=Ye?Ge.ethHash(Je):Je;return Ge.ethRecover(tt,Ze)===this.address},toAddress(){return je.pk?(0,Se.fromPublicKey)(je.pk,He):je.address},toJSON(){return{type:Se.DidType.toJSON(He),sk:(0,be.toHex)(je.sk),pk:(0,be.toHex)(je.pk),address:this.address}}}}function Re(je,Fe="default"){const He=(0,Se.DidType)(Fe),Ge={sk:je,pk:(0,Ce.getSigner)(He.pk).getPublicKey(je)};return Te(Ge,He)}function ke(je,Fe="default"){return Te({pk:je},(0,Se.DidType)(Fe))}function Le(je){return Te({address:(0,Se.toAddress)(je)},(0,Se.toTypeInfo)(je))}function Pe(je="default"){const Fe=(0,Se.DidType)(je),Ge=(0,Ce.getSigner)(Fe.pk).genKeyPair();return Te({sk:Ge.secretKey,pk:Ge.publicKey},Fe)}function Oe(je){const Fe=Se.DidType.fromJSON(je.type);return Te(je,Fe)}function qe(je,Fe=!0){return!(!je||typeof je!="object"||typeof je.verify!="function"||typeof je.toAddress!="function"||typeof je.toJSON!="function"||!je.type||!je.publicKey||Fe&&(!je.secretKey||typeof je.sign!="function"))}return lib$1}var libExports$2=requireLib$1(),isUrl_1,hasRequiredIsUrl;function requireIsUrl(){if(hasRequiredIsUrl)return isUrl_1;hasRequiredIsUrl=1,isUrl_1=Te;var be=/^(?:\w+:)?\/\/(\S+)$/,Ce=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,Se=/^[^\s\.]+\.\S{2,}$/;function Te(Re){if(typeof Re!="string")return!1;var ke=Re.match(be);if(!ke)return!1;var Le=ke[1];return Le?!!(Ce.test(Le)||Se.test(Le)):!1}return isUrl_1}var isUrlExports=requireIsUrl();const isUrl=getDefaultExportFromCjs$1(isUrlExports);var __defProp$4=Object.defineProperty,__defNormalProp$4=(be,Ce,Se)=>Ce in be?__defProp$4(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Se}):be[Ce]=Se,__publicField$4=(be,Ce,Se)=>(__defNormalProp$4(be,Ce+"",Se),Se);class AuthService{constructor({api:Ce}){__publicField$4(this,"api"),this.api=Ce}async getUserPublicInfo({did:Ce}){const{data:Se}=await this.api.get("/api/user",{params:{did:Ce}});return Se}async getUserPrivacyConfig({did:Ce}){const{data:Se}=await this.api.get("/api/user/privacy/config",{params:{did:Ce}});return Se}async saveUserPrivacyConfig(Ce){const{data:Se}=await this.api.post("/api/user/privacy/config",Ce);return Se}async getUserNotificationConfig(){const{data:Ce}=await this.api.get("/api/user/notification/config");return Ce}async saveUserNotificationConfig(Ce){const{data:Se}=await this.api.post("/api/user/notification/config",Ce);return Se}async testNotificationWebhook(Ce){const{data:Se}=await this.api.put("/api/user/notification/webhook",Ce);return Se}async getProfileUrl({did:Ce,locale:Se}){const Te=`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/user`;return withQuery(Te,{did:Ce,locale:Se})}async getProfile(){const{data:Ce}=await this.api.get("/api/user/profile");return Ce}async refreshProfile(){await this.api.put("/api/user/refreshProfile")}async saveProfile({locale:Ce,inviter:Se,metadata:Te,address:Re}){const{data:ke}=await this.api.put("/api/user/profile",{locale:Ce,inviter:Se,metadata:Te,address:Re});return ke}async updateDidSpace({spaceGateway:Ce}){await this.api.put("/api/user/updateDidSpace",{spaceGateway:Ce})}async logout({visitorId:Ce,status:Se,includeFederated:Te}){const{data:Re}=await this.api.post("/api/user/logout",{visitorId:Ce,status:Se,includeFederated:Te});return Re}async destroyMyself(){const{data:Ce}=await this.api.delete("/api/user");return Ce}}class TokenService{getSessionToken(Ce){return api$1.get(constantExports$1.SESSION_TOKEN_STORAGE_KEY)?api$1.get(constantExports$1.SESSION_TOKEN_STORAGE_KEY):Ce.sessionTokenKey?window.localStorage.getItem(Ce.sessionTokenKey):""}setSessionToken(Ce){api$1.set(constantExports$1.SESSION_TOKEN_STORAGE_KEY,Ce)}removeSessionToken(){api$1.remove(constantExports$1.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(constantExports$1.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(Ce){localStorage.setItem(constantExports$1.REFRESH_TOKEN_STORAGE_KEY,Ce)}removeRefreshToken(){localStorage.removeItem(constantExports$1.REFRESH_TOKEN_STORAGE_KEY)}}const blockletCache=new QuickLRU({maxSize:30,maxAge:60*1e3});class BlockletService{getBlocklet(Ce,Se=!1){if(!Ce){if(typeof window>"u"||typeof document>"u")throw new Error("Cannot get blocklet in server side without baseUrl");return window.blocklet}if(!Se&&blockletCache.has(Ce))return blockletCache.get(Ce);const Te=withQuery(joinURL(Ce,"__blocklet__.js"),{type:"json",t:Date.now()});return new Promise(async Re=>{const Le=await(await fetch(Te)).json();blockletCache.set(Ce,Le),Re(Le)})}loadBlocklet(){return new Promise((Ce,Se)=>{if(typeof window>"u"||typeof document>"u"){Se();return}const Te=document.createElement("script");let Re="/";window.blocklet&&window.blocklet.prefix&&(Re=window.blocklet.prefix),Te.src=withQuery(joinURL(Re,"__blocklet__.js"),{t:Date.now()}),Te.onload=()=>{Ce()},Te.onerror=()=>{Se()},document.head.append(Te)})}getPrefix(Ce){return Ce?Ce?.prefix||"/":typeof window>"u"||typeof document>"u"?null:window.blocklet?.prefix||"/"}}var __defProp$3=Object.defineProperty,__defNormalProp$3=(be,Ce,Se)=>Ce in be?__defProp$3(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Se}):be[Ce]=Se,__publicField$3=(be,Ce,Se)=>(__defNormalProp$3(be,typeof Ce!="symbol"?Ce+"":Ce,Se),Se);class UserSessionService{constructor({api:Ce,blocklet:Se}){__publicField$3(this,"api"),__publicField$3(this,"blocklet"),this.api=Ce,this.blocklet=Se||new BlockletService}getBaseUrl(Ce){return Ce?joinURL(Ce,constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX):void 0}async getUserSessions({did:Ce,appUrl:Se}){const Te=this.getBaseUrl(Se),Re=await this.blocklet.getBlocklet(),{data:ke}=await this.api.get("/api/user-session",{baseURL:Te,params:{userDid:Ce,appPid:Re.appPid}});return ke}async getMyLoginSessions({appUrl:Ce}={},Se={page:1,pageSize:10}){const Te=this.getBaseUrl(Ce),{data:Re}=await this.api.get("/api/user-session/myself",{baseURL:Te,params:Se});return Re}async loginByUserSession({id:Ce,appPid:Se,userDid:Te,passportId:Re,appUrl:ke}){const Le=this.getBaseUrl(ke),{data:Pe}=await this.api.post("/api/user-session/login",{id:Ce,appPid:Se,userDid:Te,passportId:Re},{baseURL:Le});return Pe}}var __defProp$2=Object.defineProperty,__defNormalProp$2=(be,Ce,Se)=>Ce in be?__defProp$2(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Se}):be[Ce]=Se,__publicField$2=(be,Ce,Se)=>(__defNormalProp$2(be,Ce+"",Se),Se);class ComponentService{constructor({blocklet:Ce=window.blocklet}={}){__publicField$2(this,"blocklet"),this.blocklet=Ce}getComponent(Ce){return(this.blocklet?.componentMountPoints||[]).find(Re=>[Re.title,Re.name,Re.did].includes(Ce))}getComponentMountPoint(Ce){return this.getComponent(Ce)?.mountPoint||""}getUrl(Ce,...Se){const Te=this.getComponentMountPoint(Ce),Re=this.blocklet?.appUrl||"";return joinURL(Re,Te,...Se)}}var __defProp$1=Object.defineProperty,__defNormalProp$1=(be,Ce,Se)=>Ce in be?__defProp$1(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Se}):be[Ce]=Se,__publicField$1=(be,Ce,Se)=>(__defNormalProp$1(be,typeof Ce!="symbol"?Ce+"":Ce,Se),Se);class FederatedService{constructor({api:Ce,blocklet:Se}){__publicField$1(this,"api"),__publicField$1(this,"blocklet"),__publicField$1(this,"blockletDataCache",{}),this.api=Ce,this.blocklet=Se||new BlockletService}async getTrustedDomains(){const{data:Ce}=await this.api.get("/api/federated/getTrustedDomains");return Ce}getMaster(Ce=this.blocklet.getBlocklet()){return Ce?.settings?.federated?.master}getConfig(Ce=this.blocklet.getBlocklet()){return Ce?.settings?.federated?.config}getFederatedEnabled(Ce=this.blocklet.getBlocklet()){return this.getConfig(Ce)?.status==="approved"}getSourceAppPid(Ce=this.blocklet.getBlocklet()){return this.getMaster(Ce)?.appPid}getFederatedApp(Ce=this.blocklet.getBlocklet()){const Se=this.getMaster(Ce);return isEmpty(Se)?null:{appId:Se.appId,appName:Se.appName,appDescription:Se.appDescription,appLogo:Se.appLogo,appPid:Se.appPid,appUrl:Se.appUrl,version:Se.version,sourceAppPid:Se.appPid,provider:"wallet"}}getCurrentApp(Ce=this.blocklet.getBlocklet()){if(Ce)return{appId:Ce.appId,appName:Ce.appName,appDescription:Ce.appDescription,appLogo:Ce.appLogo,appPid:Ce.appPid,appUrl:Ce.appUrl,version:Ce.version,sourceAppPid:null,provider:"wallet"};if(window.env){const Se=window.env;return{appId:Se.appId,appName:Se.appName,appDescription:Se.appDescription,appUrl:Se.baseUrl,sourceAppPid:null,provider:"wallet",type:"server"}}return null}getApps(Ce=this.blocklet.getBlocklet()){const Se=[],Te=this.getFederatedApp(Ce),Re=this.getCurrentApp(Ce),ke=this.getFederatedEnabled(Ce);return Re&&Se.push(Re),Te&&Te?.appId!==Re?.appId&&ke&&Se.push(Te),Se.reverse()}async getBlockletData(Ce,Se=!1){if(!Se&&this.blockletDataCache[Ce])return this.blockletDataCache[Ce];try{const Te=new URL("__blocklet__.js",Ce);Te.searchParams.set("type","json");const ke=await(await fetch(Te.href)).json();return this.blockletDataCache[Ce]=ke,ke}catch(Te){return console.error(`Failed to get blocklet data: ${Ce}`,Te),null}}}const version="1.16.45",sleep$1=(be=0)=>new Promise(Ce=>{setTimeout(()=>{Ce()},be)}),getBearerToken=be=>`Bearer ${encodeURIComponent(be)}`,visitorIdKey="__visitor_id",getVisitorId=()=>localStorage.getItem(visitorIdKey),verifyResponse=(be,Ce)=>{if(isObject$3(be.data)&&be.status>=200&&be.status<300&&window.blocklet&&window.blocklet.appId&&window.blocklet.appPk){if(!be.data.$signature)throw Ce(),new Error("Invalid response");const{appId:Se,appPk:Te}=window.blocklet;if(libExports$2.fromPublicKey(Te,libExports$3.toTypeInfo(Se)).verify(Wt(omit(be.data,["$signature"])),be.data.$signature)===!1)throw Ce(),new Error("Invalid response")}return be};function getCSRFToken(){return api$1.get("x-csrf-token")}async function sleepForLoading(be,Ce=300){be.metaData.endTime=+new Date;const{startTime:Se,endTime:Te}=be.metaData,Re=Te-Se;Re<Ce&&await sleep$1(Ce-Re),delete be.metaData}const createAxios$1=(be,Ce)=>{const Se={...be?.headers,"x-blocklet-js-sdk-version":version},Te=new ComponentService,Re=axios$2.create({...be,headers:Se});return Ce?.lazy&&(Re.interceptors.request.use(ke=>(ke.metaData={startTime:+new Date},ke),ke=>Promise.reject(ke)),Re.interceptors.response.use(async ke=>(ke.config&&await sleepForLoading(ke.config,Ce?.lazyTime),ke),async ke=>(ke.response&&await sleepForLoading(ke.response.config,Ce?.lazyTime),Promise.reject(ke)))),Re.interceptors.request.use(ke=>{const Le=Ce?.componentDid??window.blocklet?.componentId?.split("/").pop();ke.baseURL=ke.baseURL||Te.getComponentMountPoint(Le),ke.timeout=ke.timeout||20*1e3,ke.headers["x-csrf-token"]=getCSRFToken();const Pe=getVisitorId();return[void 0,null].includes(Pe)||(ke.headers["x-blocklet-visitor-id"]=Pe),ke},ke=>Promise.reject(ke)),Re};async function renewRefreshToken$1(be){if(!be)throw new Error("Refresh token not found");const Ce=createAxios$1({baseURL:constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX,timeout:10*1e3,secure:!0,headers:{authorization:getBearerToken(be)}}),{data:Se}=await Ce.post("/api/did/refreshSession");return Se}function createRequest$1({getSessionToken:be,setSessionToken:Ce,removeSessionToken:Se,getRefreshToken:Te,setRefreshToken:Re,removeRefreshToken:ke,onRefreshTokenError:Le,onRefreshTokenSuccess:Pe},Oe,qe){let je=null;const Fe=createAxios$1({timeout:30*1e3,...Oe},qe);return Fe.interceptors.request.use(async He=>{if(!api$1.get(constantExports$1.SESSION_TOKEN_STORAGE_KEY)){const Ge=be(He);Ge&&(He.headers.authorization=getBearerToken(Ge))}return je&&await je,He},He=>Promise.reject(He)),Fe.interceptors.response.use(He=>He.config?.secure?verifyResponse(He,()=>{Se(),ke()}):He,async He=>{const Ge=He.config;if(Ge&&(Ge.headers=Ge?.headers?{...Ge.headers}:{},He?.response?.status===401&&!Ge._retry)){Ge._retry=!0;try{je||(je=renewRefreshToken$1(Te()));const Ke=await je;return Ce(Ke.nextToken),Re(Ke.nextRefreshToken),typeof Pe=="function"&&Pe(Ke),Fe(Ge)}catch(Ke){return Se(),ke(),typeof Le=="function"&&Le(Ke),Promise.reject(He)}finally{je=null}}return Promise.reject(He)}),Fe}var __defProp=Object.defineProperty,__defNormalProp=(be,Ce,Se)=>Ce in be?__defProp(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Se}):be[Ce]=Se,__publicField=(be,Ce,Se)=>(__defNormalProp(be,typeof Ce!="symbol"?Ce+"":Ce,Se),Se);class BlockletSDK{constructor(){__publicField(this,"api"),__publicField(this,"user"),__publicField(this,"userSession"),__publicField(this,"token"),__publicField(this,"blocklet"),__publicField(this,"federated");const Ce=new TokenService,Se=createRequest$1({getSessionToken:Ce.getSessionToken,setSessionToken:Ce.setSessionToken,removeSessionToken:Ce.removeSessionToken,getRefreshToken:Ce.getRefreshToken,setRefreshToken:Ce.setRefreshToken,removeRefreshToken:Ce.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},{baseURL:constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}),Te=new BlockletService;this.user=new AuthService({api:Se}),this.federated=new FederatedService({api:Se,blocklet:Te}),this.userSession=new UserSessionService({api:Se,blocklet:Te}),this.token=Ce,this.blocklet=Te,this.api=Se}}function createAxios(be={},Ce={}){const Se=new TokenService;return createRequest$1({getSessionToken:Se.getSessionToken,setSessionToken:Se.setSessionToken,removeSessionToken:Se.removeSessionToken,getRefreshToken:Se.getRefreshToken,setRefreshToken:Se.setRefreshToken,removeRefreshToken:Se.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},be,Ce)}const getBlockletSDK=(()=>{let be;return()=>(be||(be=new BlockletSDK),be)})();let s$a=null;try{s$a=new BlockletSDK}catch(be){console.error("Failed to initialize BlockletSDK:",be),s$a=null}const n$7="ux_user_",u$e=60*60*1e3,f$7=be=>{if(typeof sessionStorage>"u")return null;try{const Ce=`${n$7}${be}`,Se=sessionStorage.getItem(Ce);if(!Se)return null;const Te=JSON.parse(Se),Re=Te.timestamp||0;return Date.now()-Re>u$e?(sessionStorage.removeItem(Ce),null):Te.user}catch(Ce){return console.error(`Failed to load user cache for did ${be}:`,Ce),null}},m$b=(be,Ce)=>{if(!(typeof sessionStorage>"u"))try{const Se=`${n$7}${be}`,Te={user:Ce,timestamp:Date.now()};sessionStorage.setItem(Se,JSON.stringify(Te))}catch(Se){console.error(`Failed to save user cache for did ${be}:`,Se)}};function g$c(be){if(!be)return null;let Ce="";return be.fullName?Ce=be.fullName.charAt(0).toUpperCase():be.email?Ce=be.email.split("@")[0].charAt(0).toUpperCase():Ce=be.did?be.did.charAt(0).toUpperCase():"?",Ce}function S$5(be){if(!be||typeof be!="string")return!1;try{const Ce=libExports$3.toTypeInfo(be);return Ce.role!==void 0&&Ce.role!==libExports$4.types.RoleType.ROLE_APPLICATION}catch(Ce){return console.error("Failed to check if did is user did:",Ce),!1}}async function I$7(be){if(!be)return null;const Ce=f$7(be);if(Ce)return Ce;if(!s$a)return null;try{const Se=await s$a.user.getUserPublicInfo({did:be});return Se&&m$b(be,Se),Se}catch(Se){return console.error("Failed to get user by did:",Se),null}}const N$4=(be,Ce=48,Se=void 0,Te=void 0,Re=!1)=>{const ke=Le=>{Te?.(be,Le)};if(!be.avatar){const Le=g$c(be),{className:Pe,style:Oe,alt:qe}=Se||{};return jsxRuntimeExports.jsx(Avatar,{onClick:ke,className:Pe,style:Oe,alt:qe,sx:{width:Ce,height:Ce,fontSize:Ce*.4,cursor:Re||Te?"pointer":"default"},variant:"circular",children:Le})}return jsxRuntimeExports.jsx(Box,{className:"user-card__avatar",sx:{display:"flex"},children:jsxRuntimeExports.jsx($$5,{size:Ce,did:be.did,variant:"circle",style:{cursor:Re||Te?"pointer":"default"},onClick:ke,src:be.avatar,alt:be.fullName||"",...Se||{}})})},_$1=(be,Ce=120)=>be?jsxRuntimeExports.jsx(Box,{sx:{maxWidth:Ce},className:"user-card__top-right-content",children:be()}):null;function x$8({user:be,avatarSize:Ce,shouldShowHoverCard:Se,renderCardContent:Te=void 0,tooltipTitle:Re=void 0,tooltipProps:ke=void 0,avatarProps:Le=void 0,onAvatarClick:Pe}){const Oe=N$4(be,Ce,Le,Pe,Se||!!Re);return Re?jsxRuntimeExports.jsx(Tooltip,{enterDelay:200,title:Re,placement:"bottom",...ke??{},children:Oe}):Se?jsxRuntimeExports.jsx(Tooltip,{enterDelay:200,title:Te?Te():null,placement:"bottom",arrow:!1,...ke??{},slotProps:{popper:{sx:{"& .MuiTooltip-tooltip":{backgroundColor:"transparent",p:0,maxWidth:500,zIndex:1e3}}}},slots:{transition:Zoom},children:Oe}):Oe}function u$d(be){const{user:Ce,infoType:Se,avatarSize:Te=48,shouldShowHoverCard:Re=!1,renderCardContent:ke,...Le}=be;return Se===a$9.NameOnly?jsxRuntimeExports.jsx(x$8,{user:Ce,avatarSize:Te,shouldShowHoverCard:!1,renderCardContent:ke,tooltipTitle:Ce.fullName||Ce.email||Ce.did,...Le}):jsxRuntimeExports.jsx(x$8,{user:Ce,avatarSize:Te,shouldShowHoverCard:Re,renderCardContent:ke,...Le})}function c$5(be){const{user:Ce,avatarSize:Se=48,onAvatarClick:Te}=be;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[N$4(Ce,Se,be.avatarProps,Te),jsxRuntimeExports.jsx(Typography,{variant:"body1",children:Ce.fullName||Ce.email||Ce.did})]})}function p$9(be,Ce=10){return be?be.length<=Ce?be:`${be.slice(0,Ce-1)}...${be.slice(-2)}`:""}function s$9({children:be,maxLength:Ce=10,sx:Se=void 0,hiddenTip:Te=!1}){const Re=reactExports.useMemo(()=>p$9(be,Ce),[be,Ce]);return be?.length<=Ce?jsxRuntimeExports.jsx(Typography,{sx:Se,children:be}):Te?jsxRuntimeExports.jsx(Typography,{sx:Se,children:Re}):jsxRuntimeExports.jsx(Tooltip,{title:be,placement:"top",children:jsxRuntimeExports.jsx(Typography,{sx:Se,children:Re})})}function W$2({...be}){const{user:Ce,showDid:Se,didProps:Te,avatarSize:Re,shouldShowHoverCard:ke,renderCardContent:Le,renderTopRightContent:Pe,topRightMaxWidth:Oe,avatarProps:qe,shortenLabelProps:je,renderName:Fe,...He}=be;return jsxRuntimeExports.jsxs(Box,{className:"user-card__avatar-content",sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:1,flex:1,minWidth:0},children:[jsxRuntimeExports.jsx(x$8,{user:Ce,avatarSize:Re,shouldShowHoverCard:ke,renderCardContent:Le,avatarProps:qe,...He}),jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Typography,{variant:"subtitle1",className:"user-card__full-name-label",noWrap:!0,sx:{fontWeight:500,color:"text.primary",fontSize:18,lineHeight:1.1},children:Fe?Fe(Ce):jsxRuntimeExports.jsx(s$9,{sx:{fontWeight:500},...je,children:Ce.fullName||Ce.email||Ce.did})}),Se&&Ce.did?jsxRuntimeExports.jsx($e,{did:Ce.did,size:14,copyable:!0,compact:!0,locale:"en",sx:{lineHeight:1.5},...Te??{}}):null]})]}),_$1(Pe,Oe)]})}const D$4=reactExports.memo(W$2),data$y={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-3h.01"/><path d="M11 12h1v4h1"/></g>'},L$5=be=>reactExports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...be},reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.772 2.0002C14.3605 1.98785 13.0021 2.53434 11.9889 3.51979L11.9786 3.52995L10.4736 5.0366C10.0833 5.42734 10.0837 6.06051 10.4745 6.45081C10.8652 6.84111 11.4984 6.84074 11.8887 6.44999L13.3881 4.9488C14.0246 4.33227 14.8741 3.99242 15.7545 4.00013C16.6371 4.00785 17.4828 4.36431 18.1091 4.99495C18.7356 5.62581 19.0921 6.48066 19.0999 7.37575C19.1076 8.26812 18.7679 9.12664 18.1559 9.76782L15.5375 12.4045L15.5374 12.4046C15.1949 12.7496 14.7832 13.016 14.3305 13.186C13.8777 13.3561 13.3942 13.4261 12.9126 13.3913C12.4309 13.3566 11.962 13.218 11.5377 12.9845C11.1133 12.751 10.7432 12.428 10.4528 12.037C10.1234 11.5937 9.49706 11.5012 9.0537 11.8306C8.61035 12.1599 8.51791 12.7863 8.84723 13.2296C9.30832 13.8504 9.89697 14.3645 10.5736 14.7368C11.2503 15.1091 11.9989 15.3306 12.7687 15.3862C13.5385 15.4417 14.311 15.3298 15.0338 15.0583C15.7565 14.7868 16.4122 14.3622 16.9567 13.8138L16.9568 13.8136L19.5815 11.1705L19.5937 11.1581C20.5719 10.1382 21.112 8.77356 21.0998 7.35849C21.0876 5.94342 20.524 4.58841 19.5282 3.58568C18.5323 2.58272 17.1835 2.01256 15.772 2.0002ZM10.3313 7.71385C9.5615 7.65833 8.78897 7.7702 8.06622 8.0417C7.34353 8.31317 6.68782 8.73776 6.14332 9.28624L6.14319 9.28637L3.51847 11.9295L3.50633 11.9419C2.52811 12.9618 1.98799 14.3264 2.0002 15.7415C2.01241 17.1566 2.57601 18.5116 3.57176 19.5143C4.56774 20.5173 5.91651 21.0874 7.32798 21.0998C8.73945 21.1121 10.0979 20.5657 11.1111 19.5802L11.1235 19.568L12.6197 18.0613C13.0088 17.6695 13.0066 17.0363 12.6147 16.6471C12.2228 16.258 11.5897 16.2602 11.2005 16.6521L9.71087 18.1522C9.07455 18.7681 8.2254 19.1076 7.34548 19.0999C6.46286 19.0921 5.61715 18.7357 4.9909 18.1051C4.36443 17.4742 4.00785 16.6193 4.00013 15.7242C3.99243 14.8319 4.3321 13.9734 4.94412 13.3322L7.56246 10.6955L7.56259 10.6954C7.90506 10.3504 8.31675 10.084 8.76952 9.91396C9.22227 9.74389 9.70581 9.67393 10.1874 9.70866C10.6691 9.7434 11.138 9.88205 11.5623 10.1155C11.9867 10.349 12.3568 10.672 12.6472 11.063C12.9766 11.5063 13.6029 11.5987 14.0463 11.2694C14.4896 10.9401 14.5821 10.3137 14.2528 9.87036C13.7917 9.24963 13.203 8.73549 12.5264 8.36322C11.8497 7.99093 11.1011 7.76936 10.3313 7.71385Z",fill:"#4B5563"})),l$j=be=>reactExports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...be},reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.63384C6 5.4262 6.25495 5 6.91364 5H17.0907C17.7494 5 18.0043 5.4262 18.0043 5.63384V18.7046C18.0043 18.9122 17.7494 19.3384 17.0907 19.3384H6.91364C6.25495 19.3384 6 18.9122 6 18.7046V5.63384ZM6.91364 3C5.45858 3 4 4.03679 4 5.63384V18.7046C4 20.3016 5.45858 21.3384 6.91364 21.3384H17.0907C18.5458 21.3384 20.0043 20.3016 20.0043 18.7046V5.63384C20.0043 4.03679 18.5458 3 17.0907 3H6.91364ZM11.8775 18.0375C12.9664 18.0375 13.8492 17.1548 13.8492 16.0658C13.8492 14.9768 12.9664 14.0941 11.8775 14.0941C10.7885 14.0941 9.90575 14.9768 9.90575 16.0658C9.90575 17.1548 10.7885 18.0375 11.8775 18.0375Z",fill:"#4B5563"})),C$7=be=>reactExports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...be},reactExports.createElement("path",{d:"M17.5101 4.44495C19.0706 5.97732 19.9631 8.04564 19.9989 10.2126C20.0347 12.3795 19.2109 14.4751 17.7018 16.0564L17.5101 16.2512L13.5029 20.1856C12.9945 20.6847 12.3119 20.9752 11.5935 20.9985C10.875 21.0217 10.1745 20.7759 9.63366 20.3109L9.49766 20.1856L5.48954 16.2502C3.89552 14.6848 3 12.5615 3 10.3476C3 8.13368 3.89552 6.01043 5.48954 4.44495C7.08357 2.87948 9.24554 2 11.4998 2C13.7541 2 15.9161 2.87948 17.5101 4.44495ZM11.4998 7.56508C11.1278 7.56508 10.7593 7.63705 10.4156 7.77689C10.0718 7.91672 9.75951 8.12168 9.49641 8.38006C9.23332 8.63844 9.02462 8.94518 8.88224 9.28277C8.73985 9.62037 8.66657 9.98219 8.66657 10.3476C8.66657 10.713 8.73985 11.0748 8.88224 11.4124C9.02462 11.75 9.23332 12.0568 9.49641 12.3151C9.75951 12.5735 10.0718 12.7785 10.4156 12.9183C10.7593 13.0581 11.1278 13.1301 11.4998 13.1301C12.2513 13.1301 12.9719 12.837 13.5032 12.3151C14.0346 11.7933 14.3331 11.0856 14.3331 10.3476C14.3331 9.60963 14.0346 8.90188 13.5032 8.38006C12.9719 7.85824 12.2513 7.56508 11.4998 7.56508Z",stroke:"#4B5563",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),l$i=be=>reactExports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...be},reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.6094 5.11861C11.712 5.04162 11.8369 5 11.9652 5C12.0935 5 12.2184 5.04162 12.321 5.11861L18.3442 9.636L12.1855 14.2981C12.1025 14.3594 12.0265 14.3789 11.9652 14.3789C11.9039 14.3789 11.8279 14.3594 11.745 14.2981L5.58619 9.636L11.6094 5.11861ZM3.52321 8.81025C3.40155 8.87613 3.29168 8.96845 3.20274 9.08595C3.00866 9.34234 2.95698 9.66207 3.0346 9.95026C3.01168 10.0893 3.00006 10.2304 3.00006 10.3721V18.3372C3.00006 19.025 3.27325 19.6845 3.75954 20.1708C4.24583 20.6571 4.90537 20.9303 5.59309 20.9303H18.3373C19.0251 20.9303 19.6846 20.6571 20.1709 20.1708C20.6572 19.6845 20.9304 19.025 20.9304 18.3372V10.3721C20.9304 10.2294 20.9186 10.0885 20.8957 9.95059C20.9735 9.66232 20.9219 9.34244 20.7277 9.08595C20.638 8.96744 20.527 8.87455 20.4041 8.80856C20.2605 8.61869 20.0907 8.44775 19.8983 8.30153L19.8983 8.30151L19.8932 8.29769L13.521 3.5186C13.0722 3.18197 12.5263 3 11.9652 3C11.4042 3 10.8582 3.18197 10.4094 3.5186L4.03727 8.29769C3.8421 8.44406 3.66922 8.61676 3.52321 8.81025ZM18.9304 11.7007V18.3372C18.9304 18.4945 18.8679 18.6454 18.7567 18.7566C18.6455 18.8678 18.4946 18.9303 18.3373 18.9303H5.59309C5.43581 18.9303 5.28496 18.8678 5.17375 18.7566C5.06253 18.6454 5.00006 18.4945 5.00006 18.3372V11.7007L10.5412 15.8953L10.5412 15.8954L10.5467 15.8994C10.9548 16.204 11.4466 16.3789 11.9652 16.3789C12.4838 16.3789 12.9757 16.204 13.3838 15.8994L13.3838 15.8994L13.3892 15.8953L18.9304 11.7007Z",fill:"#4B5563"})),C$6=be=>reactExports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...be},reactExports.createElement("path",{d:"M12 7.5V12L15.0615 15.0615M4 12C4 13.0506 4.20693 14.0909 4.60896 15.0615C5.011 16.0321 5.60028 16.914 6.34315 17.6569C7.08601 18.3997 7.96793 18.989 8.93853 19.391C9.90914 19.7931 10.9494 20 12 20C13.0506 20 14.0909 19.7931 15.0615 19.391C16.0321 18.989 16.914 18.3997 17.6569 17.6569C18.3997 16.914 18.989 16.0321 19.391 15.0615C19.7931 14.0909 20 13.0506 20 12C20 10.9494 19.7931 9.90914 19.391 8.93853C18.989 7.96793 18.3997 7.08601 17.6569 6.34315C16.914 5.60028 16.0321 5.011 15.0615 4.60896C14.0909 4.20693 13.0506 4 12 4C10.9494 4 9.90914 4.20693 8.93853 4.60896C7.96793 5.011 7.08601 5.60028 6.34315 6.34315C5.60028 7.08601 5.011 7.96793 4.60896 8.93853C4.20693 9.90914 4 10.9494 4 12Z",stroke:"#4B5563",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));requireEn$1();defaultDayjs.extend(k$7);defaultDayjs.extend(B$6);defaultDayjs.extend(localizedFormatPlugin);const g$b=defaultDayjs.tz.guess(),x$7=be=>be>=0&&be<6?{phase:"dawn",icon:"🌒"}:be>=6&&be<12?{phase:"morning",icon:"🌞"}:be>=12&&be<18?{phase:"afternoon",icon:"🌞"}:{phase:"night",icon:"🌒"};function y$8(be=g$b,Ce="zh"){const Se=reactExports.useCallback(()=>{const ke=Ce==="zh"?"zh-cn":"en",Le=Ce==="zh"?"zh-cn":"en-us";defaultDayjs.locale(ke);const Pe=defaultDayjs().tz(be),Oe=Pe.hour(),{phase:qe,icon:je}=x$7(Oe);return{formattedTime:Pe.format("LT"),fullDateTime:Et$1(Pe.toDate(),{tz:be,locale:Le}),phase:qe,icon:je,rawTime:Pe}},[be,Ce]),[Te,Re]=reactExports.useState(Se());return reactExports.useEffect(()=>{Re(Se());const ke=setInterval(()=>{Re(Se())},6e3);return()=>{clearInterval(ke)}},[be,Ce,Se]),Te}const u$c={en:{localTime:"Local Time",timezonePhase:{dawn:"AM",morning:"AM",afternoon:"PM",night:"PM"}},zh:{localTime:"本地时间",timezonePhase:{dawn:"凌晨",morning:"上午",afternoon:"下午",night:"晚上"}}};function P$4({value:be,...Ce}){const{locale:Se}=T$9()||{locale:"en"},Te=useMemoizedFn((ke,Le={})=>p$a(u$c,ke,Se,"en",Le)),Re=y$8(be,Se);return jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:1,justifyContent:"flex-start",overflow:"hidden",width:"100%"},children:[jsxRuntimeExports.jsx(Typography,{...Ce,noWrap:!0,component:"span",sx:{flex:"0 1 auto",minWidth:0,...Ce.sx},children:be}),jsxRuntimeExports.jsx(Tooltip,{enterDelay:200,title:jsxRuntimeExports.jsxs("span",{children:[Te("localTime")," ",Re.fullDateTime]}),placement:"top",arrow:!0,children:jsxRuntimeExports.jsxs(Typography,{component:"span",noWrap:!0,sx:{fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:"0 0 auto",maxWidth:"100%"},children:["(",Se==="zh"?`${Te(`timezonePhase.${Re.phase}`)} `:"",Re.formattedTime,")"]})})]})}const Z$4={timezone:C$6,email:l$i,phone:l$j,location:C$7,link:L$5};function q$3(be){return withoutProtocol(be)}function x$6(be){return be?{filter:"brightness(0) saturate(100%) invert(1)"}:{}}const p$8={width:16,height:16};function H$6({value:be}){const Ce=useTheme().palette.mode==="dark";return jsxRuntimeExports.jsxs(Box,{className:"user-card__timezone-field",sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(C$6,{...p$8,style:x$6(Ce)}),jsxRuntimeExports.jsx(P$4,{value:be,variant:"body2",color:"grey.800"})]})}function J$1({value:be}){const Ce=useTheme().palette.mode==="dark";return jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",gap:1,className:"user-card__link-field",children:[jsxRuntimeExports.jsx(L$5,{...p$8,style:x$6(Ce)}),jsxRuntimeExports.jsx(v$7,{variant:"body2",color:"grey.800",children:jsxRuntimeExports.jsx(Typography,{component:"a",href:be,style:{textDecoration:"none",color:"inherit",fontSize:"inherit"},target:"_blank",variant:"body2",rel:"noopener noreferrer",sx:{color:"grey.800"},children:q$3(be)})})]})}function N$3({field:be,value:Ce,children:Se=null}){const Te=Z$4[be],Re=useTheme().palette.mode==="dark",ke=x$6(Re);return jsxRuntimeExports.jsxs(Box,{className:`user-card__${be}-field`,sx:{display:"flex",alignItems:"center",gap:1},children:[Te?jsxRuntimeExports.jsx(Te,{...p$8,style:ke}):jsxRuntimeExports.jsx(Icon,{icon:data$y,...p$8,...ke}),jsxRuntimeExports.jsx(v$7,{variant:"body2",color:"grey.800",children:Se??Ce})]},be)}function le$2({user:be,renderFields:Ce=void 0}){const Se=useCreation(()=>Ce??["bio","email","phone","location","timezone","link"],[Ce]),Te=useCreation(()=>Se.includes("bio"),[Se]),Re=useCreation(()=>be.metadata??{joinedAt:be?.createdAt,email:be?.email,phone:{country:"cn",phoneNumber:be?.phone??""}},[be]),ke=useCreation(()=>be.address,[be.address]),Le=reactExports.useCallback(He=>{if(!He)return"";switch(He){case"bio":return be.metadata?.bio||"";case"email":return Re.email||be.email||"";case"phone":return Re.phone?.phoneNumber||be.phone||"";case"location":return ke?.city||Re.location||"";case"timezone":return Re.timezone||"";case"link":return Re.links?.map(Ge=>Ge.url).filter(Boolean)||[];default:return be[He]||""}},[be,Re,ke]),{effectiveRenderCount:Pe}=reactExports.useMemo(()=>{const He=Se.filter(Ke=>{if(Ke==="bio")return!1;const Je=Le(Ke);return Je==null||Je===""?!1:isArray$1(Je)?Je.length>0:String(Je).trim().length>0}),Ge=He.reduce((Ke,Je)=>{const Ze=Le(Je);return Ke+(Array.isArray(Ze)?Ze.filter(Ye=>Ye&&String(Ye).trim()).length:1)},0);return{visibleFields:He,effectiveRenderCount:Ge}},[Se,Le]),Oe=Pe>4,qe=useMemoizedFn(He=>He!=null&&String(He).trim().length>0),je=reactExports.useMemo(()=>{const He=[];return Se.forEach(Ge=>{if(Ge==="bio")return;const Ke=Le(Ge);Ke&&(isArray$1(Ke)?Ke.forEach((Je,Ze)=>{qe(Je)&&He.push({field:Ge,value:Je,key:`${Ge}-${Ze}`})}):qe(Ke)&&He.push({field:Ge,value:Ke,key:Ge}))}),He},[Se,Le,qe]);if(Se.length===0)return null;const Fe=He=>{const{field:Ge,value:Ke,key:Je}=He;switch(Ge){case"link":return jsxRuntimeExports.jsx(J$1,{value:Ke},Je);case"timezone":return jsxRuntimeExports.jsx(H$6,{value:Ke},Je);case"email":return jsxRuntimeExports.jsx(N$3,{field:Ge,value:Ke,children:jsxRuntimeExports.jsx(Typography,{component:"a",href:`mailto:${Ke}`,rel:"noopener noreferrer",referrerPolicy:"no-referrer",style:{color:"inherit",textDecoration:"none",fontSize:"inherit"},children:Ke})});default:return jsxRuntimeExports.jsx(N$3,{field:Ge,value:Ke},Je)}};return jsxRuntimeExports.jsxs(Box,{className:"user-card__basic-content",sx:{mt:1,display:"flex",flexDirection:"column",gap:1.5},children:[Te&&be.metadata?.bio&&jsxRuntimeExports.jsx(v$7,{variant:"body2",color:"grey.800",className:"user-card__bio-field",children:be.metadata.bio}),Oe?jsxRuntimeExports.jsx(Grid$1,{container:!0,spacing:.5,children:je.map(He=>jsxRuntimeExports.jsx(Grid$1,{size:6,children:Fe(He)},He.key))}):jsxRuntimeExports.jsx(Box,{sx:{display:"flex",flexDirection:"column",gap:.5},children:je.map(He=>Fe(He))})]})}const v$7=styled$3(Typography)`
525
+ `+qe(Ht,Ke):"",qt=Ke?": ":":";if(Ct&&Ct.toJSON&&typeof Ct.toJSON=="function"&&(Ct=Ct.toJSON()),Ct=Ze(ft,St,Ct),Ct!==void 0){if(typeof Ct!="object"||Ct===null)return be(Ct);var it=function(_t,st){return Ye&&_t.length===0?st:(st==="[]"?"[":"{")+ke(_t,",")+Bt+(st==="[]"?"]":"}")};if(Ce(Ct)){for(var bt=[],ut=0;ut<Ct.length;ut++){var gt=ot(Ct,ut,Ct[ut],Ht+1)||be(null);bt[bt.length]=Bt+Ke+gt}return it(bt,"[]")}if(Le(rt,Ct)!==-1){if(Je)return be("__cycle__");throw new TypeError("Converting circular structure to JSON")}else rt[rt.length]=Ct;for(var Tt=Oe(Se(Ct),nt&&nt(Ct)),bt=[],ut=0;ut<Tt.length;ut++){var St=Tt[ut],wt=ot(Ct,St,Ct[St],Ht+1);if(wt){var It=be(St)+qt+wt;bt[bt.length]=Bt+Ke+It}}return Pe(rt,Le(rt,Ct),1),it(bt,"{}")}}({"":He},"",He,0)},jsonStableStringify}var jsonStableStringifyExports=requireJsonStableStringify();const Wt=getDefaultExportFromCjs$1(jsonStableStringifyExports);var lib$1={},hasRequiredLib$1;function requireLib$1(){if(hasRequiredLib$1)return lib$1;hasRequiredLib$1=1,Object.defineProperty(lib$1,"__esModule",{value:!0}),lib$1.WalletType=void 0,lib$1.Wallet=Te,lib$1.fromSecretKey=Re,lib$1.fromPublicKey=ke,lib$1.fromAddress=Le,lib$1.fromRandom=Pe,lib$1.fromJSON=Oe,lib$1.isValid=qe;const be=requireLib$4(),Ce=requireLib$3(),Se=requireLib$2();lib$1.WalletType=Se.DidType;function Te(je,Fe="default"){const He=(0,Se.DidType)(Fe),Ge=(0,Ce.getSigner)(He.pk),Ke=(0,Ce.getHasher)(He.hash);return{type:He,secretKey:je.sk,publicKey:je.pk,address:je.pk?(0,Se.fromPublicKey)(je.pk,He):je.address,hash(Je,Ze=1,Ye="hex"){return Ke(Je,Ze,Ye)},sign(Je,Ze=!0,Ye="hex"){if(!je.sk)throw new Error("Cannot sign data without a secretKey");if(Ze){const tt=Ke(Je,1);return Ge.sign(tt,je.sk,Ye)}return Ge.sign(Je,je.sk,Ye)},async verify(Je,Ze,Ye=!0,tt){if(!je.pk)throw new Error("Cannot verify data without a publicKey");const nt=Ye?Ke(Je,1):Je;return Ge.verify(nt,Ze,je.pk,tt)},ethHash(Je){if(typeof Ge.ethHash!="function")throw new Error("ethHash is not supported by signer");return Ge.ethHash(Je)},ethSign(Je,Ze=!0){if(!je.sk)throw new Error("Cannot sign data without a secretKey");if(typeof Ge.ethHash!="function")throw new Error("ethSign is not supported by signer");return Ze?Ge.ethSign(Ge.ethHash(Je),(0,be.toHex)(je.sk)):Ge.ethSign(Je,(0,be.toHex)(je.sk))},ethVerify(Je,Ze,Ye=!0){if(typeof Ge.ethHash!="function")throw new Error("ethVerify is not supported by signer");const tt=Ye?Ge.ethHash(Je):Je;return Ge.ethRecover(tt,Ze)===this.address},toAddress(){return je.pk?(0,Se.fromPublicKey)(je.pk,He):je.address},toJSON(){return{type:Se.DidType.toJSON(He),sk:(0,be.toHex)(je.sk),pk:(0,be.toHex)(je.pk),address:this.address}}}}function Re(je,Fe="default"){const He=(0,Se.DidType)(Fe),Ge={sk:je,pk:(0,Ce.getSigner)(He.pk).getPublicKey(je)};return Te(Ge,He)}function ke(je,Fe="default"){return Te({pk:je},(0,Se.DidType)(Fe))}function Le(je){return Te({address:(0,Se.toAddress)(je)},(0,Se.toTypeInfo)(je))}function Pe(je="default"){const Fe=(0,Se.DidType)(je),Ge=(0,Ce.getSigner)(Fe.pk).genKeyPair();return Te({sk:Ge.secretKey,pk:Ge.publicKey},Fe)}function Oe(je){const Fe=Se.DidType.fromJSON(je.type);return Te(je,Fe)}function qe(je,Fe=!0){return!(!je||typeof je!="object"||typeof je.verify!="function"||typeof je.toAddress!="function"||typeof je.toJSON!="function"||!je.type||!je.publicKey||Fe&&(!je.secretKey||typeof je.sign!="function"))}return lib$1}var libExports$2=requireLib$1(),isUrl_1,hasRequiredIsUrl;function requireIsUrl(){if(hasRequiredIsUrl)return isUrl_1;hasRequiredIsUrl=1,isUrl_1=Te;var be=/^(?:\w+:)?\/\/(\S+)$/,Ce=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,Se=/^[^\s\.]+\.\S{2,}$/;function Te(Re){if(typeof Re!="string")return!1;var ke=Re.match(be);if(!ke)return!1;var Le=ke[1];return Le?!!(Ce.test(Le)||Se.test(Le)):!1}return isUrl_1}var isUrlExports=requireIsUrl();const isUrl=getDefaultExportFromCjs$1(isUrlExports);var __defProp$4=Object.defineProperty,__defNormalProp$4=(be,Ce,Se)=>Ce in be?__defProp$4(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Se}):be[Ce]=Se,__publicField$4=(be,Ce,Se)=>(__defNormalProp$4(be,Ce+"",Se),Se);class AuthService{constructor({api:Ce}){__publicField$4(this,"api"),this.api=Ce}async getUserPublicInfo({did:Ce}){const{data:Se}=await this.api.get("/api/user",{params:{did:Ce}});return Se}async getUserPrivacyConfig({did:Ce}){const{data:Se}=await this.api.get("/api/user/privacy/config",{params:{did:Ce}});return Se}async saveUserPrivacyConfig(Ce){const{data:Se}=await this.api.post("/api/user/privacy/config",Ce);return Se}async getUserNotificationConfig(){const{data:Ce}=await this.api.get("/api/user/notification/config");return Ce}async saveUserNotificationConfig(Ce){const{data:Se}=await this.api.post("/api/user/notification/config",Ce);return Se}async testNotificationWebhook(Ce){const{data:Se}=await this.api.put("/api/user/notification/webhook",Ce);return Se}async getProfileUrl({did:Ce,locale:Se}){const Te=`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/user`;return withQuery(Te,{did:Ce,locale:Se})}async getProfile(){const{data:Ce}=await this.api.get("/api/user/profile");return Ce}async refreshProfile(){await this.api.put("/api/user/refreshProfile")}async saveProfile({locale:Ce,inviter:Se,metadata:Te,address:Re}){const{data:ke}=await this.api.put("/api/user/profile",{locale:Ce,inviter:Se,metadata:Te,address:Re});return ke}async updateDidSpace({spaceGateway:Ce}){await this.api.put("/api/user/updateDidSpace",{spaceGateway:Ce})}async logout({visitorId:Ce,status:Se,includeFederated:Te}){const{data:Re}=await this.api.post("/api/user/logout",{visitorId:Ce,status:Se,includeFederated:Te});return Re}async destroyMyself(){const{data:Ce}=await this.api.delete("/api/user");return Ce}}class TokenService{getSessionToken(Ce){return api$1.get(constantExports$1.SESSION_TOKEN_STORAGE_KEY)?api$1.get(constantExports$1.SESSION_TOKEN_STORAGE_KEY):Ce.sessionTokenKey?window.localStorage.getItem(Ce.sessionTokenKey):""}setSessionToken(Ce){api$1.set(constantExports$1.SESSION_TOKEN_STORAGE_KEY,Ce)}removeSessionToken(){api$1.remove(constantExports$1.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(constantExports$1.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(Ce){localStorage.setItem(constantExports$1.REFRESH_TOKEN_STORAGE_KEY,Ce)}removeRefreshToken(){localStorage.removeItem(constantExports$1.REFRESH_TOKEN_STORAGE_KEY)}}const blockletCache=new QuickLRU({maxSize:30,maxAge:60*1e3});class BlockletService{getBlocklet(Ce,Se=!1){if(!Ce){if(typeof window>"u"||typeof document>"u")throw new Error("Cannot get blocklet in server side without baseUrl");return window.blocklet}if(!Se&&blockletCache.has(Ce))return blockletCache.get(Ce);const Te=withQuery(joinURL(Ce,"__blocklet__.js"),{type:"json",t:Date.now()});return new Promise(async Re=>{const Le=await(await fetch(Te)).json();blockletCache.set(Ce,Le),Re(Le)})}loadBlocklet(){return new Promise((Ce,Se)=>{if(typeof window>"u"||typeof document>"u"){Se();return}const Te=document.createElement("script");let Re="/";window.blocklet&&window.blocklet.prefix&&(Re=window.blocklet.prefix),Te.src=withQuery(joinURL(Re,"__blocklet__.js"),{t:Date.now()}),Te.onload=()=>{Ce()},Te.onerror=()=>{Se()},document.head.append(Te)})}getPrefix(Ce){return Ce?Ce?.prefix||"/":typeof window>"u"||typeof document>"u"?null:window.blocklet?.prefix||"/"}}var __defProp$3=Object.defineProperty,__defNormalProp$3=(be,Ce,Se)=>Ce in be?__defProp$3(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Se}):be[Ce]=Se,__publicField$3=(be,Ce,Se)=>(__defNormalProp$3(be,typeof Ce!="symbol"?Ce+"":Ce,Se),Se);class UserSessionService{constructor({api:Ce,blocklet:Se}){__publicField$3(this,"api"),__publicField$3(this,"blocklet"),this.api=Ce,this.blocklet=Se||new BlockletService}getBaseUrl(Ce){return Ce?joinURL(Ce,constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX):void 0}async getUserSessions({did:Ce,appUrl:Se}){const Te=this.getBaseUrl(Se),Re=await this.blocklet.getBlocklet(),{data:ke}=await this.api.get("/api/user-session",{baseURL:Te,params:{userDid:Ce,appPid:Re.appPid}});return ke}async getMyLoginSessions({appUrl:Ce}={},Se={page:1,pageSize:10}){const Te=this.getBaseUrl(Ce),{data:Re}=await this.api.get("/api/user-session/myself",{baseURL:Te,params:Se});return Re}async loginByUserSession({id:Ce,appPid:Se,userDid:Te,passportId:Re,appUrl:ke}){const Le=this.getBaseUrl(ke),{data:Pe}=await this.api.post("/api/user-session/login",{id:Ce,appPid:Se,userDid:Te,passportId:Re},{baseURL:Le});return Pe}}var __defProp$2=Object.defineProperty,__defNormalProp$2=(be,Ce,Se)=>Ce in be?__defProp$2(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Se}):be[Ce]=Se,__publicField$2=(be,Ce,Se)=>(__defNormalProp$2(be,Ce+"",Se),Se);class ComponentService{constructor({blocklet:Ce=window.blocklet}={}){__publicField$2(this,"blocklet"),this.blocklet=Ce}getComponent(Ce){return(this.blocklet?.componentMountPoints||[]).find(Re=>[Re.title,Re.name,Re.did].includes(Ce))}getComponentMountPoint(Ce){return this.getComponent(Ce)?.mountPoint||""}getUrl(Ce,...Se){const Te=this.getComponentMountPoint(Ce),Re=this.blocklet?.appUrl||"";return joinURL(Re,Te,...Se)}}var __defProp$1=Object.defineProperty,__defNormalProp$1=(be,Ce,Se)=>Ce in be?__defProp$1(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Se}):be[Ce]=Se,__publicField$1=(be,Ce,Se)=>(__defNormalProp$1(be,typeof Ce!="symbol"?Ce+"":Ce,Se),Se);class FederatedService{constructor({api:Ce,blocklet:Se}){__publicField$1(this,"api"),__publicField$1(this,"blocklet"),__publicField$1(this,"blockletDataCache",{}),this.api=Ce,this.blocklet=Se||new BlockletService}async getTrustedDomains(){const{data:Ce}=await this.api.get("/api/federated/getTrustedDomains");return Ce}getMaster(Ce=this.blocklet.getBlocklet()){return Ce?.settings?.federated?.master}getConfig(Ce=this.blocklet.getBlocklet()){return Ce?.settings?.federated?.config}getFederatedEnabled(Ce=this.blocklet.getBlocklet()){return this.getConfig(Ce)?.status==="approved"}getSourceAppPid(Ce=this.blocklet.getBlocklet()){return this.getMaster(Ce)?.appPid}getFederatedApp(Ce=this.blocklet.getBlocklet()){const Se=this.getMaster(Ce);return isEmpty(Se)?null:{appId:Se.appId,appName:Se.appName,appDescription:Se.appDescription,appLogo:Se.appLogo,appPid:Se.appPid,appUrl:Se.appUrl,version:Se.version,sourceAppPid:Se.appPid,provider:"wallet"}}getCurrentApp(Ce=this.blocklet.getBlocklet()){if(Ce)return{appId:Ce.appId,appName:Ce.appName,appDescription:Ce.appDescription,appLogo:Ce.appLogo,appPid:Ce.appPid,appUrl:Ce.appUrl,version:Ce.version,sourceAppPid:null,provider:"wallet"};if(window.env){const Se=window.env;return{appId:Se.appId,appName:Se.appName,appDescription:Se.appDescription,appUrl:Se.baseUrl,sourceAppPid:null,provider:"wallet",type:"server"}}return null}getApps(Ce=this.blocklet.getBlocklet()){const Se=[],Te=this.getFederatedApp(Ce),Re=this.getCurrentApp(Ce),ke=this.getFederatedEnabled(Ce);return Re&&Se.push(Re),Te&&Te?.appId!==Re?.appId&&ke&&Se.push(Te),Se.reverse()}async getBlockletData(Ce,Se=!1){if(!Se&&this.blockletDataCache[Ce])return this.blockletDataCache[Ce];try{const Te=new URL("__blocklet__.js",Ce);Te.searchParams.set("type","json");const ke=await(await fetch(Te.href)).json();return this.blockletDataCache[Ce]=ke,ke}catch(Te){return console.error(`Failed to get blocklet data: ${Ce}`,Te),null}}}const version="1.16.46",sleep$1=(be=0)=>new Promise(Ce=>{setTimeout(()=>{Ce()},be)}),getBearerToken=be=>`Bearer ${encodeURIComponent(be)}`,visitorIdKey="__visitor_id",getVisitorId=()=>localStorage.getItem(visitorIdKey),verifyResponse=(be,Ce)=>{if(isObject$3(be.data)&&be.status>=200&&be.status<300&&window.blocklet&&window.blocklet.appId&&window.blocklet.appPk){if(!be.data.$signature)throw Ce(),new Error("Invalid response");const{appId:Se,appPk:Te}=window.blocklet;if(libExports$2.fromPublicKey(Te,libExports$3.toTypeInfo(Se)).verify(Wt(omit(be.data,["$signature"])),be.data.$signature)===!1)throw Ce(),new Error("Invalid response")}return be};function getCSRFToken(){return api$1.get("x-csrf-token")}async function sleepForLoading(be,Ce=300){be.metaData.endTime=+new Date;const{startTime:Se,endTime:Te}=be.metaData,Re=Te-Se;Re<Ce&&await sleep$1(Ce-Re),delete be.metaData}const createAxios$1=(be,Ce)=>{const Se={...be?.headers,"x-blocklet-js-sdk-version":version},Te=new ComponentService,Re=axios$2.create({...be,headers:Se});return Ce?.lazy&&(Re.interceptors.request.use(ke=>(ke.metaData={startTime:+new Date},ke),ke=>Promise.reject(ke)),Re.interceptors.response.use(async ke=>(ke.config&&await sleepForLoading(ke.config,Ce?.lazyTime),ke),async ke=>(ke.response&&await sleepForLoading(ke.response.config,Ce?.lazyTime),Promise.reject(ke)))),Re.interceptors.request.use(ke=>{const Le=Ce?.componentDid??window.blocklet?.componentId?.split("/").pop();ke.baseURL=ke.baseURL||Te.getComponentMountPoint(Le),ke.timeout=ke.timeout||20*1e3,ke.headers["x-csrf-token"]=getCSRFToken();const Pe=getVisitorId();return[void 0,null].includes(Pe)||(ke.headers["x-blocklet-visitor-id"]=Pe),ke},ke=>Promise.reject(ke)),Re};async function renewRefreshToken$1(be){if(!be)throw new Error("Refresh token not found");const Ce=createAxios$1({baseURL:constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX,timeout:10*1e3,secure:!0,headers:{authorization:getBearerToken(be)}}),{data:Se}=await Ce.post("/api/did/refreshSession");return Se}function createRequest$1({getSessionToken:be,setSessionToken:Ce,removeSessionToken:Se,getRefreshToken:Te,setRefreshToken:Re,removeRefreshToken:ke,onRefreshTokenError:Le,onRefreshTokenSuccess:Pe},Oe,qe){let je=null;const Fe=createAxios$1({timeout:30*1e3,...Oe},qe);return Fe.interceptors.request.use(async He=>{if(!api$1.get(constantExports$1.SESSION_TOKEN_STORAGE_KEY)){const Ge=be(He);Ge&&(He.headers.authorization=getBearerToken(Ge))}return je&&await je,He},He=>Promise.reject(He)),Fe.interceptors.response.use(He=>He.config?.secure?verifyResponse(He,()=>{Se(),ke()}):He,async He=>{const Ge=He.config;if(Ge&&(Ge.headers=Ge?.headers?{...Ge.headers}:{},He?.response?.status===401&&!Ge._retry)){Ge._retry=!0;try{je||(je=renewRefreshToken$1(Te()));const Ke=await je;return Ce(Ke.nextToken),Re(Ke.nextRefreshToken),typeof Pe=="function"&&Pe(Ke),Fe(Ge)}catch(Ke){return Se(),ke(),typeof Le=="function"&&Le(Ke),Promise.reject(He)}finally{je=null}}return Promise.reject(He)}),Fe}var __defProp=Object.defineProperty,__defNormalProp=(be,Ce,Se)=>Ce in be?__defProp(be,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Se}):be[Ce]=Se,__publicField=(be,Ce,Se)=>(__defNormalProp(be,typeof Ce!="symbol"?Ce+"":Ce,Se),Se);class BlockletSDK{constructor(){__publicField(this,"api"),__publicField(this,"user"),__publicField(this,"userSession"),__publicField(this,"token"),__publicField(this,"blocklet"),__publicField(this,"federated");const Ce=new TokenService,Se=createRequest$1({getSessionToken:Ce.getSessionToken,setSessionToken:Ce.setSessionToken,removeSessionToken:Ce.removeSessionToken,getRefreshToken:Ce.getRefreshToken,setRefreshToken:Ce.setRefreshToken,removeRefreshToken:Ce.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},{baseURL:constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}),Te=new BlockletService;this.user=new AuthService({api:Se}),this.federated=new FederatedService({api:Se,blocklet:Te}),this.userSession=new UserSessionService({api:Se,blocklet:Te}),this.token=Ce,this.blocklet=Te,this.api=Se}}function createAxios(be={},Ce={}){const Se=new TokenService;return createRequest$1({getSessionToken:Se.getSessionToken,setSessionToken:Se.setSessionToken,removeSessionToken:Se.removeSessionToken,getRefreshToken:Se.getRefreshToken,setRefreshToken:Se.setRefreshToken,removeRefreshToken:Se.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},be,Ce)}const getBlockletSDK=(()=>{let be;return()=>(be||(be=new BlockletSDK),be)})();let s$a=null;try{s$a=new BlockletSDK}catch(be){console.error("Failed to initialize BlockletSDK:",be),s$a=null}const n$7="ux_user_",u$e=60*60*1e3,f$7=be=>{if(typeof sessionStorage>"u")return null;try{const Ce=`${n$7}${be}`,Se=sessionStorage.getItem(Ce);if(!Se)return null;const Te=JSON.parse(Se),Re=Te.timestamp||0;return Date.now()-Re>u$e?(sessionStorage.removeItem(Ce),null):Te.user}catch(Ce){return console.error(`Failed to load user cache for did ${be}:`,Ce),null}},m$b=(be,Ce)=>{if(!(typeof sessionStorage>"u"))try{const Se=`${n$7}${be}`,Te={user:Ce,timestamp:Date.now()};sessionStorage.setItem(Se,JSON.stringify(Te))}catch(Se){console.error(`Failed to save user cache for did ${be}:`,Se)}};function g$c(be){if(!be)return null;let Ce="";return be.fullName?Ce=be.fullName.charAt(0).toUpperCase():be.email?Ce=be.email.split("@")[0].charAt(0).toUpperCase():Ce=be.did?be.did.charAt(0).toUpperCase():"?",Ce}function S$5(be){if(!be||typeof be!="string")return!1;try{const Ce=libExports$3.toTypeInfo(be);return Ce.role!==void 0&&Ce.role!==libExports$4.types.RoleType.ROLE_APPLICATION}catch(Ce){return console.error("Failed to check if did is user did:",Ce),!1}}async function I$7(be){if(!be)return null;const Ce=f$7(be);if(Ce)return Ce;if(!s$a)return null;try{const Se=await s$a.user.getUserPublicInfo({did:be});return Se&&m$b(be,Se),Se}catch(Se){return console.error("Failed to get user by did:",Se),null}}const N$4=(be,Ce=48,Se=void 0,Te=void 0,Re=!1)=>{const ke=Le=>{Te?.(be,Le)};if(!be.avatar){const Le=g$c(be),{className:Pe,style:Oe,alt:qe}=Se||{};return jsxRuntimeExports.jsx(Avatar,{onClick:ke,className:Pe,style:Oe,alt:qe,sx:{width:Ce,height:Ce,fontSize:Ce*.4,cursor:Re||Te?"pointer":"default"},variant:"circular",children:Le})}return jsxRuntimeExports.jsx(Box,{className:"user-card__avatar",sx:{display:"flex"},children:jsxRuntimeExports.jsx($$5,{size:Ce,did:be.did,variant:"circle",style:{cursor:Re||Te?"pointer":"default"},onClick:ke,src:be.avatar,alt:be.fullName||"",...Se||{}})})},_$1=(be,Ce=120)=>be?jsxRuntimeExports.jsx(Box,{sx:{maxWidth:Ce},className:"user-card__top-right-content",children:be()}):null;function x$8({user:be,avatarSize:Ce,shouldShowHoverCard:Se,renderCardContent:Te=void 0,tooltipTitle:Re=void 0,tooltipProps:ke=void 0,avatarProps:Le=void 0,onAvatarClick:Pe}){const Oe=N$4(be,Ce,Le,Pe,Se||!!Re);return Re?jsxRuntimeExports.jsx(Tooltip,{enterDelay:200,title:Re,placement:"bottom",...ke??{},children:Oe}):Se?jsxRuntimeExports.jsx(Tooltip,{enterDelay:200,title:Te?Te():null,placement:"bottom",arrow:!1,...ke??{},slotProps:{popper:{sx:{"& .MuiTooltip-tooltip":{backgroundColor:"transparent",p:0,maxWidth:500,zIndex:1e3}}}},slots:{transition:Zoom},children:Oe}):Oe}function u$d(be){const{user:Ce,infoType:Se,avatarSize:Te=48,shouldShowHoverCard:Re=!1,renderCardContent:ke,...Le}=be;return Se===a$9.NameOnly?jsxRuntimeExports.jsx(x$8,{user:Ce,avatarSize:Te,shouldShowHoverCard:!1,renderCardContent:ke,tooltipTitle:Ce.fullName||Ce.email||Ce.did,...Le}):jsxRuntimeExports.jsx(x$8,{user:Ce,avatarSize:Te,shouldShowHoverCard:Re,renderCardContent:ke,...Le})}function c$5(be){const{user:Ce,avatarSize:Se=48,onAvatarClick:Te}=be;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[N$4(Ce,Se,be.avatarProps,Te),jsxRuntimeExports.jsx(Typography,{variant:"body1",children:Ce.fullName||Ce.email||Ce.did})]})}function p$9(be,Ce=10){return be?be.length<=Ce?be:`${be.slice(0,Ce-1)}...${be.slice(-2)}`:""}function s$9({children:be,maxLength:Ce=10,sx:Se=void 0,hiddenTip:Te=!1}){const Re=reactExports.useMemo(()=>p$9(be,Ce),[be,Ce]);return be?.length<=Ce?jsxRuntimeExports.jsx(Typography,{sx:Se,children:be}):Te?jsxRuntimeExports.jsx(Typography,{sx:Se,children:Re}):jsxRuntimeExports.jsx(Tooltip,{title:be,placement:"top",children:jsxRuntimeExports.jsx(Typography,{sx:Se,children:Re})})}function W$2({...be}){const{user:Ce,showDid:Se,didProps:Te,avatarSize:Re,shouldShowHoverCard:ke,renderCardContent:Le,renderTopRightContent:Pe,topRightMaxWidth:Oe,avatarProps:qe,shortenLabelProps:je,renderName:Fe,...He}=be;return jsxRuntimeExports.jsxs(Box,{className:"user-card__avatar-content",sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:1,flex:1,minWidth:0},children:[jsxRuntimeExports.jsx(x$8,{user:Ce,avatarSize:Re,shouldShowHoverCard:ke,renderCardContent:Le,avatarProps:qe,...He}),jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Typography,{variant:"subtitle1",className:"user-card__full-name-label",noWrap:!0,sx:{fontWeight:500,color:"text.primary",fontSize:18,lineHeight:1.1},children:Fe?Fe(Ce):jsxRuntimeExports.jsx(s$9,{sx:{fontWeight:500},...je,children:Ce.fullName||Ce.email||Ce.did})}),Se&&Ce.did?jsxRuntimeExports.jsx($e,{did:Ce.did,size:14,copyable:!0,compact:!0,locale:"en",sx:{lineHeight:1.5},...Te??{}}):null]})]}),_$1(Pe,Oe)]})}const D$4=reactExports.memo(W$2),data$y={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-3h.01"/><path d="M11 12h1v4h1"/></g>'},L$5=be=>reactExports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...be},reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.772 2.0002C14.3605 1.98785 13.0021 2.53434 11.9889 3.51979L11.9786 3.52995L10.4736 5.0366C10.0833 5.42734 10.0837 6.06051 10.4745 6.45081C10.8652 6.84111 11.4984 6.84074 11.8887 6.44999L13.3881 4.9488C14.0246 4.33227 14.8741 3.99242 15.7545 4.00013C16.6371 4.00785 17.4828 4.36431 18.1091 4.99495C18.7356 5.62581 19.0921 6.48066 19.0999 7.37575C19.1076 8.26812 18.7679 9.12664 18.1559 9.76782L15.5375 12.4045L15.5374 12.4046C15.1949 12.7496 14.7832 13.016 14.3305 13.186C13.8777 13.3561 13.3942 13.4261 12.9126 13.3913C12.4309 13.3566 11.962 13.218 11.5377 12.9845C11.1133 12.751 10.7432 12.428 10.4528 12.037C10.1234 11.5937 9.49706 11.5012 9.0537 11.8306C8.61035 12.1599 8.51791 12.7863 8.84723 13.2296C9.30832 13.8504 9.89697 14.3645 10.5736 14.7368C11.2503 15.1091 11.9989 15.3306 12.7687 15.3862C13.5385 15.4417 14.311 15.3298 15.0338 15.0583C15.7565 14.7868 16.4122 14.3622 16.9567 13.8138L16.9568 13.8136L19.5815 11.1705L19.5937 11.1581C20.5719 10.1382 21.112 8.77356 21.0998 7.35849C21.0876 5.94342 20.524 4.58841 19.5282 3.58568C18.5323 2.58272 17.1835 2.01256 15.772 2.0002ZM10.3313 7.71385C9.5615 7.65833 8.78897 7.7702 8.06622 8.0417C7.34353 8.31317 6.68782 8.73776 6.14332 9.28624L6.14319 9.28637L3.51847 11.9295L3.50633 11.9419C2.52811 12.9618 1.98799 14.3264 2.0002 15.7415C2.01241 17.1566 2.57601 18.5116 3.57176 19.5143C4.56774 20.5173 5.91651 21.0874 7.32798 21.0998C8.73945 21.1121 10.0979 20.5657 11.1111 19.5802L11.1235 19.568L12.6197 18.0613C13.0088 17.6695 13.0066 17.0363 12.6147 16.6471C12.2228 16.258 11.5897 16.2602 11.2005 16.6521L9.71087 18.1522C9.07455 18.7681 8.2254 19.1076 7.34548 19.0999C6.46286 19.0921 5.61715 18.7357 4.9909 18.1051C4.36443 17.4742 4.00785 16.6193 4.00013 15.7242C3.99243 14.8319 4.3321 13.9734 4.94412 13.3322L7.56246 10.6955L7.56259 10.6954C7.90506 10.3504 8.31675 10.084 8.76952 9.91396C9.22227 9.74389 9.70581 9.67393 10.1874 9.70866C10.6691 9.7434 11.138 9.88205 11.5623 10.1155C11.9867 10.349 12.3568 10.672 12.6472 11.063C12.9766 11.5063 13.6029 11.5987 14.0463 11.2694C14.4896 10.9401 14.5821 10.3137 14.2528 9.87036C13.7917 9.24963 13.203 8.73549 12.5264 8.36322C11.8497 7.99093 11.1011 7.76936 10.3313 7.71385Z",fill:"#4B5563"})),l$j=be=>reactExports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...be},reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.63384C6 5.4262 6.25495 5 6.91364 5H17.0907C17.7494 5 18.0043 5.4262 18.0043 5.63384V18.7046C18.0043 18.9122 17.7494 19.3384 17.0907 19.3384H6.91364C6.25495 19.3384 6 18.9122 6 18.7046V5.63384ZM6.91364 3C5.45858 3 4 4.03679 4 5.63384V18.7046C4 20.3016 5.45858 21.3384 6.91364 21.3384H17.0907C18.5458 21.3384 20.0043 20.3016 20.0043 18.7046V5.63384C20.0043 4.03679 18.5458 3 17.0907 3H6.91364ZM11.8775 18.0375C12.9664 18.0375 13.8492 17.1548 13.8492 16.0658C13.8492 14.9768 12.9664 14.0941 11.8775 14.0941C10.7885 14.0941 9.90575 14.9768 9.90575 16.0658C9.90575 17.1548 10.7885 18.0375 11.8775 18.0375Z",fill:"#4B5563"})),C$7=be=>reactExports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...be},reactExports.createElement("path",{d:"M17.5101 4.44495C19.0706 5.97732 19.9631 8.04564 19.9989 10.2126C20.0347 12.3795 19.2109 14.4751 17.7018 16.0564L17.5101 16.2512L13.5029 20.1856C12.9945 20.6847 12.3119 20.9752 11.5935 20.9985C10.875 21.0217 10.1745 20.7759 9.63366 20.3109L9.49766 20.1856L5.48954 16.2502C3.89552 14.6848 3 12.5615 3 10.3476C3 8.13368 3.89552 6.01043 5.48954 4.44495C7.08357 2.87948 9.24554 2 11.4998 2C13.7541 2 15.9161 2.87948 17.5101 4.44495ZM11.4998 7.56508C11.1278 7.56508 10.7593 7.63705 10.4156 7.77689C10.0718 7.91672 9.75951 8.12168 9.49641 8.38006C9.23332 8.63844 9.02462 8.94518 8.88224 9.28277C8.73985 9.62037 8.66657 9.98219 8.66657 10.3476C8.66657 10.713 8.73985 11.0748 8.88224 11.4124C9.02462 11.75 9.23332 12.0568 9.49641 12.3151C9.75951 12.5735 10.0718 12.7785 10.4156 12.9183C10.7593 13.0581 11.1278 13.1301 11.4998 13.1301C12.2513 13.1301 12.9719 12.837 13.5032 12.3151C14.0346 11.7933 14.3331 11.0856 14.3331 10.3476C14.3331 9.60963 14.0346 8.90188 13.5032 8.38006C12.9719 7.85824 12.2513 7.56508 11.4998 7.56508Z",stroke:"#4B5563",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),l$i=be=>reactExports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...be},reactExports.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.6094 5.11861C11.712 5.04162 11.8369 5 11.9652 5C12.0935 5 12.2184 5.04162 12.321 5.11861L18.3442 9.636L12.1855 14.2981C12.1025 14.3594 12.0265 14.3789 11.9652 14.3789C11.9039 14.3789 11.8279 14.3594 11.745 14.2981L5.58619 9.636L11.6094 5.11861ZM3.52321 8.81025C3.40155 8.87613 3.29168 8.96845 3.20274 9.08595C3.00866 9.34234 2.95698 9.66207 3.0346 9.95026C3.01168 10.0893 3.00006 10.2304 3.00006 10.3721V18.3372C3.00006 19.025 3.27325 19.6845 3.75954 20.1708C4.24583 20.6571 4.90537 20.9303 5.59309 20.9303H18.3373C19.0251 20.9303 19.6846 20.6571 20.1709 20.1708C20.6572 19.6845 20.9304 19.025 20.9304 18.3372V10.3721C20.9304 10.2294 20.9186 10.0885 20.8957 9.95059C20.9735 9.66232 20.9219 9.34244 20.7277 9.08595C20.638 8.96744 20.527 8.87455 20.4041 8.80856C20.2605 8.61869 20.0907 8.44775 19.8983 8.30153L19.8983 8.30151L19.8932 8.29769L13.521 3.5186C13.0722 3.18197 12.5263 3 11.9652 3C11.4042 3 10.8582 3.18197 10.4094 3.5186L4.03727 8.29769C3.8421 8.44406 3.66922 8.61676 3.52321 8.81025ZM18.9304 11.7007V18.3372C18.9304 18.4945 18.8679 18.6454 18.7567 18.7566C18.6455 18.8678 18.4946 18.9303 18.3373 18.9303H5.59309C5.43581 18.9303 5.28496 18.8678 5.17375 18.7566C5.06253 18.6454 5.00006 18.4945 5.00006 18.3372V11.7007L10.5412 15.8953L10.5412 15.8954L10.5467 15.8994C10.9548 16.204 11.4466 16.3789 11.9652 16.3789C12.4838 16.3789 12.9757 16.204 13.3838 15.8994L13.3838 15.8994L13.3892 15.8953L18.9304 11.7007Z",fill:"#4B5563"})),C$6=be=>reactExports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...be},reactExports.createElement("path",{d:"M12 7.5V12L15.0615 15.0615M4 12C4 13.0506 4.20693 14.0909 4.60896 15.0615C5.011 16.0321 5.60028 16.914 6.34315 17.6569C7.08601 18.3997 7.96793 18.989 8.93853 19.391C9.90914 19.7931 10.9494 20 12 20C13.0506 20 14.0909 19.7931 15.0615 19.391C16.0321 18.989 16.914 18.3997 17.6569 17.6569C18.3997 16.914 18.989 16.0321 19.391 15.0615C19.7931 14.0909 20 13.0506 20 12C20 10.9494 19.7931 9.90914 19.391 8.93853C18.989 7.96793 18.3997 7.08601 17.6569 6.34315C16.914 5.60028 16.0321 5.011 15.0615 4.60896C14.0909 4.20693 13.0506 4 12 4C10.9494 4 9.90914 4.20693 8.93853 4.60896C7.96793 5.011 7.08601 5.60028 6.34315 6.34315C5.60028 7.08601 5.011 7.96793 4.60896 8.93853C4.20693 9.90914 4 10.9494 4 12Z",stroke:"#4B5563",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));requireEn$1();defaultDayjs.extend(k$7);defaultDayjs.extend(B$6);defaultDayjs.extend(localizedFormatPlugin);const g$b=defaultDayjs.tz.guess(),x$7=be=>be>=0&&be<6?{phase:"dawn",icon:"🌒"}:be>=6&&be<12?{phase:"morning",icon:"🌞"}:be>=12&&be<18?{phase:"afternoon",icon:"🌞"}:{phase:"night",icon:"🌒"};function y$8(be=g$b,Ce="zh"){const Se=reactExports.useCallback(()=>{const ke=Ce==="zh"?"zh-cn":"en",Le=Ce==="zh"?"zh-cn":"en-us";defaultDayjs.locale(ke);const Pe=defaultDayjs().tz(be),Oe=Pe.hour(),{phase:qe,icon:je}=x$7(Oe);return{formattedTime:Pe.format("LT"),fullDateTime:Et$1(Pe.toDate(),{tz:be,locale:Le}),phase:qe,icon:je,rawTime:Pe}},[be,Ce]),[Te,Re]=reactExports.useState(Se());return reactExports.useEffect(()=>{Re(Se());const ke=setInterval(()=>{Re(Se())},6e3);return()=>{clearInterval(ke)}},[be,Ce,Se]),Te}const u$c={en:{localTime:"Local Time",timezonePhase:{dawn:"AM",morning:"AM",afternoon:"PM",night:"PM"}},zh:{localTime:"本地时间",timezonePhase:{dawn:"凌晨",morning:"上午",afternoon:"下午",night:"晚上"}}};function P$4({value:be,...Ce}){const{locale:Se}=T$9()||{locale:"en"},Te=useMemoizedFn((ke,Le={})=>p$a(u$c,ke,Se,"en",Le)),Re=y$8(be,Se);return jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:1,justifyContent:"flex-start",overflow:"hidden",width:"100%"},children:[jsxRuntimeExports.jsx(Typography,{...Ce,noWrap:!0,component:"span",sx:{flex:"0 1 auto",minWidth:0,...Ce.sx},children:be}),jsxRuntimeExports.jsx(Tooltip,{enterDelay:200,title:jsxRuntimeExports.jsxs("span",{children:[Te("localTime")," ",Re.fullDateTime]}),placement:"top",arrow:!0,children:jsxRuntimeExports.jsxs(Typography,{component:"span",noWrap:!0,sx:{fontSize:14,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:"0 0 auto",maxWidth:"100%"},children:["(",Se==="zh"?`${Te(`timezonePhase.${Re.phase}`)} `:"",Re.formattedTime,")"]})})]})}const Z$4={timezone:C$6,email:l$i,phone:l$j,location:C$7,link:L$5};function q$3(be){return withoutProtocol(be)}function x$6(be){return be?{filter:"brightness(0) saturate(100%) invert(1)"}:{}}const p$8={width:16,height:16};function H$6({value:be}){const Ce=useTheme().palette.mode==="dark";return jsxRuntimeExports.jsxs(Box,{className:"user-card__timezone-field",sx:{display:"flex",alignItems:"center",gap:1},children:[jsxRuntimeExports.jsx(C$6,{...p$8,style:x$6(Ce)}),jsxRuntimeExports.jsx(P$4,{value:be,variant:"body2",color:"grey.800"})]})}function J$1({value:be}){const Ce=useTheme().palette.mode==="dark";return jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"center",gap:1,className:"user-card__link-field",children:[jsxRuntimeExports.jsx(L$5,{...p$8,style:x$6(Ce)}),jsxRuntimeExports.jsx(v$7,{variant:"body2",color:"grey.800",children:jsxRuntimeExports.jsx(Typography,{component:"a",href:be,style:{textDecoration:"none",color:"inherit",fontSize:"inherit"},target:"_blank",variant:"body2",rel:"noopener noreferrer",sx:{color:"grey.800"},children:q$3(be)})})]})}function N$3({field:be,value:Ce,children:Se=null}){const Te=Z$4[be],Re=useTheme().palette.mode==="dark",ke=x$6(Re);return jsxRuntimeExports.jsxs(Box,{className:`user-card__${be}-field`,sx:{display:"flex",alignItems:"center",gap:1},children:[Te?jsxRuntimeExports.jsx(Te,{...p$8,style:ke}):jsxRuntimeExports.jsx(Icon,{icon:data$y,...p$8,...ke}),jsxRuntimeExports.jsx(v$7,{variant:"body2",color:"grey.800",children:Se??Ce})]},be)}function le$2({user:be,renderFields:Ce=void 0}){const Se=useCreation(()=>Ce??["bio","email","phone","location","timezone","link"],[Ce]),Te=useCreation(()=>Se.includes("bio"),[Se]),Re=useCreation(()=>be.metadata??{joinedAt:be?.createdAt,email:be?.email,phone:{country:"cn",phoneNumber:be?.phone??""}},[be]),ke=useCreation(()=>be.address,[be.address]),Le=reactExports.useCallback(He=>{if(!He)return"";switch(He){case"bio":return be.metadata?.bio||"";case"email":return Re.email||be.email||"";case"phone":return Re.phone?.phoneNumber||be.phone||"";case"location":return ke?.city||Re.location||"";case"timezone":return Re.timezone||"";case"link":return Re.links?.map(Ge=>Ge.url).filter(Boolean)||[];default:return be[He]||""}},[be,Re,ke]),{effectiveRenderCount:Pe}=reactExports.useMemo(()=>{const He=Se.filter(Ke=>{if(Ke==="bio")return!1;const Je=Le(Ke);return Je==null||Je===""?!1:isArray$1(Je)?Je.length>0:String(Je).trim().length>0}),Ge=He.reduce((Ke,Je)=>{const Ze=Le(Je);return Ke+(Array.isArray(Ze)?Ze.filter(Ye=>Ye&&String(Ye).trim()).length:1)},0);return{visibleFields:He,effectiveRenderCount:Ge}},[Se,Le]),Oe=Pe>4,qe=useMemoizedFn(He=>He!=null&&String(He).trim().length>0),je=reactExports.useMemo(()=>{const He=[];return Se.forEach(Ge=>{if(Ge==="bio")return;const Ke=Le(Ge);Ke&&(isArray$1(Ke)?Ke.forEach((Je,Ze)=>{qe(Je)&&He.push({field:Ge,value:Je,key:`${Ge}-${Ze}`})}):qe(Ke)&&He.push({field:Ge,value:Ke,key:Ge}))}),He},[Se,Le,qe]);if(Se.length===0)return null;const Fe=He=>{const{field:Ge,value:Ke,key:Je}=He;switch(Ge){case"link":return jsxRuntimeExports.jsx(J$1,{value:Ke},Je);case"timezone":return jsxRuntimeExports.jsx(H$6,{value:Ke},Je);case"email":return jsxRuntimeExports.jsx(N$3,{field:Ge,value:Ke,children:jsxRuntimeExports.jsx(Typography,{component:"a",href:`mailto:${Ke}`,rel:"noopener noreferrer",referrerPolicy:"no-referrer",style:{color:"inherit",textDecoration:"none",fontSize:"inherit"},children:Ke})});default:return jsxRuntimeExports.jsx(N$3,{field:Ge,value:Ke},Je)}};return jsxRuntimeExports.jsxs(Box,{className:"user-card__basic-content",sx:{mt:1,display:"flex",flexDirection:"column",gap:1.5},children:[Te&&be.metadata?.bio&&jsxRuntimeExports.jsx(v$7,{variant:"body2",color:"grey.800",className:"user-card__bio-field",children:be.metadata.bio}),Oe?jsxRuntimeExports.jsx(Grid$1,{container:!0,spacing:.5,children:je.map(He=>jsxRuntimeExports.jsx(Grid$1,{size:6,children:Fe(He)},He.key))}):jsxRuntimeExports.jsx(Box,{sx:{display:"flex",flexDirection:"column",gap:.5},children:je.map(He=>Fe(He))})]})}const v$7=styled$3(Typography)`
526
526
  flex: 1;
527
527
  display: -webkit-box;
528
528
  line-height: 1.5;
@@ -2880,4 +2880,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2880
2880
  padding-top: 16px;
2881
2881
  ${be=>be.scrollable?"":"overflow: hidden"};
2882
2882
  }
2883
- `;function GlobalSubscriber(){const{t:be}=T$9(),{session:Ce}=useSessionContext$1(),{info:Se,refresh:Te}=useNodeContext();return useSubscription(constantExports.TeamEvents.userUpdated,({teamDid:Re,user:ke})=>{Re===Se.did&&ke&&!ke.approved&&Ce&&Ce.user&&Ce.user.did===ke.did&&(H$7.warning(be("session.blockAccess"),{autoHideDuration:10*1e3}),Ce.logout())}),useSubscription(constantExports$1.EVENTS.NOTIFICATION_CREATE,Re=>{Re.entityType==="node"&&Te({silent:!0})}),useSubscription(constantExports$1.EVENTS.NODE_UPDATED,()=>{Te({silent:!0})}),null}const authorize=({user:be,launchType:Ce,nftId:Se})=>{if(!be)return!1;if(Ce==="serverless"){if(!Se)throw new Error("nftId is required");return be?.controller?.nftId===Se}return(be.permissions||[]).includes("mutate_blocklets")},isServerlessBlockletInstalled=be=>be.isGetBlocklet&&be.runtimeBlocklet?.controller?.consumedAt,getRestoredAccessUrl=async be=>{const Ce=getBlockletUrls({blocklet:be});let Se="";return Se=Ce.find(Te=>{try{const{hostname:Re}=new URL(Te);return urlEvaluationExports.isSlpDomain(Re)}catch(Re){return console.error(Re),!1}}),Se||(Se=await getAccessibleUrl(Ce)),Se},LaunchBlockletContext=reactExports.createContext({}),{Provider:Provider$1,Consumer:Consumer$1}=LaunchBlockletContext;function LaunchBlockletProvider({children:be}){const{session:Ce}=useSessionContext$1(),{t:Se}=T$9(),{api:Te,info:Re}=useNodeContext(),[ke]=useSearchParams(),Le=ke.get("launchType"),Pe=ke.get("fromLauncher"),Oe=ke.get("blocklet_meta_url")||"",qe=ke.get("nftId")||"",je=ke.get("from")||"",Fe=ke.get("launcherSessionId")||"",He=ke.get("launcherUrl")||"",Ge=je==="url",Ke=je==="empty",Je=Ge||Ke?"":new URL(Oe).origin,[Ze,Ye]=reactExports.useState({meta:null,appDid:ke.get("appDid")||null,sessionId:ke.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),tt=(it,ut)=>Ye(gt=>({...gt,appDid:it,sessionId:ut})),nt=authorize({user:Ce.user,launchType:Le,nftId:qe}),[rt,ot]=reactExports.useState(null),[ft,St]=reactExports.useState(!0),Ct=reactExports.useMemo(()=>Re?getServerUrl(Re):"",[Re]),Ht=async it=>{if(!it)throw new Error("appDid should not be empty");const{blocklet:ut}=await Te.getBlocklet({input:{did:it,attachConfig:!1}});if(!ut)return null;const gt=constantExports.BlockletStatus[ut.status],Tt=!!qe,bt=gt<constantExports.BlockletStatus.installed,wt=gt===constantExports.BlockletStatus.installed,It=gt===constantExports.BlockletStatus.running;return Ye(_t=>({..._t,isInstalled:wt,isRunning:It,isExternal:Tt,isInstalling:bt})),{isInstalled:wt,isRunning:It,isExternal:Tt,isInstalling:bt}},Bt=async()=>{if(St(!0),Ke){Ye(it=>({...it,meta:{title:ke.get("title")||"",description:ke.get("description")||""}})),St(!1);return}try{if(!Oe&&!Ke)throw new Error(Se("common.invalidParam"));const[{meta:it,isFree:ut,registryUrl:gt},{launcherSession:Tt,error:bt}]=await Promise.all([Te.getBlockletMetaFromUrl({input:{url:Oe,checkPrice:!0}}),Fe?Te.getLauncherSession({input:{launcherSessionId:Fe,launcherUrl:He}}):Promise.resolve({})]);if(Fe&&!Tt)throw new Error(`Launch session invalid: ${bt}`);if(!it)throw new Error(Se("LaunchBlockletBlocklet.error.loadMetaFailed"));let wt={};nt&&Ze.appDid&&(wt=await Ht(Ze.appDid)),Ye(It=>({...It,...wt,meta:it,isFree:ut,registryUrl:gt,launcherSession:Tt}))}catch(it){console.error(it),ot(it.message)}finally{St(!1)}};reactExports.useEffect(()=>{Ce?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&Ce?.user?.controller?.nftId!==qe&&Ce.logout(),Bt()},[]),reactExports.useEffect(()=>{ft||!Ze.meta||(nt?Ze.appDid&&Ht(Ze.appDid).catch(it=>{H$7.error(it.message)}):(Ye(it=>({...it,isInstalled:!1,isRunning:!1,isExternal:!1})),ot(null)))},[nt]);const qt={meta:Ze.meta,isFree:Ze.isFree,appDid:Ze.appDid,sessionId:Ze.sessionId,isInstalling:Ze.isInstalling,isInstalled:Ze.isInstalled,isExternal:Ze.isExternal,isRunning:Ze.isRunning,serverUrl:Ct,storeUrl:Ze.registryUrl||Je,blockletMetaUrl:Oe,fromLauncher:Pe,loading:ft,error:rt,api:Te,getBlocklet:Ht,setAppDid:tt,launcherUrl:He,launcherSession:Ze.launcherSession,launcherSessionId:Fe,launchType:Le};return jsxRuntimeExports.jsx(Provider$1,{value:qt,children:be})}function useLaunchBlockletContext(){return reactExports.useContext(LaunchBlockletContext)}var useAsyncExports=requireUseAsync();const useAsync=getDefaultExportFromCjs$1(useAsyncExports);function useQuery(){return new URLSearchParams(useLocation().search)}const BlockletAppContext=reactExports.createContext(),{Provider,Consumer}=BlockletAppContext;function BlockletAppProvider({children:be}){const Se=useQuery().get("blocklet_meta_url"),Te=useAsync(async()=>{const{data:ke}=await axios.get(Se);return ke});if(Te.loading)return jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const Re={meta:Te.value,error:Te.error};return jsxRuntimeExports.jsx(Provider,{value:Re,children:be})}BlockletAppProvider.propTypes={children:o$g.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-DgeSWvC7.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-BJFK1iYB.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,2,31,32,33,34,35,36,37,38]),import.meta.url)),BlockletRestore=reactExports.lazy(()=>__vitePreload(()=>import("./index-CGnZOo7d.js"),__vite__mapDeps([39,40,41,42,43,44,23,6,35,45,46,47,19,15]),import.meta.url)),BlockletStore=reactExports.lazy(()=>__vitePreload(()=>import("./index-C4ni3qSD.js"),__vite__mapDeps([48,6,49,50,51,17,15,52,31,32,53,54,36,35,55,45,56,4,19,23,24,25,57,58,26,59,60]),import.meta.url)),Settings=reactExports.lazy(()=>__vitePreload(()=>import("./index-DRXdQRdu.js"),__vite__mapDeps([61,62,59,63,64,65,26,7,8,9,10,11,12,13,14,15,16,17,18,19,66,21,56,4,2,67,6,68,69,70,36,20,71,51,72,73,74,75,76]),import.meta.url)),LogPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-BQ9Ts5av.js"),__vite__mapDeps([77,78,24,25,79,6]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CjyGkLY6.js"),__vite__mapDeps([80,62,81,15,16,17,18,6,82,83,84,85,86,52,21,87,36,88,7,8,9,10,11,12,13,14,19,89,90,26,4,91,92,76,2,53,45,93,94,95,96,97,44,37,24,25,98,30,99,100,101,72,102,103,1,56,104,105]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-nzbwZA_l.js"),__vite__mapDeps([106,62,20,21,22,6,19,23,24,25,26,52,107,86,60]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-a0VOLesk.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-CkVoL_FA.js"),[],import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-vh4u80PB.js"),__vite__mapDeps([108,109,107,94,10,110,95,111,23]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-MeuqPgEE.js"),__vite__mapDeps([112,88,55,94,10,111,23,34]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-Crckurao.js"),__vite__mapDeps([113,111,23]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-51UuxJbA.js"),__vite__mapDeps([114,41,42,43,44,104,105,115,82,83,84,23,28,29,47,38,6,67,58]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CbZ9lYQN.js"),__vite__mapDeps([116,107]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-Ur2CzPm7.js"),__vite__mapDeps([117,109,107,94,10,110,95,111]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-DodEGet5.js"),[],import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-MAh0KZHB.js"),__vite__mapDeps([118,62,119,120,50,51,121,13,122,123,91,92,9,76,7,8,10,11,12,14,15,16,17,18,19,124,125,74,6,101,25]),import.meta.url)),GenKeyPair=reactExports.lazy(()=>__vitePreload(()=>import("./index-_ISHsU4A.js"),__vite__mapDeps([126,107]),import.meta.url));function useSharedContext(){const be=useNodeContext(),{session:Ce}=useSessionContext$1(),{wallet:Se}=d$e(),Te=Ce.user&&Ce.user.did;return reactExports.useEffect(()=>{const Re=getWsClient();return Te?Re.connect():Re.isConnected()&&Re.disconnect(),()=>{Re.isConnected()&&Re.disconnect()}},[Te]),reactExports.useEffect(()=>{if(Se)return()=>{};const Re=()=>{document.visibilityState==="visible"&&Ce.refresh()};return document.addEventListener("visibilitychange",Re),()=>{document.removeEventListener("visibilitychange",Re)}},[]),{node:be,session:Ce}}function ProtectedApp(){const{t:be}=T$9(),{node:Ce,session:Se}=useSharedContext(),Te=useLocation();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${Te.pathname}${Te.search}`)},[Te]),reactExports.useEffect(()=>{Se?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&Se.logout()},[Se?.user?.role]);const Re=jsxRuntimeExports.jsx(CircularProgress,{});if(Ce.loading||Se.loading)return jsxRuntimeExports.jsx(o$d,{children:Re});if(!Ce.info.initialized)return getAuthMethodExports.getServerAuthMethod(Ce.info)==="nft"?jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"verify-owner"}):jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(NodeConnectOwner,{})});if(Ce.info.upgradeSessionId)return jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(MaintainProgress,{})});if(!Se.user)return jsxRuntimeExports.jsx(NodeLogin,{loadingEle:Re});const ke=jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(BlockletsProvider,{children:jsxRuntimeExports.jsxs(NotificationProvider,{children:[jsxRuntimeExports.jsx(Health,{}),jsxRuntimeExports.jsx(CheckNodeStatus,{}),jsxRuntimeExports.jsx(GlobalSubscriber,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:ke,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/dashboard",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("common.blocklets"),children:jsxRuntimeExports.jsx(BlockletList,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/:did/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Blocklets",children:jsxRuntimeExports.jsx(BlockletDetail,{})})}),jsxRuntimeExports.jsx(Route,{path:"/settings/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("common.setting"),children:jsxRuntimeExports.jsx(Settings,{})})}),jsxRuntimeExports.jsx(Route,{path:"/eula",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("setup.steps.eula"),children:jsxRuntimeExports.jsx(EULAPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/store",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("common.store"),children:jsxRuntimeExports.jsx(BlockletStore,{})})}),jsxRuntimeExports.jsx(Route,{path:"/console",element:jsxRuntimeExports.jsx(DashboardRoute,{title:`GraphQL ${be("common.console")}`,scrollable:!1,fullWidth:!0,children:jsxRuntimeExports.jsx(Console,{})})}),jsxRuntimeExports.jsx(Route,{path:"/notifications",element:jsxRuntimeExports.jsx(DashboardRoute,{children:jsxRuntimeExports.jsx(Notifications,{})})}),jsxRuntimeExports.jsx(Route,{path:"/team/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("common.team"),children:jsxRuntimeExports.jsx(TeamPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/logs/:name?",element:jsxRuntimeExports.jsx(DashboardRoute,{scrollable:!1,fullWidth:!0,title:be("common.logs"),children:jsxRuntimeExports.jsx(LogPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/analytics/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("common.analytics"),children:jsxRuntimeExports.jsx(AnalyticsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(Navigate,{to:"/dashboard",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/team",element:jsxRuntimeExports.jsx(Navigate,{to:"/team/members",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/analytics",element:jsxRuntimeExports.jsx(Navigate,{to:"/analytics/traffic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/router",element:jsxRuntimeExports.jsx(Navigate,{to:"/router/rules",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/settings",element:jsxRuntimeExports.jsx(Navigate,{to:"/settings/basic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace",element:jsxRuntimeExports.jsx(Navigate,{to:"/store",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace/:did",element:jsxRuntimeExports.jsx(Navigate,{to:"/store/:did",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})]})})}function UnprotectedWrapper({children:be}){const{node:Ce,session:Se}=useSharedContext();return Ce.loading||!Se.initialized&&Se.loading?jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):Ce.info.upgradeSessionId?jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(MaintainProgress,{})}):be}function App(){const{changeLocale:be}=T$9(),Ce=useQuery();reactExports.useEffect(()=>{const Te=Ce.get("locale");Te&&["zh","en"].includes(Te)&&be(Te)},[]);const Se=jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:Se,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(IssuePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LostPassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(ExchangePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:"/accept-server",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"accept-server"})})}),jsxRuntimeExports.jsx(Route,{path:"/gen-key-pair/",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(GenKeyPair,{})})}),jsxRuntimeExports.jsx(Route,{path:"/launch-blocklet/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LaunchBlockletProvider,{children:jsxRuntimeExports.jsx(BlockletLauncher,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/restore/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(BlockletAppProvider,{children:jsxRuntimeExports.jsx(BlockletRestore,{})})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(Invite,{})})}),jsxRuntimeExports.jsx(Route,{path:"/*",element:jsxRuntimeExports.jsx(ProtectedApp,{})})]})})}function AppWrapper(){const be=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return jsxRuntimeExports.jsx(BrowserRouter,{history:history$1,basename:be,children:jsxRuntimeExports.jsx(Root,{children:jsxRuntimeExports.jsx(App,{})})})}const root=clientExports.createRoot(document.getElementById("root"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";register(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:prefix},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(be){console.error("Error during service worker registration:",be)}});export{$$4 as $,useNavigate as A,useSearchParams as B,CircularProgress as C,DialogContentText as D,constantExports$1 as E,useMediaQuery as F,Grid$1 as G,H$7 as H,libExports$3 as I,utilExports as J,Link$1 as K,Link as L,BlockletAppAvatar as M,Box as N,isEmpty as O,et as P,FormControl as Q,InputLabel as R,Select as S,Typography as T,MenuItem as U,Checkbox as V,WrappedDidAddress as W,Alert as X,formatError as Y,o$d as Z,CheckIcon$2 as _,useSubscription as a,Menu as a$,propTypesExports as a0,api as a1,merge as a2,cloneDeep as a3,IconButton as a4,R$4 as a5,ListItemSecondaryAction as a6,List as a7,ListItem as a8,ListItemText as a9,getBlockletMetaUrl as aA,ErrorBoundary as aB,k$1 as aC,formatRegistryLogoPath as aD,Icon as aE,ListItemIcon as aF,createSvgIcon as aG,ensureDomainAliases as aH,getIp as aI,normalizePathPrefix as aJ,sortBy as aK,stringSortHandlerAsc as aL,getAccessUrl as aM,history$1 as aN,semver as aO,useReactive as aP,useAsyncEffect as aQ,InfoOutlinedIcon as aR,sleep as aS,checkInputByType as aT,FormControlLabel as aU,Stack$1 as aV,useAsync as aW,axios as aX,shouldCheckDomainStatus as aY,formatMountPoint as aZ,urlPathFriendly as a_,getServerUrl as aa,useBlockletAppContext as ab,getAuthMethodExports as ac,ConfirmDialog as ad,getRestoredAccessUrl as ae,setSessionToken as af,isEqual as ag,isServerlessBlockletInstalled as ah,Debug as ai,getWsClient as aj,useQuery as ak,getPathPrefix as al,Global as am,Routes as an,Route as ao,Navigate as ap,HeaderAddon as aq,SessionContext as ar,css as as,$$5 as at,formatToDatetime as au,alpha$1 as av,getLaunchAgreementUrl as aw,axios$2 as ax,useSessionContext$1 as ay,Tooltip as az,constantExports as b,composeClasses as b$,checkIsWildcardDomain as b0,Popover as b1,Card as b2,formatToDate as b3,sortDomains as b4,M$7 as b5,Collapse as b6,CheckCircle as b7,styled as b8,isUrl as b9,isInstalling as bA,Badge as bB,createAppPassportSvg as bC,NavLink as bD,__vitePreload as bE,SetCache as bF,arrayIncludes$1 as bG,arrayIncludesWith as bH,cacheHas as bI,baseUniq as bJ,baseFlatten as bK,baseRest as bL,last as bM,arrayFilter as bN,isArrayLikeObject as bO,t$9 as bP,isDownloading as bQ,getBlockletUrl as bR,getBlockletUrlParams as bS,ButtonBase as bT,memoTheme as bU,emphasize as bV,generateUtilityClasses$1 as bW,generateUtilityClass$1 as bX,useDefaultProps as bY,useSlotProps as bZ,clsx$1 as b_,__awaiter as ba,__generator as bb,__spread as bc,getDefaultExportFromCjs$1 as bd,U$4 as be,dayjs as bf,Divider as bg,isCertificateMatch as bh,FormHelperText as bi,FormGroup as bj,o$a as bk,NodeContext as bl,useParams as bm,useNodeContext$1 as bn,uniqBy as bo,libExports$1 as bp,g$a as bq,a$9 as br,l$k as bs,BlockletAvatar as bt,ClickAwayListener as bu,f$9 as bv,createPassportSvg as bw,getWalletType as bx,useCreation as by,BlockletAdminRoles as bz,createCompounder as c,Q$3 as c$,__read as c0,toSlotDomain as c1,omit as c2,fixBlocklet as c3,isProtectedRole as c4,baseOrderBy as c5,isArray$1 as c6,rootShouldForwardProp as c7,useFormControl as c8,createChainedFunction$1 as c9,Container$3 as cA,K$3 as cB,getLauncherBaseURL as cC,SvgIcon as cD,Buffer$1 as cE,parseURL as cF,withHttps as cG,useLaunchBlockletContext as cH,z$3 as cI,authorize as cJ,ArrowForwardIcon as cK,isNewStoreUrl as cL,getAccessibleUrl as cM,getBlockletLogoUrl as cN,t as cO,F$6 as cP,__spreadArrays as cQ,__assign as cR,h$6 as cS,useLocation as cT,useMount as cU,e$c as cV,formatDateTime as cW,getExplorerLink as cX,patchJsxToLocale as cY,flat as cZ,en$2 as c_,useSlot as ca,capitalize$1 as cb,SwitchBase as cc,createSimplePaletteValueFilter as cd,useControlled as ce,useForkRef as cf,useId as cg,getBlockletUrls as ch,defaultCheckAccessible as ci,urlEvaluationExports as cj,memoize as ck,ButtonGroupContext as cl,ButtonGroupButtonContext as cm,useNotificationContext as cn,utilExports$1 as co,NotificationList as cp,useRequest as cq,useMemoizedFn as cr,isNumber$3 as cs,useLatest as ct,defaultDayjs as cu,d$e as cv,Avatar as cw,isFromWallet as cx,usePassportId as cy,isFunction$2 as cz,useBlockletsContext as d,auto as d$,getSessionToken as d0,LinearProgress as d1,SvgLogo as d2,isNumber$1 as d3,useEnhancedEffect$1 as d4,debounce$2 as d5,ownerWindow as d6,useRtl as d7,KeyboardArrowLeft as d8,KeyboardArrowRight as d9,require$$3$1 as dA,requireConstant$1 as dB,$e as dC,noop$1 as dD,Button as dE,Paper as dF,MenuList as dG,Popper as dH,_inheritsLoose$1 as dI,ReactDOM as dJ,_objectWithoutPropertiesLoose$1 as dK,TransitionGroup as dL,ENTERED as dM,ENTERING as dN,EXITING as dO,TransitionGroupContext as dP,Transition as dQ,config$1 as dR,popperGenerator as dS,eventListeners as dT,popperOffsets$1 as dU,computeStyles$1 as dV,applyStyles$1 as dW,afterMain as dX,afterRead as dY,afterWrite as dZ,arrow$1 as d_,useEventCallback$1 as da,ownerDocument as db,m$d as dc,requireReact as dd,o$f as de,oe$1 as df,ne$2 as dg,InfoIcon$2 as dh,upperFirst as di,camelCase as dj,Skeleton as dk,R$5 as dl,isArrayLike as dm,baseIteratee as dn,keys as dp,toInteger as dq,baseFindIndex as dr,commonjsGlobal as ds,getAugmentedNamespace as dt,emotionUtils_browser_esm as du,requireJsxRuntime as dv,requirePropTypes as dw,requireReactDom as dx,isObject$3 as dy,requireUrl as dz,useAsyncRetry as e,ThemeProvider$3 as e$,basePlacements as e0,beforeMain as e1,beforeRead as e2,beforeWrite as e3,bottom as e4,clippingParents as e5,createPopper as e6,createPopper$1 as e7,detectOverflow as e8,end as e9,requireUrlPathFriendly as eA,b$9 as eB,data$w as eC,global$2 as eD,hoistStatics as eE,isEqual$3 as eF,usePreviousProps as eG,setRef as eH,ClearIcon as eI,ArrowDropDownIcon as eJ,Chip as eK,filledInputClasses as eL,inputBaseClasses as eM,outlinedInputClasses as eN,inputClasses as eO,ListContext as eP,getListItemButtonUtilityClass as eQ,listItemButtonClasses as eR,emotionReact_browser_esm as eS,emotionCache_browser_esm as eT,cloneDeep$1 as eU,forceReflow as eV,_extends$2 as eW,toString$2 as eX,deepmerge$1 as eY,StyledEngineProvider as eZ,ThemeProvider as e_,flip$1 as ea,hide$1 as eb,left as ec,main as ed,modifierPhases as ee,offset$1 as ef,placements as eg,popper as eh,preventOverflow$1 as ei,read as ej,reference as ek,right as el,start as em,top as en,variationPlacements as eo,viewport as ep,write as eq,requireReactIs as er,emotionStyled_browser_esm as es,emotionSerialize_esm as et,emotionSheet_esm as eu,process$1 as ev,requireLib$3 as ew,requireLib$4 as ex,requireLib$2 as ey,requireConstant$2 as ez,useTheme as f,shouldForwardProp as f$,s$2 as f0,CloseIcon as f1,isString$1 as f2,__spreadArray as f3,useEventListener as f4,ae$4 as f5,getTargetElement as f6,createTheme as f7,createAxios as f8,pick as f9,formatTime as fA,CloseFullscreenIcon as fB,S$8 as fC,TablePagination as fD,parseAvatar as fE,tmp as fF,useUpdate as fG,Q$4 as fH,I$5 as fI,p$a as fJ,Z$1 as fK,requireUtil$6 as fL,requireObjectKeys$1 as fM,requireShams$1 as fN,requireCallBound as fO,requireEsObjectAtoms as fP,requireDefineDataProperty as fQ,requireHasPropertyDescriptors as fR,requireCallBind as fS,requireCallBound$1 as fT,requireSafeBuffer$1 as fU,requireBrowser$f as fV,requireElliptic as fW,requireCryptoBrowserify as fX,requireRipemd160 as fY,requireLib$1 as fZ,requireUtil as f_,omitBy as fa,MenuIcon as fb,useDebounceFn as fc,Dialog as fd,OutlinedInput as fe,data as ff,Drawer as fg,parseQuery as fh,parseFilename as fi,stringifyParsedURL as fj,Grow as fk,Wt as fl,InputAdornment as fm,tooltipClasses as fn,e$9 as fo,requireEngine as fp,clamp as fq,extractEventHandlers as fr,isFocusVisible as fs,isHostComponent as ft,lighten as fu,darken as fv,slotShouldForwardProp as fw,requireNormalizePathPrefix as fx,debounce as fy,useInterval as fz,g$e as g,d$f as g$,resolveComponentProps as g0,l as g1,getInviteLink as g2,copy as g3,e$b as g4,getIssuePassportLink as g5,uniqBy$1 as g6,isNodeOwner as g7,isSelf as g8,Q$1 as g9,requireBrowser$3 as gA,require$$3 as gB,useTimeout as gC,Fade as gD,FocusTrap as gE,DialogActions as gF,dialogClasses as gG,DialogContent as gH,localizedFormatPlugin as gI,n$8 as gJ,purify as gK,Buffer$1$1 as gL,Q$2 as gM,resolveProps as gN,useThemeProps as gO,defaultTheme$1 as gP,THEME_ID as gQ,l$a as gR,isIndex as gS,useTheme$4 as gT,objectAssign as gU,__extends as gV,isServerless as gW,isFunction$1 as gX,omit$1 as gY,TableContext as gZ,Tablelvl2Context as g_,createPassportSvgExports as ga,getBlockletAccessibleUrl as gb,A$1 as gc,createPassportSvg$1 as gd,requireMs as ge,E$3 as gf,trim as gg,BlockletSDK as gh,getBlockletSDK as gi,MoreHorizIcon as gj,identity$1 as gk,arrayEach as gl,baseEach as gm,arrayMap as gn,baseMap as go,baseForOwn as gp,isPlainObject$2 as gq,require$$11 as gr,throttle$2 as gs,isUndefined$1 as gt,requireJsonStableStringify as gu,requireSemver as gv,requireBrowser$5 as gw,require$$0$1 as gx,requireIsAbsoluteUrl as gy,requireDist$2 as gz,a as h,z$2 as h$,useUnmount as h0,isDidDomainOrIpEchoDomain as h1,ExpandLess as h2,validateDomain as h3,requireDist as h4,requireAxios as h5,trim$1 as h6,requirePRetry as h7,TableCell as h8,De as h9,requireHoistNonReactStatics_cjs as hA,_assertThisInitialized$1 as hB,reactDomExports as hC,loadIcon as hD,withoutLeadingSlash as hE,fetchSvgAsPng as hF,blobToFile as hG,withoutTrailingSlash as hH,Rt as hI,_$5 as hJ,i as hK,D$8 as hL,browserExports$1 as hM,highlightExports as hN,funcExports as hO,data$y as hP,useSnackbar as hQ,common$3 as hR,green as hS,amber as hT,SnackbarContent as hU,t$1 as hV,Y as hW,f$3 as hX,b as hY,g$8 as hZ,withErrorBoundary as h_,getSystemDomains as ha,copyArray as hb,baseIndexOf as hc,keyframes as hd,pe$2 as he,useAppLogo as hf,getTransferAppLink as hg,requireBn as hh,require$$2 as hi,uniq as hj,data$s as hk,data$t as hl,data$r as hm,isNil as hn,requireBase32 as ho,Ft as hp,withTrailingSlash as hq,data$B as hr,requireAssertString as hs,isEmail as ht,isURL as hu,createUseStorageState as hv,isBrowser$1 as hw,root$1 as hx,isNil$1 as hy,require$$10 as hz,get$1 as i,M$3 as i0,ye as i1,G$1 as i2,ue as i3,useBlockletLogo as i4,isPlainObject$1 as i5,Toolbar as i6,_setPrototypeOf as i7,useEffectWithTarget$1 as i8,__values as i9,AxiosError as iA,T$a as iB,isNull as iC,orange as iD,purple as iE,useStore as iF,createStore as iG,create$1 as iH,t$f as iI,__rest as iJ,clientExports as iK,yt$1 as iL,retry as iM,isNetworkError as iN,requirePTimeout as iO,n$5 as iP,Modal as iQ,GlobalStyles$2 as iR,useSize as iS,isString$3 as ia,FormLabel as ib,RelativeTime as ic,isIncludeActivity as id,isUserActor as ie,ActorAvatar as ig,SendComponentAvatar as ih,Activity as ii,NotificationContent$1 as ij,AvatarGroup as ik,requireCjs as il,useTheme$2 as im,baseAssignValue as io,isValidClusterSize as ip,extractStatusUrlFromNextWorkflow as iq,pWaitFor as ir,hasRequiredSteps as is,getStoreList as it,flatten as iu,trimEnd as iv,DialogTitle as iw,base32Exports as ix,flatExports as iy,Et as iz,jsxRuntimeExports as j,filesize as k,formatLocale as l,T$9 as m,useSessionContext as n,o$g as o,prettyMs as p,useSetState as q,reactExports as r,styled$3 as s,TextField as t,useNodeContext as u,n$4 as v,$t as w,getWebWalletUrl as x,joinURL as y,withQuery as z};
2883
+ `;function GlobalSubscriber(){const{t:be}=T$9(),{session:Ce}=useSessionContext$1(),{info:Se,refresh:Te}=useNodeContext();return useSubscription(constantExports.TeamEvents.userUpdated,({teamDid:Re,user:ke})=>{Re===Se.did&&ke&&!ke.approved&&Ce&&Ce.user&&Ce.user.did===ke.did&&(H$7.warning(be("session.blockAccess"),{autoHideDuration:10*1e3}),Ce.logout())}),useSubscription(constantExports$1.EVENTS.NOTIFICATION_CREATE,Re=>{Re.entityType==="node"&&Te({silent:!0})}),useSubscription(constantExports$1.EVENTS.NODE_UPDATED,()=>{Te({silent:!0})}),null}const authorize=({user:be,launchType:Ce,nftId:Se})=>{if(!be)return!1;if(Ce==="serverless"){if(!Se)throw new Error("nftId is required");return be?.controller?.nftId===Se}return(be.permissions||[]).includes("mutate_blocklets")},isServerlessBlockletInstalled=be=>be.isGetBlocklet&&be.runtimeBlocklet?.controller?.consumedAt,getRestoredAccessUrl=async be=>{const Ce=getBlockletUrls({blocklet:be});let Se="";return Se=Ce.find(Te=>{try{const{hostname:Re}=new URL(Te);return urlEvaluationExports.isSlpDomain(Re)}catch(Re){return console.error(Re),!1}}),Se||(Se=await getAccessibleUrl(Ce)),Se},LaunchBlockletContext=reactExports.createContext({}),{Provider:Provider$1,Consumer:Consumer$1}=LaunchBlockletContext;function LaunchBlockletProvider({children:be}){const{session:Ce}=useSessionContext$1(),{t:Se}=T$9(),{api:Te,info:Re}=useNodeContext(),[ke]=useSearchParams(),Le=ke.get("launchType"),Pe=ke.get("fromLauncher"),Oe=ke.get("blocklet_meta_url")||"",qe=ke.get("nftId")||"",je=ke.get("from")||"",Fe=ke.get("launcherSessionId")||"",He=ke.get("launcherUrl")||"",Ge=je==="url",Ke=je==="empty",Je=Ge||Ke?"":new URL(Oe).origin,[Ze,Ye]=reactExports.useState({meta:null,appDid:ke.get("appDid")||null,sessionId:ke.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),tt=(it,ut)=>Ye(gt=>({...gt,appDid:it,sessionId:ut})),nt=authorize({user:Ce.user,launchType:Le,nftId:qe}),[rt,ot]=reactExports.useState(null),[ft,St]=reactExports.useState(!0),Ct=reactExports.useMemo(()=>Re?getServerUrl(Re):"",[Re]),Ht=async it=>{if(!it)throw new Error("appDid should not be empty");const{blocklet:ut}=await Te.getBlocklet({input:{did:it,attachConfig:!1}});if(!ut)return null;const gt=constantExports.BlockletStatus[ut.status],Tt=!!qe,bt=gt<constantExports.BlockletStatus.installed,wt=gt===constantExports.BlockletStatus.installed,It=gt===constantExports.BlockletStatus.running;return Ye(_t=>({..._t,isInstalled:wt,isRunning:It,isExternal:Tt,isInstalling:bt})),{isInstalled:wt,isRunning:It,isExternal:Tt,isInstalling:bt}},Bt=async()=>{if(St(!0),Ke){Ye(it=>({...it,meta:{title:ke.get("title")||"",description:ke.get("description")||""}})),St(!1);return}try{if(!Oe&&!Ke)throw new Error(Se("common.invalidParam"));const[{meta:it,isFree:ut,registryUrl:gt},{launcherSession:Tt,error:bt}]=await Promise.all([Te.getBlockletMetaFromUrl({input:{url:Oe,checkPrice:!0}}),Fe?Te.getLauncherSession({input:{launcherSessionId:Fe,launcherUrl:He}}):Promise.resolve({})]);if(Fe&&!Tt)throw new Error(`Launch session invalid: ${bt}`);if(!it)throw new Error(Se("LaunchBlockletBlocklet.error.loadMetaFailed"));let wt={};nt&&Ze.appDid&&(wt=await Ht(Ze.appDid)),Ye(It=>({...It,...wt,meta:it,isFree:ut,registryUrl:gt,launcherSession:Tt}))}catch(it){console.error(it),ot(it.message)}finally{St(!1)}};reactExports.useEffect(()=>{Ce?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&Ce?.user?.controller?.nftId!==qe&&Ce.logout(),Bt()},[]),reactExports.useEffect(()=>{ft||!Ze.meta||(nt?Ze.appDid&&Ht(Ze.appDid).catch(it=>{H$7.error(it.message)}):(Ye(it=>({...it,isInstalled:!1,isRunning:!1,isExternal:!1})),ot(null)))},[nt]);const qt={meta:Ze.meta,isFree:Ze.isFree,appDid:Ze.appDid,sessionId:Ze.sessionId,isInstalling:Ze.isInstalling,isInstalled:Ze.isInstalled,isExternal:Ze.isExternal,isRunning:Ze.isRunning,serverUrl:Ct,storeUrl:Ze.registryUrl||Je,blockletMetaUrl:Oe,fromLauncher:Pe,loading:ft,error:rt,api:Te,getBlocklet:Ht,setAppDid:tt,launcherUrl:He,launcherSession:Ze.launcherSession,launcherSessionId:Fe,launchType:Le};return jsxRuntimeExports.jsx(Provider$1,{value:qt,children:be})}function useLaunchBlockletContext(){return reactExports.useContext(LaunchBlockletContext)}var useAsyncExports=requireUseAsync();const useAsync=getDefaultExportFromCjs$1(useAsyncExports);function useQuery(){return new URLSearchParams(useLocation().search)}const BlockletAppContext=reactExports.createContext(),{Provider,Consumer}=BlockletAppContext;function BlockletAppProvider({children:be}){const Se=useQuery().get("blocklet_meta_url"),Te=useAsync(async()=>{const{data:ke}=await axios.get(Se);return ke});if(Te.loading)return jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const Re={meta:Te.value,error:Te.error};return jsxRuntimeExports.jsx(Provider,{value:Re,children:be})}BlockletAppProvider.propTypes={children:o$g.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-BopL1gny.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-CtqzIHrc.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,2,31,32,33,34,35,36,37,38]),import.meta.url)),BlockletRestore=reactExports.lazy(()=>__vitePreload(()=>import("./index-DCks6vHm.js"),__vite__mapDeps([39,40,41,42,43,44,23,6,35,45,46,47,19,15]),import.meta.url)),BlockletStore=reactExports.lazy(()=>__vitePreload(()=>import("./index-CEerh854.js"),__vite__mapDeps([48,6,49,50,51,17,15,52,31,32,53,54,36,35,55,45,56,4,19,23,24,25,57,58,26,59,60]),import.meta.url)),Settings=reactExports.lazy(()=>__vitePreload(()=>import("./index-aIFNWMe4.js"),__vite__mapDeps([61,62,59,63,64,65,26,7,8,9,10,11,12,13,14,15,16,17,18,19,66,21,56,4,2,67,6,68,69,70,36,20,71,51,72,73,74,75,76]),import.meta.url)),LogPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-BMjpfJjp.js"),__vite__mapDeps([77,78,24,25,79,6]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CaacW8ab.js"),__vite__mapDeps([80,62,81,15,16,17,18,6,82,83,84,85,86,52,21,87,36,88,7,8,9,10,11,12,13,14,19,89,90,26,4,91,92,76,2,53,45,93,94,95,96,97,44,37,24,25,98,30,99,100,101,72,102,103,1,56,104,105]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-VYVYEsd7.js"),__vite__mapDeps([106,62,20,21,22,6,19,23,24,25,26,52,107,86,60]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-SE-GYB_5.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-B0gFqLsw.js"),[],import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-DLek0c1M.js"),__vite__mapDeps([108,109,107,94,10,110,95,111,23]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-DDPnmngo.js"),__vite__mapDeps([112,88,55,94,10,111,23,34]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-D9724EWR.js"),__vite__mapDeps([113,111,23]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-B4EnYouc.js"),__vite__mapDeps([114,41,42,43,44,104,105,115,82,83,84,23,28,29,47,38,6,67,58]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CW3YXBwi.js"),__vite__mapDeps([116,107]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-BT8ElUR8.js"),__vite__mapDeps([117,109,107,94,10,110,95,111]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-PhxXoWyN.js"),[],import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-DAE9de69.js"),__vite__mapDeps([118,62,119,120,50,51,121,13,122,123,91,92,9,76,7,8,10,11,12,14,15,16,17,18,19,124,125,74,6,101,25]),import.meta.url)),GenKeyPair=reactExports.lazy(()=>__vitePreload(()=>import("./index-BOa0y9pw.js"),__vite__mapDeps([126,107]),import.meta.url));function useSharedContext(){const be=useNodeContext(),{session:Ce}=useSessionContext$1(),{wallet:Se}=d$e(),Te=Ce.user&&Ce.user.did;return reactExports.useEffect(()=>{const Re=getWsClient();return Te?Re.connect():Re.isConnected()&&Re.disconnect(),()=>{Re.isConnected()&&Re.disconnect()}},[Te]),reactExports.useEffect(()=>{if(Se)return()=>{};const Re=()=>{document.visibilityState==="visible"&&Ce.refresh()};return document.addEventListener("visibilitychange",Re),()=>{document.removeEventListener("visibilitychange",Re)}},[]),{node:be,session:Ce}}function ProtectedApp(){const{t:be}=T$9(),{node:Ce,session:Se}=useSharedContext(),Te=useLocation();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${Te.pathname}${Te.search}`)},[Te]),reactExports.useEffect(()=>{Se?.user?.role===constantExports$1.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&Se.logout()},[Se?.user?.role]);const Re=jsxRuntimeExports.jsx(CircularProgress,{});if(Ce.loading||Se.loading)return jsxRuntimeExports.jsx(o$d,{children:Re});if(!Ce.info.initialized)return getAuthMethodExports.getServerAuthMethod(Ce.info)==="nft"?jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"verify-owner"}):jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(NodeConnectOwner,{})});if(Ce.info.upgradeSessionId)return jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(MaintainProgress,{})});if(!Se.user)return jsxRuntimeExports.jsx(NodeLogin,{loadingEle:Re});const ke=jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(BlockletsProvider,{children:jsxRuntimeExports.jsxs(NotificationProvider,{children:[jsxRuntimeExports.jsx(Health,{}),jsxRuntimeExports.jsx(CheckNodeStatus,{}),jsxRuntimeExports.jsx(GlobalSubscriber,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:ke,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/dashboard",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("common.blocklets"),children:jsxRuntimeExports.jsx(BlockletList,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/:did/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Blocklets",children:jsxRuntimeExports.jsx(BlockletDetail,{})})}),jsxRuntimeExports.jsx(Route,{path:"/settings/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("common.setting"),children:jsxRuntimeExports.jsx(Settings,{})})}),jsxRuntimeExports.jsx(Route,{path:"/eula",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("setup.steps.eula"),children:jsxRuntimeExports.jsx(EULAPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/store",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("common.store"),children:jsxRuntimeExports.jsx(BlockletStore,{})})}),jsxRuntimeExports.jsx(Route,{path:"/console",element:jsxRuntimeExports.jsx(DashboardRoute,{title:`GraphQL ${be("common.console")}`,scrollable:!1,fullWidth:!0,children:jsxRuntimeExports.jsx(Console,{})})}),jsxRuntimeExports.jsx(Route,{path:"/notifications",element:jsxRuntimeExports.jsx(DashboardRoute,{children:jsxRuntimeExports.jsx(Notifications,{})})}),jsxRuntimeExports.jsx(Route,{path:"/team/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("common.team"),children:jsxRuntimeExports.jsx(TeamPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/logs/:name?",element:jsxRuntimeExports.jsx(DashboardRoute,{scrollable:!1,fullWidth:!0,title:be("common.logs"),children:jsxRuntimeExports.jsx(LogPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/analytics/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:be("common.analytics"),children:jsxRuntimeExports.jsx(AnalyticsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(Navigate,{to:"/dashboard",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/team",element:jsxRuntimeExports.jsx(Navigate,{to:"/team/members",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/analytics",element:jsxRuntimeExports.jsx(Navigate,{to:"/analytics/traffic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/router",element:jsxRuntimeExports.jsx(Navigate,{to:"/router/rules",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/settings",element:jsxRuntimeExports.jsx(Navigate,{to:"/settings/basic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace",element:jsxRuntimeExports.jsx(Navigate,{to:"/store",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace/:did",element:jsxRuntimeExports.jsx(Navigate,{to:"/store/:did",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})]})})}function UnprotectedWrapper({children:be}){const{node:Ce,session:Se}=useSharedContext();return Ce.loading||!Se.initialized&&Se.loading?jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):Ce.info.upgradeSessionId?jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(MaintainProgress,{})}):be}function App(){const{changeLocale:be}=T$9(),Ce=useQuery();reactExports.useEffect(()=>{const Te=Ce.get("locale");Te&&["zh","en"].includes(Te)&&be(Te)},[]);const Se=jsxRuntimeExports.jsx(o$d,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:Se,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(IssuePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LostPassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(ExchangePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:"/accept-server",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"accept-server"})})}),jsxRuntimeExports.jsx(Route,{path:"/gen-key-pair/",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(GenKeyPair,{})})}),jsxRuntimeExports.jsx(Route,{path:"/launch-blocklet/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LaunchBlockletProvider,{children:jsxRuntimeExports.jsx(BlockletLauncher,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/restore/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(BlockletAppProvider,{children:jsxRuntimeExports.jsx(BlockletRestore,{})})})}),jsxRuntimeExports.jsx(Route,{path:`${constantExports$1.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(Invite,{})})}),jsxRuntimeExports.jsx(Route,{path:"/*",element:jsxRuntimeExports.jsx(ProtectedApp,{})})]})})}function AppWrapper(){const be=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return jsxRuntimeExports.jsx(BrowserRouter,{history:history$1,basename:be,children:jsxRuntimeExports.jsx(Root,{children:jsxRuntimeExports.jsx(App,{})})})}const root=clientExports.createRoot(document.getElementById("root"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";register(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:prefix},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(be){console.error("Error during service worker registration:",be)}});export{$$4 as $,useNavigate as A,useSearchParams as B,CircularProgress as C,DialogContentText as D,constantExports$1 as E,useMediaQuery as F,Grid$1 as G,H$7 as H,libExports$3 as I,utilExports as J,Link$1 as K,Link as L,BlockletAppAvatar as M,Box as N,isEmpty as O,et as P,FormControl as Q,InputLabel as R,Select as S,Typography as T,MenuItem as U,Checkbox as V,WrappedDidAddress as W,Alert as X,formatError as Y,o$d as Z,CheckIcon$2 as _,useSubscription as a,Menu as a$,propTypesExports as a0,api as a1,merge as a2,cloneDeep as a3,IconButton as a4,R$4 as a5,ListItemSecondaryAction as a6,List as a7,ListItem as a8,ListItemText as a9,getBlockletMetaUrl as aA,ErrorBoundary as aB,k$1 as aC,formatRegistryLogoPath as aD,Icon as aE,ListItemIcon as aF,createSvgIcon as aG,ensureDomainAliases as aH,getIp as aI,normalizePathPrefix as aJ,sortBy as aK,stringSortHandlerAsc as aL,getAccessUrl as aM,history$1 as aN,semver as aO,useReactive as aP,useAsyncEffect as aQ,InfoOutlinedIcon as aR,sleep as aS,checkInputByType as aT,FormControlLabel as aU,Stack$1 as aV,useAsync as aW,axios as aX,shouldCheckDomainStatus as aY,formatMountPoint as aZ,urlPathFriendly as a_,getServerUrl as aa,useBlockletAppContext as ab,getAuthMethodExports as ac,ConfirmDialog as ad,getRestoredAccessUrl as ae,setSessionToken as af,isEqual as ag,isServerlessBlockletInstalled as ah,Debug as ai,getWsClient as aj,useQuery as ak,getPathPrefix as al,Global as am,Routes as an,Route as ao,Navigate as ap,HeaderAddon as aq,SessionContext as ar,css as as,$$5 as at,formatToDatetime as au,alpha$1 as av,getLaunchAgreementUrl as aw,axios$2 as ax,useSessionContext$1 as ay,Tooltip as az,constantExports as b,composeClasses as b$,checkIsWildcardDomain as b0,Popover as b1,Card as b2,formatToDate as b3,sortDomains as b4,M$7 as b5,Collapse as b6,CheckCircle as b7,styled as b8,isUrl as b9,isInstalling as bA,Badge as bB,createAppPassportSvg as bC,NavLink as bD,__vitePreload as bE,SetCache as bF,arrayIncludes$1 as bG,arrayIncludesWith as bH,cacheHas as bI,baseUniq as bJ,baseFlatten as bK,baseRest as bL,last as bM,arrayFilter as bN,isArrayLikeObject as bO,t$9 as bP,isDownloading as bQ,getBlockletUrl as bR,getBlockletUrlParams as bS,ButtonBase as bT,memoTheme as bU,emphasize as bV,generateUtilityClasses$1 as bW,generateUtilityClass$1 as bX,useDefaultProps as bY,useSlotProps as bZ,clsx$1 as b_,__awaiter as ba,__generator as bb,__spread as bc,getDefaultExportFromCjs$1 as bd,U$4 as be,dayjs as bf,Divider as bg,isCertificateMatch as bh,FormHelperText as bi,FormGroup as bj,o$a as bk,NodeContext as bl,useParams as bm,useNodeContext$1 as bn,uniqBy as bo,libExports$1 as bp,g$a as bq,a$9 as br,l$k as bs,BlockletAvatar as bt,ClickAwayListener as bu,f$9 as bv,createPassportSvg as bw,getWalletType as bx,useCreation as by,BlockletAdminRoles as bz,createCompounder as c,Q$3 as c$,__read as c0,toSlotDomain as c1,omit as c2,fixBlocklet as c3,isProtectedRole as c4,baseOrderBy as c5,isArray$1 as c6,rootShouldForwardProp as c7,useFormControl as c8,createChainedFunction$1 as c9,Container$3 as cA,K$3 as cB,getLauncherBaseURL as cC,SvgIcon as cD,Buffer$1 as cE,parseURL as cF,withHttps as cG,useLaunchBlockletContext as cH,z$3 as cI,authorize as cJ,ArrowForwardIcon as cK,isNewStoreUrl as cL,getAccessibleUrl as cM,getBlockletLogoUrl as cN,t as cO,F$6 as cP,__spreadArrays as cQ,__assign as cR,h$6 as cS,useLocation as cT,useMount as cU,e$c as cV,formatDateTime as cW,getExplorerLink as cX,patchJsxToLocale as cY,flat as cZ,en$2 as c_,useSlot as ca,capitalize$1 as cb,SwitchBase as cc,createSimplePaletteValueFilter as cd,useControlled as ce,useForkRef as cf,useId as cg,getBlockletUrls as ch,defaultCheckAccessible as ci,urlEvaluationExports as cj,memoize as ck,ButtonGroupContext as cl,ButtonGroupButtonContext as cm,useNotificationContext as cn,utilExports$1 as co,NotificationList as cp,useRequest as cq,useMemoizedFn as cr,isNumber$3 as cs,useLatest as ct,defaultDayjs as cu,d$e as cv,Avatar as cw,isFromWallet as cx,usePassportId as cy,isFunction$2 as cz,useBlockletsContext as d,auto as d$,getSessionToken as d0,LinearProgress as d1,SvgLogo as d2,isNumber$1 as d3,useEnhancedEffect$1 as d4,debounce$2 as d5,ownerWindow as d6,useRtl as d7,KeyboardArrowLeft as d8,KeyboardArrowRight as d9,require$$3$1 as dA,requireConstant$1 as dB,$e as dC,noop$1 as dD,Button as dE,Paper as dF,MenuList as dG,Popper as dH,_inheritsLoose$1 as dI,ReactDOM as dJ,_objectWithoutPropertiesLoose$1 as dK,TransitionGroup as dL,ENTERED as dM,ENTERING as dN,EXITING as dO,TransitionGroupContext as dP,Transition as dQ,config$1 as dR,popperGenerator as dS,eventListeners as dT,popperOffsets$1 as dU,computeStyles$1 as dV,applyStyles$1 as dW,afterMain as dX,afterRead as dY,afterWrite as dZ,arrow$1 as d_,useEventCallback$1 as da,ownerDocument as db,m$d as dc,requireReact as dd,o$f as de,oe$1 as df,ne$2 as dg,InfoIcon$2 as dh,upperFirst as di,camelCase as dj,Skeleton as dk,R$5 as dl,isArrayLike as dm,baseIteratee as dn,keys as dp,toInteger as dq,baseFindIndex as dr,commonjsGlobal as ds,getAugmentedNamespace as dt,emotionUtils_browser_esm as du,requireJsxRuntime as dv,requirePropTypes as dw,requireReactDom as dx,isObject$3 as dy,requireUrl as dz,useAsyncRetry as e,ThemeProvider$3 as e$,basePlacements as e0,beforeMain as e1,beforeRead as e2,beforeWrite as e3,bottom as e4,clippingParents as e5,createPopper as e6,createPopper$1 as e7,detectOverflow as e8,end as e9,requireUrlPathFriendly as eA,b$9 as eB,data$w as eC,global$2 as eD,hoistStatics as eE,isEqual$3 as eF,usePreviousProps as eG,setRef as eH,ClearIcon as eI,ArrowDropDownIcon as eJ,Chip as eK,filledInputClasses as eL,inputBaseClasses as eM,outlinedInputClasses as eN,inputClasses as eO,ListContext as eP,getListItemButtonUtilityClass as eQ,listItemButtonClasses as eR,emotionReact_browser_esm as eS,emotionCache_browser_esm as eT,cloneDeep$1 as eU,forceReflow as eV,_extends$2 as eW,toString$2 as eX,deepmerge$1 as eY,StyledEngineProvider as eZ,ThemeProvider as e_,flip$1 as ea,hide$1 as eb,left as ec,main as ed,modifierPhases as ee,offset$1 as ef,placements as eg,popper as eh,preventOverflow$1 as ei,read as ej,reference as ek,right as el,start as em,top as en,variationPlacements as eo,viewport as ep,write as eq,requireReactIs as er,emotionStyled_browser_esm as es,emotionSerialize_esm as et,emotionSheet_esm as eu,process$1 as ev,requireLib$3 as ew,requireLib$4 as ex,requireLib$2 as ey,requireConstant$2 as ez,useTheme as f,shouldForwardProp as f$,s$2 as f0,CloseIcon as f1,isString$1 as f2,__spreadArray as f3,useEventListener as f4,ae$4 as f5,getTargetElement as f6,createTheme as f7,createAxios as f8,pick as f9,formatTime as fA,CloseFullscreenIcon as fB,S$8 as fC,TablePagination as fD,parseAvatar as fE,tmp as fF,useUpdate as fG,Q$4 as fH,I$5 as fI,p$a as fJ,Z$1 as fK,requireUtil$6 as fL,requireObjectKeys$1 as fM,requireShams$1 as fN,requireCallBound as fO,requireEsObjectAtoms as fP,requireDefineDataProperty as fQ,requireHasPropertyDescriptors as fR,requireCallBind as fS,requireCallBound$1 as fT,requireSafeBuffer$1 as fU,requireBrowser$f as fV,requireElliptic as fW,requireCryptoBrowserify as fX,requireRipemd160 as fY,requireLib$1 as fZ,requireUtil as f_,omitBy as fa,MenuIcon as fb,useDebounceFn as fc,Dialog as fd,OutlinedInput as fe,data as ff,Drawer as fg,parseQuery as fh,parseFilename as fi,stringifyParsedURL as fj,Grow as fk,Wt as fl,InputAdornment as fm,tooltipClasses as fn,e$9 as fo,requireEngine as fp,clamp as fq,extractEventHandlers as fr,isFocusVisible as fs,isHostComponent as ft,lighten as fu,darken as fv,slotShouldForwardProp as fw,requireNormalizePathPrefix as fx,debounce as fy,useInterval as fz,g$e as g,d$f as g$,resolveComponentProps as g0,l as g1,getInviteLink as g2,copy as g3,e$b as g4,getIssuePassportLink as g5,uniqBy$1 as g6,isNodeOwner as g7,isSelf as g8,Q$1 as g9,requireBrowser$3 as gA,require$$3 as gB,useTimeout as gC,Fade as gD,FocusTrap as gE,DialogActions as gF,dialogClasses as gG,DialogContent as gH,localizedFormatPlugin as gI,n$8 as gJ,purify as gK,Buffer$1$1 as gL,Q$2 as gM,resolveProps as gN,useThemeProps as gO,defaultTheme$1 as gP,THEME_ID as gQ,l$a as gR,isIndex as gS,useTheme$4 as gT,objectAssign as gU,__extends as gV,isServerless as gW,isFunction$1 as gX,omit$1 as gY,TableContext as gZ,Tablelvl2Context as g_,createPassportSvgExports as ga,getBlockletAccessibleUrl as gb,A$1 as gc,createPassportSvg$1 as gd,requireMs as ge,E$3 as gf,trim as gg,BlockletSDK as gh,getBlockletSDK as gi,MoreHorizIcon as gj,identity$1 as gk,arrayEach as gl,baseEach as gm,arrayMap as gn,baseMap as go,baseForOwn as gp,isPlainObject$2 as gq,require$$11 as gr,throttle$2 as gs,isUndefined$1 as gt,requireJsonStableStringify as gu,requireSemver as gv,requireBrowser$5 as gw,require$$0$1 as gx,requireIsAbsoluteUrl as gy,requireDist$2 as gz,a as h,z$2 as h$,useUnmount as h0,isDidDomainOrIpEchoDomain as h1,ExpandLess as h2,validateDomain as h3,requireDist as h4,requireAxios as h5,trim$1 as h6,requirePRetry as h7,TableCell as h8,De as h9,requireHoistNonReactStatics_cjs as hA,_assertThisInitialized$1 as hB,reactDomExports as hC,loadIcon as hD,withoutLeadingSlash as hE,fetchSvgAsPng as hF,blobToFile as hG,withoutTrailingSlash as hH,Rt as hI,_$5 as hJ,i as hK,D$8 as hL,browserExports$1 as hM,highlightExports as hN,funcExports as hO,data$y as hP,useSnackbar as hQ,common$3 as hR,green as hS,amber as hT,SnackbarContent as hU,t$1 as hV,Y as hW,f$3 as hX,b as hY,g$8 as hZ,withErrorBoundary as h_,getSystemDomains as ha,copyArray as hb,baseIndexOf as hc,keyframes as hd,pe$2 as he,useAppLogo as hf,getTransferAppLink as hg,requireBn as hh,require$$2 as hi,uniq as hj,data$s as hk,data$t as hl,data$r as hm,isNil as hn,requireBase32 as ho,Ft as hp,withTrailingSlash as hq,data$B as hr,requireAssertString as hs,isEmail as ht,isURL as hu,createUseStorageState as hv,isBrowser$1 as hw,root$1 as hx,isNil$1 as hy,require$$10 as hz,get$1 as i,M$3 as i0,ye as i1,G$1 as i2,ue as i3,useBlockletLogo as i4,isPlainObject$1 as i5,Toolbar as i6,_setPrototypeOf as i7,useEffectWithTarget$1 as i8,__values as i9,AxiosError as iA,T$a as iB,isNull as iC,orange as iD,purple as iE,useStore as iF,createStore as iG,create$1 as iH,t$f as iI,__rest as iJ,clientExports as iK,yt$1 as iL,retry as iM,isNetworkError as iN,requirePTimeout as iO,n$5 as iP,Modal as iQ,GlobalStyles$2 as iR,useSize as iS,isString$3 as ia,FormLabel as ib,RelativeTime as ic,isIncludeActivity as id,isUserActor as ie,ActorAvatar as ig,SendComponentAvatar as ih,Activity as ii,NotificationContent$1 as ij,AvatarGroup as ik,requireCjs as il,useTheme$2 as im,baseAssignValue as io,isValidClusterSize as ip,extractStatusUrlFromNextWorkflow as iq,pWaitFor as ir,hasRequiredSteps as is,getStoreList as it,flatten as iu,trimEnd as iv,DialogTitle as iw,base32Exports as ix,flatExports as iy,Et as iz,jsxRuntimeExports as j,filesize as k,formatLocale as l,T$9 as m,useSessionContext as n,o$g as o,prettyMs as p,useSetState as q,reactExports as r,styled$3 as s,TextField as t,useNodeContext as u,n$4 as v,$t as w,getWebWalletUrl as x,joinURL as y,withQuery as z};
@@ -1,4 +1,4 @@
1
- import{u as k,j as o,C as y,ay as W,cT as b,A as U,m as E,cI as _,r,aW as D,i as d,y as x,al as P,af as R,w as O,E as $,x as A,ax as K,bw as z,s as H}from"./index--ktJL2Tx.js";import{I as M}from"./invitation-DyVYJveL.js";import"./index-BQhkQ0WB.js";import"./index-BKrngGDQ.js";import"./emotion-cache.browser.esm-BUnXReBA.js";import"./index-CZH7Mn5H.js";import"./sdk-FGFC0J6F.js";import"./wrap-locale-DR1zYzoA.js";function V(h){const{api:i,session:f}=W(),{info:n}=k(),c=b(),v=U(),{t:l,locale:m}=E(),{encryptKey:N,decrypt:C}=_(),[I,g]=r.useState(!1),p=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),a=D(async()=>{if(!p)return null;let e;const{data:s}=await i.get("/api/invitation",{params:{inviteId:p}}),t=!!d(n,"ownerNft.did")&&s.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",p);const{data:F}=await i.get(u.href);e=F}return{invitation:s,nextWorkflow:e,needReceiveNFT:t}}),T=r.useCallback(()=>{g(!0)},[]),L=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(C(e.sessionToken)));const s=new URLSearchParams(c.search);s.delete("inviteId");const t=s.toString();await f.refresh(),v(`/${t&&`?${t}`}`,{replace:!0})},[c,v,f]);if(a.loading)return o.jsx(y,{});const S=()=>{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 s=setInterval(async()=>{const{data:t}=await i.get(e.href);t.status==="succeed"&&(clearInterval(s),f.updateConnectedInfo(t),w(t))},2e3)},j=()=>{g(!1)};return o.jsxs(X,{className:"page-invite",children:[d(a,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:I,locale:m,baseUrl:n.launcher.url,checkFn:K.create({baseURL:n.launcher.url}).get,onSuccess:S,onClose:j,checkTimeout:5*60*1e3,webWalletUrl:A(n),extraParams:{nw:d(a,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:n.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:`${$.WELLKNOWN_SERVICE_PATH_PREFIX}/api/did`}),o.jsx(M,{...h,getDataFn:L,createPassportSvg:e=>z(e,n),checkFn:i.get,onLoginSuccess:w,passportColor:"default",onReceive:d(a,"value.needReceiveNFT")?T:null})]})}const X=H.div`
1
+ import{u as k,j as o,C as y,ay as W,cT as b,A as U,m as E,cI as _,r,aW as D,i as d,y as x,al as P,af as R,w as O,E as $,x as A,ax as K,bw as z,s as H}from"./index-BSnpJGoE.js";import{I as M}from"./invitation-6hqyeU5m.js";import"./index-CcYCgG1Z.js";import"./index-WqL2nOOx.js";import"./emotion-cache.browser.esm-lCkFhcap.js";import"./index-Bn_tCgMM.js";import"./sdk-DyOTm4mE.js";import"./wrap-locale-D_s0ePXc.js";function V(h){const{api:i,session:f}=W(),{info:n}=k(),c=b(),v=U(),{t:l,locale:m}=E(),{encryptKey:N,decrypt:C}=_(),[I,g]=r.useState(!1),p=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),a=D(async()=>{if(!p)return null;let e;const{data:s}=await i.get("/api/invitation",{params:{inviteId:p}}),t=!!d(n,"ownerNft.did")&&s.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",p);const{data:F}=await i.get(u.href);e=F}return{invitation:s,nextWorkflow:e,needReceiveNFT:t}}),T=r.useCallback(()=>{g(!0)},[]),L=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(C(e.sessionToken)));const s=new URLSearchParams(c.search);s.delete("inviteId");const t=s.toString();await f.refresh(),v(`/${t&&`?${t}`}`,{replace:!0})},[c,v,f]);if(a.loading)return o.jsx(y,{});const S=()=>{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 s=setInterval(async()=>{const{data:t}=await i.get(e.href);t.status==="succeed"&&(clearInterval(s),f.updateConnectedInfo(t),w(t))},2e3)},j=()=>{g(!1)};return o.jsxs(X,{className:"page-invite",children:[d(a,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:I,locale:m,baseUrl:n.launcher.url,checkFn:K.create({baseURL:n.launcher.url}).get,onSuccess:S,onClose:j,checkTimeout:5*60*1e3,webWalletUrl:A(n),extraParams:{nw:d(a,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:n.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:`${$.WELLKNOWN_SERVICE_PATH_PREFIX}/api/did`}),o.jsx(M,{...h,getDataFn:L,createPassportSvg:e=>z(e,n),checkFn:i.get,onLoginSuccess:w,passportColor:"default",onReceive:d(a,"value.needReceiveNFT")?T:null})]})}const X=H.div`
2
2
  width: 100vw;
3
3
  height: 100%;
4
4
  min-height: 100vh;
@@ -1 +1 @@
1
- import{j as n,v as e,N as o,gR as r,o as s}from"./index--ktJL2Tx.js";function a({children:i=null,...t}){return n.jsxs(e,{color:"did",variant:"contained",...t,children:[n.jsx(o,{sx:{fontWeight:400},children:i||"Continue With"}),n.jsx(r,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}a.propTypes={children:s.any};export{a};
1
+ import{j as n,v as e,N as o,gR as r,o as s}from"./index-BSnpJGoE.js";function a({children:i=null,...t}){return n.jsxs(e,{color:"did",variant:"contained",...t,children:[n.jsx(o,{sx:{fontWeight:400},children:i||"Continue With"}),n.jsx(r,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}a.propTypes={children:s.any};export{a};
@@ -1,4 +1,4 @@
1
- import{c as O,u as W,r as i,a as R,b as D,j as e,o as y,d as H,e as Q,g as Y,f as F,W as U,L as X,h as j,i as J,k,T as h,G as v,p as K,l as z,s as q,C as Z}from"./index--ktJL2Tx.js";import{f as ee}from"./index-BojVbZw0.js";import{v as $}from"./index-DYPal8XU.js";import{M as V}from"./metric-Bbm9krzb.js";import{C as M}from"./click-to-copy-CTJTNpA1.js";var ne=O(function(a,d,r){return a+(r?" ":"")+d.toLowerCase()});const B=i.createContext({}),{Provider:se,Consumer:xe}=B;function ae({children:a}){const{api:d,info:r}=W(),[u,l]=i.useState(null),[c,t]=i.useState(!1),[s,p]=i.useState([]),_=4,f=async({silent:o=!0,retries:m=_}={})=>{o||t(!0);try{l(null);const{users:x}=await d.getUsers({input:{teamDid:r.did,paging:{pageSize:100}}});t(!1),p(x)}catch(x){m>0?setTimeout(()=>f({silent:o,retries:m-1}),1e3):(t(!1),l(x))}};i.useEffect(()=>{f({silent:!1})},[]),R(D.TeamEvents.userAdded,({teamDid:o})=>{o===r.did&&f()}),R(D.TeamEvents.userRemoved,({teamDid:o,user:{did:m}})=>{o===r.did&&p(x=>x.filter(N=>N.did!==m))}),R(D.TeamEvents.userUpdated,({teamDid:o})=>{o===r.did&&f()});const b={loading:c,error:u,users:s,refresh:f};return e.jsx(se,{value:{users:b},children:a})}function te(){const{users:a}=i.useContext(B);return a}const g={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},re=(a,d)=>{const[r,u]=i.useState(0),l=s=>s>=g.oneDay?g.oneDay:s>=g.oneHour?g.oneHour:s>=g.oneMin?g.oneMin:g.oneSecond,[c,t]=i.useState(l(a/1e3));return i.useEffect(()=>{const s=setInterval(()=>{u(r+c);const p=l(a/1e3+r+c);c!==p&&t(p)},c*1e3);return()=>clearInterval(s)},[c,r]),i.useEffect(()=>{u(0),t(l(a/1e3))},[a]),d(a+r*1e3)};y.number.isRequired,y.func;const oe=async a=>{const d=await a.getNodeEnv();return Object.assign({},d.info||{})};y.number.isRequired;y.string.isRequired,y.string.isRequired,y.string.isRequired;function ie(){const{info:a,api:d,loading:r}=W(),{data:u,externalData:l}=H(),{users:c}=te(),t=Q(()=>oe(d)),{t:s,locale:p}=i.useContext(Y),_=F(),f=re(+new Date-a.startAt,o=>{const m={compact:!0,verbose:!0,locale:z(p)};return K(o,m)});let b=null;if(r)b=e.jsx(Z,{});else{const o=[{name:s("dashboard.nodeDid"),value:e.jsx(U,{did:a.did,showQrcode:!0})}];a.nodeOwner&&o.push({name:s("dashboard.ownerDid"),value:e.jsx(U,{did:a.nodeOwner.did,showQrcode:!0})});let m=[];a.launcher&&(m=[{name:s("common.did"),value:e.jsx(U,{did:a.launcher.did,showQrcode:!0})},{name:s("common.type"),value:a.launcher.type},{name:s("launcher.provider"),value:a.launcher.provider},{name:s("launcher.adminUrl"),value:e.jsx(X,{target:"_blank",href:a.launcher.url,underline:"hover",children:a.launcher.url})}]);const x=(n,w)=>!n&&!w?"-":n==="-"?n:!w||w==="-"?e.jsxs(h,{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}):e.jsxs(h,{component:"ul",children:[e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}),e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV6"}),e.jsx(M,{children:w})]})]}),N=()=>{const n=[{name:`${s("common.internalIp")}`,value:x(t.value.ip.internalV4,t.value.ip.internalV6)},{name:`${s("common.externalIp")}`,value:x(t.value.ip.externalV4,t.value.ip.externalV6)}];return t.value.docker?[]:n},T=t.value?[{name:`${s("common.version")}`,value:a.version},...N(),{name:`${s("common.os")}`,value:t.value.os},t.value.docker?{name:`${s("common.docker")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null,t.value.gitpod?{name:`${s("common.gitpod")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null].filter(Boolean):[];Array.isArray(J(t,"value.blockletEngines",null))&&t.value.blockletEngines.filter(n=>n.visible&&n.available).forEach(n=>{T.push({name:n.displayName,value:e.jsx(j,{type:"success",children:`${n.version}`||"N/A"})})});const L=c.length,A=c.filter(n=>n.approved).length;let P=L;A&&(P+=`<small><strong>${ne(s("common.approved"))} ${A}</strong></small>`);let S=0,C=0;u&&(S=u.length,C=u.filter(n=>n.status==="running").length),Array.isArray(l)&&(S+=l.length,C+=l.filter(n=>n.status==="running").length);let I=S;C&&(I+=`<small>${s("common.running")} ${C}</small>`);const G=[{name:s("common.blocklets"),value:I},{name:s("common.members"),value:P},{name:s("common.uptime"),value:f},{name:s("common.created"),value:ee(new Date(a.createdAt).getTime(),z(p))}];let E=[];t.value&&t.value.disk&&Object.values(t.value.disk).some(n=>n>0)&&(E=[{name:s("common.blockletsStorage"),value:k(t.value.disk.blocklets||0).toUpperCase()},{name:s("common.dataStorage"),value:k(t.value.disk.data||0).toUpperCase()},{name:s("common.logStorage"),value:k(t.value.disk.log||0).toUpperCase()},{name:s("common.cacheStorage"),value:k(t.value.disk.cache||0).toUpperCase()},{name:s("common.coreStorage"),value:k(t.value.disk.app||0).toUpperCase()}]),b=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.overview")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:G.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),E.length>0&&e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.storage")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:E.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.meta")}),e.jsxs(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:[e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.dAddress")}),o.map(n=>e.jsx($,{nameWidth:150,name:n.name,children:n.value},n.name)),m.length>0&&e.jsxs("div",{style:{marginTop:_.spacing(8)},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.launcher")}),m.map(n=>e.jsx($,{nameWidth:150,name:n.name,children:n.value},n.name))]})]},"address"),e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.env")}),T.map(n=>e.jsx($,{valueComponent:"div",nameWidth:150,name:n.name,children:n.value},n.name))]},"environment")]})]})]})}return e.jsx(le,{children:b})}const le=q.main`
1
+ import{c as O,u as W,r as i,a as R,b as D,j as e,o as y,d as H,e as Q,g as Y,f as F,W as U,L as X,h as j,i as J,k,T as h,G as v,p as K,l as z,s as q,C as Z}from"./index-BSnpJGoE.js";import{f as ee}from"./index-BojVbZw0.js";import{v as $}from"./index-W9Gf1H9j.js";import{M as V}from"./metric-NP4oz2zf.js";import{C as M}from"./click-to-copy-DO0vuZcs.js";var ne=O(function(a,d,r){return a+(r?" ":"")+d.toLowerCase()});const B=i.createContext({}),{Provider:se,Consumer:xe}=B;function ae({children:a}){const{api:d,info:r}=W(),[u,l]=i.useState(null),[c,t]=i.useState(!1),[s,p]=i.useState([]),_=4,f=async({silent:o=!0,retries:m=_}={})=>{o||t(!0);try{l(null);const{users:x}=await d.getUsers({input:{teamDid:r.did,paging:{pageSize:100}}});t(!1),p(x)}catch(x){m>0?setTimeout(()=>f({silent:o,retries:m-1}),1e3):(t(!1),l(x))}};i.useEffect(()=>{f({silent:!1})},[]),R(D.TeamEvents.userAdded,({teamDid:o})=>{o===r.did&&f()}),R(D.TeamEvents.userRemoved,({teamDid:o,user:{did:m}})=>{o===r.did&&p(x=>x.filter(N=>N.did!==m))}),R(D.TeamEvents.userUpdated,({teamDid:o})=>{o===r.did&&f()});const b={loading:c,error:u,users:s,refresh:f};return e.jsx(se,{value:{users:b},children:a})}function te(){const{users:a}=i.useContext(B);return a}const g={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},re=(a,d)=>{const[r,u]=i.useState(0),l=s=>s>=g.oneDay?g.oneDay:s>=g.oneHour?g.oneHour:s>=g.oneMin?g.oneMin:g.oneSecond,[c,t]=i.useState(l(a/1e3));return i.useEffect(()=>{const s=setInterval(()=>{u(r+c);const p=l(a/1e3+r+c);c!==p&&t(p)},c*1e3);return()=>clearInterval(s)},[c,r]),i.useEffect(()=>{u(0),t(l(a/1e3))},[a]),d(a+r*1e3)};y.number.isRequired,y.func;const oe=async a=>{const d=await a.getNodeEnv();return Object.assign({},d.info||{})};y.number.isRequired;y.string.isRequired,y.string.isRequired,y.string.isRequired;function ie(){const{info:a,api:d,loading:r}=W(),{data:u,externalData:l}=H(),{users:c}=te(),t=Q(()=>oe(d)),{t:s,locale:p}=i.useContext(Y),_=F(),f=re(+new Date-a.startAt,o=>{const m={compact:!0,verbose:!0,locale:z(p)};return K(o,m)});let b=null;if(r)b=e.jsx(Z,{});else{const o=[{name:s("dashboard.nodeDid"),value:e.jsx(U,{did:a.did,showQrcode:!0})}];a.nodeOwner&&o.push({name:s("dashboard.ownerDid"),value:e.jsx(U,{did:a.nodeOwner.did,showQrcode:!0})});let m=[];a.launcher&&(m=[{name:s("common.did"),value:e.jsx(U,{did:a.launcher.did,showQrcode:!0})},{name:s("common.type"),value:a.launcher.type},{name:s("launcher.provider"),value:a.launcher.provider},{name:s("launcher.adminUrl"),value:e.jsx(X,{target:"_blank",href:a.launcher.url,underline:"hover",children:a.launcher.url})}]);const x=(n,w)=>!n&&!w?"-":n==="-"?n:!w||w==="-"?e.jsxs(h,{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}):e.jsxs(h,{component:"ul",children:[e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV4"}),e.jsx(M,{children:n})]}),e.jsxs("li",{className:"ip-item",children:[e.jsx(j,{children:"IPV6"}),e.jsx(M,{children:w})]})]}),N=()=>{const n=[{name:`${s("common.internalIp")}`,value:x(t.value.ip.internalV4,t.value.ip.internalV6)},{name:`${s("common.externalIp")}`,value:x(t.value.ip.externalV4,t.value.ip.externalV6)}];return t.value.docker?[]:n},T=t.value?[{name:`${s("common.version")}`,value:a.version},...N(),{name:`${s("common.os")}`,value:t.value.os},t.value.docker?{name:`${s("common.docker")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null,t.value.gitpod?{name:`${s("common.gitpod")}`,value:e.jsx(j,{type:"success",children:"Yes"})}:null].filter(Boolean):[];Array.isArray(J(t,"value.blockletEngines",null))&&t.value.blockletEngines.filter(n=>n.visible&&n.available).forEach(n=>{T.push({name:n.displayName,value:e.jsx(j,{type:"success",children:`${n.version}`||"N/A"})})});const L=c.length,A=c.filter(n=>n.approved).length;let P=L;A&&(P+=`<small><strong>${ne(s("common.approved"))} ${A}</strong></small>`);let S=0,C=0;u&&(S=u.length,C=u.filter(n=>n.status==="running").length),Array.isArray(l)&&(S+=l.length,C+=l.filter(n=>n.status==="running").length);let I=S;C&&(I+=`<small>${s("common.running")} ${C}</small>`);const G=[{name:s("common.blocklets"),value:I},{name:s("common.members"),value:P},{name:s("common.uptime"),value:f},{name:s("common.created"),value:ee(new Date(a.createdAt).getTime(),z(p))}];let E=[];t.value&&t.value.disk&&Object.values(t.value.disk).some(n=>n>0)&&(E=[{name:s("common.blockletsStorage"),value:k(t.value.disk.blocklets||0).toUpperCase()},{name:s("common.dataStorage"),value:k(t.value.disk.data||0).toUpperCase()},{name:s("common.logStorage"),value:k(t.value.disk.log||0).toUpperCase()},{name:s("common.cacheStorage"),value:k(t.value.disk.cache||0).toUpperCase()},{name:s("common.coreStorage"),value:k(t.value.disk.app||0).toUpperCase()}]),b=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.overview")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:G.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),E.length>0&&e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.storage")}),e.jsx(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:E.map(n=>e.jsx(v,{size:{xl:2,lg:3,md:4,sm:6,xs:6},children:e.jsx(V,{...n})},n.name))})]}),e.jsxs("div",{className:"section",children:[e.jsx(h,{className:"section__header",component:"h2",variant:"h4",color:"textPrimary",children:s("common.meta")}),e.jsxs(v,{className:"page-metrics",container:!0,spacing:{xs:2,sm:3,md:4,lg:5},children:[e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.dAddress")}),o.map(n=>e.jsx($,{nameWidth:150,name:n.name,children:n.value},n.name)),m.length>0&&e.jsxs("div",{style:{marginTop:_.spacing(8)},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.launcher")}),m.map(n=>e.jsx($,{nameWidth:150,name:n.name,children:n.value},n.name))]})]},"address"),e.jsxs(v,{size:{lg:6,md:12,sm:12,xs:12},children:[e.jsx(h,{className:"section__header",component:"h3",variant:"h5",color:"textPrimary",children:s("common.env")}),T.map(n=>e.jsx($,{valueComponent:"div",nameWidth:150,name:n.name,children:n.value},n.name))]},"environment")]})]})]})}return e.jsx(le,{children:b})}const le=q.main`
2
2
  .page-header {
3
3
  display: flex;
4
4
  justify-content: space-between;