@abtnode/webapp 1.16.53 → 1.16.54-beta-20251016-050817-2fc632b8

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 (190) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-CT2knpDN.js → AdapterDayjs-NScUj50m.js} +1 -1
  4. package/dist/assets/{Add-B5kXVjlA.js → Add-D4EYSG3K.js} +1 -1
  5. package/dist/assets/ArrowDropDown-DonW35Zx.js +1 -0
  6. package/dist/assets/{Autocomplete-bHChBtVA.js → Autocomplete-Dy_zZ4Oc.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-BpV5sgxT.js → Breadcrumbs-C8gaKT3g.js} +1 -1
  8. package/dist/assets/{ButtonGroup-CDUEw9SW.js → ButtonGroup-DcZ0ug1l.js} +1 -1
  9. package/dist/assets/{CSSTransition-oc_jqFQN.js → CSSTransition-V4R7ZcvS.js} +1 -1
  10. package/dist/assets/{CallMerge-BrtGjpke.js → CallMerge-KoAXFCaW.js} +1 -1
  11. package/dist/assets/{CardContent-DJkOCDLg.js → CardContent-W_hyQjAD.js} +1 -1
  12. package/dist/assets/{ChevronLeft-DH29Zimq.js → ChevronLeft-CKiAYw9j.js} +1 -1
  13. package/dist/assets/{ChevronRight-BRfOjT4T.js → ChevronRight-DZiek3NZ.js} +1 -1
  14. package/dist/assets/{Clear-DX2cXl5s.js → Clear---RPVeR7.js} +1 -1
  15. package/dist/assets/{DeleteOutline-rUX66WwM.js → DeleteOutline-GpuLmtYQ.js} +1 -1
  16. package/dist/assets/{Done-BChOhJAU.js → Done-DzMcAgjX.js} +1 -1
  17. package/dist/assets/{Edit-BgZAPfMS.js → Edit-DCJEwDTg.js} +1 -1
  18. package/dist/assets/{ErrorOutline-C0x4yDj7.js → ErrorOutline-B9LgxSpq.js} +1 -1
  19. package/dist/assets/{FilterList-CjNG8_Me.js → FilterList-CNYUVm5S.js} +1 -1
  20. package/dist/assets/{Google-BFNuxUqB.js → Google-DR320mb8.js} +1 -1
  21. package/dist/assets/{HelpOutline-JDUwTxNr.js → HelpOutline-USuznZgn.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-B-1XGRf9.js → KeyboardArrowDown-rbx_AuZr.js} +1 -1
  23. package/dist/assets/{Launch-BM8tef6Y.js → Launch-DkmyUeYd.js} +1 -1
  24. package/dist/assets/{Link-B4nyHdoF.js → Link-CgW5geY5.js} +1 -1
  25. package/dist/assets/{ListItemButton-C-7jKIP8.js → ListItemButton-BhvWhm3n.js} +1 -1
  26. package/dist/assets/{ListSubheader-DuidDB0a.js → ListSubheader-BlgmemtO.js} +1 -1
  27. package/dist/assets/{LoadingButton-B4_fOUbX.js → LoadingButton-DpbZOfZH.js} +1 -1
  28. package/dist/assets/{MoreVert-zazLZzFB.js → MoreVert-wWXtgLji.js} +1 -1
  29. package/dist/assets/{OpenInNew-q2sIX9R4.js → OpenInNew-B8ApQgxt.js} +1 -1
  30. package/dist/assets/{Refresh-CPw_l8px.js → Refresh-nk8BSp_h.js} +1 -1
  31. package/dist/assets/{Search-DEPwrfa9.js → Search-DV5vJN1H.js} +1 -1
  32. package/dist/assets/{Stepper-8dFRVeqa.js → Stepper-Dm3PYaFi.js} +1 -1
  33. package/dist/assets/{Switch-BzWBU8yM.js → Switch-czLKbhPZ.js} +1 -1
  34. package/dist/assets/{TableSearch-DOm0JN54.js → TableSearch-CAf-ESr9.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-CdulBJn7.js → ToggleButtonGroup-Csc72nBu.js} +1 -1
  36. package/dist/assets/{UnfoldMore-B4TAWJFj.js → UnfoldMore-BQzQy89p.js} +1 -1
  37. package/dist/assets/{Verified-BvVUNdGO.js → Verified-CF2yeqGT.js} +1 -1
  38. package/dist/assets/{VerifiedUser-wQPNfQVE.js → VerifiedUser-C1tgCpCB.js} +1 -1
  39. package/dist/assets/{ViewList-CY3VNyEW.js → ViewList-CE_c5qLh.js} +1 -1
  40. package/dist/assets/{_createAggregator-Db2ymfxv.js → _createAggregator-Bnob81wI.js} +1 -1
  41. package/dist/assets/{actions-C5JFmT-q.js → actions-Cpb8n0Yw.js} +1 -1
  42. package/dist/assets/{actions-CIeK6cUZ.js → actions-DtMFbSMo.js} +1 -1
  43. package/dist/assets/{agreement-De9vaSzJ.js → agreement-D_SlINnK.js} +1 -1
  44. package/dist/assets/api-OdGoHXe4.js +1 -0
  45. package/dist/assets/{appearance-gnEGUOf_.js → appearance-buyEW0Iv.js} +1 -1
  46. package/dist/assets/{audit-logs-BGqaeoE8.js → audit-logs-CLj12YBu.js} +1 -1
  47. package/dist/assets/{base-chart-Cdw1ktRm.js → base-chart-E6uEbiC0.js} +1 -1
  48. package/dist/assets/{blocklet-B_F88Tat.js → blocklet-BSWtuwnH.js} +1 -1
  49. package/dist/assets/{chain-_RfIu3NG.js → chain-Cxmkzj72.js} +1 -1
  50. package/dist/assets/{click-to-copy-DKJULX-E.js → click-to-copy-C5l1aVBQ.js} +1 -1
  51. package/dist/assets/client-BaEuKBw8.js +1 -0
  52. package/dist/assets/cloneDeep-CPQcx7Qa.js +1 -0
  53. package/dist/assets/{collapse-Bt-lrDsW.js → collapse-D-q9UEjV.js} +1 -1
  54. package/dist/assets/{config-navigation-Br1ikf7O.js → config-navigation-Ck-BfL0o.js} +3 -3
  55. package/dist/assets/{connect-to-B3WMO9NZ.js → connect-to-sME9XFIO.js} +1 -1
  56. package/dist/assets/{cssMode-BpIHUHBi.js → cssMode-CwQeOUoG.js} +1 -1
  57. package/dist/assets/{delete-confirm-CScy8CpF.js → delete-confirm-CiFwBlNG.js} +1 -1
  58. package/dist/assets/{depsEqual-DFUdc1h4.js → depsEqual-BHCVOuWA.js} +1 -1
  59. package/dist/assets/{detail-DAA4xW7d.js → detail-u9DgWb-d.js} +3 -3
  60. package/dist/assets/{domains-C1C2bhHb.js → domains-CuwWHtSp.js} +1 -1
  61. package/dist/assets/{download-CaTl4zbM.js → download-B1XuXwBn.js} +1 -1
  62. package/dist/assets/{edit.svg-DLR7W7oi.js → edit.svg-BT2rpJxW.js} +1 -1
  63. package/dist/assets/emotion-cache.browser.esm-CQ2-5c4_.js +1 -0
  64. package/dist/assets/engine-wH21TR28.js +1 -0
  65. package/dist/assets/{freemarker2-DmCzdcqq.js → freemarker2-B3dcQl4s.js} +1 -1
  66. package/dist/assets/{get-safe-url-CVsSFVM-.js → get-safe-url-DfDeYxPo.js} +1 -1
  67. package/dist/assets/getValidReactChildren-DECNQV_G.js +1 -0
  68. package/dist/assets/{graphqlMode-B-6J-hpV.js → graphqlMode-gWZ1xdel.js} +2 -2
  69. package/dist/assets/{handlebars-DhRG3N5u.js → handlebars-DLMgXH9N.js} +1 -1
  70. package/dist/assets/{html-DldfQGgR.js → html-DmYIunqS.js} +1 -1
  71. package/dist/assets/{html-title-qBMXCmRQ.js → html-title-B42L4vHs.js} +1 -1
  72. package/dist/assets/{htmlMode-DWrLa2pl.js → htmlMode-CyuA6nxS.js} +1 -1
  73. package/dist/assets/{iframe-CqEGsthJ.js → iframe-B-84ZVfc.js} +1 -1
  74. package/dist/assets/{index-B3TQ1m-7.js → index-B-KmoBb-.js} +1 -1
  75. package/dist/assets/{index-CVVvxise.js → index-B4IIU09Y.js} +3 -3
  76. package/dist/assets/{index-CHDvsFaj.js → index-B6fuqqYD.js} +1 -1
  77. package/dist/assets/{index-BXQIx4QF.js → index-BHuxYJ36.js} +1 -1
  78. package/dist/assets/{index-B0LbFKW2.js → index-BIGgo0dk.js} +1 -1
  79. package/dist/assets/{index-C8lDVHeG.js → index-BKJPtvsM.js} +1 -1
  80. package/dist/assets/{index-CqWq8VRJ.js → index-Bb-RBdu9.js} +1 -1
  81. package/dist/assets/{index-mvZejwma.js → index-BcBcDLRF.js} +1 -1
  82. package/dist/assets/{index-BFWeWgZE.js → index-BkFC8ho3.js} +3 -3
  83. package/dist/assets/{index-DAsOMNw3.js → index-CAMlpQ47.js} +2 -2
  84. package/dist/assets/{index-DBf7KJKt.js → index-CAUKXdVD.js} +1 -1
  85. package/dist/assets/{index-CpnPkVho.js → index-CGwvwEUr.js} +1 -1
  86. package/dist/assets/{index-DbNhkmSY.js → index-CHZXKvDD.js} +1 -1
  87. package/dist/assets/{index-Djq6JIxf.js → index-CQ3QiuQQ.js} +1 -1
  88. package/dist/assets/{index-BlBdJ3Dk.js → index-CT-cKo4l.js} +1 -1
  89. package/dist/assets/{index-BKmYsfzy.js → index-Ca41Albz.js} +1 -1
  90. package/dist/assets/{index-FeXmdOtc.js → index-CbD2HRHU.js} +1 -1
  91. package/dist/assets/{index-49j4RhKz.js → index-CdnTrItd.js} +1 -1
  92. package/dist/assets/{index-CpQNfVqB.js → index-CnMT0fo1.js} +1 -1
  93. package/dist/assets/{index-BIqudEdj.js → index-Cu6PRXBT.js} +1 -1
  94. package/dist/assets/{index-cp3IjJlj.js → index-D-dEXSR3.js} +1 -1
  95. package/dist/assets/{index-ClEU1mAO.js → index-D4PsRecd.js} +1 -1
  96. package/dist/assets/{index-Dkpt0vo4.js → index-D63ritT-.js} +1 -1
  97. package/dist/assets/{index-IVbfHYRI.js → index-DBd6awj_.js} +1 -1
  98. package/dist/assets/{index-DEF7IUDm.js → index-DM9vqLT9.js} +1 -1
  99. package/dist/assets/{index-BWojQAsD.js → index-DXF1RiG0.js} +1 -1
  100. package/dist/assets/{index-DM12nfnK.js → index-D_ED6Nk7.js} +1 -1
  101. package/dist/assets/{index-BDKSFZhr.js → index-DaNXTl0n.js} +1 -1
  102. package/dist/assets/{index-BACUdl7h.js → index-Dd5Oo0tk.js} +1 -1
  103. package/dist/assets/{index-5jFNQsBE.js → index-DfxHc659.js} +1 -1
  104. package/dist/assets/{index-D6H6q-gI.js → index-DgKqbN5Y.js} +1 -1
  105. package/dist/assets/index-DpTrAVde.js +1 -0
  106. package/dist/assets/{index-DczpUr5i.js → index-DuS26oUH.js} +1 -1
  107. package/dist/assets/{index-aiQ1yrAz.js → index-DwEuapzX.js} +1 -1
  108. package/dist/assets/{index-DARALMqN.js → index-DwfORIGZ.js} +1 -1
  109. package/dist/assets/{index-C3zBUSk-.js → index-DxZUfBpk.js} +1 -1
  110. package/dist/assets/{index-ClckV-lZ.js → index-E2RuVge2.js} +3 -3
  111. package/dist/assets/{index-DuooR0LN.js → index-F3HbHSYi.js} +4 -4
  112. package/dist/assets/{index-Bd9gw7el.js → index-M4yiF52E.js} +1 -1
  113. package/dist/assets/{index-BN3g2rHb.js → index-hPXA34zh.js} +1 -1
  114. package/dist/assets/{index-EFHwnc77.js → index-haFP5Loj.js} +1 -1
  115. package/dist/assets/{index-aenta2dO.js → index-jC9YQw2A.js} +1 -1
  116. package/dist/assets/{index-I6AwLQhY.js → index-km_8frCh.js} +1 -1
  117. package/dist/assets/{index-CmuSCkrM.js → index-m-5ZFaj3.js} +1 -1
  118. package/dist/assets/{index--Xk2fT3q.js → index-nUrxOkOM.js} +1 -1
  119. package/dist/assets/{index-Bqt6vJLU.js → index-tXfQSlPx.js} +3 -3
  120. package/dist/assets/{index-B_oLwhaj.js → index-u7lHFbWg.js} +9 -9
  121. package/dist/assets/{index.esm-1OWSDx-7.js → index.esm-CG55Fmct.js} +1 -1
  122. package/dist/assets/{install-from-url-Bl4ZdRJm.js → install-from-url-DL-3oQMI.js} +1 -1
  123. package/dist/assets/{invitation-DEX-Txxu.js → invitation-C464OqTr.js} +1 -1
  124. package/dist/assets/{is-path-prefix-equal-DFHDOfyr.js → is-path-prefix-equal-DCicTZ8d.js} +1 -1
  125. package/dist/assets/{item-CmlChjGU.js → item-DkbrJM2U.js} +1 -1
  126. package/dist/assets/{javascript-B0PU6JyI.js → javascript-B0hI_Eyo.js} +1 -1
  127. package/dist/assets/{jsonMode-Dg95Goj7.js → jsonMode--kCoJBFT.js} +1 -1
  128. package/dist/assets/{liquid-CCjXcq7a.js → liquid-BVzOkmM1.js} +1 -1
  129. package/dist/assets/{list-header-CdZzFX4v.js → list-header-CnD8v8jR.js} +1 -1
  130. package/dist/assets/{lock.svg-DOUWz34o.js → lock.svg-DWUrJ_5S.js} +1 -1
  131. package/dist/assets/{log-C2q7HLQH.js → log-CjBZbQrr.js} +1 -1
  132. package/dist/assets/{lottie-react.esm-Dut6kuXv.js → lottie-react.esm-CcRYYgsR.js} +1 -1
  133. package/dist/assets/{mdx-DNHN55DV.js → mdx-DOswkMzX.js} +1 -1
  134. package/dist/assets/{memory-DDoSOGz9.js → memory-BkrGYits.js} +1 -1
  135. package/dist/assets/{metric-CRIsGIyz.js → metric-CNxVptGa.js} +1 -1
  136. package/dist/assets/omit-B8xv_k3Z.js +1 -0
  137. package/dist/assets/{overview-BwTrhp7S.js → overview-BWjjo7YM.js} +1 -1
  138. package/dist/assets/{permission-DIfhBFCW.js → permission-caYaN7o4.js} +1 -1
  139. package/dist/assets/{preference-BCXp2b-m.js → preference-D-1nO1Na.js} +3 -3
  140. package/dist/assets/{python-C1zln9B8.js → python-BJ2CXy2e.js} +1 -1
  141. package/dist/assets/{raf-schd.esm-GoSbO00M.js → raf-schd.esm-BdLRNFZe.js} +1 -1
  142. package/dist/assets/{razor-D6elnqQ-.js → razor-DdMOGESa.js} +1 -1
  143. package/dist/assets/{rotate-session-key-BThPZ3Wm.js → rotate-session-key-D_YTGNN-.js} +1 -1
  144. package/dist/assets/{runtime-DPbGGaoK.js → runtime-B1ybPRbq.js} +1 -1
  145. package/dist/assets/schema-BKs0S9Ju.js +1 -0
  146. package/dist/assets/sdk-WWYom8eN.js +1 -0
  147. package/dist/assets/{service-DFDToM0Z.js → service-pByff5wa.js} +1 -1
  148. package/dist/assets/{shorten-label-CH7uGTcM.js → shorten-label-DxKgpegt.js} +1 -1
  149. package/dist/assets/{simple-select-De_Le4X6.js → simple-select-DFmJjQqW.js} +1 -1
  150. package/dist/assets/{spaces-Dg_AAhqT.js → spaces-DnqeOj51.js} +1 -1
  151. package/dist/assets/{status-Bb59y7tA.js → status-BGeIvK1l.js} +1 -1
  152. package/dist/assets/{status-BkEitHMi.js → status-iJzbVxRo.js} +1 -1
  153. package/dist/assets/{switch-control-b81fnoth.js → switch-control-B_J8lGBy.js} +1 -1
  154. package/dist/assets/{table-icons-CYoxU12m.js → table-icons-CoOahY2H.js} +1 -1
  155. package/dist/assets/{team-CzwXU7Sn.js → team-NpjMEHti.js} +1 -1
  156. package/dist/assets/{toLower-DfahDL1_.js → toLower-Dx_gZ85b.js} +1 -1
  157. package/dist/assets/toUpper-28qo31SR.js +1 -0
  158. package/dist/assets/{traffic-Ky3k8S6h.js → traffic-BiqnglqJ.js} +1 -1
  159. package/dist/assets/{tsMode-BbM-SqEc.js → tsMode-CNfoaBo0.js} +1 -1
  160. package/dist/assets/{typescript-W-5Qa8-8.js → typescript-CYiGFg4j.js} +1 -1
  161. package/dist/assets/{url-evaluation-B0gvZV9M.js → url-evaluation-Bm9OWnaf.js} +1 -1
  162. package/dist/assets/{url-join-CODnoVq3.js → url-join-B07GNSp-.js} +1 -1
  163. package/dist/assets/{use-mobile-CkAg9r-k.js → use-mobile-D5fNICVu.js} +1 -1
  164. package/dist/assets/{use-mobile-Do_xR908.js → use-mobile-Dm-drtZi.js} +1 -1
  165. package/dist/assets/{useAsync-CxZFXpVk.js → useAsync-2o_4QDVN.js} +1 -1
  166. package/dist/assets/{useAsyncRetry-BnBPOYFC.js → useAsyncRetry-CSZJdZ2s.js} +1 -1
  167. package/dist/assets/{useLocalStorage-De1OH_yW.js → useLocalStorage-xEKVgwM3.js} +1 -1
  168. package/dist/assets/{useThemeProps-BqWmszN-.js → useThemeProps-BhYWaPDm.js} +1 -1
  169. package/dist/assets/{util-CU18bpQA.js → util-DhYg_WLh.js} +1 -1
  170. package/dist/assets/{wait-container-D4mwrL_c.js → wait-container-HwFE2vqS.js} +1 -1
  171. package/dist/assets/{without-wallet-BLBIKWnm.js → without-wallet-Dbr3bl6I.js} +1 -1
  172. package/dist/assets/wrap-locale-BQVWlKMF.js +1 -0
  173. package/dist/assets/{xml-DGlCv6Dc.js → xml-C13TFHPP.js} +1 -1
  174. package/dist/assets/{yaml-BMetQvWS.js → yaml-TMDBP8Bi.js} +1 -1
  175. package/dist/index.html +1 -1
  176. package/dist/service-worker.js +1 -1
  177. package/package.json +1 -1
  178. package/dist/assets/ArrowDropDown-DhJvpC-G.js +0 -1
  179. package/dist/assets/api-C_G-DBUm.js +0 -1
  180. package/dist/assets/client-BgZeYJUj.js +0 -1
  181. package/dist/assets/cloneDeep-CqeCq042.js +0 -1
  182. package/dist/assets/emotion-cache.browser.esm-BNl3Ir2h.js +0 -1
  183. package/dist/assets/engine-5aTStcWQ.js +0 -1
  184. package/dist/assets/getValidReactChildren-CpsNar5s.js +0 -1
  185. package/dist/assets/index-Dowor1ij.js +0 -1
  186. package/dist/assets/omit-BZ4Zgv1L.js +0 -1
  187. package/dist/assets/schema-Q04tmboc.js +0 -1
  188. package/dist/assets/sdk-DMTCyfpQ.js +0 -1
  189. package/dist/assets/toUpper-CFEG__Ub.js +0 -1
  190. package/dist/assets/wrap-locale-CuYkSdRb.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BFWeWgZE.js","./index-DuooR0LN.js","./index-DGkT7afN.css","./url-join-CODnoVq3.js","./index-EFHwnc77.js","./_createAggregator-Db2ymfxv.js","./depsEqual-DFUdc1h4.js","./index-DbNhkmSY.js","./index-DRYJ0xIl.js","./toUpper-CFEG__Ub.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
