@abtnode/webapp 1.17.8 → 1.17.9

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 (184) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-CXgBZcQU.js → AdapterDayjs-DWO9WIHe.js} +1 -1
  4. package/dist/assets/{Add-B-lIYZBc.js → Add-CaX-C76B.js} +1 -1
  5. package/dist/assets/ArrowDropDown-225S5d4X.js +1 -0
  6. package/dist/assets/{Autocomplete-BHqH72uG.js → Autocomplete-CoHLc9sw.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-CpZ2DeBG.js → Breadcrumbs-CtmWaPWD.js} +1 -1
  8. package/dist/assets/{ButtonGroup-CXwzM552.js → ButtonGroup-CFUm4DnA.js} +1 -1
  9. package/dist/assets/{CSSTransition-hTlKGu0l.js → CSSTransition-BoEOBxnu.js} +1 -1
  10. package/dist/assets/{CallMerge-V8M4tzIM.js → CallMerge-g03IIE2c.js} +1 -1
  11. package/dist/assets/{CardContent-MdG6Fo_s.js → CardContent-De2diFnM.js} +1 -1
  12. package/dist/assets/{ChevronLeft-BPs9Erbv.js → ChevronLeft-6mKauCKy.js} +1 -1
  13. package/dist/assets/{ChevronRight-C_yvQN06.js → ChevronRight-Ba1GeQFe.js} +1 -1
  14. package/dist/assets/{Clear-XkW6YpHE.js → Clear-B_hKjaJj.js} +1 -1
  15. package/dist/assets/{Delete-CCasVLgy.js → Delete-B-jFRJwJ.js} +1 -1
  16. package/dist/assets/{DeleteOutline-CocEa6gq.js → DeleteOutline-7b3f7PEm.js} +1 -1
  17. package/dist/assets/{Done-DfHgd6VN.js → Done-L7ZRzL_V.js} +1 -1
  18. package/dist/assets/{Edit-CGdW8_LW.js → Edit-DUM500XS.js} +1 -1
  19. package/dist/assets/{ErrorOutline-D3nJBXYA.js → ErrorOutline-DsKZTEd8.js} +1 -1
  20. package/dist/assets/{FilterList-BiaeVs0C.js → FilterList-ChbigVQM.js} +1 -1
  21. package/dist/assets/{Google-D9HgkG4U.js → Google-CWlHJZAv.js} +1 -1
  22. package/dist/assets/{HelpOutline-s5mQqTw1.js → HelpOutline-dihfOb5v.js} +1 -1
  23. package/dist/assets/{Launch-DHnB5pzO.js → Launch-BkVAoVZE.js} +1 -1
  24. package/dist/assets/{Link-DUSQD8mc.js → Link-DOvnx4g5.js} +1 -1
  25. package/dist/assets/{ListItemButton-BIo7wBNv.js → ListItemButton-BQDScowx.js} +1 -1
  26. package/dist/assets/{ListSubheader-rZisNvzB.js → ListSubheader-Cl_ECqW2.js} +1 -1
  27. package/dist/assets/{LoadingButton-egcGN7yK.js → LoadingButton-CDH-grwB.js} +1 -1
  28. package/dist/assets/{LottiePlayer.modern-DuQJ5g1j.js → LottiePlayer.modern-CLfr42jY.js} +1 -1
  29. package/dist/assets/{MoreVert-Cw1fjU9L.js → MoreVert-DV_CQ8ui.js} +1 -1
  30. package/dist/assets/{OpenInNew-2i4mGCRx.js → OpenInNew-DXke8B9Y.js} +1 -1
  31. package/dist/assets/{Refresh-BIkqgW7p.js → Refresh-D_WONHhn.js} +1 -1
  32. package/dist/assets/{Replay-3PaYn2br.js → Replay-B4flsCqt.js} +1 -1
  33. package/dist/assets/{Search-mc0LftDb.js → Search-z9bCqmrZ.js} +1 -1
  34. package/dist/assets/{Stepper-CnqNXODv.js → Stepper-DKmKSFCG.js} +1 -1
  35. package/dist/assets/{TableSearch-ZIwL7jK3.js → TableSearch-C5Kz0G1P.js} +1 -1
  36. package/dist/assets/{ToggleButtonGroup-DeGfqT0G.js → ToggleButtonGroup-BZx2FaaL.js} +1 -1
  37. package/dist/assets/{UnfoldMore-DFA58tLQ.js → UnfoldMore-B28R2WSj.js} +1 -1
  38. package/dist/assets/{Verified-se8hbTqT.js → Verified-TZI1j-Va.js} +1 -1
  39. package/dist/assets/{VerifiedUser-8QA2XNlm.js → VerifiedUser-Ddu-50lW.js} +1 -1
  40. package/dist/assets/{ViewList-DgyKMmIc.js → ViewList-D-osXRf3.js} +1 -1
  41. package/dist/assets/{Visibility-BqBwXDHr.js → Visibility-BVnDeVk-.js} +1 -1
  42. package/dist/assets/{_createAggregator-BS_ZCLsv.js → _createAggregator-DvxY8dpL.js} +1 -1
  43. package/dist/assets/{actions-BuX7-i-0.js → actions-CUnz9wHy.js} +1 -1
  44. package/dist/assets/{actions-DR8B4Taf.js → actions-TKbswZRW.js} +1 -1
  45. package/dist/assets/{actions-Zy-oEKVg.js → actions-rnAVohGM.js} +1 -1
  46. package/dist/assets/{agreement-3SHQ4MuR.js → agreement-B81jBHjm.js} +1 -1
  47. package/dist/assets/api-BLIecOBq.js +1 -0
  48. package/dist/assets/{appearance-CRQaeOoe.js → appearance-BnoPFfcA.js} +1 -1
  49. package/dist/assets/{audit-logs-BGRhRsNS.js → audit-logs-rRPPzNCV.js} +1 -1
  50. package/dist/assets/{babel-BILHfcMU.js → babel-BhzMK_Nh.js} +1 -1
  51. package/dist/assets/{base-chart-Cp-etWR-.js → base-chart-B-7wNcRu.js} +1 -1
  52. package/dist/assets/{blocklet-D7q_eJsm.js → blocklet-B65NZ0SL.js} +1 -1
  53. package/dist/assets/{chain-DDmwEbOF.js → chain-De_ycb3s.js} +1 -1
  54. package/dist/assets/{click-to-copy-wk3E32eY.js → click-to-copy-BgfWbRfM.js} +1 -1
  55. package/dist/assets/cloneDeep-BBtZ6NeX.js +1 -0
  56. package/dist/assets/{config-navigation-iUuwjLA_.js → config-navigation-CAY0oLM7.js} +3 -3
  57. package/dist/assets/{connect-DGRM2e01.js → connect-DeAl0a0w.js} +1 -1
  58. package/dist/assets/{connect-to-BdinmIba.js → connect-to-TtcHrCpE.js} +1 -1
  59. package/dist/assets/{delete-confirm-C8X53PNk.js → delete-confirm-BCALKic0.js} +1 -1
  60. package/dist/assets/{depsEqual-FU6HOfMn.js → depsEqual-iVI-ppGn.js} +1 -1
  61. package/dist/assets/{detail-BX_klHKR.js → detail-B9b8qEuw.js} +2 -2
  62. package/dist/assets/{domains-DlW2t7QG.js → domains-ilDCawII.js} +1 -1
  63. package/dist/assets/{download-CHMW-VV9.js → download-BLP_P5GN.js} +1 -1
  64. package/dist/assets/{edit.svg-CBqxioRV.js → edit.svg-088QpjsR.js} +1 -1
  65. package/dist/assets/emotion-cache.browser.esm-fPnQyG8C.js +1 -0
  66. package/dist/assets/engine-xHEY-z1Q.js +1 -0
  67. package/dist/assets/{federated-detail-dialog-C93dA_OW.js → federated-detail-dialog-FIBSqJbV.js} +1 -1
  68. package/dist/assets/{get-safe-url-n4nPkbEQ.js → get-safe-url-C0YzO5pG.js} +1 -1
  69. package/dist/assets/getValidReactChildren-BwWzCXzg.js +1 -0
  70. package/dist/assets/{graphql-BOG1t7Ob.js → graphql-DZtbZ5p5.js} +1 -1
  71. package/dist/assets/{graphqlMode-BuOU6E0N.js → graphqlMode-D6b77q6d.js} +2 -2
  72. package/dist/assets/{html-title-DwrWBQUt.js → html-title-wftxlNic.js} +1 -1
  73. package/dist/assets/{iframe-B0inMXzK.js → iframe-CVO90dup.js} +1 -1
  74. package/dist/assets/{index-OZjARxbD.js → index--K9Fm5hg.js} +1 -1
  75. package/dist/assets/{index-pMmL--Md.js → index-2QIyI-hX.js} +1 -1
  76. package/dist/assets/{index-erCgIvu7.js → index-B0mArAvv.js} +1 -1
  77. package/dist/assets/{index-BbnbDlTc.js → index-BApx63vN.js} +1 -1
  78. package/dist/assets/{index-DK8BRrRb.js → index-BTW5KgWm.js} +1 -1
  79. package/dist/assets/{index-CqXuTw4d.js → index-BXslTYRT.js} +1 -1
  80. package/dist/assets/{index-BDQexjSt.js → index-BdA3fNuc.js} +1 -1
  81. package/dist/assets/{index-PzC6rkTH.js → index-BgEoonJf.js} +1 -1
  82. package/dist/assets/{index-_qKxdWY4.js → index-BsxJA--7.js} +1 -1
  83. package/dist/assets/{index-De_3fKYA.js → index-Bt02N9ee.js} +1 -1
  84. package/dist/assets/{index-BFpYSXLl.js → index-BuwIEPLP.js} +3 -3
  85. package/dist/assets/{index-Oah-jRyx.js → index-C6-nc71s.js} +1 -1
  86. package/dist/assets/{index-p8ewFFuc.js → index-C9laDmdO.js} +1 -1
  87. package/dist/assets/{index-BIOcSTv1.js → index-CJtH7ShQ.js} +1 -1
  88. package/dist/assets/{index-CyXVLDQI.js → index-CSC84DXT.js} +1 -1
  89. package/dist/assets/{index-StdVm_EG.js → index-CSRgOtp2.js} +1 -1
  90. package/dist/assets/{index-B01of1n7.js → index-Ce4rkgom.js} +1 -1
  91. package/dist/assets/index-CkfMmvW2.js +1 -0
  92. package/dist/assets/{index-B9oDQ5jy.js → index-Cnc9i7Ak.js} +1 -1
  93. package/dist/assets/{index-Cske9PWb.js → index-DHJJWO6c.js} +3 -3
  94. package/dist/assets/{index-0lc-age1.js → index-DKy5xk6V.js} +1 -1
  95. package/dist/assets/{index-CGJGuomb.js → index-DReJtC5l.js} +3 -3
  96. package/dist/assets/{index-2tPqycMJ.js → index-DSoeY_gC.js} +2 -2
  97. package/dist/assets/{index-D3qtx7de.js → index-DTafCIMf.js} +1 -1
  98. package/dist/assets/{index-DNGIFQtW.js → index-DW68hKiw.js} +1 -1
  99. package/dist/assets/{index-BJsW1I-W.js → index-DWMihgj_.js} +1 -1
  100. package/dist/assets/{index-mGRBDoXw.js → index-DXSDhJsN.js} +1 -1
  101. package/dist/assets/{index-2jRJYLHP.js → index-DdoE1xT5.js} +1 -1
  102. package/dist/assets/{index-dKtf23Ej.js → index-Def_Nrmy.js} +1 -1
  103. package/dist/assets/{index-C5xvmzdD.js → index-DkOCnoPS.js} +1 -1
  104. package/dist/assets/{index-G4GuFOuO.js → index-DrnnoDEf.js} +1 -1
  105. package/dist/assets/{index-7TgPZijh.js → index-DtdZa4Ii.js} +1 -1
  106. package/dist/assets/{index-CP8e2zcP.js → index-Dtj3cePH.js} +4 -4
  107. package/dist/assets/{index-BsmvyFtw.js → index-Fa8vAbIc.js} +1 -1
  108. package/dist/assets/{index-MLCJ7HJV.js → index-GSHwCvc7.js} +1 -1
  109. package/dist/assets/{index-BQ0GXRUy.js → index-KvvUCU7Y.js} +1 -1
  110. package/dist/assets/{index-CRRnOuLM.js → index-OZ9TU2gG.js} +3 -3
  111. package/dist/assets/{index-8K8V7S7h.js → index-TLvz3wdj.js} +1 -1
  112. package/dist/assets/{index-hxHDV4zb.js → index-UjkYO3io.js} +1 -1
  113. package/dist/assets/{index-BPu5OFdR.js → index-XFNKEyIx.js} +1 -1
  114. package/dist/assets/{index-Cm_CX9Km.js → index-YDhLwC2f.js} +1 -1
  115. package/dist/assets/{index-4OvGI3tM.js → index-etYz30nT.js} +1 -1
  116. package/dist/assets/{index-Bg6xcyjD.js → index-f-tffvn9.js} +6 -6
  117. package/dist/assets/{index-DX_ig3IR.js → index-imQtUA1Y.js} +1 -1
  118. package/dist/assets/{index-B8jKymjp.js → index-kfl7onTb.js} +3 -3
  119. package/dist/assets/{index.esm-DjcC6_YD.js → index.esm-KhX4wp--.js} +1 -1
  120. package/dist/assets/{install-from-url-DfM4lxPD.js → install-from-url-B05WE8Ly.js} +1 -1
  121. package/dist/assets/{invitation-CyjIyIIY.js → invitation-BV4-svSZ.js} +1 -1
  122. package/dist/assets/{is-path-prefix-equal-sWdIB_FI.js → is-path-prefix-equal-BxWUya7r.js} +1 -1
  123. package/dist/assets/{isEmail-CpvKmXxu.js → isEmail-DeuFXn6y.js} +1 -1
  124. package/dist/assets/{item-NX8BCXwV.js → item-DI_IF5jI.js} +1 -1
  125. package/dist/assets/{jsonMode-wNz3PCor.js → jsonMode-U78AHGim.js} +1 -1
  126. package/dist/assets/{list-header-DXqt77-Y.js → list-header-B3--_6Bl.js} +1 -1
  127. package/dist/assets/{lite-D7_0Kk8P.js → lite-s4CjMGFV.js} +2 -2
  128. package/dist/assets/{lock.svg-D22_UbmU.js → lock.svg-Cgo551jB.js} +1 -1
  129. package/dist/assets/{log-BtG4l72D.js → log-ll3_FUxN.js} +1 -1
  130. package/dist/assets/{login-method-item-CGUaonon.js → login-method-item-rb7xoaP3.js} +1 -1
  131. package/dist/assets/{lottie-react.esm-Cj9O6Lld.js → lottie-react.esm-B1Y5_TqJ.js} +1 -1
  132. package/dist/assets/{memory-MEOErB2y.js → memory-DzWPIeHP.js} +1 -1
  133. package/dist/assets/{metric-DzrjUE5P.js → metric-DCKs2r9K.js} +1 -1
  134. package/dist/assets/{monaco-editor-i4E7Erh-.js → monaco-editor-3B-B1pdB.js} +3 -3
  135. package/dist/assets/{mouseTarget-DHjy6bBl.js → mouseTarget-BZ5frXuo.js} +1 -1
  136. package/dist/assets/omit-C22NrHjF.js +1 -0
  137. package/dist/assets/{overview-BPSzB7yi.js → overview-Cu4YrIFe.js} +1 -1
  138. package/dist/assets/{permission-D6xGjoP4.js → permission-B-geZ8jf.js} +1 -1
  139. package/dist/assets/{preference-CWfaETuk.js → preference-C8QaexiP.js} +3 -3
  140. package/dist/assets/{provider-icon-D-a204Ay.js → provider-icon-lv3oS7d4.js} +1 -1
  141. package/dist/assets/{raf-schd.esm-vaS856Rv.js → raf-schd.esm-B49R8L3J.js} +1 -1
  142. package/dist/assets/{rotate-session-key-Cn3NVWRi.js → rotate-session-key-BPhFiNZy.js} +1 -1
  143. package/dist/assets/{runtime-BJVsSRvX.js → runtime-DhJ59c5Q.js} +1 -1
  144. package/dist/assets/schema-BwJa8hO6.js +1 -0
  145. package/dist/assets/sdk-Bx_WDGD1.js +1 -0
  146. package/dist/assets/{service-COrrqY-3.js → service-Bad7qk9f.js} +1 -1
  147. package/dist/assets/{shorten-label-j-itDv6J.js → shorten-label-DmKAPPTX.js} +1 -1
  148. package/dist/assets/{simple-select-DApzKMrW.js → simple-select-CHH0_oB5.js} +1 -1
  149. package/dist/assets/{spaces-BqdEt5Dg.js → spaces-BsLjYZLj.js} +1 -1
  150. package/dist/assets/{status-CFw68CfZ.js → status-CcMfecIj.js} +1 -1
  151. package/dist/assets/{status-vwaEURfH.js → status-VF8vuUxF.js} +1 -1
  152. package/dist/assets/{switch-control-BEw34mlq.js → switch-control-CzpP7CIf.js} +1 -1
  153. package/dist/assets/{table-icons-V0nzUvpC.js → table-icons-Bo0tOvqU.js} +1 -1
  154. package/dist/assets/{team-Bp-ehLS6.js → team-cDk0EvPf.js} +1 -1
  155. package/dist/assets/{toLower-C4OoJYWk.js → toLower-D7a3qnvH.js} +1 -1
  156. package/dist/assets/toUpper-B8LTwalX.js +1 -0
  157. package/dist/assets/{traffic-BuuDuC5C.js → traffic-DYynIkpC.js} +1 -1
  158. package/dist/assets/{trim-BrqZEf0Q.js → trim-Diihj-s0.js} +1 -1
  159. package/dist/assets/{url-evaluation-BotqjpOW.js → url-evaluation-D49POKf_.js} +1 -1
  160. package/dist/assets/{url-join-BYRfgTzL.js → url-join-CYWu6vsi.js} +1 -1
  161. package/dist/assets/{use-mobile-BxCxZMSF.js → use-mobile-wKUCaVoo.js} +1 -1
  162. package/dist/assets/{use-mobile-BIorytbM.js → use-mobile-xq_yWBax.js} +1 -1
  163. package/dist/assets/{useAsync-CbHsXkPS.js → useAsync-CLJdaax3.js} +1 -1
  164. package/dist/assets/{useAsyncRetry-6ULbruV9.js → useAsyncRetry-DLctK9N7.js} +1 -1
  165. package/dist/assets/{useLocalStorage-CBx2eW_l.js → useLocalStorage-Dn6UErBV.js} +1 -1
  166. package/dist/assets/{useThemeProps-BWD3Vp6O.js → useThemeProps-9zV1AZbb.js} +1 -1
  167. package/dist/assets/{util-BF2dKFyL.js → util-BVHL76Cg.js} +1 -1
  168. package/dist/assets/{wait-container-Cc0h_2b3.js → wait-container-ClqOwvvu.js} +1 -1
  169. package/dist/assets/{without-wallet-lUjEmpWw.js → without-wallet-BzLoVl__.js} +1 -1
  170. package/dist/assets/wrap-locale-CowysH2k.js +1 -0
  171. package/dist/index.html +1 -1
  172. package/package.json +1 -1
  173. package/dist/assets/ArrowDropDown-C1ynmK1V.js +0 -1
  174. package/dist/assets/api-DBq1KtcA.js +0 -1
  175. package/dist/assets/cloneDeep-BEJXcFgb.js +0 -1
  176. package/dist/assets/emotion-cache.browser.esm-D6kXFXIA.js +0 -1
  177. package/dist/assets/engine-hQAyActy.js +0 -1
  178. package/dist/assets/getValidReactChildren-dJeDeNuf.js +0 -1
  179. package/dist/assets/index-1nsTMIEw.js +0 -1
  180. package/dist/assets/omit-C1X-CRrb.js +0 -1
  181. package/dist/assets/schema-DeNYz3hJ.js +0 -1
  182. package/dist/assets/sdk-CyaYnqk4.js +0 -1
  183. package/dist/assets/toUpper-P-IpqDCE.js +0 -1
  184. package/dist/assets/wrap-locale-CF87ubG3.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as Q,bj as Vt,j as d,B as ee,gv as It,bF as fe,fz as Ge,gw as Qt,b7 as ht,gx as kr,gy as Yt,k as ae,cz as Cr,gz as ft,gA as ze,b6 as Ue,af as _e,cB as et,gB as Ve,gu as jt,gC as Sr,gD as _r,gE as Ar,gF as Pr,o as f,z as Zt,gG as Xt,cs as St,gH as Mr,gI as We,ac as Ye,C as pt,ae as Re,d8 as ie,gJ as Et,gK as Ir,gL as zt,dB as Jt,aB as jr,ay as Gt,gM as er,gN as Xe,gO as qt,au as tr,gP as _t,x as Er,gQ as qr,ao as yt,gR as Lr,gS as at,H as Tr,gT as Or,gU as rr,J as Qe,d9 as Rr,gV as nr,ci as or,cj as Dr,ck as ct,gW as zr,e5 as $r,gX as Br,f$ as $t,gY as De,gZ as ir,w as ut,g_ as sr,g$ as ot,h0 as it,h1 as Wr,h2 as Ur,h3 as Bt,eS as Nr,b9 as Fr,ba as Hr,h4 as Kr,ab as gt,h5 as Vr,X as At,ad as Lt,ax as Qr,M as Yr,h6 as Zr,h7 as Xr,i as Jr,h8 as Gr,h9 as en,ha as bt,di as Wt,hb as lt,g1 as tn,hc as rn,c1 as nn,hd as on,P as sn,he as an,hf as ln,hg as cn,hh as un,dj as dn,hi as Pt}from"./index-CP8e2zcP.js";import{M as tt}from"./provider-icon-D-a204Ay.js";import{y as hn}from"./index-DX_ig3IR.js";import{R as mt}from"./login-method-item-CGUaonon.js";import{U as pn}from"./actions-DR8B4Taf.js";import{t as Ut}from"./trim-BrqZEf0Q.js";import"./passkey-rounded-_WDHIZVd.js";import"./isEmail-CpvKmXxu.js";function fn(A,g){const l=Q.useRef();Q.useEffect(()=>{l.current=A},[A]),Q.useEffect(()=>{function S(){l.current()}if(g!==null){const y=setInterval(S,g);return()=>clearInterval(y)}},[g])}const gn="wallet_url",Tt=()=>window.localStorage.getItem(gn)||window.env?.webWalletUrl||window.blocklet?.webWalletUrl||"https://web.abtwallet.io/",ar=A=>{const{protocol:g}=window.location;let l="";try{l=new URL(A).protocol}catch{l=""}return g===l};var dt={exports:{}},mn=dt.exports,Nt;function vn(){return Nt||(Nt=1,(function(A,g){(function(l,S){A.exports=S()})(mn,(function(){return(()=>{var l={192:(P,h)=>{var v,j,R=(function(){var L=function(x,p){var _=x,w=D[p],u=null,M=0,T=null,m=[],q={},he=function(o,e){u=(function(t){for(var r=new Array(t),n=0;n<t;n+=1){r[n]=new Array(t);for(var s=0;s<t;s+=1)r[n][s]=null}return r})(M=4*_+17),te(0,0),te(M-7,0),te(0,M-7),N(),U(),re(o,e),_>=7&&G(o),T==null&&(T=Pe(_,w,m)),me(T,e)},te=function(o,e){for(var t=-1;t<=7;t+=1)if(!(o+t<=-1||M<=o+t))for(var r=-1;r<=7;r+=1)e+r<=-1||M<=e+r||(u[o+t][e+r]=0<=t&&t<=6&&(r==0||r==6)||0<=r&&r<=6&&(t==0||t==6)||2<=t&&t<=4&&2<=r&&r<=4)},U=function(){for(var o=8;o<M-8;o+=1)u[o][6]==null&&(u[o][6]=o%2==0);for(var e=8;e<M-8;e+=1)u[6][e]==null&&(u[6][e]=e%2==0)},N=function(){for(var o=a.getPatternPosition(_),e=0;e<o.length;e+=1)for(var t=0;t<o.length;t+=1){var r=o[e],n=o[t];if(u[r][n]==null)for(var s=-2;s<=2;s+=1)for(var i=-2;i<=2;i+=1)u[r+s][n+i]=s==-2||s==2||i==-2||i==2||s==0&&i==0}},G=function(o){for(var e=a.getBCHTypeNumber(_),t=0;t<18;t+=1){var r=!o&&(e>>t&1)==1;u[Math.floor(t/3)][t%3+M-8-3]=r}for(t=0;t<18;t+=1)r=!o&&(e>>t&1)==1,u[t%3+M-8-3][Math.floor(t/3)]=r},re=function(o,e){for(var t=w<<3|e,r=a.getBCHTypeInfo(t),n=0;n<15;n+=1){var s=!o&&(r>>n&1)==1;n<6?u[n][8]=s:n<8?u[n+1][8]=s:u[M-15+n][8]=s}for(n=0;n<15;n+=1)s=!o&&(r>>n&1)==1,n<8?u[8][M-n-1]=s:n<9?u[8][15-n-1+1]=s:u[8][15-n-1]=s;u[M-8][8]=!o},me=function(o,e){for(var t=-1,r=M-1,n=7,s=0,i=a.getMaskFunction(e),b=M-1;b>0;b-=2)for(b==6&&(b-=1);;){for(var k=0;k<2;k+=1)if(u[r][b-k]==null){var C=!1;s<o.length&&(C=(o[s]>>>n&1)==1),i(r,b-k)&&(C=!C),u[r][b-k]=C,(n-=1)==-1&&(s+=1,n=7)}if((r+=t)<0||M<=r){r-=t,t=-t;break}}},Pe=function(o,e,t){for(var r=B.getRSBlocks(o,e),n=H(),s=0;s<t.length;s+=1){var i=t[s];n.put(i.getMode(),4),n.put(i.getLength(),a.getLengthInBits(i.getMode(),o)),i.write(n)}var b=0;for(s=0;s<r.length;s+=1)b+=r[s].dataCount;if(n.getLengthInBits()>8*b)throw"code length overflow. ("+n.getLengthInBits()+">"+8*b+")";for(n.getLengthInBits()+4<=8*b&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(!1);for(;!(n.getLengthInBits()>=8*b||(n.put(236,8),n.getLengthInBits()>=8*b));)n.put(17,8);return(function(k,C){for(var c=0,z=0,ne=0,Y=new Array(C.length),O=new Array(C.length),$=0;$<C.length;$+=1){var se=C[$].dataCount,ye=C[$].totalCount-se;z=Math.max(z,se),ne=Math.max(ne,ye),Y[$]=new Array(se);for(var V=0;V<Y[$].length;V+=1)Y[$][V]=255&k.getBuffer()[V+c];c+=se;var ce=a.getErrorCorrectPolynomial(ye),Z=X(Y[$],ce.getLength()-1).mod(ce);for(O[$]=new Array(ce.getLength()-1),V=0;V<O[$].length;V+=1){var oe=V+Z.getLength()-O[$].length;O[$][V]=oe>=0?Z.getAt(oe):0}}var ve=0;for(V=0;V<C.length;V+=1)ve+=C[V].totalCount;var be=new Array(ve),pe=0;for(V=0;V<z;V+=1)for($=0;$<C.length;$+=1)V<Y[$].length&&(be[pe]=Y[$][V],pe+=1);for(V=0;V<ne;V+=1)for($=0;$<C.length;$+=1)V<O[$].length&&(be[pe]=O[$][V],pe+=1);return be})(n,r)};q.addData=function(o,e){var t=null;switch(e=e||"Byte"){case"Numeric":t=ge(o);break;case"Alphanumeric":t=le(o);break;case"Byte":t=Ce(o);break;case"Kanji":t=ke(o);break;default:throw"mode:"+e}m.push(t),T=null},q.isDark=function(o,e){if(o<0||M<=o||e<0||M<=e)throw o+","+e;return u[o][e]},q.getModuleCount=function(){return M},q.make=function(){if(_<1){for(var o=1;o<40;o++){for(var e=B.getRSBlocks(o,w),t=H(),r=0;r<m.length;r++){var n=m[r];t.put(n.getMode(),4),t.put(n.getLength(),a.getLengthInBits(n.getMode(),o)),n.write(t)}var s=0;for(r=0;r<e.length;r++)s+=e[r].dataCount;if(t.getLengthInBits()<=8*s)break}_=o}he(!1,(function(){for(var i=0,b=0,k=0;k<8;k+=1){he(!0,k);var C=a.getLostPoint(q);(k==0||i>C)&&(i=C,b=k)}return b})())},q.createTableTag=function(o,e){o=o||2;var t="";t+='<table style="',t+=" border-width: 0px; border-style: none;",t+=" border-collapse: collapse;",t+=" padding: 0px; margin: "+(e=e===void 0?4*o:e)+"px;",t+='">',t+="<tbody>";for(var r=0;r<q.getModuleCount();r+=1){t+="<tr>";for(var n=0;n<q.getModuleCount();n+=1)t+='<td style="',t+=" border-width: 0px; border-style: none;",t+=" border-collapse: collapse;",t+=" padding: 0px; margin: 0px;",t+=" width: "+o+"px;",t+=" height: "+o+"px;",t+=" background-color: ",t+=q.isDark(r,n)?"#000000":"#ffffff",t+=";",t+='"/>';t+="</tr>"}return(t+="</tbody>")+"</table>"},q.createSvgTag=function(o,e,t,r){var n={};typeof arguments[0]=="object"&&(o=(n=arguments[0]).cellSize,e=n.margin,t=n.alt,r=n.title),o=o||2,e=e===void 0?4*o:e,(t=typeof t=="string"?{text:t}:t||{}).text=t.text||null,t.id=t.text?t.id||"qrcode-description":null,(r=typeof r=="string"?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-title":null;var s,i,b,k,C=q.getModuleCount()*o+2*e,c="";for(k="l"+o+",0 0,"+o+" -"+o+",0 0,-"+o+"z ",c+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',c+=n.scalable?"":' width="'+C+'px" height="'+C+'px"',c+=' viewBox="0 0 '+C+" "+C+'" ',c+=' preserveAspectRatio="xMinYMin meet"',c+=r.text||t.text?' role="img" aria-labelledby="'+de([r.id,t.id].join(" ").trim())+'"':"",c+=">",c+=r.text?'<title id="'+de(r.id)+'">'+de(r.text)+"</title>":"",c+=t.text?'<description id="'+de(t.id)+'">'+de(t.text)+"</description>":"",c+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',c+='<path d="',i=0;i<q.getModuleCount();i+=1)for(b=i*o+e,s=0;s<q.getModuleCount();s+=1)q.isDark(i,s)&&(c+="M"+(s*o+e)+","+b+k);return(c+='" stroke="transparent" fill="black"/>')+"</svg>"},q.createDataURL=function(o,e){o=o||2,e=e===void 0?4*o:e;var t=q.getModuleCount()*o+2*e,r=e,n=t-e;return we(t,t,(function(s,i){if(r<=s&&s<n&&r<=i&&i<n){var b=Math.floor((s-r)/o),k=Math.floor((i-r)/o);return q.isDark(k,b)?0:1}return 1}))},q.createImgTag=function(o,e,t){o=o||2,e=e===void 0?4*o:e;var r=q.getModuleCount()*o+2*e,n="";return n+="<img",n+=' src="',n+=q.createDataURL(o,e),n+='"',n+=' width="',n+=r,n+='"',n+=' height="',n+=r,n+='"',t&&(n+=' alt="',n+=de(t),n+='"'),n+"/>"};var de=function(o){for(var e="",t=0;t<o.length;t+=1){var r=o.charAt(t);switch(r){case"<":e+="&lt;";break;case">":e+="&gt;";break;case"&":e+="&amp;";break;case'"':e+="&quot;";break;default:e+=r}}return e};return q.createASCII=function(o,e){if((o=o||1)<2)return(function(Y){Y=Y===void 0?2:Y;var O,$,se,ye,V,ce=1*q.getModuleCount()+2*Y,Z=Y,oe=ce-Y,ve={"██":"█","█ ":"▀"," █":"▄"," ":" "},be={"██":"▀","█ ":"▀"," █":" "," ":" "},pe="";for(O=0;O<ce;O+=2){for(se=Math.floor((O-Z)/1),ye=Math.floor((O+1-Z)/1),$=0;$<ce;$+=1)V="█",Z<=$&&$<oe&&Z<=O&&O<oe&&q.isDark(se,Math.floor(($-Z)/1))&&(V=" "),Z<=$&&$<oe&&Z<=O+1&&O+1<oe&&q.isDark(ye,Math.floor(($-Z)/1))?V+=" ":V+="█",pe+=Y<1&&O+1>=oe?be[V]:ve[V];pe+=`
1
+ import{r as Q,bj as Vt,j as d,B as ee,gv as It,bF as fe,fz as Ge,gw as Qt,b7 as ht,gx as kr,gy as Yt,k as ae,cz as Cr,gz as ft,gA as ze,b6 as Ue,af as _e,cB as et,gB as Ve,gu as jt,gC as Sr,gD as _r,gE as Ar,gF as Pr,o as f,z as Zt,gG as Xt,cs as St,gH as Mr,gI as We,ac as Ye,C as pt,ae as Re,d8 as ie,gJ as Et,gK as Ir,gL as zt,dB as Jt,aB as jr,ay as Gt,gM as er,gN as Xe,gO as qt,au as tr,gP as _t,x as Er,gQ as qr,ao as yt,gR as Lr,gS as at,H as Tr,gT as Or,gU as rr,J as Qe,d9 as Rr,gV as nr,ci as or,cj as Dr,ck as ct,gW as zr,e5 as $r,gX as Br,f$ as $t,gY as De,gZ as ir,w as ut,g_ as sr,g$ as ot,h0 as it,h1 as Wr,h2 as Ur,h3 as Bt,eS as Nr,b9 as Fr,ba as Hr,h4 as Kr,ab as gt,h5 as Vr,X as At,ad as Lt,ax as Qr,M as Yr,h6 as Zr,h7 as Xr,i as Jr,h8 as Gr,h9 as en,ha as bt,di as Wt,hb as lt,g1 as tn,hc as rn,c1 as nn,hd as on,P as sn,he as an,hf as ln,hg as cn,hh as un,dj as dn,hi as Pt}from"./index-Dtj3cePH.js";import{M as tt}from"./provider-icon-lv3oS7d4.js";import{y as hn}from"./index-imQtUA1Y.js";import{R as mt}from"./login-method-item-rb7xoaP3.js";import{U as pn}from"./actions-TKbswZRW.js";import{t as Ut}from"./trim-Diihj-s0.js";import"./passkey-rounded-_WDHIZVd.js";import"./isEmail-DeuFXn6y.js";function fn(A,g){const l=Q.useRef();Q.useEffect(()=>{l.current=A},[A]),Q.useEffect(()=>{function S(){l.current()}if(g!==null){const y=setInterval(S,g);return()=>clearInterval(y)}},[g])}const gn="wallet_url",Tt=()=>window.localStorage.getItem(gn)||window.env?.webWalletUrl||window.blocklet?.webWalletUrl||"https://web.abtwallet.io/",ar=A=>{const{protocol:g}=window.location;let l="";try{l=new URL(A).protocol}catch{l=""}return g===l};var dt={exports:{}},mn=dt.exports,Nt;function vn(){return Nt||(Nt=1,(function(A,g){(function(l,S){A.exports=S()})(mn,(function(){return(()=>{var l={192:(P,h)=>{var v,j,R=(function(){var L=function(x,p){var _=x,w=D[p],u=null,M=0,T=null,m=[],q={},he=function(o,e){u=(function(t){for(var r=new Array(t),n=0;n<t;n+=1){r[n]=new Array(t);for(var s=0;s<t;s+=1)r[n][s]=null}return r})(M=4*_+17),te(0,0),te(M-7,0),te(0,M-7),N(),U(),re(o,e),_>=7&&G(o),T==null&&(T=Pe(_,w,m)),me(T,e)},te=function(o,e){for(var t=-1;t<=7;t+=1)if(!(o+t<=-1||M<=o+t))for(var r=-1;r<=7;r+=1)e+r<=-1||M<=e+r||(u[o+t][e+r]=0<=t&&t<=6&&(r==0||r==6)||0<=r&&r<=6&&(t==0||t==6)||2<=t&&t<=4&&2<=r&&r<=4)},U=function(){for(var o=8;o<M-8;o+=1)u[o][6]==null&&(u[o][6]=o%2==0);for(var e=8;e<M-8;e+=1)u[6][e]==null&&(u[6][e]=e%2==0)},N=function(){for(var o=a.getPatternPosition(_),e=0;e<o.length;e+=1)for(var t=0;t<o.length;t+=1){var r=o[e],n=o[t];if(u[r][n]==null)for(var s=-2;s<=2;s+=1)for(var i=-2;i<=2;i+=1)u[r+s][n+i]=s==-2||s==2||i==-2||i==2||s==0&&i==0}},G=function(o){for(var e=a.getBCHTypeNumber(_),t=0;t<18;t+=1){var r=!o&&(e>>t&1)==1;u[Math.floor(t/3)][t%3+M-8-3]=r}for(t=0;t<18;t+=1)r=!o&&(e>>t&1)==1,u[t%3+M-8-3][Math.floor(t/3)]=r},re=function(o,e){for(var t=w<<3|e,r=a.getBCHTypeInfo(t),n=0;n<15;n+=1){var s=!o&&(r>>n&1)==1;n<6?u[n][8]=s:n<8?u[n+1][8]=s:u[M-15+n][8]=s}for(n=0;n<15;n+=1)s=!o&&(r>>n&1)==1,n<8?u[8][M-n-1]=s:n<9?u[8][15-n-1+1]=s:u[8][15-n-1]=s;u[M-8][8]=!o},me=function(o,e){for(var t=-1,r=M-1,n=7,s=0,i=a.getMaskFunction(e),b=M-1;b>0;b-=2)for(b==6&&(b-=1);;){for(var k=0;k<2;k+=1)if(u[r][b-k]==null){var C=!1;s<o.length&&(C=(o[s]>>>n&1)==1),i(r,b-k)&&(C=!C),u[r][b-k]=C,(n-=1)==-1&&(s+=1,n=7)}if((r+=t)<0||M<=r){r-=t,t=-t;break}}},Pe=function(o,e,t){for(var r=B.getRSBlocks(o,e),n=H(),s=0;s<t.length;s+=1){var i=t[s];n.put(i.getMode(),4),n.put(i.getLength(),a.getLengthInBits(i.getMode(),o)),i.write(n)}var b=0;for(s=0;s<r.length;s+=1)b+=r[s].dataCount;if(n.getLengthInBits()>8*b)throw"code length overflow. ("+n.getLengthInBits()+">"+8*b+")";for(n.getLengthInBits()+4<=8*b&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(!1);for(;!(n.getLengthInBits()>=8*b||(n.put(236,8),n.getLengthInBits()>=8*b));)n.put(17,8);return(function(k,C){for(var c=0,z=0,ne=0,Y=new Array(C.length),O=new Array(C.length),$=0;$<C.length;$+=1){var se=C[$].dataCount,ye=C[$].totalCount-se;z=Math.max(z,se),ne=Math.max(ne,ye),Y[$]=new Array(se);for(var V=0;V<Y[$].length;V+=1)Y[$][V]=255&k.getBuffer()[V+c];c+=se;var ce=a.getErrorCorrectPolynomial(ye),Z=X(Y[$],ce.getLength()-1).mod(ce);for(O[$]=new Array(ce.getLength()-1),V=0;V<O[$].length;V+=1){var oe=V+Z.getLength()-O[$].length;O[$][V]=oe>=0?Z.getAt(oe):0}}var ve=0;for(V=0;V<C.length;V+=1)ve+=C[V].totalCount;var be=new Array(ve),pe=0;for(V=0;V<z;V+=1)for($=0;$<C.length;$+=1)V<Y[$].length&&(be[pe]=Y[$][V],pe+=1);for(V=0;V<ne;V+=1)for($=0;$<C.length;$+=1)V<O[$].length&&(be[pe]=O[$][V],pe+=1);return be})(n,r)};q.addData=function(o,e){var t=null;switch(e=e||"Byte"){case"Numeric":t=ge(o);break;case"Alphanumeric":t=le(o);break;case"Byte":t=Ce(o);break;case"Kanji":t=ke(o);break;default:throw"mode:"+e}m.push(t),T=null},q.isDark=function(o,e){if(o<0||M<=o||e<0||M<=e)throw o+","+e;return u[o][e]},q.getModuleCount=function(){return M},q.make=function(){if(_<1){for(var o=1;o<40;o++){for(var e=B.getRSBlocks(o,w),t=H(),r=0;r<m.length;r++){var n=m[r];t.put(n.getMode(),4),t.put(n.getLength(),a.getLengthInBits(n.getMode(),o)),n.write(t)}var s=0;for(r=0;r<e.length;r++)s+=e[r].dataCount;if(t.getLengthInBits()<=8*s)break}_=o}he(!1,(function(){for(var i=0,b=0,k=0;k<8;k+=1){he(!0,k);var C=a.getLostPoint(q);(k==0||i>C)&&(i=C,b=k)}return b})())},q.createTableTag=function(o,e){o=o||2;var t="";t+='<table style="',t+=" border-width: 0px; border-style: none;",t+=" border-collapse: collapse;",t+=" padding: 0px; margin: "+(e=e===void 0?4*o:e)+"px;",t+='">',t+="<tbody>";for(var r=0;r<q.getModuleCount();r+=1){t+="<tr>";for(var n=0;n<q.getModuleCount();n+=1)t+='<td style="',t+=" border-width: 0px; border-style: none;",t+=" border-collapse: collapse;",t+=" padding: 0px; margin: 0px;",t+=" width: "+o+"px;",t+=" height: "+o+"px;",t+=" background-color: ",t+=q.isDark(r,n)?"#000000":"#ffffff",t+=";",t+='"/>';t+="</tr>"}return(t+="</tbody>")+"</table>"},q.createSvgTag=function(o,e,t,r){var n={};typeof arguments[0]=="object"&&(o=(n=arguments[0]).cellSize,e=n.margin,t=n.alt,r=n.title),o=o||2,e=e===void 0?4*o:e,(t=typeof t=="string"?{text:t}:t||{}).text=t.text||null,t.id=t.text?t.id||"qrcode-description":null,(r=typeof r=="string"?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-title":null;var s,i,b,k,C=q.getModuleCount()*o+2*e,c="";for(k="l"+o+",0 0,"+o+" -"+o+",0 0,-"+o+"z ",c+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',c+=n.scalable?"":' width="'+C+'px" height="'+C+'px"',c+=' viewBox="0 0 '+C+" "+C+'" ',c+=' preserveAspectRatio="xMinYMin meet"',c+=r.text||t.text?' role="img" aria-labelledby="'+de([r.id,t.id].join(" ").trim())+'"':"",c+=">",c+=r.text?'<title id="'+de(r.id)+'">'+de(r.text)+"</title>":"",c+=t.text?'<description id="'+de(t.id)+'">'+de(t.text)+"</description>":"",c+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',c+='<path d="',i=0;i<q.getModuleCount();i+=1)for(b=i*o+e,s=0;s<q.getModuleCount();s+=1)q.isDark(i,s)&&(c+="M"+(s*o+e)+","+b+k);return(c+='" stroke="transparent" fill="black"/>')+"</svg>"},q.createDataURL=function(o,e){o=o||2,e=e===void 0?4*o:e;var t=q.getModuleCount()*o+2*e,r=e,n=t-e;return we(t,t,(function(s,i){if(r<=s&&s<n&&r<=i&&i<n){var b=Math.floor((s-r)/o),k=Math.floor((i-r)/o);return q.isDark(k,b)?0:1}return 1}))},q.createImgTag=function(o,e,t){o=o||2,e=e===void 0?4*o:e;var r=q.getModuleCount()*o+2*e,n="";return n+="<img",n+=' src="',n+=q.createDataURL(o,e),n+='"',n+=' width="',n+=r,n+='"',n+=' height="',n+=r,n+='"',t&&(n+=' alt="',n+=de(t),n+='"'),n+"/>"};var de=function(o){for(var e="",t=0;t<o.length;t+=1){var r=o.charAt(t);switch(r){case"<":e+="&lt;";break;case">":e+="&gt;";break;case"&":e+="&amp;";break;case'"':e+="&quot;";break;default:e+=r}}return e};return q.createASCII=function(o,e){if((o=o||1)<2)return(function(Y){Y=Y===void 0?2:Y;var O,$,se,ye,V,ce=1*q.getModuleCount()+2*Y,Z=Y,oe=ce-Y,ve={"██":"█","█ ":"▀"," █":"▄"," ":" "},be={"██":"▀","█ ":"▀"," █":" "," ":" "},pe="";for(O=0;O<ce;O+=2){for(se=Math.floor((O-Z)/1),ye=Math.floor((O+1-Z)/1),$=0;$<ce;$+=1)V="█",Z<=$&&$<oe&&Z<=O&&O<oe&&q.isDark(se,Math.floor(($-Z)/1))&&(V=" "),Z<=$&&$<oe&&Z<=O+1&&O+1<oe&&q.isDark(ye,Math.floor(($-Z)/1))?V+=" ":V+="█",pe+=Y<1&&O+1>=oe?be[V]:ve[V];pe+=`
2
2
  `}return ce%2&&Y>0?pe.substring(0,pe.length-ce-1)+Array(ce+1).join("▀"):pe.substring(0,pe.length-1)})(e);o-=1,e=e===void 0?2*o:e;var t,r,n,s,i=q.getModuleCount()*o+2*e,b=e,k=i-e,C=Array(o+1).join("██"),c=Array(o+1).join(" "),z="",ne="";for(t=0;t<i;t+=1){for(n=Math.floor((t-b)/o),ne="",r=0;r<i;r+=1)s=1,b<=r&&r<k&&b<=t&&t<k&&q.isDark(n,Math.floor((r-b)/o))&&(s=0),ne+=s?C:c;for(n=0;n<o;n+=1)z+=ne+`
3
3
  `}return z.substring(0,z.length-1)},q.renderTo2dContext=function(o,e){e=e||2;for(var t=q.getModuleCount(),r=0;r<t;r++)for(var n=0;n<t;n++)o.fillStyle=q.isDark(r,n)?"black":"white",o.fillRect(r*e,n*e,e,e)},q};L.stringToBytes=(L.stringToBytesFuncs={default:function(x){for(var p=[],_=0;_<x.length;_+=1){var w=x.charCodeAt(_);p.push(255&w)}return p}}).default,L.createStringToBytes=function(x,p){var _=(function(){for(var u=Ie(x),M=function(){var U=u.read();if(U==-1)throw"eof";return U},T=0,m={};;){var q=u.read();if(q==-1)break;var he=M(),te=M()<<8|M();m[String.fromCharCode(q<<8|he)]=te,T+=1}if(T!=p)throw T+" != "+p;return m})(),w=63;return function(u){for(var M=[],T=0;T<u.length;T+=1){var m=u.charCodeAt(T);if(m<128)M.push(m);else{var q=_[u.charAt(T)];typeof q=="number"?(255&q)==q?M.push(q):(M.push(q>>>8),M.push(255&q)):M.push(w)}}return M}};var W,I,K,E,J,D={L:1,M:0,Q:3,H:2},a=(W=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],I=1335,K=7973,J=function(x){for(var p=0;x!=0;)p+=1,x>>>=1;return p},(E={}).getBCHTypeInfo=function(x){for(var p=x<<10;J(p)-J(I)>=0;)p^=I<<J(p)-J(I);return 21522^(x<<10|p)},E.getBCHTypeNumber=function(x){for(var p=x<<12;J(p)-J(K)>=0;)p^=K<<J(p)-J(K);return x<<12|p},E.getPatternPosition=function(x){return W[x-1]},E.getMaskFunction=function(x){switch(x){case 0:return function(p,_){return(p+_)%2==0};case 1:return function(p,_){return p%2==0};case 2:return function(p,_){return _%3==0};case 3:return function(p,_){return(p+_)%3==0};case 4:return function(p,_){return(Math.floor(p/2)+Math.floor(_/3))%2==0};case 5:return function(p,_){return p*_%2+p*_%3==0};case 6:return function(p,_){return(p*_%2+p*_%3)%2==0};case 7:return function(p,_){return(p*_%3+(p+_)%2)%2==0};default:throw"bad maskPattern:"+x}},E.getErrorCorrectPolynomial=function(x){for(var p=X([1],0),_=0;_<x;_+=1)p=p.multiply(X([1,F.gexp(_)],0));return p},E.getLengthInBits=function(x,p){if(1<=p&&p<10)switch(x){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+x}else if(p<27)switch(x){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+x}else{if(!(p<41))throw"type:"+p;switch(x){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+x}}},E.getLostPoint=function(x){for(var p=x.getModuleCount(),_=0,w=0;w<p;w+=1)for(var u=0;u<p;u+=1){for(var M=0,T=x.isDark(w,u),m=-1;m<=1;m+=1)if(!(w+m<0||p<=w+m))for(var q=-1;q<=1;q+=1)u+q<0||p<=u+q||m==0&&q==0||T==x.isDark(w+m,u+q)&&(M+=1);M>5&&(_+=3+M-5)}for(w=0;w<p-1;w+=1)for(u=0;u<p-1;u+=1){var he=0;x.isDark(w,u)&&(he+=1),x.isDark(w+1,u)&&(he+=1),x.isDark(w,u+1)&&(he+=1),x.isDark(w+1,u+1)&&(he+=1),he!=0&&he!=4||(_+=3)}for(w=0;w<p;w+=1)for(u=0;u<p-6;u+=1)x.isDark(w,u)&&!x.isDark(w,u+1)&&x.isDark(w,u+2)&&x.isDark(w,u+3)&&x.isDark(w,u+4)&&!x.isDark(w,u+5)&&x.isDark(w,u+6)&&(_+=40);for(u=0;u<p;u+=1)for(w=0;w<p-6;w+=1)x.isDark(w,u)&&!x.isDark(w+1,u)&&x.isDark(w+2,u)&&x.isDark(w+3,u)&&x.isDark(w+4,u)&&!x.isDark(w+5,u)&&x.isDark(w+6,u)&&(_+=40);var te=0;for(u=0;u<p;u+=1)for(w=0;w<p;w+=1)x.isDark(w,u)&&(te+=1);return _+Math.abs(100*te/p/p-50)/5*10},E),F=(function(){for(var x=new Array(256),p=new Array(256),_=0;_<8;_+=1)x[_]=1<<_;for(_=8;_<256;_+=1)x[_]=x[_-4]^x[_-5]^x[_-6]^x[_-8];for(_=0;_<255;_+=1)p[x[_]]=_;return{glog:function(w){if(w<1)throw"glog("+w+")";return p[w]},gexp:function(w){for(;w<0;)w+=255;for(;w>=256;)w-=255;return x[w]}}})();function X(x,p){if(x.length===void 0)throw x.length+"/"+p;var _=(function(){for(var u=0;u<x.length&&x[u]==0;)u+=1;for(var M=new Array(x.length-u+p),T=0;T<x.length-u;T+=1)M[T]=x[T+u];return M})(),w={getAt:function(u){return _[u]},getLength:function(){return _.length},multiply:function(u){for(var M=new Array(w.getLength()+u.getLength()-1),T=0;T<w.getLength();T+=1)for(var m=0;m<u.getLength();m+=1)M[T+m]^=F.gexp(F.glog(w.getAt(T))+F.glog(u.getAt(m)));return X(M,0)},mod:function(u){if(w.getLength()-u.getLength()<0)return w;for(var M=F.glog(w.getAt(0))-F.glog(u.getAt(0)),T=new Array(w.getLength()),m=0;m<w.getLength();m+=1)T[m]=w.getAt(m);for(m=0;m<u.getLength();m+=1)T[m]^=F.gexp(F.glog(u.getAt(m))+M);return X(T,0).mod(u)}};return w}var B=(function(){var x=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],p=function(w,u){var M={};return M.totalCount=w,M.dataCount=u,M},_={getRSBlocks:function(w,u){var M=(function(G,re){switch(re){case D.L:return x[4*(G-1)+0];case D.M:return x[4*(G-1)+1];case D.Q:return x[4*(G-1)+2];case D.H:return x[4*(G-1)+3];default:return}})(w,u);if(M===void 0)throw"bad rs block @ typeNumber:"+w+"/errorCorrectionLevel:"+u;for(var T=M.length/3,m=[],q=0;q<T;q+=1)for(var he=M[3*q+0],te=M[3*q+1],U=M[3*q+2],N=0;N<he;N+=1)m.push(p(te,U));return m}};return _})(),H=function(){var x=[],p=0,_={getBuffer:function(){return x},getAt:function(w){var u=Math.floor(w/8);return(x[u]>>>7-w%8&1)==1},put:function(w,u){for(var M=0;M<u;M+=1)_.putBit((w>>>u-M-1&1)==1)},getLengthInBits:function(){return p},putBit:function(w){var u=Math.floor(p/8);x.length<=u&&x.push(0),w&&(x[u]|=128>>>p%8),p+=1}};return _},ge=function(x){var p=x,_={getMode:function(){return 1},getLength:function(M){return p.length},write:function(M){for(var T=p,m=0;m+2<T.length;)M.put(w(T.substring(m,m+3)),10),m+=3;m<T.length&&(T.length-m==1?M.put(w(T.substring(m,m+1)),4):T.length-m==2&&M.put(w(T.substring(m,m+2)),7))}},w=function(M){for(var T=0,m=0;m<M.length;m+=1)T=10*T+u(M.charAt(m));return T},u=function(M){if("0"<=M&&M<="9")return M.charCodeAt(0)-48;throw"illegal char :"+M};return _},le=function(x){var p=x,_={getMode:function(){return 2},getLength:function(u){return p.length},write:function(u){for(var M=p,T=0;T+1<M.length;)u.put(45*w(M.charAt(T))+w(M.charAt(T+1)),11),T+=2;T<M.length&&u.put(w(M.charAt(T)),6)}},w=function(u){if("0"<=u&&u<="9")return u.charCodeAt(0)-48;if("A"<=u&&u<="Z")return u.charCodeAt(0)-65+10;switch(u){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+u}};return _},Ce=function(x){var p=L.stringToBytes(x);return{getMode:function(){return 4},getLength:function(_){return p.length},write:function(_){for(var w=0;w<p.length;w+=1)_.put(p[w],8)}}},ke=function(x){var p=L.stringToBytesFuncs.SJIS;if(!p)throw"sjis not supported.";(function(u,M){var T=p("友");if(T.length!=2||(T[0]<<8|T[1])!=38726)throw"sjis not supported."})();var _=p(x),w={getMode:function(){return 8},getLength:function(u){return~~(_.length/2)},write:function(u){for(var M=_,T=0;T+1<M.length;){var m=(255&M[T])<<8|255&M[T+1];if(33088<=m&&m<=40956)m-=33088;else{if(!(57408<=m&&m<=60351))throw"illegal char at "+(T+1)+"/"+m;m-=49472}m=192*(m>>>8&255)+(255&m),u.put(m,13),T+=2}if(T<M.length)throw"illegal char at "+(T+1)}};return w},ue=function(){var x=[],p={writeByte:function(_){x.push(255&_)},writeShort:function(_){p.writeByte(_),p.writeByte(_>>>8)},writeBytes:function(_,w,u){w=w||0,u=u||_.length;for(var M=0;M<u;M+=1)p.writeByte(_[M+w])},writeString:function(_){for(var w=0;w<_.length;w+=1)p.writeByte(_.charCodeAt(w))},toByteArray:function(){return x},toString:function(){var _="";_+="[";for(var w=0;w<x.length;w+=1)w>0&&(_+=","),_+=x[w];return _+"]"}};return p},Ie=function(x){var p=x,_=0,w=0,u=0,M={read:function(){for(;u<8;){if(_>=p.length){if(u==0)return-1;throw"unexpected end of file./"+u}var m=p.charAt(_);if(_+=1,m=="=")return u=0,-1;m.match(/^\s$/)||(w=w<<6|T(m.charCodeAt(0)),u+=6)}var q=w>>>u-8&255;return u-=8,q}},T=function(m){if(65<=m&&m<=90)return m-65;if(97<=m&&m<=122)return m-97+26;if(48<=m&&m<=57)return m-48+52;if(m==43)return 62;if(m==47)return 63;throw"c:"+m};return M},we=function(x,p,_){for(var w=(function(te,U){var N=te,G=U,re=new Array(te*U),me={setPixel:function(o,e,t){re[e*N+o]=t},write:function(o){o.writeString("GIF87a"),o.writeShort(N),o.writeShort(G),o.writeByte(128),o.writeByte(0),o.writeByte(0),o.writeByte(0),o.writeByte(0),o.writeByte(0),o.writeByte(255),o.writeByte(255),o.writeByte(255),o.writeString(","),o.writeShort(0),o.writeShort(0),o.writeShort(N),o.writeShort(G),o.writeByte(0);var e=Pe(2);o.writeByte(2);for(var t=0;e.length-t>255;)o.writeByte(255),o.writeBytes(e,t,255),t+=255;o.writeByte(e.length-t),o.writeBytes(e,t,e.length-t),o.writeByte(0),o.writeString(";")}},Pe=function(o){for(var e=1<<o,t=1+(1<<o),r=o+1,n=de(),s=0;s<e;s+=1)n.add(String.fromCharCode(s));n.add(String.fromCharCode(e)),n.add(String.fromCharCode(t));var i,b,k,C=ue(),c=(i=C,b=0,k=0,{write:function(O,$){if(O>>>$)throw"length over";for(;b+$>=8;)i.writeByte(255&(O<<b|k)),$-=8-b,O>>>=8-b,k=0,b=0;k|=O<<b,b+=$},flush:function(){b>0&&i.writeByte(k)}});c.write(e,r);var z=0,ne=String.fromCharCode(re[z]);for(z+=1;z<re.length;){var Y=String.fromCharCode(re[z]);z+=1,n.contains(ne+Y)?ne+=Y:(c.write(n.indexOf(ne),r),n.size()<4095&&(n.size()==1<<r&&(r+=1),n.add(ne+Y)),ne=Y)}return c.write(n.indexOf(ne),r),c.write(t,r),c.flush(),C.toByteArray()},de=function(){var o={},e=0,t={add:function(r){if(t.contains(r))throw"dup key:"+r;o[r]=e,e+=1},size:function(){return e},indexOf:function(r){return o[r]},contains:function(r){return o[r]!==void 0}};return t};return me})(x,p),u=0;u<p;u+=1)for(var M=0;M<x;M+=1)w.setPixel(M,u,_(M,u));var T=ue();w.write(T);for(var m=(function(){var te=0,U=0,N=0,G="",re={},me=function(de){G+=String.fromCharCode(Pe(63&de))},Pe=function(de){if(!(de<0)){if(de<26)return 65+de;if(de<52)return de-26+97;if(de<62)return de-52+48;if(de==62)return 43;if(de==63)return 47}throw"n:"+de};return re.writeByte=function(de){for(te=te<<8|255&de,U+=8,N+=1;U>=6;)me(te>>>U-6),U-=6},re.flush=function(){if(U>0&&(me(te<<6-U),te=0,U=0),N%3!=0)for(var de=3-N%3,o=0;o<de;o+=1)G+="="},re.toString=function(){return G},re})(),q=T.toByteArray(),he=0;he<q.length;he+=1)m.writeByte(q[he]);return m.flush(),"data:image/gif;base64,"+m};return L})();R.stringToBytesFuncs["UTF-8"]=function(L){return(function(W){for(var I=[],K=0;K<W.length;K++){var E=W.charCodeAt(K);E<128?I.push(E):E<2048?I.push(192|E>>6,128|63&E):E<55296||E>=57344?I.push(224|E>>12,128|E>>6&63,128|63&E):(K++,E=65536+((1023&E)<<10|1023&W.charCodeAt(K)),I.push(240|E>>18,128|E>>12&63,128|E>>6&63,128|63&E))}return I})(L)},(j=typeof(v=function(){return R})=="function"?v.apply(h,[]):v)===void 0||(P.exports=j)},676:(P,h,v)=>{v.d(h,{default:()=>de});const j="Numeric",R="Alphanumeric",L="Byte";var W=function(){return W=Object.assign||function(o){for(var e,t=1,r=arguments.length;t<r;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o},W.apply(this,arguments)},I=function(){for(var o=0,e=0,t=arguments.length;e<t;e++)o+=arguments[e].length;var r=Array(o),n=0;for(e=0;e<t;e++)for(var s=arguments[e],i=0,b=s.length;i<b;i++,n++)r[n]=s[i];return r},K=function(o){return!!o&&typeof o=="object"&&!Array.isArray(o)};function E(o){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!e.length)return o;var r=e.shift();return r!==void 0&&K(o)&&K(r)?(o=W({},o),Object.keys(r).forEach((function(n){var s=o[n],i=r[n];Array.isArray(s)&&Array.isArray(i)?o[n]=i:K(s)&&K(i)?o[n]=E(Object.assign({},s),i):o[n]=i})),E.apply(void 0,I([o],e))):o}function J(o,e){var t=document.createElement("a");t.download=e,t.href=o,document.body.appendChild(t),t.click(),document.body.removeChild(t)}var D=function(o,e,t,r){return new(t||(t=Promise))((function(n,s){function i(C){try{k(r.next(C))}catch(c){s(c)}}function b(C){try{k(r.throw(C))}catch(c){s(c)}}function k(C){var c;C.done?n(C.value):(c=C.value,c instanceof t?c:new t((function(z){z(c)}))).then(i,b)}k((r=r.apply(o,[])).next())}))},a=function(o,e){var t,r,n,s,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function b(k){return function(C){return(function(c){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,r&&(n=2&c[0]?r.return:c[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,c[1])).done)return n;switch(r=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||c[0]!==6&&c[0]!==2)){i=0;continue}if(c[0]===3&&(!n||c[1]>n[0]&&c[1]<n[3])){i.label=c[1];break}if(c[0]===6&&i.label<n[1]){i.label=n[1],n=c;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(c);break}n[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(o,i)}catch(z){c=[6,z],r=0}finally{t=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}})([k,C])}}};function F(o){return D(this,void 0,void 0,(function(){return a(this,(function(e){return[2,new Promise((function(t){var r=new XMLHttpRequest;r.onload=function(){var n=new FileReader;n.onloadend=function(){t(n.result)},n.readAsDataURL(r.response)},r.open("GET",o),r.responseType="blob",r.send()}))]}))}))}const X={L:.07,M:.15,Q:.25,H:.3};var B=function(){return B=Object.assign||function(o){for(var e,t=1,r=arguments.length;t<r;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o},B.apply(this,arguments)},H=(function(){function o(e){var t=e.svg,r=e.type;this._svg=t,this._type=r}return o.prototype.draw=function(e,t,r,n){var s;switch(this._type){case"dots":s=this._drawDot;break;case"classy":s=this._drawClassy;break;case"classy-rounded":s=this._drawClassyRounded;break;case"rounded":s=this._drawRounded;break;case"extra-rounded":s=this._drawExtraRounded;break;default:s=this._drawSquare}s.call(this,{x:e,y:t,size:r,getNeighbor:n})},o.prototype._rotateFigure=function(e){var t,r=e.x,n=e.y,s=e.size,i=e.rotation,b=i===void 0?0:i,k=r+s/2,C=n+s/2;(0,e.draw)(),(t=this._element)===null||t===void 0||t.setAttribute("transform","rotate("+180*b/Math.PI+","+k+","+C+")")},o.prototype._basicDot=function(e){var t=this,r=e.size,n=e.x,s=e.y;this._rotateFigure(B(B({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),t._element.setAttribute("cx",String(n+r/2)),t._element.setAttribute("cy",String(s+r/2)),t._element.setAttribute("r",String(r/2))}}))},o.prototype._basicSquare=function(e){var t=this,r=e.size,n=e.x,s=e.y;this._rotateFigure(B(B({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),t._element.setAttribute("x",String(n)),t._element.setAttribute("y",String(s)),t._element.setAttribute("width",String(r)),t._element.setAttribute("height",String(r))}}))},o.prototype._basicSideRounded=function(e){var t=this,r=e.size,n=e.x,s=e.y;this._rotateFigure(B(B({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+n+" "+s+"v "+r+"h "+r/2+"a "+r/2+" "+r/2+", 0, 0, 0, 0 "+-r)}}))},o.prototype._basicCornerRounded=function(e){var t=this,r=e.size,n=e.x,s=e.y;this._rotateFigure(B(B({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+n+" "+s+"v "+r+"h "+r+"v "+-r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+-r/2+" "+-r/2)}}))},o.prototype._basicCornerExtraRounded=function(e){var t=this,r=e.size,n=e.x,s=e.y;this._rotateFigure(B(B({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+n+" "+s+"v "+r+"h "+r+"a "+r+" "+r+", 0, 0, 0, "+-r+" "+-r)}}))},o.prototype._basicCornersRounded=function(e){var t=this,r=e.size,n=e.x,s=e.y;this._rotateFigure(B(B({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("d","M "+n+" "+s+"v "+r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+r/2+" "+r/2+"h "+r/2+"v "+-r/2+"a "+r/2+" "+r/2+", 0, 0, 0, "+-r/2+" "+-r/2)}}))},o.prototype._drawDot=function(e){var t=e.x,r=e.y,n=e.size;this._basicDot({x:t,y:r,size:n,rotation:0})},o.prototype._drawSquare=function(e){var t=e.x,r=e.y,n=e.size;this._basicSquare({x:t,y:r,size:n,rotation:0})},o.prototype._drawRounded=function(e){var t=e.x,r=e.y,n=e.size,s=e.getNeighbor,i=s?+s(-1,0):0,b=s?+s(1,0):0,k=s?+s(0,-1):0,C=s?+s(0,1):0,c=i+b+k+C;if(c!==0)if(c>2||i&&b||k&&C)this._basicSquare({x:t,y:r,size:n,rotation:0});else{if(c===2){var z=0;return i&&k?z=Math.PI/2:k&&b?z=Math.PI:b&&C&&(z=-Math.PI/2),void this._basicCornerRounded({x:t,y:r,size:n,rotation:z})}if(c===1)return z=0,k?z=Math.PI/2:b?z=Math.PI:C&&(z=-Math.PI/2),void this._basicSideRounded({x:t,y:r,size:n,rotation:z})}else this._basicDot({x:t,y:r,size:n,rotation:0})},o.prototype._drawExtraRounded=function(e){var t=e.x,r=e.y,n=e.size,s=e.getNeighbor,i=s?+s(-1,0):0,b=s?+s(1,0):0,k=s?+s(0,-1):0,C=s?+s(0,1):0,c=i+b+k+C;if(c!==0)if(c>2||i&&b||k&&C)this._basicSquare({x:t,y:r,size:n,rotation:0});else{if(c===2){var z=0;return i&&k?z=Math.PI/2:k&&b?z=Math.PI:b&&C&&(z=-Math.PI/2),void this._basicCornerExtraRounded({x:t,y:r,size:n,rotation:z})}if(c===1)return z=0,k?z=Math.PI/2:b?z=Math.PI:C&&(z=-Math.PI/2),void this._basicSideRounded({x:t,y:r,size:n,rotation:z})}else this._basicDot({x:t,y:r,size:n,rotation:0})},o.prototype._drawClassy=function(e){var t=e.x,r=e.y,n=e.size,s=e.getNeighbor,i=s?+s(-1,0):0,b=s?+s(1,0):0,k=s?+s(0,-1):0,C=s?+s(0,1):0;i+b+k+C!==0?i||k?b||C?this._basicSquare({x:t,y:r,size:n,rotation:0}):this._basicCornerRounded({x:t,y:r,size:n,rotation:Math.PI/2}):this._basicCornerRounded({x:t,y:r,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:t,y:r,size:n,rotation:Math.PI/2})},o.prototype._drawClassyRounded=function(e){var t=e.x,r=e.y,n=e.size,s=e.getNeighbor,i=s?+s(-1,0):0,b=s?+s(1,0):0,k=s?+s(0,-1):0,C=s?+s(0,1):0;i+b+k+C!==0?i||k?b||C?this._basicSquare({x:t,y:r,size:n,rotation:0}):this._basicCornerExtraRounded({x:t,y:r,size:n,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:t,y:r,size:n,rotation:-Math.PI/2}):this._basicCornersRounded({x:t,y:r,size:n,rotation:Math.PI/2})},o})();const ge=H;var le=function(){return le=Object.assign||function(o){for(var e,t=1,r=arguments.length;t<r;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o},le.apply(this,arguments)},Ce=(function(){function o(e){var t=e.svg,r=e.type;this._svg=t,this._type=r}return o.prototype.draw=function(e,t,r,n){var s;switch(this._type){case"square":s=this._drawSquare;break;case"extra-rounded":s=this._drawExtraRounded;break;default:s=this._drawDot}s.call(this,{x:e,y:t,size:r,rotation:n})},o.prototype._rotateFigure=function(e){var t,r=e.x,n=e.y,s=e.size,i=e.rotation,b=i===void 0?0:i,k=r+s/2,C=n+s/2;(0,e.draw)(),(t=this._element)===null||t===void 0||t.setAttribute("transform","rotate("+180*b/Math.PI+","+k+","+C+")")},o.prototype._basicDot=function(e){var t=this,r=e.size,n=e.x,s=e.y,i=r/7;this._rotateFigure(le(le({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+(n+r/2)+" "+s+"a "+r/2+" "+r/2+" 0 1 0 0.1 0zm 0 "+i+"a "+(r/2-i)+" "+(r/2-i)+" 0 1 1 -0.1 0Z")}}))},o.prototype._basicSquare=function(e){var t=this,r=e.size,n=e.x,s=e.y,i=r/7;this._rotateFigure(le(le({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+n+" "+s+"v "+r+"h "+r+"v "+-r+"zM "+(n+i)+" "+(s+i)+"h "+(r-2*i)+"v "+(r-2*i)+"h "+(2*i-r)+"z")}}))},o.prototype._basicExtraRounded=function(e){var t=this,r=e.size,n=e.x,s=e.y,i=r/7;this._rotateFigure(le(le({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","path"),t._element.setAttribute("clip-rule","evenodd"),t._element.setAttribute("d","M "+n+" "+(s+2.5*i)+"v "+2*i+"a "+2.5*i+" "+2.5*i+", 0, 0, 0, "+2.5*i+" "+2.5*i+"h "+2*i+"a "+2.5*i+" "+2.5*i+", 0, 0, 0, "+2.5*i+" "+2.5*-i+"v "+-2*i+"a "+2.5*i+" "+2.5*i+", 0, 0, 0, "+2.5*-i+" "+2.5*-i+"h "+-2*i+"a "+2.5*i+" "+2.5*i+", 0, 0, 0, "+2.5*-i+" "+2.5*i+"M "+(n+2.5*i)+" "+(s+i)+"h "+2*i+"a "+1.5*i+" "+1.5*i+", 0, 0, 1, "+1.5*i+" "+1.5*i+"v "+2*i+"a "+1.5*i+" "+1.5*i+", 0, 0, 1, "+1.5*-i+" "+1.5*i+"h "+-2*i+"a "+1.5*i+" "+1.5*i+", 0, 0, 1, "+1.5*-i+" "+1.5*-i+"v "+-2*i+"a "+1.5*i+" "+1.5*i+", 0, 0, 1, "+1.5*i+" "+1.5*-i)}}))},o.prototype._drawDot=function(e){var t=e.x,r=e.y,n=e.size,s=e.rotation;this._basicDot({x:t,y:r,size:n,rotation:s})},o.prototype._drawSquare=function(e){var t=e.x,r=e.y,n=e.size,s=e.rotation;this._basicSquare({x:t,y:r,size:n,rotation:s})},o.prototype._drawExtraRounded=function(e){var t=e.x,r=e.y,n=e.size,s=e.rotation;this._basicExtraRounded({x:t,y:r,size:n,rotation:s})},o})();const ke=Ce;var ue=function(){return ue=Object.assign||function(o){for(var e,t=1,r=arguments.length;t<r;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o},ue.apply(this,arguments)},Ie=(function(){function o(e){var t=e.svg,r=e.type;this._svg=t,this._type=r}return o.prototype.draw=function(e,t,r,n){(this._type==="square"?this._drawSquare:this._drawDot).call(this,{x:e,y:t,size:r,rotation:n})},o.prototype._rotateFigure=function(e){var t,r=e.x,n=e.y,s=e.size,i=e.rotation,b=i===void 0?0:i,k=r+s/2,C=n+s/2;(0,e.draw)(),(t=this._element)===null||t===void 0||t.setAttribute("transform","rotate("+180*b/Math.PI+","+k+","+C+")")},o.prototype._basicDot=function(e){var t=this,r=e.size,n=e.x,s=e.y;this._rotateFigure(ue(ue({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),t._element.setAttribute("cx",String(n+r/2)),t._element.setAttribute("cy",String(s+r/2)),t._element.setAttribute("r",String(r/2))}}))},o.prototype._basicSquare=function(e){var t=this,r=e.size,n=e.x,s=e.y;this._rotateFigure(ue(ue({},e),{draw:function(){t._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),t._element.setAttribute("x",String(n)),t._element.setAttribute("y",String(s)),t._element.setAttribute("width",String(r)),t._element.setAttribute("height",String(r))}}))},o.prototype._drawDot=function(e){var t=e.x,r=e.y,n=e.size,s=e.rotation;this._basicDot({x:t,y:r,size:n,rotation:s})},o.prototype._drawSquare=function(e){var t=e.x,r=e.y,n=e.size,s=e.rotation;this._basicSquare({x:t,y:r,size:n,rotation:s})},o})();const we=Ie,x="circle";var p=function(o,e,t,r){return new(t||(t=Promise))((function(n,s){function i(C){try{k(r.next(C))}catch(c){s(c)}}function b(C){try{k(r.throw(C))}catch(c){s(c)}}function k(C){var c;C.done?n(C.value):(c=C.value,c instanceof t?c:new t((function(z){z(c)}))).then(i,b)}k((r=r.apply(o,[])).next())}))},_=function(o,e){var t,r,n,s,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function b(k){return function(C){return(function(c){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,r&&(n=2&c[0]?r.return:c[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,c[1])).done)return n;switch(r=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||c[0]!==6&&c[0]!==2)){i=0;continue}if(c[0]===3&&(!n||c[1]>n[0]&&c[1]<n[3])){i.label=c[1];break}if(c[0]===6&&i.label<n[1]){i.label=n[1],n=c;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(c);break}n[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(o,i)}catch(z){c=[6,z],r=0}finally{t=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}})([k,C])}}},w=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],u=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const M=(function(){function o(e){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(e.width)),this._element.setAttribute("height",String(e.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._instanceId=o.instanceCount++,this._options=e}return Object.defineProperty(o.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),o.prototype.getElement=function(){return this._element},o.prototype.drawQR=function(e){return p(this,void 0,void 0,(function(){var t,r,n,s,i,b,k,C,c,z,ne=this;return _(this,(function(Y){switch(Y.label){case 0:return t=e.getModuleCount(),r=Math.min(this._options.width,this._options.height)-2*this._options.margin,n=this._options.shape===x?r/Math.sqrt(2):r,s=n/t,i={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=e,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(Y.sent(),!this._image)return[2];b=this._options,k=b.imageOptions,C=b.qrOptions,c=k.imageSize*X[C.errorCorrectionLevel],z=Math.floor(c*t*t),i=(function(O){var $=O.originalHeight,se=O.originalWidth,ye=O.maxHiddenDots,V=O.maxHiddenAxisDots,ce=O.dotSize,Z={x:0,y:0},oe={x:0,y:0};if($<=0||se<=0||ye<=0||ce<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var ve=$/se;return Z.x=Math.floor(Math.sqrt(ye/ve)),Z.x<=0&&(Z.x=1),V&&V<Z.x&&(Z.x=V),Z.x%2==0&&Z.x--,oe.x=Z.x*ce,Z.y=1+2*Math.ceil((Z.x*ve-1)/2),oe.y=Math.round(oe.x*ve),(Z.y*Z.x>ye||V&&V<Z.y)&&(V&&V<Z.y?(Z.y=V,Z.y%2==0&&Z.x--):Z.y-=2,oe.y=Z.y*ce,Z.x=1+2*Math.ceil((Z.y/ve-1)/2),oe.x=Math.round(oe.y/ve)),{height:oe.y,width:oe.x,hideYDots:Z.y,hideXDots:Z.x}})({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:z,maxHiddenAxisDots:t-14,dotSize:s}),Y.label=2;case 2:return this.drawBackground(),this.drawDots((function(O,$){var se,ye,V,ce,Z,oe;return!(ne._options.imageOptions.hideBackgroundDots&&O>=(t-i.hideXDots)/2&&O<(t+i.hideXDots)/2&&$>=(t-i.hideYDots)/2&&$<(t+i.hideYDots)/2||!((se=w[O])===null||se===void 0)&&se[$]||!((ye=w[O-t+7])===null||ye===void 0)&&ye[$]||!((V=w[O])===null||V===void 0)&&V[$-t+7]||!((ce=u[O])===null||ce===void 0)&&ce[$]||!((Z=u[O-t+7])===null||Z===void 0)&&Z[$]||!((oe=u[O])===null||oe===void 0)&&oe[$-t+7])})),this.drawCorners(),this._options.image?[4,this.drawImage({width:i.width,height:i.height,count:t,dotSize:s})]:[3,4];case 3:Y.sent(),Y.label=4;case 4:return[2]}}))}))},o.prototype.drawBackground=function(){var e,t,r,n=this._element,s=this._options;if(n){var i=(e=s.backgroundOptions)===null||e===void 0?void 0:e.gradient,b=(t=s.backgroundOptions)===null||t===void 0?void 0:t.color;if((i||b)&&this._createColor({options:i,color:b,additionalRotation:0,x:0,y:0,height:s.height,width:s.width,name:"background-color"}),(r=s.backgroundOptions)===null||r===void 0?void 0:r.round){var k=Math.min(s.width,s.height),C=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),C.setAttribute("x",String((s.width-k)/2)),C.setAttribute("y",String((s.height-k)/2)),C.setAttribute("width",String(k)),C.setAttribute("height",String(k)),C.setAttribute("rx",String(k/2*s.backgroundOptions.round)),this._backgroundClipPath.appendChild(C)}}},o.prototype.drawDots=function(e){var t,r,n=this;if(!this._qr)throw"QR code is not defined";var s=this._options,i=this._qr.getModuleCount();if(i>s.width||i>s.height)throw"The canvas is too small.";var b=Math.min(s.width,s.height)-2*s.margin,k=(s.shape===x?b/Math.sqrt(2):b)/i,C=(s.width-i*k)/2,c=(s.height-i*k)/2,z=new ge({svg:this._element,type:s.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color-"+this._instanceId),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(t=s.dotsOptions)===null||t===void 0?void 0:t.gradient,color:s.dotsOptions.color,additionalRotation:0,x:0,y:0,height:s.height,width:s.width,name:"dot-color-"+this._instanceId});for(var ne=function(pe){for(var Le=function(Se){return e&&!e(pe,Se)?"continue":!((r=Y._qr)===null||r===void 0)&&r.isDark(pe,Se)?(z.draw(C+pe*k,c+Se*k,k,(function(Ee,Me){return!(pe+Ee<0||Se+Me<0||pe+Ee>=i||Se+Me>=i)&&!(e&&!e(pe+Ee,Se+Me))&&!!n._qr&&n._qr.isDark(pe+Ee,Se+Me)})),void(z._element&&Y._dotsClipPath&&Y._dotsClipPath.appendChild(z._element))):"continue"},xe=0;xe<i;xe++)Le(xe)},Y=this,O=0;O<i;O++)ne(O);if(s.shape===x){var $=Math.floor((b/k-i)/2),se=i+2*$,ye=C-$*k,V=c-$*k,ce=[],Z=Math.floor(se/2);for(O=0;O<se;O++){ce[O]=[];for(var oe=0;oe<se;oe++)O>=$-1&&O<=se-$&&oe>=$-1&&oe<=se-$||Math.sqrt((O-Z)*(O-Z)+(oe-Z)*(oe-Z))>Z?ce[O][oe]=0:ce[O][oe]=this._qr.isDark(oe-2*$<0?oe:oe>=i?oe-2*$:oe-$,O-2*$<0?O:O>=i?O-2*$:O-$)?1:0}var ve=function(pe){for(var Le=function(Se){if(!ce[pe][Se])return"continue";z.draw(ye+pe*k,V+Se*k,k,(function(Ee,Me){var je;return!!(!((je=ce[pe+Ee])===null||je===void 0)&&je[Se+Me])})),z._element&&be._dotsClipPath&&be._dotsClipPath.appendChild(z._element)},xe=0;xe<se;xe++)Le(xe)},be=this;for(O=0;O<se;O++)ve(O)}},o.prototype.drawCorners=function(){var e=this;if(!this._qr)throw"QR code is not defined";var t=this._element,r=this._options;if(!t)throw"Element code is not defined";var n=this._qr.getModuleCount(),s=Math.min(r.width,r.height)-2*r.margin,i=(r.shape===x?s/Math.sqrt(2):s)/n,b=7*i,k=3*i,C=(r.width-n*i)/2,c=(r.height-n*i)/2;[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(z){var ne,Y,O,$,se,ye,V,ce,Z,oe,ve,be,pe=z[0],Le=z[1],xe=z[2],Se=C+pe*i*(n-7),Ee=c+Le*i*(n-7),Me=e._dotsClipPath,je=e._dotsClipPath;if((!((ne=r.cornersSquareOptions)===null||ne===void 0)&&ne.gradient||!((Y=r.cornersSquareOptions)===null||Y===void 0)&&Y.color)&&((Me=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+pe+"-"+Le),e._defs.appendChild(Me),e._cornersSquareClipPath=e._cornersDotClipPath=je=Me,e._createColor({options:(O=r.cornersSquareOptions)===null||O===void 0?void 0:O.gradient,color:($=r.cornersSquareOptions)===null||$===void 0?void 0:$.color,additionalRotation:xe,x:Se,y:Ee,height:b,width:b,name:"corners-square-color-"+pe+"-"+Le})),(se=r.cornersSquareOptions)===null||se===void 0?void 0:se.type){var rt=new ke({svg:e._element,type:r.cornersSquareOptions.type});rt.draw(Se,Ee,b,xe),rt._element&&Me&&Me.appendChild(rt._element)}else for(var Oe=new ge({svg:e._element,type:r.dotsOptions.type}),nt=function(Ae){for(var Ne=function(He){if(!(!((ye=w[Ae])===null||ye===void 0)&&ye[He]))return"continue";Oe.draw(Se+Ae*i,Ee+He*i,i,(function(vt,wt){var Ke;return!!(!((Ke=w[Ae+vt])===null||Ke===void 0)&&Ke[He+wt])})),Oe._element&&Me&&Me.appendChild(Oe._element)},Fe=0;Fe<w[Ae].length;Fe++)Ne(Fe)},Te=0;Te<w.length;Te++)nt(Te);if((!((V=r.cornersDotOptions)===null||V===void 0)&&V.gradient||!((ce=r.cornersDotOptions)===null||ce===void 0)&&ce.color)&&((je=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+pe+"-"+Le),e._defs.appendChild(je),e._cornersDotClipPath=je,e._createColor({options:(Z=r.cornersDotOptions)===null||Z===void 0?void 0:Z.gradient,color:(oe=r.cornersDotOptions)===null||oe===void 0?void 0:oe.color,additionalRotation:xe,x:Se+2*i,y:Ee+2*i,height:k,width:k,name:"corners-dot-color-"+pe+"-"+Le})),(ve=r.cornersDotOptions)===null||ve===void 0?void 0:ve.type){var Ze=new we({svg:e._element,type:r.cornersDotOptions.type});Ze.draw(Se+2*i,Ee+2*i,k,xe),Ze._element&&je&&je.appendChild(Ze._element)}else{Oe=new ge({svg:e._element,type:r.dotsOptions.type});var $e=function(Ae){for(var Ne=function(He){if(!(!((be=u[Ae])===null||be===void 0)&&be[He]))return"continue";Oe.draw(Se+Ae*i,Ee+He*i,i,(function(vt,wt){var Ke;return!!(!((Ke=u[Ae+vt])===null||Ke===void 0)&&Ke[He+wt])})),Oe._element&&je&&je.appendChild(Oe._element)},Fe=0;Fe<u[Ae].length;Fe++)Ne(Fe)};for(Te=0;Te<u.length;Te++)$e(Te)}}))},o.prototype.loadImage=function(){var e=this;return new Promise((function(t,r){var n=e._options,s=new Image;if(!n.image)return r("Image is not defined");typeof n.imageOptions.crossOrigin=="string"&&(s.crossOrigin=n.imageOptions.crossOrigin),e._image=s,s.onload=function(){t()},s.src=n.image}))},o.prototype.drawImage=function(e){var t=e.width,r=e.height,n=e.count,s=e.dotSize;return p(this,void 0,void 0,(function(){var i,b,k,C,c,z,ne,Y,O;return _(this,(function($){switch($.label){case 0:return i=this._options,b=(i.width-n*s)/2,k=(i.height-n*s)/2,C=b+i.imageOptions.margin+(n*s-t)/2,c=k+i.imageOptions.margin+(n*s-r)/2,z=t-2*i.imageOptions.margin,ne=r-2*i.imageOptions.margin,(Y=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(C)),Y.setAttribute("y",String(c)),Y.setAttribute("width",z+"px"),Y.setAttribute("height",ne+"px"),[4,F(i.image||"")];case 1:return O=$.sent(),Y.setAttribute("href",O||""),this._element.appendChild(Y),[2]}}))}))},o.prototype._createColor=function(e){var t=e.options,r=e.color,n=e.additionalRotation,s=e.x,i=e.y,b=e.height,k=e.width,C=e.name,c=k>b?k:b,z=document.createElementNS("http://www.w3.org/2000/svg","rect");if(z.setAttribute("x",String(s)),z.setAttribute("y",String(i)),z.setAttribute("height",String(b)),z.setAttribute("width",String(k)),z.setAttribute("clip-path","url('#clip-path-"+C+"')"),t){var ne;if(t.type==="radial")(ne=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",C),ne.setAttribute("gradientUnits","userSpaceOnUse"),ne.setAttribute("fx",String(s+k/2)),ne.setAttribute("fy",String(i+b/2)),ne.setAttribute("cx",String(s+k/2)),ne.setAttribute("cy",String(i+b/2)),ne.setAttribute("r",String(c/2));else{var Y=((t.rotation||0)+n)%(2*Math.PI),O=(Y+2*Math.PI)%(2*Math.PI),$=s+k/2,se=i+b/2,ye=s+k/2,V=i+b/2;O>=0&&O<=.25*Math.PI||O>1.75*Math.PI&&O<=2*Math.PI?($-=k/2,se-=b/2*Math.tan(Y),ye+=k/2,V+=b/2*Math.tan(Y)):O>.25*Math.PI&&O<=.75*Math.PI?(se-=b/2,$-=k/2/Math.tan(Y),V+=b/2,ye+=k/2/Math.tan(Y)):O>.75*Math.PI&&O<=1.25*Math.PI?($+=k/2,se+=b/2*Math.tan(Y),ye-=k/2,V-=b/2*Math.tan(Y)):O>1.25*Math.PI&&O<=1.75*Math.PI&&(se+=b/2,$+=k/2/Math.tan(Y),V-=b/2,ye-=k/2/Math.tan(Y)),(ne=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",C),ne.setAttribute("gradientUnits","userSpaceOnUse"),ne.setAttribute("x1",String(Math.round($))),ne.setAttribute("y1",String(Math.round(se))),ne.setAttribute("x2",String(Math.round(ye))),ne.setAttribute("y2",String(Math.round(V)))}t.colorStops.forEach((function(ce){var Z=ce.offset,oe=ce.color,ve=document.createElementNS("http://www.w3.org/2000/svg","stop");ve.setAttribute("offset",100*Z+"%"),ve.setAttribute("stop-color",oe),ne.appendChild(ve)})),z.setAttribute("fill","url('#"+C+"')"),this._defs.appendChild(ne)}else r&&z.setAttribute("fill",r);this._element.appendChild(z)},o.instanceCount=0,o})(),T="canvas";for(var m={},q=0;q<=40;q++)m[q]=q;const he={type:T,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:m[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var te=function(){return te=Object.assign||function(o){for(var e,t=1,r=arguments.length;t<r;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o},te.apply(this,arguments)};function U(o){var e=te({},o);if(!e.colorStops||!e.colorStops.length)throw"Field 'colorStops' is required in gradient";return e.rotation?e.rotation=Number(e.rotation):e.rotation=0,e.colorStops=e.colorStops.map((function(t){return te(te({},t),{offset:Number(t.offset)})})),e}function N(o){var e=te({},o);return e.width=Number(e.width),e.height=Number(e.height),e.margin=Number(e.margin),e.imageOptions=te(te({},e.imageOptions),{hideBackgroundDots:!!e.imageOptions.hideBackgroundDots,imageSize:Number(e.imageOptions.imageSize),margin:Number(e.imageOptions.margin)}),e.margin>Math.min(e.width,e.height)&&(e.margin=Math.min(e.width,e.height)),e.dotsOptions=te({},e.dotsOptions),e.dotsOptions.gradient&&(e.dotsOptions.gradient=U(e.dotsOptions.gradient)),e.cornersSquareOptions&&(e.cornersSquareOptions=te({},e.cornersSquareOptions),e.cornersSquareOptions.gradient&&(e.cornersSquareOptions.gradient=U(e.cornersSquareOptions.gradient))),e.cornersDotOptions&&(e.cornersDotOptions=te({},e.cornersDotOptions),e.cornersDotOptions.gradient&&(e.cornersDotOptions.gradient=U(e.cornersDotOptions.gradient))),e.backgroundOptions&&(e.backgroundOptions=te({},e.backgroundOptions),e.backgroundOptions.gradient&&(e.backgroundOptions.gradient=U(e.backgroundOptions.gradient))),e}var G=v(192),re=v.n(G),me=function(o,e,t,r){return new(t||(t=Promise))((function(n,s){function i(C){try{k(r.next(C))}catch(c){s(c)}}function b(C){try{k(r.throw(C))}catch(c){s(c)}}function k(C){var c;C.done?n(C.value):(c=C.value,c instanceof t?c:new t((function(z){z(c)}))).then(i,b)}k((r=r.apply(o,[])).next())}))},Pe=function(o,e){var t,r,n,s,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function b(k){return function(C){return(function(c){if(t)throw new TypeError("Generator is already executing.");for(;i;)try{if(t=1,r&&(n=2&c[0]?r.return:c[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,c[1])).done)return n;switch(r=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||c[0]!==6&&c[0]!==2)){i=0;continue}if(c[0]===3&&(!n||c[1]>n[0]&&c[1]<n[3])){i.label=c[1];break}if(c[0]===6&&i.label<n[1]){i.label=n[1],n=c;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(c);break}n[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(o,i)}catch(z){c=[6,z],r=0}finally{t=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}})([k,C])}}};const de=(function(){function o(e){this._options=e?N(E(he,e)):he,this.update()}return o._clearContainer=function(e){e&&(e.innerHTML="")},o.prototype._setupSvg=function(){var e=this;if(this._qr){var t=new M(this._options);this._svg=t.getElement(),this._svgDrawingPromise=t.drawQR(this._qr).then((function(){var r;e._svg&&((r=e._extension)===null||r===void 0||r.call(e,t.getElement(),e._options))}))}},o.prototype._setupCanvas=function(){var e,t=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=(e=this._svgDrawingPromise)===null||e===void 0?void 0:e.then((function(){if(t._svg){var r=t._svg,n=new XMLSerializer().serializeToString(r),s="data:image/svg+xml;base64,"+btoa(n),i=new Image;return new Promise((function(b){i.onload=function(){var k,C;(C=(k=t._canvas)===null||k===void 0?void 0:k.getContext("2d"))===null||C===void 0||C.drawImage(i,0,0),b()},i.src=s}))}})))},o.prototype._getElement=function(e){return e===void 0&&(e="png"),me(this,void 0,void 0,(function(){return Pe(this,(function(t){switch(t.label){case 0:if(!this._qr)throw"QR code is empty";return e.toLowerCase()!=="svg"?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return t.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return t.sent(),[2,this._canvas]}}))}))},o.prototype.update=function(e){o._clearContainer(this._container),this._options=e?N(E(this._options,e)):this._options,this._options.data&&(this._qr=re()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||(function(t){switch(!0){case/^[0-9]*$/.test(t):return j;case/^[0-9A-Z $%*+\-./:]*$/.test(t):return R;default:return L}})(this._options.data)),this._qr.make(),this._options.type===T?this._setupCanvas():this._setupSvg(),this.append(this._container))},o.prototype.append=function(e){if(e){if(typeof e.appendChild!="function")throw"Container should be a single DOM node";this._options.type===T?this._canvas&&e.appendChild(this._canvas):this._svg&&e.appendChild(this._svg),this._container=e}},o.prototype.applyExtension=function(e){if(!e)throw"Extension function should be defined.";this._extension=e,this.update()},o.prototype.deleteExtension=function(){this._extension=void 0,this.update()},o.prototype.getRawData=function(e){return e===void 0&&(e="png"),me(this,void 0,void 0,(function(){var t,r,n;return Pe(this,(function(s){switch(s.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(e)];case 1:return(t=s.sent())?e.toLowerCase()==="svg"?(r=new XMLSerializer,n=r.serializeToString(t),[2,new Blob([`<?xml version="1.0" standalone="no"?>\r
4
4
  `+n],{type:"image/svg+xml"})]):[2,new Promise((function(i){return t.toBlob(i,"image/"+e,1)}))]:[2,null]}}))}))},o.prototype.download=function(e){return me(this,void 0,void 0,(function(){var t,r,n,s,i;return Pe(this,(function(b){switch(b.label){case 0:if(!this._qr)throw"QR code is empty";return t="png",r="qr",typeof e=="string"?(t=e,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof e=="object"&&e!==null&&(e.name&&(r=e.name),e.extension&&(t=e.extension)),[4,this._getElement(t)];case 1:return(n=b.sent())?(t.toLowerCase()==="svg"?(s=new XMLSerializer,i=`<?xml version="1.0" standalone="no"?>\r
@@ -1,4 +1,4 @@
1
- import{c as W1,j as a,r,aS as q1,fx as Pe,bt as i1,H as M,dz as Je,am as _1,eQ as $1,f_ as c1,ab as ee,al as Ze,i as te,ap as l1,hj as ne,V as j,k as re,gz as se,hk as Ge,x as y,co as Qe,cq as Ke,av as ae,bF as _,P as oe,B,Q as X,hl as ie,aI as Xe,fh as ze,fG as V,O as Ye,ao as Q,ad as ce,fz as We,hm as le,an as u1,bv as ue,cQ as O,hn as S1,ho as qe,aq as pe,cm as D1,hp as _e,fy as $e,hq as e6,hr as de,hs as t6,K as n6,J as N,cu as r6,cv as s6,au as a6,bz as B1,C as o6,ht as I1,A as i6,gq as c6,aB as l6,hu as u6,eT as p6,bB as p1,o as F,aU as F1,D as d6,E as C6,y as h6}from"./index-CP8e2zcP.js";import{f as f6}from"./index-BojVbZw0.js";import{f as m6,j as E6,b as g6}from"./spaces-BqdEt5Dg.js";import{u as d1}from"./blocklet-D7q_eJsm.js";import{D as A6}from"./DeleteOutline-CocEa6gq.js";import{O as Ce}from"./OpenInNew-2i4mGCRx.js";import{x as y6}from"./index-D29L5UKE.js";import{H as x6}from"./HelpOutline-s5mQqTw1.js";import{O as L1}from"./index-hxHDV4zb.js";import"./api-DBq1KtcA.js";const w6=W1(a.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),V2=W1(a.jsx("path",{d:"M6 6h12v12H6z"}));function S6(){const[e,t]=r.useState(null),{blocklet:n}=d1();return r.useEffect(()=>{t(m6(n))},[n]),{storageEndpoint:e}}const he=r.createContext({}),{Provider:D6,Consumer:M2}=he;function B6({children:e}){const[t,n]=r.useState(!1),[s,o]=r.useState(null),{blocklet:i,actions:{refreshBlocklet:c}}=d1(),{storageEndpoint:l}=S6(),{api:p}=q1();Pe(async()=>{try{if(n(!0),i1(l)){o(null);return}const C=await E6(l);o(C)}catch(C){console.error(C),M.error(C.message)}finally{n(!1)}},[l]);const u=()=>{o(null),c()},d=async C=>{o(C),await f(C.endpoint),c()},f=async C=>{await p.configBlocklet({input:{did:[i.meta.did],configs:[{key:_1.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:C}]}}),c()};r.useEffect(()=>{async function C(){if(!s)return;const g=await g6(s.endpoint,s.name),D=Je(s,{name:g});o(D)}C()},[]);const m=!!(l&&s);return a.jsx(D6,{value:{loading:t,spaceGateway:s,deleteSpaceGateway:u,updateSpaceGateway:d,storageEndpoint:l,settingStorageEndpoint:f,hasStorageEndpoint:m},children:e})}B6.propTypes={children:$1.node.isRequired};function I6(){return r.useContext(he)}const Y=c1({});function F6({key:e}={key:"md"}){const t=ee();return Ze(t.breakpoints.down(e))}var A=(e=>(e[e.NETWORK_ERROR=1001]="NETWORK_ERROR",e[e.UNAUTHORIZED=1002]="UNAUTHORIZED",e[e.EXPIRED=1003]="EXPIRED",e[e.PAST_DUE=1004]="PAST_DUE",e[e.INVALID=1005]="INVALID",e[e.UNIT_LIMIT=1006]="UNIT_LIMIT",e[e.CORS_BLOCKED=1007]="CORS_BLOCKED",e[e.INCOMPATIBLE=1008]="INCOMPATIBLE",e))(A||{}),fe=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(fe||{}),H=(e=>(e.APP_DISCONNECTED="app-disconnected",e.APP_RESTORE="app-restore",e.APP_BACKUP="app-backup",e.APP_CONNECTED="app-connected",e.APP_OBJECTS_SYNC="app-objects-sync",e))(H||{});function L6({endpoint:e,deps:t=[]}){return te(async()=>{if(!l1(e))return;const{headers:n}=await Y.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[s,o,i,c,l,p,u,d,f,m]=[n["x-space-name"],n["x-subscription-id"],n["x-listable"]==="true",n["x-readable"]==="true",n["x-writeable"]==="true",n["x-space-version"],n["x-space-owner-did"],n["x-space-is-available"],n["x-error-code"],n["x-is-site-admin"]],C=s?decodeURIComponent(s):"";if(d===void 0||f===void 0){const g=i&&c&&l;return{version:p,name:C,subscriptionId:o,ownerDid:u||"",isAvailable:g,errorCode:g?0:A.UNAUTHORIZED,isSiteAdmin:m==="true"}}return{version:p,name:C,subscriptionId:o,ownerDid:u,isAvailable:d==="true",errorCode:parseInt(f,10),isSiteAdmin:m==="true"}},{refreshDeps:[e].concat(t),onError(n){console.error(n)}})}const O6=ne.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
1
+ import{c as W1,j as a,r,aS as q1,fx as Pe,bt as i1,H as M,dz as Je,am as _1,eQ as $1,f_ as c1,ab as ee,al as Ze,i as te,ap as l1,hj as ne,V as j,k as re,gz as se,hk as Ge,x as y,co as Qe,cq as Ke,av as ae,bF as _,P as oe,B,Q as X,hl as ie,aI as Xe,fh as ze,fG as V,O as Ye,ao as Q,ad as ce,fz as We,hm as le,an as u1,bv as ue,cQ as O,hn as S1,ho as qe,aq as pe,cm as D1,hp as _e,fy as $e,hq as e6,hr as de,hs as t6,K as n6,J as N,cu as r6,cv as s6,au as a6,bz as B1,C as o6,ht as I1,A as i6,gq as c6,aB as l6,hu as u6,eT as p6,bB as p1,o as F,aU as F1,D as d6,E as C6,y as h6}from"./index-Dtj3cePH.js";import{f as f6}from"./index-BojVbZw0.js";import{f as m6,j as E6,b as g6}from"./spaces-BsLjYZLj.js";import{u as d1}from"./blocklet-B65NZ0SL.js";import{D as A6}from"./DeleteOutline-7b3f7PEm.js";import{O as Ce}from"./OpenInNew-DXke8B9Y.js";import{x as y6}from"./index-D29L5UKE.js";import{H as x6}from"./HelpOutline-dihfOb5v.js";import{O as L1}from"./index-UjkYO3io.js";import"./api-BLIecOBq.js";const w6=W1(a.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),V2=W1(a.jsx("path",{d:"M6 6h12v12H6z"}));function S6(){const[e,t]=r.useState(null),{blocklet:n}=d1();return r.useEffect(()=>{t(m6(n))},[n]),{storageEndpoint:e}}const he=r.createContext({}),{Provider:D6,Consumer:M2}=he;function B6({children:e}){const[t,n]=r.useState(!1),[s,o]=r.useState(null),{blocklet:i,actions:{refreshBlocklet:c}}=d1(),{storageEndpoint:l}=S6(),{api:p}=q1();Pe(async()=>{try{if(n(!0),i1(l)){o(null);return}const C=await E6(l);o(C)}catch(C){console.error(C),M.error(C.message)}finally{n(!1)}},[l]);const u=()=>{o(null),c()},d=async C=>{o(C),await f(C.endpoint),c()},f=async C=>{await p.configBlocklet({input:{did:[i.meta.did],configs:[{key:_1.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:C}]}}),c()};r.useEffect(()=>{async function C(){if(!s)return;const g=await g6(s.endpoint,s.name),D=Je(s,{name:g});o(D)}C()},[]);const m=!!(l&&s);return a.jsx(D6,{value:{loading:t,spaceGateway:s,deleteSpaceGateway:u,updateSpaceGateway:d,storageEndpoint:l,settingStorageEndpoint:f,hasStorageEndpoint:m},children:e})}B6.propTypes={children:$1.node.isRequired};function I6(){return r.useContext(he)}const Y=c1({});function F6({key:e}={key:"md"}){const t=ee();return Ze(t.breakpoints.down(e))}var A=(e=>(e[e.NETWORK_ERROR=1001]="NETWORK_ERROR",e[e.UNAUTHORIZED=1002]="UNAUTHORIZED",e[e.EXPIRED=1003]="EXPIRED",e[e.PAST_DUE=1004]="PAST_DUE",e[e.INVALID=1005]="INVALID",e[e.UNIT_LIMIT=1006]="UNIT_LIMIT",e[e.CORS_BLOCKED=1007]="CORS_BLOCKED",e[e.INCOMPATIBLE=1008]="INCOMPATIBLE",e))(A||{}),fe=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(fe||{}),H=(e=>(e.APP_DISCONNECTED="app-disconnected",e.APP_RESTORE="app-restore",e.APP_BACKUP="app-backup",e.APP_CONNECTED="app-connected",e.APP_OBJECTS_SYNC="app-objects-sync",e))(H||{});function L6({endpoint:e,deps:t=[]}){return te(async()=>{if(!l1(e))return;const{headers:n}=await Y.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[s,o,i,c,l,p,u,d,f,m]=[n["x-space-name"],n["x-subscription-id"],n["x-listable"]==="true",n["x-readable"]==="true",n["x-writeable"]==="true",n["x-space-version"],n["x-space-owner-did"],n["x-space-is-available"],n["x-error-code"],n["x-is-site-admin"]],C=s?decodeURIComponent(s):"";if(d===void 0||f===void 0){const g=i&&c&&l;return{version:p,name:C,subscriptionId:o,ownerDid:u||"",isAvailable:g,errorCode:g?0:A.UNAUTHORIZED,isSiteAdmin:m==="true"}}return{version:p,name:C,subscriptionId:o,ownerDid:u,isAvailable:d==="true",errorCode:parseInt(f,10),isSiteAdmin:m==="true"}},{refreshDeps:[e].concat(t),onError(n){console.error(n)}})}const O6=ne.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
2
2
  1. Please contact the DID Space administrator to verify the relevant configuration.
3
3
  2. If you are the administrator, click the link below to view the detailed setup guide and resolve the issue.`,networkError:"DID Space is currently unreachable due to potential server issues, network problems, or maintenance. Please click the link to visit the homepage and check its status.",incompatible:`The current connection of DID Spaces version ({spaceVersion}) is not compatible with the component version ({expectVersion}). Please contact the administrator for adjustments.
4
4
  If you are the administrator, you can click the link below to take action.`},gateway:{add:{invalidUrl:"Invalid DID Spaces gateway url",label:"Enter the url of the DID Spaces",title:"Add DID Spaces"}},provideNFT:{title:"Please show the DID Spaces NFT for {appName}",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} show DID Spaces NFT",success:"Connected successfully"},helperText:{fixCorsError:"Fixing CORS Errors When Connecting to DID Spaces"}}},auditLog:{backup:{description:"A backup operation was completed {relativeTime}"},restore:{description:"A restore operation was completed {relativeTime}"},connected:{description:"A connection was established {relativeTime}"},disconnected:{description:"The connection was disconnected {relativeTime}"},objectsSync:{description:"{totalCount} objects ({size}) were synchronized {relativeTime}"}}}),U6=ne.flatten({common:{cancel:"取消",confirm:"确认",delete:"删除",error:"错误",open:"打开",unknown:"未知",invalidUrl:"无效的 url: {url}",upgrade:"升级",viewMore:"查看更多"},storage:{spaces:{authorize:{title:"连接 {appName} 至 DID Spaces",scan:"使用你的 DID Wallet 扫描下面的二维码以允许应用 {appName} 连接至 DID Spaces",success:"连接成功"},connect:{reconnect:"立即重连",useSpaceGateway:"使用 DID Spaces 网关连接",useWallet:"连接至 DID Spaces",howToGetGatewayUrl:"如何获取 DID Spaces 的网关地址",providerForStorage:"请连接您的 DID Spaces"},connected:{title:"已连接的 DID Spaces",tag:"已连接"},disconnected:{tag:"连接已断开"},error:{tag:"需要关注",blockedByCors:"因 CORS 限制,访问被阻止",unreachable:"DID Space 无法访问",expired:"DID Spaces 已过期,点击此链接重新订阅",pastDue:"DID Spaces 有未支付账单,点击此链接完成支付",invalid:"DID Spaces 订阅异常,点击此链接检查",unitLimit:"DID Spaces 免费额度已用完,点击此链接付费升级",cors:`连接请求可能因 CORS 限制而失败:
@@ -1 +1 @@
1
- import{V as h,j as e,as as j,B as o,at as g,J as _,au as b,o as n}from"./index-CP8e2zcP.js";import{C as R}from"./click-to-copy-wk3E32eY.js";function k({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=h(),i={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(g,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(R,{"data-cy":"click-copy",children:t})]}),e.jsx(_,{component:"div",children:e.jsx(b,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(j,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,params:i.params,onConfirm:i.onConfirm,onCancel:i.onCancel})}k.propTypes={title:n.any.isRequired,keyName:n.any.isRequired,description:n.any.isRequired,confirmPlaceholder:n.any.isRequired,cancel:n.string,confirm:n.string,params:n.object,onCancel:n.func,onConfirm:n.func.isRequired};export{k as D};
1
+ import{V as h,j as e,as as j,B as o,at as g,J as _,au as b,o as n}from"./index-Dtj3cePH.js";import{C as R}from"./click-to-copy-BgfWbRfM.js";function k({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=h(),i={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(g,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(R,{"data-cy":"click-copy",children:t})]}),e.jsx(_,{component:"div",children:e.jsx(b,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(j,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,params:i.params,onConfirm:i.onConfirm,onCancel:i.onCancel})}k.propTypes={title:n.any.isRequired,keyName:n.any.isRequired,description:n.any.isRequired,confirmPlaceholder:n.any.isRequired,cancel:n.string,confirm:n.string,params:n.object,onCancel:n.func,onConfirm:n.func.isRequired};export{k as D};
@@ -1 +1 @@
1
- import{Z as r}from"./index-CP8e2zcP.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};
1
+ import{Z as r}from"./index-Dtj3cePH.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./overview-BPSzB7yi.js","./index-CP8e2zcP.js","./index-BLDnEtdF.css","./HelpOutline-s5mQqTw1.js","./index-BojVbZw0.js","./index-8K8V7S7h.js","./blocklet-D7q_eJsm.js","./team-Bp-ehLS6.js","./url-evaluation-BotqjpOW.js","./status-vwaEURfH.js","./index-1nsTMIEw.js","./ErrorOutline-D3nJBXYA.js","./omit-C1X-CRrb.js","./index-D3qtx7de.js","./metric-DzrjUE5P.js","./CardContent-MdG6Fo_s.js","./spaces-BqdEt5Dg.js","./api-DBq1KtcA.js","./domains-DlW2t7QG.js","./trim-BrqZEf0Q.js","./index-DX_ig3IR.js","./useAsync-CbHsXkPS.js","./permission-D6xGjoP4.js","./Delete-CCasVLgy.js","./actions-Zy-oEKVg.js","./delete-confirm-C8X53PNk.js","./click-to-copy-wk3E32eY.js","./status-CFw68CfZ.js","./VerifiedUser-8QA2XNlm.js","./Add-B-lIYZBc.js","./CallMerge-V8M4tzIM.js","./toLower-C4OoJYWk.js","./use-mobile-BxCxZMSF.js","./util-BF2dKFyL.js","./is-path-prefix-equal-sWdIB_FI.js","./engine-hQAyActy.js","./OpenInNew-2i4mGCRx.js","./LoadingButton-egcGN7yK.js","./index-pMmL--Md.js","./actions-BuX7-i-0.js","./useLocalStorage-CBx2eW_l.js","./MoreVert-Cw1fjU9L.js","./DeleteOutline-CocEa6gq.js","./get-safe-url-n4nPkbEQ.js","./ButtonGroup-CXwzM552.js","./getValidReactChildren-dJeDeNuf.js","./ChevronRight-C_yvQN06.js","./html-title-DwrWBQUt.js","./preference-CWfaETuk.js","./index-PzC6rkTH.js","./Done-DfHgd6VN.js","./edit.svg-CBqxioRV.js","./ArrowDropDown-C1ynmK1V.js","./index-B01of1n7.js","./iframe-B0inMXzK.js","./Autocomplete-BHqH72uG.js","./ListSubheader-rZisNvzB.js","./rotate-session-key-Cn3NVWRi.js","./visuallyHidden-Dan1xhjv.js","./chain-DDmwEbOF.js","./switch-control-BEw34mlq.js","./index.esm-DjcC6_YD.js","./isEmail-CpvKmXxu.js","./index-CyXVLDQI.js","./redux-Ab4buSXY.js","./typeof-QjJsDpFa.js","./provider-icon-D-a204Ay.js","./passkey-rounded-_WDHIZVd.js","./simple-select-DApzKMrW.js","./federated-detail-dialog-C93dA_OW.js","./index-7TgPZijh.js","./FilterList-BiaeVs0C.js","./CSSTransition-hTlKGu0l.js","./emotion-cache.browser.esm-D6kXFXIA.js","./depsEqual-FU6HOfMn.js","./TableSearch-ZIwL7jK3.js","./Search-mc0LftDb.js","./Clear-XkW6YpHE.js","./use-mobile-BIorytbM.js","./appearance-CRQaeOoe.js","./config-navigation-iUuwjLA_.js","./cloneDeep-BEJXcFgb.js","./_createAggregator-BS_ZCLsv.js","./raf-schd.esm-vaS856Rv.js","./ListItemButton-BIo7wBNv.js","./index-CqXuTw4d.js","./index-p8ewFFuc.js","./shorten-label-j-itDv6J.js","./Replay-3PaYn2br.js","./Refresh-BIkqgW7p.js","./traffic-BuuDuC5C.js","./ChevronLeft-BPs9Erbv.js","./index-CVhk080O.js","./base-chart-Cp-etWR-.js","./index-erCgIvu7.js","./AdapterDayjs-CXgBZcQU.js","./useThemeProps-BWD3Vp6O.js","./audit-logs-BGRhRsNS.js","./index-BPu5OFdR.js","./index-ed1TwQco.css","./UnfoldMore-DFA58tLQ.js","./index-_qKxdWY4.js","./ua-parser-D6QF1h5N.js","./index-hxHDV4zb.js","./Google-D9HgkG4U.js","./list-header-DXqt77-Y.js","./ToggleButtonGroup-DeGfqT0G.js","./lock.svg-D22_UbmU.js","./index-De_3fKYA.js","./ViewList-DgyKMmIc.js","./Verified-se8hbTqT.js","./Visibility-BqBwXDHr.js","./index-G4GuFOuO.js","./sdk-CyaYnqk4.js","./actions-DR8B4Taf.js","./login-method-item-CGUaonon.js","./service-COrrqY-3.js","./table-icons-V0nzUvpC.js","./Edit-CGdW8_LW.js","./index-CRRnOuLM.js","./Link-DUSQD8mc.js","./item-NX8BCXwV.js","./Launch-DHnB5pzO.js","./item-D4DUnQj0.css","./index-Cske9PWb.js","./url-join-BYRfgTzL.js","./connect-to-BdinmIba.js","./index-D29L5UKE.js","./agreement-3SHQ4MuR.js","./install-from-url-DfM4lxPD.js","./without-wallet-lUjEmpWw.js","./Stepper-CnqNXODv.js","./toUpper-P-IpqDCE.js","./log-BtG4l72D.js","./download-CHMW-VV9.js","./runtime-BJVsSRvX.js","./memory-MEOErB2y.js","./index-MLCJ7HJV.js"])))=>i.map(i=>d[i]);
2
- import{V as He,d as qe,aS as Tt,r as b,by as Ge,j as d,at as Qe,B as Y,bz as Ke,A as jt,aU as j,bA as Pt,H as W,bB as We,bC as Pe,bD as At,a as Je,u as Ot,b as Lt,bE as Dt,bF as Bt,bG as Mt,bH as Ae,bI as Rt,bJ as Nt,b3 as Oe,C as Le,bK as Ft,bL as Vt,J as le,bM as zt,G as I,q as $t}from"./index-CP8e2zcP.js";import{T as Ut,u as Ht}from"./html-title-DwrWBQUt.js";import{B as qt}from"./status-CFw68CfZ.js";import{D as Gt,B as Qt}from"./actions-BuX7-i-0.js";import{u as Kt}from"./blocklet-D7q_eJsm.js";import{p as Wt}from"./index-2jRJYLHP.js";import{B as Jt,u as Xt,T as Yt}from"./team-Bp-ehLS6.js";import{P as Zt}from"./permission-D6xGjoP4.js";import{B as en}from"./Breadcrumbs-CpZ2DeBG.js";import"./useLocalStorage-CBx2eW_l.js";import"./MoreVert-Cw1fjU9L.js";import"./DeleteOutline-CocEa6gq.js";import"./get-safe-url-n4nPkbEQ.js";import"./ButtonGroup-CXwzM552.js";import"./getValidReactChildren-dJeDeNuf.js";import"./url-evaluation-BotqjpOW.js";const Xe=Object.freeze({left:0,top:0,width:16,height:16}),Z=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),U=Object.freeze({...Xe,...Z}),pe=Object.freeze({...U,body:"",hidden:!1});function tn(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function De(e,t){const n=tn(e,t);for(const r in pe)r in Z?r in e&&!(r in n)&&(n[r]=Z[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function nn(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const c=r[i]&&r[i].parent,l=c&&s(c);l&&(o[i]=[c].concat(l))}return o[i]}return Object.keys(n).concat(Object.keys(r)).forEach(s),o}function on(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(c){s=De(r[c]||o[c],s)}return i(t),n.forEach(i),De(e,s)}function rn(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=nn(e);for(const o in r){const s=r[o];s&&(t(o,on(e,o,s)),n.push(o))}return n}const F=/^[a-z0-9]+(-[a-z0-9]+)*$/,R=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),a={provider:o.length>0?o[0]:r,prefix:l,name:c};return t&&!J(a)?null:a}const s=o[0],i=s.split("-");if(i.length>1){const c={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!J(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!J(c,n)?null:c}return null},J=(e,t)=>e?!!((e.provider===""||e.provider.match(F))&&(t&&e.prefix===""||e.prefix.match(F))&&e.name.match(F)):!1,sn={provider:"",aliases:{},not_found:{},...Xe};function ue(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function cn(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ue(e,sn))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(F)||typeof s.body!="string"||!ue(s,pe))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(F)||typeof i!="string"||!n[i]&&!r[i]||!ue(s,pe))return null}return t}const ee=Object.create(null);function an(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function _(e,t){const n=ee[e]||(ee[e]=Object.create(null));return n[t]||(n[t]=an(e,t))}function ke(e,t){return cn(t)?rn(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ln(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function un(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(ee)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(ee[o]||{})).forEach(i=>{const c=_(o,i);n=n.concat(Object.keys(c.icons).map(l=>(o!==""?"@"+o+":":"")+i+":"+l))})}),n}let Ee=!1;function fn(e){return Ee}function H(e){const t=typeof e=="string"?R(e,!0,Ee):e;if(t){const n=_(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function dn(e,t){const n=R(e,!0,Ee);if(!n)return!1;const r=_(n.provider,n.prefix);return ln(r,n.name,t)}function Ye(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!J({provider:t,prefix:n,name:"a"}))return!1;const r=_(t,n);return!!ke(r,e)}function pn(e){return!!H(e)}function mn(e){const t=H(e);return t?{...U,...t}:null}const Ze=Object.freeze({width:null,height:null}),et=Object.freeze({...Ze,...Z}),hn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function me(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(hn);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=gn.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?o.push(s):o.push(Math.ceil(c*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const bn=e=>e==="unset"||e==="undefined"||e==="none";function oe(e,t){const n={...U,...e},r={...et,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],E=g.hFlip,A=g.vFlip;let w=g.rotate;E?A?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):A&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let S;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:S=o.height/2+o.top,y.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:S=o.width/2+o.left,y.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}w%2===1&&(o.left!==o.top&&(S=o.left,o.left=o.top,o.top=S),o.width!==o.height&&(S=o.width,o.width=o.height,o.height=S)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,c=r.height,l=o.width,a=o.height;let u,p;i===null?(p=c===null?"1em":c==="auto"?a:c,u=me(p,l/a)):(u=i==="auto"?l:i,p=c===null?me(u,a/l):c==="auto"?a:c);const f={},h=(g,y)=>{bn(y)||(f[g]=y.toString())};return h("width",u),h("height",p),f.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+a.toString(),{attributes:f,body:s}}const yn=/\sid="(\S+)"/g,vn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let xn=0;function tt(e,t=vn){const n=[];let r;for(;r=yn.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const i=typeof t=="function"?t(s):t+(xn++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const O={local:!0,session:!0},nt={local:new Set,session:new Set};let Ce=!1;function wn(e){Ce=e}const Be="iconify2",$="iconify",ot=$+"-count",Me=$+"-version",rt=36e5,Sn=168;function he(e,t){try{return e.getItem(t)}catch{}}function _e(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Re(e,t){try{e.removeItem(t)}catch{}}function ge(e,t){return _e(e,ot,t.toString())}function be(e){return parseInt(he(e,ot))||0}let Q=typeof window>"u"?{}:window;function st(e){const t=e+"Storage";try{if(Q&&Q[t]&&typeof Q[t].length=="number")return Q[t]}catch{}O[e]=!1}function it(e,t){const n=st(e);if(!n)return;const r=he(n,Me);if(r!==Be){if(r){const c=be(n);for(let l=0;l<c;l++)Re(n,$+l.toString())}_e(n,Me,Be),ge(n,0);return}const o=Math.floor(Date.now()/rt)-Sn,s=c=>{const l=$+c.toString(),a=he(n,l);if(typeof a=="string"){try{const u=JSON.parse(a);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,c))return!0}catch{}Re(n,l)}};let i=be(n);for(let c=i-1;c>=0;c--)s(c)||(c===i-1?(i--,ge(n,i)):nt[e].add(c))}function ct(){if(!Ce){wn(!0);for(const e in O)it(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=_(r,o);if(!ke(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function at(e,t){switch(e){case"local":case"session":O[e]=t;break;case"all":for(const n in O)O[n]=t;break}}const ye=Object.create(null);function lt(e,t){ye[e]=t}function ve(e){return ye[e]||ye[""]}function Te(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const re=Object.create(null),N=["https://api.simplesvg.com","https://api.unisvg.com"],X=[];for(;N.length>0;)N.length===1||Math.random()>.5?X.push(N.shift()):X.push(N.pop());re[""]=Te({resources:["https://api.iconify.design"].concat(X)});function ut(e,t){const n=Te(t);return n===null?!1:(re[e]=n,!0)}function se(e){return re[e]}function In(){return Object.keys(re)}const kn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let te=kn();function En(e){te=e}function Cn(){return te}function _n(e,t){const n=se(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function Tn(e){return e===404}const jn=(e,t,n)=>{const r=[],o=_n(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,a)=>{c+=l.length+1,c>=o&&a>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),r.push(i),r};function Pn(e){if(typeof e=="string"){const t=se(e);if(t)return t.path}return"/"}const An=(e,t,n)=>{if(!te){n("abort",424);return}let r=Pn(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;te(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(Tn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},On={prepare:jn,send:An};function Ln(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,c=o.name,l=n[s]||(n[s]=Object.create(null)),a=l[i]||(l[i]=_(s,i));let u;c in a.icons?u=t.loaded:i===""||a.missing.has(c)?u=t.missing:u=t.pending;const p={provider:s,prefix:i,name:c};u.push(p)}),t}function ft(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Dn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==o)return!0;const a=l.name;if(e.icons[a])i.loaded.push({provider:r,prefix:o,name:a});else if(e.missing.has(a))i.missing.push({provider:r,prefix:o,name:a});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||ft([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Bn=0;function Mn(e,t,n){const r=Bn++,o=ft.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}function Rn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?R(o,t,n):o;s&&r.push(s)}),r}var Nn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Fn(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let m=e.resources.slice(0);for(i=[];m.length>1;){const k=Math.floor(Math.random()*m.length);i.push(m[k]),m=m.slice(0,k).concat(m.slice(k+1))}i=i.concat(m)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",a=0,u,p=null,f=[],h=[];typeof r=="function"&&h.push(r);function g(){p&&(clearTimeout(p),p=null)}function y(){l==="pending"&&(l="aborted"),g(),f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function E(m,k){k&&(h=[]),typeof m=="function"&&h.push(m)}function A(){return{startTime:c,payload:t,status:l,queriesSent:a,queriesPending:f.length,subscribe:E,abort:y}}function w(){l="failed",h.forEach(m=>{m(void 0,u)})}function S(){f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function D(m,k,C){const B=k!=="success";switch(f=f.filter(T=>T!==m),l){case"pending":break;case"failed":if(B||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){u=C,w();return}if(B){u=C,f.length||(i.length?v():w());return}if(g(),S(),!e.random){const T=e.resources.indexOf(m.resource);T!==-1&&T!==e.index&&(e.index=T)}l="completed",h.forEach(T=>{T(C)})}function v(){if(l!=="pending")return;g();const m=i.shift();if(m===void 0){if(f.length){p=setTimeout(()=>{g(),l==="pending"&&(S(),w())},e.timeout);return}w();return}const k={status:"pending",resource:m,callback:(C,B)=>{D(k,C,B)}};f.push(k),a++,p=setTimeout(v,e.rotate),n(m,t,k.callback)}return setTimeout(v),A}function dt(e){const t={...Nn,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function o(c,l,a){const u=Fn(t,c,l,(p,f)=>{r(),a&&a(p,f)});return n.push(u),u}function s(c){return n.find(l=>c(l))||null}return{query:o,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Ne(){}const fe=Object.create(null);function Vn(e){if(!fe[e]){const t=se(e);if(!t)return;const n=dt(t),r={config:t,redundancy:n};fe[e]=r}return fe[e]}function pt(e,t,n){let r,o;if(typeof e=="string"){const s=ve(e);if(!s)return n(void 0,424),Ne;o=s.send;const i=Vn(e);i&&(r=i.redundancy)}else{const s=Te(e);if(s){r=dt(s);const i=e.resources?e.resources[0]:"",c=ve(i);c&&(o=c.send)}}return!r||!o?(n(void 0,424),Ne):r.query(t,o,n)().abort}function zn(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in O)it(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function $n(e,t){Ce||ct();function n(r){let o;if(!O[r]||!(o=st(r)))return;const s=nt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=be(o),!ge(o,i+1))return;const c={cached:Math.floor(Date.now()/rt),provider:e.provider,data:t};return _e(o,$+i.toString(),JSON.stringify(c))}t.lastModified&&!zn(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Fe(){}function Un(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Dn(e)}))}function Hn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=ve(n)))return;s.prepare(n,r,o).forEach(c=>{pt(n,c,l=>{if(typeof l!="object")c.icons.forEach(a=>{e.missing.add(a)});else try{const a=ke(e,l);if(!a.length)return;const u=e.pendingIcons;u&&a.forEach(p=>{u.delete(p)}),$n(e,l)}catch(a){console.error(a)}Un(e)})})}))}const qn=e=>{const n=_(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},je=(e,t)=>{const n=Rn(e,!0,fn()),r=Ln(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Fe)}),()=>{l=!1}}const o=Object.create(null),s=[];let i,c;return r.pending.forEach(l=>{const{provider:a,prefix:u}=l;if(u===c&&a===i)return;i=a,c=u,s.push(_(a,u));const p=o[a]||(o[a]=Object.create(null));p[u]||(p[u]=[])}),r.pending.forEach(l=>{const{provider:a,prefix:u,name:p}=l,f=_(a,u),h=f.pendingIcons||(f.pendingIcons=new Set);h.has(p)||(h.add(p),o[a][u].push(p))}),s.forEach(l=>{const{provider:a,prefix:u}=l;o[a][u].length&&Hn(l,o[a][u])}),t?Mn(t,r,s):Fe},Gn=e=>new Promise((t,n)=>{const r=typeof e=="string"?R(e,!0):e;if(!r){n(e);return}je([r||e],o=>{if(o.length&&r){const s=H(r);if(s){t({...U,...s});return}}n(e)})});function mt(e,t){const n={...e};for(const r in t){const o=t[r],s=typeof o;r in Ze?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const ie={...et,inline:!1},de="iconify",xe="iconify-inline",P="iconifyData"+Date.now();let L=[];function q(e){for(let t=0;t<L.length;t++){const n=L[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function ht(e,t=!1){let n=q(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},L.push(n),n)}function Qn(){if(document.documentElement)return ht(document.documentElement);L.push({node:()=>document.documentElement})}function Kn(e){L=L.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function G(){return L}function Wn(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let V=null;const Jn={childList:!0,subtree:!0,attributes:!0};function gt(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,V&&V(e)}))}function Xn(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[P]!==void 0){n.paused||gt(e);return}}}function bt(e,t){e.observer.instance.observe(t,Jn)}function ne(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Xn.bind(null,e)),bt(e,n),t.paused||gt(e))}function Ve(){G().forEach(ne)}function yt(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Yn(e){const t=V!==null;if(V!==e&&(V=e,t&&G().forEach(yt)),t){Ve();return}Wn(Ve)}function we(e){(e?[e]:G()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Zn(e){if(e){const t=q(e);t&&we(t)}else we()}function Se(e){(e?[e]:G()).forEach(t=>{if(!t.observer){ne(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?bt(t,r):ne(t);else return}})}function eo(e){if(e){const t=q(e);t&&Se(t)}else Se()}function vt(e,t=!1){const n=ht(e,t);return ne(n),n}function xt(e){const t=q(e);t&&(yt(t),Kn(e))}function to(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in ie)if(n[o]!==r[o])return!0;return!1}function no(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const oo=/[\s,]+/;function ro(e,t){t.split(oo).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const so=["width","height"],io=["inline","hFlip","vFlip"];function co(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function ao(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&R(t,!0);if(!n)return null;const r={...ie,inline:e.classList&&e.classList.contains(xe)};so.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=no(o));const s=e.getAttribute("data-flip");typeof s=="string"&&ro(r,s),io.forEach(c=>{const l="data-"+c,a=co(e.getAttribute(l),l);typeof a=="boolean"&&(r[c]=a)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:i}}const lo="svg."+de+", i."+de+", span."+de+", i."+xe+", span."+xe;function uo(e){const t=[];return e.querySelectorAll(lo).forEach(n=>{const r=n[P]||n.tagName.toLowerCase()!=="svg"?ao(n):null;r&&t.push({node:n,props:r})}),t}function wt(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let z;function fo(){try{z=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{z=null}}function po(e){return z===void 0&&fo(),z?z.createHTML(e):e}function St(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function It(e,t,n,r){const o=e.classList;if(r){const i=r.classList;Array.from(i).forEach(c=>{o.add(c)})}const s=[];return t.forEach(i=>{o.contains(i)?n.has(i)&&s.push(i):(o.add(i),s.push(i))}),n.forEach(i=>{t.has(i)||o.remove(i)}),s}function kt(e,t,n){const r=e.style;(n||[]).forEach(s=>{r.removeProperty(s)});const o=[];for(const s in t)r.getPropertyValue(s)||(o.push(s),r.setProperty(s,t[s]));return o}function Et(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,s=oe(n,o),i=e[P],c=wt(tt(s.body),{"aria-hidden":"true",role:"img",...s.attributes});r.innerHTML=po(c);const l=r.childNodes[0],a=e.attributes;for(let g=0;g<a.length;g++){const y=a.item(g),E=y.name;E!=="class"&&!l.hasAttribute(E)&&l.setAttribute(E,y.value)}const u=St(t.icon),p=It(l,u,new Set(i&&i.addedClasses),e),f=kt(l,o.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),h={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[P]=h,e.parentNode&&e.parentNode.replaceChild(l,e),l}function mo(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ho(e){return"data:image/svg+xml,"+mo(e)}function go(e){return'url("'+ho(e)+'")'}const bo={display:"inline-block"},Ie={"background-color":"currentColor"},Ct={"background-color":"transparent"},ze={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},$e={"-webkit-mask":Ie,mask:Ie,background:Ct};for(const e in $e){const t=$e[e];for(const n in ze)t[e+"-"+n]=ze[n]}function Ue(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function yo(e,t,n,r){const o=t.customisations,s=oe(n,o),i=s.attributes,c=e[P],l=wt(s.body,{...i,width:n.width+"",height:n.height+""}),a=St(t.icon),u=It(e,a,new Set(c&&c.addedClasses)),f={"--svg":go(l),width:Ue(i.width),height:Ue(i.height),...bo,...r?Ie:Ct};o.inline&&(f["vertical-align"]="-0.125em");const h=kt(e,f,c&&c.addedStyles),g={...t,status:"loaded",addedClasses:u,addedStyles:h};return e[P]=g,e}let K=!1;function vo(){K||(K=!0,setTimeout(()=>{K&&(K=!1,M())}))}function M(e,t=!1){const n=Object.create(null);function r(o,s){const{provider:i,prefix:c,name:l}=o,a=_(i,c),u=a.icons[l];if(u)return{status:"loaded",icon:u};if(a.missing.has(l))return{status:"missing"};if(s&&!qn(o)){const p=n[i]||(n[i]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:G()).forEach(o=>{const s=typeof o.node=="function"?o.node():o.node;if(!s||!s.querySelectorAll)return;let i=!1,c=!1;function l(a,u,p){if(c||(c=!0,we(o)),a.tagName.toUpperCase()!=="SVG"){const f=u.mode,h=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof h=="boolean"){yo(a,u,{...U,...p},h);return}}Et(a,u,p)}uo(s).forEach(({node:a,props:u})=>{const p=a[P];if(!p){const{status:h,icon:g}=r(u.icon,!0);if(g){l(a,u,g);return}i=i||h==="loading",a[P]={...u,status:h};return}let f;if(to(p,u)){if(f=r(u.icon,p.name!==u.name),!f.icon){i=i||f.status==="loading",Object.assign(p,{...u,status:f.status});return}}else{if(p.status!=="loading")return;if(f=r(u.icon,!1),!f.icon){p.status=f.status;return}}l(a,u,f.icon)}),o.temporary&&!i?xt(s):t&&i?vt(s,!0):c&&o.observer&&Se(o)});for(const o in n){const s=n[o];for(const i in s){const c=s[i];je(Array.from(c).map(l=>({provider:o,prefix:i,name:l})),vo)}}}function xo(e){const t=q(e);t?M(t):M({node:e,temporary:!0},!0)}function _t(e,t,n=!1){const r=H(e);if(!r)return null;const o=R(e),s=mt(ie,t||{}),i=Et(document.createElement("span"),{name:e,icon:o,customisations:s},r);return n?i.outerHTML:i}function wo(){return"3.1.1"}function So(e,t){return _t(e,t,!1)}function Io(e,t){return _t(e,t,!0)}function ko(e,t){const n=H(e);if(!n)return null;const r=mt(ie,t||{});return oe(n,r)}function Eo(e){e?xo(e):M()}if(typeof document<"u"&&typeof window<"u"){Qn();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Ye(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Yn(M),M()})}function Co(e,t){at(e,t!==!1)}function _o(e){at(e,!0)}lt("",On);if(typeof document<"u"&&typeof window<"u"){ct();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;ut(n,o)||console.error(r)}catch{console.error(r)}}}}const To={getAPIConfig:se,setAPIModule:lt,sendAPIQuery:pt,setFetch:En,getFetch:Cn,listAPIProviders:In},jo={_api:To,addAPIProvider:ut,loadIcons:je,loadIcon:Gn,iconExists:pn,getIcon:mn,listIcons:un,addIcon:dn,addCollection:Ye,replaceIDs:tt,calculateSize:me,buildIcon:oe,getVersion:wo,renderSVG:So,renderHTML:Io,renderIcon:ko,scan:Eo,observe:vt,stopObserving:xt,pauseObserver:Zn,resumeObserver:eo,enableCache:Co,disableCache:_o};try{self.Iconify===void 0&&(self.Iconify=jo)}catch{}const Po=e=>{const t={};let n=null;return j.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=j.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},Ao=(e,t,n)=>{const{hostname:r,href:o}=e;if(!t)return o;if(n){const i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!i)return o;const c=i[0],a=((t.site?.domainAliases||[]).map(u=>u.value).filter(Boolean).find(u=>u.endsWith(Pe))||"").replace(`.${Pe}`,"");return a?o.replace(r,`${a}-${c}.${At}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Oo(){const{t:e}=He(),{api:t}=qe(),{blocklet:n}=Kt(),{inService:r}=Tt(),[o,s]=b.useState(!1),[i,c]=b.useState(5),l=n&&n.structVersion!==Ge,a=()=>{try{if(j.isBlockletRunning(n)){W.error(e("blocklet.migrate.tip.running"));return}const f=Po(n);if(f){W.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}s(!0)}catch(f){W.error(We(f))}},u=()=>{const f=Ao(window.location,n,r);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(h=>h-1)},1e3)},p=()=>s(!1);return[l&&d.jsxs(Qe,{severity:"warning",style:{margin:"12px 0"},children:[d.jsxs(Y,{sx:{display:"flex",alignItems:"center"},children:[d.jsx(Ke,{variant:"contained",size:"small",color:"primary",onClick:()=>a(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),d.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>d.jsx(Y,{sx:{display:"flex",alignItems:"center"},children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&d.jsx(jt,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:300*1e3,onSuccess:u,extraParams:{appDid:n.appDid,did:n.meta.did,wt:Pt(n,!0),title:j.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:i>=0?e("blocklet.migrate.success",{sec:i}):"Redirecting..."},onClose:p},"connect")]}const Lo=b.lazy(()=>I(()=>import("./overview-BPSzB7yi.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url)),Do=b.lazy(()=>I(()=>import("./domains-DlW2t7QG.js"),__vite__mapDeps([18,1,2,19,20,21,6,22,23,24,25,26,27,28,15,29,30,31,32,5,33,34,35,36,37,10]),import.meta.url)),Bo=b.lazy(()=>I(()=>import("./index-pMmL--Md.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,8,22,46,47,10,48,12,49,50,51,52,53,54,55,56,57,58,6,26,7,5,59,9,11,13,60,61,62,63,64,65,66,67,68,23,29,69,70,71,72,73,74,20,75,76,77,78,15]),import.meta.url)),Mo=b.lazy(()=>I(()=>import("./appearance-CRQaeOoe.js"),__vite__mapDeps([79,1,2,6,78]),import.meta.url)),Ro=b.lazy(()=>I(()=>import("./config-navigation-iUuwjLA_.js"),__vite__mapDeps([80,1,2,12,81,49,82,74,6,63,64,65,83,7,8,39,40,41,42,43,44,45,22,61,68,47,77,52,17,55,56,84,32,85,54,37]),import.meta.url)),No=b.lazy(()=>I(()=>import("./index-p8ewFFuc.js"),__vite__mapDeps([86,1,2,70,71,72,73,63,64,65,74,20,75,76,77,41,87,5,47,88,89,90,54,91,46,92,93,94,95,96,58]),import.meta.url)),Fo=b.lazy(()=>I(()=>import("./audit-logs-BGRhRsNS.js"),__vite__mapDeps([97,20,1,2,75,76,77,40,98,99,100,87,7,6,8]),import.meta.url)),Vo=b.lazy(()=>I(()=>import("./index-_qKxdWY4.js").then(e=>e.i),__vite__mapDeps([101,1,2,70,71,72,73,63,64,65,74,20,75,76,77,41,47,7,6,8,102,78,103,44,45,22,104,81,29,51,105,59,106,107,19]),import.meta.url)),zo=b.lazy(()=>I(()=>import("./index-De_3fKYA.js").then(e=>e.i),__vite__mapDeps([108,1,2,29,109,70,71,72,73,63,64,65,74,20,75,76,77,41,13,103,44,45,7,6,8,61,104,81,55,56,100,69,5,22,26,95,96,58,47,110,42,111,11,112,113,114,19,67,115,62,78,23,24,87,102,68]),import.meta.url)),$o=b.lazy(()=>I(()=>import("./service-COrrqY-3.js"),__vite__mapDeps([116,1,2,117,71,72,73,92,65,83,64,96,47,29,23,77,118,46,91,76,52]),import.meta.url)),Uo=b.lazy(()=>I(()=>import("./index-CRRnOuLM.js"),__vite__mapDeps([119,1,2,20,39,40,41,42,43,44,45,8,22,60,6,118,117,71,72,73,92,65,83,64,96,47,29,23,77,46,91,76,52,48,12,49,50,51,53,54,26,103,120,121,110,55,56,28,122,25,123,124,125,35,126,4,16,17,36,127,3,128,98,99,104,81,129,27,130,115,67,5,84,131,33,34,78,11,111,107,88,24,132,7]),import.meta.url)),Ho=b.lazy(()=>I(()=>import("./log-BtG4l72D.js"),__vite__mapDeps([133,1,2,40,134,44,45,56]),import.meta.url)),qo=b.lazy(()=>I(()=>import("./runtime-BJVsSRvX.js"),__vite__mapDeps([135,1,2,70,71,72,73,63,64,65,74,20,75,76,77,41,6,127,136,93,94,27,106,45]),import.meta.url)),Go=b.lazy(()=>I(()=>import("./traffic-BuuDuC5C.js").then(e=>e.t),__vite__mapDeps([90,1,2,54,91,46,92,65,93,94,95,96,58,72]),import.meta.url)),Qo=b.lazy(()=>I(()=>import("./index-MLCJ7HJV.js"),__vite__mapDeps([137,1,2,47,6,78,126,4,16,17,42,36,127,3,103,44,45,5,94,70,71,72,73,63,64,65,74,20,75,76,77,41,43,60,105]),import.meta.url)),Ko=({children:e})=>e;function Wo(){const e=Ot(),{tab:t="overview"}=Je(),{did:n,blocklet:r,error:o,client:s,actions:{setBlocklet:i,refreshBlocklet:c}}=Xt(),{refresh:l}=Lt(),{t:a}=He(),{session:u}=qe(),{data:p}=Dt(),f=Bt(()=>u.user?.role&&Mt.includes(u.user.role),[u]),h=b.useCallback(()=>d.jsx(Fo,{scope:n,blocklets:p}),[n,p]),g=b.useCallback(()=>f?d.jsx(No,{blocklet:r}):d.jsx(Wt,{status:403}),[r,f]),y=r?.environments.find(x=>x.key==="BLOCKLET_APP_URL")?.value||window.location.origin,E=x=>Nt(x,y),A=x=>{e(`/blocklets/${n}/${x}`)},w=x=>{x&&i(x),c()},S=!r||Ae(r.status)?[]:j.getAppMissingConfigs(r);let D=null;const v=[{label:a("common.overview"),value:"overview"},{breadcrumbsLabel:a("common.components"),label:d.jsx(Rt,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!S.length,children:a("common.components")}),value:"components"}];if(o)D=d.jsxs(d.Fragment,{children:[d.jsx(Qe,{severity:"error",children:We(o)}),d.jsx(Ke,{onClick:()=>c(),children:d.jsx("span",{style:{textDecoration:"underline"},children:a("common.retry")})})]});else if(r){const x={overview:d.jsx(Lo,{}),domains:d.jsx(Do,{}),configuration:Bo,appearance:Mo,navigation:Ro,services:$o,members:d.jsx(zo,{type:"blocklet",createPassportSvg:E}),passports:Vo,components:Uo,"audit-logs":h,notifications:g,logs:Ho,runtime:d.jsx(qo,{}),traffic:d.jsx(Go,{client:s,did:n}),didSpaces:d.jsx(Qo,{})};t==="configuration"&&Ae(r.status)&&A("overview"),v.push({label:a("common.domains"),value:"domains"}),v.push({label:a("common.members"),value:"members"}),v.push({label:a("team.member.passports"),value:"passports"}),v.push({label:a("common.configuration"),value:"configuration"}),v.push({label:a("common.appearance"),value:"appearance"}),v.push({label:a("common.auditLogs"),value:"audit-logs"}),f&&v.push({label:a("common.notificationRecords"),value:"notifications"}),r&&r.children?.length&&r.structVersion===Ge&&v.push({label:a("common.logs"),value:"logs"}),v.push({label:a("common.configNavigation"),value:"navigation"}),v.push({label:a("common.runtime"),value:"runtime"}),v.push({label:a("common.traffic"),value:"traffic"}),v.push({label:a("storage.spaces.title"),value:"didSpaces"}),j.getBlockletServices(r).length&&v.splice(2,0,{label:a("blocklet.services"),value:"services"});const ae=x[t]||x.overview;D=d.jsxs(Gt,{type:"components",children:[!j.isExternalBlocklet(r)&&d.jsx(Ut,{tabs:v,current:t,onChange:A,scrollButtons:"auto"}),d.jsx("div",{className:"page-content",children:d.jsx(b.Suspense,{fallback:d.jsx(Oe,{relative:"parent",children:d.jsx(Le,{})}),children:b.isValidElement(ae)?ae:d.jsx(ae,{blocklet:r,onUpdate:w,createPassportSvg:E})})})]})}else D=d.jsx(Oe,{relative:"parent",children:d.jsx(Le,{})});const m=()=>{},k=({action:x,error:ce})=>{if(ce){W.error(ce.message);return}x==="remove"?(l(),e("/blocklets")):c()},C=v.find(x=>x.value===t),B=r?Yt:Ko,T=Ht(C,r?.meta?.title||a("common.blocklets"));return d.jsxs(B,{teamDid:n,children:[T,d.jsxs(Jo,{children:[d.jsxs(en,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[d.jsx(Ft,{color:"textSecondary",to:"/blocklets",children:a("common.blocklets")}),d.jsx(Vt,{to:`/blocklets/${n}/overview`,style:x=>x?{color:"inherit"}:{},children:a("common.detail")}),d.jsx(le,{color:"textSecondary",children:C?C.breadcrumbsLabel||C.label:""})]}),d.jsxs(le,{component:"div",className:"page-header",children:[d.jsxs(le,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[r?d.jsx(zt,{blocklet:r,style:{marginRight:16}}):null,r?d.jsxs(Y,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1},children:[d.jsx(Y,{children:j.getDisplayName(r)}),r?.status!=="unknown"&&d.jsx(qt,{size:"12px",status:r.status,source:r.source,progress:r.progress})]}):`${a("common.blocklet")} ${a("common.detail")}`]}),d.jsx(Zt,{permission:"mutate_blocklets",children:!!r&&!j.isExternalBlocklet(r)&&d.jsx(Qt,{className:"page-actions",blocklet:r,onStart:m,onComplete:k,variant:"group",source:"blocklet-detail"})})]}),d.jsx(Oo,{}),D]})]})}function pr(){const{did:e}=Je();return e?d.jsx(Jt,{did:e,children:d.jsx(Wo,{})}):null}const Jo=$t.main`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./overview-Cu4YrIFe.js","./index-Dtj3cePH.js","./index-BLDnEtdF.css","./HelpOutline-dihfOb5v.js","./index-BojVbZw0.js","./index-TLvz3wdj.js","./blocklet-B65NZ0SL.js","./team-cDk0EvPf.js","./url-evaluation-D49POKf_.js","./status-VF8vuUxF.js","./index-CkfMmvW2.js","./ErrorOutline-DsKZTEd8.js","./omit-C22NrHjF.js","./index-DTafCIMf.js","./metric-DCKs2r9K.js","./CardContent-De2diFnM.js","./spaces-BsLjYZLj.js","./api-BLIecOBq.js","./domains-ilDCawII.js","./trim-Diihj-s0.js","./index-imQtUA1Y.js","./useAsync-CLJdaax3.js","./permission-B-geZ8jf.js","./Delete-B-jFRJwJ.js","./actions-rnAVohGM.js","./delete-confirm-BCALKic0.js","./click-to-copy-BgfWbRfM.js","./status-CcMfecIj.js","./VerifiedUser-Ddu-50lW.js","./Add-CaX-C76B.js","./CallMerge-g03IIE2c.js","./toLower-D7a3qnvH.js","./use-mobile-wKUCaVoo.js","./util-BVHL76Cg.js","./is-path-prefix-equal-BxWUya7r.js","./engine-xHEY-z1Q.js","./OpenInNew-DXke8B9Y.js","./LoadingButton-CDH-grwB.js","./index-2QIyI-hX.js","./actions-CUnz9wHy.js","./useLocalStorage-Dn6UErBV.js","./MoreVert-DV_CQ8ui.js","./DeleteOutline-7b3f7PEm.js","./get-safe-url-C0YzO5pG.js","./ButtonGroup-CFUm4DnA.js","./getValidReactChildren-BwWzCXzg.js","./ChevronRight-Ba1GeQFe.js","./html-title-wftxlNic.js","./preference-C8QaexiP.js","./index-BgEoonJf.js","./Done-L7ZRzL_V.js","./edit.svg-088QpjsR.js","./ArrowDropDown-225S5d4X.js","./index-Ce4rkgom.js","./iframe-CVO90dup.js","./Autocomplete-CoHLc9sw.js","./ListSubheader-Cl_ECqW2.js","./rotate-session-key-BPhFiNZy.js","./visuallyHidden-Dan1xhjv.js","./chain-De_ycb3s.js","./switch-control-CzpP7CIf.js","./index.esm-KhX4wp--.js","./isEmail-DeuFXn6y.js","./index-CSC84DXT.js","./redux-Ab4buSXY.js","./typeof-QjJsDpFa.js","./provider-icon-lv3oS7d4.js","./passkey-rounded-_WDHIZVd.js","./simple-select-CHH0_oB5.js","./federated-detail-dialog-FIBSqJbV.js","./index-DtdZa4Ii.js","./FilterList-ChbigVQM.js","./CSSTransition-BoEOBxnu.js","./emotion-cache.browser.esm-fPnQyG8C.js","./depsEqual-iVI-ppGn.js","./TableSearch-C5Kz0G1P.js","./Search-z9bCqmrZ.js","./Clear-B_hKjaJj.js","./use-mobile-xq_yWBax.js","./appearance-BnoPFfcA.js","./config-navigation-CAY0oLM7.js","./cloneDeep-BBtZ6NeX.js","./_createAggregator-DvxY8dpL.js","./raf-schd.esm-B49R8L3J.js","./ListItemButton-BQDScowx.js","./index-BXslTYRT.js","./index-C9laDmdO.js","./shorten-label-DmKAPPTX.js","./Replay-B4flsCqt.js","./Refresh-D_WONHhn.js","./traffic-DYynIkpC.js","./ChevronLeft-6mKauCKy.js","./index-CVhk080O.js","./base-chart-B-7wNcRu.js","./index-B0mArAvv.js","./AdapterDayjs-DWO9WIHe.js","./useThemeProps-9zV1AZbb.js","./audit-logs-rRPPzNCV.js","./index-XFNKEyIx.js","./index-ed1TwQco.css","./UnfoldMore-B28R2WSj.js","./index-BsxJA--7.js","./ua-parser-D6QF1h5N.js","./index-UjkYO3io.js","./Google-CWlHJZAv.js","./list-header-B3--_6Bl.js","./ToggleButtonGroup-BZx2FaaL.js","./lock.svg-Cgo551jB.js","./index-Bt02N9ee.js","./ViewList-D-osXRf3.js","./Verified-TZI1j-Va.js","./Visibility-BVnDeVk-.js","./index-DrnnoDEf.js","./sdk-Bx_WDGD1.js","./actions-TKbswZRW.js","./login-method-item-rb7xoaP3.js","./service-Bad7qk9f.js","./table-icons-Bo0tOvqU.js","./Edit-DUM500XS.js","./index-OZ9TU2gG.js","./Link-DOvnx4g5.js","./item-DI_IF5jI.js","./Launch-BkVAoVZE.js","./item-D4DUnQj0.css","./index-DHJJWO6c.js","./url-join-CYWu6vsi.js","./connect-to-TtcHrCpE.js","./index-D29L5UKE.js","./agreement-B81jBHjm.js","./install-from-url-B05WE8Ly.js","./without-wallet-BzLoVl__.js","./Stepper-DKmKSFCG.js","./toUpper-B8LTwalX.js","./log-ll3_FUxN.js","./download-BLP_P5GN.js","./runtime-DhJ59c5Q.js","./memory-DzWPIeHP.js","./index-GSHwCvc7.js"])))=>i.map(i=>d[i]);
2
+ import{V as He,d as qe,aS as Tt,r as b,by as Ge,j as d,at as Qe,B as Y,bz as Ke,A as jt,aU as j,bA as Pt,H as W,bB as We,bC as Pe,bD as At,a as Je,u as Ot,b as Lt,bE as Dt,bF as Bt,bG as Mt,bH as Ae,bI as Rt,bJ as Nt,b3 as Oe,C as Le,bK as Ft,bL as Vt,J as le,bM as zt,G as I,q as $t}from"./index-Dtj3cePH.js";import{T as Ut,u as Ht}from"./html-title-wftxlNic.js";import{B as qt}from"./status-CcMfecIj.js";import{D as Gt,B as Qt}from"./actions-CUnz9wHy.js";import{u as Kt}from"./blocklet-B65NZ0SL.js";import{p as Wt}from"./index-DdoE1xT5.js";import{B as Jt,u as Xt,T as Yt}from"./team-cDk0EvPf.js";import{P as Zt}from"./permission-B-geZ8jf.js";import{B as en}from"./Breadcrumbs-CtmWaPWD.js";import"./useLocalStorage-Dn6UErBV.js";import"./MoreVert-DV_CQ8ui.js";import"./DeleteOutline-7b3f7PEm.js";import"./get-safe-url-C0YzO5pG.js";import"./ButtonGroup-CFUm4DnA.js";import"./getValidReactChildren-BwWzCXzg.js";import"./url-evaluation-D49POKf_.js";const Xe=Object.freeze({left:0,top:0,width:16,height:16}),Z=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),U=Object.freeze({...Xe,...Z}),pe=Object.freeze({...U,body:"",hidden:!1});function tn(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function De(e,t){const n=tn(e,t);for(const r in pe)r in Z?r in e&&!(r in n)&&(n[r]=Z[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function nn(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const c=r[i]&&r[i].parent,l=c&&s(c);l&&(o[i]=[c].concat(l))}return o[i]}return Object.keys(n).concat(Object.keys(r)).forEach(s),o}function on(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(c){s=De(r[c]||o[c],s)}return i(t),n.forEach(i),De(e,s)}function rn(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=nn(e);for(const o in r){const s=r[o];s&&(t(o,on(e,o,s)),n.push(o))}return n}const F=/^[a-z0-9]+(-[a-z0-9]+)*$/,R=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),a={provider:o.length>0?o[0]:r,prefix:l,name:c};return t&&!J(a)?null:a}const s=o[0],i=s.split("-");if(i.length>1){const c={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!J(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!J(c,n)?null:c}return null},J=(e,t)=>e?!!((e.provider===""||e.provider.match(F))&&(t&&e.prefix===""||e.prefix.match(F))&&e.name.match(F)):!1,sn={provider:"",aliases:{},not_found:{},...Xe};function ue(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function cn(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ue(e,sn))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(F)||typeof s.body!="string"||!ue(s,pe))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(F)||typeof i!="string"||!n[i]&&!r[i]||!ue(s,pe))return null}return t}const ee=Object.create(null);function an(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function _(e,t){const n=ee[e]||(ee[e]=Object.create(null));return n[t]||(n[t]=an(e,t))}function ke(e,t){return cn(t)?rn(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ln(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function un(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(ee)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(ee[o]||{})).forEach(i=>{const c=_(o,i);n=n.concat(Object.keys(c.icons).map(l=>(o!==""?"@"+o+":":"")+i+":"+l))})}),n}let Ee=!1;function fn(e){return Ee}function H(e){const t=typeof e=="string"?R(e,!0,Ee):e;if(t){const n=_(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function dn(e,t){const n=R(e,!0,Ee);if(!n)return!1;const r=_(n.provider,n.prefix);return ln(r,n.name,t)}function Ye(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!J({provider:t,prefix:n,name:"a"}))return!1;const r=_(t,n);return!!ke(r,e)}function pn(e){return!!H(e)}function mn(e){const t=H(e);return t?{...U,...t}:null}const Ze=Object.freeze({width:null,height:null}),et=Object.freeze({...Ze,...Z}),hn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function me(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(hn);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=gn.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?o.push(s):o.push(Math.ceil(c*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const bn=e=>e==="unset"||e==="undefined"||e==="none";function oe(e,t){const n={...U,...e},r={...et,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],E=g.hFlip,A=g.vFlip;let w=g.rotate;E?A?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):A&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let S;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:S=o.height/2+o.top,y.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:S=o.width/2+o.left,y.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}w%2===1&&(o.left!==o.top&&(S=o.left,o.left=o.top,o.top=S),o.width!==o.height&&(S=o.width,o.width=o.height,o.height=S)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,c=r.height,l=o.width,a=o.height;let u,p;i===null?(p=c===null?"1em":c==="auto"?a:c,u=me(p,l/a)):(u=i==="auto"?l:i,p=c===null?me(u,a/l):c==="auto"?a:c);const f={},h=(g,y)=>{bn(y)||(f[g]=y.toString())};return h("width",u),h("height",p),f.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+a.toString(),{attributes:f,body:s}}const yn=/\sid="(\S+)"/g,vn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let xn=0;function tt(e,t=vn){const n=[];let r;for(;r=yn.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const i=typeof t=="function"?t(s):t+(xn++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const O={local:!0,session:!0},nt={local:new Set,session:new Set};let Ce=!1;function wn(e){Ce=e}const Be="iconify2",$="iconify",ot=$+"-count",Me=$+"-version",rt=36e5,Sn=168;function he(e,t){try{return e.getItem(t)}catch{}}function _e(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Re(e,t){try{e.removeItem(t)}catch{}}function ge(e,t){return _e(e,ot,t.toString())}function be(e){return parseInt(he(e,ot))||0}let Q=typeof window>"u"?{}:window;function st(e){const t=e+"Storage";try{if(Q&&Q[t]&&typeof Q[t].length=="number")return Q[t]}catch{}O[e]=!1}function it(e,t){const n=st(e);if(!n)return;const r=he(n,Me);if(r!==Be){if(r){const c=be(n);for(let l=0;l<c;l++)Re(n,$+l.toString())}_e(n,Me,Be),ge(n,0);return}const o=Math.floor(Date.now()/rt)-Sn,s=c=>{const l=$+c.toString(),a=he(n,l);if(typeof a=="string"){try{const u=JSON.parse(a);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,c))return!0}catch{}Re(n,l)}};let i=be(n);for(let c=i-1;c>=0;c--)s(c)||(c===i-1?(i--,ge(n,i)):nt[e].add(c))}function ct(){if(!Ce){wn(!0);for(const e in O)it(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=_(r,o);if(!ke(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function at(e,t){switch(e){case"local":case"session":O[e]=t;break;case"all":for(const n in O)O[n]=t;break}}const ye=Object.create(null);function lt(e,t){ye[e]=t}function ve(e){return ye[e]||ye[""]}function Te(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const re=Object.create(null),N=["https://api.simplesvg.com","https://api.unisvg.com"],X=[];for(;N.length>0;)N.length===1||Math.random()>.5?X.push(N.shift()):X.push(N.pop());re[""]=Te({resources:["https://api.iconify.design"].concat(X)});function ut(e,t){const n=Te(t);return n===null?!1:(re[e]=n,!0)}function se(e){return re[e]}function In(){return Object.keys(re)}const kn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let te=kn();function En(e){te=e}function Cn(){return te}function _n(e,t){const n=se(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function Tn(e){return e===404}const jn=(e,t,n)=>{const r=[],o=_n(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,a)=>{c+=l.length+1,c>=o&&a>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),r.push(i),r};function Pn(e){if(typeof e=="string"){const t=se(e);if(t)return t.path}return"/"}const An=(e,t,n)=>{if(!te){n("abort",424);return}let r=Pn(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;te(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(Tn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},On={prepare:jn,send:An};function Ln(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,c=o.name,l=n[s]||(n[s]=Object.create(null)),a=l[i]||(l[i]=_(s,i));let u;c in a.icons?u=t.loaded:i===""||a.missing.has(c)?u=t.missing:u=t.pending;const p={provider:s,prefix:i,name:c};u.push(p)}),t}function ft(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Dn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==o)return!0;const a=l.name;if(e.icons[a])i.loaded.push({provider:r,prefix:o,name:a});else if(e.missing.has(a))i.missing.push({provider:r,prefix:o,name:a});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||ft([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let Bn=0;function Mn(e,t,n){const r=Bn++,o=ft.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}function Rn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?R(o,t,n):o;s&&r.push(s)}),r}var Nn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Fn(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let m=e.resources.slice(0);for(i=[];m.length>1;){const k=Math.floor(Math.random()*m.length);i.push(m[k]),m=m.slice(0,k).concat(m.slice(k+1))}i=i.concat(m)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",a=0,u,p=null,f=[],h=[];typeof r=="function"&&h.push(r);function g(){p&&(clearTimeout(p),p=null)}function y(){l==="pending"&&(l="aborted"),g(),f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function E(m,k){k&&(h=[]),typeof m=="function"&&h.push(m)}function A(){return{startTime:c,payload:t,status:l,queriesSent:a,queriesPending:f.length,subscribe:E,abort:y}}function w(){l="failed",h.forEach(m=>{m(void 0,u)})}function S(){f.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),f=[]}function D(m,k,C){const B=k!=="success";switch(f=f.filter(T=>T!==m),l){case"pending":break;case"failed":if(B||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){u=C,w();return}if(B){u=C,f.length||(i.length?v():w());return}if(g(),S(),!e.random){const T=e.resources.indexOf(m.resource);T!==-1&&T!==e.index&&(e.index=T)}l="completed",h.forEach(T=>{T(C)})}function v(){if(l!=="pending")return;g();const m=i.shift();if(m===void 0){if(f.length){p=setTimeout(()=>{g(),l==="pending"&&(S(),w())},e.timeout);return}w();return}const k={status:"pending",resource:m,callback:(C,B)=>{D(k,C,B)}};f.push(k),a++,p=setTimeout(v,e.rotate),n(m,t,k.callback)}return setTimeout(v),A}function dt(e){const t={...Nn,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function o(c,l,a){const u=Fn(t,c,l,(p,f)=>{r(),a&&a(p,f)});return n.push(u),u}function s(c){return n.find(l=>c(l))||null}return{query:o,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Ne(){}const fe=Object.create(null);function Vn(e){if(!fe[e]){const t=se(e);if(!t)return;const n=dt(t),r={config:t,redundancy:n};fe[e]=r}return fe[e]}function pt(e,t,n){let r,o;if(typeof e=="string"){const s=ve(e);if(!s)return n(void 0,424),Ne;o=s.send;const i=Vn(e);i&&(r=i.redundancy)}else{const s=Te(e);if(s){r=dt(s);const i=e.resources?e.resources[0]:"",c=ve(i);c&&(o=c.send)}}return!r||!o?(n(void 0,424),Ne):r.query(t,o,n)().abort}function zn(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in O)it(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function $n(e,t){Ce||ct();function n(r){let o;if(!O[r]||!(o=st(r)))return;const s=nt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=be(o),!ge(o,i+1))return;const c={cached:Math.floor(Date.now()/rt),provider:e.provider,data:t};return _e(o,$+i.toString(),JSON.stringify(c))}t.lastModified&&!zn(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Fe(){}function Un(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Dn(e)}))}function Hn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=ve(n)))return;s.prepare(n,r,o).forEach(c=>{pt(n,c,l=>{if(typeof l!="object")c.icons.forEach(a=>{e.missing.add(a)});else try{const a=ke(e,l);if(!a.length)return;const u=e.pendingIcons;u&&a.forEach(p=>{u.delete(p)}),$n(e,l)}catch(a){console.error(a)}Un(e)})})}))}const qn=e=>{const n=_(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},je=(e,t)=>{const n=Rn(e,!0,fn()),r=Ln(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Fe)}),()=>{l=!1}}const o=Object.create(null),s=[];let i,c;return r.pending.forEach(l=>{const{provider:a,prefix:u}=l;if(u===c&&a===i)return;i=a,c=u,s.push(_(a,u));const p=o[a]||(o[a]=Object.create(null));p[u]||(p[u]=[])}),r.pending.forEach(l=>{const{provider:a,prefix:u,name:p}=l,f=_(a,u),h=f.pendingIcons||(f.pendingIcons=new Set);h.has(p)||(h.add(p),o[a][u].push(p))}),s.forEach(l=>{const{provider:a,prefix:u}=l;o[a][u].length&&Hn(l,o[a][u])}),t?Mn(t,r,s):Fe},Gn=e=>new Promise((t,n)=>{const r=typeof e=="string"?R(e,!0):e;if(!r){n(e);return}je([r||e],o=>{if(o.length&&r){const s=H(r);if(s){t({...U,...s});return}}n(e)})});function mt(e,t){const n={...e};for(const r in t){const o=t[r],s=typeof o;r in Ze?(o===null||o&&(s==="string"||s==="number"))&&(n[r]=o):s===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const ie={...et,inline:!1},de="iconify",xe="iconify-inline",P="iconifyData"+Date.now();let L=[];function q(e){for(let t=0;t<L.length;t++){const n=L[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function ht(e,t=!1){let n=q(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},L.push(n),n)}function Qn(){if(document.documentElement)return ht(document.documentElement);L.push({node:()=>document.documentElement})}function Kn(e){L=L.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function G(){return L}function Wn(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let V=null;const Jn={childList:!0,subtree:!0,attributes:!0};function gt(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,V&&V(e)}))}function Xn(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[P]!==void 0){n.paused||gt(e);return}}}function bt(e,t){e.observer.instance.observe(t,Jn)}function ne(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Xn.bind(null,e)),bt(e,n),t.paused||gt(e))}function Ve(){G().forEach(ne)}function yt(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Yn(e){const t=V!==null;if(V!==e&&(V=e,t&&G().forEach(yt)),t){Ve();return}Wn(Ve)}function we(e){(e?[e]:G()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Zn(e){if(e){const t=q(e);t&&we(t)}else we()}function Se(e){(e?[e]:G()).forEach(t=>{if(!t.observer){ne(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?bt(t,r):ne(t);else return}})}function eo(e){if(e){const t=q(e);t&&Se(t)}else Se()}function vt(e,t=!1){const n=ht(e,t);return ne(n),n}function xt(e){const t=q(e);t&&(yt(t),Kn(e))}function to(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in ie)if(n[o]!==r[o])return!0;return!1}function no(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const oo=/[\s,]+/;function ro(e,t){t.split(oo).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const so=["width","height"],io=["inline","hFlip","vFlip"];function co(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function ao(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&R(t,!0);if(!n)return null;const r={...ie,inline:e.classList&&e.classList.contains(xe)};so.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=no(o));const s=e.getAttribute("data-flip");typeof s=="string"&&ro(r,s),io.forEach(c=>{const l="data-"+c,a=co(e.getAttribute(l),l);typeof a=="boolean"&&(r[c]=a)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:i}}const lo="svg."+de+", i."+de+", span."+de+", i."+xe+", span."+xe;function uo(e){const t=[];return e.querySelectorAll(lo).forEach(n=>{const r=n[P]||n.tagName.toLowerCase()!=="svg"?ao(n):null;r&&t.push({node:n,props:r})}),t}function wt(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let z;function fo(){try{z=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{z=null}}function po(e){return z===void 0&&fo(),z?z.createHTML(e):e}function St(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function It(e,t,n,r){const o=e.classList;if(r){const i=r.classList;Array.from(i).forEach(c=>{o.add(c)})}const s=[];return t.forEach(i=>{o.contains(i)?n.has(i)&&s.push(i):(o.add(i),s.push(i))}),n.forEach(i=>{t.has(i)||o.remove(i)}),s}function kt(e,t,n){const r=e.style;(n||[]).forEach(s=>{r.removeProperty(s)});const o=[];for(const s in t)r.getPropertyValue(s)||(o.push(s),r.setProperty(s,t[s]));return o}function Et(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,s=oe(n,o),i=e[P],c=wt(tt(s.body),{"aria-hidden":"true",role:"img",...s.attributes});r.innerHTML=po(c);const l=r.childNodes[0],a=e.attributes;for(let g=0;g<a.length;g++){const y=a.item(g),E=y.name;E!=="class"&&!l.hasAttribute(E)&&l.setAttribute(E,y.value)}const u=St(t.icon),p=It(l,u,new Set(i&&i.addedClasses),e),f=kt(l,o.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),h={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[P]=h,e.parentNode&&e.parentNode.replaceChild(l,e),l}function mo(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ho(e){return"data:image/svg+xml,"+mo(e)}function go(e){return'url("'+ho(e)+'")'}const bo={display:"inline-block"},Ie={"background-color":"currentColor"},Ct={"background-color":"transparent"},ze={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},$e={"-webkit-mask":Ie,mask:Ie,background:Ct};for(const e in $e){const t=$e[e];for(const n in ze)t[e+"-"+n]=ze[n]}function Ue(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function yo(e,t,n,r){const o=t.customisations,s=oe(n,o),i=s.attributes,c=e[P],l=wt(s.body,{...i,width:n.width+"",height:n.height+""}),a=St(t.icon),u=It(e,a,new Set(c&&c.addedClasses)),f={"--svg":go(l),width:Ue(i.width),height:Ue(i.height),...bo,...r?Ie:Ct};o.inline&&(f["vertical-align"]="-0.125em");const h=kt(e,f,c&&c.addedStyles),g={...t,status:"loaded",addedClasses:u,addedStyles:h};return e[P]=g,e}let K=!1;function vo(){K||(K=!0,setTimeout(()=>{K&&(K=!1,M())}))}function M(e,t=!1){const n=Object.create(null);function r(o,s){const{provider:i,prefix:c,name:l}=o,a=_(i,c),u=a.icons[l];if(u)return{status:"loaded",icon:u};if(a.missing.has(l))return{status:"missing"};if(s&&!qn(o)){const p=n[i]||(n[i]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:G()).forEach(o=>{const s=typeof o.node=="function"?o.node():o.node;if(!s||!s.querySelectorAll)return;let i=!1,c=!1;function l(a,u,p){if(c||(c=!0,we(o)),a.tagName.toUpperCase()!=="SVG"){const f=u.mode,h=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof h=="boolean"){yo(a,u,{...U,...p},h);return}}Et(a,u,p)}uo(s).forEach(({node:a,props:u})=>{const p=a[P];if(!p){const{status:h,icon:g}=r(u.icon,!0);if(g){l(a,u,g);return}i=i||h==="loading",a[P]={...u,status:h};return}let f;if(to(p,u)){if(f=r(u.icon,p.name!==u.name),!f.icon){i=i||f.status==="loading",Object.assign(p,{...u,status:f.status});return}}else{if(p.status!=="loading")return;if(f=r(u.icon,!1),!f.icon){p.status=f.status;return}}l(a,u,f.icon)}),o.temporary&&!i?xt(s):t&&i?vt(s,!0):c&&o.observer&&Se(o)});for(const o in n){const s=n[o];for(const i in s){const c=s[i];je(Array.from(c).map(l=>({provider:o,prefix:i,name:l})),vo)}}}function xo(e){const t=q(e);t?M(t):M({node:e,temporary:!0},!0)}function _t(e,t,n=!1){const r=H(e);if(!r)return null;const o=R(e),s=mt(ie,t||{}),i=Et(document.createElement("span"),{name:e,icon:o,customisations:s},r);return n?i.outerHTML:i}function wo(){return"3.1.1"}function So(e,t){return _t(e,t,!1)}function Io(e,t){return _t(e,t,!0)}function ko(e,t){const n=H(e);if(!n)return null;const r=mt(ie,t||{});return oe(n,r)}function Eo(e){e?xo(e):M()}if(typeof document<"u"&&typeof window<"u"){Qn();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Ye(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Yn(M),M()})}function Co(e,t){at(e,t!==!1)}function _o(e){at(e,!0)}lt("",On);if(typeof document<"u"&&typeof window<"u"){ct();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;ut(n,o)||console.error(r)}catch{console.error(r)}}}}const To={getAPIConfig:se,setAPIModule:lt,sendAPIQuery:pt,setFetch:En,getFetch:Cn,listAPIProviders:In},jo={_api:To,addAPIProvider:ut,loadIcons:je,loadIcon:Gn,iconExists:pn,getIcon:mn,listIcons:un,addIcon:dn,addCollection:Ye,replaceIDs:tt,calculateSize:me,buildIcon:oe,getVersion:wo,renderSVG:So,renderHTML:Io,renderIcon:ko,scan:Eo,observe:vt,stopObserving:xt,pauseObserver:Zn,resumeObserver:eo,enableCache:Co,disableCache:_o};try{self.Iconify===void 0&&(self.Iconify=jo)}catch{}const Po=e=>{const t={};let n=null;return j.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=j.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},Ao=(e,t,n)=>{const{hostname:r,href:o}=e;if(!t)return o;if(n){const i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!i)return o;const c=i[0],a=((t.site?.domainAliases||[]).map(u=>u.value).filter(Boolean).find(u=>u.endsWith(Pe))||"").replace(`.${Pe}`,"");return a?o.replace(r,`${a}-${c}.${At}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Oo(){const{t:e}=He(),{api:t}=qe(),{blocklet:n}=Kt(),{inService:r}=Tt(),[o,s]=b.useState(!1),[i,c]=b.useState(5),l=n&&n.structVersion!==Ge,a=()=>{try{if(j.isBlockletRunning(n)){W.error(e("blocklet.migrate.tip.running"));return}const f=Po(n);if(f){W.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}s(!0)}catch(f){W.error(We(f))}},u=()=>{const f=Ao(window.location,n,r);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(h=>h-1)},1e3)},p=()=>s(!1);return[l&&d.jsxs(Qe,{severity:"warning",style:{margin:"12px 0"},children:[d.jsxs(Y,{sx:{display:"flex",alignItems:"center"},children:[d.jsx(Ke,{variant:"contained",size:"small",color:"primary",onClick:()=>a(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),d.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>d.jsx(Y,{sx:{display:"flex",alignItems:"center"},children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&d.jsx(jt,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:300*1e3,onSuccess:u,extraParams:{appDid:n.appDid,did:n.meta.did,wt:Pt(n,!0),title:j.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:i>=0?e("blocklet.migrate.success",{sec:i}):"Redirecting..."},onClose:p},"connect")]}const Lo=b.lazy(()=>I(()=>import("./overview-Cu4YrIFe.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url)),Do=b.lazy(()=>I(()=>import("./domains-ilDCawII.js"),__vite__mapDeps([18,1,2,19,20,21,6,22,23,24,25,26,27,28,15,29,30,31,32,5,33,34,35,36,37,10]),import.meta.url)),Bo=b.lazy(()=>I(()=>import("./index-2QIyI-hX.js"),__vite__mapDeps([38,1,2,39,40,41,42,43,44,45,8,22,46,47,10,48,12,49,50,51,52,53,54,55,56,57,58,6,26,7,5,59,9,11,13,60,61,62,63,64,65,66,67,68,23,29,69,70,71,72,73,74,20,75,76,77,78,15]),import.meta.url)),Mo=b.lazy(()=>I(()=>import("./appearance-BnoPFfcA.js"),__vite__mapDeps([79,1,2,6,78]),import.meta.url)),Ro=b.lazy(()=>I(()=>import("./config-navigation-CAY0oLM7.js"),__vite__mapDeps([80,1,2,12,81,49,82,74,6,63,64,65,83,7,8,39,40,41,42,43,44,45,22,61,68,47,77,52,17,55,56,84,32,85,54,37]),import.meta.url)),No=b.lazy(()=>I(()=>import("./index-C9laDmdO.js"),__vite__mapDeps([86,1,2,70,71,72,73,63,64,65,74,20,75,76,77,41,87,5,47,88,89,90,54,91,46,92,93,94,95,96,58]),import.meta.url)),Fo=b.lazy(()=>I(()=>import("./audit-logs-rRPPzNCV.js"),__vite__mapDeps([97,20,1,2,75,76,77,40,98,99,100,87,7,6,8]),import.meta.url)),Vo=b.lazy(()=>I(()=>import("./index-BsxJA--7.js").then(e=>e.i),__vite__mapDeps([101,1,2,70,71,72,73,63,64,65,74,20,75,76,77,41,47,7,6,8,102,78,103,44,45,22,104,81,29,51,105,59,106,107,19]),import.meta.url)),zo=b.lazy(()=>I(()=>import("./index-Bt02N9ee.js").then(e=>e.i),__vite__mapDeps([108,1,2,29,109,70,71,72,73,63,64,65,74,20,75,76,77,41,13,103,44,45,7,6,8,61,104,81,55,56,100,69,5,22,26,95,96,58,47,110,42,111,11,112,113,114,19,67,115,62,78,23,24,87,102,68]),import.meta.url)),$o=b.lazy(()=>I(()=>import("./service-Bad7qk9f.js"),__vite__mapDeps([116,1,2,117,71,72,73,92,65,83,64,96,47,29,23,77,118,46,91,76,52]),import.meta.url)),Uo=b.lazy(()=>I(()=>import("./index-OZ9TU2gG.js"),__vite__mapDeps([119,1,2,20,39,40,41,42,43,44,45,8,22,60,6,118,117,71,72,73,92,65,83,64,96,47,29,23,77,46,91,76,52,48,12,49,50,51,53,54,26,103,120,121,110,55,56,28,122,25,123,124,125,35,126,4,16,17,36,127,3,128,98,99,104,81,129,27,130,115,67,5,84,131,33,34,78,11,111,107,88,24,132,7]),import.meta.url)),Ho=b.lazy(()=>I(()=>import("./log-ll3_FUxN.js"),__vite__mapDeps([133,1,2,40,134,44,45,56]),import.meta.url)),qo=b.lazy(()=>I(()=>import("./runtime-DhJ59c5Q.js"),__vite__mapDeps([135,1,2,70,71,72,73,63,64,65,74,20,75,76,77,41,6,127,136,93,94,27,106,45]),import.meta.url)),Go=b.lazy(()=>I(()=>import("./traffic-DYynIkpC.js").then(e=>e.t),__vite__mapDeps([90,1,2,54,91,46,92,65,93,94,95,96,58,72]),import.meta.url)),Qo=b.lazy(()=>I(()=>import("./index-GSHwCvc7.js"),__vite__mapDeps([137,1,2,47,6,78,126,4,16,17,42,36,127,3,103,44,45,5,94,70,71,72,73,63,64,65,74,20,75,76,77,41,43,60,105]),import.meta.url)),Ko=({children:e})=>e;function Wo(){const e=Ot(),{tab:t="overview"}=Je(),{did:n,blocklet:r,error:o,client:s,actions:{setBlocklet:i,refreshBlocklet:c}}=Xt(),{refresh:l}=Lt(),{t:a}=He(),{session:u}=qe(),{data:p}=Dt(),f=Bt(()=>u.user?.role&&Mt.includes(u.user.role),[u]),h=b.useCallback(()=>d.jsx(Fo,{scope:n,blocklets:p}),[n,p]),g=b.useCallback(()=>f?d.jsx(No,{blocklet:r}):d.jsx(Wt,{status:403}),[r,f]),y=r?.environments.find(x=>x.key==="BLOCKLET_APP_URL")?.value||window.location.origin,E=x=>Nt(x,y),A=x=>{e(`/blocklets/${n}/${x}`)},w=x=>{x&&i(x),c()},S=!r||Ae(r.status)?[]:j.getAppMissingConfigs(r);let D=null;const v=[{label:a("common.overview"),value:"overview"},{breadcrumbsLabel:a("common.components"),label:d.jsx(Rt,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!S.length,children:a("common.components")}),value:"components"}];if(o)D=d.jsxs(d.Fragment,{children:[d.jsx(Qe,{severity:"error",children:We(o)}),d.jsx(Ke,{onClick:()=>c(),children:d.jsx("span",{style:{textDecoration:"underline"},children:a("common.retry")})})]});else if(r){const x={overview:d.jsx(Lo,{}),domains:d.jsx(Do,{}),configuration:Bo,appearance:Mo,navigation:Ro,services:$o,members:d.jsx(zo,{type:"blocklet",createPassportSvg:E}),passports:Vo,components:Uo,"audit-logs":h,notifications:g,logs:Ho,runtime:d.jsx(qo,{}),traffic:d.jsx(Go,{client:s,did:n}),didSpaces:d.jsx(Qo,{})};t==="configuration"&&Ae(r.status)&&A("overview"),v.push({label:a("common.domains"),value:"domains"}),v.push({label:a("common.members"),value:"members"}),v.push({label:a("team.member.passports"),value:"passports"}),v.push({label:a("common.configuration"),value:"configuration"}),v.push({label:a("common.appearance"),value:"appearance"}),v.push({label:a("common.auditLogs"),value:"audit-logs"}),f&&v.push({label:a("common.notificationRecords"),value:"notifications"}),r&&r.children?.length&&r.structVersion===Ge&&v.push({label:a("common.logs"),value:"logs"}),v.push({label:a("common.configNavigation"),value:"navigation"}),v.push({label:a("common.runtime"),value:"runtime"}),v.push({label:a("common.traffic"),value:"traffic"}),v.push({label:a("storage.spaces.title"),value:"didSpaces"}),j.getBlockletServices(r).length&&v.splice(2,0,{label:a("blocklet.services"),value:"services"});const ae=x[t]||x.overview;D=d.jsxs(Gt,{type:"components",children:[!j.isExternalBlocklet(r)&&d.jsx(Ut,{tabs:v,current:t,onChange:A,scrollButtons:"auto"}),d.jsx("div",{className:"page-content",children:d.jsx(b.Suspense,{fallback:d.jsx(Oe,{relative:"parent",children:d.jsx(Le,{})}),children:b.isValidElement(ae)?ae:d.jsx(ae,{blocklet:r,onUpdate:w,createPassportSvg:E})})})]})}else D=d.jsx(Oe,{relative:"parent",children:d.jsx(Le,{})});const m=()=>{},k=({action:x,error:ce})=>{if(ce){W.error(ce.message);return}x==="remove"?(l(),e("/blocklets")):c()},C=v.find(x=>x.value===t),B=r?Yt:Ko,T=Ht(C,r?.meta?.title||a("common.blocklets"));return d.jsxs(B,{teamDid:n,children:[T,d.jsxs(Jo,{children:[d.jsxs(en,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[d.jsx(Ft,{color:"textSecondary",to:"/blocklets",children:a("common.blocklets")}),d.jsx(Vt,{to:`/blocklets/${n}/overview`,style:x=>x?{color:"inherit"}:{},children:a("common.detail")}),d.jsx(le,{color:"textSecondary",children:C?C.breadcrumbsLabel||C.label:""})]}),d.jsxs(le,{component:"div",className:"page-header",children:[d.jsxs(le,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[r?d.jsx(zt,{blocklet:r,style:{marginRight:16}}):null,r?d.jsxs(Y,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1},children:[d.jsx(Y,{children:j.getDisplayName(r)}),r?.status!=="unknown"&&d.jsx(qt,{size:"12px",status:r.status,source:r.source,progress:r.progress})]}):`${a("common.blocklet")} ${a("common.detail")}`]}),d.jsx(Zt,{permission:"mutate_blocklets",children:!!r&&!j.isExternalBlocklet(r)&&d.jsx(Qt,{className:"page-actions",blocklet:r,onStart:m,onComplete:k,variant:"group",source:"blocklet-detail"})})]}),d.jsx(Oo,{}),D]})]})}function pr(){const{did:e}=Je();return e?d.jsx(Jt,{did:e,children:d.jsx(Wo,{})}):null}const Jo=$t.main`
3
3
  .page-header {
4
4
  display: flex;
5
5
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{aZ as V,aY as G,r as D,$ as Q,j as e,gc as Ut,a3 as X,a4 as Z,a5 as K,a9 as Je,gd as ke,c as et,f_ as tt,x as le,ge as Ft,ao as Nt,aM as nt,T as zt,V as S,i as $t,k as se,gf as Ht,cu as _t,B as x,C as z,b8 as Ot,J as T,at as ue,ct as me,ab as Y,al as pe,ad as E,fe as ot,gg as Wt,gh as st,bt as Vt,aS as L,c7 as Gt,am as Fe,as as fe,H as q,o,bz as xe,f8 as Qt,M as it,az as Xt,aA as Zt,R as Kt,w as Yt,fd as Ne,gi as Jt,bG as en,ep as rt,gj as at,dX as we,aI as _,bc as lt,gk as tn,bb as nn,d4 as ct,q as on,gl as dt,gm as sn,gn as rn,ai as ut,bj as an,go as ln,Q as cn,gp as H,bB as $,aU as ce,gq as dn,v as un,af as ie,b3 as ze,au as mn,bq as pn,d2 as fn,gr as xn}from"./index-CP8e2zcP.js";import{t as Ae,a as hn}from"./trim-BrqZEf0Q.js";import{y as gn}from"./index-DX_ig3IR.js";import{u as Dn}from"./useAsync-CbHsXkPS.js";import{u as J}from"./blocklet-D7q_eJsm.js";import{w as mt}from"./permission-D6xGjoP4.js";import{D as pt}from"./Delete-CCasVLgy.js";import{A as yn}from"./actions-Zy-oEKVg.js";import{D as bn}from"./delete-confirm-C8X53PNk.js";import{D as $e}from"./status-CFw68CfZ.js";import{S as jn,V as vn}from"./VerifiedUser-8QA2XNlm.js";import{C as Cn}from"./CardContent-MdG6Fo_s.js";import{A as wn}from"./Add-B-lIYZBc.js";import{A as Rn}from"./CallMerge-V8M4tzIM.js";import{a as Sn}from"./toLower-C4OoJYWk.js";import{u as Tn}from"./use-mobile-BxCxZMSF.js";import{v as kn}from"./index-8K8V7S7h.js";import{g as An,p as be}from"./util-BF2dKFyL.js";import{O as In}from"./OpenInNew-2i4mGCRx.js";import{C as Pn}from"./click-to-copy-wk3E32eY.js";import{L as ft}from"./LoadingButton-egcGN7yK.js";import{u as Mn}from"./index-1nsTMIEw.js";import"./is-path-prefix-equal-sWdIB_FI.js";import"./engine-hQAyActy.js";function qn(t){return V("MuiTable",t)}G("MuiTable",["root","stickyHeader"]);const En=t=>{const{classes:n,stickyHeader:s}=t;return K({root:["root",s&&"stickyHeader"]},qn,n)},Ln=X("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.stickyHeader&&n.stickyHeader]}})(Je(({theme:t})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...t.typography.body2,padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:n})=>n.stickyHeader,style:{borderCollapse:"separate"}}]}))),He="table",Bn=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTable"}),{className:i,component:r=He,padding:d="normal",size:l="medium",stickyHeader:c=!1,...m}=a,p={...a,component:r,padding:d,size:l,stickyHeader:c},u=En(p),g=D.useMemo(()=>({padding:d,size:l,stickyHeader:c}),[d,l,c]);return e.jsx(Ut.Provider,{value:g,children:e.jsx(Ln,{as:r,role:r===He?null:"table",ref:s,className:Z(u.root,i),ownerState:p,...m})})});function Un(t){return V("MuiTableBody",t)}G("MuiTableBody",["root"]);const Fn=t=>{const{classes:n}=t;return K({root:["root"]},Un,n)},Nn=X("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),zn={variant:"body"},_e="tbody",$n=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableBody"}),{className:i,component:r=_e,...d}=a,l={...a,component:r},c=Fn(l);return e.jsx(ke.Provider,{value:zn,children:e.jsx(Nn,{className:Z(c.root,i),as:r,ref:s,role:r===_e?null:"rowgroup",ownerState:l,...d})})});function Hn(t){return V("MuiTableContainer",t)}G("MuiTableContainer",["root"]);const _n=t=>{const{classes:n}=t;return K({root:["root"]},Hn,n)},On=X("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),Wn=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableContainer"}),{className:i,component:r="div",...d}=a,l={...a,component:r},c=_n(l);return e.jsx(On,{ref:s,as:r,className:Z(c.root,i),ownerState:l,...d})});function Vn(t){return V("MuiTableHead",t)}G("MuiTableHead",["root"]);const Gn=t=>{const{classes:n}=t;return K({root:["root"]},Vn,n)},Qn=X("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),Xn={variant:"head"},Oe="thead",Zn=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableHead"}),{className:i,component:r=Oe,...d}=a,l={...a,component:r},c=Gn(l);return e.jsx(ke.Provider,{value:Xn,children:e.jsx(Qn,{as:r,className:Z(c.root,i),ref:s,role:r===Oe?null:"rowgroup",ownerState:l,...d})})});function Kn(t){return V("MuiTableRow",t)}const We=G("MuiTableRow",["root","selected","hover","head","footer"]),Yn=t=>{const{classes:n,selected:s,hover:a,head:i,footer:r}=t;return K({root:["root",s&&"selected",a&&"hover",i&&"head",r&&"footer"]},Kn,n)},Jn=X("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.head&&n.head,s.footer&&n.footer]}})(Je(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${We.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${We.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)}}}))),Ve="tr",Ge=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableRow"}),{className:i,component:r=Ve,hover:d=!1,selected:l=!1,...c}=a,m=D.useContext(ke),p={...a,component:r,hover:d,selected:l,head:m&&m.variant==="head",footer:m&&m.variant==="footer"},u=Yn(p);return e.jsx(Jn,{as:r,ref:s,className:Z(u.root,i),role:r===Ve?null:"row",ownerState:p,...c})}),eo=et(e.jsx("path",{d:"M19 15v4H5v-4zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M19 5v4H5V5zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5"})),to=et(e.jsx("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm-1 6h2v2h-2zm0 4h2v6h-2z"})),no=tt({});no.interceptors.request.use(t=>{const n=window.blocklet?window.blocklet.prefix:"/";return t.baseURL=n||"",t.url=le("/api",String(t.url)),t.timeout=2e5,t.params=t.params||{},new URLSearchParams(t.url.split("?")[1]).has("locale")||(t.params.locale=Ft()),t},t=>Promise.reject(t));const xt=(...t)=>tt(...t),oo=(t,n)=>n?t?[t,...Array.isArray(n)?n:[n]]:n:t,so=(t,{width:n=600,height:s=700,name:a="did-domain:popup"}={})=>{const i=window.screenX+(window.innerWidth-n)/2,r=window.screenY+(window.innerHeight-s)/2,d=[`left=${i}`,`top=${r}`,`width=${n}`,`height=${s}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],l=window.open("",a,d.join(","));if(l===null)throw new Error("Failed to open popup");return l.location.href=Nt(t,{opener:window.location.origin}),l},io="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",ht=async t=>{if(!t||!t?.trim())return null;const n=xt(),s=new URL(t);s.pathname="__blocklet__.js",s.searchParams.set("type","json");const{data:a}=await n.get(s.toString()),i=a?.componentMountPoints?.find(c=>c.did===io),r=new URL(t);r.pathname=i?.mountPoint;const d=r.toString(),l=le(d,"/api");return{base:d,api:l}},ro=nt({embed:{iconTip:"Click to view subscription details"},buy:{button:{title:"Buy DID Domain"},status:{inProgress:"Please wait while we are processing your request, the domain will be automatically resolved to the current app after the purchase...",success:"Purchase completed!"},error:{failedToCreateSession:"Failed to create session"}}}),ao=nt({embed:{iconTip:"点击查看订阅详情"},buy:{button:{title:"购买 DID 域名"},status:{inProgress:"请稍等,我们正在处理您的请求,购买域名后会自动解析到当前的应用...",success:"购买完成!"},error:{failedToCreateSession:"创建会话失败"}}}),lo={zh:ao,en:ro},co=async({didDomainURL:t,delegatee:n,delegateePk:s})=>{const a=await ht(t);if(!a)return null;const i=xt({baseURL:a.api}),{data:r}=await i.post("/payment/session",{delegatee:n,delegateePk:s});return{sessionId:r.sessionId,baseURL:a.base}};function uo({delegatee:t,delegateePk:n,didDomainURL:s,locale:a,title:i="",onSuccess:r=()=>{},...d}){const{t:l}=S(),[c,m]=Mn({currentState:1}),p=D.useRef(null),u=$t(async()=>{const f=await co({didDomainURL:s,delegatee:t,delegateePk:n});return f},{debounceWait:500,debounceLeading:!0,debounceTrailing:!1,debounceMaxWait:3e3,refreshDeps:[],onError(f){console.error(f)}}),g=se(f=>{f.data.type==="didDomain.success"&&(r?.({nftDid:f.data?.nftDid,domain:f.data?.domain,chainHost:f.data?.chainHost}),p.current?.close(),p.current=null,m({currentState:4}),setTimeout(()=>{m({currentState:8})},2e3))});Ht(()=>{try{window.removeEventListener("message",g),p.current?.close(),p.current=null}catch(f){console.warn("Failed to close popup",f)}});const b=se(()=>{m({currentState:1})}),h=se(()=>{if(m({currentState:2}),!u.data){console.error("Failed to create session");return}v({sessionId:u.data.sessionId,baseURL:u.data.baseURL})}),v=se(({sessionId:f,baseURL:y})=>{window.addEventListener("message",g);const w=new URL(y);w.searchParams.set("sessionId",f),w.searchParams.set("locale",a),w.searchParams.set("embed","1"),p.current=so(w.toString());const P=setInterval(()=>{p.current?.closed&&(clearInterval(P),b())},1e3);return()=>clearInterval(P)});return e.jsxs(e.Fragment,{children:[e.jsx(ft,{loading:u.loading,onClick:h,variant:"contained",startIcon:e.jsx(jn,{}),...d,children:i||l("buy.button.title")}),e.jsxs(_t,{fullWidth:!0,maxWidth:"xs",open:c.currentState>1&&c.currentState<8,onClose:b,children:[!u.error&&e.jsxs(x,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:2},children:[c.currentState===2&&e.jsx(z,{size:50}),c.currentState===4&&e.jsx(Ot,{sx:{color:"primary.main",fontSize:"5rem"}}),c.currentState===2&&e.jsx(T,{children:l("buy.status.inProgress")}),c.currentState===4&&e.jsx(T,{children:l("buy.status.success")})]}),u.error&&e.jsx(ue,{severity:"error",children:l("buy.error.failedToCreateSession")})]})]})}function mo(t){return e.jsx(zt,{locale:t.locale,translations:lo,children:e.jsx(uo,{...t})})}function po({nftDid:t,didDomainURL:n,locale:s,sx:a={}}){const{t:i}=S(),[r,d]=me({safeIframeRef:null,popoverAnchorEl:null}),l=D.useRef(null),c=Y(),m=pe(c.breakpoints.down("md")),p=h=>{d({popoverAnchorEl:h.currentTarget})},u=()=>{d({popoverAnchorEl:null})},g=Dn(async()=>{const h=await ht(n);return h?h.base:null});if(!g.value)return null;if(g.loading)return e.jsx(z,{});const b=le(g.value,`/embed/domain?nft-did=${t}&locale=${s}`);return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:i("embed.iconTip"),children:e.jsx(x,{component:"img",src:le(n,"/.well-known/service/blocklet/logo"),alt:"logo",onClick:p,sx:[{width:16,height:16},oo({cursor:"pointer"},a)]})}),e.jsx(ot,{id:"popover-info",open:!!r.popoverAnchorEl,anchorEl:r.popoverAnchorEl,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx("iframe",{ref:l,title:i("common.subscription"),width:m?"320px":"400px",height:"350px",style:{border:0,display:"block"},src:b})})]})}const fo=t=>["waiting","creating","renewaling"].includes(t);function gt({siteId:t,domain:n,onAdd:s=()=>{},children:a=null,did:i,issuing:r=!1,setIssuing:d=()=>{}}){const{t:l}=S(),[c,m]=D.useState(!1),{inService:p}=L(),[u,g]=D.useState(null),{api:b,ws:{useSubscription:h}}=L(),{mode:v,actions:{refreshDomainStatus:f}}=J(),y=Gt(async()=>{const{cert:A}=await b.findCertificateByDomain({input:{domain:n,did:i}});return A}),w=(A,R)=>{A.domain===n&&(d(!1),m(!1),p&&v!=="setup"&&(R==="success"?q.success(l("setup.domain.genCertSuccess",{domain:A.domain})):R==="error"&&q.error(l("setup.domain.genCertFailed",{domain:A.domain,message:A.message}))))};if(D.useEffect(()=>{y.loading||d(fo(y.value?.status))},[y.loading,y.value?.status,d]),h(Fe.BlockletEvents.certError,A=>w(A,"error")),h(Fe.BlockletEvents.certIssued,A=>{y.retry(),f(A.domain),w(A,"success")}),y.loading||y.value?.status==="normal")return"";const P=()=>{m(!1),g(null)},F=async()=>{m(!0);try{await b.issueLetsEncryptCert({input:{siteId:t,domain:n,did:i,inBlockletSetup:v==="setup"}}),s(),d(!0)}catch(A){console.error(A),d(!1)}finally{m(!1),g(null)}},U={title:l("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(ue,{severity:"success",children:l("router.cert.genLetsEncryptCert.dnsTip")}),l("router.cert.genLetsEncryptCert.description")]}),confirm:l("common.confirm"),onConfirm:F,onCancel:P},N=A=>{A.stopPropagation(),g(U)};return e.jsxs(e.Fragment,{children:[r?e.jsx(E,{title:l("router.cert.issuing"),children:e.jsx(z,{size:13,style:{fontSize:"13px"}})}):a({loading:c,open:N}),u&&e.jsx(fe,{color:"primary",title:u.title,description:u.description,confirm:u.confirm,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}gt.propTypes={domain:o.string.isRequired,did:o.string.isRequired,siteId:o.string.isRequired,onAdd:o.func,children:o.any,issuing:o.bool,setIssuing:o.func};function Dt({domain:t,domainStatus:n,did:s,onAdd:a=()=>{},children:i=null,issuing:r=!1,setIssuing:d=()=>{},...l}){return Wt(t)||!st(t)||Vt(n)||n?.isHttps?"":e.jsx(gt,{...l,domain:t,did:s,onAdd:a,issuing:r,setIssuing:d,children:i})}Dt.propTypes={domain:o.string.isRequired,domainStatus:o.shape({isHttps:o.bool}).isRequired,did:o.string.isRequired,onAdd:o.func,children:o.any,issuing:o.bool,setIssuing:o.func};function yt({id:t,domain:n,children:s=null,teamDid:a="",onDelete:i=null}){const{t:r}=S(),[d,l]=D.useState(!1),[c,m]=D.useState(null),{api:p}=L(),u=()=>{l(!1),m(null)},g=async()=>{l(!0);try{await p.deleteDomainAlias({input:{id:t,domainAlias:n,teamDid:a}}),i?.(),await Qt(2e3)}catch(v){q.error(v.message)}finally{m(null),l(!1)}},b={keyName:n,title:r("router.domainAlias.delete.title"),description:r("router.domainAlias.delete.description",{domain:n}),confirmPlaceholder:r("router.domainAlias.delete.confirmPlaceholder",{domain:n}),confirm:r("common.delete"),onConfirm:g,onCancel:u},h=v=>{v.stopPropagation(),m(b)};return e.jsxs(e.Fragment,{children:[typeof s=="function"?s({loading:d,open:h}):e.jsxs(xe,{edge:"end",onClick:h,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[d?e.jsx(z,{size:16}):e.jsx(pt,{style:{fontSize:16}}),r("common.delete")]}),c&&e.jsx(bn,{keyName:c.keyName,title:c.title,description:c.description,confirmPlaceholder:c.confirmPlaceholder,confirm:c.confirm,params:c.params,onConfirm:c.onConfirm,onCancel:c.onCancel})]})}yt.propTypes={id:o.string.isRequired,domain:o.string.isRequired,children:o.any,teamDid:o.string,onDelete:o.func};function bt({site:t,domain:n,blocklet:s,onDelete:a=()=>{}}){const{t:i}=S(),r=n.value===window.location.hostname;return e.jsx(yn,{"data-cy":"domain-actions",size:"large",actions:[({close:d})=>e.jsx(yt,{id:t.id,domain:n.value,teamDid:s?.meta?.did,onDelete:a,children:({open:l})=>e.jsx(E,{title:r?i("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(it,{disabled:n.isProtected||r,dense:!0,onClick:c=>{d(),l(c)},"data-cy":"action-toggle-block",children:[e.jsx(Xt,{style:{minWidth:24,marginRight:8},children:e.jsx(pt,{})}),e.jsx(Zt,{primary:i("common.delete")})]},"remove")})})})]})}bt.propTypes={site:o.object.isRequired,domain:o.object.isRequired,blocklet:o.object.isRequired,onDelete:o.func};const he=o.shape({href:o.string,accessibility:o.shape({loading:o.bool,accessible:o.bool}),domainStatus:o.shape({isHttps:o.bool,matchedCert:o.object}),dns:o.shape({resolved:o.bool,ip:o.string})});function jt({certificate:t={}}){const[n,s]=D.useState(null),a=L(),{t:i,locale:r}=S(),d=m=>{s(m.currentTarget)},l=()=>{s(null)},c=!!n;return e.jsxs(e.Fragment,{children:[e.jsx(vn,{"aria-owns":c?"mouse-over-popover":void 0,onMouseEnter:d,onMouseLeave:l,style:{color:"#44cdc6",fontSize:"1em",cursor:"pointer"}}),e.jsx(ot,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:c,anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:l,disableRestoreFocus:!0,children:e.jsx(Kt,{children:e.jsxs(Cn,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${a.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(T,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(T,{component:"div",style:{fontWeight:"bold"},children:t.domain}),e.jsx(T,{component:"div",children:`${i("common.issuer")}: ${Yt(t,"issuer.commonName","")}`}),e.jsx(T,{component:"div",children:`${i("router.cert.issuedOn")}: ${Ne(t.validFrom,r)}`}),e.jsx(T,{component:"div",children:`${i("router.cert.expiryOn")}: ${Ne(t.validTo,r)}`})]})]})})})]})}jt.propTypes={certificate:o.object};function de({domain:t,filters:n=["domain","http"]}){const{t:s}=S(),{value:a,domainStatus:i}=t;if(!st(a))return null;let r=null,d=null;const{isHttps:l,matchedCert:c}=i,{dns:{ip:m,isDnsResolved:p,isCnameMatch:u}={}}=i,g=t.type==="nft-domain-forwarding",b=p&&(g||u);Jt(a)||(b||m==="127.0.0.1"?r=e.jsx(E,{title:s("router.domain.verify.ok"),children:e.jsx($e,{color:"success"})}):r=e.jsx(E,{title:s("router.domain.verify.notResolved"),children:e.jsx($e,{color:"error"})})),b?l?d=e.jsx(jt,{certificate:c}):d=e.jsx(E,{title:s("router.domain.https.bad"),children:e.jsx(to,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})}):d=e.jsx(E,{title:s("router.domain.verify.notResolved"),children:e.jsx(eo,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})});const h=n.map(v=>v==="domain"?r:v==="http"?d:null);return D.createElement(D.Fragment,null,...h)}de.propTypes={domain:he.isRequired,filters:o.array};const xo=mt(Ie,"mutate_blocklets"),ho=mt(Ie,"",en);function go(t){const{inService:n}=L(),{blocklet:s,loadingRuntimeInfo:a}=J();let i=xo;return n&&(i=ho),e.jsx(i,{...t,blocklet:s,inService:n,loadingRuntimeInfo:a})}const Qe="nft-domain",Xe="nft-domain-forwarding";function Ie({hasPermission:t=!1,blocklet:n,loadingRuntimeInfo:s=!1,inService:a=!1,showAllDomains:i=!1,updateBlockletDomainAliases:r=()=>{},systemTips:d=null}){const{t:l}=S(),c=pe(y=>y.breakpoints.down("md")),m=D.useMemo(()=>{let y=t;return rt(n)&&(y=y&&a),y},[t,a,n]),{site:p}=n,u=D.useMemo(()=>at(n.site?.domainAliases),[n.site?.domainAliases]),g=D.useMemo(()=>u.filter(y=>!we.isCustomDomain(y.value)),[u]),b=D.useMemo(()=>u.filter(y=>we.isCustomDomain(y.value)),[u]),h=D.useMemo(()=>b.filter(y=>y.type!==Qe&&y.type!==Xe),[b]),v=D.useMemo(()=>b.filter(y=>y.type===Qe),[b]),f=D.useMemo(()=>b.filter(y=>y.type===Xe),[b]);return e.jsxs(e.Fragment,{children:[e.jsxs(_,{sx:{gap:3},children:[!!v.length&&e.jsx(W,{title:l("common.didDomains"),description:l("common.didDomainsDescription"),domains:v,hasMutatePermission:m,blocklet:n,site:p,mobile:c,showAllDomains:i,updateBlockletDomainAliases:r}),!!f.length&&e.jsx(W,{title:l("common.forwardingDomains"),description:l("common.forwardingDomainsDescription"),domains:f,hasMutatePermission:m,blocklet:n,site:p,mobile:c,showAllDomains:i,updateBlockletDomainAliases:r}),!!h.length&&e.jsx(W,{title:l("common.manualDomains"),description:l("common.manualDomainsDescription"),domains:h,hasMutatePermission:m,blocklet:n,site:p,mobile:c,showAllDomains:i,updateBlockletDomainAliases:r}),!!g.length&&e.jsxs(x,{children:[d,e.jsx(W,{title:l("common.systemDomains"),description:l("common.systemDomainsDescription"),domains:g,hasMutatePermission:m,blocklet:n,site:p,mobile:c,updateBlockletDomainAliases:r})]})]}),!u.length&&(s?e.jsx(z,{size:16}):e.jsx(gn,{children:l("common.empty")}))]})}Ie.propTypes={hasPermission:o.bool,blocklet:o.object.isRequired,loadingRuntimeInfo:o.bool,inService:o.bool.isRequired,showAllDomains:o.bool,updateBlockletDomainAliases:o.func,systemTips:o.node};function re({children:t=null}){return e.jsx(x,{component:"span",sx:{verticalAlign:"bottom"},children:t})}re.propTypes={children:o.node};function Re({domain:t,children:n,suffix:s=null,...a}){const{t:i,locale:r}=S(),d=Y(),{href:l,accessibility:c,value:m}=t,p=D.useCallback(()=>e.jsx(ct,{content:Ae(m),locale:r,style:{marginLeft:"4px",color:d.palette.text.secondary,fontSize:"0.8em"}}),[m,r,d]);return!c||c.loading?e.jsxs(je,{component:"span",...a,children:[e.jsx(E,{title:void 0,placement:"top-end",children:e.jsx(x,{component:"span",children:n})}),p(),e.jsx(re,{children:s}),e.jsx(E,{title:i("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx(x,{component:"span",className:"status",children:e.jsx(z,{size:13,style:{fontSize:"13px"}})})})]}):c.accessible?e.jsxs(je,{component:"span",...a,children:[e.jsx(x,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{color:t.loading?"text.disabled":void 0},children:e.jsx(E,{title:void 0,placement:"top-end",children:e.jsx(x,{component:"span",children:n})})}),p(),e.jsx(re,{children:s})]}):e.jsxs(je,{component:"span",...a,children:[e.jsx(E,{title:i("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx(x,{component:"span",children:n})}),!t.loading&&p(),e.jsx(re,{children:s})]})}Re.propTypes={domain:he.isRequired,children:o.any.isRequired,suffix:o.node};const je=on(x)`
1
+ import{aZ as V,aY as G,r as D,$ as Q,j as e,gc as Ut,a3 as X,a4 as Z,a5 as K,a9 as Je,gd as ke,c as et,f_ as tt,x as le,ge as Ft,ao as Nt,aM as nt,T as zt,V as S,i as $t,k as se,gf as Ht,cu as _t,B as x,C as z,b8 as Ot,J as T,at as ue,ct as me,ab as Y,al as pe,ad as E,fe as ot,gg as Wt,gh as st,bt as Vt,aS as L,c7 as Gt,am as Fe,as as fe,H as q,o,bz as xe,f8 as Qt,M as it,az as Xt,aA as Zt,R as Kt,w as Yt,fd as Ne,gi as Jt,bG as en,ep as rt,gj as at,dX as we,aI as _,bc as lt,gk as tn,bb as nn,d4 as ct,q as on,gl as dt,gm as sn,gn as rn,ai as ut,bj as an,go as ln,Q as cn,gp as H,bB as $,aU as ce,gq as dn,v as un,af as ie,b3 as ze,au as mn,bq as pn,d2 as fn,gr as xn}from"./index-Dtj3cePH.js";import{t as Ae,a as hn}from"./trim-Diihj-s0.js";import{y as gn}from"./index-imQtUA1Y.js";import{u as Dn}from"./useAsync-CLJdaax3.js";import{u as J}from"./blocklet-B65NZ0SL.js";import{w as mt}from"./permission-B-geZ8jf.js";import{D as pt}from"./Delete-B-jFRJwJ.js";import{A as yn}from"./actions-rnAVohGM.js";import{D as bn}from"./delete-confirm-BCALKic0.js";import{D as $e}from"./status-CcMfecIj.js";import{S as jn,V as vn}from"./VerifiedUser-Ddu-50lW.js";import{C as Cn}from"./CardContent-De2diFnM.js";import{A as wn}from"./Add-CaX-C76B.js";import{A as Rn}from"./CallMerge-g03IIE2c.js";import{a as Sn}from"./toLower-D7a3qnvH.js";import{u as Tn}from"./use-mobile-wKUCaVoo.js";import{v as kn}from"./index-TLvz3wdj.js";import{g as An,p as be}from"./util-BVHL76Cg.js";import{O as In}from"./OpenInNew-DXke8B9Y.js";import{C as Pn}from"./click-to-copy-BgfWbRfM.js";import{L as ft}from"./LoadingButton-CDH-grwB.js";import{u as Mn}from"./index-CkfMmvW2.js";import"./is-path-prefix-equal-BxWUya7r.js";import"./engine-xHEY-z1Q.js";function qn(t){return V("MuiTable",t)}G("MuiTable",["root","stickyHeader"]);const En=t=>{const{classes:n,stickyHeader:s}=t;return K({root:["root",s&&"stickyHeader"]},qn,n)},Ln=X("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.stickyHeader&&n.stickyHeader]}})(Je(({theme:t})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...t.typography.body2,padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:n})=>n.stickyHeader,style:{borderCollapse:"separate"}}]}))),He="table",Bn=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTable"}),{className:i,component:r=He,padding:d="normal",size:l="medium",stickyHeader:c=!1,...m}=a,p={...a,component:r,padding:d,size:l,stickyHeader:c},u=En(p),g=D.useMemo(()=>({padding:d,size:l,stickyHeader:c}),[d,l,c]);return e.jsx(Ut.Provider,{value:g,children:e.jsx(Ln,{as:r,role:r===He?null:"table",ref:s,className:Z(u.root,i),ownerState:p,...m})})});function Un(t){return V("MuiTableBody",t)}G("MuiTableBody",["root"]);const Fn=t=>{const{classes:n}=t;return K({root:["root"]},Un,n)},Nn=X("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),zn={variant:"body"},_e="tbody",$n=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableBody"}),{className:i,component:r=_e,...d}=a,l={...a,component:r},c=Fn(l);return e.jsx(ke.Provider,{value:zn,children:e.jsx(Nn,{className:Z(c.root,i),as:r,ref:s,role:r===_e?null:"rowgroup",ownerState:l,...d})})});function Hn(t){return V("MuiTableContainer",t)}G("MuiTableContainer",["root"]);const _n=t=>{const{classes:n}=t;return K({root:["root"]},Hn,n)},On=X("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),Wn=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableContainer"}),{className:i,component:r="div",...d}=a,l={...a,component:r},c=_n(l);return e.jsx(On,{ref:s,as:r,className:Z(c.root,i),ownerState:l,...d})});function Vn(t){return V("MuiTableHead",t)}G("MuiTableHead",["root"]);const Gn=t=>{const{classes:n}=t;return K({root:["root"]},Vn,n)},Qn=X("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),Xn={variant:"head"},Oe="thead",Zn=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableHead"}),{className:i,component:r=Oe,...d}=a,l={...a,component:r},c=Gn(l);return e.jsx(ke.Provider,{value:Xn,children:e.jsx(Qn,{as:r,className:Z(c.root,i),ref:s,role:r===Oe?null:"rowgroup",ownerState:l,...d})})});function Kn(t){return V("MuiTableRow",t)}const We=G("MuiTableRow",["root","selected","hover","head","footer"]),Yn=t=>{const{classes:n,selected:s,hover:a,head:i,footer:r}=t;return K({root:["root",s&&"selected",a&&"hover",i&&"head",r&&"footer"]},Kn,n)},Jn=X("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,n)=>{const{ownerState:s}=t;return[n.root,s.head&&n.head,s.footer&&n.footer]}})(Je(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${We.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${We.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),"&:hover":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`)}}}))),Ve="tr",Ge=D.forwardRef(function(n,s){const a=Q({props:n,name:"MuiTableRow"}),{className:i,component:r=Ve,hover:d=!1,selected:l=!1,...c}=a,m=D.useContext(ke),p={...a,component:r,hover:d,selected:l,head:m&&m.variant==="head",footer:m&&m.variant==="footer"},u=Yn(p);return e.jsx(Jn,{as:r,ref:s,className:Z(u.root,i),role:r===Ve?null:"row",ownerState:p,...c})}),eo=et(e.jsx("path",{d:"M19 15v4H5v-4zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1M7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5M19 5v4H5V5zm1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1M7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5"})),to=et(e.jsx("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5zm-1 6h2v2h-2zm0 4h2v6h-2z"})),no=tt({});no.interceptors.request.use(t=>{const n=window.blocklet?window.blocklet.prefix:"/";return t.baseURL=n||"",t.url=le("/api",String(t.url)),t.timeout=2e5,t.params=t.params||{},new URLSearchParams(t.url.split("?")[1]).has("locale")||(t.params.locale=Ft()),t},t=>Promise.reject(t));const xt=(...t)=>tt(...t),oo=(t,n)=>n?t?[t,...Array.isArray(n)?n:[n]]:n:t,so=(t,{width:n=600,height:s=700,name:a="did-domain:popup"}={})=>{const i=window.screenX+(window.innerWidth-n)/2,r=window.screenY+(window.innerHeight-s)/2,d=[`left=${i}`,`top=${r}`,`width=${n}`,`height=${s}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],l=window.open("",a,d.join(","));if(l===null)throw new Error("Failed to open popup");return l.location.href=Nt(t,{opener:window.location.origin}),l},io="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",ht=async t=>{if(!t||!t?.trim())return null;const n=xt(),s=new URL(t);s.pathname="__blocklet__.js",s.searchParams.set("type","json");const{data:a}=await n.get(s.toString()),i=a?.componentMountPoints?.find(c=>c.did===io),r=new URL(t);r.pathname=i?.mountPoint;const d=r.toString(),l=le(d,"/api");return{base:d,api:l}},ro=nt({embed:{iconTip:"Click to view subscription details"},buy:{button:{title:"Buy DID Domain"},status:{inProgress:"Please wait while we are processing your request, the domain will be automatically resolved to the current app after the purchase...",success:"Purchase completed!"},error:{failedToCreateSession:"Failed to create session"}}}),ao=nt({embed:{iconTip:"点击查看订阅详情"},buy:{button:{title:"购买 DID 域名"},status:{inProgress:"请稍等,我们正在处理您的请求,购买域名后会自动解析到当前的应用...",success:"购买完成!"},error:{failedToCreateSession:"创建会话失败"}}}),lo={zh:ao,en:ro},co=async({didDomainURL:t,delegatee:n,delegateePk:s})=>{const a=await ht(t);if(!a)return null;const i=xt({baseURL:a.api}),{data:r}=await i.post("/payment/session",{delegatee:n,delegateePk:s});return{sessionId:r.sessionId,baseURL:a.base}};function uo({delegatee:t,delegateePk:n,didDomainURL:s,locale:a,title:i="",onSuccess:r=()=>{},...d}){const{t:l}=S(),[c,m]=Mn({currentState:1}),p=D.useRef(null),u=$t(async()=>{const f=await co({didDomainURL:s,delegatee:t,delegateePk:n});return f},{debounceWait:500,debounceLeading:!0,debounceTrailing:!1,debounceMaxWait:3e3,refreshDeps:[],onError(f){console.error(f)}}),g=se(f=>{f.data.type==="didDomain.success"&&(r?.({nftDid:f.data?.nftDid,domain:f.data?.domain,chainHost:f.data?.chainHost}),p.current?.close(),p.current=null,m({currentState:4}),setTimeout(()=>{m({currentState:8})},2e3))});Ht(()=>{try{window.removeEventListener("message",g),p.current?.close(),p.current=null}catch(f){console.warn("Failed to close popup",f)}});const b=se(()=>{m({currentState:1})}),h=se(()=>{if(m({currentState:2}),!u.data){console.error("Failed to create session");return}v({sessionId:u.data.sessionId,baseURL:u.data.baseURL})}),v=se(({sessionId:f,baseURL:y})=>{window.addEventListener("message",g);const w=new URL(y);w.searchParams.set("sessionId",f),w.searchParams.set("locale",a),w.searchParams.set("embed","1"),p.current=so(w.toString());const P=setInterval(()=>{p.current?.closed&&(clearInterval(P),b())},1e3);return()=>clearInterval(P)});return e.jsxs(e.Fragment,{children:[e.jsx(ft,{loading:u.loading,onClick:h,variant:"contained",startIcon:e.jsx(jn,{}),...d,children:i||l("buy.button.title")}),e.jsxs(_t,{fullWidth:!0,maxWidth:"xs",open:c.currentState>1&&c.currentState<8,onClose:b,children:[!u.error&&e.jsxs(x,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:2},children:[c.currentState===2&&e.jsx(z,{size:50}),c.currentState===4&&e.jsx(Ot,{sx:{color:"primary.main",fontSize:"5rem"}}),c.currentState===2&&e.jsx(T,{children:l("buy.status.inProgress")}),c.currentState===4&&e.jsx(T,{children:l("buy.status.success")})]}),u.error&&e.jsx(ue,{severity:"error",children:l("buy.error.failedToCreateSession")})]})]})}function mo(t){return e.jsx(zt,{locale:t.locale,translations:lo,children:e.jsx(uo,{...t})})}function po({nftDid:t,didDomainURL:n,locale:s,sx:a={}}){const{t:i}=S(),[r,d]=me({safeIframeRef:null,popoverAnchorEl:null}),l=D.useRef(null),c=Y(),m=pe(c.breakpoints.down("md")),p=h=>{d({popoverAnchorEl:h.currentTarget})},u=()=>{d({popoverAnchorEl:null})},g=Dn(async()=>{const h=await ht(n);return h?h.base:null});if(!g.value)return null;if(g.loading)return e.jsx(z,{});const b=le(g.value,`/embed/domain?nft-did=${t}&locale=${s}`);return e.jsxs(e.Fragment,{children:[e.jsx(E,{title:i("embed.iconTip"),children:e.jsx(x,{component:"img",src:le(n,"/.well-known/service/blocklet/logo"),alt:"logo",onClick:p,sx:[{width:16,height:16},oo({cursor:"pointer"},a)]})}),e.jsx(ot,{id:"popover-info",open:!!r.popoverAnchorEl,anchorEl:r.popoverAnchorEl,onClose:u,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx("iframe",{ref:l,title:i("common.subscription"),width:m?"320px":"400px",height:"350px",style:{border:0,display:"block"},src:b})})]})}const fo=t=>["waiting","creating","renewaling"].includes(t);function gt({siteId:t,domain:n,onAdd:s=()=>{},children:a=null,did:i,issuing:r=!1,setIssuing:d=()=>{}}){const{t:l}=S(),[c,m]=D.useState(!1),{inService:p}=L(),[u,g]=D.useState(null),{api:b,ws:{useSubscription:h}}=L(),{mode:v,actions:{refreshDomainStatus:f}}=J(),y=Gt(async()=>{const{cert:A}=await b.findCertificateByDomain({input:{domain:n,did:i}});return A}),w=(A,R)=>{A.domain===n&&(d(!1),m(!1),p&&v!=="setup"&&(R==="success"?q.success(l("setup.domain.genCertSuccess",{domain:A.domain})):R==="error"&&q.error(l("setup.domain.genCertFailed",{domain:A.domain,message:A.message}))))};if(D.useEffect(()=>{y.loading||d(fo(y.value?.status))},[y.loading,y.value?.status,d]),h(Fe.BlockletEvents.certError,A=>w(A,"error")),h(Fe.BlockletEvents.certIssued,A=>{y.retry(),f(A.domain),w(A,"success")}),y.loading||y.value?.status==="normal")return"";const P=()=>{m(!1),g(null)},F=async()=>{m(!0);try{await b.issueLetsEncryptCert({input:{siteId:t,domain:n,did:i,inBlockletSetup:v==="setup"}}),s(),d(!0)}catch(A){console.error(A),d(!1)}finally{m(!1),g(null)}},U={title:l("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(ue,{severity:"success",children:l("router.cert.genLetsEncryptCert.dnsTip")}),l("router.cert.genLetsEncryptCert.description")]}),confirm:l("common.confirm"),onConfirm:F,onCancel:P},N=A=>{A.stopPropagation(),g(U)};return e.jsxs(e.Fragment,{children:[r?e.jsx(E,{title:l("router.cert.issuing"),children:e.jsx(z,{size:13,style:{fontSize:"13px"}})}):a({loading:c,open:N}),u&&e.jsx(fe,{color:"primary",title:u.title,description:u.description,confirm:u.confirm,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}gt.propTypes={domain:o.string.isRequired,did:o.string.isRequired,siteId:o.string.isRequired,onAdd:o.func,children:o.any,issuing:o.bool,setIssuing:o.func};function Dt({domain:t,domainStatus:n,did:s,onAdd:a=()=>{},children:i=null,issuing:r=!1,setIssuing:d=()=>{},...l}){return Wt(t)||!st(t)||Vt(n)||n?.isHttps?"":e.jsx(gt,{...l,domain:t,did:s,onAdd:a,issuing:r,setIssuing:d,children:i})}Dt.propTypes={domain:o.string.isRequired,domainStatus:o.shape({isHttps:o.bool}).isRequired,did:o.string.isRequired,onAdd:o.func,children:o.any,issuing:o.bool,setIssuing:o.func};function yt({id:t,domain:n,children:s=null,teamDid:a="",onDelete:i=null}){const{t:r}=S(),[d,l]=D.useState(!1),[c,m]=D.useState(null),{api:p}=L(),u=()=>{l(!1),m(null)},g=async()=>{l(!0);try{await p.deleteDomainAlias({input:{id:t,domainAlias:n,teamDid:a}}),i?.(),await Qt(2e3)}catch(v){q.error(v.message)}finally{m(null),l(!1)}},b={keyName:n,title:r("router.domainAlias.delete.title"),description:r("router.domainAlias.delete.description",{domain:n}),confirmPlaceholder:r("router.domainAlias.delete.confirmPlaceholder",{domain:n}),confirm:r("common.delete"),onConfirm:g,onCancel:u},h=v=>{v.stopPropagation(),m(b)};return e.jsxs(e.Fragment,{children:[typeof s=="function"?s({loading:d,open:h}):e.jsxs(xe,{edge:"end",onClick:h,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[d?e.jsx(z,{size:16}):e.jsx(pt,{style:{fontSize:16}}),r("common.delete")]}),c&&e.jsx(bn,{keyName:c.keyName,title:c.title,description:c.description,confirmPlaceholder:c.confirmPlaceholder,confirm:c.confirm,params:c.params,onConfirm:c.onConfirm,onCancel:c.onCancel})]})}yt.propTypes={id:o.string.isRequired,domain:o.string.isRequired,children:o.any,teamDid:o.string,onDelete:o.func};function bt({site:t,domain:n,blocklet:s,onDelete:a=()=>{}}){const{t:i}=S(),r=n.value===window.location.hostname;return e.jsx(yn,{"data-cy":"domain-actions",size:"large",actions:[({close:d})=>e.jsx(yt,{id:t.id,domain:n.value,teamDid:s?.meta?.did,onDelete:a,children:({open:l})=>e.jsx(E,{title:r?i("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(it,{disabled:n.isProtected||r,dense:!0,onClick:c=>{d(),l(c)},"data-cy":"action-toggle-block",children:[e.jsx(Xt,{style:{minWidth:24,marginRight:8},children:e.jsx(pt,{})}),e.jsx(Zt,{primary:i("common.delete")})]},"remove")})})})]})}bt.propTypes={site:o.object.isRequired,domain:o.object.isRequired,blocklet:o.object.isRequired,onDelete:o.func};const he=o.shape({href:o.string,accessibility:o.shape({loading:o.bool,accessible:o.bool}),domainStatus:o.shape({isHttps:o.bool,matchedCert:o.object}),dns:o.shape({resolved:o.bool,ip:o.string})});function jt({certificate:t={}}){const[n,s]=D.useState(null),a=L(),{t:i,locale:r}=S(),d=m=>{s(m.currentTarget)},l=()=>{s(null)},c=!!n;return e.jsxs(e.Fragment,{children:[e.jsx(vn,{"aria-owns":c?"mouse-over-popover":void 0,onMouseEnter:d,onMouseLeave:l,style:{color:"#44cdc6",fontSize:"1em",cursor:"pointer"}}),e.jsx(ot,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:c,anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:l,disableRestoreFocus:!0,children:e.jsx(Kt,{children:e.jsxs(Cn,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${a.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(T,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(T,{component:"div",style:{fontWeight:"bold"},children:t.domain}),e.jsx(T,{component:"div",children:`${i("common.issuer")}: ${Yt(t,"issuer.commonName","")}`}),e.jsx(T,{component:"div",children:`${i("router.cert.issuedOn")}: ${Ne(t.validFrom,r)}`}),e.jsx(T,{component:"div",children:`${i("router.cert.expiryOn")}: ${Ne(t.validTo,r)}`})]})]})})})]})}jt.propTypes={certificate:o.object};function de({domain:t,filters:n=["domain","http"]}){const{t:s}=S(),{value:a,domainStatus:i}=t;if(!st(a))return null;let r=null,d=null;const{isHttps:l,matchedCert:c}=i,{dns:{ip:m,isDnsResolved:p,isCnameMatch:u}={}}=i,g=t.type==="nft-domain-forwarding",b=p&&(g||u);Jt(a)||(b||m==="127.0.0.1"?r=e.jsx(E,{title:s("router.domain.verify.ok"),children:e.jsx($e,{color:"success"})}):r=e.jsx(E,{title:s("router.domain.verify.notResolved"),children:e.jsx($e,{color:"error"})})),b?l?d=e.jsx(jt,{certificate:c}):d=e.jsx(E,{title:s("router.domain.https.bad"),children:e.jsx(to,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})}):d=e.jsx(E,{title:s("router.domain.verify.notResolved"),children:e.jsx(eo,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})});const h=n.map(v=>v==="domain"?r:v==="http"?d:null);return D.createElement(D.Fragment,null,...h)}de.propTypes={domain:he.isRequired,filters:o.array};const xo=mt(Ie,"mutate_blocklets"),ho=mt(Ie,"",en);function go(t){const{inService:n}=L(),{blocklet:s,loadingRuntimeInfo:a}=J();let i=xo;return n&&(i=ho),e.jsx(i,{...t,blocklet:s,inService:n,loadingRuntimeInfo:a})}const Qe="nft-domain",Xe="nft-domain-forwarding";function Ie({hasPermission:t=!1,blocklet:n,loadingRuntimeInfo:s=!1,inService:a=!1,showAllDomains:i=!1,updateBlockletDomainAliases:r=()=>{},systemTips:d=null}){const{t:l}=S(),c=pe(y=>y.breakpoints.down("md")),m=D.useMemo(()=>{let y=t;return rt(n)&&(y=y&&a),y},[t,a,n]),{site:p}=n,u=D.useMemo(()=>at(n.site?.domainAliases),[n.site?.domainAliases]),g=D.useMemo(()=>u.filter(y=>!we.isCustomDomain(y.value)),[u]),b=D.useMemo(()=>u.filter(y=>we.isCustomDomain(y.value)),[u]),h=D.useMemo(()=>b.filter(y=>y.type!==Qe&&y.type!==Xe),[b]),v=D.useMemo(()=>b.filter(y=>y.type===Qe),[b]),f=D.useMemo(()=>b.filter(y=>y.type===Xe),[b]);return e.jsxs(e.Fragment,{children:[e.jsxs(_,{sx:{gap:3},children:[!!v.length&&e.jsx(W,{title:l("common.didDomains"),description:l("common.didDomainsDescription"),domains:v,hasMutatePermission:m,blocklet:n,site:p,mobile:c,showAllDomains:i,updateBlockletDomainAliases:r}),!!f.length&&e.jsx(W,{title:l("common.forwardingDomains"),description:l("common.forwardingDomainsDescription"),domains:f,hasMutatePermission:m,blocklet:n,site:p,mobile:c,showAllDomains:i,updateBlockletDomainAliases:r}),!!h.length&&e.jsx(W,{title:l("common.manualDomains"),description:l("common.manualDomainsDescription"),domains:h,hasMutatePermission:m,blocklet:n,site:p,mobile:c,showAllDomains:i,updateBlockletDomainAliases:r}),!!g.length&&e.jsxs(x,{children:[d,e.jsx(W,{title:l("common.systemDomains"),description:l("common.systemDomainsDescription"),domains:g,hasMutatePermission:m,blocklet:n,site:p,mobile:c,updateBlockletDomainAliases:r})]})]}),!u.length&&(s?e.jsx(z,{size:16}):e.jsx(gn,{children:l("common.empty")}))]})}Ie.propTypes={hasPermission:o.bool,blocklet:o.object.isRequired,loadingRuntimeInfo:o.bool,inService:o.bool.isRequired,showAllDomains:o.bool,updateBlockletDomainAliases:o.func,systemTips:o.node};function re({children:t=null}){return e.jsx(x,{component:"span",sx:{verticalAlign:"bottom"},children:t})}re.propTypes={children:o.node};function Re({domain:t,children:n,suffix:s=null,...a}){const{t:i,locale:r}=S(),d=Y(),{href:l,accessibility:c,value:m}=t,p=D.useCallback(()=>e.jsx(ct,{content:Ae(m),locale:r,style:{marginLeft:"4px",color:d.palette.text.secondary,fontSize:"0.8em"}}),[m,r,d]);return!c||c.loading?e.jsxs(je,{component:"span",...a,children:[e.jsx(E,{title:void 0,placement:"top-end",children:e.jsx(x,{component:"span",children:n})}),p(),e.jsx(re,{children:s}),e.jsx(E,{title:i("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx(x,{component:"span",className:"status",children:e.jsx(z,{size:13,style:{fontSize:"13px"}})})})]}):c.accessible?e.jsxs(je,{component:"span",...a,children:[e.jsx(x,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{color:t.loading?"text.disabled":void 0},children:e.jsx(E,{title:void 0,placement:"top-end",children:e.jsx(x,{component:"span",children:n})})}),p(),e.jsx(re,{children:s})]}):e.jsxs(je,{component:"span",...a,children:[e.jsx(E,{title:i("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx(x,{component:"span",children:n})}),!t.loading&&p(),e.jsx(re,{children:s})]})}Re.propTypes={domain:he.isRequired,children:o.any.isRequired,suffix:o.node};const je=on(x)`
2
2
  display: inline-block;
3
3
  vertical-align: middle;
4
4