- import{bY as qf,bX as Vf,r as I,bZ as Kf,eR as Yf,j as g,b8 as it,b$ as rt,c0 as Jf,hD as Xf,hE as Qf,gz as Zf,dr as ep,hF as tp,ds as rp,bM as ac,bN as np,bK as ip,bL as op,bP as lc,dv as Gn,hG as ap,eB as lp,hr as sp,gW as cp,dC as up,gT as sc,hH as dp,gD as fp,fo as pp,eC as hp,he as gp,V as Ee,a2 as Xe,y as Be,aH as xe,aP as zt,c3 as Et,i as vp,f8 as mp,eM as bp,hu as yp,du as Rr,ex as vr,df as cc,dz as xp,hI as Sp,dy as uc,bd as $n,dM as nr,hJ as B,eY as K,eF as wp,hK as Yr,be as Z,o as x,dK as Wn,aQ as To,hL as Do,cx as er,aD as ye,b as ft,K as oe,af as Cp,cs as le,b9 as Po,dA as Yt,T as me,a3 as Ne,b1 as Hi,dG as yt,hM as Ip,bn as dc,E as Hn,hN as Rp,hO as Tp,t as nt,fl as Rn,ay as Dp,dc as Ve,fb as fc,C as pc,bF as Pp,hP as ka,M as _o,f7 as _p,f4 as hc,H as kt,O as gc,$ as vc,v as Tn,hQ as mc,f as jt,dJ as kp,bv as Op,gH as bc,dH as Or,a6 as Ep,a7 as Np,hR as Oa,hS as yc,hT as Mp,hU as Ap,fP as Un,fc as Lp,ga as zp,gb as jp,gh as qn,hV as Fp,gM as Bp,hW as Dn,hX as xc,bz as Le,L as Sc,z as ko,hY as Ea,hZ as wc,h_ as Ui,h$ as Gp,i0 as $p,s as cr,i1 as Wp,f3 as Hp,cw as Cc,i2 as Up,bC as qp,i3 as Vp,dF as He,D as Kp,U as Yp,A as Jp,cr as Xp,i4 as Qp,a$ as Zp,bg as Na,Q as Pn,a8 as Ma,i5 as eh,i6 as th,i7 as rh,i8 as nh,i9 as Ic,ia as ih,aB as Rc,e_ as Tc,ib as Oo,ic as oh,hn as Dc,id as ah,b5 as lh,cB as Jt,ie as sh,cQ as ch,ig as uh,c$ as dh,G as Aa,dm as ci,eG as La,dL as fh,ih as ph,a4 as Pc,X as za,ii as ja,P as hh,S as Fa}from"./index-DuooR0LN.js";import{r as gh}from"./omit-BZ4Zgv1L.js";import{r as vh}from"./cloneDeep-CqeCq042.js";import{r as mh}from"./index-EFHwnc77.js";import{c as bh,u as yh}from"./_createAggregator-Db2ymfxv.js";import{u as Ft}from"./blocklet-B_F88Tat.js";import{H as xh,G as Sh,M as wh,N as Ch,O as Ba,K as Ih,L as Rh}from"./index-B0LbFKW2.js";import{_ as Se,a as we,b as Ge,c as $e,d as We,e as Th,f as _c,u as fe,g as ne,r as Fr,w as _n,h as kc,i as Bt,j as Oc,k as Dh,l as Ph,o as qi}from"./raf-schd.esm-GoSbO00M.js";import{_ as M,b as Ga,c as _h,a as kh,d as Oh}from"./redux-DfszZyTl.js";import{_ as Eh}from"./typeof-QjJsDpFa.js";import{u as Ec,b as Nh}from"./team-CzwXU7Sn.js";import{b as Mh}from"./actions-C5JFmT-q.js";import{u as Ah,a as Lh,C as lt}from"./index.esm-1OWSDx-7.js";import{S as Vi}from"./simple-select-De_Le4X6.js";import{b as zh,a as $a}from"./html-title-qBMXCmRQ.js";import{C as Nc}from"./Clear-DX2cXl5s.js";import{A as jh}from"./ArrowDropDown-DhJvpC-G.js";import{a as Fh}from"./api-C_G-DBUm.js";import{A as Bh}from"./Autocomplete-bHChBtVA.js";import{L as Gh}from"./ListItemButton-C-7jKIP8.js";import{u as Mc}from"./use-mobile-Do_xR908.js";import{e as Tr}from"./client-BgZeYJUj.js";import{u as $h}from"./index-BDKSFZhr.js";import{d as Wh}from"./KeyboardArrowDown-B-1XGRf9.js";import{S as Hh}from"./Search-DEPwrfa9.js";import{A as Uh}from"./Add-B5kXVjlA.js";import{O as qh}from"./OpenInNew-q2sIX9R4.js";import{t as Vh}from"./index-DBf7KJKt.js";import{I as Kh}from"./iframe-CqEGsthJ.js";import{B as ui}from"./ButtonGroup-CDUEw9SW.js";import{L as Wa}from"./LoadingButton-B4_fOUbX.js";import"./depsEqual-DFUdc1h4.js";import"./url-evaluation-B0gvZV9M.js";import"./useLocalStorage-De1OH_yW.js";import"./MoreVert-zazLZzFB.js";import"./get-safe-url-CVsSFVM-.js";import"./permission-DIfhBFCW.js";import"./ListSubheader-DuidDB0a.js";import"./getValidReactChildren-CpsNar5s.js";function Yh(e){return qf("MuiListItemAvatar",e)}Vf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Jh=e=>{const{alignItems:r,classes:n}=e;return Jf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Yh,n)},Xh=it("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Ha=I.forwardRef(function(r,n){const t=Kf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(Yf),l={...t,alignItems:a.alignItems},s=Jh(l);return g.jsx(Xh,{className:rt(s.root,i),ownerState:l,ref:n,...o})});var Qh=Xf(function(){return Qf?sessionStorage:void 0});function Zh(e,r){return Zf(r,function(n){return e[n]})}function eg(e){return e==null?[]:Zh(e,ep(e))}var tg=tp.isFinite;function Ua(e){return typeof e=="number"&&tg(e)}function rg(e){return typeof e=="number"&&e==rp(e)}var ng=bh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const ig=Object.freeze(Object.defineProperty({__proto__:null,default:ng},Symbol.toStringTag,{value:"Module"}));var og=ac(function(e){var r=np(e);return r=typeof r=="function"?r:void 0,ip(op(e,1,lc,!0),void 0,r)});const ag=Object.freeze(Object.defineProperty({__proto__:null,default:og},Symbol.toStringTag,{value:"Module"}));var Ac=ac(function(e,r){return lc(e)?Mh(e,r):[]}),mr={};const lg=Gn(ag),sg=Gn(ap),cg=Gn(ig);var qa;function ug(){return qa||(qa=1,function(e){var r=mr&&mr.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ie,e.deepWalk=w,e.isMatchSection=P,e.nestNavigationList=Q,e.filterNavigation=X,e.cleanOrphanNavigation=ee,e.joinLink=F,e.flattenNavigation=N,e.splitNavigationBySection=J;const n=lp(),t=r(lg),i=r(sp),o=r(cp),a=r(sg),l=r(up),s=r(gh),c=r(vh),u=gp(),d=r(mh()),f=r(sc()),p=r(dp),h=r(fp),v=r(cg),m=pp(),y=hp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return y.checkLink}});const b="header",C="/",D="/",_="/";function w($,W=()=>{},{key:L="children",order:E="first"}={}){function O(U,{index:te=0,parent:ae=null,level:de=0}={}){Array.isArray(U)?U.forEach((pe,Ce)=>{O(pe,{index:Ce,parent:ae,level:de+1})}):U&&(E==="first"&&W(U,ae,{index:te,level:de}),O(U[L],{parent:U,level:de}),E==="last"&&W(U,ae,{index:te,level:de}))}O($)}function P($,W){return W===b&&(0,a.default)($)?!0:Array.isArray($)?$.includes(W):$===W}function S($){try{return JSON.parse($)}catch{return $}}function R($){return $.map(W=>{const L={...W};return L.role&&(L.role=S(L.role)),L.section&&(L.section=S(L.section)),L.title&&(L.title=S(L.title)),L.description&&(L.description=S(L.description)),L.link&&(L.link=S(L.link)),L})}function T($="/",W=""){if((0,f.default)(W||""))return W;const L=d.default.join($,W||D);return L.length>1&&L.endsWith("/")?L.slice(0,L.length-1):L}function k($,W,{strict:L=!0}={}){let E=$,O=W;return L||(E=E||"/",O=O||"/"),(0,p.default)(E)&&(0,h.default)(O)&&(0,y.checkLink)(O)?Object.keys(E).reduce((U,te)=>(U[te]=T(E[te],O),U),{}):(0,h.default)(E)&&(0,y.checkLink)(E)&&(0,p.default)(O)?Object.keys(O).reduce((U,te)=>(U[te]=T(E,O[te]),U),{}):(0,h.default)(E)&&(0,h.default)(O)?(0,y.checkLink)(E)||(0,y.checkLink)(O)?T(E,O):O:(0,p.default)(E)&&(0,p.default)(O)?[...new Set([...Object.keys(E),...Object.keys(O)])].reduce((te,ae)=>(te[ae]=T(E[ae],O[ae]),te),{}):O}function F($,W){const L=(0,c.default)($);return w(L,(E,O)=>{const U=E.component||E.child;if(U){const te=W.find(ae=>ae.name===U);te&&(E.link=k(te.link,E.link,{strict:!1}))}else O&&(E.link=k(O.link,E.link))},{key:"items"}),L}function N($=[],{depth:W=1,transform:L=E=>E}={}){const E=(0,c.default)($),O=[];return w(E,(U,te,{level:ae})=>{if(ae>=W){const{items:de=[]}=U;if(de&&Array.isArray(de)&&de.length>0){delete U.items;const pe=de.map(Ce=>L(Ce,U));if(te)te.items.push(...pe);else{const Ce=L((0,s.default)(U,["items"]),te);O.push(Ce,...pe)}}else if(ae===1){const pe=L((0,s.default)(U,["items"]),te);O.push(pe)}}else ae===1&&O.push(U)},{key:"items",order:"last"}),O}function H($){if($.section!=="bottomNavigation")return $;const W={...$};return n.NAVIGATION_I18N_FIELDS.forEach(L=>{const E=W[L];typeof E=="string"&&(W[L]={en:E})}),W}function z($={}){const W=[];function L(O,U={}){const te=[],{children:ae=[],meta:de={}}=O,pe=(0,c.default)(de?.navigation||[]);(0,m.hasStartEngine)(de)&&O.meta?.capabilities?.navigation!==!1&&te.push(...pe);const Ce=U.name||"",Me=U.mountPoint||C,be=O===$?"":de.name||"",De=O===$?"":O.mountPoint||C;for(const se of ae){if(!(0,m.hasStartEngine)(se.meta))continue;const ve=se.meta.name,ot=se.mountPoint,gr=[Ce,be,ve].filter(Boolean).join("."),li=se.meta.navigation||[],si=(0,u.joinURL)(Me,De,ot);se.meta?.capabilities?.navigation!==!1&&W.push({did:se.meta.did,name:gr,link:si,title:se.meta.title||"",navigation:li.map(Je=>({section:b,...Je}))});const at=pe.find(Je=>Je.component?Je.component===ve:!1);if(at){if(!at.link)if(se.meta.navigation&&se.meta.navigation.length>0){const Je=L(se,{mountPoint:De,name:be});Je.length>0&&(at.items=at.items??[],at.items.push(...Je))}else at.link=D}else if(se.meta?.capabilities?.navigation!==!1){const Je=L(se,{mountPoint:De,name:be}),an={title:se.meta.title,component:ve,id:se.meta.did};Je.length>0?(an.items=Je,an.link=void 0):an.link=D,te.push(an)}}return te}return{navigationList:L($),components:W}}function A($){const W=(0,c.default)($).filter(L=>L.id);return w(W,(L,E)=>{if(L.items&&L.items.length){for(let O=L.items.length-1;O>=0;O--)L.items[O].id||L.items.splice(O,1);L.items.length===0&&L.component&&(L.link=L.link||D)}E&&(L.parent=E.id,L.id=[E.id,L.id].join(_)),L.from=L.from||"yaml",L.visible=L.visible??!0},{key:"items"}),W}function G($,W=2){const L=(0,c.default)($),E=N(L,{depth:W,transform:(O,U)=>(U&&(O._parent||(O._parent=U.id,U.component||(O.link=k(U.link,O.link))),O.section=O.section||U.section||[b],O.visible=O.visible??U.visible,U.role&&(O.role=O.role||U.role)),O.component=[U.component,O.component].filter(Boolean).join("."),O)});return w(E,O=>{O.items&&O.items.length>0&&O.items.reduceRight((U,te)=>{if(te._parent){const ae=O.items.findIndex(de=>de.id===te._parent);ae>=0&&O.items.splice(ae,1),delete te._parent}return null},null)},{key:"items"}),E}function q($,W){return W&&Array.isArray($.items)?$.items.filter(L=>(0,a.default)(L.section)?P($.section,W):!!P(L.section,W)).map(L=>({...L,section:W})):[]}function J($){const W=(0,c.default)($),L=[];for(const E of W){let te=function(ae,de){const pe=q(ae,de);U.push({...O,section:de,items:pe})};const O=(0,c.default)((0,s.default)(E,["items"])),U=[];if(Array.isArray(E.section))for(const ae of E.section)te(E,ae);else if(E.section){const{section:ae}=E;te(E,ae)}else if(E.items&&E.items.length>0){const ae=E.items.reduce((pe,Ce)=>{const{section:Me=[b]}=Ce||{};return pe.push(...Me),pe},[]),de=[...new Set(ae)];for(const pe of de)te(E,pe)}else U.push({...E,section:b});L.push(...U)}return L}function Q($=[]){const W=(0,c.default)($);return W.reduceRight((L,E,O)=>{if(E.parent){const U=W.find(te=>E.section&&te.section?te.section===E.section&&te.id===E.parent:te.id===E.parent);U&&(U.items||(U.items=[]),U.items=[E,...U.items]),W.splice(O,1)}return null},null),W}function X($,W=[]){const L=Q($);return w(L,O=>{if(O?.component&&(W.some(U=>U.name===O.component)||(O.visible=!1)),O.items&&O.items.length)for(let U=O.items.length-1;U>=0;U--)O.items[U].visible===!1&&O.items.splice(U,1)},{key:"items"}),L.filter(O=>!(O.visible===!1||O.items&&Array.isArray(O.items)&&O.items.length>0&&O.items?.every(U=>U.visible===!1)))}function ee($){return $.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const V=$=>{const[W,L]=(0,v.default)($,E=>E.id==="/team");return[...W,...L]};e.sortRootNavigation=V;const re=$=>{const[,W]=(0,v.default)($,L=>{const E=typeof L.title=="string"?L.title:L.title?.en;return L.id==="/team"&&E==="Access"||L.id==="/dashboard"&&E==="Blocklet"});return W};e.cleanOldNavigationHistory=re;function ie($={},W={}){const{beforeProcess:L=se=>se}=W,{navigationList:E,components:O}=z($),U=new Map;E.forEach(se=>{se.items?.forEach(ve=>{U.set((0,u.joinURL)(se.id,ve.id),ve)})});const te=(0,l.default)($,"settings.org.enabled",!1);$?.settings?.navigations&&(Array.isArray($.settings.navigations)?$.settings.navigations=[...$.settings.navigations].filter(se=>!(se?.parent==="/team"&&se.from==="team-tmpl")).map(se=>{if(se.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(se,"private")){const ve=U.get(se.id);ve&&Object.prototype.hasOwnProperty.call(ve,"private")&&(se.private=ve.private)}return!te&&se.section==="userCenter"&&se.id==="/userCenter/orgs"?null:se}).filter(Boolean):$.settings.navigations=[]);const ae=R(re($?.settings?.navigations||[])).map(H),de=G(L(E)),pe=A(de),Me=J(pe).reduce((se,ve)=>["bottom","social","sessionManager","userCenter"].includes(ve.section)&&ve.items&&ve.items.length>0?(se.push(...ve.items.map(gr=>{const{section:li}=ve,si=k(ve.link,gr.link),at=[ve.component,gr.component].filter(Boolean).join(".");return{...gr,section:li,link:si,component:at,parent:""}})),se):(se.push(ve),se),[]),be=N(Me,{transform(se,ve){let{component:ot}=se;return ve?.component&&(ot=[ve.component,se.component].filter(Boolean).join(".")),H({...se,component:ot})}});return{navigationList:(0,t.default)(ae,be,(se,ve)=>{const ot=["id","section"];return(0,i.default)((0,o.default)(se,ot),(0,o.default)(ve,ot))}),components:O,builtinList:be}}}(mr)),mr}var ke=ug();const Lc=I.createContext(null),Va="/",dg="header",Ka={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Be(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Be(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled}]};function di(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const st=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Be(xe.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),fg=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),pg=(e,r)=>{const n=ke.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(fg("/team",e("navigation.blockletService"),[st("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),st("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),st("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),st("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),st("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),st("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),st("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),st("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ya({name:e}){return g.jsx(bp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function hg({children:e}){const{blocklet:r,actions:n}=Ft(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=ke.parseNavigation(r,{beforeProcess(w){const P=Xe(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Ka,S)&&Ka[S].forEach(R=>{(R.shouldDisplay&&typeof R.shouldDisplay=="function"?R.shouldDisplay:()=>!0)(r)&&!P.some(k=>k.id===R.id)&&P.push(R)})}),pg(t,P)}}),l=zt({rawNavigation:Xe(i),activeSection:dg,components:o}),s=I.useMemo(()=>ke.nestNavigationList(Xe(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const w=ke.filterNavigation(Xe(l.rawNavigation),o);return ke.joinLink(w,o)},[o,l.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const P=ke.flattenNavigation(ke.joinLink(s,o)),S=P.find(R=>R.id===w.id);if(S?.component){if(!o.some(R=>R.name===S.component))return g.jsx(Ya,{name:S.component})}else if(S.parent){const R=P.find(T=>T.id===S.parent);if(R?.component&&!o.some(T=>T.name===R.component))return g.jsx(Ya,{name:R.component})}return S?.link},[s,o]),d=I.useCallback(w=>{l.activeSection=w},[l]),f=I.useCallback(w=>{const P=[];ke.deepWalk(w,(R,T)=>{const k={...Et(R,["children","expand"]),parent:T?.id};P.push(k)});const S=Xe(l.rawNavigation).filter(R=>{if(!l.activeSection)return!1;const T=P.find(k=>di(k,R));return T?!ke.isMatchSection(T.section,l.activeSection):!0});l.rawNavigation=[...S,...P]},[l]),p=I.useCallback((w=[])=>{const P=Xe(l.rawNavigation).map(S=>{const R=w.find(T=>di({...T,section:l.activeSection},S));return R?{...S,...R}:S});l.rawNavigation=P},[l]),h=I.useCallback((w,P=Va)=>w.map(R=>{const k=o.find(H=>H.name===R.component)?.link||P,F=R.items||[],{link:N}=R;return{title:R.title,description:R.description,subtitle:u(R),link:N,icon:R.icon,children:h(F,N||Va),section:R.section,visible:R.visible,parent:R.parent,component:R.component,id:R.id,role:R.role,from:R.from,__base:k}}),[o,u]),v=I.useCallback(w=>{p([w])},[p]),m=I.useCallback(w=>{const P=l.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);l.rawNavigation=Xe(l.rawNavigation).filter(S=>!P.includes(S.id))},[l]),y=I.useCallback((w={},P=-1)=>{const S={...w,id:vp.nanoid(),section:l.activeSection,visible:!0},R=[...l.rawNavigation],T=R.filter(k=>k.section===l.activeSection);if(P<0||P>T.length-1)R.push(S);else{const k=T[P],F=R.findIndex(N=>di(N,k));R.splice(F,0,S)}return l.rawNavigation=R,S},[l]),b=I.useCallback(w=>{const S=Xe(s).filter(R=>ke.isMatchSection(R.section,w));return h(S)},[s,h]),C=I.useCallback(async w=>{const S=w.map(R=>mp(R,yp)).map(R=>{const T={...R};return T.role&&Array.isArray(T.role)&&(T.role=JSON.stringify(T.role)),T.section&&Array.isArray(T.section)&&(T.section=JSON.stringify(T.section)),T.title&&T.title instanceof Object&&(T.title=JSON.stringify(T.title)),T.description&&T.description instanceof Object&&(T.description=JSON.stringify(T.description)),T.link&&T.link instanceof Object&&(T.link=JSON.stringify(T.link)),T});await n.configNavigations(S)},[n]),D=I.useCallback(async w=>{if(w){const P=a.filter(R=>ke.isMatchSection(R.section,w)),S=l.rawNavigation.filter(R=>!ke.isMatchSection(R.section,w));await C(S),l.rawNavigation=[...S,...P]}else await C([]),l.rawNavigation=Xe(a)},[C,l,a]),_=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:d,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:f,getNavigation:b,saveNavigationList:C,resetNavigation:D}),[l,c,o,u,d,v,m,y,f,b,C,D]);return g.jsx(Lc.Provider,{value:_,children:e})}function zc(){const e=I.useContext(Lc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},fi,Ja;function gg(){if(Ja)return fi;Ja=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Rr=="object"&&Rr&&Rr.Object===Object&&Rr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),d=Object.prototype,f=d.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,P,S){var R,T,k,F,N,H,z=0,A=!1,G=!1,q=!0;if(typeof w!="function")throw new TypeError(e);P=_(P)||0,b(S)&&(A=!!S.leading,G="maxWait"in S,k=G?p(_(S.maxWait)||0,P):k,q="trailing"in S?!!S.trailing:q);function J(L){var E=R,O=T;return R=T=void 0,z=L,F=w.apply(O,E),F}function Q(L){return z=L,N=setTimeout(V,P),A?J(L):F}function X(L){var E=L-H,O=L-z,U=P-E;return G?h(U,k-O):U}function ee(L){var E=L-H,O=L-z;return H===void 0||E>=P||E<0||G&&O>=k}function V(){var L=v();if(ee(L))return re(L);N=setTimeout(V,X(L))}function re(L){return N=void 0,q&&R?J(L):(R=T=void 0,F)}function ie(){N!==void 0&&clearTimeout(N),z=0,R=H=T=N=void 0}function $(){return N===void 0?F:re(v())}function W(){var L=v(),E=ee(L);if(R=arguments,T=this,H=L,E){if(N===void 0)return Q(H);if(G)return N=setTimeout(V,P),J(H)}return N===void 0&&(N=setTimeout(V,P)),F}return W.cancel=ie,W.flush=$,W}function y(w,P,S){var R=!0,T=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(R="leading"in S?!!S.leading:R,T="trailing"in S?!!S.trailing:T),m(w,P,{leading:R,maxWait:P,trailing:T})}function b(w){var P=typeof w;return!!w&&(P=="object"||P=="function")}function C(w){return!!w&&typeof w=="object"}function D(w){return typeof w=="symbol"||C(w)&&f.call(w)==n}function _(w){if(typeof w=="number")return w;if(D(w))return r;if(b(w)){var P=typeof w.valueOf=="function"?w.valueOf():w;w=b(P)?P+"":P}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?l(w.slice(2),S?2:8):i.test(w)?r:+w}return fi=y,fi}var br={exports:{}},Tt={exports:{}},vg=Tt.exports,Xa;function mg(){return Xa||(Xa=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Tt.exports=function(){return performance.now()}:typeof vr<"u"&&vr!==null&&vr.hrtime?(Tt.exports=function(){return(e()-i)/1e6},r=vr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=vr.uptime()*1e9,i=t-o):Date.now?(Tt.exports=function(){return Date.now()-n},n=Date.now()):(Tt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(vg)),Tt.exports}var Qa;function bg(){if(Qa)return br.exports;Qa=1;for(var e=mg(),r=typeof window>"u"?Rr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var l=0,s=0,c=[],u=1e3/60;i=function(d){if(c.length===0){var f=e(),p=Math.max(0,u-(f-l));l=p+f,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++s,callback:d,cancelled:!1}),s},o=function(d){for(var f=0;f<c.length;f++)c[f].handle===d&&(c[f].cancelled=!0)}}return br.exports=function(d){return i.call(r,d)},br.exports.cancel=function(){o.apply(r,arguments)},br.exports.polyfill=function(d){d||(d=r),d.requestAnimationFrame=i,d.cancelAnimationFrame=o},br.exports}var ln={},Za;function yg(){if(Za)return ln;Za=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return ln}var $t={},el;function xg(){if(el)return $t;el=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.noop=e,$t.intBetween=r,$t.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return $t}var tl;function Sg(){if(tl)return Ke;tl=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=R,Ke.createVerticalStrength=T,Ke.createScrollingComponent=N,Ke.default=H,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(cc()),r=c(uc()),n=xp(),t=c(gg()),i=c(bg()),o=c(yg()),a=xh,l=c(Sp()),s=xg();function c(z){return z&&z.__esModule?z:{default:z}}function u(z){if(z&&z.__esModule)return z;var A={};if(z!=null){for(var G in z)if(Object.prototype.hasOwnProperty.call(z,G)){var q=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(z,G):{};q.get||q.set?Object.defineProperty(A,G,q):A[G]=z[G]}}return A.default=z,A}function d(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(G){return typeof G}:d=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},d(z)}function f(){return f=Object.assign||function(z){for(var A=1;A<arguments.length;A++){var G=arguments[A];for(var q in G)Object.prototype.hasOwnProperty.call(G,q)&&(z[q]=G[q])}return z},f.apply(this,arguments)}function p(z,A){if(z==null)return{};var G=h(z,A),q,J;if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(z);for(J=0;J<Q.length;J++)q=Q[J],!(A.indexOf(q)>=0)&&Object.prototype.propertyIsEnumerable.call(z,q)&&(G[q]=z[q])}return G}function h(z,A){if(z==null)return{};var G={},q=Object.keys(z),J,Q;for(Q=0;Q<q.length;Q++)J=q[Q],!(A.indexOf(J)>=0)&&(G[J]=z[J]);return G}function v(z,A){if(!(z instanceof A))throw new TypeError("Cannot call a class as a function")}function m(z,A){for(var G=0;G<A.length;G++){var q=A[G];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(z,q.key,q)}}function y(z,A,G){return A&&m(z.prototype,A),z}function b(z,A){return A&&(d(A)==="object"||typeof A=="function")?A:w(z)}function C(z){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},C(z)}function D(z,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(A&&A.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),A&&_(z,A)}function _(z,A){return _=Object.setPrototypeOf||function(q,J){return q.__proto__=J,q},_(z,A)}function w(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function P(z,A,G){return A in z?Object.defineProperty(z,A,{value:G,enumerable:!0,configurable:!0,writable:!0}):z[A]=G,z}var S=150;function R(z){return function(G,q){var J=G.x,Q=G.w,X=G.y,ee=G.h,V=Math.min(Q/2,z),re=q.x>=J&&q.x<=J+Q,ie=re&&q.y>=X&&q.y<=X+ee;if(ie){if(q.x<J+V)return(q.x-J-V)/V;if(q.x>J+Q-V)return-(J+Q-q.x-V)/V}return 0}}function T(z){return function(G,q){var J=G.y,Q=G.h,X=G.x,ee=G.w,V=Math.min(Q/2,z),re=q.y>=J&&q.y<=J+Q,ie=re&&q.x>=X&&q.x<=X+ee;if(ie){if(q.y<J+V)return(q.y-J-V)/V;if(q.y>J+Q-V)return-(J+Q-q.y-V)/V}return 0}}var k=R(S);Ke.defaultHorizontalStrength=k;var F=T(S);Ke.defaultVerticalStrength=F;function N(z){var A=function(G){D(q,G);function q(J,Q){var X;return v(this,q),X=b(this,C(q).call(this,J,Q)),P(w(w(X)),"updateScrolling",(0,t.default)(function(ee){var V=X.container.getBoundingClientRect(),re=V.left,ie=V.top,$=V.width,W=V.height,L={x:re,y:ie,w:$,h:W},E=(0,s.getCoords)(ee),O=X.props,U=O.horizontalStrength,te=O.verticalStrength;X.scaleX=U(L,E),X.scaleY=te(L,E),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),P(w(w(X)),"handleEvent",function(ee){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(ee))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(q,[{key:"componentDidMount",value:function(){var Q=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return Q.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var Q=this.props.dragDropManager,X=Q.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var Q=this,X=0,ee=function V(){var re=Q.scaleX,ie=Q.scaleY,$=Q.container,W=Q.props,L=W.strengthMultiplier,E=W.onScrollChange;if(L===0||re+ie===0){Q.stopScrolling();return}if(X+=1,X%2){var O=$.scrollLeft,U=$.scrollTop,te=$.scrollWidth,ae=$.scrollHeight,de=$.clientWidth,pe=$.clientHeight,Ce=re?$.scrollLeft=(0,s.intBetween)(0,te-de,O+re*L):O,Me=ie?$.scrollTop=(0,s.intBetween)(0,ae-pe,U+ie*L):U;E(Ce,Me)}Q.frame=(0,i.default)(V)};ee()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var Q=this.props;Q.strengthMultiplier,Q.verticalStrength,Q.horizontalStrength,Q.onScrollChange;var X=p(Q,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(z,f({ref:this.wrappedInstance},X))}}]),q}(e.Component);return P(A,"displayName","Scrolling(".concat((0,o.default)(z),")")),P(A,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),P(A,"defaultProps",{onScrollChange:s.noop,verticalStrength:F,horizontalStrength:k,strengthMultiplier:30}),(0,l.default)(A,z)}function H(z){var A=N(z);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(q){var J=q.dragDropManager;return J===void 0?null:e.default.createElement(A,f({},G,{dragDropManager:J}))})}}return Ke}var bn=Sg();const wg=$n(bn);var Cg=Sh();const rl=$n(Cg);function jc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Fc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Bc(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}jc.__suppressDeprecationWarning=!0;Fc.__suppressDeprecationWarning=!0;Bc.__suppressDeprecationWarning=!0;function Jr(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BkFC8ho3.js","./index-F3HbHSYi.js","./index-DGkT7afN.css","./url-join-B07GNSp-.js","./index-haFP5Loj.js","./_createAggregator-Bnob81wI.js","./depsEqual-BHCVOuWA.js","./index-CHZXKvDD.js","./index-DRYJ0xIl.js","./toUpper-28qo31SR.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
+ import{bY as qf,bX as Vf,r as I,bZ as Kf,eR as Yf,j as g,b8 as it,b$ as rt,c0 as Jf,hD as Xf,hE as Qf,gz as Zf,dr as ep,hF as tp,ds as rp,bM as ac,bN as np,bK as ip,bL as op,bP as lc,dv as Gn,hG as ap,eB as lp,hr as sp,gW as cp,dC as up,gT as sc,hH as dp,gD as fp,fo as pp,eC as hp,he as gp,V as Ee,a2 as Xe,y as Be,aH as xe,aP as zt,c3 as Et,i as vp,f8 as mp,eM as bp,hu as yp,du as Rr,ex as vr,df as cc,dz as xp,hI as Sp,dy as uc,bd as $n,dM as nr,hJ as B,eY as K,eF as wp,hK as Yr,be as Z,o as x,dK as Wn,aQ as To,hL as Do,cx as er,aD as ye,b as ft,K as oe,af as Cp,cs as le,b9 as Po,dA as Yt,T as me,a3 as Ne,b1 as Hi,dG as yt,hM as Ip,bn as dc,E as Hn,hN as Rp,hO as Tp,t as nt,fl as Rn,ay as Dp,dc as Ve,fb as fc,C as pc,bF as Pp,hP as ka,M as _o,f7 as _p,f4 as hc,H as kt,O as gc,$ as vc,v as Tn,hQ as mc,f as jt,dJ as kp,bv as Op,gH as bc,dH as Or,a6 as Ep,a7 as Np,hR as Oa,hS as yc,hT as Mp,hU as Ap,fP as Un,fc as Lp,ga as zp,gb as jp,gh as qn,hV as Fp,gM as Bp,hW as Dn,hX as xc,bz as Le,L as Sc,z as ko,hY as Ea,hZ as wc,h_ as Ui,h$ as Gp,i0 as $p,s as cr,i1 as Wp,f3 as Hp,cw as Cc,i2 as Up,bC as qp,i3 as Vp,dF as He,D as Kp,U as Yp,A as Jp,cr as Xp,i4 as Qp,a$ as Zp,bg as Na,Q as Pn,a8 as Ma,i5 as eh,i6 as th,i7 as rh,i8 as nh,i9 as Ic,ia as ih,aB as Rc,e_ as Tc,ib as Oo,ic as oh,hn as Dc,id as ah,b5 as lh,cB as Jt,ie as sh,cQ as ch,ig as uh,c$ as dh,G as Aa,dm as ci,eG as La,dL as fh,ih as ph,a4 as Pc,X as za,ii as ja,P as hh,S as Fa}from"./index-F3HbHSYi.js";import{r as gh}from"./omit-B8xv_k3Z.js";import{r as vh}from"./cloneDeep-CPQcx7Qa.js";import{r as mh}from"./index-haFP5Loj.js";import{c as bh,u as yh}from"./_createAggregator-Bnob81wI.js";import{u as Ft}from"./blocklet-BSWtuwnH.js";import{H as xh,G as Sh,M as wh,N as Ch,O as Ba,K as Ih,L as Rh}from"./index-BIGgo0dk.js";import{_ as Se,a as we,b as Ge,c as $e,d as We,e as Th,f as _c,u as fe,g as ne,r as Fr,w as _n,h as kc,i as Bt,j as Oc,k as Dh,l as Ph,o as qi}from"./raf-schd.esm-BdLRNFZe.js";import{_ as M,b as Ga,c as _h,a as kh,d as Oh}from"./redux-DfszZyTl.js";import{_ as Eh}from"./typeof-QjJsDpFa.js";import{u as Ec,b as Nh}from"./team-NpjMEHti.js";import{b as Mh}from"./actions-Cpb8n0Yw.js";import{u as Ah,a as Lh,C as lt}from"./index.esm-CG55Fmct.js";import{S as Vi}from"./simple-select-DFmJjQqW.js";import{b as zh,a as $a}from"./html-title-B42L4vHs.js";import{C as Nc}from"./Clear---RPVeR7.js";import{A as jh}from"./ArrowDropDown-DonW35Zx.js";import{a as Fh}from"./api-OdGoHXe4.js";import{A as Bh}from"./Autocomplete-Dy_zZ4Oc.js";import{L as Gh}from"./ListItemButton-BhvWhm3n.js";import{u as Mc}from"./use-mobile-Dm-drtZi.js";import{e as Tr}from"./client-BaEuKBw8.js";import{u as $h}from"./index-DaNXTl0n.js";import{d as Wh}from"./KeyboardArrowDown-rbx_AuZr.js";import{S as Hh}from"./Search-DV5vJN1H.js";import{A as Uh}from"./Add-D4EYSG3K.js";import{O as qh}from"./OpenInNew-B8ApQgxt.js";import{t as Vh}from"./index-CAUKXdVD.js";import{I as Kh}from"./iframe-B-84ZVfc.js";import{B as ui}from"./ButtonGroup-DcZ0ug1l.js";import{L as Wa}from"./LoadingButton-DpbZOfZH.js";import"./depsEqual-BHCVOuWA.js";import"./url-evaluation-Bm9OWnaf.js";import"./useLocalStorage-xEKVgwM3.js";import"./MoreVert-wWXtgLji.js";import"./get-safe-url-DfDeYxPo.js";import"./permission-caYaN7o4.js";import"./ListSubheader-BlgmemtO.js";import"./getValidReactChildren-DECNQV_G.js";function Yh(e){return qf("MuiListItemAvatar",e)}Vf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Jh=e=>{const{alignItems:r,classes:n}=e;return Jf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Yh,n)},Xh=it("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Ha=I.forwardRef(function(r,n){const t=Kf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(Yf),l={...t,alignItems:a.alignItems},s=Jh(l);return g.jsx(Xh,{className:rt(s.root,i),ownerState:l,ref:n,...o})});var Qh=Xf(function(){return Qf?sessionStorage:void 0});function Zh(e,r){return Zf(r,function(n){return e[n]})}function eg(e){return e==null?[]:Zh(e,ep(e))}var tg=tp.isFinite;function Ua(e){return typeof e=="number"&&tg(e)}function rg(e){return typeof e=="number"&&e==rp(e)}var ng=bh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const ig=Object.freeze(Object.defineProperty({__proto__:null,default:ng},Symbol.toStringTag,{value:"Module"}));var og=ac(function(e){var r=np(e);return r=typeof r=="function"?r:void 0,ip(op(e,1,lc,!0),void 0,r)});const ag=Object.freeze(Object.defineProperty({__proto__:null,default:og},Symbol.toStringTag,{value:"Module"}));var Ac=ac(function(e,r){return lc(e)?Mh(e,r):[]}),mr={};const lg=Gn(ag),sg=Gn(ap),cg=Gn(ig);var qa;function ug(){return qa||(qa=1,function(e){var r=mr&&mr.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ie,e.deepWalk=w,e.isMatchSection=P,e.nestNavigationList=Q,e.filterNavigation=X,e.cleanOrphanNavigation=ee,e.joinLink=F,e.flattenNavigation=N,e.splitNavigationBySection=J;const n=lp(),t=r(lg),i=r(sp),o=r(cp),a=r(sg),l=r(up),s=r(gh),c=r(vh),u=gp(),d=r(mh()),f=r(sc()),p=r(dp),h=r(fp),v=r(cg),m=pp(),y=hp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return y.checkLink}});const b="header",C="/",D="/",_="/";function w($,W=()=>{},{key:L="children",order:E="first"}={}){function O(U,{index:te=0,parent:ae=null,level:de=0}={}){Array.isArray(U)?U.forEach((pe,Ce)=>{O(pe,{index:Ce,parent:ae,level:de+1})}):U&&(E==="first"&&W(U,ae,{index:te,level:de}),O(U[L],{parent:U,level:de}),E==="last"&&W(U,ae,{index:te,level:de}))}O($)}function P($,W){return W===b&&(0,a.default)($)?!0:Array.isArray($)?$.includes(W):$===W}function S($){try{return JSON.parse($)}catch{return $}}function R($){return $.map(W=>{const L={...W};return L.role&&(L.role=S(L.role)),L.section&&(L.section=S(L.section)),L.title&&(L.title=S(L.title)),L.description&&(L.description=S(L.description)),L.link&&(L.link=S(L.link)),L})}function T($="/",W=""){if((0,f.default)(W||""))return W;const L=d.default.join($,W||D);return L.length>1&&L.endsWith("/")?L.slice(0,L.length-1):L}function k($,W,{strict:L=!0}={}){let E=$,O=W;return L||(E=E||"/",O=O||"/"),(0,p.default)(E)&&(0,h.default)(O)&&(0,y.checkLink)(O)?Object.keys(E).reduce((U,te)=>(U[te]=T(E[te],O),U),{}):(0,h.default)(E)&&(0,y.checkLink)(E)&&(0,p.default)(O)?Object.keys(O).reduce((U,te)=>(U[te]=T(E,O[te]),U),{}):(0,h.default)(E)&&(0,h.default)(O)?(0,y.checkLink)(E)||(0,y.checkLink)(O)?T(E,O):O:(0,p.default)(E)&&(0,p.default)(O)?[...new Set([...Object.keys(E),...Object.keys(O)])].reduce((te,ae)=>(te[ae]=T(E[ae],O[ae]),te),{}):O}function F($,W){const L=(0,c.default)($);return w(L,(E,O)=>{const U=E.component||E.child;if(U){const te=W.find(ae=>ae.name===U);te&&(E.link=k(te.link,E.link,{strict:!1}))}else O&&(E.link=k(O.link,E.link))},{key:"items"}),L}function N($=[],{depth:W=1,transform:L=E=>E}={}){const E=(0,c.default)($),O=[];return w(E,(U,te,{level:ae})=>{if(ae>=W){const{items:de=[]}=U;if(de&&Array.isArray(de)&&de.length>0){delete U.items;const pe=de.map(Ce=>L(Ce,U));if(te)te.items.push(...pe);else{const Ce=L((0,s.default)(U,["items"]),te);O.push(Ce,...pe)}}else if(ae===1){const pe=L((0,s.default)(U,["items"]),te);O.push(pe)}}else ae===1&&O.push(U)},{key:"items",order:"last"}),O}function H($){if($.section!=="bottomNavigation")return $;const W={...$};return n.NAVIGATION_I18N_FIELDS.forEach(L=>{const E=W[L];typeof E=="string"&&(W[L]={en:E})}),W}function z($={}){const W=[];function L(O,U={}){const te=[],{children:ae=[],meta:de={}}=O,pe=(0,c.default)(de?.navigation||[]);(0,m.hasStartEngine)(de)&&O.meta?.capabilities?.navigation!==!1&&te.push(...pe);const Ce=U.name||"",Me=U.mountPoint||C,be=O===$?"":de.name||"",De=O===$?"":O.mountPoint||C;for(const se of ae){if(!(0,m.hasStartEngine)(se.meta))continue;const ve=se.meta.name,ot=se.mountPoint,gr=[Ce,be,ve].filter(Boolean).join("."),li=se.meta.navigation||[],si=(0,u.joinURL)(Me,De,ot);se.meta?.capabilities?.navigation!==!1&&W.push({did:se.meta.did,name:gr,link:si,title:se.meta.title||"",navigation:li.map(Je=>({section:b,...Je}))});const at=pe.find(Je=>Je.component?Je.component===ve:!1);if(at){if(!at.link)if(se.meta.navigation&&se.meta.navigation.length>0){const Je=L(se,{mountPoint:De,name:be});Je.length>0&&(at.items=at.items??[],at.items.push(...Je))}else at.link=D}else if(se.meta?.capabilities?.navigation!==!1){const Je=L(se,{mountPoint:De,name:be}),an={title:se.meta.title,component:ve,id:se.meta.did};Je.length>0?(an.items=Je,an.link=void 0):an.link=D,te.push(an)}}return te}return{navigationList:L($),components:W}}function A($){const W=(0,c.default)($).filter(L=>L.id);return w(W,(L,E)=>{if(L.items&&L.items.length){for(let O=L.items.length-1;O>=0;O--)L.items[O].id||L.items.splice(O,1);L.items.length===0&&L.component&&(L.link=L.link||D)}E&&(L.parent=E.id,L.id=[E.id,L.id].join(_)),L.from=L.from||"yaml",L.visible=L.visible??!0},{key:"items"}),W}function G($,W=2){const L=(0,c.default)($),E=N(L,{depth:W,transform:(O,U)=>(U&&(O._parent||(O._parent=U.id,U.component||(O.link=k(U.link,O.link))),O.section=O.section||U.section||[b],O.visible=O.visible??U.visible,U.role&&(O.role=O.role||U.role)),O.component=[U.component,O.component].filter(Boolean).join("."),O)});return w(E,O=>{O.items&&O.items.length>0&&O.items.reduceRight((U,te)=>{if(te._parent){const ae=O.items.findIndex(de=>de.id===te._parent);ae>=0&&O.items.splice(ae,1),delete te._parent}return null},null)},{key:"items"}),E}function q($,W){return W&&Array.isArray($.items)?$.items.filter(L=>(0,a.default)(L.section)?P($.section,W):!!P(L.section,W)).map(L=>({...L,section:W})):[]}function J($){const W=(0,c.default)($),L=[];for(const E of W){let te=function(ae,de){const pe=q(ae,de);U.push({...O,section:de,items:pe})};const O=(0,c.default)((0,s.default)(E,["items"])),U=[];if(Array.isArray(E.section))for(const ae of E.section)te(E,ae);else if(E.section){const{section:ae}=E;te(E,ae)}else if(E.items&&E.items.length>0){const ae=E.items.reduce((pe,Ce)=>{const{section:Me=[b]}=Ce||{};return pe.push(...Me),pe},[]),de=[...new Set(ae)];for(const pe of de)te(E,pe)}else U.push({...E,section:b});L.push(...U)}return L}function Q($=[]){const W=(0,c.default)($);return W.reduceRight((L,E,O)=>{if(E.parent){const U=W.find(te=>E.section&&te.section?te.section===E.section&&te.id===E.parent:te.id===E.parent);U&&(U.items||(U.items=[]),U.items=[E,...U.items]),W.splice(O,1)}return null},null),W}function X($,W=[]){const L=Q($);return w(L,O=>{if(O?.component&&(W.some(U=>U.name===O.component)||(O.visible=!1)),O.items&&O.items.length)for(let U=O.items.length-1;U>=0;U--)O.items[U].visible===!1&&O.items.splice(U,1)},{key:"items"}),L.filter(O=>!(O.visible===!1||O.items&&Array.isArray(O.items)&&O.items.length>0&&O.items?.every(U=>U.visible===!1)))}function ee($){return $.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const V=$=>{const[W,L]=(0,v.default)($,E=>E.id==="/team");return[...W,...L]};e.sortRootNavigation=V;const re=$=>{const[,W]=(0,v.default)($,L=>{const E=typeof L.title=="string"?L.title:L.title?.en;return L.id==="/team"&&E==="Access"||L.id==="/dashboard"&&E==="Blocklet"});return W};e.cleanOldNavigationHistory=re;function ie($={},W={}){const{beforeProcess:L=se=>se}=W,{navigationList:E,components:O}=z($),U=new Map;E.forEach(se=>{se.items?.forEach(ve=>{U.set((0,u.joinURL)(se.id,ve.id),ve)})});const te=(0,l.default)($,"settings.org.enabled",!1);$?.settings?.navigations&&(Array.isArray($.settings.navigations)?$.settings.navigations=[...$.settings.navigations].filter(se=>!(se?.parent==="/team"&&se.from==="team-tmpl")).map(se=>{if(se.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(se,"private")){const ve=U.get(se.id);ve&&Object.prototype.hasOwnProperty.call(ve,"private")&&(se.private=ve.private)}return!te&&se.section==="userCenter"&&se.id==="/userCenter/orgs"?null:se}).filter(Boolean):$.settings.navigations=[]);const ae=R(re($?.settings?.navigations||[])).map(H),de=G(L(E)),pe=A(de),Me=J(pe).reduce((se,ve)=>["bottom","social","sessionManager","userCenter"].includes(ve.section)&&ve.items&&ve.items.length>0?(se.push(...ve.items.map(gr=>{const{section:li}=ve,si=k(ve.link,gr.link),at=[ve.component,gr.component].filter(Boolean).join(".");return{...gr,section:li,link:si,component:at,parent:""}})),se):(se.push(ve),se),[]),be=N(Me,{transform(se,ve){let{component:ot}=se;return ve?.component&&(ot=[ve.component,se.component].filter(Boolean).join(".")),H({...se,component:ot})}});return{navigationList:(0,t.default)(ae,be,(se,ve)=>{const ot=["id","section"];return(0,i.default)((0,o.default)(se,ot),(0,o.default)(ve,ot))}),components:O,builtinList:be}}}(mr)),mr}var ke=ug();const Lc=I.createContext(null),Va="/",dg="header",Ka={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Be(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Be(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled}]};function di(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const st=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Be(xe.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),fg=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),pg=(e,r)=>{const n=ke.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(fg("/team",e("navigation.blockletService"),[st("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),st("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),st("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),st("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),st("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),st("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),st("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),st("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ya({name:e}){return g.jsx(bp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function hg({children:e}){const{blocklet:r,actions:n}=Ft(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=ke.parseNavigation(r,{beforeProcess(w){const P=Xe(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Ka,S)&&Ka[S].forEach(R=>{(R.shouldDisplay&&typeof R.shouldDisplay=="function"?R.shouldDisplay:()=>!0)(r)&&!P.some(k=>k.id===R.id)&&P.push(R)})}),pg(t,P)}}),l=zt({rawNavigation:Xe(i),activeSection:dg,components:o}),s=I.useMemo(()=>ke.nestNavigationList(Xe(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const w=ke.filterNavigation(Xe(l.rawNavigation),o);return ke.joinLink(w,o)},[o,l.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const P=ke.flattenNavigation(ke.joinLink(s,o)),S=P.find(R=>R.id===w.id);if(S?.component){if(!o.some(R=>R.name===S.component))return g.jsx(Ya,{name:S.component})}else if(S.parent){const R=P.find(T=>T.id===S.parent);if(R?.component&&!o.some(T=>T.name===R.component))return g.jsx(Ya,{name:R.component})}return S?.link},[s,o]),d=I.useCallback(w=>{l.activeSection=w},[l]),f=I.useCallback(w=>{const P=[];ke.deepWalk(w,(R,T)=>{const k={...Et(R,["children","expand"]),parent:T?.id};P.push(k)});const S=Xe(l.rawNavigation).filter(R=>{if(!l.activeSection)return!1;const T=P.find(k=>di(k,R));return T?!ke.isMatchSection(T.section,l.activeSection):!0});l.rawNavigation=[...S,...P]},[l]),p=I.useCallback((w=[])=>{const P=Xe(l.rawNavigation).map(S=>{const R=w.find(T=>di({...T,section:l.activeSection},S));return R?{...S,...R}:S});l.rawNavigation=P},[l]),h=I.useCallback((w,P=Va)=>w.map(R=>{const k=o.find(H=>H.name===R.component)?.link||P,F=R.items||[],{link:N}=R;return{title:R.title,description:R.description,subtitle:u(R),link:N,icon:R.icon,children:h(F,N||Va),section:R.section,visible:R.visible,parent:R.parent,component:R.component,id:R.id,role:R.role,from:R.from,__base:k}}),[o,u]),v=I.useCallback(w=>{p([w])},[p]),m=I.useCallback(w=>{const P=l.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);l.rawNavigation=Xe(l.rawNavigation).filter(S=>!P.includes(S.id))},[l]),y=I.useCallback((w={},P=-1)=>{const S={...w,id:vp.nanoid(),section:l.activeSection,visible:!0},R=[...l.rawNavigation],T=R.filter(k=>k.section===l.activeSection);if(P<0||P>T.length-1)R.push(S);else{const k=T[P],F=R.findIndex(N=>di(N,k));R.splice(F,0,S)}return l.rawNavigation=R,S},[l]),b=I.useCallback(w=>{const S=Xe(s).filter(R=>ke.isMatchSection(R.section,w));return h(S)},[s,h]),C=I.useCallback(async w=>{const S=w.map(R=>mp(R,yp)).map(R=>{const T={...R};return T.role&&Array.isArray(T.role)&&(T.role=JSON.stringify(T.role)),T.section&&Array.isArray(T.section)&&(T.section=JSON.stringify(T.section)),T.title&&T.title instanceof Object&&(T.title=JSON.stringify(T.title)),T.description&&T.description instanceof Object&&(T.description=JSON.stringify(T.description)),T.link&&T.link instanceof Object&&(T.link=JSON.stringify(T.link)),T});await n.configNavigations(S)},[n]),D=I.useCallback(async w=>{if(w){const P=a.filter(R=>ke.isMatchSection(R.section,w)),S=l.rawNavigation.filter(R=>!ke.isMatchSection(R.section,w));await C(S),l.rawNavigation=[...S,...P]}else await C([]),l.rawNavigation=Xe(a)},[C,l,a]),_=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:d,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:f,getNavigation:b,saveNavigationList:C,resetNavigation:D}),[l,c,o,u,d,v,m,y,f,b,C,D]);return g.jsx(Lc.Provider,{value:_,children:e})}function zc(){const e=I.useContext(Lc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},fi,Ja;function gg(){if(Ja)return fi;Ja=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Rr=="object"&&Rr&&Rr.Object===Object&&Rr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),d=Object.prototype,f=d.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,P,S){var R,T,k,F,N,H,z=0,A=!1,G=!1,q=!0;if(typeof w!="function")throw new TypeError(e);P=_(P)||0,b(S)&&(A=!!S.leading,G="maxWait"in S,k=G?p(_(S.maxWait)||0,P):k,q="trailing"in S?!!S.trailing:q);function J(L){var E=R,O=T;return R=T=void 0,z=L,F=w.apply(O,E),F}function Q(L){return z=L,N=setTimeout(V,P),A?J(L):F}function X(L){var E=L-H,O=L-z,U=P-E;return G?h(U,k-O):U}function ee(L){var E=L-H,O=L-z;return H===void 0||E>=P||E<0||G&&O>=k}function V(){var L=v();if(ee(L))return re(L);N=setTimeout(V,X(L))}function re(L){return N=void 0,q&&R?J(L):(R=T=void 0,F)}function ie(){N!==void 0&&clearTimeout(N),z=0,R=H=T=N=void 0}function $(){return N===void 0?F:re(v())}function W(){var L=v(),E=ee(L);if(R=arguments,T=this,H=L,E){if(N===void 0)return Q(H);if(G)return N=setTimeout(V,P),J(H)}return N===void 0&&(N=setTimeout(V,P)),F}return W.cancel=ie,W.flush=$,W}function y(w,P,S){var R=!0,T=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(R="leading"in S?!!S.leading:R,T="trailing"in S?!!S.trailing:T),m(w,P,{leading:R,maxWait:P,trailing:T})}function b(w){var P=typeof w;return!!w&&(P=="object"||P=="function")}function C(w){return!!w&&typeof w=="object"}function D(w){return typeof w=="symbol"||C(w)&&f.call(w)==n}function _(w){if(typeof w=="number")return w;if(D(w))return r;if(b(w)){var P=typeof w.valueOf=="function"?w.valueOf():w;w=b(P)?P+"":P}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?l(w.slice(2),S?2:8):i.test(w)?r:+w}return fi=y,fi}var br={exports:{}},Tt={exports:{}},vg=Tt.exports,Xa;function mg(){return Xa||(Xa=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Tt.exports=function(){return performance.now()}:typeof vr<"u"&&vr!==null&&vr.hrtime?(Tt.exports=function(){return(e()-i)/1e6},r=vr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=vr.uptime()*1e9,i=t-o):Date.now?(Tt.exports=function(){return Date.now()-n},n=Date.now()):(Tt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(vg)),Tt.exports}var Qa;function bg(){if(Qa)return br.exports;Qa=1;for(var e=mg(),r=typeof window>"u"?Rr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var l=0,s=0,c=[],u=1e3/60;i=function(d){if(c.length===0){var f=e(),p=Math.max(0,u-(f-l));l=p+f,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++s,callback:d,cancelled:!1}),s},o=function(d){for(var f=0;f<c.length;f++)c[f].handle===d&&(c[f].cancelled=!0)}}return br.exports=function(d){return i.call(r,d)},br.exports.cancel=function(){o.apply(r,arguments)},br.exports.polyfill=function(d){d||(d=r),d.requestAnimationFrame=i,d.cancelAnimationFrame=o},br.exports}var ln={},Za;function yg(){if(Za)return ln;Za=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return ln}var $t={},el;function xg(){if(el)return $t;el=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.noop=e,$t.intBetween=r,$t.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return $t}var tl;function Sg(){if(tl)return Ke;tl=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=R,Ke.createVerticalStrength=T,Ke.createScrollingComponent=N,Ke.default=H,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(cc()),r=c(uc()),n=xp(),t=c(gg()),i=c(bg()),o=c(yg()),a=xh,l=c(Sp()),s=xg();function c(z){return z&&z.__esModule?z:{default:z}}function u(z){if(z&&z.__esModule)return z;var A={};if(z!=null){for(var G in z)if(Object.prototype.hasOwnProperty.call(z,G)){var q=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(z,G):{};q.get||q.set?Object.defineProperty(A,G,q):A[G]=z[G]}}return A.default=z,A}function d(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(G){return typeof G}:d=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},d(z)}function f(){return f=Object.assign||function(z){for(var A=1;A<arguments.length;A++){var G=arguments[A];for(var q in G)Object.prototype.hasOwnProperty.call(G,q)&&(z[q]=G[q])}return z},f.apply(this,arguments)}function p(z,A){if(z==null)return{};var G=h(z,A),q,J;if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(z);for(J=0;J<Q.length;J++)q=Q[J],!(A.indexOf(q)>=0)&&Object.prototype.propertyIsEnumerable.call(z,q)&&(G[q]=z[q])}return G}function h(z,A){if(z==null)return{};var G={},q=Object.keys(z),J,Q;for(Q=0;Q<q.length;Q++)J=q[Q],!(A.indexOf(J)>=0)&&(G[J]=z[J]);return G}function v(z,A){if(!(z instanceof A))throw new TypeError("Cannot call a class as a function")}function m(z,A){for(var G=0;G<A.length;G++){var q=A[G];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(z,q.key,q)}}function y(z,A,G){return A&&m(z.prototype,A),z}function b(z,A){return A&&(d(A)==="object"||typeof A=="function")?A:w(z)}function C(z){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},C(z)}function D(z,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(A&&A.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),A&&_(z,A)}function _(z,A){return _=Object.setPrototypeOf||function(q,J){return q.__proto__=J,q},_(z,A)}function w(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function P(z,A,G){return A in z?Object.defineProperty(z,A,{value:G,enumerable:!0,configurable:!0,writable:!0}):z[A]=G,z}var S=150;function R(z){return function(G,q){var J=G.x,Q=G.w,X=G.y,ee=G.h,V=Math.min(Q/2,z),re=q.x>=J&&q.x<=J+Q,ie=re&&q.y>=X&&q.y<=X+ee;if(ie){if(q.x<J+V)return(q.x-J-V)/V;if(q.x>J+Q-V)return-(J+Q-q.x-V)/V}return 0}}function T(z){return function(G,q){var J=G.y,Q=G.h,X=G.x,ee=G.w,V=Math.min(Q/2,z),re=q.y>=J&&q.y<=J+Q,ie=re&&q.x>=X&&q.x<=X+ee;if(ie){if(q.y<J+V)return(q.y-J-V)/V;if(q.y>J+Q-V)return-(J+Q-q.y-V)/V}return 0}}var k=R(S);Ke.defaultHorizontalStrength=k;var F=T(S);Ke.defaultVerticalStrength=F;function N(z){var A=function(G){D(q,G);function q(J,Q){var X;return v(this,q),X=b(this,C(q).call(this,J,Q)),P(w(w(X)),"updateScrolling",(0,t.default)(function(ee){var V=X.container.getBoundingClientRect(),re=V.left,ie=V.top,$=V.width,W=V.height,L={x:re,y:ie,w:$,h:W},E=(0,s.getCoords)(ee),O=X.props,U=O.horizontalStrength,te=O.verticalStrength;X.scaleX=U(L,E),X.scaleY=te(L,E),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),P(w(w(X)),"handleEvent",function(ee){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(ee))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(q,[{key:"componentDidMount",value:function(){var Q=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return Q.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var Q=this.props.dragDropManager,X=Q.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var Q=this,X=0,ee=function V(){var re=Q.scaleX,ie=Q.scaleY,$=Q.container,W=Q.props,L=W.strengthMultiplier,E=W.onScrollChange;if(L===0||re+ie===0){Q.stopScrolling();return}if(X+=1,X%2){var O=$.scrollLeft,U=$.scrollTop,te=$.scrollWidth,ae=$.scrollHeight,de=$.clientWidth,pe=$.clientHeight,Ce=re?$.scrollLeft=(0,s.intBetween)(0,te-de,O+re*L):O,Me=ie?$.scrollTop=(0,s.intBetween)(0,ae-pe,U+ie*L):U;E(Ce,Me)}Q.frame=(0,i.default)(V)};ee()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var Q=this.props;Q.strengthMultiplier,Q.verticalStrength,Q.horizontalStrength,Q.onScrollChange;var X=p(Q,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(z,f({ref:this.wrappedInstance},X))}}]),q}(e.Component);return P(A,"displayName","Scrolling(".concat((0,o.default)(z),")")),P(A,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),P(A,"defaultProps",{onScrollChange:s.noop,verticalStrength:F,horizontalStrength:k,strengthMultiplier:30}),(0,l.default)(A,z)}function H(z){var A=N(z);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(q){var J=q.dragDropManager;return J===void 0?null:e.default.createElement(A,f({},G,{dragDropManager:J}))})}}return Ke}var bn=Sg();const wg=$n(bn);var Cg=Sh();const rl=$n(Cg);function jc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Fc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Bc(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}jc.__suppressDeprecationWarning=!0;Fc.__suppressDeprecationWarning=!0;Bc.__suppressDeprecationWarning=!0;function Jr(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
3
3
 
4
4
  `+o+" uses "+a+" but also contains the following legacy lifecycles:"+(n!==null?`
5
5
  `+n:"")+(t!==null?`
@@ -40,7 +40,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
40
40
  *
41
41
  * @license MIT
42
42
  * @version 1.0.8
43
- */const Bu=Object.freeze({left:0,top:0,width:16,height:16}),En=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tn=Object.freeze({...Bu,...En}),ao=Object.freeze({...tn,body:"",hidden:!1}),ly=Object.freeze({width:null,height:null}),Gu=Object.freeze({...ly,...En});function sy(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function t(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:t(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?t(o):0)}}return r}const cy=/[\s,]+/;function uy(e,r){r.split(cy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const $u={...Gu,preserveAspectRatio:""};function rs(e){const r={...$u},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=sy(n("rotate","")),uy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function dy(e,r){for(const n in $u)if(e[n]!==r[n])return!0;return!1}const Ar=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!Sn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Sn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!Sn(l,n)?null:l}return null},Sn=(e,r)=>e?!!((e.provider===""||e.provider.match(Ar))&&(r&&e.prefix===""||e.prefix.match(Ar))&&e.name.match(Ar)):!1;function fy(e,r){const n={};!e.hFlip!=!r.hFlip&&(n.hFlip=!0),!e.vFlip!=!r.vFlip&&(n.vFlip=!0);const t=((e.rotate||0)+(r.rotate||0))%4;return t&&(n.rotate=t),n}function ns(e,r){const n=fy(e,r);for(const t in ao)t in En?t in e&&!(t in n)&&(n[t]=En[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function py(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function hy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=ns(t[l]||i[l],o)}return a(r),n.forEach(a),ns(e,o)}function Wu(e,r){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{r(i,null),n.push(i)});const t=py(e);for(const i in t){const o=t[i];o&&(r(i,hy(e,i,o)),n.push(i))}return n}const gy={provider:"",aliases:{},not_found:{},...Bu};function _i(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Hu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!_i(e,gy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Ar)||typeof o.body!="string"||!_i(o,ao))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Ar)||typeof a!="string"||!n[a]&&!t[a]||!_i(o,ao))return null}return r}const Nn=Object.create(null);function vy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function St(e,r){const n=Nn[e]||(Nn[e]=Object.create(null));return n[r]||(n[r]=vy(e,r))}function Yo(e,r){return Hu(r)?Wu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function my(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function by(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Nn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Nn[i]||{})).forEach(a=>{const l=St(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let $r=!1;function Uu(e){return typeof e=="boolean"&&($r=e),$r}function Wr(e){const r=typeof e=="string"?rn(e,!0,$r):e;if(r){const n=St(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function qu(e,r){const n=rn(e,!0,$r);if(!n)return!1;const t=St(n.provider,n.prefix);return my(t,n.name,r)}function is(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),$r&&!r&&!e.prefix){let i=!1;return Hu(e)&&(e.prefix="",Wu(e,(o,a)=>{a&&qu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Sn({provider:r,prefix:n,name:"a"}))return!1;const t=St(r,n);return!!Yo(t,e)}function yy(e){return!!Wr(e)}function xy(e){const r=Wr(e);return r?{...tn,...r}:null}function Sy(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=St(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const d={provider:o,prefix:a,name:l};u.push(d)}),r}function Vu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function wy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Vu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Cy=0;function Iy(e,r,n){const t=Cy++,i=Vu.bind(null,n,t);if(!r.pending.length)return i;const o={id:t,icons:r,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}const lo=Object.create(null);function os(e,r){lo[e]=r}function so(e){return lo[e]||lo[""]}function Ry(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?rn(i,r,n):i;o&&t.push(o)}),t}var Ty={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Dy(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let w=e.resources.slice(0);for(a=[];w.length>1;){const P=Math.floor(Math.random()*w.length);a.push(w[P]),w=w.slice(0,P).concat(w.slice(P+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,d=null,f=[],p=[];typeof t=="function"&&p.push(t);function h(){d&&(clearTimeout(d),d=null)}function v(){s==="pending"&&(s="aborted"),h(),f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function m(w,P){P&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:f.length,subscribe:m,abort:v}}function b(){s="failed",p.forEach(w=>{w(void 0,u)})}function C(){f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function D(w,P,S){const R=P!=="success";switch(f=f.filter(T=>T!==w),s){case"pending":break;case"failed":if(R||!e.dataAfterTimeout)return;break;default:return}if(P==="abort"){u=S,b();return}if(R){u=S,f.length||(a.length?_():b());return}if(h(),C(),!e.random){const T=e.resources.indexOf(w.resource);T!==-1&&T!==e.index&&(e.index=T)}s="completed",p.forEach(T=>{T(S)})}function _(){if(s!=="pending")return;h();const w=a.shift();if(w===void 0){if(f.length){d=setTimeout(()=>{h(),s==="pending"&&(C(),b())},e.timeout);return}b();return}const P={status:"pending",resource:w,callback:(S,R)=>{D(P,S,R)}};f.push(P),c++,d=setTimeout(_,e.rotate),n(w,r,P.callback)}return setTimeout(_),y}function Ku(e){const r={...Ty,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=Dy(r,l,s,(d,f)=>{t(),c&&c(d,f)});return n.push(u),u}function o(l){return n.find(s=>l(s))||null}return{query:i,find:o,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:t}}function Jo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,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 Qn=Object.create(null),xr=["https://api.simplesvg.com","https://api.unisvg.com"],wn=[];for(;xr.length>0;)xr.length===1||Math.random()>.5?wn.push(xr.shift()):wn.push(xr.pop());Qn[""]=Jo({resources:["https://api.iconify.design"].concat(wn)});function as(e,r){const n=Jo(r);return n===null?!1:(Qn[e]=n,!0)}function Zn(e){return Qn[e]}function Py(){return Object.keys(Qn)}function ls(){}const ki=Object.create(null);function _y(e){if(!ki[e]){const r=Zn(e);if(!r)return;const n=Ku(r),t={config:r,redundancy:n};ki[e]=t}return ki[e]}function Yu(e,r,n){let t,i;if(typeof e=="string"){const o=so(e);if(!o)return n(void 0,424),ls;i=o.send;const a=_y(e);a&&(t=a.redundancy)}else{const o=Jo(e);if(o){t=Ku(o);const a=e.resources?e.resources[0]:"",l=so(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),ls):t.query(r,i,n)().abort}const ss="iconify2",Hr="iconify",Ju=Hr+"-count",cs=Hr+"-version",Xu=36e5,ky=168;function co(e,r){try{return e.getItem(r)}catch{}}function Xo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function us(e,r){try{e.removeItem(r)}catch{}}function uo(e,r){return Xo(e,Ju,r.toString())}function fo(e){return parseInt(co(e,Ju))||0}const At={local:!0,session:!0},Qu={local:new Set,session:new Set};let Qo=!1;function Oy(e){Qo=e}let dn=typeof window>"u"?{}:window;function Zu(e){const r=e+"Storage";try{if(dn&&dn[r]&&typeof dn[r].length=="number")return dn[r]}catch{}At[e]=!1}function ed(e,r){const n=Zu(e);if(!n)return;const t=co(n,cs);if(t!==ss){if(t){const l=fo(n);for(let s=0;s<l;s++)us(n,Hr+s.toString())}Xo(n,cs,ss),uo(n,0);return}const i=Math.floor(Date.now()/Xu)-ky,o=l=>{const s=Hr+l.toString(),c=co(n,s);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,l))return!0}catch{}us(n,s)}};let a=fo(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,uo(n,a)):Qu[e].add(l))}function td(){if(!Qo){Oy(!0);for(const e in At)ed(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=St(t,i);if(!Yo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Ey(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in At)ed(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function Ny(e,r){Qo||td();function n(t){let i;if(!At[t]||!(i=Zu(t)))return;const o=Qu[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=fo(i),!uo(i,a+1))return;const l={cached:Math.floor(Date.now()/Xu),provider:e.provider,data:r};return Xo(i,Hr+a.toString(),JSON.stringify(l))}r.lastModified&&!Ey(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function ds(){}function My(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,wy(e)}))}function Ay(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=so(n)))return;o.prepare(n,t,i).forEach(l=>{Yu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Yo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(d=>{u.delete(d)}),Ny(e,s)}catch(c){console.error(c)}My(e)})})}))}const Zo=(e,r)=>{const n=Ry(e,!0,Uu()),t=Sy(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,ds)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(St(c,u));const d=i[c]||(i[c]=Object.create(null));d[u]||(d[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:d}=s,f=St(c,u),p=f.pendingIcons||(f.pendingIcons=new Set);p.has(d)||(p.add(d),i[c][u].push(d))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&Ay(s,i[c][u])}),r?Iy(r,t,o):ds},Ly=e=>new Promise((r,n)=>{const t=typeof e=="string"?rn(e,!0):e;if(!t){n(e);return}Zo([t||e],i=>{if(i.length&&t){const o=Wr(t);if(o){r({...tn,...o});return}}n(e)})});function zy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function jy(e,r){const n=typeof e=="string"?rn(e,!0,!0):null;if(!n){const o=zy(e);return{value:e,data:o}}const t=Wr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=Zo([n],()=>r(e,n,Wr(n)));return{value:e,name:n,loading:i}}function Oi(e){return e.hasAttribute("inline")}let rd=!1;try{rd=navigator.vendor.indexOf("Apple")===0}catch{}function Fy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(rd||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const By=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Gy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function po(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const t=e.split(By);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Gy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const $y=e=>e==="unset"||e==="undefined"||e==="none";function nd(e,r){const n={...tn,...e},t={...Gu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,d;a===null?(d=l===null?"1em":l==="auto"?c:l,u=po(d,s/c)):(u=a==="auto"?s:a,d=l===null?po(u,c/s):l==="auto"?c:l);const f={},p=(h,v)=>{$y(v)||(f[h]=v.toString())};return p("width",u),p("height",d),f.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:f,body:o}}const Wy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Mn=Wy();function Hy(e){Mn=e}function Uy(){return Mn}function qy(e,r){const n=Zn(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function Vy(e){return e===404}const Ky=(e,r,n)=>{const t=[],i=qy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function Yy(e){if(typeof e=="string"){const r=Zn(e);if(r)return r.path}return"/"}const Jy=(e,r,n)=>{if(!Mn){n("abort",424);return}let t=Yy(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Mn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Vy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Xy={prepare:Ky,send:Jy};function fs(e,r){switch(e){case"local":case"session":At[e]=r;break;case"all":for(const n in At)At[n]=r;break}}const Ei="data-style";let id="";function Qy(e){id=e}function ps(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ei));n||(n=document.createElement("style"),n.setAttribute(Ei,Ei),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+id}function od(){os("",Xy),Uu(!0);let e;try{e=window}catch{}if(e){if(td(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!is(i))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const t in n){const i="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;as(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>fs(n,!0),disableCache:n=>fs(n,!1),iconExists:yy,getIcon:xy,listIcons:by,addIcon:qu,addCollection:is,calculateSize:po,buildIcon:nd,loadIcons:Zo,loadIcon:Ly,addAPIProvider:as,appendCustomStyle:Qy,_api:{getAPIConfig:Zn,setAPIModule:os,sendAPIQuery:Yu,setFetch:Hy,getFetch:Uy,listAPIProviders:Py}}}function ad(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Zy(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ex(e){return"data:image/svg+xml,"+Zy(e)}function tx(e){return'url("'+ex(e)+'")'}const ho={"background-color":"currentColor"},ld={"background-color":"transparent"},hs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},gs={"-webkit-mask":ho,mask:ho,background:ld};for(const e in gs){const r=gs[e];for(const n in hs)r[e+"-"+n]=hs[n]}function vs(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function rx(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=ad(i,{...o,width:r.width+"",height:r.height+""}),l=tx(a),s=t.style,c={"--svg":l,width:vs(o.width),height:vs(o.height),...n?ho:ld};for(const u in c)s.setProperty(u,c[u]);return t}let Lr;function nx(){try{Lr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Lr=null}}function ix(e){return Lr===void 0&&nx(),Lr?Lr.createHTML(e):e}function ox(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=ad(e.body,n);return r.innerHTML=ix(i),r.firstChild}function ms(e,r){const n=r.icon.data,t=r.customisations,i=nd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=ox(i);break;default:a=rx(i,{...tn,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function bs(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function ax(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Oi(this);ps(l,s),this._state=bs({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Oi(this),c=this._state;s!==c.inline&&(c.inline=s,ps(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Oi(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}ms(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=rs(this);(l.attrMode!==c||dy(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=jy(l,(c,u,d)=>{const f=this._state;if(f.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:d};p.data?this._gotIconData(p):f.icon=p});s.data?this._gotIconData(s):this._state=bs(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,rs(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=Fy(l.data.body,c),d=this._state.inline;ms(this._shadowRoot,this._state={rendered:!0,icon:l,inline:d,customisations:s,attrMode:c,renderedMode:u})}};i.forEach(l=>{l in o.prototype||Object.defineProperty(o.prototype,l,{get:function(){return this.getAttribute(l)},set:function(s){s!==null?this.setAttribute(l,s):this.removeAttribute(l)}})});const a=od();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const lx=ax()||od(),{enableCache:ST,disableCache:wT,iconExists:CT,getIcon:IT,listIcons:RT,addIcon:TT,addCollection:DT,calculateSize:PT,buildIcon:_T,loadIcons:kT,loadIcon:OT,addAPIProvider:ET,_api:NT}=lx,Gt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Gt(t[n],r,n)}):r(t)),sd=(e,r="children")=>{const n=[];return Gt(e,t=>n.push(t),r),n},ea=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ea(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),cd=e=>/^https?:\/\//.test(e),ud=e=>/^mailto:/i.test(e.trim()),sx=e=>{if(!e||!e?.startsWith("/"))return!1;const r=i=>i.endsWith("/")?i:`${i}/`,n=r(window.location.pathname),t=r(new URL(e,window.location.origin).pathname);return n.startsWith(t)},dd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>sx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},cx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,d=0;const f=s*.2,p=h=>d>s-f&&u<n-1&&d+h>s+f;return e.forEach(h=>{const v=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,d=0,c[u]=[]),!t&&d>0&&p(v)&&(u++,d=0,c[u]=[]),c[u].push({...h,group:!0}),d+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,d=0,c[u]=[]),c[u].push({...m,group:!1}),d+=o})}),c};function Qe({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=I.useState(!1),[l,s]=I.useState(!0);if(To(async()=>{s(!0);try{await Do(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),cd(e))return g.jsx(er,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?g.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(er,{component:"span",...t,sx:i,children:g.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(er,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function ta(e=["en","zh"]){const{blocklet:r}=Ft();return I.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>ft.SUPPORTED_LANGUAGES[c]),l=a.reduce((c,u)=>(c[u]=ft.SUPPORTED_LANGUAGES[u].nativeName,c),{}),s=a.map(c=>({code:c,name:ft.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:l,defaultLocale:o,languages:s}},[r.environments,e])}const ux=e=>e.from!=="team-tmpl";function dx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Cp(e.slice(0,t-1),r.slice(0,i-1)))}function fd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=Ft(),{defaultLocale:t}=ta(),i=n.environments.find(l=>l.key===ft.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=le(l=>{if(l?.startsWith("/"))try{return new URL(l,i?.value).href}catch{console.error("Failed to parse url",{url:l,origin:i?.value})}return l});function a(){const{title:l,subtitle:s}=e;let c=l,u=s;return Yt(l)&&(c=l[r]||l[t]||l.en),!I.isValidElement(s)&&Yt(s)&&(u=s[r]||s[t]||s.en),g.jsxs(oe,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:c}),s&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(Po(o(e.icon))?g.jsx(Qe,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}fd.propTypes={treeNode:x.object.isRequired};const fx=it(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function pd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(fx,{children:g.jsx(Ih,{backend:Rh,...i,children:g.jsx(tm,{generateNodeProps:o=>{const a=ux(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(ye,{icon:"ic:round-drag-indicator"}):g.jsx(oe,{sx:{width:16,height:16}}),title:g.jsx(fd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:dx,theme:ay})})})}pd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var px=sc();const hx=$n(px);function hd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:l=()=>{}}){const{t:s}=Ee(),c=I.useRef(),[u,d]=I.useState(null),f=zt({localeList:[],inputLocale:"",localeError:""}),p=I.useMemo(()=>!!u,[u]),h=I.useMemo(()=>o.includes(i)?i:t,[o,i]),v=I.useMemo(()=>f.localeList.filter(S=>!!a[S]),[f.localeList,a]),m=I.useMemo(()=>Object.keys(Et(a,[...f.localeList,t])).map(S=>({title:a[S],value:S})),[f.localeList]),y=I.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=le(S=>S?S===t||f.localeList.includes(S)?s("navigation.form.localeExists",{value:S}):!0:s("common.requiredErrorText",{name:"Locale"})),C=le((S="")=>{const R=S?.trim(),T=b(R);return T!==!0?f.localeError=T:f.localeError="",T}),D=le(()=>{d(null),f.inputLocale="",f.localeError=""}),_=le(()=>{const S=f.inputLocale?.trim();C(S)===!0&&(D(),f.localeList.push(S),r(S))}),w=le((S,R)=>{S.preventDefault(),S.stopPropagation(),f.localeList=Ac(f.localeList,R),l(R)}),P=le(S=>{const{value:R}=S.target;C(R),f.inputLocale=R});return I.useEffect(()=>{f.localeList=[...o]},[o,f]),yh("enter",()=>{setTimeout(()=>{_()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(zh,{sx:e,value:h,onChange:(S,R)=>{n(R)},children:[g.jsx($a,{label:y,value:t}),v.map(S=>g.jsx($a,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(Ne,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:R=>{w(R,S)},children:g.jsx(ye,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(Ne,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{d(S.currentTarget)},children:g.jsx(ye,{icon:"mdi:plus"})})]}),g.jsx(Hi,{open:p,anchorEl:u,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(oe,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:s("navigation.form.localePlaceholder")}),g.jsx(oe,{sx:{mt:1},children:g.jsx(Vi,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:m,onChange:P,error:!!f.localeError,helperText:f.localeError||" "})}),g.jsx(oe,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(yt,{size:"small",variant:"contained",onClick:_,children:s("common.confirm")})})]})})]})}hd.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const ra=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function gd(e,r,n=5e3){for(const t of ra){const i=Be(t,e);try{return await Fh.get(i,{params:r,timeout:n})}catch(o){console.warn(`Failed to fetch from ${i}:`,o)}}throw new Error(`All icon API endpoints ${e} failed`)}async function gx({keyword:e,limit:r=999,start:n=0,palette:t=!1}){let i="",o=e;e.includes(":")&&([i,o]=e.split(":"));const{data:a}=await gd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const fn=new Map;async function vx(e){if(fn.has(e))return fn.get(e);const r=(async()=>{const{data:n}=await gd("/collection",{prefix:e}),t=new Set;return n.uncategorized?.forEach(i=>t.add(`${e}:${i}`)),Object.values(n.categories??{}).forEach(i=>{i.forEach(o=>t.add(`${e}:${o}`))}),Array.from(t)})();fn.set(e,r);try{return await r}catch(n){throw fn.delete(e),n}}function mx(e){return Be(ra[0],`${e}.svg`)}function bx(e){try{const r=new URL(e);for(const n of ra)if(r.origin===n)return Ip(r.pathname).replace(".svg","");return""}catch{return""}}function yx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Po(e)&&(n=bx(e))),{isIconId:r,iconId:n}}const xx=I.lazy(()=>Pp(()=>import("./index-BFWeWgZE.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),ys=Ve(Qe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function vd({icon:e,...r}){const[n,t]=I.useState(!1);return To(async()=>{t(!1),await Do(e),t(!0)},[e]),e?n?g.jsx(ye,{icon:e,...r}):g.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}vd.propTypes={icon:x.string.isRequired};function go({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=dc(),{blocklet:u}=Ft(),d=Hn(ee=>ee.breakpoints.down("md")),f=u.environments.find(ee=>ee.key===ft.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Ee(),{isIconId:C,iconId:D}=yx(e),[_,w]=I.useState(null),{onChange:P,onBlur:S,sx:R,...T}=a,k=i.includes("upload"),F=i.includes("select"),N=Be(s,"/api/media/upload",u.appPid),H=zt({showPopover:!1}),z=le(ee=>{if(ee?.startsWith("/"))try{const V=c?window.location.origin:f?.value;return new URL(ee,V).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[f?.value,c]),A=le(async ee=>await h.current.getUploader().uploadFile(ee)),G=le(()=>{w(null)}),q=le(()=>{F&&w(m.current)}),J=le(async ee=>{try{if(o==="url"){const V=mx(ee),re=await Rp(V,{width:128,height:128}),ie=await Tp(re,ee);await A(ie)}else P?.(ee)}catch(V){console.error("Failed to pick icon:",V)}G()}),Q=le(ee=>{ee.stopPropagation(),v.current.open(),G()}),X=le(ee=>{a?.onChange?.(ee.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(nt,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...R},onClick:F?q:void 0,...T,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Rn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(ys,{size:28,icon:z(e),alt:"Error"})}),endAdornment:g.jsxs(Rn,{position:"end",children:[g.jsx(Ne,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),P("")},children:g.jsx(Nc,{style:{fontSize:18}})}),k&&g.jsx(Dp,{title:y("common.upload"),children:g.jsx(Ne,{disableFocusRipple:!1,disableRipple:!1,onClick:Q,children:g.jsx(vd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),F&&g.jsx(oe,{component:jh,sx:{mr:"-6px",fontSize:24,transform:_?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),F&&g.jsx(Hi,{open:!!_,anchorEl:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...d&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:G,children:g.jsx(md,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(vo,{ref:h,locale:b,apiPath:N,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(vo,{ref:v,locale:b,apiPath:N,headers:p,onUploadFinish:X}),g.jsx(Hi,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(ys,{size:120,icon:z(e),alt:"Error"})})]})}go.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function md({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[d,f]=I.useState(n),[p,h]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Ee(),D=96,_=le(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,R=(S-1)*D,T=S*D,k=m.current.slice(R,T);s(F=>[...F,...k]),y.current=S,b.current=T<m.current.length,u(!1)},300))}),w=le(S=>{m.current=S,y.current=1,b.current=S.length>D;const R=S.slice(0,D);s(R),h(S.length===0),b.current&&_()}),{run:P}=fc(async S=>{if(S){u(!0);try{const{icons:R}=await gx({keyword:S});w(R)}catch(R){console.error("Failed to search icons:",R),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:T,scrollHeight:k,clientHeight:F}=v.current;(T+F>=k-150||k<=F)&&_()},R=v.current;return R&&(R.addEventListener("scroll",S),S()),()=>{R&&R.removeEventListener("scroll",S)}},[_,c]),To(async()=>{if(d)P(d);else{u(!0);try{const S=await vx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[d,P,w]),g.jsxs(Sx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(nt,{label:C("navigation.form.searchIcons"),placeholder:C("navigation.form.searchIconsPlaceholder"),size:"small",value:d,sx:{flexGrow:1},autoFocus:!0,onChange:S=>f(S.target.value),slotProps:{input:{endAdornment:g.jsx(Ne,{sx:{visibility:d?"visible":"hidden"},onClick:()=>f(""),children:g.jsx(Nc,{style:{fontSize:18}})})}}}),g.jsx(yt,{onClick:o,children:C("common.cancel")})]}),g.jsxs(oe,{children:[l.length>0&&g.jsx(oe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(S=>g.jsx(wx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(ye,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(oe,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(pc,{size:20})})]})]})}md.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Sx=Ve(oe)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),wx=Ve(Ne,{shouldForwardProp:e=>e!=="$active"})(({$active:e,theme:r})=>({boxSizing:"content-box",backgroundColor:e?r.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:r.palette.action.hover}}));function vo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return g.jsx(I.Suspense,{children:g.jsx(xx,{locale:r,ref:e,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:i,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:t}})})}vo.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const xs=24,Ss=48,ws="add";x.string.isRequired;function na({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ec(),{t:l,locale:s}=Ee(),{localeMap:c,defaultLocale:u}=ta(),d=le(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),f=le(E=>Ac(Array.from(new Set(xe.NAVIGATION_I18N_FIELDS.flatMap(O=>Yt(E[O])?Object.keys(E[O]):[]))),u)),p=I.useRef(()=>{}),h=zt({isRoot:!0,type:ws,linkDisabled:!1,locale:u,formState:d(),get localeList(){return f(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=Ah({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{xe.NAVIGATION_I18N_FIELDS.forEach(E=>b(E,h.formState[E][h.locale]))},[b,h.locale]);const _=Lh({control:m}),w=_.component,P=_.title,S=_.description,R=_.link,T=_.parent;I.useEffect(()=>{h.formState.title[h.locale]=P},[P]),I.useEffect(()=>{h.formState.description[h.locale]=S},[S]),I.useEffect(()=>{h.formState.link[h.locale]=R},[R]),I.useEffect(()=>{i?.(_)},[_,i]);const k=I.useMemo(()=>t.find(O=>w?n.find(te=>te.name===w).did===O.id:O.id===T),[n,t,w,T]),F=I.useMemo(()=>{if(k?.component){const E=n.find(ae=>ae.name===k.component),{link:O}=E||{},U=Yt(O)?O[h.locale]:O;if(w)return ka(U);const te=Yt(k.link)?k.link[h.locale]:k.link;return ka(Be(U,te||"/"))}return null},[n,h.locale,k,w]),N=I.useMemo(()=>{const{component:E}=k||{},O=n.find(ae=>ae.name===E),{navigation:U=[]}=O||{};return ke.flattenNavigation(U,{transform(ae,de){return de?.section&&(ae.section=ae.section||de.section),ae}}).filter(ae=>ae.link).filter(ae=>ke.isMatchSection(ae.section,r)).map(ae=>({label:ae.link,title:ae.title[s]||ae.title}))},[k,n,r,s]),H=le(()=>{h.isRoot=!0,h.locale=u,h.type=ws,h.linkDisabled=!1,h.formState=d(),y(),C(),p.current=()=>{}}),z=le((E={})=>(h.localeList.length>0&&xe.NAVIGATION_I18N_FIELDS.forEach(O=>{eg(h.formState[O]).length>1&&(E[O]=h.formState[O])}),_o(E.role)&&(E.role=void 0),E)),A=le(({parent:E}={},O=()=>{})=>{h.type="add",h.isRoot=!E,b("parent",E?.id),p.current=U=>{O(U)}}),G=le((E={},O=()=>{})=>{const{id:U,icon:te,parent:ae,component:de,role:pe=[]}=E;b("id",U),b("icon",te),E.from==="team-tmpl"&&(h.linkDisabled=!0);const Ce=f(E),Me=(be,De)=>{hc(be)?h.formState[De]=Ce.reduce((se,ve)=>(se[ve]=be,se),{[u]:be}):Yt(be)?h.formState[De]=Xe(be):h.formState[De]={}};xe.NAVIGATION_I18N_FIELDS.forEach(be=>Me(E[be],be)),xe.NAVIGATION_I18N_FIELDS.forEach(be=>b(be,h.formState[be][h.locale])),b("component",de),b("parent",ae),b("role",pe||[]),h.type="edit",h.isRoot=!ae,p.current=be=>{const De=_p(be,["id","title","description","icon","component","link","role"]);O(De)}}),q=le(E=>{const O=E?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>xs)return l("navigation.form.titleTooLong",{len:xs})}return!0}),J=le(E=>{const O=E?.trim();return O&&O.length>Ss?l("navigation.form.descriptionTooLong",{len:Ss}):!0}),Q=le(E=>E?.startsWith("/")?new URL(E,window.location.origin).href:E),X=le(async E=>{const O=E?.trim();if(O){if(Po(Q(O)))return!0;try{await Do(O)}catch{return l("navigation.form.invalidIcon")}}return!0}),ee=le(E=>{const O=E?.trim();return O?X(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}),V=le(E=>{const O=E?.trim();return O?ke.checkLink(O)?!0:l("navigation.form.invalidLink"):h.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}),re=le(E=>{h.locale=E,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][E]||(h.formState[O][E]="")}),setTimeout(()=>{C()})}),ie=le(()=>{const{title:E,link:O}=h.formState;if(r!=="bottomNavigation")for(const U of Object.keys(E)){const te=q(E[U]);if(te!==!0)return te}for(const U of Object.keys(O)){const te=V(O[U]);if(te!==!0)return te}return!0}),$=le(E=>{const O=ie();O===!0?p.current(z(E)):kt.error(O)}),W=le(E=>{h.locale=u,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O]=Et(h.formState[O],E)}),i?.(_)}),L=le(E=>{h.locale=E,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][E]=h.formState[O][u]}),i?.(_),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:A,edit:G,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v($)}),[A,H,G,v,$]),g.jsxs(oe,{...o,children:[g.jsx(hd,{sx:{mb:1},onAdd:L,onChange:re,onRemoveLocale:W,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:E})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...E})}),r==="bottomNavigation"?g.jsx(lt,{name:"icon",control:m,rules:{validate:ee},render:({field:E})=>g.jsx(go,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...E})}):g.jsx(lt,{name:"icon",control:m,rules:{validate:X},render:({field:E})=>g.jsx(go,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,...E})}),h.isRoot&&g.jsx(lt,{name:"component",control:m,render:({field:E})=>g.jsx(Vi,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&E.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Et(E,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(lt,{name:"description",control:m,rules:{validate:J},render:({field:E})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...E})}),g.jsx(lt,{name:"link",control:m,rules:{validate:V},render:({field:E})=>g.jsx(gc,{fullWidth:!0,margin:"dense",children:g.jsx(Bh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:O=>O.label,options:N,renderInput:O=>g.jsx(nt,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:F?g.jsx(Rn,{position:"start",sx:{textDecoration:hx(R||"")?"line-through":""},children:F}):null}}}),renderOption:(O,U)=>g.jsxs(oe,{component:"li",...O,children:[U.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:U.title})]}),margin:"dense",...E,onChange:()=>{},onInputChange:(O,U)=>{E.onChange(U)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(lt,{name:"role",control:m,render:({field:E})=>g.jsx(Vi,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Et(E,"ref")})}),r==="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:E})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...E})})]})]})}na.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:l}]=Nh(),[s,c]=I.useState("add"),u=I.useRef(null),d=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),f=I.useCallback(()=>{l(),u.current?.reset()},[l]),p=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(f,y)),a()},[a,f]),h=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(f,y)),a()},[a,f]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:f}),[p,h,f]),g.jsx(vc,{open:o,title:d,keepMounted:!0,onClose:f,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Tn,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(na,{ref:u,section:r,components:n,rawNavigations:t})})}ia.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function bd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Ee(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const d=I.useCallback(v=>{u(v),r(o)},[r,o]),f=I.useCallback(v=>{u(v),n(o)},[n,o]),p=I.useCallback(v=>{u(v),t(o)},[t,o]),h=I.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(Ne,{size:"small",color:"success",onClick:d,disabled:c,children:g.jsx(ye,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(Ne,{size:"small",color:"primary",onClick:f,disabled:c||o.from==="team-tmpl",children:g.jsx(ye,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:g.jsx(Ne,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(ye,{icon:"mdi:eye-off-outline"}):g.jsx(ye,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(Ne,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:g.jsx(ye,{icon:"mdi:delete"})})})]})}bd.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Cn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Cx=e=>{const r={...e},n=e?.background;return typeof n=="string"?r.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(r.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),r},Ix=(e,r="en",n="en")=>{if(typeof e=="string"){if(cd(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(ud(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},rr=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Gt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:mc(o.items?.length?o.link:Ix(o.link,r,n),t),_rawLink:o.link}),"items")},Rx=e=>Gt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Tx=e=>{if(!e?.length)return null;const r=Rx(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return r.forEach(t=>{t.section?Array.isArray(t.section)?t.section.forEach(i=>{n[i]?.push(t)}):typeof t.section=="string"&&n[t.section]?.push(t):n.header.push(t)}),n},oa=e=>{if(!e)return null;const r={...e};return r.theme=Cx(r.theme),r.navigation=Tx(Dx(r.navigation)),r},Dx=(e=[])=>ea(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),yd=(e,r)=>ea(e,(n,t)=>{const i=!n.role||r&&(n.role.includes(r)||n.role.includes("guest"));return t.isLeaf?i:i&&t.filteredChildren?.length},"items"),Px={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},_x={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function kx({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),s=jt(),c=I.useRef(null),u=zt({open:!1}),d=le((p=!u.open)=>{u.open=p}),f=t==="hover"?{onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)}:{onClick:()=>d()};return l.length===0||!e?.user?null:g.jsxs(oe,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...f,children:[g.jsx(Ne,{size:"medium",ref:c,children:g.jsx(ye,{icon:Px,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(kp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Op,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),d(!1)},children:g.jsx(bc,{...p,timeout:350,children:g.jsxs(Or,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Ep,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:l.map(h=>g.jsx(Np,{disablePadding:!0,children:g.jsxs(Gh,{href:Oa(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(oe,{component:"img",src:`${yc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:h.icon||_x,color:s.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Oa(h.title,r)})]})},h.id))}),g.jsx(Mp,{session:e,children:g.jsx(Tn,{variant:"outlined",fullWidth:!0,href:Ap,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const xd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),Sd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number}),Ox=["admin","owner"],Ex=e=>e.endsWith(".ip.abtnet.io"),Nx=e=>e.endsWith(".did.abtnet.io"),Mx={en:{guest:{title:"Notice: You are using a temporary domain",description:"You are accessing this site through a temporary domain. For a better experience, please contact the site administrator to configure a custom domain. Using a custom domain not only makes access more convenient but also ensures your access is more secure."},owner:{title:"Enhance Your Website Security",description:"Dear administrator, we recommend configuring your custom domain immediately, which will:",benefits1:"Automatically obtain HTTPS certificates to ensure secure data transmission",benefits2:"Create an exclusive brand image and increase website credibility",benefits3:"Get a shorter, more memorable access address",benefits4:"Provide visitors with a more professional experience",benefits5:"Domain configuration takes just minutes to complete, taking your website to the next level!"},skip:"Remind Me Later",bindDomain:"Configure Domain"},zh:{guest:{title:"温馨提示:当前使用的是临时域名",description:"您正在通过临时域名访问本站点。为了获得更好的访问体验,请联系站点管理员配置自定义域名。使用自定义域名不仅访问更便捷,还能确保您的访问更加安全。"},owner:{title:"提升网站安全性与专业度",description:"尊敬的管理员,我们建议您尽快配置自定义域名,这样可以:",benefits1:"自动获取 HTTPS 证书,确保数据传输安全",benefits2:"打造专属品牌形象,提升网站可信度",benefits3:"获得更简短、易记的访问地址",benefits4:"为访客提供更专业的访问体验",benefits5:"只需几分钟即可完成域名配置,全面提升您的网站品质!"},skip:"稍后提醒",bindDomain:"配置域名"}},Ax=1e3*60*60*24*30,Cs=".well-known/service/admin/domains";function wd({locale:e="en",session:r={}}){const n=r?.user,t=Mc(),[i,o]=I.useState(()=>{const f=window.localStorage.getItem("domain-warning-skip");if(!f)return!0;const p=+new Date,h=+new Date(f);return p-h>Ax}),a=le((f,p={})=>Un(Mx,f,e,"en",p)),l=I.useMemo(()=>{try{const{hostname:f}=new URL(window.location.href);return f}catch{return""}},[]),s=I.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=I.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=I.useCallback(()=>{const f=Be(window.location.origin,Cs);f.startsWith("http")&&window.open(f,"_blank"),o(!1)},[]),d=n?.role&&Ox.includes(n.role);return window.location.href.includes(Cs)||t||!Ex(l)&&!Nx(l)?null:g.jsxs(Lp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(zp,{sx:{padding:"20px !important"},children:[g.jsx(me,{sx:{fontSize:"20px",fontWeight:"500"},children:a(d?"owner.title":"guest.title")}),g.jsx(me,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(d?"owner.description":"guest.description")}),d&&g.jsx(oe,{component:"ul",children:s.map(f=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:f},f))})]}),g.jsxs(jp,{sx:{px:"12px !important"},children:[g.jsx(yt,{onClick:c,children:a("skip")}),d&&g.jsx(yt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}wd.propTypes={locale:x.string,session:x.object};const Ot={};function Lx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Be(r,yc,e);return new Fp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function zx(e="admin"){return Ot[e]||(Ot[e]=Lx(e)),Ot[e]}const jx=(e="admin")=>{const r=I.use(qn),{session:n}=r??{};return!Ot[e]&&n.user&&(Ot[e]=zx(e),Ot[e].connect()),Ot[e]},Fx={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g>'},Bx={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-3v4m0 3v.01"/>'},Gx={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9a9 9 0 0 0-9 9a9 9 0 0 0 9 9zM9 8l6 8m0-8l-6 8"/>'};function $x(){const e=jt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Hn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const Wx=e=>!_o(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,Hx=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},Ux=async(e,r)=>{try{return await Tr.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},qx=async(e,r)=>{const{type:n,did:t}=e;return xc.isSameAddr(n,"did")?await Ux(t,r)||Dn.getLink(e):Dn.getLink(e)},Vx=async(e,r,n=!0)=>{const t=Dn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Dn.Link){if(n){const o=await qx(i,r),{type:a,chainId:l,did:s}=i;return xc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},Kx=e=>Bp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Yx={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Kt({user:e,color:r=void 0}){const{palette:n}=jt(),t=ko(Be(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Sc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Kt.displayName="UserLink";function Jx({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=jt(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Le(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(y=>{y?.did&&!m.has(y.did)&&m.set(y.did,y)}),m},[r]),d=Le(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),f=le(()=>{if(!Array.isArray(d)||d.length===0)return null;if(d.length===1)return g.jsx(Kt,{user:d[0],color:c});const m=d.slice(0,-1),y=d[d.length-1];if(d.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Kt,{user:m[0],color:c})," and ",g.jsx(Kt,{user:y,color:c})]});const b=d.length>3,C=b?d.slice(0,2):m;return g.jsxs(g.Fragment,{children:[C.map((D,_)=>g.jsxs(Z.Fragment,{children:[g.jsx(Kt,{user:D,color:c}),_<C.length-1?", ":""]},D.did)),b?`, and ${d.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Kt,{user:y,color:c})]})]})}),p=le(()=>{const m=a?Yx[a]:null;return m?m(s,r.length):null}),h=Le(()=>{const m=f(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,s,d,f,p]),v=Le(()=>{if(!e)return null;const m=Hx(e);return m?.targetLink?Be(i,m.targetLink):null},[e,i]);return!a||_o(l)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Sc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const Xx={normal:Ea,success:Fx,info:Ea,warning:Bx,error:Gx},Qx=cr(Hp)`
43
+ */const Bu=Object.freeze({left:0,top:0,width:16,height:16}),En=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tn=Object.freeze({...Bu,...En}),ao=Object.freeze({...tn,body:"",hidden:!1}),ly=Object.freeze({width:null,height:null}),Gu=Object.freeze({...ly,...En});function sy(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function t(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:t(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?t(o):0)}}return r}const cy=/[\s,]+/;function uy(e,r){r.split(cy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const $u={...Gu,preserveAspectRatio:""};function rs(e){const r={...$u},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=sy(n("rotate","")),uy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function dy(e,r){for(const n in $u)if(e[n]!==r[n])return!0;return!1}const Ar=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!Sn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Sn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!Sn(l,n)?null:l}return null},Sn=(e,r)=>e?!!((e.provider===""||e.provider.match(Ar))&&(r&&e.prefix===""||e.prefix.match(Ar))&&e.name.match(Ar)):!1;function fy(e,r){const n={};!e.hFlip!=!r.hFlip&&(n.hFlip=!0),!e.vFlip!=!r.vFlip&&(n.vFlip=!0);const t=((e.rotate||0)+(r.rotate||0))%4;return t&&(n.rotate=t),n}function ns(e,r){const n=fy(e,r);for(const t in ao)t in En?t in e&&!(t in n)&&(n[t]=En[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function py(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function hy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=ns(t[l]||i[l],o)}return a(r),n.forEach(a),ns(e,o)}function Wu(e,r){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{r(i,null),n.push(i)});const t=py(e);for(const i in t){const o=t[i];o&&(r(i,hy(e,i,o)),n.push(i))}return n}const gy={provider:"",aliases:{},not_found:{},...Bu};function _i(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Hu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!_i(e,gy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Ar)||typeof o.body!="string"||!_i(o,ao))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Ar)||typeof a!="string"||!n[a]&&!t[a]||!_i(o,ao))return null}return r}const Nn=Object.create(null);function vy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function St(e,r){const n=Nn[e]||(Nn[e]=Object.create(null));return n[r]||(n[r]=vy(e,r))}function Yo(e,r){return Hu(r)?Wu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function my(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function by(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Nn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Nn[i]||{})).forEach(a=>{const l=St(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let $r=!1;function Uu(e){return typeof e=="boolean"&&($r=e),$r}function Wr(e){const r=typeof e=="string"?rn(e,!0,$r):e;if(r){const n=St(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function qu(e,r){const n=rn(e,!0,$r);if(!n)return!1;const t=St(n.provider,n.prefix);return my(t,n.name,r)}function is(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),$r&&!r&&!e.prefix){let i=!1;return Hu(e)&&(e.prefix="",Wu(e,(o,a)=>{a&&qu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Sn({provider:r,prefix:n,name:"a"}))return!1;const t=St(r,n);return!!Yo(t,e)}function yy(e){return!!Wr(e)}function xy(e){const r=Wr(e);return r?{...tn,...r}:null}function Sy(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=St(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const d={provider:o,prefix:a,name:l};u.push(d)}),r}function Vu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function wy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Vu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Cy=0;function Iy(e,r,n){const t=Cy++,i=Vu.bind(null,n,t);if(!r.pending.length)return i;const o={id:t,icons:r,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}const lo=Object.create(null);function os(e,r){lo[e]=r}function so(e){return lo[e]||lo[""]}function Ry(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?rn(i,r,n):i;o&&t.push(o)}),t}var Ty={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Dy(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let w=e.resources.slice(0);for(a=[];w.length>1;){const P=Math.floor(Math.random()*w.length);a.push(w[P]),w=w.slice(0,P).concat(w.slice(P+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,d=null,f=[],p=[];typeof t=="function"&&p.push(t);function h(){d&&(clearTimeout(d),d=null)}function v(){s==="pending"&&(s="aborted"),h(),f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function m(w,P){P&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:f.length,subscribe:m,abort:v}}function b(){s="failed",p.forEach(w=>{w(void 0,u)})}function C(){f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function D(w,P,S){const R=P!=="success";switch(f=f.filter(T=>T!==w),s){case"pending":break;case"failed":if(R||!e.dataAfterTimeout)return;break;default:return}if(P==="abort"){u=S,b();return}if(R){u=S,f.length||(a.length?_():b());return}if(h(),C(),!e.random){const T=e.resources.indexOf(w.resource);T!==-1&&T!==e.index&&(e.index=T)}s="completed",p.forEach(T=>{T(S)})}function _(){if(s!=="pending")return;h();const w=a.shift();if(w===void 0){if(f.length){d=setTimeout(()=>{h(),s==="pending"&&(C(),b())},e.timeout);return}b();return}const P={status:"pending",resource:w,callback:(S,R)=>{D(P,S,R)}};f.push(P),c++,d=setTimeout(_,e.rotate),n(w,r,P.callback)}return setTimeout(_),y}function Ku(e){const r={...Ty,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=Dy(r,l,s,(d,f)=>{t(),c&&c(d,f)});return n.push(u),u}function o(l){return n.find(s=>l(s))||null}return{query:i,find:o,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:t}}function Jo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,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 Qn=Object.create(null),xr=["https://api.simplesvg.com","https://api.unisvg.com"],wn=[];for(;xr.length>0;)xr.length===1||Math.random()>.5?wn.push(xr.shift()):wn.push(xr.pop());Qn[""]=Jo({resources:["https://api.iconify.design"].concat(wn)});function as(e,r){const n=Jo(r);return n===null?!1:(Qn[e]=n,!0)}function Zn(e){return Qn[e]}function Py(){return Object.keys(Qn)}function ls(){}const ki=Object.create(null);function _y(e){if(!ki[e]){const r=Zn(e);if(!r)return;const n=Ku(r),t={config:r,redundancy:n};ki[e]=t}return ki[e]}function Yu(e,r,n){let t,i;if(typeof e=="string"){const o=so(e);if(!o)return n(void 0,424),ls;i=o.send;const a=_y(e);a&&(t=a.redundancy)}else{const o=Jo(e);if(o){t=Ku(o);const a=e.resources?e.resources[0]:"",l=so(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),ls):t.query(r,i,n)().abort}const ss="iconify2",Hr="iconify",Ju=Hr+"-count",cs=Hr+"-version",Xu=36e5,ky=168;function co(e,r){try{return e.getItem(r)}catch{}}function Xo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function us(e,r){try{e.removeItem(r)}catch{}}function uo(e,r){return Xo(e,Ju,r.toString())}function fo(e){return parseInt(co(e,Ju))||0}const At={local:!0,session:!0},Qu={local:new Set,session:new Set};let Qo=!1;function Oy(e){Qo=e}let dn=typeof window>"u"?{}:window;function Zu(e){const r=e+"Storage";try{if(dn&&dn[r]&&typeof dn[r].length=="number")return dn[r]}catch{}At[e]=!1}function ed(e,r){const n=Zu(e);if(!n)return;const t=co(n,cs);if(t!==ss){if(t){const l=fo(n);for(let s=0;s<l;s++)us(n,Hr+s.toString())}Xo(n,cs,ss),uo(n,0);return}const i=Math.floor(Date.now()/Xu)-ky,o=l=>{const s=Hr+l.toString(),c=co(n,s);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,l))return!0}catch{}us(n,s)}};let a=fo(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,uo(n,a)):Qu[e].add(l))}function td(){if(!Qo){Oy(!0);for(const e in At)ed(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=St(t,i);if(!Yo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Ey(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in At)ed(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function Ny(e,r){Qo||td();function n(t){let i;if(!At[t]||!(i=Zu(t)))return;const o=Qu[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=fo(i),!uo(i,a+1))return;const l={cached:Math.floor(Date.now()/Xu),provider:e.provider,data:r};return Xo(i,Hr+a.toString(),JSON.stringify(l))}r.lastModified&&!Ey(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function ds(){}function My(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,wy(e)}))}function Ay(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=so(n)))return;o.prepare(n,t,i).forEach(l=>{Yu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Yo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(d=>{u.delete(d)}),Ny(e,s)}catch(c){console.error(c)}My(e)})})}))}const Zo=(e,r)=>{const n=Ry(e,!0,Uu()),t=Sy(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,ds)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(St(c,u));const d=i[c]||(i[c]=Object.create(null));d[u]||(d[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:d}=s,f=St(c,u),p=f.pendingIcons||(f.pendingIcons=new Set);p.has(d)||(p.add(d),i[c][u].push(d))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&Ay(s,i[c][u])}),r?Iy(r,t,o):ds},Ly=e=>new Promise((r,n)=>{const t=typeof e=="string"?rn(e,!0):e;if(!t){n(e);return}Zo([t||e],i=>{if(i.length&&t){const o=Wr(t);if(o){r({...tn,...o});return}}n(e)})});function zy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function jy(e,r){const n=typeof e=="string"?rn(e,!0,!0):null;if(!n){const o=zy(e);return{value:e,data:o}}const t=Wr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=Zo([n],()=>r(e,n,Wr(n)));return{value:e,name:n,loading:i}}function Oi(e){return e.hasAttribute("inline")}let rd=!1;try{rd=navigator.vendor.indexOf("Apple")===0}catch{}function Fy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(rd||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const By=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Gy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function po(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const t=e.split(By);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Gy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const $y=e=>e==="unset"||e==="undefined"||e==="none";function nd(e,r){const n={...tn,...e},t={...Gu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,d;a===null?(d=l===null?"1em":l==="auto"?c:l,u=po(d,s/c)):(u=a==="auto"?s:a,d=l===null?po(u,c/s):l==="auto"?c:l);const f={},p=(h,v)=>{$y(v)||(f[h]=v.toString())};return p("width",u),p("height",d),f.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:f,body:o}}const Wy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Mn=Wy();function Hy(e){Mn=e}function Uy(){return Mn}function qy(e,r){const n=Zn(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function Vy(e){return e===404}const Ky=(e,r,n)=>{const t=[],i=qy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function Yy(e){if(typeof e=="string"){const r=Zn(e);if(r)return r.path}return"/"}const Jy=(e,r,n)=>{if(!Mn){n("abort",424);return}let t=Yy(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Mn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Vy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Xy={prepare:Ky,send:Jy};function fs(e,r){switch(e){case"local":case"session":At[e]=r;break;case"all":for(const n in At)At[n]=r;break}}const Ei="data-style";let id="";function Qy(e){id=e}function ps(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ei));n||(n=document.createElement("style"),n.setAttribute(Ei,Ei),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+id}function od(){os("",Xy),Uu(!0);let e;try{e=window}catch{}if(e){if(td(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!is(i))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const t in n){const i="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;as(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>fs(n,!0),disableCache:n=>fs(n,!1),iconExists:yy,getIcon:xy,listIcons:by,addIcon:qu,addCollection:is,calculateSize:po,buildIcon:nd,loadIcons:Zo,loadIcon:Ly,addAPIProvider:as,appendCustomStyle:Qy,_api:{getAPIConfig:Zn,setAPIModule:os,sendAPIQuery:Yu,setFetch:Hy,getFetch:Uy,listAPIProviders:Py}}}function ad(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Zy(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ex(e){return"data:image/svg+xml,"+Zy(e)}function tx(e){return'url("'+ex(e)+'")'}const ho={"background-color":"currentColor"},ld={"background-color":"transparent"},hs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},gs={"-webkit-mask":ho,mask:ho,background:ld};for(const e in gs){const r=gs[e];for(const n in hs)r[e+"-"+n]=hs[n]}function vs(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function rx(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=ad(i,{...o,width:r.width+"",height:r.height+""}),l=tx(a),s=t.style,c={"--svg":l,width:vs(o.width),height:vs(o.height),...n?ho:ld};for(const u in c)s.setProperty(u,c[u]);return t}let Lr;function nx(){try{Lr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Lr=null}}function ix(e){return Lr===void 0&&nx(),Lr?Lr.createHTML(e):e}function ox(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=ad(e.body,n);return r.innerHTML=ix(i),r.firstChild}function ms(e,r){const n=r.icon.data,t=r.customisations,i=nd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=ox(i);break;default:a=rx(i,{...tn,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function bs(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function ax(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Oi(this);ps(l,s),this._state=bs({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Oi(this),c=this._state;s!==c.inline&&(c.inline=s,ps(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Oi(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}ms(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=rs(this);(l.attrMode!==c||dy(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=jy(l,(c,u,d)=>{const f=this._state;if(f.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:d};p.data?this._gotIconData(p):f.icon=p});s.data?this._gotIconData(s):this._state=bs(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,rs(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=Fy(l.data.body,c),d=this._state.inline;ms(this._shadowRoot,this._state={rendered:!0,icon:l,inline:d,customisations:s,attrMode:c,renderedMode:u})}};i.forEach(l=>{l in o.prototype||Object.defineProperty(o.prototype,l,{get:function(){return this.getAttribute(l)},set:function(s){s!==null?this.setAttribute(l,s):this.removeAttribute(l)}})});const a=od();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const lx=ax()||od(),{enableCache:ST,disableCache:wT,iconExists:CT,getIcon:IT,listIcons:RT,addIcon:TT,addCollection:DT,calculateSize:PT,buildIcon:_T,loadIcons:kT,loadIcon:OT,addAPIProvider:ET,_api:NT}=lx,Gt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Gt(t[n],r,n)}):r(t)),sd=(e,r="children")=>{const n=[];return Gt(e,t=>n.push(t),r),n},ea=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ea(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),cd=e=>/^https?:\/\//.test(e),ud=e=>/^mailto:/i.test(e.trim()),sx=e=>{if(!e||!e?.startsWith("/"))return!1;const r=i=>i.endsWith("/")?i:`${i}/`,n=r(window.location.pathname),t=r(new URL(e,window.location.origin).pathname);return n.startsWith(t)},dd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>sx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},cx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,d=0;const f=s*.2,p=h=>d>s-f&&u<n-1&&d+h>s+f;return e.forEach(h=>{const v=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,d=0,c[u]=[]),!t&&d>0&&p(v)&&(u++,d=0,c[u]=[]),c[u].push({...h,group:!0}),d+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,d=0,c[u]=[]),c[u].push({...m,group:!1}),d+=o})}),c};function Qe({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=I.useState(!1),[l,s]=I.useState(!0);if(To(async()=>{s(!0);try{await Do(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),cd(e))return g.jsx(er,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?g.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(er,{component:"span",...t,sx:i,children:g.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(er,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function ta(e=["en","zh"]){const{blocklet:r}=Ft();return I.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>ft.SUPPORTED_LANGUAGES[c]),l=a.reduce((c,u)=>(c[u]=ft.SUPPORTED_LANGUAGES[u].nativeName,c),{}),s=a.map(c=>({code:c,name:ft.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:l,defaultLocale:o,languages:s}},[r.environments,e])}const ux=e=>e.from!=="team-tmpl";function dx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Cp(e.slice(0,t-1),r.slice(0,i-1)))}function fd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=Ft(),{defaultLocale:t}=ta(),i=n.environments.find(l=>l.key===ft.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=le(l=>{if(l?.startsWith("/"))try{return new URL(l,i?.value).href}catch{console.error("Failed to parse url",{url:l,origin:i?.value})}return l});function a(){const{title:l,subtitle:s}=e;let c=l,u=s;return Yt(l)&&(c=l[r]||l[t]||l.en),!I.isValidElement(s)&&Yt(s)&&(u=s[r]||s[t]||s.en),g.jsxs(oe,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:c}),s&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(Po(o(e.icon))?g.jsx(Qe,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}fd.propTypes={treeNode:x.object.isRequired};const fx=it(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function pd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(fx,{children:g.jsx(Ih,{backend:Rh,...i,children:g.jsx(tm,{generateNodeProps:o=>{const a=ux(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(ye,{icon:"ic:round-drag-indicator"}):g.jsx(oe,{sx:{width:16,height:16}}),title:g.jsx(fd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:dx,theme:ay})})})}pd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var px=sc();const hx=$n(px);function hd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:l=()=>{}}){const{t:s}=Ee(),c=I.useRef(),[u,d]=I.useState(null),f=zt({localeList:[],inputLocale:"",localeError:""}),p=I.useMemo(()=>!!u,[u]),h=I.useMemo(()=>o.includes(i)?i:t,[o,i]),v=I.useMemo(()=>f.localeList.filter(S=>!!a[S]),[f.localeList,a]),m=I.useMemo(()=>Object.keys(Et(a,[...f.localeList,t])).map(S=>({title:a[S],value:S})),[f.localeList]),y=I.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=le(S=>S?S===t||f.localeList.includes(S)?s("navigation.form.localeExists",{value:S}):!0:s("common.requiredErrorText",{name:"Locale"})),C=le((S="")=>{const R=S?.trim(),T=b(R);return T!==!0?f.localeError=T:f.localeError="",T}),D=le(()=>{d(null),f.inputLocale="",f.localeError=""}),_=le(()=>{const S=f.inputLocale?.trim();C(S)===!0&&(D(),f.localeList.push(S),r(S))}),w=le((S,R)=>{S.preventDefault(),S.stopPropagation(),f.localeList=Ac(f.localeList,R),l(R)}),P=le(S=>{const{value:R}=S.target;C(R),f.inputLocale=R});return I.useEffect(()=>{f.localeList=[...o]},[o,f]),yh("enter",()=>{setTimeout(()=>{_()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(zh,{sx:e,value:h,onChange:(S,R)=>{n(R)},children:[g.jsx($a,{label:y,value:t}),v.map(S=>g.jsx($a,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(Ne,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:R=>{w(R,S)},children:g.jsx(ye,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(Ne,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{d(S.currentTarget)},children:g.jsx(ye,{icon:"mdi:plus"})})]}),g.jsx(Hi,{open:p,anchorEl:u,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(oe,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:s("navigation.form.localePlaceholder")}),g.jsx(oe,{sx:{mt:1},children:g.jsx(Vi,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:m,onChange:P,error:!!f.localeError,helperText:f.localeError||" "})}),g.jsx(oe,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(yt,{size:"small",variant:"contained",onClick:_,children:s("common.confirm")})})]})})]})}hd.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const ra=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function gd(e,r,n=5e3){for(const t of ra){const i=Be(t,e);try{return await Fh.get(i,{params:r,timeout:n})}catch(o){console.warn(`Failed to fetch from ${i}:`,o)}}throw new Error(`All icon API endpoints ${e} failed`)}async function gx({keyword:e,limit:r=999,start:n=0,palette:t=!1}){let i="",o=e;e.includes(":")&&([i,o]=e.split(":"));const{data:a}=await gd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const fn=new Map;async function vx(e){if(fn.has(e))return fn.get(e);const r=(async()=>{const{data:n}=await gd("/collection",{prefix:e}),t=new Set;return n.uncategorized?.forEach(i=>t.add(`${e}:${i}`)),Object.values(n.categories??{}).forEach(i=>{i.forEach(o=>t.add(`${e}:${o}`))}),Array.from(t)})();fn.set(e,r);try{return await r}catch(n){throw fn.delete(e),n}}function mx(e){return Be(ra[0],`${e}.svg`)}function bx(e){try{const r=new URL(e);for(const n of ra)if(r.origin===n)return Ip(r.pathname).replace(".svg","");return""}catch{return""}}function yx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Po(e)&&(n=bx(e))),{isIconId:r,iconId:n}}const xx=I.lazy(()=>Pp(()=>import("./index-BkFC8ho3.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),ys=Ve(Qe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function vd({icon:e,...r}){const[n,t]=I.useState(!1);return To(async()=>{t(!1),await Do(e),t(!0)},[e]),e?n?g.jsx(ye,{icon:e,...r}):g.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}vd.propTypes={icon:x.string.isRequired};function go({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=dc(),{blocklet:u}=Ft(),d=Hn(ee=>ee.breakpoints.down("md")),f=u.environments.find(ee=>ee.key===ft.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Ee(),{isIconId:C,iconId:D}=yx(e),[_,w]=I.useState(null),{onChange:P,onBlur:S,sx:R,...T}=a,k=i.includes("upload"),F=i.includes("select"),N=Be(s,"/api/media/upload",u.appPid),H=zt({showPopover:!1}),z=le(ee=>{if(ee?.startsWith("/"))try{const V=c?window.location.origin:f?.value;return new URL(ee,V).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[f?.value,c]),A=le(async ee=>await h.current.getUploader().uploadFile(ee)),G=le(()=>{w(null)}),q=le(()=>{F&&w(m.current)}),J=le(async ee=>{try{if(o==="url"){const V=mx(ee),re=await Rp(V,{width:128,height:128}),ie=await Tp(re,ee);await A(ie)}else P?.(ee)}catch(V){console.error("Failed to pick icon:",V)}G()}),Q=le(ee=>{ee.stopPropagation(),v.current.open(),G()}),X=le(ee=>{a?.onChange?.(ee.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(nt,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...R},onClick:F?q:void 0,...T,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Rn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(ys,{size:28,icon:z(e),alt:"Error"})}),endAdornment:g.jsxs(Rn,{position:"end",children:[g.jsx(Ne,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),P("")},children:g.jsx(Nc,{style:{fontSize:18}})}),k&&g.jsx(Dp,{title:y("common.upload"),children:g.jsx(Ne,{disableFocusRipple:!1,disableRipple:!1,onClick:Q,children:g.jsx(vd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),F&&g.jsx(oe,{component:jh,sx:{mr:"-6px",fontSize:24,transform:_?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),F&&g.jsx(Hi,{open:!!_,anchorEl:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...d&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:G,children:g.jsx(md,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(vo,{ref:h,locale:b,apiPath:N,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(vo,{ref:v,locale:b,apiPath:N,headers:p,onUploadFinish:X}),g.jsx(Hi,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(ys,{size:120,icon:z(e),alt:"Error"})})]})}go.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function md({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[d,f]=I.useState(n),[p,h]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Ee(),D=96,_=le(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,R=(S-1)*D,T=S*D,k=m.current.slice(R,T);s(F=>[...F,...k]),y.current=S,b.current=T<m.current.length,u(!1)},300))}),w=le(S=>{m.current=S,y.current=1,b.current=S.length>D;const R=S.slice(0,D);s(R),h(S.length===0),b.current&&_()}),{run:P}=fc(async S=>{if(S){u(!0);try{const{icons:R}=await gx({keyword:S});w(R)}catch(R){console.error("Failed to search icons:",R),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:T,scrollHeight:k,clientHeight:F}=v.current;(T+F>=k-150||k<=F)&&_()},R=v.current;return R&&(R.addEventListener("scroll",S),S()),()=>{R&&R.removeEventListener("scroll",S)}},[_,c]),To(async()=>{if(d)P(d);else{u(!0);try{const S=await vx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[d,P,w]),g.jsxs(Sx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(nt,{label:C("navigation.form.searchIcons"),placeholder:C("navigation.form.searchIconsPlaceholder"),size:"small",value:d,sx:{flexGrow:1},autoFocus:!0,onChange:S=>f(S.target.value),slotProps:{input:{endAdornment:g.jsx(Ne,{sx:{visibility:d?"visible":"hidden"},onClick:()=>f(""),children:g.jsx(Nc,{style:{fontSize:18}})})}}}),g.jsx(yt,{onClick:o,children:C("common.cancel")})]}),g.jsxs(oe,{children:[l.length>0&&g.jsx(oe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(S=>g.jsx(wx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(ye,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(oe,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(pc,{size:20})})]})]})}md.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Sx=Ve(oe)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),wx=Ve(Ne,{shouldForwardProp:e=>e!=="$active"})(({$active:e,theme:r})=>({boxSizing:"content-box",backgroundColor:e?r.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:r.palette.action.hover}}));function vo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return g.jsx(I.Suspense,{children:g.jsx(xx,{locale:r,ref:e,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:i,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:t}})})}vo.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const xs=24,Ss=48,ws="add";x.string.isRequired;function na({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ec(),{t:l,locale:s}=Ee(),{localeMap:c,defaultLocale:u}=ta(),d=le(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),f=le(E=>Ac(Array.from(new Set(xe.NAVIGATION_I18N_FIELDS.flatMap(O=>Yt(E[O])?Object.keys(E[O]):[]))),u)),p=I.useRef(()=>{}),h=zt({isRoot:!0,type:ws,linkDisabled:!1,locale:u,formState:d(),get localeList(){return f(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=Ah({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{xe.NAVIGATION_I18N_FIELDS.forEach(E=>b(E,h.formState[E][h.locale]))},[b,h.locale]);const _=Lh({control:m}),w=_.component,P=_.title,S=_.description,R=_.link,T=_.parent;I.useEffect(()=>{h.formState.title[h.locale]=P},[P]),I.useEffect(()=>{h.formState.description[h.locale]=S},[S]),I.useEffect(()=>{h.formState.link[h.locale]=R},[R]),I.useEffect(()=>{i?.(_)},[_,i]);const k=I.useMemo(()=>t.find(O=>w?n.find(te=>te.name===w).did===O.id:O.id===T),[n,t,w,T]),F=I.useMemo(()=>{if(k?.component){const E=n.find(ae=>ae.name===k.component),{link:O}=E||{},U=Yt(O)?O[h.locale]:O;if(w)return ka(U);const te=Yt(k.link)?k.link[h.locale]:k.link;return ka(Be(U,te||"/"))}return null},[n,h.locale,k,w]),N=I.useMemo(()=>{const{component:E}=k||{},O=n.find(ae=>ae.name===E),{navigation:U=[]}=O||{};return ke.flattenNavigation(U,{transform(ae,de){return de?.section&&(ae.section=ae.section||de.section),ae}}).filter(ae=>ae.link).filter(ae=>ke.isMatchSection(ae.section,r)).map(ae=>({label:ae.link,title:ae.title[s]||ae.title}))},[k,n,r,s]),H=le(()=>{h.isRoot=!0,h.locale=u,h.type=ws,h.linkDisabled=!1,h.formState=d(),y(),C(),p.current=()=>{}}),z=le((E={})=>(h.localeList.length>0&&xe.NAVIGATION_I18N_FIELDS.forEach(O=>{eg(h.formState[O]).length>1&&(E[O]=h.formState[O])}),_o(E.role)&&(E.role=void 0),E)),A=le(({parent:E}={},O=()=>{})=>{h.type="add",h.isRoot=!E,b("parent",E?.id),p.current=U=>{O(U)}}),G=le((E={},O=()=>{})=>{const{id:U,icon:te,parent:ae,component:de,role:pe=[]}=E;b("id",U),b("icon",te),E.from==="team-tmpl"&&(h.linkDisabled=!0);const Ce=f(E),Me=(be,De)=>{hc(be)?h.formState[De]=Ce.reduce((se,ve)=>(se[ve]=be,se),{[u]:be}):Yt(be)?h.formState[De]=Xe(be):h.formState[De]={}};xe.NAVIGATION_I18N_FIELDS.forEach(be=>Me(E[be],be)),xe.NAVIGATION_I18N_FIELDS.forEach(be=>b(be,h.formState[be][h.locale])),b("component",de),b("parent",ae),b("role",pe||[]),h.type="edit",h.isRoot=!ae,p.current=be=>{const De=_p(be,["id","title","description","icon","component","link","role"]);O(De)}}),q=le(E=>{const O=E?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>xs)return l("navigation.form.titleTooLong",{len:xs})}return!0}),J=le(E=>{const O=E?.trim();return O&&O.length>Ss?l("navigation.form.descriptionTooLong",{len:Ss}):!0}),Q=le(E=>E?.startsWith("/")?new URL(E,window.location.origin).href:E),X=le(async E=>{const O=E?.trim();if(O){if(Po(Q(O)))return!0;try{await Do(O)}catch{return l("navigation.form.invalidIcon")}}return!0}),ee=le(E=>{const O=E?.trim();return O?X(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}),V=le(E=>{const O=E?.trim();return O?ke.checkLink(O)?!0:l("navigation.form.invalidLink"):h.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}),re=le(E=>{h.locale=E,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][E]||(h.formState[O][E]="")}),setTimeout(()=>{C()})}),ie=le(()=>{const{title:E,link:O}=h.formState;if(r!=="bottomNavigation")for(const U of Object.keys(E)){const te=q(E[U]);if(te!==!0)return te}for(const U of Object.keys(O)){const te=V(O[U]);if(te!==!0)return te}return!0}),$=le(E=>{const O=ie();O===!0?p.current(z(E)):kt.error(O)}),W=le(E=>{h.locale=u,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O]=Et(h.formState[O],E)}),i?.(_)}),L=le(E=>{h.locale=E,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][E]=h.formState[O][u]}),i?.(_),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:A,edit:G,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v($)}),[A,H,G,v,$]),g.jsxs(oe,{...o,children:[g.jsx(hd,{sx:{mb:1},onAdd:L,onChange:re,onRemoveLocale:W,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:E})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...E})}),r==="bottomNavigation"?g.jsx(lt,{name:"icon",control:m,rules:{validate:ee},render:({field:E})=>g.jsx(go,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...E})}):g.jsx(lt,{name:"icon",control:m,rules:{validate:X},render:({field:E})=>g.jsx(go,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,...E})}),h.isRoot&&g.jsx(lt,{name:"component",control:m,render:({field:E})=>g.jsx(Vi,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&E.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Et(E,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(lt,{name:"description",control:m,rules:{validate:J},render:({field:E})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...E})}),g.jsx(lt,{name:"link",control:m,rules:{validate:V},render:({field:E})=>g.jsx(gc,{fullWidth:!0,margin:"dense",children:g.jsx(Bh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:O=>O.label,options:N,renderInput:O=>g.jsx(nt,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:F?g.jsx(Rn,{position:"start",sx:{textDecoration:hx(R||"")?"line-through":""},children:F}):null}}}),renderOption:(O,U)=>g.jsxs(oe,{component:"li",...O,children:[U.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:U.title})]}),margin:"dense",...E,onChange:()=>{},onInputChange:(O,U)=>{E.onChange(U)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(lt,{name:"role",control:m,render:({field:E})=>g.jsx(Vi,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Et(E,"ref")})}),r==="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:E})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...E})})]})]})}na.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:l}]=Nh(),[s,c]=I.useState("add"),u=I.useRef(null),d=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),f=I.useCallback(()=>{l(),u.current?.reset()},[l]),p=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(f,y)),a()},[a,f]),h=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(f,y)),a()},[a,f]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:f}),[p,h,f]),g.jsx(vc,{open:o,title:d,keepMounted:!0,onClose:f,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Tn,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(na,{ref:u,section:r,components:n,rawNavigations:t})})}ia.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function bd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Ee(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const d=I.useCallback(v=>{u(v),r(o)},[r,o]),f=I.useCallback(v=>{u(v),n(o)},[n,o]),p=I.useCallback(v=>{u(v),t(o)},[t,o]),h=I.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(Ne,{size:"small",color:"success",onClick:d,disabled:c,children:g.jsx(ye,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(Ne,{size:"small",color:"primary",onClick:f,disabled:c||o.from==="team-tmpl",children:g.jsx(ye,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:g.jsx(Ne,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(ye,{icon:"mdi:eye-off-outline"}):g.jsx(ye,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(Ne,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:g.jsx(ye,{icon:"mdi:delete"})})})]})}bd.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Cn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Cx=e=>{const r={...e},n=e?.background;return typeof n=="string"?r.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(r.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),r},Ix=(e,r="en",n="en")=>{if(typeof e=="string"){if(cd(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(ud(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},rr=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Gt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:mc(o.items?.length?o.link:Ix(o.link,r,n),t),_rawLink:o.link}),"items")},Rx=e=>Gt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Tx=e=>{if(!e?.length)return null;const r=Rx(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return r.forEach(t=>{t.section?Array.isArray(t.section)?t.section.forEach(i=>{n[i]?.push(t)}):typeof t.section=="string"&&n[t.section]?.push(t):n.header.push(t)}),n},oa=e=>{if(!e)return null;const r={...e};return r.theme=Cx(r.theme),r.navigation=Tx(Dx(r.navigation)),r},Dx=(e=[])=>ea(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),yd=(e,r)=>ea(e,(n,t)=>{const i=!n.role||r&&(n.role.includes(r)||n.role.includes("guest"));return t.isLeaf?i:i&&t.filteredChildren?.length},"items"),Px={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},_x={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function kx({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),s=jt(),c=I.useRef(null),u=zt({open:!1}),d=le((p=!u.open)=>{u.open=p}),f=t==="hover"?{onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)}:{onClick:()=>d()};return l.length===0||!e?.user?null:g.jsxs(oe,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...f,children:[g.jsx(Ne,{size:"medium",ref:c,children:g.jsx(ye,{icon:Px,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(kp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Op,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),d(!1)},children:g.jsx(bc,{...p,timeout:350,children:g.jsxs(Or,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Ep,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:l.map(h=>g.jsx(Np,{disablePadding:!0,children:g.jsxs(Gh,{href:Oa(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(oe,{component:"img",src:`${yc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:h.icon||_x,color:s.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Oa(h.title,r)})]})},h.id))}),g.jsx(Mp,{session:e,children:g.jsx(Tn,{variant:"outlined",fullWidth:!0,href:Ap,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const xd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),Sd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number}),Ox=["admin","owner"],Ex=e=>e.endsWith(".ip.abtnet.io"),Nx=e=>e.endsWith(".did.abtnet.io"),Mx={en:{guest:{title:"Notice: You are using a temporary domain",description:"You are accessing this site through a temporary domain. For a better experience, please contact the site administrator to configure a custom domain. Using a custom domain not only makes access more convenient but also ensures your access is more secure."},owner:{title:"Enhance Your Website Security",description:"Dear administrator, we recommend configuring your custom domain immediately, which will:",benefits1:"Automatically obtain HTTPS certificates to ensure secure data transmission",benefits2:"Create an exclusive brand image and increase website credibility",benefits3:"Get a shorter, more memorable access address",benefits4:"Provide visitors with a more professional experience",benefits5:"Domain configuration takes just minutes to complete, taking your website to the next level!"},skip:"Remind Me Later",bindDomain:"Configure Domain"},zh:{guest:{title:"温馨提示:当前使用的是临时域名",description:"您正在通过临时域名访问本站点。为了获得更好的访问体验,请联系站点管理员配置自定义域名。使用自定义域名不仅访问更便捷,还能确保您的访问更加安全。"},owner:{title:"提升网站安全性与专业度",description:"尊敬的管理员,我们建议您尽快配置自定义域名,这样可以:",benefits1:"自动获取 HTTPS 证书,确保数据传输安全",benefits2:"打造专属品牌形象,提升网站可信度",benefits3:"获得更简短、易记的访问地址",benefits4:"为访客提供更专业的访问体验",benefits5:"只需几分钟即可完成域名配置,全面提升您的网站品质!"},skip:"稍后提醒",bindDomain:"配置域名"}},Ax=1e3*60*60*24*30,Cs=".well-known/service/admin/domains";function wd({locale:e="en",session:r={}}){const n=r?.user,t=Mc(),[i,o]=I.useState(()=>{const f=window.localStorage.getItem("domain-warning-skip");if(!f)return!0;const p=+new Date,h=+new Date(f);return p-h>Ax}),a=le((f,p={})=>Un(Mx,f,e,"en",p)),l=I.useMemo(()=>{try{const{hostname:f}=new URL(window.location.href);return f}catch{return""}},[]),s=I.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=I.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=I.useCallback(()=>{const f=Be(window.location.origin,Cs);f.startsWith("http")&&window.open(f,"_blank"),o(!1)},[]),d=n?.role&&Ox.includes(n.role);return window.location.href.includes(Cs)||t||!Ex(l)&&!Nx(l)?null:g.jsxs(Lp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(zp,{sx:{padding:"20px !important"},children:[g.jsx(me,{sx:{fontSize:"20px",fontWeight:"500"},children:a(d?"owner.title":"guest.title")}),g.jsx(me,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(d?"owner.description":"guest.description")}),d&&g.jsx(oe,{component:"ul",children:s.map(f=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:f},f))})]}),g.jsxs(jp,{sx:{px:"12px !important"},children:[g.jsx(yt,{onClick:c,children:a("skip")}),d&&g.jsx(yt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}wd.propTypes={locale:x.string,session:x.object};const Ot={};function Lx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Be(r,yc,e);return new Fp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function zx(e="admin"){return Ot[e]||(Ot[e]=Lx(e)),Ot[e]}const jx=(e="admin")=>{const r=I.use(qn),{session:n}=r??{};return!Ot[e]&&n.user&&(Ot[e]=zx(e),Ot[e].connect()),Ot[e]},Fx={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g>'},Bx={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-3v4m0 3v.01"/>'},Gx={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9a9 9 0 0 0-9 9a9 9 0 0 0 9 9zM9 8l6 8m0-8l-6 8"/>'};function $x(){const e=jt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Hn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const Wx=e=>!_o(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,Hx=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},Ux=async(e,r)=>{try{return await Tr.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},qx=async(e,r)=>{const{type:n,did:t}=e;return xc.isSameAddr(n,"did")?await Ux(t,r)||Dn.getLink(e):Dn.getLink(e)},Vx=async(e,r,n=!0)=>{const t=Dn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Dn.Link){if(n){const o=await qx(i,r),{type:a,chainId:l,did:s}=i;return xc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},Kx=e=>Bp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Yx={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Kt({user:e,color:r=void 0}){const{palette:n}=jt(),t=ko(Be(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Sc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Kt.displayName="UserLink";function Jx({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=jt(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Le(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(y=>{y?.did&&!m.has(y.did)&&m.set(y.did,y)}),m},[r]),d=Le(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),f=le(()=>{if(!Array.isArray(d)||d.length===0)return null;if(d.length===1)return g.jsx(Kt,{user:d[0],color:c});const m=d.slice(0,-1),y=d[d.length-1];if(d.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Kt,{user:m[0],color:c})," and ",g.jsx(Kt,{user:y,color:c})]});const b=d.length>3,C=b?d.slice(0,2):m;return g.jsxs(g.Fragment,{children:[C.map((D,_)=>g.jsxs(Z.Fragment,{children:[g.jsx(Kt,{user:D,color:c}),_<C.length-1?", ":""]},D.did)),b?`, and ${d.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Kt,{user:y,color:c})]})]})}),p=le(()=>{const m=a?Yx[a]:null;return m?m(s,r.length):null}),h=Le(()=>{const m=f(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,s,d,f,p]),v=Le(()=>{if(!e)return null;const m=Hx(e);return m?.targetLink?Be(i,m.targetLink):null},[e,i]);return!a||_o(l)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Sc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const Xx={normal:Ea,success:Fx,info:Ea,warning:Bx,error:Gx},Qx=cr(Hp)`
44
44
  font-size: 20px;
45
45
  `,Zx=cr.div`
46
46
  display: flex;
@@ -1,4 +1,4 @@
1
- import{aF as J1,j as i,r as s,bn as c1,aQ as Z1,M as ge,H as $,a1 as G1,b as l1,_ as u1,f6 as Ae,f as p1,E as Q1,cr as d1,b9 as De,iL as C1,V as ee,cs as f1,fP as h1,iM as _1,y as v,fc as X1,ga as z1,a3 as E1,bz as pe,dm as y1,K as F,L as ie,iN as m1,aV as Y1,dE as q1,aO as Y,dc as W1,z as se,ay as g1,gF as $1,ez as P,iO as A1,iP as et,iE as tt,iQ as nt,iR as Se,g0 as rt,cF as U,iS as st,iT as at,iU as it,iV as ot,iW as ct,hr as lt,gW as ut,f4 as pt,dA as dt,T as X,$ as Ct,D as ft,t as ht,v as He,C as Et,iX as ve,w as yt,hj as mt,dG as gt,gt as At,a4 as Dt,X as we,o as R,i as Te,x as St,aw as wt,ak as Bt}from"./index-DuooR0LN.js";import{v as be}from"./index-ClEU1mAO.js";import{f as It}from"./index-BojVbZw0.js";import{b as xt,c as Ot,d as Ht}from"./spaces-Dg_AAhqT.js";import{u as Be}from"./blocklet-B_F88Tat.js";import{D as vt}from"./DeleteOutline-rUX66WwM.js";import{O as D1}from"./OpenInNew-q2sIX9R4.js";import{x as Tt}from"./index-DRYJ0xIl.js";import{H as bt}from"./HelpOutline-JDUwTxNr.js";import"./api-C_G-DBUm.js";const Ft=J1(i.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"}));function Lt(){const[e,n]=s.useState(null),{blocklet:t}=Be();return s.useEffect(()=>{n(xt(t))},[t]),{storageEndpoint:e}}const S1=s.createContext({}),{Provider:kt,Consumer:F6}=S1;function Rt({children:e}){const[n,t]=s.useState(!1),[r,l]=s.useState(null),{blocklet:a,actions:{refreshBlocklet:C}}=Be(),{storageEndpoint:c}=Lt(),{api:u}=c1();Z1(async()=>{try{if(t(!0),ge(c)){l(null);return}const f=await Ot(c);l(f)}catch(f){console.error(f),$.error(f.message)}finally{t(!1)}},[c]);const d=()=>{l(null),C()},o=async f=>{l(f),await p(f.endpoint),C()},p=async f=>{await u.configBlocklet({input:{did:[a.meta.did],configs:[{key:l1.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:f}]}}),C()};s.useEffect(()=>{async function f(){if(!r)return;const E=await Ht(r.endpoint,r.name),m=G1(r,{name:E});l(m)}f()},[]);const h=!!(c&&r);return i.jsx(kt,{value:{loading:n,spaceGateway:r,deleteSpaceGateway:d,updateSpaceGateway:o,storageEndpoint:c,settingStorageEndpoint:p,hasStorageEndpoint:h},children:e})}Rt.propTypes={children:u1.node.isRequired};function Ut(){return s.useContext(S1)}const oe=Ae({});function Pt({key:e}={key:"md"}){const n=p1();return Q1(n.breakpoints.down(e))}var H=(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))(H||{}),w1=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(w1||{}),M=(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))(M||{});function Mt({endpoint:e,deps:n=[]}){return d1(async()=>{if(!De(e))return;const{headers:t}=await oe.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[r,l,a,C,c,u,d,o,p,h]=[t["x-space-name"],t["x-subscription-id"],t["x-listable"]==="true",t["x-readable"]==="true",t["x-writeable"]==="true",t["x-space-version"],t["x-space-owner-did"],t["x-space-is-available"],t["x-error-code"],t["x-is-site-admin"]],f=r?decodeURIComponent(r):"";if(o===void 0||p===void 0){const E=a&&C&&c;return{version:u,name:f,subscriptionId:l,ownerDid:d||"",isAvailable:E,errorCode:E?0:H.UNAUTHORIZED,isSiteAdmin:h==="true"}}return{version:u,name:f,subscriptionId:l,ownerDid:d,isAvailable:o==="true",errorCode:parseInt(p,10),isSiteAdmin:h==="true"}},{refreshDeps:[e].concat(n),onError(t){console.error(t)}})}const jt=C1.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{aF as J1,j as i,r as s,bn as c1,aQ as Z1,M as ge,H as $,a1 as G1,b as l1,_ as u1,f6 as Ae,f as p1,E as Q1,cr as d1,b9 as De,iL as C1,V as ee,cs as f1,fP as h1,iM as _1,y as v,fc as X1,ga as z1,a3 as E1,bz as pe,dm as y1,K as F,L as ie,iN as m1,aV as Y1,dE as q1,aO as Y,dc as W1,z as se,ay as g1,gF as $1,ez as P,iO as A1,iP as et,iE as tt,iQ as nt,iR as Se,g0 as rt,cF as U,iS as st,iT as at,iU as it,iV as ot,iW as ct,hr as lt,gW as ut,f4 as pt,dA as dt,T as X,$ as Ct,D as ft,t as ht,v as He,C as Et,iX as ve,w as yt,hj as mt,dG as gt,gt as At,a4 as Dt,X as we,o as R,i as Te,x as St,aw as wt,ak as Bt}from"./index-F3HbHSYi.js";import{v as be}from"./index-D4PsRecd.js";import{f as It}from"./index-BojVbZw0.js";import{b as xt,c as Ot,d as Ht}from"./spaces-DnqeOj51.js";import{u as Be}from"./blocklet-BSWtuwnH.js";import{D as vt}from"./DeleteOutline-GpuLmtYQ.js";import{O as D1}from"./OpenInNew-B8ApQgxt.js";import{x as Tt}from"./index-DRYJ0xIl.js";import{H as bt}from"./HelpOutline-USuznZgn.js";import"./api-OdGoHXe4.js";const Ft=J1(i.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"}));function Lt(){const[e,n]=s.useState(null),{blocklet:t}=Be();return s.useEffect(()=>{n(xt(t))},[t]),{storageEndpoint:e}}const S1=s.createContext({}),{Provider:kt,Consumer:F6}=S1;function Rt({children:e}){const[n,t]=s.useState(!1),[r,l]=s.useState(null),{blocklet:a,actions:{refreshBlocklet:C}}=Be(),{storageEndpoint:c}=Lt(),{api:u}=c1();Z1(async()=>{try{if(t(!0),ge(c)){l(null);return}const f=await Ot(c);l(f)}catch(f){console.error(f),$.error(f.message)}finally{t(!1)}},[c]);const d=()=>{l(null),C()},o=async f=>{l(f),await p(f.endpoint),C()},p=async f=>{await u.configBlocklet({input:{did:[a.meta.did],configs:[{key:l1.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:f}]}}),C()};s.useEffect(()=>{async function f(){if(!r)return;const E=await Ht(r.endpoint,r.name),m=G1(r,{name:E});l(m)}f()},[]);const h=!!(c&&r);return i.jsx(kt,{value:{loading:n,spaceGateway:r,deleteSpaceGateway:d,updateSpaceGateway:o,storageEndpoint:c,settingStorageEndpoint:p,hasStorageEndpoint:h},children:e})}Rt.propTypes={children:u1.node.isRequired};function Ut(){return s.useContext(S1)}const oe=Ae({});function Pt({key:e}={key:"md"}){const n=p1();return Q1(n.breakpoints.down(e))}var H=(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))(H||{}),w1=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(w1||{}),M=(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))(M||{});function Mt({endpoint:e,deps:n=[]}){return d1(async()=>{if(!De(e))return;const{headers:t}=await oe.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[r,l,a,C,c,u,d,o,p,h]=[t["x-space-name"],t["x-subscription-id"],t["x-listable"]==="true",t["x-readable"]==="true",t["x-writeable"]==="true",t["x-space-version"],t["x-space-owner-did"],t["x-space-is-available"],t["x-error-code"],t["x-is-site-admin"]],f=r?decodeURIComponent(r):"";if(o===void 0||p===void 0){const E=a&&C&&c;return{version:u,name:f,subscriptionId:l,ownerDid:d||"",isAvailable:E,errorCode:E?0:H.UNAUTHORIZED,isSiteAdmin:h==="true"}}return{version:u,name:f,subscriptionId:l,ownerDid:d,isAvailable:o==="true",errorCode:parseInt(p,10),isSiteAdmin:h==="true"}},{refreshDeps:[e].concat(n),onError(t){console.error(t)}})}const jt=C1.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}"}}}),Vt=C1.flatten({common:{cancel:"取消",confirm:"确认",delete:"删除",error:"错误",open:"打开",unknown:"未知",invalidUrl:"无效的 url: {url}",upgrade:"升级",viewMore:"查看更多"},storage:{spaces:{authorize:{title:"连接 {appName} 至 DID Spaces",scan:"使用你的 DID Wallet 扫描下面的二维码以允许应用 {appName} 连接至 DID Spaces",success:"连接成功"},connect:{reconnect:"立即重连",useSpaceGateway:"使用 DID Spaces 网关连接",useWallet:"连接至 DID Spaces",howToGetGatewayUrl:"如何获取 DID Spaces 的网关地址",providerForStorage:"请连接您的 DID Spaces"},connected:{title:"已连接的 DID Spaces",tag:"已连接"},disconnected:{tag:"连接已断开"},error:{tag:"需要关注",blockedByCors:"因 CORS 限制,访问被阻止",unreachable:"DID Space 无法访问",expired:"DID Spaces 已过期,点击此链接重新订阅",pastDue:"DID Spaces 有未支付账单,点击此链接完成支付",invalid:"DID Spaces 订阅异常,点击此链接检查",unitLimit:"DID Spaces 免费额度已用完,点击此链接付费升级",cors:`连接请求可能因 CORS 限制而失败:
@@ -1,4 +1,4 @@
1
- import{m as et}from"./index-B_oLwhaj.js";import"./index-DuooR0LN.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
1
+ import{m as et}from"./index-u7lHFbWg.js";import"./index-F3HbHSYi.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1 +1 @@
1
- import{V as h,j as e,ac as j,K as o,U as g,T as _,t as b,o as n}from"./index-DuooR0LN.js";import{C as R}from"./click-to-copy-DKJULX-E.js";function T({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})}T.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{T as D};
1
+ import{V as h,j as e,ac as j,K as o,U as g,T as _,t as b,o as n}from"./index-F3HbHSYi.js";import{C as R}from"./click-to-copy-C5l1aVBQ.js";function T({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})}T.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{T as D};
@@ -1 +1 @@
1
- import{eH as r}from"./index-DuooR0LN.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};
1
+ import{eH as r}from"./index-F3HbHSYi.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};