@abtnode/webapp 1.16.52-beta-20250912-112002-e3499e9c → 1.16.52-beta-20250917-070942-7ee57044

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-DBb6evn-.js → AdapterDayjs-DarkZR9j.js} +1 -1
  4. package/dist/assets/{Add-Nm-0HQuZ.js → Add-BsCasUcs.js} +1 -1
  5. package/dist/assets/ArrowDropDown-BbXAaeVr.js +1 -0
  6. package/dist/assets/{Autocomplete-Bxg_V7oZ.js → Autocomplete-DjYVg0xw.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-BstonFkA.js → Breadcrumbs-vVVRZsjN.js} +1 -1
  8. package/dist/assets/{ButtonGroup-BdiA1ieO.js → ButtonGroup-CF6fFlve.js} +1 -1
  9. package/dist/assets/{CSSTransition-BNoCWHCT.js → CSSTransition-DSxV7K4V.js} +1 -1
  10. package/dist/assets/{CallMerge-3ONMFKaC.js → CallMerge-odntUl5s.js} +1 -1
  11. package/dist/assets/{CardContent-Bf9xFcVF.js → CardContent-Bx23N-y1.js} +1 -1
  12. package/dist/assets/{ChevronLeft-BcYwe1Np.js → ChevronLeft-DneAQDKO.js} +1 -1
  13. package/dist/assets/{ChevronRight-D-piYz4L.js → ChevronRight-C_XYjhxd.js} +1 -1
  14. package/dist/assets/{Clear-Byq43mbH.js → Clear-dbJWv3QG.js} +1 -1
  15. package/dist/assets/{DeleteOutline--HOjaz49.js → DeleteOutline-BQGJu1ed.js} +1 -1
  16. package/dist/assets/{Done-DUEpKVRM.js → Done-BjzLVAB9.js} +1 -1
  17. package/dist/assets/{Edit-BvYCDhH_.js → Edit-CbphF2M-.js} +1 -1
  18. package/dist/assets/{ErrorOutline-BC1DA45P.js → ErrorOutline-BL3sEekq.js} +1 -1
  19. package/dist/assets/{FilterList-C4BaYlJk.js → FilterList-DgzeYNjK.js} +1 -1
  20. package/dist/assets/{Google-BTtWuSai.js → Google-BklBOHcq.js} +1 -1
  21. package/dist/assets/{HelpOutline-CxFR9PYg.js → HelpOutline-B9rq5AT4.js} +1 -1
  22. package/dist/assets/{Launch-DdOm8awH.js → Launch-D-Zf7oaA.js} +1 -1
  23. package/dist/assets/{Link-BXILtS1X.js → Link-Lf9shwST.js} +1 -1
  24. package/dist/assets/{ListItemButton-B252NuSM.js → ListItemButton-CBCcz25V.js} +1 -1
  25. package/dist/assets/{ListSubheader-CjR9d2qi.js → ListSubheader-BYRJFOMa.js} +1 -1
  26. package/dist/assets/{LoadingButton-CCFZxRBF.js → LoadingButton-B2KbS3tl.js} +1 -1
  27. package/dist/assets/{MoreVert-DpOqnc7J.js → MoreVert-B0v12xlt.js} +1 -1
  28. package/dist/assets/{OpenInNew-YONC4zqV.js → OpenInNew-DpFE4qHg.js} +1 -1
  29. package/dist/assets/{Refresh-B_CqSdgJ.js → Refresh-DYNB8V6v.js} +1 -1
  30. package/dist/assets/{Search-ChuYh2xV.js → Search-TKSWz34N.js} +1 -1
  31. package/dist/assets/{Stepper-Cz4zGS1X.js → Stepper-C1wqVhiQ.js} +1 -1
  32. package/dist/assets/{Switch-Crle-Atf.js → Switch-p1fa_uPC.js} +1 -1
  33. package/dist/assets/{TableSearch-DLAP28ea.js → TableSearch-DH2QxdMb.js} +1 -1
  34. package/dist/assets/{ToggleButtonGroup-CNBxuavk.js → ToggleButtonGroup-BtechD_B.js} +1 -1
  35. package/dist/assets/{Verified-BoP0hME9.js → Verified-zfe6nsBp.js} +1 -1
  36. package/dist/assets/{VerifiedUser-DRi8NOWE.js → VerifiedUser-2_jqMje1.js} +1 -1
  37. package/dist/assets/{ViewList-skvvV5Bw.js → ViewList-5h6twi3p.js} +1 -1
  38. package/dist/assets/{_createAggregator-DUVOYxGS.js → _createAggregator-BRC6hvO7.js} +1 -1
  39. package/dist/assets/{actions-CKEgNOLf.js → actions-D8IVwECn.js} +1 -1
  40. package/dist/assets/{actions-BuX32_FY.js → actions-DwZg2R6k.js} +1 -1
  41. package/dist/assets/{agreement-BZ_yiLzn.js → agreement-BPDJWeCJ.js} +1 -1
  42. package/dist/assets/api-TFCv4qOf.js +1 -0
  43. package/dist/assets/{appearance-_yT5hZvM.js → appearance-BiVRoiwT.js} +1 -1
  44. package/dist/assets/{audit-logs-KO9TwNQH.js → audit-logs-BQFBhT5n.js} +1 -1
  45. package/dist/assets/{base-chart-DyplmUQs.js → base-chart-Zi8pdr17.js} +1 -1
  46. package/dist/assets/{blocklet-BepSnsS4.js → blocklet-C03sDJ1i.js} +1 -1
  47. package/dist/assets/{chain-DVuB4tA_.js → chain-CKxf9AdU.js} +1 -1
  48. package/dist/assets/{click-to-copy-Dlvnt0pX.js → click-to-copy-OQVm3W8D.js} +1 -1
  49. package/dist/assets/client-1fyhaZ1u.js +1 -0
  50. package/dist/assets/cloneDeep-DiUBoCJs.js +1 -0
  51. package/dist/assets/{collapse-GWSPzyG0.js → collapse-CmEfNn01.js} +1 -1
  52. package/dist/assets/{config-navigation-BgpPfoeH.js → config-navigation-BUpRpuRp.js} +3 -3
  53. package/dist/assets/{connect-to-BkIz4VkQ.js → connect-to-Ccnb4QWA.js} +1 -1
  54. package/dist/assets/{cssMode-BqE7jz26.js → cssMode-BDx-0Yhk.js} +1 -1
  55. package/dist/assets/{delete-confirm-DKFeNts9.js → delete-confirm-B4ZWgco3.js} +1 -1
  56. package/dist/assets/{depsEqual-CHzTtbxB.js → depsEqual-DUSDIMu_.js} +1 -1
  57. package/dist/assets/{detail-CGtu6Fih.js → detail-DD7Yilol.js} +3 -3
  58. package/dist/assets/{domains-BsDpjUcO.js → domains-tnLuDLA-.js} +1 -1
  59. package/dist/assets/{download-D3Q64sHV.js → download-DHO_qxiG.js} +1 -1
  60. package/dist/assets/{edit.svg-CP6Zg7Yn.js → edit.svg-CaGUvrvT.js} +1 -1
  61. package/dist/assets/emotion-cache.browser.esm-DzLuQ31t.js +1 -0
  62. package/dist/assets/engine-BTmStHRK.js +1 -0
  63. package/dist/assets/{freemarker2-BKjZrsKk.js → freemarker2-CvE_6GlU.js} +1 -1
  64. package/dist/assets/{get-safe-url-CeZ-qdMI.js → get-safe-url-DL1Ksc1t.js} +1 -1
  65. package/dist/assets/getValidReactChildren-DV_bKjsu.js +1 -0
  66. package/dist/assets/{graphqlMode-CjoWUMen.js → graphqlMode-DgW4p_1y.js} +2 -2
  67. package/dist/assets/{handlebars-D4VqTBV0.js → handlebars-B0Tsx3G2.js} +1 -1
  68. package/dist/assets/{html-B8-39ONg.js → html-DPsrcobJ.js} +1 -1
  69. package/dist/assets/{html-title-C3ppIMLo.js → html-title-CLvLOLbR.js} +1 -1
  70. package/dist/assets/{htmlMode-D_hkL8Y2.js → htmlMode-C2oN13HO.js} +1 -1
  71. package/dist/assets/{iframe-DM7J9bTw.js → iframe-CujpH5O-.js} +1 -1
  72. package/dist/assets/{index-Y8s37NGw.js → index-BDnrYBbd.js} +3 -3
  73. package/dist/assets/{index-Df57ynzL.js → index-BFj_BZkU.js} +1 -1
  74. package/dist/assets/{index-DPmW2bpf.js → index-BGsVf6ce.js} +1 -1
  75. package/dist/assets/{index-CMVWYlSS.js → index-BPByI5gc.js} +1 -1
  76. package/dist/assets/{index-5gNwXWqN.js → index-BbhrM_fS.js} +2 -2
  77. package/dist/assets/{index-CsOqGkqk.js → index-Bc-kttJk.js} +1 -1
  78. package/dist/assets/{index-BAAuc8Ew.js → index-BpHIZRoQ.js} +1 -1
  79. package/dist/assets/{index-Cm_b8Flm.js → index-BwFgT4f9.js} +1 -1
  80. package/dist/assets/{index-DVdNmG_a.js → index-BwW-ib72.js} +1 -1
  81. package/dist/assets/index-BzS7dp1G.js +1 -0
  82. package/dist/assets/{index-CMiO509B.js → index-C0GpgF9K.js} +1 -1
  83. package/dist/assets/{index-DqaIgRms.js → index-CGv5PXND.js} +1 -1
  84. package/dist/assets/{index-B523Fc-A.js → index-CIs0ueGA.js} +1 -1
  85. package/dist/assets/{index-CZ5i5rS1.js → index-CMwvr3Aw.js} +1 -1
  86. package/dist/assets/index-CT2y-lAr.js +113 -0
  87. package/dist/assets/{index-BMi9AMJp.js → index-CW58JS3K.js} +3 -3
  88. package/dist/assets/{index-BP72zVCn.js → index-CvrjkLlP.js} +1 -1
  89. package/dist/assets/{index-pMmJD7z1.js → index-CzpTfDdp.js} +1 -1
  90. package/dist/assets/{index-W5g_UdBK.js → index-D1rBdThL.js} +1 -1
  91. package/dist/assets/{index-CDkQEmRV.js → index-DCnEvnl6.js} +1 -1
  92. package/dist/assets/{index-CJibx1Df.js → index-DEhIkivP.js} +1 -1
  93. package/dist/assets/{index-CMdMKHT-.js → index-DFduzc0K.js} +1 -1
  94. package/dist/assets/{index-BIGIUdm6.js → index-DIyvBU1o.js} +1 -1
  95. package/dist/assets/{index-BKIOscQx.js → index-DL6_plGD.js} +3 -3
  96. package/dist/assets/{index-DBNKdMXE.js → index-DOu4zwZ4.js} +1 -1
  97. package/dist/assets/{index-BWUXmF_b.js → index-DPBo5dxQ.js} +1 -1
  98. package/dist/assets/{index-N_dMIDHu.js → index-DPXRDGCk.js} +3 -3
  99. package/dist/assets/{index-CkhY2Lmw.js → index-DVDt5rkZ.js} +1 -1
  100. package/dist/assets/{index-BHgqx3Bf.js → index-Dk3siGj5.js} +1 -1
  101. package/dist/assets/{index-Ckq9RC5w.js → index-DoLLHsgg.js} +1 -1
  102. package/dist/assets/{index-CbxASA_d.js → index-Dor9E-YG.js} +1 -1
  103. package/dist/assets/{index-DCzzBd8S.js → index-DzXOEuwn.js} +1 -1
  104. package/dist/assets/{index-D6Bc5817.js → index-IE_xZtXx.js} +1 -1
  105. package/dist/assets/{index-BW_rM4QF.js → index-KQW85_sG.js} +1 -1
  106. package/dist/assets/{index-BLgY_oUv.js → index-MlQbgg84.js} +1 -1
  107. package/dist/assets/{index-BrBU-Wb1.js → index-NuBAdQKe.js} +1 -1
  108. package/dist/assets/{index-D_7bRoL6.js → index-PGkZ-p10.js} +9 -9
  109. package/dist/assets/{index-DmygiZZZ.js → index-TIc9HsMr.js} +1 -1
  110. package/dist/assets/{index-DChw5H1T.js → index-Xwhm3Zp4.js} +1 -1
  111. package/dist/assets/{index-Bze2XJej.js → index-gyjan-8E.js} +1 -1
  112. package/dist/assets/{index-C_D_tHqD.js → index-hv--3OFd.js} +1 -1
  113. package/dist/assets/{index-IQ4l9n87.js → index-i6PKUbUv.js} +1 -1
  114. package/dist/assets/{index-BfhNDOKb.js → index-tJqcQJw8.js} +3 -3
  115. package/dist/assets/{index-DOtgCqEJ.js → index-uvPvZoSt.js} +1 -1
  116. package/dist/assets/{index-xRdNYj3Y.js → index-xP3FaEcA.js} +1 -1
  117. package/dist/assets/{index.esm-Dw_hd_87.js → index.esm-DEWYqPkv.js} +1 -1
  118. package/dist/assets/{install-from-url-Bpdo5qyj.js → install-from-url-R3-z-Na6.js} +1 -1
  119. package/dist/assets/{invitation-B6dzYchJ.js → invitation-DnVLx9Vx.js} +1 -1
  120. package/dist/assets/{is-path-prefix-equal-Dn6RdM0h.js → is-path-prefix-equal-D8k2SijE.js} +1 -1
  121. package/dist/assets/{item-D5ZMqtgb.js → item-MmXt9J3K.js} +1 -1
  122. package/dist/assets/{javascript-C8s58XIY.js → javascript-BlyEC1iq.js} +1 -1
  123. package/dist/assets/{jsonMode-C-4795UU.js → jsonMode-CCzgkgmt.js} +1 -1
  124. package/dist/assets/{liquid-D2J66XKV.js → liquid-BAEm0H2r.js} +1 -1
  125. package/dist/assets/{list-header-CFZOSvq3.js → list-header-Crj7BNKL.js} +1 -1
  126. package/dist/assets/{log-yl39q8DG.js → log-DhVLnKso.js} +1 -1
  127. package/dist/assets/{lottie-react.esm-CnRZInLM.js → lottie-react.esm-DvvAHvj1.js} +1 -1
  128. package/dist/assets/{mdx-MSPpP7ua.js → mdx-BamtHgoS.js} +1 -1
  129. package/dist/assets/{memory-CFbb1yLg.js → memory-CFo0vaiY.js} +1 -1
  130. package/dist/assets/{metric-C6uV3sSt.js → metric-K7UZeWUX.js} +1 -1
  131. package/dist/assets/omit-Dd3E6q9F.js +1 -0
  132. package/dist/assets/{overview-D9CJCKo4.js → overview-HLtH-yCi.js} +1 -1
  133. package/dist/assets/{permission-CuYYFZUe.js → permission-BdpMR93f.js} +1 -1
  134. package/dist/assets/{preference-BhbUFlGi.js → preference-Lv54_1NQ.js} +3 -3
  135. package/dist/assets/{python-Bi74UQqJ.js → python-amBHGt1r.js} +1 -1
  136. package/dist/assets/{raf-schd.esm-D8Vex_N6.js → raf-schd.esm-CLovL9Is.js} +1 -1
  137. package/dist/assets/{razor-BNEB2ebt.js → razor-BkTz5FTM.js} +1 -1
  138. package/dist/assets/{rotate-session-key-BigP7BdT.js → rotate-session-key-BQCEdH4H.js} +1 -1
  139. package/dist/assets/{runtime-DA9Ph33k.js → runtime-BGo7IAbs.js} +1 -1
  140. package/dist/assets/schema-wSADEA-R.js +1 -0
  141. package/dist/assets/sdk-Cav0C3IX.js +1 -0
  142. package/dist/assets/{service-DJ9FK5Z8.js → service-Bz07Hd--.js} +1 -1
  143. package/dist/assets/{shorten-label-I7a7Yc81.js → shorten-label-L8CW1JMg.js} +1 -1
  144. package/dist/assets/{simple-select-D8O8cMQI.js → simple-select-CEHYECyj.js} +1 -1
  145. package/dist/assets/{spaces-3NySh_Ui.js → spaces-zGV6wwqp.js} +1 -1
  146. package/dist/assets/{status-H7hmMAu_.js → status-BQ8pfSo7.js} +1 -1
  147. package/dist/assets/{status-DGaB5Gxo.js → status-vgu2kfq8.js} +1 -1
  148. package/dist/assets/{switch-control-DyLDeFlC.js → switch-control-CLcUFpZi.js} +1 -1
  149. package/dist/assets/{table-icons-CNuBC9wj.js → table-icons-PFo7EdLg.js} +1 -1
  150. package/dist/assets/{team-BWxrfrQj.js → team-DV-g0zdM.js} +1 -1
  151. package/dist/assets/{toLower-BfB-naRV.js → toLower-DPcdQ2gg.js} +1 -1
  152. package/dist/assets/toUpper-DFzZf5e9.js +1 -0
  153. package/dist/assets/{traffic-DT04Pgrf.js → traffic-CsK46tzJ.js} +1 -1
  154. package/dist/assets/{tsMode-wBsww3Iu.js → tsMode-CuWtRqWJ.js} +1 -1
  155. package/dist/assets/{typescript-DAIALUV4.js → typescript-DJDXMz0W.js} +1 -1
  156. package/dist/assets/{url-evaluation-CcNC2lNq.js → url-evaluation-DWvC8Wb1.js} +1 -1
  157. package/dist/assets/{url-join-C5AKaybv.js → url-join-DekEkeTk.js} +1 -1
  158. package/dist/assets/{use-mobile-BRBCmVs9.js → use-mobile-CnqtSdkW.js} +1 -1
  159. package/dist/assets/{use-mobile-CcfXCkk-.js → use-mobile-TlnW5eR4.js} +1 -1
  160. package/dist/assets/{useAsync--QPFKBLV.js → useAsync-VFQB7kMj.js} +1 -1
  161. package/dist/assets/{useAsyncRetry-Bi3SSYuy.js → useAsyncRetry-F-WE12rr.js} +1 -1
  162. package/dist/assets/{useLocalStorage-BjelqNo4.js → useLocalStorage-DnHseBMC.js} +1 -1
  163. package/dist/assets/{useThemeProps-CDjgUo9Q.js → useThemeProps-C2xCEKGa.js} +1 -1
  164. package/dist/assets/{util-D_DYnrMU.js → util-C1MSkSwp.js} +1 -1
  165. package/dist/assets/{wait-container-DziRccnR.js → wait-container-C6RHwOqU.js} +1 -1
  166. package/dist/assets/{without-wallet-hJBDzVPX.js → without-wallet-CavlEQVy.js} +1 -1
  167. package/dist/assets/{wrap-locale-D2-3jOqy.js → wrap-locale-DSFFbKk8.js} +1 -1
  168. package/dist/assets/{xml-Dc8XYvWA.js → xml-eGuTgAY9.js} +1 -1
  169. package/dist/assets/{yaml-BszAyour.js → yaml-1CNB3lwQ.js} +1 -1
  170. package/dist/index.html +1 -1
  171. package/dist/service-worker.js +1 -1
  172. package/package.json +1 -1
  173. package/dist/assets/ArrowDropDown-BNqJf_bc.js +0 -1
  174. package/dist/assets/api-CbSTXzd2.js +0 -1
  175. package/dist/assets/client-CCDZmJKo.js +0 -1
  176. package/dist/assets/cloneDeep-DibIRTK6.js +0 -1
  177. package/dist/assets/emotion-cache.browser.esm-BEoMbinK.js +0 -1
  178. package/dist/assets/engine-pg2hdUxK.js +0 -1
  179. package/dist/assets/getValidReactChildren-BTX2zlcG.js +0 -1
  180. package/dist/assets/index-BhzOVGum.js +0 -113
  181. package/dist/assets/index-biZUNG--.js +0 -1
  182. package/dist/assets/omit-D2kGKV7Z.js +0 -1
  183. package/dist/assets/schema-DTT2Joc8.js +0 -1
  184. package/dist/assets/sdk-DclzsH0U.js +0 -1
  185. package/dist/assets/toUpper-Cs1mef-p.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-N_dMIDHu.js","./index-BfhNDOKb.js","./index-DGkT7afN.css","./url-join-C5AKaybv.js","./index-Df57ynzL.js","./_createAggregator-DUVOYxGS.js","./depsEqual-CHzTtbxB.js","./index-BAAuc8Ew.js","./index-DRYJ0xIl.js","./toUpper-Cs1mef-p.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
- import{hz as Hf,hA as Uf,gt as qf,ds as Vf,hB as Kf,dt as Yf,bL as cc,bM as Jf,bJ as Qf,bK as Xf,bO as uc,dw as Ln,hC as Zf,eC as eh,hm as th,gS as rh,gP as dc,hD as nh,gx as ih,fo as oh,eD as ah,h9 as lh,m as Ee,a3 as $e,y as qe,E as Ce,aP as or,r as I,j as v,c2 as Dt,J as sh,f9 as ch,eN as uh,hq as dh,dv as xr,ey as hr,dg as fc,dA as fh,hE as hh,dz as hc,bd as zn,dN as Xt,hF as B,eZ as K,eG as ph,hG as Ur,be as Z,o as S,dL as jn,aQ as To,hH as _o,cw as ii,aE as be,b8 as mt,N as ie,ag as gh,b as kt,cr as ve,b9 as Po,dB as Yt,T as Ie,a4 as Oe,b1 as Hi,dH as Zt,hI as vh,bn as pc,F as Fn,hJ as mh,hK as bh,t as Ht,fl as Ui,az as yh,dd as Ve,fb as gc,C as Sh,bE as xh,hL as ka,O as ko,f8 as wh,H as wr,Q as vc,f5 as mc,$ as Ch,v as bc,hM as yc,f as Et,dK as Ih,bu as Rh,gB as Sc,dI as Tr,a7 as Dh,a8 as Th,hN as Oa,hO as xc,hP as _h,hQ as Ph,fP as wc,fc as kh,gF as Oh,gD as Eh,gN as Nh,hR as Mh,hS as Ah,ga as Bn,gI as Lh,hT as Cn,hU as Cc,by as Ae,L as Ic,z as Oo,hV as Ea,hW as Rc,hX as qi,hY as zh,hZ as jh,s as ar,h_ as Fh,f4 as Bh,cv as Dc,h$ as Gh,bB as $h,i0 as Wh,i1 as Hh,i2 as Uh,i3 as qh,i4 as Vh,i5 as Tc,i6 as Kh,aC as _c,e$ as Pc,i7 as Eo,i8 as Yh,hi as kc,b_ as ot,i9 as Jh,b5 as Qh,cA as Ut,ia as Xh,cP as Zh,ib as ep,G as Na,dn as oi,eH as Ma,dM as tp,ic as rp,a5 as Oc,Y as Aa,dG as Ze,id as La,R as np,S as za,U as ja}from"./index-BfhNDOKb.js";import{r as ip}from"./omit-D2kGKV7Z.js";import{r as op}from"./cloneDeep-DibIRTK6.js";import{r as ap}from"./index-Df57ynzL.js";import{c as lp,u as sp}from"./_createAggregator-DUVOYxGS.js";import{u as Nt}from"./blocklet-BepSnsS4.js";import{H as cp,G as up,M as dp,N as fp,O as Fa,K as hp,L as pp}from"./index-C_D_tHqD.js";import{_ as ye,a as Se,b as Fe,c as Be,d as Ge,e as gp,f as Ec,u as ue,g as ne,r as Ar,w as In,h as Nc,i as Mt,j as Mc,k as vp,l as mp,o as Vi}from"./raf-schd.esm-D8Vex_N6.js";import{_ as M,b as Ba,c as bp,a as yp,d as Sp}from"./redux-DfszZyTl.js";import{_ as xp}from"./typeof-QjJsDpFa.js";import{u as Ac,b as wp}from"./team-BWxrfrQj.js";import{b as Cp}from"./actions-CKEgNOLf.js";import{u as Ip,a as Rp,C as rt}from"./index.esm-Dw_hd_87.js";import{S as Ki}from"./simple-select-D8O8cMQI.js";import{b as Dp,a as Ga}from"./html-title-C3ppIMLo.js";import{C as Lc}from"./Clear-Byq43mbH.js";import{A as Tp}from"./ArrowDropDown-BNqJf_bc.js";import{a as _p}from"./api-CbSTXzd2.js";import{A as Pp}from"./Autocomplete-Bxg_V7oZ.js";import{L as kp}from"./ListItemButton-B252NuSM.js";import{u as zc}from"./use-mobile-BRBCmVs9.js";import{e as Op}from"./client-CCDZmJKo.js";import{I as Ep}from"./iframe-DM7J9bTw.js";import{B as ai}from"./ButtonGroup-BdiA1ieO.js";import{L as $a}from"./LoadingButton-CCFZxRBF.js";import"./depsEqual-CHzTtbxB.js";import"./url-evaluation-CcNC2lNq.js";import"./useLocalStorage-BjelqNo4.js";import"./MoreVert-DpOqnc7J.js";import"./get-safe-url-CeZ-qdMI.js";import"./permission-CuYYFZUe.js";import"./ListSubheader-CjR9d2qi.js";import"./getValidReactChildren-BTX2zlcG.js";var Np=Hf(function(){return Uf?sessionStorage:void 0});function Mp(e,r){return qf(r,function(n){return e[n]})}function Ap(e){return e==null?[]:Mp(e,Vf(e))}var Lp=Kf.isFinite;function Wa(e){return typeof e=="number"&&Lp(e)}function zp(e){return typeof e=="number"&&e==Yf(e)}var jp=lp(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const Fp=Object.freeze(Object.defineProperty({__proto__:null,default:jp},Symbol.toStringTag,{value:"Module"}));var Bp=cc(function(e){var r=Jf(e);return r=typeof r=="function"?r:void 0,Qf(Xf(e,1,uc,!0),void 0,r)});const Gp=Object.freeze(Object.defineProperty({__proto__:null,default:Bp},Symbol.toStringTag,{value:"Module"}));var jc=cc(function(e,r){return uc(e)?Cp(e,r):[]}),pr={};const $p=Ln(Gp),Wp=Ln(Zf),Hp=Ln(Fp);var Ha;function Up(){return Ha||(Ha=1,function(e){var r=pr&&pr.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=re,e.deepWalk=P,e.isMatchSection=x,e.nestNavigationList=Q,e.filterNavigation=te,e.cleanOrphanNavigation=X,e.joinLink=E,e.flattenNavigation=j,e.splitNavigationBySection=V;const n=eh(),t=r($p),i=r(th),o=r(rh),a=r(Wp),l=r(ip),s=r(op),c=lh(),u=r(ap()),f=r(dc()),d=r(nh),h=r(ih),p=r(Hp),g=oh(),m=ah();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return m.checkLink}});const y="header",b="/",w="/",D="/";function P(F,H=()=>{},{key:k="children",order:O="first"}={}){function A($,{index:J=0,parent:oe=null,level:fe=0}={}){Array.isArray($)?$.forEach((de,me)=>{A(de,{index:me,parent:oe,level:fe+1})}):$&&(O==="first"&&H($,oe,{index:J,level:fe}),A($[k],{parent:$,level:fe}),O==="last"&&H($,oe,{index:J,level:fe}))}A(F)}function x(F,H){return H===y&&(0,a.default)(F)?!0:Array.isArray(F)?F.includes(H):F===H}function T(F){try{return JSON.parse(F)}catch{return F}}function C(F){return F.map(H=>{const k={...H};return k.role&&(k.role=T(k.role)),k.section&&(k.section=T(k.section)),k.title&&(k.title=T(k.title)),k.description&&(k.description=T(k.description)),k.link&&(k.link=T(k.link)),k})}function _(F="/",H=""){if((0,f.default)(H||""))return H;const k=u.default.join(F,H||w);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function R(F,H,{strict:k=!0}={}){let O=F,A=H;return k||(O=O||"/",A=A||"/"),(0,d.default)(O)&&(0,h.default)(A)&&(0,m.checkLink)(A)?Object.keys(O).reduce(($,J)=>($[J]=_(O[J],A),$),{}):(0,h.default)(O)&&(0,m.checkLink)(O)&&(0,d.default)(A)?Object.keys(A).reduce(($,J)=>($[J]=_(O,A[J]),$),{}):(0,h.default)(O)&&(0,h.default)(A)?(0,m.checkLink)(O)||(0,m.checkLink)(A)?_(O,A):A:(0,d.default)(O)&&(0,d.default)(A)?[...new Set([...Object.keys(O),...Object.keys(A)])].reduce((J,oe)=>(J[oe]=_(O[oe],A[oe]),J),{}):A}function E(F,H){const k=(0,s.default)(F);return P(k,(O,A)=>{const $=O.component||O.child;if($){const J=H.find(oe=>oe.name===$);J&&(O.link=R(J.link,O.link,{strict:!1}))}else A&&(O.link=R(A.link,O.link))},{key:"items"}),k}function j(F=[],{depth:H=1,transform:k=O=>O}={}){const O=(0,s.default)(F),A=[];return P(O,($,J,{level:oe})=>{if(oe>=H){const{items:fe=[]}=$;if(fe&&Array.isArray(fe)&&fe.length>0){delete $.items;const de=fe.map(me=>k(me,$));if(J)J.items.push(...de);else{const me=k((0,l.default)($,["items"]),J);A.push(me,...de)}}else if(oe===1){const de=k((0,l.default)($,["items"]),J);A.push(de)}}else oe===1&&A.push($)},{key:"items",order:"last"}),A}function N(F){if(F.section!=="bottomNavigation")return F;const H={...F};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const O=H[k];typeof O=="string"&&(H[k]={en:O})}),H}function U(F={}){const H=[];function k(A,$={}){const J=[],{children:oe=[],meta:fe={}}=A,de=(0,s.default)(fe?.navigation||[]);(0,g.hasStartEngine)(fe)&&A.meta?.capabilities?.navigation!==!1&&J.push(...de);const me=$.name||"",ge=$.mountPoint||b,De=A===F?"":fe.name||"",ce=A===F?"":A.mountPoint||b;for(const ae of oe){if(!(0,g.hasStartEngine)(ae.meta))continue;const ke=ae.meta.name,fr=ae.mountPoint,ti=[me,De,ke].filter(Boolean).join("."),ri=ae.meta.navigation||[],ni=(0,c.joinURL)(ge,ce,fr);ae.meta?.capabilities?.navigation!==!1&&H.push({did:ae.meta.did,name:ti,link:ni,title:ae.meta.title||"",navigation:ri.map(Je=>({section:y,...Je}))});const Lt=de.find(Je=>Je.component?Je.component===ke:!1);if(Lt){if(!Lt.link)if(ae.meta.navigation&&ae.meta.navigation.length>0){const Je=k(ae,{mountPoint:ce,name:De});Je.length>0&&(Lt.items=Lt.items??[],Lt.items.push(...Je))}else Lt.link=w}else if(ae.meta?.capabilities?.navigation!==!1){const Je=k(ae,{mountPoint:ce,name:De}),tn={title:ae.meta.title,component:ke,id:ae.meta.did};Je.length>0?(tn.items=Je,tn.link=void 0):tn.link=w,J.push(tn)}}return J}return{navigationList:k(F),components:H}}function z(F){const H=(0,s.default)(F).filter(k=>k.id);return P(H,(k,O)=>{if(k.items&&k.items.length){for(let A=k.items.length-1;A>=0;A--)k.items[A].id||k.items.splice(A,1);k.items.length===0&&k.component&&(k.link=k.link||w)}O&&(k.parent=O.id,k.id=[O.id,k.id].join(D)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),H}function G(F,H=2){const k=(0,s.default)(F),O=j(k,{depth:H,transform:(A,$)=>($&&(A._parent||(A._parent=$.id,$.component||(A.link=R($.link,A.link))),A.section=A.section||$.section||[y],A.visible=A.visible??$.visible,$.role&&(A.role=A.role||$.role)),A.component=[$.component,A.component].filter(Boolean).join("."),A)});return P(O,A=>{A.items&&A.items.length>0&&A.items.reduceRight(($,J)=>{if(J._parent){const oe=A.items.findIndex(fe=>fe.id===J._parent);oe>=0&&A.items.splice(oe,1),delete J._parent}return null},null)},{key:"items"}),O}function W(F,H){return H&&Array.isArray(F.items)?F.items.filter(k=>(0,a.default)(k.section)?x(F.section,H):!!x(k.section,H)).map(k=>({...k,section:H})):[]}function V(F){const H=(0,s.default)(F),k=[];for(const O of H){let J=function(oe,fe){const de=W(oe,fe);$.push({...A,section:fe,items:de})};const A=(0,s.default)((0,l.default)(O,["items"])),$=[];if(Array.isArray(O.section))for(const oe of O.section)J(O,oe);else if(O.section){const{section:oe}=O;J(O,oe)}else if(O.items&&O.items.length>0){const oe=O.items.reduce((de,me)=>{const{section:ge=[y]}=me||{};return de.push(...ge),de},[]),fe=[...new Set(oe)];for(const de of fe)J(O,de)}else $.push({...O,section:y});k.push(...$)}return k}function Q(F=[]){const H=(0,s.default)(F);return H.reduceRight((k,O,A)=>{if(O.parent){const $=H.find(J=>O.section&&J.section?J.section===O.section&&J.id===O.parent:J.id===O.parent);$&&($.items||($.items=[]),$.items=[O,...$.items]),H.splice(A,1)}return null},null),H}function te(F,H=[]){const k=Q(F);return P(k,A=>{if(A?.component&&(H.some($=>$.name===A.component)||(A.visible=!1)),A.items&&A.items.length)for(let $=A.items.length-1;$>=0;$--)A.items[$].visible===!1&&A.items.splice($,1)},{key:"items"}),k.filter(A=>!(A.visible===!1||A.items&&Array.isArray(A.items)&&A.items.length>0&&A.items?.every($=>$.visible===!1)))}function X(F){return F.map(H=>H.items&&Array.isArray(H.items)&&H.items.length===1&&["header","footer","",void 0,null].includes(H.section)?H.items[0]:H)}const ee=F=>{const[H,k]=(0,p.default)(F,O=>O.id==="/team");return[...H,...k]};e.sortRootNavigation=ee;const q=F=>{const[,H]=(0,p.default)(F,k=>{const O=typeof k.title=="string"?k.title:k.title?.en;return k.id==="/team"&&O==="Access"||k.id==="/dashboard"&&O==="Blocklet"});return H};e.cleanOldNavigationHistory=q;function re(F={},H={}){const{beforeProcess:k=ce=>ce}=H,{navigationList:O,components:A}=U(F),$=new Map;O.forEach(ce=>{ce.items?.forEach(ae=>{$.set((0,c.joinURL)(ce.id,ae.id),ae)})}),F?.settings?.navigations&&(Array.isArray(F.settings.navigations)?F.settings.navigations=[...F.settings.navigations].filter(ce=>!(ce?.parent==="/team"&&ce.from==="team-tmpl")).map(ce=>{if(ce.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(ce,"private")){const ae=$.get(ce.id);ae&&Object.prototype.hasOwnProperty.call(ae,"private")&&(ce.private=ae.private)}return ce}):F.settings.navigations=[]);const J=C(q(F?.settings?.navigations||[])).map(N),oe=G(k(O)),fe=z(oe),me=V(fe).reduce((ce,ae)=>["bottom","social","sessionManager","userCenter"].includes(ae.section)&&ae.items&&ae.items.length>0?(ce.push(...ae.items.map(fr=>{const{section:ti}=ae,ri=R(ae.link,fr.link),ni=[ae.component,fr.component].filter(Boolean).join(".");return{...fr,section:ti,link:ri,component:ni,parent:""}})),ce):(ce.push(ae),ce),[]),ge=j(me,{transform(ce,ae){let{component:ke}=ce;return ae?.component&&(ke=[ae.component,ce.component].filter(Boolean).join(".")),N({...ce,component:ke})}});return{navigationList:(0,t.default)(J,ge,(ce,ae)=>{const ke=["id","section"];return(0,i.default)((0,o.default)(ce,ke),(0,o.default)(ae,ke))}),components:A,builtinList:ge}}}(pr)),pr}var Ne=Up();const Fc=I.createContext(null),Ua="/",qp="header",qa={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:`${Ce.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Ce.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:`${Ce.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function li(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const nt=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Vp=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Kp=(e,r)=>{const n=Ne.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(Vp("/team",e("navigation.blockletService"),[nt("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),nt("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),nt("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),nt("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),nt("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),nt("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),nt("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),nt("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Va({name:e}){return v.jsx(uh,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Yp({children:e}){const{blocklet:r,actions:n}=Nt(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=Ne.parseNavigation(r,{beforeProcess(x){const T=$e(x);return["dashboard","userCenter"].forEach(C=>{Object.prototype.hasOwnProperty.call(qa,C)&&qa[C].forEach(_=>{T.some(R=>R.id===_.id)||T.push(_)})}),Kp(t,T)}}),l=or({rawNavigation:$e(i),activeSection:qp,components:o}),s=I.useMemo(()=>Ne.nestNavigationList($e(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const x=Ne.filterNavigation($e(l.rawNavigation),o);return Ne.joinLink(x,o)},[o,l.rawNavigation]),u=I.useCallback(x=>{if(!x.id)return"";const T=Ne.flattenNavigation(Ne.joinLink(s,o)),C=T.find(_=>_.id===x.id);if(C?.component){if(!o.some(_=>_.name===C.component))return v.jsx(Va,{name:C.component})}else if(C.parent){const _=T.find(R=>R.id===C.parent);if(_?.component&&!o.some(R=>R.name===_.component))return v.jsx(Va,{name:_.component})}return C?.link},[s,o]),f=I.useCallback(x=>{l.activeSection=x},[l]),d=I.useCallback(x=>{const T=[];Ne.deepWalk(x,(_,R)=>{const E={...Dt(_,["children","expand"]),parent:R?.id};T.push(E)});const C=$e(l.rawNavigation).filter(_=>{if(!l.activeSection)return!1;const R=T.find(E=>li(E,_));return R?!Ne.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...C,...T]},[l]),h=I.useCallback((x=[])=>{const T=$e(l.rawNavigation).map(C=>{const _=x.find(R=>li({...R,section:l.activeSection},C));return _?{...C,..._}:C});l.rawNavigation=T},[l]),p=I.useCallback((x,T=Ua)=>x.map(_=>{const E=o.find(U=>U.name===_.component)?.link||T,j=_.items||[],{link:N}=_;return{title:_.title,description:_.description,subtitle:u(_),link:N,icon:_.icon,children:p(j,N||Ua),section:_.section,visible:_.visible,parent:_.parent,component:_.component,id:_.id,role:_.role,from:_.from,__base:E}}),[o,u]),g=I.useCallback(x=>{h([x])},[h]),m=I.useCallback(x=>{const T=l.rawNavigation.filter(C=>C.id===x||C.parent===x).map(C=>C.id);l.rawNavigation=$e(l.rawNavigation).filter(C=>!T.includes(C.id))},[l]),y=I.useCallback((x={},T=-1)=>{const C={...x,id:sh.nanoid(),section:l.activeSection,visible:!0},_=[...l.rawNavigation],R=_.filter(E=>E.section===l.activeSection);if(T<0||T>R.length-1)_.push(C);else{const E=R[T],j=_.findIndex(N=>li(N,E));_.splice(j,0,C)}return l.rawNavigation=_,C},[l]),b=I.useCallback(x=>{const C=$e(s).filter(_=>Ne.isMatchSection(_.section,x));return p(C)},[s,p]),w=I.useCallback(async x=>{const C=x.map(_=>ch(_,dh)).map(_=>{const R={..._};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(C)},[n]),D=I.useCallback(async()=>{await w([]),l.rawNavigation=$e(a)},[w,l,a]),P=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:g,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:w,resetNavigation:D}),[l,c,o,u,f,g,m,y,d,b,w,D]);return v.jsx(Fc.Provider,{value:P,children:e})}function Bc(){const e=I.useContext(Fc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},si,Ka;function Jp(){if(Ka)return si;Ka=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 xr=="object"&&xr&&xr.Object===Object&&xr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,h=Math.max,p=Math.min,g=function(){return u.Date.now()};function m(x,T,C){var _,R,E,j,N,U,z=0,G=!1,W=!1,V=!0;if(typeof x!="function")throw new TypeError(e);T=P(T)||0,b(C)&&(G=!!C.leading,W="maxWait"in C,E=W?h(P(C.maxWait)||0,T):E,V="trailing"in C?!!C.trailing:V);function Q(O){var A=_,$=R;return _=R=void 0,z=O,j=x.apply($,A),j}function te(O){return z=O,N=setTimeout(q,T),G?Q(O):j}function X(O){var A=O-U,$=O-z,J=T-A;return W?p(J,E-$):J}function ee(O){var A=O-U,$=O-z;return U===void 0||A>=T||A<0||W&&$>=E}function q(){var O=g();if(ee(O))return re(O);N=setTimeout(q,X(O))}function re(O){return N=void 0,V&&_?Q(O):(_=R=void 0,j)}function F(){N!==void 0&&clearTimeout(N),z=0,_=U=R=N=void 0}function H(){return N===void 0?j:re(g())}function k(){var O=g(),A=ee(O);if(_=arguments,R=this,U=O,A){if(N===void 0)return te(U);if(W)return N=setTimeout(q,T),Q(U)}return N===void 0&&(N=setTimeout(q,T)),j}return k.cancel=F,k.flush=H,k}function y(x,T,C){var _=!0,R=!0;if(typeof x!="function")throw new TypeError(e);return b(C)&&(_="leading"in C?!!C.leading:_,R="trailing"in C?!!C.trailing:R),m(x,T,{leading:_,maxWait:T,trailing:R})}function b(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function w(x){return!!x&&typeof x=="object"}function D(x){return typeof x=="symbol"||w(x)&&d.call(x)==n}function P(x){if(typeof x=="number")return x;if(D(x))return r;if(b(x)){var T=typeof x.valueOf=="function"?x.valueOf():x;x=b(T)?T+"":T}if(typeof x!="string")return x===0?x:+x;x=x.replace(t,"");var C=o.test(x);return C||a.test(x)?l(x.slice(2),C?2:8):i.test(x)?r:+x}return si=y,si}var gr={exports:{}},xt={exports:{}},Qp=xt.exports,Ya;function Xp(){return Ya||(Ya=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?xt.exports=function(){return performance.now()}:typeof hr<"u"&&hr!==null&&hr.hrtime?(xt.exports=function(){return(e()-i)/1e6},r=hr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=hr.uptime()*1e9,i=t-o):Date.now?(xt.exports=function(){return Date.now()-n},n=Date.now()):(xt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Qp)),xt.exports}var Ja;function Zp(){if(Ja)return gr.exports;Ja=1;for(var e=Xp(),r=typeof window>"u"?xr: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(f){if(c.length===0){var d=e(),h=Math.max(0,u-(d-l));l=h+d,setTimeout(function(){var p=c.slice(0);c.length=0;for(var g=0;g<p.length;g++)if(!p[g].cancelled)try{p[g].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(h))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return gr.exports=function(f){return i.call(r,f)},gr.exports.cancel=function(){o.apply(r,arguments)},gr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},gr.exports}var rn={},Qa;function eg(){if(Qa)return rn;Qa=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return rn}var zt={},Xa;function tg(){if(Xa)return zt;Xa=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.noop=e,zt.intBetween=r,zt.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 zt}var Za;function rg(){if(Za)return Ke;Za=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=_,Ke.createVerticalStrength=R,Ke.createScrollingComponent=N,Ke.default=U,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(fc()),r=c(hc()),n=fh(),t=c(Jp()),i=c(Zp()),o=c(eg()),a=cp,l=c(hh()),s=tg();function c(z){return z&&z.__esModule?z:{default:z}}function u(z){if(z&&z.__esModule)return z;var G={};if(z!=null){for(var W in z)if(Object.prototype.hasOwnProperty.call(z,W)){var V=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(z,W):{};V.get||V.set?Object.defineProperty(G,W,V):G[W]=z[W]}}return G.default=z,G}function f(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(W){return typeof W}:f=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},f(z)}function d(){return d=Object.assign||function(z){for(var G=1;G<arguments.length;G++){var W=arguments[G];for(var V in W)Object.prototype.hasOwnProperty.call(W,V)&&(z[V]=W[V])}return z},d.apply(this,arguments)}function h(z,G){if(z==null)return{};var W=p(z,G),V,Q;if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(z);for(Q=0;Q<te.length;Q++)V=te[Q],!(G.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(z,V)&&(W[V]=z[V])}return W}function p(z,G){if(z==null)return{};var W={},V=Object.keys(z),Q,te;for(te=0;te<V.length;te++)Q=V[te],!(G.indexOf(Q)>=0)&&(W[Q]=z[Q]);return W}function g(z,G){if(!(z instanceof G))throw new TypeError("Cannot call a class as a function")}function m(z,G){for(var W=0;W<G.length;W++){var V=G[W];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(z,V.key,V)}}function y(z,G,W){return G&&m(z.prototype,G),z}function b(z,G){return G&&(f(G)==="object"||typeof G=="function")?G:x(z)}function w(z){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(W){return W.__proto__||Object.getPrototypeOf(W)},w(z)}function D(z,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(G&&G.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),G&&P(z,G)}function P(z,G){return P=Object.setPrototypeOf||function(V,Q){return V.__proto__=Q,V},P(z,G)}function x(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function T(z,G,W){return G in z?Object.defineProperty(z,G,{value:W,enumerable:!0,configurable:!0,writable:!0}):z[G]=W,z}var C=150;function _(z){return function(W,V){var Q=W.x,te=W.w,X=W.y,ee=W.h,q=Math.min(te/2,z),re=V.x>=Q&&V.x<=Q+te,F=re&&V.y>=X&&V.y<=X+ee;if(F){if(V.x<Q+q)return(V.x-Q-q)/q;if(V.x>Q+te-q)return-(Q+te-V.x-q)/q}return 0}}function R(z){return function(W,V){var Q=W.y,te=W.h,X=W.x,ee=W.w,q=Math.min(te/2,z),re=V.y>=Q&&V.y<=Q+te,F=re&&V.x>=X&&V.x<=X+ee;if(F){if(V.y<Q+q)return(V.y-Q-q)/q;if(V.y>Q+te-q)return-(Q+te-V.y-q)/q}return 0}}var E=_(C);Ke.defaultHorizontalStrength=E;var j=R(C);Ke.defaultVerticalStrength=j;function N(z){var G=function(W){D(V,W);function V(Q,te){var X;return g(this,V),X=b(this,w(V).call(this,Q,te)),T(x(x(X)),"updateScrolling",(0,t.default)(function(ee){var q=X.container.getBoundingClientRect(),re=q.left,F=q.top,H=q.width,k=q.height,O={x:re,y:F,w:H,h:k},A=(0,s.getCoords)(ee),$=X.props,J=$.horizontalStrength,oe=$.verticalStrength;X.scaleX=J(O,A),X.scaleY=oe(O,A),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),T(x(x(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(V,[{key:"componentDidMount",value:function(){var te=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 te.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 te=this.props.dragDropManager,X=te.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 te=this,X=0,ee=function q(){var re=te.scaleX,F=te.scaleY,H=te.container,k=te.props,O=k.strengthMultiplier,A=k.onScrollChange;if(O===0||re+F===0){te.stopScrolling();return}if(X+=1,X%2){var $=H.scrollLeft,J=H.scrollTop,oe=H.scrollWidth,fe=H.scrollHeight,de=H.clientWidth,me=H.clientHeight,ge=re?H.scrollLeft=(0,s.intBetween)(0,oe-de,$+re*O):$,De=F?H.scrollTop=(0,s.intBetween)(0,fe-me,J+F*O):J;A(ge,De)}te.frame=(0,i.default)(q)};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 te=this.props;te.strengthMultiplier,te.verticalStrength,te.horizontalStrength,te.onScrollChange;var X=h(te,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(z,d({ref:this.wrappedInstance},X))}}]),V}(e.Component);return T(G,"displayName","Scrolling(".concat((0,o.default)(z),")")),T(G,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),T(G,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:E,strengthMultiplier:30}),(0,l.default)(G,z)}function U(z){var G=N(z);return function(W){return e.default.createElement(a.DragDropContextConsumer,null,function(V){var Q=V.dragDropManager;return Q===void 0?null:e.default.createElement(G,d({},W,{dragDropManager:Q}))})}}return Ke}var vn=rg();const ng=zn(vn);var ig=up();const el=zn(ig);function Gc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function $c(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Wc(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}}Gc.__suppressDeprecationWarning=!0;$c.__suppressDeprecationWarning=!0;Wc.__suppressDeprecationWarning=!0;function qr(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-DPXRDGCk.js","./index-tJqcQJw8.js","./index-DGkT7afN.css","./url-join-DekEkeTk.js","./index-BFj_BZkU.js","./_createAggregator-BRC6hvO7.js","./depsEqual-DUSDIMu_.js","./index-BpHIZRoQ.js","./index-DRYJ0xIl.js","./toUpper-DFzZf5e9.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
+ import{hz as Hf,hA as Uf,gt as qf,ds as Vf,hB as Kf,dt as Yf,bL as cc,bM as Jf,bJ as Qf,bK as Xf,bO as uc,dw as Ln,hC as Zf,eC as eh,hm as th,gS as rh,gP as dc,hD as nh,gx as ih,fo as oh,eD as ah,h9 as lh,m as Ee,a3 as $e,y as qe,E as Ce,aP as or,r as I,j as v,c2 as Dt,J as sh,f9 as ch,eN as uh,hq as dh,dv as xr,ey as hr,dg as fc,dA as fh,hE as hh,dz as hc,bd as zn,dN as Xt,hF as B,eZ as K,eG as ph,hG as Ur,be as Z,o as S,dL as jn,aQ as To,hH as _o,cw as ii,aE as be,b8 as mt,N as ie,ag as gh,b as kt,cr as ve,b9 as Po,dB as Yt,T as Ie,a4 as Oe,b1 as Hi,dH as Zt,hI as vh,bn as pc,F as Fn,hJ as mh,hK as bh,t as Ht,fl as Ui,az as yh,dd as Ve,fb as gc,C as Sh,bE as xh,hL as ka,O as ko,f8 as wh,H as wr,Q as vc,f5 as mc,$ as Ch,v as bc,hM as yc,f as Et,dK as Ih,bu as Rh,gB as Sc,dI as Tr,a7 as Dh,a8 as Th,hN as Oa,hO as xc,hP as _h,hQ as Ph,fP as wc,fc as kh,gF as Oh,gD as Eh,gN as Nh,hR as Mh,hS as Ah,ga as Bn,gI as Lh,hT as Cn,hU as Cc,by as Ae,L as Ic,z as Oo,hV as Ea,hW as Rc,hX as qi,hY as zh,hZ as jh,s as ar,h_ as Fh,f4 as Bh,cv as Dc,h$ as Gh,bB as $h,i0 as Wh,i1 as Hh,i2 as Uh,i3 as qh,i4 as Vh,i5 as Tc,i6 as Kh,aC as _c,e$ as Pc,i7 as Eo,i8 as Yh,hi as kc,b_ as ot,i9 as Jh,b5 as Qh,cA as Ut,ia as Xh,cP as Zh,ib as ep,G as Na,dn as oi,eH as Ma,dM as tp,ic as rp,a5 as Oc,Y as Aa,dG as Ze,id as La,R as np,S as za,U as ja}from"./index-tJqcQJw8.js";import{r as ip}from"./omit-Dd3E6q9F.js";import{r as op}from"./cloneDeep-DiUBoCJs.js";import{r as ap}from"./index-BFj_BZkU.js";import{c as lp,u as sp}from"./_createAggregator-BRC6hvO7.js";import{u as Nt}from"./blocklet-C03sDJ1i.js";import{H as cp,G as up,M as dp,N as fp,O as Fa,K as hp,L as pp}from"./index-hv--3OFd.js";import{_ as ye,a as Se,b as Fe,c as Be,d as Ge,e as gp,f as Ec,u as ue,g as ne,r as Ar,w as In,h as Nc,i as Mt,j as Mc,k as vp,l as mp,o as Vi}from"./raf-schd.esm-CLovL9Is.js";import{_ as M,b as Ba,c as bp,a as yp,d as Sp}from"./redux-DfszZyTl.js";import{_ as xp}from"./typeof-QjJsDpFa.js";import{u as Ac,b as wp}from"./team-DV-g0zdM.js";import{b as Cp}from"./actions-D8IVwECn.js";import{u as Ip,a as Rp,C as rt}from"./index.esm-DEWYqPkv.js";import{S as Ki}from"./simple-select-CEHYECyj.js";import{b as Dp,a as Ga}from"./html-title-CLvLOLbR.js";import{C as Lc}from"./Clear-dbJWv3QG.js";import{A as Tp}from"./ArrowDropDown-BbXAaeVr.js";import{a as _p}from"./api-TFCv4qOf.js";import{A as Pp}from"./Autocomplete-DjYVg0xw.js";import{L as kp}from"./ListItemButton-CBCcz25V.js";import{u as zc}from"./use-mobile-CnqtSdkW.js";import{e as Op}from"./client-1fyhaZ1u.js";import{I as Ep}from"./iframe-CujpH5O-.js";import{B as ai}from"./ButtonGroup-CF6fFlve.js";import{L as $a}from"./LoadingButton-B2KbS3tl.js";import"./depsEqual-DUSDIMu_.js";import"./url-evaluation-DWvC8Wb1.js";import"./useLocalStorage-DnHseBMC.js";import"./MoreVert-B0v12xlt.js";import"./get-safe-url-DL1Ksc1t.js";import"./permission-BdpMR93f.js";import"./ListSubheader-BYRJFOMa.js";import"./getValidReactChildren-DV_bKjsu.js";var Np=Hf(function(){return Uf?sessionStorage:void 0});function Mp(e,r){return qf(r,function(n){return e[n]})}function Ap(e){return e==null?[]:Mp(e,Vf(e))}var Lp=Kf.isFinite;function Wa(e){return typeof e=="number"&&Lp(e)}function zp(e){return typeof e=="number"&&e==Yf(e)}var jp=lp(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const Fp=Object.freeze(Object.defineProperty({__proto__:null,default:jp},Symbol.toStringTag,{value:"Module"}));var Bp=cc(function(e){var r=Jf(e);return r=typeof r=="function"?r:void 0,Qf(Xf(e,1,uc,!0),void 0,r)});const Gp=Object.freeze(Object.defineProperty({__proto__:null,default:Bp},Symbol.toStringTag,{value:"Module"}));var jc=cc(function(e,r){return uc(e)?Cp(e,r):[]}),pr={};const $p=Ln(Gp),Wp=Ln(Zf),Hp=Ln(Fp);var Ha;function Up(){return Ha||(Ha=1,function(e){var r=pr&&pr.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=re,e.deepWalk=P,e.isMatchSection=x,e.nestNavigationList=Q,e.filterNavigation=te,e.cleanOrphanNavigation=X,e.joinLink=E,e.flattenNavigation=j,e.splitNavigationBySection=V;const n=eh(),t=r($p),i=r(th),o=r(rh),a=r(Wp),l=r(ip),s=r(op),c=lh(),u=r(ap()),f=r(dc()),d=r(nh),h=r(ih),p=r(Hp),g=oh(),m=ah();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return m.checkLink}});const y="header",b="/",w="/",D="/";function P(F,H=()=>{},{key:k="children",order:O="first"}={}){function A($,{index:J=0,parent:oe=null,level:fe=0}={}){Array.isArray($)?$.forEach((de,me)=>{A(de,{index:me,parent:oe,level:fe+1})}):$&&(O==="first"&&H($,oe,{index:J,level:fe}),A($[k],{parent:$,level:fe}),O==="last"&&H($,oe,{index:J,level:fe}))}A(F)}function x(F,H){return H===y&&(0,a.default)(F)?!0:Array.isArray(F)?F.includes(H):F===H}function T(F){try{return JSON.parse(F)}catch{return F}}function C(F){return F.map(H=>{const k={...H};return k.role&&(k.role=T(k.role)),k.section&&(k.section=T(k.section)),k.title&&(k.title=T(k.title)),k.description&&(k.description=T(k.description)),k.link&&(k.link=T(k.link)),k})}function _(F="/",H=""){if((0,f.default)(H||""))return H;const k=u.default.join(F,H||w);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function R(F,H,{strict:k=!0}={}){let O=F,A=H;return k||(O=O||"/",A=A||"/"),(0,d.default)(O)&&(0,h.default)(A)&&(0,m.checkLink)(A)?Object.keys(O).reduce(($,J)=>($[J]=_(O[J],A),$),{}):(0,h.default)(O)&&(0,m.checkLink)(O)&&(0,d.default)(A)?Object.keys(A).reduce(($,J)=>($[J]=_(O,A[J]),$),{}):(0,h.default)(O)&&(0,h.default)(A)?(0,m.checkLink)(O)||(0,m.checkLink)(A)?_(O,A):A:(0,d.default)(O)&&(0,d.default)(A)?[...new Set([...Object.keys(O),...Object.keys(A)])].reduce((J,oe)=>(J[oe]=_(O[oe],A[oe]),J),{}):A}function E(F,H){const k=(0,s.default)(F);return P(k,(O,A)=>{const $=O.component||O.child;if($){const J=H.find(oe=>oe.name===$);J&&(O.link=R(J.link,O.link,{strict:!1}))}else A&&(O.link=R(A.link,O.link))},{key:"items"}),k}function j(F=[],{depth:H=1,transform:k=O=>O}={}){const O=(0,s.default)(F),A=[];return P(O,($,J,{level:oe})=>{if(oe>=H){const{items:fe=[]}=$;if(fe&&Array.isArray(fe)&&fe.length>0){delete $.items;const de=fe.map(me=>k(me,$));if(J)J.items.push(...de);else{const me=k((0,l.default)($,["items"]),J);A.push(me,...de)}}else if(oe===1){const de=k((0,l.default)($,["items"]),J);A.push(de)}}else oe===1&&A.push($)},{key:"items",order:"last"}),A}function N(F){if(F.section!=="bottomNavigation")return F;const H={...F};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const O=H[k];typeof O=="string"&&(H[k]={en:O})}),H}function U(F={}){const H=[];function k(A,$={}){const J=[],{children:oe=[],meta:fe={}}=A,de=(0,s.default)(fe?.navigation||[]);(0,g.hasStartEngine)(fe)&&A.meta?.capabilities?.navigation!==!1&&J.push(...de);const me=$.name||"",ge=$.mountPoint||b,De=A===F?"":fe.name||"",ce=A===F?"":A.mountPoint||b;for(const ae of oe){if(!(0,g.hasStartEngine)(ae.meta))continue;const ke=ae.meta.name,fr=ae.mountPoint,ti=[me,De,ke].filter(Boolean).join("."),ri=ae.meta.navigation||[],ni=(0,c.joinURL)(ge,ce,fr);ae.meta?.capabilities?.navigation!==!1&&H.push({did:ae.meta.did,name:ti,link:ni,title:ae.meta.title||"",navigation:ri.map(Je=>({section:y,...Je}))});const Lt=de.find(Je=>Je.component?Je.component===ke:!1);if(Lt){if(!Lt.link)if(ae.meta.navigation&&ae.meta.navigation.length>0){const Je=k(ae,{mountPoint:ce,name:De});Je.length>0&&(Lt.items=Lt.items??[],Lt.items.push(...Je))}else Lt.link=w}else if(ae.meta?.capabilities?.navigation!==!1){const Je=k(ae,{mountPoint:ce,name:De}),tn={title:ae.meta.title,component:ke,id:ae.meta.did};Je.length>0?(tn.items=Je,tn.link=void 0):tn.link=w,J.push(tn)}}return J}return{navigationList:k(F),components:H}}function z(F){const H=(0,s.default)(F).filter(k=>k.id);return P(H,(k,O)=>{if(k.items&&k.items.length){for(let A=k.items.length-1;A>=0;A--)k.items[A].id||k.items.splice(A,1);k.items.length===0&&k.component&&(k.link=k.link||w)}O&&(k.parent=O.id,k.id=[O.id,k.id].join(D)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),H}function G(F,H=2){const k=(0,s.default)(F),O=j(k,{depth:H,transform:(A,$)=>($&&(A._parent||(A._parent=$.id,$.component||(A.link=R($.link,A.link))),A.section=A.section||$.section||[y],A.visible=A.visible??$.visible,$.role&&(A.role=A.role||$.role)),A.component=[$.component,A.component].filter(Boolean).join("."),A)});return P(O,A=>{A.items&&A.items.length>0&&A.items.reduceRight(($,J)=>{if(J._parent){const oe=A.items.findIndex(fe=>fe.id===J._parent);oe>=0&&A.items.splice(oe,1),delete J._parent}return null},null)},{key:"items"}),O}function W(F,H){return H&&Array.isArray(F.items)?F.items.filter(k=>(0,a.default)(k.section)?x(F.section,H):!!x(k.section,H)).map(k=>({...k,section:H})):[]}function V(F){const H=(0,s.default)(F),k=[];for(const O of H){let J=function(oe,fe){const de=W(oe,fe);$.push({...A,section:fe,items:de})};const A=(0,s.default)((0,l.default)(O,["items"])),$=[];if(Array.isArray(O.section))for(const oe of O.section)J(O,oe);else if(O.section){const{section:oe}=O;J(O,oe)}else if(O.items&&O.items.length>0){const oe=O.items.reduce((de,me)=>{const{section:ge=[y]}=me||{};return de.push(...ge),de},[]),fe=[...new Set(oe)];for(const de of fe)J(O,de)}else $.push({...O,section:y});k.push(...$)}return k}function Q(F=[]){const H=(0,s.default)(F);return H.reduceRight((k,O,A)=>{if(O.parent){const $=H.find(J=>O.section&&J.section?J.section===O.section&&J.id===O.parent:J.id===O.parent);$&&($.items||($.items=[]),$.items=[O,...$.items]),H.splice(A,1)}return null},null),H}function te(F,H=[]){const k=Q(F);return P(k,A=>{if(A?.component&&(H.some($=>$.name===A.component)||(A.visible=!1)),A.items&&A.items.length)for(let $=A.items.length-1;$>=0;$--)A.items[$].visible===!1&&A.items.splice($,1)},{key:"items"}),k.filter(A=>!(A.visible===!1||A.items&&Array.isArray(A.items)&&A.items.length>0&&A.items?.every($=>$.visible===!1)))}function X(F){return F.map(H=>H.items&&Array.isArray(H.items)&&H.items.length===1&&["header","footer","",void 0,null].includes(H.section)?H.items[0]:H)}const ee=F=>{const[H,k]=(0,p.default)(F,O=>O.id==="/team");return[...H,...k]};e.sortRootNavigation=ee;const q=F=>{const[,H]=(0,p.default)(F,k=>{const O=typeof k.title=="string"?k.title:k.title?.en;return k.id==="/team"&&O==="Access"||k.id==="/dashboard"&&O==="Blocklet"});return H};e.cleanOldNavigationHistory=q;function re(F={},H={}){const{beforeProcess:k=ce=>ce}=H,{navigationList:O,components:A}=U(F),$=new Map;O.forEach(ce=>{ce.items?.forEach(ae=>{$.set((0,c.joinURL)(ce.id,ae.id),ae)})}),F?.settings?.navigations&&(Array.isArray(F.settings.navigations)?F.settings.navigations=[...F.settings.navigations].filter(ce=>!(ce?.parent==="/team"&&ce.from==="team-tmpl")).map(ce=>{if(ce.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(ce,"private")){const ae=$.get(ce.id);ae&&Object.prototype.hasOwnProperty.call(ae,"private")&&(ce.private=ae.private)}return ce}):F.settings.navigations=[]);const J=C(q(F?.settings?.navigations||[])).map(N),oe=G(k(O)),fe=z(oe),me=V(fe).reduce((ce,ae)=>["bottom","social","sessionManager","userCenter"].includes(ae.section)&&ae.items&&ae.items.length>0?(ce.push(...ae.items.map(fr=>{const{section:ti}=ae,ri=R(ae.link,fr.link),ni=[ae.component,fr.component].filter(Boolean).join(".");return{...fr,section:ti,link:ri,component:ni,parent:""}})),ce):(ce.push(ae),ce),[]),ge=j(me,{transform(ce,ae){let{component:ke}=ce;return ae?.component&&(ke=[ae.component,ce.component].filter(Boolean).join(".")),N({...ce,component:ke})}});return{navigationList:(0,t.default)(J,ge,(ce,ae)=>{const ke=["id","section"];return(0,i.default)((0,o.default)(ce,ke),(0,o.default)(ae,ke))}),components:A,builtinList:ge}}}(pr)),pr}var Ne=Up();const Fc=I.createContext(null),Ua="/",qp="header",qa={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:`${Ce.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Ce.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:`${Ce.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function li(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const nt=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Vp=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Kp=(e,r)=>{const n=Ne.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(Vp("/team",e("navigation.blockletService"),[nt("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),nt("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),nt("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),nt("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),nt("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),nt("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),nt("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),nt("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Va({name:e}){return v.jsx(uh,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Yp({children:e}){const{blocklet:r,actions:n}=Nt(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=Ne.parseNavigation(r,{beforeProcess(x){const T=$e(x);return["dashboard","userCenter"].forEach(C=>{Object.prototype.hasOwnProperty.call(qa,C)&&qa[C].forEach(_=>{T.some(R=>R.id===_.id)||T.push(_)})}),Kp(t,T)}}),l=or({rawNavigation:$e(i),activeSection:qp,components:o}),s=I.useMemo(()=>Ne.nestNavigationList($e(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const x=Ne.filterNavigation($e(l.rawNavigation),o);return Ne.joinLink(x,o)},[o,l.rawNavigation]),u=I.useCallback(x=>{if(!x.id)return"";const T=Ne.flattenNavigation(Ne.joinLink(s,o)),C=T.find(_=>_.id===x.id);if(C?.component){if(!o.some(_=>_.name===C.component))return v.jsx(Va,{name:C.component})}else if(C.parent){const _=T.find(R=>R.id===C.parent);if(_?.component&&!o.some(R=>R.name===_.component))return v.jsx(Va,{name:_.component})}return C?.link},[s,o]),f=I.useCallback(x=>{l.activeSection=x},[l]),d=I.useCallback(x=>{const T=[];Ne.deepWalk(x,(_,R)=>{const E={...Dt(_,["children","expand"]),parent:R?.id};T.push(E)});const C=$e(l.rawNavigation).filter(_=>{if(!l.activeSection)return!1;const R=T.find(E=>li(E,_));return R?!Ne.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...C,...T]},[l]),h=I.useCallback((x=[])=>{const T=$e(l.rawNavigation).map(C=>{const _=x.find(R=>li({...R,section:l.activeSection},C));return _?{...C,..._}:C});l.rawNavigation=T},[l]),p=I.useCallback((x,T=Ua)=>x.map(_=>{const E=o.find(U=>U.name===_.component)?.link||T,j=_.items||[],{link:N}=_;return{title:_.title,description:_.description,subtitle:u(_),link:N,icon:_.icon,children:p(j,N||Ua),section:_.section,visible:_.visible,parent:_.parent,component:_.component,id:_.id,role:_.role,from:_.from,__base:E}}),[o,u]),g=I.useCallback(x=>{h([x])},[h]),m=I.useCallback(x=>{const T=l.rawNavigation.filter(C=>C.id===x||C.parent===x).map(C=>C.id);l.rawNavigation=$e(l.rawNavigation).filter(C=>!T.includes(C.id))},[l]),y=I.useCallback((x={},T=-1)=>{const C={...x,id:sh.nanoid(),section:l.activeSection,visible:!0},_=[...l.rawNavigation],R=_.filter(E=>E.section===l.activeSection);if(T<0||T>R.length-1)_.push(C);else{const E=R[T],j=_.findIndex(N=>li(N,E));_.splice(j,0,C)}return l.rawNavigation=_,C},[l]),b=I.useCallback(x=>{const C=$e(s).filter(_=>Ne.isMatchSection(_.section,x));return p(C)},[s,p]),w=I.useCallback(async x=>{const C=x.map(_=>ch(_,dh)).map(_=>{const R={..._};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(C)},[n]),D=I.useCallback(async()=>{await w([]),l.rawNavigation=$e(a)},[w,l,a]),P=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:g,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:w,resetNavigation:D}),[l,c,o,u,f,g,m,y,d,b,w,D]);return v.jsx(Fc.Provider,{value:P,children:e})}function Bc(){const e=I.useContext(Fc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},si,Ka;function Jp(){if(Ka)return si;Ka=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 xr=="object"&&xr&&xr.Object===Object&&xr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,h=Math.max,p=Math.min,g=function(){return u.Date.now()};function m(x,T,C){var _,R,E,j,N,U,z=0,G=!1,W=!1,V=!0;if(typeof x!="function")throw new TypeError(e);T=P(T)||0,b(C)&&(G=!!C.leading,W="maxWait"in C,E=W?h(P(C.maxWait)||0,T):E,V="trailing"in C?!!C.trailing:V);function Q(O){var A=_,$=R;return _=R=void 0,z=O,j=x.apply($,A),j}function te(O){return z=O,N=setTimeout(q,T),G?Q(O):j}function X(O){var A=O-U,$=O-z,J=T-A;return W?p(J,E-$):J}function ee(O){var A=O-U,$=O-z;return U===void 0||A>=T||A<0||W&&$>=E}function q(){var O=g();if(ee(O))return re(O);N=setTimeout(q,X(O))}function re(O){return N=void 0,V&&_?Q(O):(_=R=void 0,j)}function F(){N!==void 0&&clearTimeout(N),z=0,_=U=R=N=void 0}function H(){return N===void 0?j:re(g())}function k(){var O=g(),A=ee(O);if(_=arguments,R=this,U=O,A){if(N===void 0)return te(U);if(W)return N=setTimeout(q,T),Q(U)}return N===void 0&&(N=setTimeout(q,T)),j}return k.cancel=F,k.flush=H,k}function y(x,T,C){var _=!0,R=!0;if(typeof x!="function")throw new TypeError(e);return b(C)&&(_="leading"in C?!!C.leading:_,R="trailing"in C?!!C.trailing:R),m(x,T,{leading:_,maxWait:T,trailing:R})}function b(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function w(x){return!!x&&typeof x=="object"}function D(x){return typeof x=="symbol"||w(x)&&d.call(x)==n}function P(x){if(typeof x=="number")return x;if(D(x))return r;if(b(x)){var T=typeof x.valueOf=="function"?x.valueOf():x;x=b(T)?T+"":T}if(typeof x!="string")return x===0?x:+x;x=x.replace(t,"");var C=o.test(x);return C||a.test(x)?l(x.slice(2),C?2:8):i.test(x)?r:+x}return si=y,si}var gr={exports:{}},xt={exports:{}},Qp=xt.exports,Ya;function Xp(){return Ya||(Ya=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?xt.exports=function(){return performance.now()}:typeof hr<"u"&&hr!==null&&hr.hrtime?(xt.exports=function(){return(e()-i)/1e6},r=hr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=hr.uptime()*1e9,i=t-o):Date.now?(xt.exports=function(){return Date.now()-n},n=Date.now()):(xt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Qp)),xt.exports}var Ja;function Zp(){if(Ja)return gr.exports;Ja=1;for(var e=Xp(),r=typeof window>"u"?xr: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(f){if(c.length===0){var d=e(),h=Math.max(0,u-(d-l));l=h+d,setTimeout(function(){var p=c.slice(0);c.length=0;for(var g=0;g<p.length;g++)if(!p[g].cancelled)try{p[g].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(h))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return gr.exports=function(f){return i.call(r,f)},gr.exports.cancel=function(){o.apply(r,arguments)},gr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},gr.exports}var rn={},Qa;function eg(){if(Qa)return rn;Qa=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return rn}var zt={},Xa;function tg(){if(Xa)return zt;Xa=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.noop=e,zt.intBetween=r,zt.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 zt}var Za;function rg(){if(Za)return Ke;Za=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=_,Ke.createVerticalStrength=R,Ke.createScrollingComponent=N,Ke.default=U,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(fc()),r=c(hc()),n=fh(),t=c(Jp()),i=c(Zp()),o=c(eg()),a=cp,l=c(hh()),s=tg();function c(z){return z&&z.__esModule?z:{default:z}}function u(z){if(z&&z.__esModule)return z;var G={};if(z!=null){for(var W in z)if(Object.prototype.hasOwnProperty.call(z,W)){var V=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(z,W):{};V.get||V.set?Object.defineProperty(G,W,V):G[W]=z[W]}}return G.default=z,G}function f(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(W){return typeof W}:f=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},f(z)}function d(){return d=Object.assign||function(z){for(var G=1;G<arguments.length;G++){var W=arguments[G];for(var V in W)Object.prototype.hasOwnProperty.call(W,V)&&(z[V]=W[V])}return z},d.apply(this,arguments)}function h(z,G){if(z==null)return{};var W=p(z,G),V,Q;if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(z);for(Q=0;Q<te.length;Q++)V=te[Q],!(G.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(z,V)&&(W[V]=z[V])}return W}function p(z,G){if(z==null)return{};var W={},V=Object.keys(z),Q,te;for(te=0;te<V.length;te++)Q=V[te],!(G.indexOf(Q)>=0)&&(W[Q]=z[Q]);return W}function g(z,G){if(!(z instanceof G))throw new TypeError("Cannot call a class as a function")}function m(z,G){for(var W=0;W<G.length;W++){var V=G[W];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(z,V.key,V)}}function y(z,G,W){return G&&m(z.prototype,G),z}function b(z,G){return G&&(f(G)==="object"||typeof G=="function")?G:x(z)}function w(z){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(W){return W.__proto__||Object.getPrototypeOf(W)},w(z)}function D(z,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(G&&G.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),G&&P(z,G)}function P(z,G){return P=Object.setPrototypeOf||function(V,Q){return V.__proto__=Q,V},P(z,G)}function x(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function T(z,G,W){return G in z?Object.defineProperty(z,G,{value:W,enumerable:!0,configurable:!0,writable:!0}):z[G]=W,z}var C=150;function _(z){return function(W,V){var Q=W.x,te=W.w,X=W.y,ee=W.h,q=Math.min(te/2,z),re=V.x>=Q&&V.x<=Q+te,F=re&&V.y>=X&&V.y<=X+ee;if(F){if(V.x<Q+q)return(V.x-Q-q)/q;if(V.x>Q+te-q)return-(Q+te-V.x-q)/q}return 0}}function R(z){return function(W,V){var Q=W.y,te=W.h,X=W.x,ee=W.w,q=Math.min(te/2,z),re=V.y>=Q&&V.y<=Q+te,F=re&&V.x>=X&&V.x<=X+ee;if(F){if(V.y<Q+q)return(V.y-Q-q)/q;if(V.y>Q+te-q)return-(Q+te-V.y-q)/q}return 0}}var E=_(C);Ke.defaultHorizontalStrength=E;var j=R(C);Ke.defaultVerticalStrength=j;function N(z){var G=function(W){D(V,W);function V(Q,te){var X;return g(this,V),X=b(this,w(V).call(this,Q,te)),T(x(x(X)),"updateScrolling",(0,t.default)(function(ee){var q=X.container.getBoundingClientRect(),re=q.left,F=q.top,H=q.width,k=q.height,O={x:re,y:F,w:H,h:k},A=(0,s.getCoords)(ee),$=X.props,J=$.horizontalStrength,oe=$.verticalStrength;X.scaleX=J(O,A),X.scaleY=oe(O,A),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),T(x(x(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(V,[{key:"componentDidMount",value:function(){var te=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 te.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 te=this.props.dragDropManager,X=te.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 te=this,X=0,ee=function q(){var re=te.scaleX,F=te.scaleY,H=te.container,k=te.props,O=k.strengthMultiplier,A=k.onScrollChange;if(O===0||re+F===0){te.stopScrolling();return}if(X+=1,X%2){var $=H.scrollLeft,J=H.scrollTop,oe=H.scrollWidth,fe=H.scrollHeight,de=H.clientWidth,me=H.clientHeight,ge=re?H.scrollLeft=(0,s.intBetween)(0,oe-de,$+re*O):$,De=F?H.scrollTop=(0,s.intBetween)(0,fe-me,J+F*O):J;A(ge,De)}te.frame=(0,i.default)(q)};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 te=this.props;te.strengthMultiplier,te.verticalStrength,te.horizontalStrength,te.onScrollChange;var X=h(te,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(z,d({ref:this.wrappedInstance},X))}}]),V}(e.Component);return T(G,"displayName","Scrolling(".concat((0,o.default)(z),")")),T(G,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),T(G,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:E,strengthMultiplier:30}),(0,l.default)(G,z)}function U(z){var G=N(z);return function(W){return e.default.createElement(a.DragDropContextConsumer,null,function(V){var Q=V.dragDropManager;return Q===void 0?null:e.default.createElement(G,d({},W,{dragDropManager:Q}))})}}return Ke}var vn=rg();const ng=zn(vn);var ig=up();const el=zn(ig);function Gc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function $c(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Wc(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}}Gc.__suppressDeprecationWarning=!0;$c.__suppressDeprecationWarning=!0;Wc.__suppressDeprecationWarning=!0;function qr(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 Wu=Object.freeze({left:0,top:0,width:16,height:16}),Tn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Qr=Object.freeze({...Wu,...Tn}),lo=Object.freeze({...Qr,body:"",hidden:!1}),$b=Object.freeze({width:null,height:null}),Hu=Object.freeze({...$b,...Tn});function Wb(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 Hb=/[\s,]+/;function Ub(e,r){r.split(Hb).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Uu={...Hu,preserveAspectRatio:""};function es(e){const r={...Uu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=Wb(n("rotate","")),Ub(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function qb(e,r){for(const n in Uu)if(e[n]!==r[n])return!0;return!1}const Or=/^[a-z0-9]+(-[a-z0-9]+)*$/,Xr=(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&&!yn(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&&!yn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!yn(l,n)?null:l}return null},yn=(e,r)=>e?!!((e.provider===""||e.provider.match(Or))&&(r&&e.prefix===""||e.prefix.match(Or))&&e.name.match(Or)):!1;function Vb(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 ts(e,r){const n=Vb(e,r);for(const t in lo)t in Tn?t in e&&!(t in n)&&(n[t]=Tn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Kb(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 Yb(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=ts(t[l]||i[l],o)}return a(r),n.forEach(a),ts(e,o)}function qu(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=Kb(e);for(const i in t){const o=t[i];o&&(r(i,Yb(e,i,o)),n.push(i))}return n}const Jb={provider:"",aliases:{},not_found:{},...Wu};function Ri(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Vu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ri(e,Jb))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Or)||typeof o.body!="string"||!Ri(o,lo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Or)||typeof a!="string"||!n[a]&&!t[a]||!Ri(o,lo))return null}return r}const _n=Object.create(null);function Qb(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function gt(e,r){const n=_n[e]||(_n[e]=Object.create(null));return n[r]||(n[r]=Qb(e,r))}function Jo(e,r){return Vu(r)?qu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Xb(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function Zb(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(_n)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(_n[i]||{})).forEach(a=>{const l=gt(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let jr=!1;function Ku(e){return typeof e=="boolean"&&(jr=e),jr}function Fr(e){const r=typeof e=="string"?Xr(e,!0,jr):e;if(r){const n=gt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Yu(e,r){const n=Xr(e,!0,jr);if(!n)return!1;const t=gt(n.provider,n.prefix);return Xb(t,n.name,r)}function rs(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),jr&&!r&&!e.prefix){let i=!1;return Vu(e)&&(e.prefix="",qu(e,(o,a)=>{a&&Yu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!yn({provider:r,prefix:n,name:"a"}))return!1;const t=gt(r,n);return!!Jo(t,e)}function ey(e){return!!Fr(e)}function ty(e){const r=Fr(e);return r?{...Qr,...r}:null}function ry(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]=gt(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Ju(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function ny(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||Ju([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let iy=0;function oy(e,r,n){const t=iy++,i=Ju.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 so=Object.create(null);function ns(e,r){so[e]=r}function co(e){return so[e]||so[""]}function ay(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?Xr(i,r,n):i;o&&t.push(o)}),t}var ly={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function sy(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 x=e.resources.slice(0);for(a=[];x.length>1;){const T=Math.floor(Math.random()*x.length);a.push(x[T]),x=x.slice(0,T).concat(x.slice(T+1))}a=a.concat(x)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],h=[];typeof t=="function"&&h.push(t);function p(){f&&(clearTimeout(f),f=null)}function g(){s==="pending"&&(s="aborted"),p(),d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function m(x,T){T&&(h=[]),typeof x=="function"&&h.push(x)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:g}}function b(){s="failed",h.forEach(x=>{x(void 0,u)})}function w(){d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function D(x,T,C){const _=T!=="success";switch(d=d.filter(R=>R!==x),s){case"pending":break;case"failed":if(_||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){u=C,b();return}if(_){u=C,d.length||(a.length?P():b());return}if(p(),w(),!e.random){const R=e.resources.indexOf(x.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",h.forEach(R=>{R(C)})}function P(){if(s!=="pending")return;p();const x=a.shift();if(x===void 0){if(d.length){f=setTimeout(()=>{p(),s==="pending"&&(w(),b())},e.timeout);return}b();return}const T={status:"pending",resource:x,callback:(C,_)=>{D(T,C,_)}};d.push(T),c++,f=setTimeout(P,e.rotate),n(x,r,T.callback)}return setTimeout(P),y}function Qu(e){const r={...ly,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=sy(r,l,s,(f,d)=>{t(),c&&c(f,d)});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 Qo(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),mr=["https://api.simplesvg.com","https://api.unisvg.com"],Sn=[];for(;mr.length>0;)mr.length===1||Math.random()>.5?Sn.push(mr.shift()):Sn.push(mr.pop());qn[""]=Qo({resources:["https://api.iconify.design"].concat(Sn)});function is(e,r){const n=Qo(r);return n===null?!1:(qn[e]=n,!0)}function Vn(e){return qn[e]}function cy(){return Object.keys(qn)}function os(){}const Di=Object.create(null);function uy(e){if(!Di[e]){const r=Vn(e);if(!r)return;const n=Qu(r),t={config:r,redundancy:n};Di[e]=t}return Di[e]}function Xu(e,r,n){let t,i;if(typeof e=="string"){const o=co(e);if(!o)return n(void 0,424),os;i=o.send;const a=uy(e);a&&(t=a.redundancy)}else{const o=Qo(e);if(o){t=Qu(o);const a=e.resources?e.resources[0]:"",l=co(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),os):t.query(r,i,n)().abort}const as="iconify2",Br="iconify",Zu=Br+"-count",ls=Br+"-version",ed=36e5,dy=168;function uo(e,r){try{return e.getItem(r)}catch{}}function Xo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function ss(e,r){try{e.removeItem(r)}catch{}}function fo(e,r){return Xo(e,Zu,r.toString())}function ho(e){return parseInt(uo(e,Zu))||0}const Pt={local:!0,session:!0},td={local:new Set,session:new Set};let Zo=!1;function fy(e){Zo=e}let ln=typeof window>"u"?{}:window;function rd(e){const r=e+"Storage";try{if(ln&&ln[r]&&typeof ln[r].length=="number")return ln[r]}catch{}Pt[e]=!1}function nd(e,r){const n=rd(e);if(!n)return;const t=uo(n,ls);if(t!==as){if(t){const l=ho(n);for(let s=0;s<l;s++)ss(n,Br+s.toString())}Xo(n,ls,as),fo(n,0);return}const i=Math.floor(Date.now()/ed)-dy,o=l=>{const s=Br+l.toString(),c=uo(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{}ss(n,s)}};let a=ho(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,fo(n,a)):td[e].add(l))}function id(){if(!Zo){fy(!0);for(const e in Pt)nd(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=gt(t,i);if(!Jo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function hy(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in Pt)nd(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function py(e,r){Zo||id();function n(t){let i;if(!Pt[t]||!(i=rd(t)))return;const o=td[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=ho(i),!fo(i,a+1))return;const l={cached:Math.floor(Date.now()/ed),provider:e.provider,data:r};return Xo(i,Br+a.toString(),JSON.stringify(l))}r.lastModified&&!hy(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function cs(){}function gy(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ny(e)}))}function vy(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=co(n)))return;o.prepare(n,t,i).forEach(l=>{Xu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Jo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),py(e,s)}catch(c){console.error(c)}gy(e)})})}))}const ea=(e,r)=>{const n=ay(e,!0,Ku()),t=ry(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,cs)}),()=>{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(gt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:f}=s,d=gt(c,u),h=d.pendingIcons||(d.pendingIcons=new Set);h.has(f)||(h.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&vy(s,i[c][u])}),r?oy(r,t,o):cs},my=e=>new Promise((r,n)=>{const t=typeof e=="string"?Xr(e,!0):e;if(!t){n(e);return}ea([t||e],i=>{if(i.length&&t){const o=Fr(t);if(o){r({...Qr,...o});return}}n(e)})});function by(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function yy(e,r){const n=typeof e=="string"?Xr(e,!0,!0):null;if(!n){const o=by(e);return{value:e,data:o}}const t=Fr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ea([n],()=>r(e,n,Fr(n)));return{value:e,name:n,loading:i}}function Ti(e){return e.hasAttribute("inline")}let od=!1;try{od=navigator.vendor.indexOf("Apple")===0}catch{}function Sy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(od||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const xy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,wy=/^-?[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(xy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=wy.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 Cy=e=>e==="unset"||e==="undefined"||e==="none";function ad(e,r){const n={...Qr,...e},t={...Hu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(p=>{const g=[],m=p.hFlip,y=p.vFlip;let b=p.rotate;m?y?b+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):y&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let w;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:w=i.height/2+i.top,g.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,g.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}b%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=po(f,s/c)):(u=a==="auto"?s:a,f=l===null?po(u,c/s):l==="auto"?c:l);const d={},h=(p,g)=>{Cy(g)||(d[p]=g.toString())};return h("width",u),h("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const Iy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Pn=Iy();function Ry(e){Pn=e}function Dy(){return Pn}function Ty(e,r){const n=Vn(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 _y(e){return e===404}const Py=(e,r,n)=>{const t=[],i=Ty(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 ky(e){if(typeof e=="string"){const r=Vn(e);if(r)return r.path}return"/"}const Oy=(e,r,n)=>{if(!Pn){n("abort",424);return}let t=ky(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;Pn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(_y(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)})},Ey={prepare:Py,send:Oy};function us(e,r){switch(e){case"local":case"session":Pt[e]=r;break;case"all":for(const n in Pt)Pt[n]=r;break}}const _i="data-style";let ld="";function Ny(e){ld=e}function ds(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(_i));n||(n=document.createElement("style"),n.setAttribute(_i,_i),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+ld}function sd(){ns("",Ey),Ku(!0);let e;try{e=window}catch{}if(e){if(id(),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"||!rs(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;is(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>us(n,!0),disableCache:n=>us(n,!1),iconExists:ey,getIcon:ty,listIcons:Zb,addIcon:Yu,addCollection:rs,calculateSize:po,buildIcon:ad,loadIcons:ea,loadIcon:my,addAPIProvider:is,appendCustomStyle:Ny,_api:{getAPIConfig:Vn,setAPIModule:ns,sendAPIQuery:Xu,setFetch:Ry,getFetch:Dy,listAPIProviders:cy}}}function cd(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 My(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ay(e){return"data:image/svg+xml,"+My(e)}function Ly(e){return'url("'+Ay(e)+'")'}const go={"background-color":"currentColor"},ud={"background-color":"transparent"},fs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},hs={"-webkit-mask":go,mask:go,background:ud};for(const e in hs){const r=hs[e];for(const n in fs)r[e+"-"+n]=fs[n]}function ps(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function zy(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=cd(i,{...o,width:r.width+"",height:r.height+""}),l=Ly(a),s=t.style,c={"--svg":l,width:ps(o.width),height:ps(o.height),...n?go:ud};for(const u in c)s.setProperty(u,c[u]);return t}let Er;function jy(){try{Er=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Er=null}}function Fy(e){return Er===void 0&&jy(),Er?Er.createHTML(e):e}function By(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=cd(e.body,n);return r.innerHTML=Fy(i),r.firstChild}function gs(e,r){const n=r.icon.data,t=r.customisations,i=ad(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=By(i);break;default:a=zy(i,{...Qr,...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 vs(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function Gy(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=Ti(this);ds(l,s),this._state=vs({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Ti(this),c=this._state;s!==c.inline&&(c.inline=s,ds(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 Ti(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{}gs(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=es(this);(l.attrMode!==c||qb(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=yy(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const h={value:c,name:u,data:f};h.data?this._gotIconData(h):d.icon=h});s.data?this._gotIconData(s):this._state=vs(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,es(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=Sy(l.data.body,c),f=this._state.inline;gs(this._shadowRoot,this._state={rendered:!0,icon:l,inline:f,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=sd();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const $y=Gy()||sd(),{enableCache:ZR,disableCache:eD,iconExists:tD,getIcon:rD,listIcons:nD,addIcon:iD,addCollection:oD,calculateSize:aD,buildIcon:lD,loadIcons:sD,loadIcon:cD,addAPIProvider:uD,_api:dD}=$y,At=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:At(t[n],r,n)}):r(t)),dd=(e,r="children")=>{const n=[];return At(e,t=>n.push(t),r),n},ta=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ta(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),fd=e=>/^https?:\/\//.test(e),hd=e=>/^mailto:/i.test(e.trim()),Wy=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)},pd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>Wy(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},Hy=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((p,g)=>p+i+(g[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,h=p=>f>s-d&&u<n-1&&f+p>s+d;return e.forEach(p=>{const g=i+(p[a]?.length||0)*o;t&&h(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&h(g)&&(u++,f=0,c[u]=[]),c[u].push({...p,group:!0}),f+=i,p[a]&&p[a].forEach(m=>{t&&h(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=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 _o(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%"}}),fd(e))return v.jsx(ii,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?v.jsx(be,{icon:"codicon:blank",height:c||void 0}):o?v.jsx(ii,{component:"span",...t,sx:i,children:v.jsx(be,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),v.jsx(ii,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}const Uy=e=>e.from!=="team-tmpl";function qy({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&gh(e.slice(0,t-1),r.slice(0,i-1)))}function gd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=Nt(),t=n.environments.find(a=>a.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=ve(a=>{if(a?.startsWith("/"))try{return new URL(a,t?.value).href}catch{console.error("Failed to parse url",{url:a,origin:t?.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return Yt(a)&&(s=a[r]),!I.isValidElement(l)&&Yt(l)&&(c=l[r]),v.jsxs(ie,{sx:{display:"flex",alignItems:"center"},children:[v.jsx(Ie,{variant:"subtitle1",sx:{fontSize:16},children:s}),l&&v.jsx(Ie,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:c})]})}return v.jsxs(v.Fragment,{children:[e.icon&&(Po(i(e.icon))?v.jsx(Qe,{size:16,style:{marginRight:4},icon:i(e.icon)}):v.jsx(be,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}gd.propTypes={treeNode:S.object.isRequired};const Vy=mt(ie)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function vd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),v.jsx(Vy,{children:v.jsx(hp,{backend:pp,...i,children:v.jsx(Lv,{generateNodeProps:o=>{const a=Uy(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?v.jsx(be,{icon:"ic:round-drag-indicator"}):v.jsx(ie,{sx:{width:16,height:16}}),title:v.jsx(gd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:qy,theme:Gb})})})}vd.propTypes={treeData:S.object.isRequired,setTreeData:S.func,renderActions:S.func};var Ky=dc();const Yy=zn(Ky),sn="en";function md({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},locale:t=sn,locales:i=[],localeMap:o={},onRemoveLocale:a=()=>{}}){const{t:l}=Ee(),s=I.useRef(),[c,u]=I.useState(null),f=or({localeList:[],inputLocale:"",localeError:""}),d=I.useMemo(()=>!!c,[c]),h=I.useMemo(()=>i.includes(t)?t:sn,[i,t]),p=I.useMemo(()=>Object.keys(Dt(o,[...f.localeList,sn])).map(x=>({title:o[x],value:x})),[f.localeList]),g=I.useMemo(()=>`Default (${o[sn]||Object.values(o)?.[0]})`,[o]);I.useEffect(()=>{f.localeList=[...i]},[i,f]),sp("enter",()=>{setTimeout(()=>{b()})},{target:s});function m(x){return x?x==="en"||f.localeList.includes(x)?l("navigation.form.localeExists",{value:x}):!0:l("common.requiredErrorText",{name:"Locale"})}function y(x=""){const T=x?.trim(),C=m(T);return C!==!0?f.localeError=C:f.localeError="",C}function b(){const x=f.inputLocale?.trim();y(x)===!0&&(w(),f.localeList.push(x),r(x))}function w(){u(null),f.inputLocale="",f.localeError=""}function D(x,T){x.preventDefault(),x.stopPropagation(),f.localeList=jc(f.localeList,T),a(T)}function P(x){const{value:T}=x.target;y(T),f.inputLocale=T}return v.jsxs(v.Fragment,{children:[v.jsxs(Dp,{sx:e,value:h,onChange:(x,T)=>{n(T)},children:[v.jsx(Ga,{label:g,value:"en"}),f.localeList.map(x=>v.jsx(Ga,{sx:{position:"relative"},label:v.jsxs(v.Fragment,{children:[o[x],v.jsx(Oe,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{D(T,x)},children:v.jsx(be,{icon:"mdi:close",height:14})})]}),value:x},x)),v.jsx(Oe,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:x=>{u(x.currentTarget)},children:v.jsx(be,{icon:"mdi:plus"})})]}),v.jsx(Hi,{open:d,anchorEl:c,onClose:w,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:v.jsxs(ie,{sx:{p:2,width:"270px"},children:[v.jsx(Ie,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),v.jsx(ie,{sx:{mt:1},children:v.jsx(Ki,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:p,onChange:P,error:!!f.localeError,helperText:f.localeError||" "})}),v.jsx(ie,{sx:{display:"flex",justifyContent:"flex-end"},children:v.jsx(Zt,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}md.propTypes={sx:S.any,onAdd:S.func,onChange:S.func,onRemoveLocale:S.func,locale:S.string,localeMap:S.object,locales:S.array};const ra=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function bd(e,r,n=5e3){for(const t of ra){const i=qe(t,e);try{return await _p.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 Jy({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 bd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const cn=new Map;async function Qy(e){if(cn.has(e))return cn.get(e);const r=(async()=>{const{data:n}=await bd("/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)})();cn.set(e,r);try{return await r}catch(n){throw cn.delete(e),n}}function Xy(e){return qe(ra[0],`${e}.svg`)}function Zy(e){try{const r=new URL(e);for(const n of ra)if(r.origin===n)return vh(r.pathname).replace(".svg","");return""}catch{return""}}function eS(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Po(e)&&(n=Zy(e))),{isIconId:r,iconId:n}}const tS=I.lazy(()=>xh(()=>import("./index-N_dMIDHu.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}))),ms=Ve(Qe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function yd({icon:e,...r}){const[n,t]=I.useState(!1);return To(async()=>{t(!1),await _o(e),t(!0)},[e]),e?n?v.jsx(be,{icon:e,...r}):v.jsx(be,{color:"#f06f6e",icon:"ic:baseline-error",...r}):v.jsx(be,{icon:"material-symbols-light:select-rounded",...r})}yd.propTypes={icon:S.string.isRequired};function vo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=pc(),{blocklet:u}=Nt(),f=Fn(ee=>ee.breakpoints.down("md")),d=u.environments.find(ee=>ee.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),h=l(),p=I.useRef(null),g=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Ee(),{isIconId:w,iconId:D}=eS(e),[P,x]=I.useState(null),{onChange:T,onBlur:C,sx:_,...R}=a,E=i.includes("upload"),j=i.includes("select"),N=qe(s,"/api/media/upload",u.appPid),U=or({showPopover:!1}),z=ve(ee=>{if(ee?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(ee,q).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[d?.value,c]),G=ve(async ee=>await p.current.getUploader().uploadFile(ee)),W=ve(()=>{x(null)}),V=ve(()=>{j&&x(m.current)}),Q=ve(async ee=>{try{if(o==="url"){const q=Xy(ee),re=await mh(q,{width:128,height:128}),F=await bh(re,ee);await G(F)}else T?.(ee)}catch(q){console.error("Failed to pick icon:",q)}W()}),te=ve(ee=>{ee.stopPropagation(),g.current.open(),W()}),X=ve(ee=>{a?.onChange?.(ee.data.url)});return v.jsxs(v.Fragment,{children:[v.jsx(Ht,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},..._},onClick:j?V:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:v.jsx(Ui,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(U.showPopover=!0)},onMouseLeave:()=>{U.showPopover=!1},children:v.jsx(ms,{size:28,icon:z(e),alt:"Error"})}),endAdornment:v.jsxs(Ui,{position:"end",children:[v.jsx(Oe,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),T("")},children:v.jsx(Lc,{style:{fontSize:18}})}),E&&v.jsx(yh,{title:y("common.upload"),children:v.jsx(Oe,{disableFocusRipple:!1,disableRipple:!1,onClick:te,children:v.jsx(yd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&v.jsx(ie,{component:Tp,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&v.jsx(Hi,{open:!!P,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:W,children:v.jsx(Sd,{label:n,placeholder:t,value:w?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:Q,onClose:W})}),v.jsx(mo,{ref:p,locale:b,apiPath:N,headers:h,imageEditorProps:{},onUploadFinish:X}),v.jsx(mo,{ref:g,locale:b,apiPath:N,headers:h,onUploadFinish:X}),v.jsx(Hi,{sx:{pointerEvents:"none"},open:U.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{U.showPopover=!1},disableRestoreFocus:!0,children:v.jsx(ms,{size:120,icon:z(e),alt:"Error"})})]})}vo.propTypes={value:S.string.isRequired,label:S.any,placeholder:S.any,helperText:S.string,methods:S.arrayOf(S.oneOf(["select","upload"])),iconifyShape:S.oneOf(["id","url"])};function Sd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[h,p]=I.useState(!1),g=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:w}=Ee(),D=96,P=ve(()=>{!b.current||c||(u(!0),setTimeout(()=>{const C=y.current+1,_=(C-1)*D,R=C*D,E=m.current.slice(_,R);s(j=>[...j,...E]),y.current=C,b.current=R<m.current.length,u(!1)},300))}),x=ve(C=>{m.current=C,y.current=1,b.current=C.length>D;const _=C.slice(0,D);s(_),p(C.length===0),b.current&&P()}),{run:T}=gc(async C=>{if(C){u(!0);try{const{icons:_}=await Jy({keyword:C});x(_)}catch(_){console.error("Failed to search icons:",_),p(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const C=()=>{if(!g.current)return;const{scrollTop:R,scrollHeight:E,clientHeight:j}=g.current;(R+j>=E-150||E<=j)&&P()},_=g.current;return _&&(_.addEventListener("scroll",C),C()),()=>{_&&_.removeEventListener("scroll",C)}},[P,c]),To(async()=>{if(f)T(f);else{u(!0);try{const C=await Qy("mdi-light");x(C)}catch(C){console.error("Failed to fetch default icons:",C),p(!0)}finally{u(!1)}}},[f,T,x]),v.jsxs(rS,{ref:g,sx:t,...a,children:[v.jsxs(ie,{className:"icon-picker-input",children:[v.jsx(Ht,{label:w("navigation.form.searchIcons"),placeholder:w("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:C=>d(C.target.value),slotProps:{input:{endAdornment:v.jsx(Oe,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:v.jsx(Lc,{style:{fontSize:18}})})}}}),v.jsx(Zt,{onClick:o,children:w("common.cancel")})]}),v.jsxs(ie,{children:[l.length>0&&v.jsx(ie,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(C=>v.jsx(nS,{$active:n===C,onClick:()=>{i(C)},children:v.jsx(be,{icon:C,width:"32",height:"32"})},C))}),h&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:v.jsx(ie,{sx:{textAlign:"center"},children:"No matching results"})}),c&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center"},children:v.jsx(Sh,{size:20})})]})]})}Sd.propTypes={label:S.any,placeholder:S.any,value:S.string,sx:S.object,onPick:S.func.isRequired,onClose:S.func.isRequired};const rS=Ve(ie)(({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}})),nS=Ve(Oe,{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 mo({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 v.jsx(I.Suspense,{children:v.jsx(tS,{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}})})}mo.propTypes={ref:S.any,locale:S.string,apiPath:S.string,headers:S.object,imageEditorProps:S.object,onUploadFinish:S.func};const bs=24,ys=48,Ss="add",We="en",xs={title:{[We]:""},description:{[We]:""},link:{[We]:""}};function ws(e){return jc(Array.from(new Set(Ce.NAVIGATION_I18N_FIELDS.flatMap(r=>Yt(e[r])?Object.keys(e[r]):[]))),We)}S.string.isRequired;function na({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ac(),{t:l,locale:s}=Ee(),{blocklet:c}=Nt(),u=I.useMemo(()=>{const k=c.environments.find(A=>A.key==="BLOCKLET_APP_LANGUAGES");return(k?k.value.split(","):["en","zh"]).filter(A=>kt.SUPPORTED_LANGUAGES[A]).reduce((A,$)=>(A[$]=kt.SUPPORTED_LANGUAGES[$].nativeName,A),{})},[c.environments]),f=I.useRef(()=>{}),d=or({isRoot:!0,type:Ss,linkDisabled:!1,locale:We,formState:$e(xs),get localeList(){return ws(d.formState)}}),{handleSubmit:h,control:p,reset:g,setValue:m,clearErrors:y,formState:{errors:b}}=Ip({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{Ce.NAVIGATION_I18N_FIELDS.forEach(k=>m(k,d.formState[k][d.locale]))},[m,d.locale]);const w=Rp({control:p}),D=w.component,P=w.title,x=w.description,T=w.link,C=w.parent;I.useEffect(()=>{d.formState.title[d.locale]=P},[P]),I.useEffect(()=>{d.formState.description[d.locale]=x},[x]),I.useEffect(()=>{d.formState.link[d.locale]=T},[T]),I.useEffect(()=>{i?.(w)},[w,i]);const _=I.useMemo(()=>t.find(O=>D?n.find($=>$.name===D).did===O.id:O.id===C),[n,t,D,C]),R=I.useMemo(()=>{if(_?.component){const k=n.find(J=>J.name===_.component),{link:O}=k||{},A=Yt(O)?O[d.locale]:O;if(D)return ka(A);const $=Yt(_.link)?_.link[d.locale]:_.link;return ka(qe(A,$||"/"))}return null},[n,d.locale,_,D]),E=I.useMemo(()=>{const{component:k}=_||{},O=n.find(J=>J.name===k),{navigation:A=[]}=O||{};return Ne.flattenNavigation(A,{transform(J,oe){return oe?.section&&(J.section=J.section||oe.section),J}}).filter(J=>J.link).filter(J=>Ne.isMatchSection(J.section,r)).map(J=>({label:J.link,title:J.title[s]||J.title}))},[_,n,r,s]),j=I.useCallback(()=>{d.isRoot=!0,d.locale=We,d.type=Ss,d.linkDisabled=!1,d.formState=$e(xs),g(),y(),f.current=()=>{}},[y,g,d]),N=I.useCallback((k={})=>(d.localeList.length>0&&Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{Ap(d.formState[O]).length>1&&(k[O]=d.formState[O])}),ko(k.role)&&(k.role=void 0),k),[d.localeList,d.formState]),U=I.useCallback(({parent:k}={},O=()=>{})=>{d.type="add",d.isRoot=!k,m("parent",k?.id),f.current=A=>{O(A)}},[m,d]),z=I.useCallback((k={},O=()=>{})=>{const{id:A,icon:$,parent:J,component:oe,role:fe=[]}=k;m("id",A),m("icon",$),k.from==="team-tmpl"&&(d.linkDisabled=!0);const de=ws(k),me=(ge,De)=>{mc(ge)?d.formState[De]=de.reduce((ce,ae)=>(ce[ae]=ge,ce),{[We]:ge}):Yt(ge)?d.formState[De]=$e(ge):d.formState[De]={}};Ce.NAVIGATION_I18N_FIELDS.forEach(ge=>me(k[ge],ge)),Ce.NAVIGATION_I18N_FIELDS.forEach(ge=>m(ge,d.formState[ge][d.locale])),m("component",oe),m("parent",J),m("role",fe||[]),d.type="edit",d.isRoot=!J,f.current=ge=>{const De=wh(ge,["id","title","description","icon","component","link","role"]);O(De)}},[m,d]);function G(k){const O=k?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>bs)return l("navigation.form.titleTooLong",{len:bs})}return!0}function W(k){const O=k?.trim();return O&&O.length>ys?l("navigation.form.descriptionTooLong",{len:ys}):!0}const V=ve(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k);async function Q(k){const O=k?.trim();if(O){if(Po(V(O)))return!0;try{await _o(O)}catch{return l("navigation.form.invalidIcon")}}return!0}function te(k){const O=k?.trim();return O?Q(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}function X(k){const O=k?.trim();return O?Ne.checkLink(O)?!0:l("navigation.form.invalidLink"):d.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}const ee=I.useCallback(k=>{d.locale=k,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]||(d.formState[O][k]="")}),setTimeout(()=>{y()})},[y,d]),q=I.useCallback(()=>{const{title:k,link:O}=d.formState;if(r!=="bottomNavigation")for(const A of Object.keys(k)){const $=G(k[A]);if($!==!0)return $}for(const A of Object.keys(O)){const $=X(O[A]);if($!==!0)return $}return!0},[r,d.formState]),re=I.useCallback(k=>{const O=q();O===!0?f.current(N(k)):wr.error(O)},[q,N]),F=I.useCallback(k=>{d.locale=We,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O]=Dt(d.formState[O],k)}),i?.(w)},[d,w,i]),H=I.useCallback(k=>{d.locale=k,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]=d.formState[O][We]}),i?.(w),setTimeout(()=>{y()})},[y,d,w,i]);return I.useImperativeHandle(e,()=>({add:U,edit:z,resetImmediate:()=>j(),reset:()=>setTimeout(()=>j(),0),submit:h(re)}),[U,j,z,h,re]),v.jsxs(ie,{...o,children:[v.jsx(md,{sx:{mb:1},onAdd:H,onChange:ee,onRemoveLocale:F,locale:d.locale,localeMap:u,locales:d.localeList}),v.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})}),r==="bottomNavigation"?v.jsx(rt,{name:"icon",control:p,rules:{validate:te},render:({field:k})=>v.jsx(vo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==We,methods:["select"],iconifyShape:"url",...k})}):v.jsx(rt,{name:"icon",control:p,rules:{validate:Q},render:({field:k})=>v.jsx(vo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==We,...k})}),d.isRoot&&v.jsx(rt,{name:"component",control:p,render:({field:k})=>v.jsx(Ki,{fullWidth:!0,margin:"dense",disabled:d.locale!==We&&k.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:!!b?.component?.message,helperText:b?.component?.message||" ",...Dt(k,"ref")})}),!d.isRoot&&["header"].includes(r)&&v.jsx(rt,{name:"description",control:p,rules:{validate:W},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:d.isEdit,error:!!b?.description?.message,helperText:b?.description?.message||" ",...k})}),v.jsx(rt,{name:"link",control:p,rules:{validate:X},render:({field:k})=>v.jsx(vc,{fullWidth:!0,margin:"dense",children:v.jsx(Pp,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:d.linkDisabled,isOptionEqualToValue:O=>O.label,options:E,renderInput:O=>v.jsx(Ht,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!b?.link?.message,helperText:b?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:R?v.jsx(Ui,{position:"start",sx:{textDecoration:Yy(T||"")?"line-through":""},children:R}):null}}}),renderOption:(O,A)=>v.jsxs(ie,{component:"li",...O,children:[A.label,v.jsx(Ie,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:A.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(O,A)=>{k.onChange(A)}})})}),["dashboard","sessionManager"].includes(r)&&v.jsx(rt,{name:"role",control:p,render:({field:k})=>v.jsx(Ki,{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:!!b?.role?.message,helperText:b?.role?.message||" ",...Dt(k,"ref")})}),r==="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})})]})]})}na.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array,onChange:S.func};function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:l}]=wp(),[s,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),d=I.useCallback(()=>{l(),u.current?.reset()},[l]),h=I.useCallback((g={},m=()=>{})=>{c("add"),u.current?.add(g,y=>m(d,y)),a()},[a,d]),p=I.useCallback((g={},m=()=>{})=>{c("edit"),u.current?.edit(g,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:h,edit:p,close:d}),[h,p,d]),v.jsx(Ch,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:v.jsx(bc,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:v.jsx(na,{ref:u,section:r,components:n,rawNavigations:t})})}ia.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array};function xd({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(g){g.preventDefault(),g.stopPropagation()}const f=I.useCallback(g=>{u(g),r(o)},[r,o]),d=I.useCallback(g=>{u(g),n(o)},[n,o]),h=I.useCallback(g=>{u(g),t(o)},[t,o]),p=I.useCallback(g=>{u(g),i(o)},[i,o]);return v.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&v.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:v.jsx(Oe,{size:"small",color:"success",onClick:f,disabled:c,children:v.jsx(be,{icon:"mdi:plus-box-outline"})})}),v.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:v.jsx(Oe,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:v.jsx(be,{icon:"mdi:pencil-outline"})})}),v.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:v.jsx(Oe,{size:"small",color:"warning",onClick:h,disabled:c,children:o.visible===!1?v.jsx(be,{icon:"mdi:eye-off-outline"}):v.jsx(be,{icon:"mdi:eye-outline"})})}),v.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:v.jsx(Oe,{disabled:s&&!c,size:"small",color:"error",onClick:p,children:v.jsx(be,{icon:"mdi:delete"})})})]})}xd.propTypes={data:S.object.isRequired,className:S.string,add:S.func,edit:S.func,toggle:S.func,del:S.func,section:S.string};const xn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",iS=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},oS=(e,r="en")=>{if(typeof e=="string"){if(fd(e)){const t=new URL(e);return t.searchParams.set("locale",r),t.href}if(hd(e))return e;const n=new URL(e,window.location.origin);return n.searchParams.set("locale",r),n.pathname+n.search}return typeof e=="object"?e[r]||e?.en||e?.zh:e},Qt=(e,r="en",n="header")=>{if(!e?.length)return e;const t=(i,o)=>i&&typeof i=="object"?i[o]||i?.en||i?.zh:i;return At(e,i=>({...i,title:t(i.title,r),description:t(i.description,r),link:yc(i.items?.length?i.link:oS(i.link,r),n),_rawLink:i.link}),"items")},aS=e=>At(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),lS=e=>{if(!e?.length)return null;const r=aS(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=iS(r.theme),r.navigation=lS(sS(r.navigation)),r},sS=(e=[])=>ta(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),wd=(e,r)=>ta(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"),cS={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"/>'},uS={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 dS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(h=>h.section==="sessionManager"&&!["/sessionManager"].includes(h.id)).filter(h=>!!(h?.role||[]).includes(e?.user?.role||"guest")).map(h=>{const p=(a?.componentMountPoints||[]).find(g=>h.component===g.name);return{...h,component:p}}),s=Et(),c=I.useRef(null),u=or({open:!1}),f=ve((h=!u.open)=>{u.open=h}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:v.jsxs(ie,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[v.jsx(Oe,{size:"medium",ref:c,children:v.jsx(be,{icon:cS,fontSize:n,style:{transform:"scale(1.08)"}})}),v.jsx(Ih,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:h})=>v.jsx(Rh,{onClickAway:p=>{p.preventDefault(),p.stopPropagation(),f(!1)},children:v.jsx(Sc,{...h,timeout:350,children:v.jsxs(Tr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[v.jsx(Dh,{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(p=>v.jsx(Th,{disablePadding:!0,children:v.jsxs(kp,{href:Oa(p.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[p?.component?.did?v.jsx(ie,{component:"img",src:`${xc}/blocklet/logo-bundle/${p.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):v.jsx(be,{fontSize:50,icon:p.icon||uS,color:s.palette.text.secondary}),v.jsx(Ie,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Oa(p.title,r)})]})},p.id))}),v.jsx(_h,{session:e,children:v.jsx(bc,{variant:"outlined",fullWidth:!0,href:Ph,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const Cd=S.shape({appLogo:S.node,appName:S.string,theme:S.shape({background:S.string}),enableConnect:S.bool,enableLocale:S.bool,navigation:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object]),icon:S.string,items:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object])}))}))}),Id=S.shape({showText:S.bool,showRole:S.bool,switchDid:S.bool,switchProfile:S.bool,switchPassport:S.bool,disableLogout:S.bool,onLogin:S.func,onLogout:S.func,onSwitchDid:S.func,onSwitchProfile:S.func,onSwitchPassport:S.func,menu:S.array,menuRender:S.func,dark:S.bool,size:S.number}),fS=["admin","owner"],hS=e=>e.endsWith(".ip.abtnet.io"),pS=e=>e.endsWith(".did.abtnet.io"),gS={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:"配置域名"}},vS=1e3*60*60*24*30,Cs=".well-known/service/admin/domains";function Rd({locale:e="en",session:r={}}){const n=r?.user,t=zc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const h=+new Date,p=+new Date(d);return h-p>vS}),a=ve((d,h={})=>wc(gS,d,e,"en",h)),l=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}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 d=qe(window.location.origin,Cs);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&fS.includes(n.role);return window.location.href.includes(Cs)||t||!hS(l)&&!pS(l)?null:v.jsxs(kh,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[v.jsxs(Oh,{sx:{padding:"20px !important"},children:[v.jsx(Ie,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),v.jsx(Ie,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&v.jsx(ie,{component:"ul",children:s.map(d=>v.jsx(Ie,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),v.jsxs(Eh,{sx:{px:"12px !important"},children:[v.jsx(Zt,{onClick:c,children:a("skip")}),f&&v.jsx(Zt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Rd.propTypes={locale:S.string,session:S.object};var Pi,Is;function mS(){if(Is)return Pi;Is=1;const e=Nh();return Pi=(r,n=!1)=>{const t=e(["@arcblock/ws",r].join(":"));return{debug:t,warn:t,info:t,trace:n?t:console.error,error:n?t:console.error}},Pi}var ki,Rs;function bS(){if(Rs)return ki;Rs=1;const e=mS();return ki=(r,n,t)=>class extends r{constructor(o,a={}){super(o,{transport:t,...a}),this._logger=e("client",a.silent),this.emitter=new n,this.onOpen(()=>{this._logger.debug("socket open",o)}),this.onClose(()=>{this._logger.debug("socket close",o)}),this.onError(l=>{this._logger.error("socket error",l.error)}),this.onMessage(l=>{this._logger.debug("socket message",l)})}on(o,a,l={}){this.ensureJoinChannel(o,l),this.emitter.on(o,a)}off(o,a){a?this.emitter.off(o,a):this.emitter.removeAllListeners(o),this.ensureLeaveChannel(o)}disconnect(o,a,l){this.emitter.eventNames().forEach(s=>{this.emitter.removeAllListeners(s)}),super.disconnect(o,a,l)}ensureJoinChannel(o,a={}){if(this.emitter.listenerCount(o)>0)return;const s=this.channel(o,a);s.join().receive("ok",c=>{this._logger.debug("join success",{topic:o,message:c})}).receive("error",c=>{this._logger.error("join error",{topic:o,error:c})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),s.on(o,({status:c,response:u})=>{c==="ok"?this.emitter.emit(o,u):this._logger.debug("response error",{topic:o,status:c,data:u})})}ensureLeaveChannel(o){if(this.emitter.listenerCount(o)>0)return;const l=this.channels.find(s=>s.topic===o);l&&(this.remove(l),l.leave().receive("ok",s=>{this._logger.debug("leave success",{topic:o,message:s})}).receive("error",s=>{this._logger.error("leave error",{topic:o,err:s})}).receive("timeout",()=>{this._logger.debug("leave timeout",{topic:o})}),l.off(o))}subscribe(o,a={}){let l=this.channels.find(s=>s.topic===o);return l||(l=this.channel(o,a),l.join().receive("ok",s=>{this._logger.debug("join success",{topic:o,message:s})}).receive("error",s=>{this._logger.error("join error",{topic:o,error:s})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),l)}unsubscribe(o){this.ensureLeaveChannel(o)}},ki}var Oi,Ds;function yS(){if(Ds)return Oi;Ds=1;const e=Mh(),{Socket:r}=Ah();return Oi=bS()(r,e),Oi}var Ei,Ts;function SS(){return Ts||(Ts=1,Ei={WsClient:yS()}),Ei}var xS=SS();const Rt={};function wS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=qe(r,xc,e);return new xS.WsClient(n,{heartbeatIntervalMs:100*1e3})}function CS(e="admin"){return Rt[e]||(Rt[e]=wS(e)),Rt[e]}const IS=(e="admin")=>{const r=I.use(Bn),{session:n}=r??{};return!Rt[e]&&n.user&&(Rt[e]=CS(e),Rt[e].connect()),Rt[e]},RS={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>'},DS={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"/>'},TS={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 _S(){const e=Et();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Fn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const PS=e=>!ko(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,kS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},OS=async(e,r)=>{try{return await Op.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},ES=async(e,r)=>{const{type:n,did:t}=e;return Cc.isSameAddr(n,"did")?await OS(t,r)||Cn.getLink(e):Cn.getLink(e)},NS=async(e,r,n=!0)=>{const t=Cn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Cn.Link){if(n){const o=await ES(i,r),{type:a,chainId:l,did:s}=i;return Cc.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(""))},MS=e=>Lh.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),AS={comment:(e,r)=>r&&r>1?v.jsxs(v.Fragment,{children:["left ",r," comments on your ",e]}):v.jsxs(v.Fragment,{children:["commented on your ",e]}),like:e=>v.jsxs(v.Fragment,{children:["liked your ",e]}),follow:()=>v.jsx(v.Fragment,{children:"followed you"}),tips:e=>v.jsxs(v.Fragment,{children:["gave tips to your ",e]}),mention:e=>v.jsxs(v.Fragment,{children:["mentioned you in ",e]}),assign:()=>v.jsx(v.Fragment,{children:"assigned you a task"})};function Wt({user:e,color:r=void 0}){const{palette:n}=Et(),t=Oo(qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return v.jsx(Ic,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Wt.displayName="UserLink";function LS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Et(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Ae(()=>{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]),f=Ae(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ve(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return v.jsx(Wt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return v.jsxs(v.Fragment,{children:[v.jsx(Wt,{user:m[0],color:c})," and ",v.jsx(Wt,{user:y,color:c})]});const b=f.length>3,w=b?f.slice(0,2):m;return v.jsxs(v.Fragment,{children:[w.map((D,P)=>v.jsxs(Z.Fragment,{children:[v.jsx(Wt,{user:D,color:c}),P<w.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:v.jsxs(v.Fragment,{children:[", and ",v.jsx(Wt,{user:y,color:c})]})]})}),h=ve(()=>{const m=a?AS[a]:null;return m?m(s,r.length):null}),p=Ae(()=>{const m=d(),y=h();return!m||!y?null:v.jsxs(v.Fragment,{children:[m," ",y]})},[a,s,f,d,h]),g=Ae(()=>{if(!e)return null;const m=kS(e);return m?.targetLink?qe(i,m.targetLink):null},[e,i]);return!a||ko(l)?null:v.jsxs(v.Fragment,{children:[p," ",g&&v.jsx(Ic,{href:g,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const zS={normal:Ea,success:RS,info:Ea,warning:DS,error:TS},jS=ar(Bh)`
43
+ */const Wu=Object.freeze({left:0,top:0,width:16,height:16}),Tn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Qr=Object.freeze({...Wu,...Tn}),lo=Object.freeze({...Qr,body:"",hidden:!1}),$b=Object.freeze({width:null,height:null}),Hu=Object.freeze({...$b,...Tn});function Wb(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 Hb=/[\s,]+/;function Ub(e,r){r.split(Hb).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Uu={...Hu,preserveAspectRatio:""};function es(e){const r={...Uu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=Wb(n("rotate","")),Ub(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function qb(e,r){for(const n in Uu)if(e[n]!==r[n])return!0;return!1}const Or=/^[a-z0-9]+(-[a-z0-9]+)*$/,Xr=(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&&!yn(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&&!yn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!yn(l,n)?null:l}return null},yn=(e,r)=>e?!!((e.provider===""||e.provider.match(Or))&&(r&&e.prefix===""||e.prefix.match(Or))&&e.name.match(Or)):!1;function Vb(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 ts(e,r){const n=Vb(e,r);for(const t in lo)t in Tn?t in e&&!(t in n)&&(n[t]=Tn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Kb(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 Yb(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=ts(t[l]||i[l],o)}return a(r),n.forEach(a),ts(e,o)}function qu(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=Kb(e);for(const i in t){const o=t[i];o&&(r(i,Yb(e,i,o)),n.push(i))}return n}const Jb={provider:"",aliases:{},not_found:{},...Wu};function Ri(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Vu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ri(e,Jb))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Or)||typeof o.body!="string"||!Ri(o,lo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Or)||typeof a!="string"||!n[a]&&!t[a]||!Ri(o,lo))return null}return r}const _n=Object.create(null);function Qb(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function gt(e,r){const n=_n[e]||(_n[e]=Object.create(null));return n[r]||(n[r]=Qb(e,r))}function Jo(e,r){return Vu(r)?qu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Xb(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function Zb(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(_n)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(_n[i]||{})).forEach(a=>{const l=gt(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let jr=!1;function Ku(e){return typeof e=="boolean"&&(jr=e),jr}function Fr(e){const r=typeof e=="string"?Xr(e,!0,jr):e;if(r){const n=gt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Yu(e,r){const n=Xr(e,!0,jr);if(!n)return!1;const t=gt(n.provider,n.prefix);return Xb(t,n.name,r)}function rs(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),jr&&!r&&!e.prefix){let i=!1;return Vu(e)&&(e.prefix="",qu(e,(o,a)=>{a&&Yu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!yn({provider:r,prefix:n,name:"a"}))return!1;const t=gt(r,n);return!!Jo(t,e)}function ey(e){return!!Fr(e)}function ty(e){const r=Fr(e);return r?{...Qr,...r}:null}function ry(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]=gt(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Ju(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function ny(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||Ju([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let iy=0;function oy(e,r,n){const t=iy++,i=Ju.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 so=Object.create(null);function ns(e,r){so[e]=r}function co(e){return so[e]||so[""]}function ay(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?Xr(i,r,n):i;o&&t.push(o)}),t}var ly={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function sy(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 x=e.resources.slice(0);for(a=[];x.length>1;){const T=Math.floor(Math.random()*x.length);a.push(x[T]),x=x.slice(0,T).concat(x.slice(T+1))}a=a.concat(x)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],h=[];typeof t=="function"&&h.push(t);function p(){f&&(clearTimeout(f),f=null)}function g(){s==="pending"&&(s="aborted"),p(),d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function m(x,T){T&&(h=[]),typeof x=="function"&&h.push(x)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:g}}function b(){s="failed",h.forEach(x=>{x(void 0,u)})}function w(){d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function D(x,T,C){const _=T!=="success";switch(d=d.filter(R=>R!==x),s){case"pending":break;case"failed":if(_||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){u=C,b();return}if(_){u=C,d.length||(a.length?P():b());return}if(p(),w(),!e.random){const R=e.resources.indexOf(x.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",h.forEach(R=>{R(C)})}function P(){if(s!=="pending")return;p();const x=a.shift();if(x===void 0){if(d.length){f=setTimeout(()=>{p(),s==="pending"&&(w(),b())},e.timeout);return}b();return}const T={status:"pending",resource:x,callback:(C,_)=>{D(T,C,_)}};d.push(T),c++,f=setTimeout(P,e.rotate),n(x,r,T.callback)}return setTimeout(P),y}function Qu(e){const r={...ly,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=sy(r,l,s,(f,d)=>{t(),c&&c(f,d)});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 Qo(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),mr=["https://api.simplesvg.com","https://api.unisvg.com"],Sn=[];for(;mr.length>0;)mr.length===1||Math.random()>.5?Sn.push(mr.shift()):Sn.push(mr.pop());qn[""]=Qo({resources:["https://api.iconify.design"].concat(Sn)});function is(e,r){const n=Qo(r);return n===null?!1:(qn[e]=n,!0)}function Vn(e){return qn[e]}function cy(){return Object.keys(qn)}function os(){}const Di=Object.create(null);function uy(e){if(!Di[e]){const r=Vn(e);if(!r)return;const n=Qu(r),t={config:r,redundancy:n};Di[e]=t}return Di[e]}function Xu(e,r,n){let t,i;if(typeof e=="string"){const o=co(e);if(!o)return n(void 0,424),os;i=o.send;const a=uy(e);a&&(t=a.redundancy)}else{const o=Qo(e);if(o){t=Qu(o);const a=e.resources?e.resources[0]:"",l=co(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),os):t.query(r,i,n)().abort}const as="iconify2",Br="iconify",Zu=Br+"-count",ls=Br+"-version",ed=36e5,dy=168;function uo(e,r){try{return e.getItem(r)}catch{}}function Xo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function ss(e,r){try{e.removeItem(r)}catch{}}function fo(e,r){return Xo(e,Zu,r.toString())}function ho(e){return parseInt(uo(e,Zu))||0}const Pt={local:!0,session:!0},td={local:new Set,session:new Set};let Zo=!1;function fy(e){Zo=e}let ln=typeof window>"u"?{}:window;function rd(e){const r=e+"Storage";try{if(ln&&ln[r]&&typeof ln[r].length=="number")return ln[r]}catch{}Pt[e]=!1}function nd(e,r){const n=rd(e);if(!n)return;const t=uo(n,ls);if(t!==as){if(t){const l=ho(n);for(let s=0;s<l;s++)ss(n,Br+s.toString())}Xo(n,ls,as),fo(n,0);return}const i=Math.floor(Date.now()/ed)-dy,o=l=>{const s=Br+l.toString(),c=uo(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{}ss(n,s)}};let a=ho(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,fo(n,a)):td[e].add(l))}function id(){if(!Zo){fy(!0);for(const e in Pt)nd(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=gt(t,i);if(!Jo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function hy(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in Pt)nd(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function py(e,r){Zo||id();function n(t){let i;if(!Pt[t]||!(i=rd(t)))return;const o=td[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=ho(i),!fo(i,a+1))return;const l={cached:Math.floor(Date.now()/ed),provider:e.provider,data:r};return Xo(i,Br+a.toString(),JSON.stringify(l))}r.lastModified&&!hy(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function cs(){}function gy(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ny(e)}))}function vy(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=co(n)))return;o.prepare(n,t,i).forEach(l=>{Xu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Jo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),py(e,s)}catch(c){console.error(c)}gy(e)})})}))}const ea=(e,r)=>{const n=ay(e,!0,Ku()),t=ry(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,cs)}),()=>{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(gt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:f}=s,d=gt(c,u),h=d.pendingIcons||(d.pendingIcons=new Set);h.has(f)||(h.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&vy(s,i[c][u])}),r?oy(r,t,o):cs},my=e=>new Promise((r,n)=>{const t=typeof e=="string"?Xr(e,!0):e;if(!t){n(e);return}ea([t||e],i=>{if(i.length&&t){const o=Fr(t);if(o){r({...Qr,...o});return}}n(e)})});function by(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function yy(e,r){const n=typeof e=="string"?Xr(e,!0,!0):null;if(!n){const o=by(e);return{value:e,data:o}}const t=Fr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ea([n],()=>r(e,n,Fr(n)));return{value:e,name:n,loading:i}}function Ti(e){return e.hasAttribute("inline")}let od=!1;try{od=navigator.vendor.indexOf("Apple")===0}catch{}function Sy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(od||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const xy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,wy=/^-?[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(xy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=wy.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 Cy=e=>e==="unset"||e==="undefined"||e==="none";function ad(e,r){const n={...Qr,...e},t={...Hu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(p=>{const g=[],m=p.hFlip,y=p.vFlip;let b=p.rotate;m?y?b+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):y&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let w;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:w=i.height/2+i.top,g.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,g.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}b%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=po(f,s/c)):(u=a==="auto"?s:a,f=l===null?po(u,c/s):l==="auto"?c:l);const d={},h=(p,g)=>{Cy(g)||(d[p]=g.toString())};return h("width",u),h("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const Iy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Pn=Iy();function Ry(e){Pn=e}function Dy(){return Pn}function Ty(e,r){const n=Vn(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 _y(e){return e===404}const Py=(e,r,n)=>{const t=[],i=Ty(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 ky(e){if(typeof e=="string"){const r=Vn(e);if(r)return r.path}return"/"}const Oy=(e,r,n)=>{if(!Pn){n("abort",424);return}let t=ky(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;Pn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(_y(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)})},Ey={prepare:Py,send:Oy};function us(e,r){switch(e){case"local":case"session":Pt[e]=r;break;case"all":for(const n in Pt)Pt[n]=r;break}}const _i="data-style";let ld="";function Ny(e){ld=e}function ds(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(_i));n||(n=document.createElement("style"),n.setAttribute(_i,_i),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+ld}function sd(){ns("",Ey),Ku(!0);let e;try{e=window}catch{}if(e){if(id(),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"||!rs(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;is(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>us(n,!0),disableCache:n=>us(n,!1),iconExists:ey,getIcon:ty,listIcons:Zb,addIcon:Yu,addCollection:rs,calculateSize:po,buildIcon:ad,loadIcons:ea,loadIcon:my,addAPIProvider:is,appendCustomStyle:Ny,_api:{getAPIConfig:Vn,setAPIModule:ns,sendAPIQuery:Xu,setFetch:Ry,getFetch:Dy,listAPIProviders:cy}}}function cd(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 My(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ay(e){return"data:image/svg+xml,"+My(e)}function Ly(e){return'url("'+Ay(e)+'")'}const go={"background-color":"currentColor"},ud={"background-color":"transparent"},fs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},hs={"-webkit-mask":go,mask:go,background:ud};for(const e in hs){const r=hs[e];for(const n in fs)r[e+"-"+n]=fs[n]}function ps(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function zy(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=cd(i,{...o,width:r.width+"",height:r.height+""}),l=Ly(a),s=t.style,c={"--svg":l,width:ps(o.width),height:ps(o.height),...n?go:ud};for(const u in c)s.setProperty(u,c[u]);return t}let Er;function jy(){try{Er=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Er=null}}function Fy(e){return Er===void 0&&jy(),Er?Er.createHTML(e):e}function By(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=cd(e.body,n);return r.innerHTML=Fy(i),r.firstChild}function gs(e,r){const n=r.icon.data,t=r.customisations,i=ad(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=By(i);break;default:a=zy(i,{...Qr,...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 vs(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function Gy(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=Ti(this);ds(l,s),this._state=vs({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Ti(this),c=this._state;s!==c.inline&&(c.inline=s,ds(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 Ti(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{}gs(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=es(this);(l.attrMode!==c||qb(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=yy(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const h={value:c,name:u,data:f};h.data?this._gotIconData(h):d.icon=h});s.data?this._gotIconData(s):this._state=vs(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,es(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=Sy(l.data.body,c),f=this._state.inline;gs(this._shadowRoot,this._state={rendered:!0,icon:l,inline:f,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=sd();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const $y=Gy()||sd(),{enableCache:ZR,disableCache:eD,iconExists:tD,getIcon:rD,listIcons:nD,addIcon:iD,addCollection:oD,calculateSize:aD,buildIcon:lD,loadIcons:sD,loadIcon:cD,addAPIProvider:uD,_api:dD}=$y,At=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:At(t[n],r,n)}):r(t)),dd=(e,r="children")=>{const n=[];return At(e,t=>n.push(t),r),n},ta=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ta(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),fd=e=>/^https?:\/\//.test(e),hd=e=>/^mailto:/i.test(e.trim()),Wy=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)},pd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>Wy(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},Hy=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((p,g)=>p+i+(g[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,h=p=>f>s-d&&u<n-1&&f+p>s+d;return e.forEach(p=>{const g=i+(p[a]?.length||0)*o;t&&h(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&h(g)&&(u++,f=0,c[u]=[]),c[u].push({...p,group:!0}),f+=i,p[a]&&p[a].forEach(m=>{t&&h(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=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 _o(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%"}}),fd(e))return v.jsx(ii,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?v.jsx(be,{icon:"codicon:blank",height:c||void 0}):o?v.jsx(ii,{component:"span",...t,sx:i,children:v.jsx(be,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),v.jsx(ii,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}const Uy=e=>e.from!=="team-tmpl";function qy({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&gh(e.slice(0,t-1),r.slice(0,i-1)))}function gd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=Nt(),t=n.environments.find(a=>a.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=ve(a=>{if(a?.startsWith("/"))try{return new URL(a,t?.value).href}catch{console.error("Failed to parse url",{url:a,origin:t?.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return Yt(a)&&(s=a[r]),!I.isValidElement(l)&&Yt(l)&&(c=l[r]),v.jsxs(ie,{sx:{display:"flex",alignItems:"center"},children:[v.jsx(Ie,{variant:"subtitle1",sx:{fontSize:16},children:s}),l&&v.jsx(Ie,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:c})]})}return v.jsxs(v.Fragment,{children:[e.icon&&(Po(i(e.icon))?v.jsx(Qe,{size:16,style:{marginRight:4},icon:i(e.icon)}):v.jsx(be,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}gd.propTypes={treeNode:S.object.isRequired};const Vy=mt(ie)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function vd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),v.jsx(Vy,{children:v.jsx(hp,{backend:pp,...i,children:v.jsx(Lv,{generateNodeProps:o=>{const a=Uy(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?v.jsx(be,{icon:"ic:round-drag-indicator"}):v.jsx(ie,{sx:{width:16,height:16}}),title:v.jsx(gd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:qy,theme:Gb})})})}vd.propTypes={treeData:S.object.isRequired,setTreeData:S.func,renderActions:S.func};var Ky=dc();const Yy=zn(Ky),sn="en";function md({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},locale:t=sn,locales:i=[],localeMap:o={},onRemoveLocale:a=()=>{}}){const{t:l}=Ee(),s=I.useRef(),[c,u]=I.useState(null),f=or({localeList:[],inputLocale:"",localeError:""}),d=I.useMemo(()=>!!c,[c]),h=I.useMemo(()=>i.includes(t)?t:sn,[i,t]),p=I.useMemo(()=>Object.keys(Dt(o,[...f.localeList,sn])).map(x=>({title:o[x],value:x})),[f.localeList]),g=I.useMemo(()=>`Default (${o[sn]||Object.values(o)?.[0]})`,[o]);I.useEffect(()=>{f.localeList=[...i]},[i,f]),sp("enter",()=>{setTimeout(()=>{b()})},{target:s});function m(x){return x?x==="en"||f.localeList.includes(x)?l("navigation.form.localeExists",{value:x}):!0:l("common.requiredErrorText",{name:"Locale"})}function y(x=""){const T=x?.trim(),C=m(T);return C!==!0?f.localeError=C:f.localeError="",C}function b(){const x=f.inputLocale?.trim();y(x)===!0&&(w(),f.localeList.push(x),r(x))}function w(){u(null),f.inputLocale="",f.localeError=""}function D(x,T){x.preventDefault(),x.stopPropagation(),f.localeList=jc(f.localeList,T),a(T)}function P(x){const{value:T}=x.target;y(T),f.inputLocale=T}return v.jsxs(v.Fragment,{children:[v.jsxs(Dp,{sx:e,value:h,onChange:(x,T)=>{n(T)},children:[v.jsx(Ga,{label:g,value:"en"}),f.localeList.map(x=>v.jsx(Ga,{sx:{position:"relative"},label:v.jsxs(v.Fragment,{children:[o[x],v.jsx(Oe,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{D(T,x)},children:v.jsx(be,{icon:"mdi:close",height:14})})]}),value:x},x)),v.jsx(Oe,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:x=>{u(x.currentTarget)},children:v.jsx(be,{icon:"mdi:plus"})})]}),v.jsx(Hi,{open:d,anchorEl:c,onClose:w,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:v.jsxs(ie,{sx:{p:2,width:"270px"},children:[v.jsx(Ie,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),v.jsx(ie,{sx:{mt:1},children:v.jsx(Ki,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:p,onChange:P,error:!!f.localeError,helperText:f.localeError||" "})}),v.jsx(ie,{sx:{display:"flex",justifyContent:"flex-end"},children:v.jsx(Zt,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}md.propTypes={sx:S.any,onAdd:S.func,onChange:S.func,onRemoveLocale:S.func,locale:S.string,localeMap:S.object,locales:S.array};const ra=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function bd(e,r,n=5e3){for(const t of ra){const i=qe(t,e);try{return await _p.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 Jy({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 bd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const cn=new Map;async function Qy(e){if(cn.has(e))return cn.get(e);const r=(async()=>{const{data:n}=await bd("/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)})();cn.set(e,r);try{return await r}catch(n){throw cn.delete(e),n}}function Xy(e){return qe(ra[0],`${e}.svg`)}function Zy(e){try{const r=new URL(e);for(const n of ra)if(r.origin===n)return vh(r.pathname).replace(".svg","");return""}catch{return""}}function eS(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Po(e)&&(n=Zy(e))),{isIconId:r,iconId:n}}const tS=I.lazy(()=>xh(()=>import("./index-DPXRDGCk.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}))),ms=Ve(Qe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function yd({icon:e,...r}){const[n,t]=I.useState(!1);return To(async()=>{t(!1),await _o(e),t(!0)},[e]),e?n?v.jsx(be,{icon:e,...r}):v.jsx(be,{color:"#f06f6e",icon:"ic:baseline-error",...r}):v.jsx(be,{icon:"material-symbols-light:select-rounded",...r})}yd.propTypes={icon:S.string.isRequired};function vo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=pc(),{blocklet:u}=Nt(),f=Fn(ee=>ee.breakpoints.down("md")),d=u.environments.find(ee=>ee.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),h=l(),p=I.useRef(null),g=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Ee(),{isIconId:w,iconId:D}=eS(e),[P,x]=I.useState(null),{onChange:T,onBlur:C,sx:_,...R}=a,E=i.includes("upload"),j=i.includes("select"),N=qe(s,"/api/media/upload",u.appPid),U=or({showPopover:!1}),z=ve(ee=>{if(ee?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(ee,q).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[d?.value,c]),G=ve(async ee=>await p.current.getUploader().uploadFile(ee)),W=ve(()=>{x(null)}),V=ve(()=>{j&&x(m.current)}),Q=ve(async ee=>{try{if(o==="url"){const q=Xy(ee),re=await mh(q,{width:128,height:128}),F=await bh(re,ee);await G(F)}else T?.(ee)}catch(q){console.error("Failed to pick icon:",q)}W()}),te=ve(ee=>{ee.stopPropagation(),g.current.open(),W()}),X=ve(ee=>{a?.onChange?.(ee.data.url)});return v.jsxs(v.Fragment,{children:[v.jsx(Ht,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},..._},onClick:j?V:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:v.jsx(Ui,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(U.showPopover=!0)},onMouseLeave:()=>{U.showPopover=!1},children:v.jsx(ms,{size:28,icon:z(e),alt:"Error"})}),endAdornment:v.jsxs(Ui,{position:"end",children:[v.jsx(Oe,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),T("")},children:v.jsx(Lc,{style:{fontSize:18}})}),E&&v.jsx(yh,{title:y("common.upload"),children:v.jsx(Oe,{disableFocusRipple:!1,disableRipple:!1,onClick:te,children:v.jsx(yd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&v.jsx(ie,{component:Tp,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&v.jsx(Hi,{open:!!P,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:W,children:v.jsx(Sd,{label:n,placeholder:t,value:w?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:Q,onClose:W})}),v.jsx(mo,{ref:p,locale:b,apiPath:N,headers:h,imageEditorProps:{},onUploadFinish:X}),v.jsx(mo,{ref:g,locale:b,apiPath:N,headers:h,onUploadFinish:X}),v.jsx(Hi,{sx:{pointerEvents:"none"},open:U.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{U.showPopover=!1},disableRestoreFocus:!0,children:v.jsx(ms,{size:120,icon:z(e),alt:"Error"})})]})}vo.propTypes={value:S.string.isRequired,label:S.any,placeholder:S.any,helperText:S.string,methods:S.arrayOf(S.oneOf(["select","upload"])),iconifyShape:S.oneOf(["id","url"])};function Sd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[h,p]=I.useState(!1),g=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:w}=Ee(),D=96,P=ve(()=>{!b.current||c||(u(!0),setTimeout(()=>{const C=y.current+1,_=(C-1)*D,R=C*D,E=m.current.slice(_,R);s(j=>[...j,...E]),y.current=C,b.current=R<m.current.length,u(!1)},300))}),x=ve(C=>{m.current=C,y.current=1,b.current=C.length>D;const _=C.slice(0,D);s(_),p(C.length===0),b.current&&P()}),{run:T}=gc(async C=>{if(C){u(!0);try{const{icons:_}=await Jy({keyword:C});x(_)}catch(_){console.error("Failed to search icons:",_),p(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const C=()=>{if(!g.current)return;const{scrollTop:R,scrollHeight:E,clientHeight:j}=g.current;(R+j>=E-150||E<=j)&&P()},_=g.current;return _&&(_.addEventListener("scroll",C),C()),()=>{_&&_.removeEventListener("scroll",C)}},[P,c]),To(async()=>{if(f)T(f);else{u(!0);try{const C=await Qy("mdi-light");x(C)}catch(C){console.error("Failed to fetch default icons:",C),p(!0)}finally{u(!1)}}},[f,T,x]),v.jsxs(rS,{ref:g,sx:t,...a,children:[v.jsxs(ie,{className:"icon-picker-input",children:[v.jsx(Ht,{label:w("navigation.form.searchIcons"),placeholder:w("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:C=>d(C.target.value),slotProps:{input:{endAdornment:v.jsx(Oe,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:v.jsx(Lc,{style:{fontSize:18}})})}}}),v.jsx(Zt,{onClick:o,children:w("common.cancel")})]}),v.jsxs(ie,{children:[l.length>0&&v.jsx(ie,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(C=>v.jsx(nS,{$active:n===C,onClick:()=>{i(C)},children:v.jsx(be,{icon:C,width:"32",height:"32"})},C))}),h&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:v.jsx(ie,{sx:{textAlign:"center"},children:"No matching results"})}),c&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center"},children:v.jsx(Sh,{size:20})})]})]})}Sd.propTypes={label:S.any,placeholder:S.any,value:S.string,sx:S.object,onPick:S.func.isRequired,onClose:S.func.isRequired};const rS=Ve(ie)(({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}})),nS=Ve(Oe,{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 mo({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 v.jsx(I.Suspense,{children:v.jsx(tS,{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}})})}mo.propTypes={ref:S.any,locale:S.string,apiPath:S.string,headers:S.object,imageEditorProps:S.object,onUploadFinish:S.func};const bs=24,ys=48,Ss="add",We="en",xs={title:{[We]:""},description:{[We]:""},link:{[We]:""}};function ws(e){return jc(Array.from(new Set(Ce.NAVIGATION_I18N_FIELDS.flatMap(r=>Yt(e[r])?Object.keys(e[r]):[]))),We)}S.string.isRequired;function na({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ac(),{t:l,locale:s}=Ee(),{blocklet:c}=Nt(),u=I.useMemo(()=>{const k=c.environments.find(A=>A.key==="BLOCKLET_APP_LANGUAGES");return(k?k.value.split(","):["en","zh"]).filter(A=>kt.SUPPORTED_LANGUAGES[A]).reduce((A,$)=>(A[$]=kt.SUPPORTED_LANGUAGES[$].nativeName,A),{})},[c.environments]),f=I.useRef(()=>{}),d=or({isRoot:!0,type:Ss,linkDisabled:!1,locale:We,formState:$e(xs),get localeList(){return ws(d.formState)}}),{handleSubmit:h,control:p,reset:g,setValue:m,clearErrors:y,formState:{errors:b}}=Ip({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{Ce.NAVIGATION_I18N_FIELDS.forEach(k=>m(k,d.formState[k][d.locale]))},[m,d.locale]);const w=Rp({control:p}),D=w.component,P=w.title,x=w.description,T=w.link,C=w.parent;I.useEffect(()=>{d.formState.title[d.locale]=P},[P]),I.useEffect(()=>{d.formState.description[d.locale]=x},[x]),I.useEffect(()=>{d.formState.link[d.locale]=T},[T]),I.useEffect(()=>{i?.(w)},[w,i]);const _=I.useMemo(()=>t.find(O=>D?n.find($=>$.name===D).did===O.id:O.id===C),[n,t,D,C]),R=I.useMemo(()=>{if(_?.component){const k=n.find(J=>J.name===_.component),{link:O}=k||{},A=Yt(O)?O[d.locale]:O;if(D)return ka(A);const $=Yt(_.link)?_.link[d.locale]:_.link;return ka(qe(A,$||"/"))}return null},[n,d.locale,_,D]),E=I.useMemo(()=>{const{component:k}=_||{},O=n.find(J=>J.name===k),{navigation:A=[]}=O||{};return Ne.flattenNavigation(A,{transform(J,oe){return oe?.section&&(J.section=J.section||oe.section),J}}).filter(J=>J.link).filter(J=>Ne.isMatchSection(J.section,r)).map(J=>({label:J.link,title:J.title[s]||J.title}))},[_,n,r,s]),j=I.useCallback(()=>{d.isRoot=!0,d.locale=We,d.type=Ss,d.linkDisabled=!1,d.formState=$e(xs),g(),y(),f.current=()=>{}},[y,g,d]),N=I.useCallback((k={})=>(d.localeList.length>0&&Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{Ap(d.formState[O]).length>1&&(k[O]=d.formState[O])}),ko(k.role)&&(k.role=void 0),k),[d.localeList,d.formState]),U=I.useCallback(({parent:k}={},O=()=>{})=>{d.type="add",d.isRoot=!k,m("parent",k?.id),f.current=A=>{O(A)}},[m,d]),z=I.useCallback((k={},O=()=>{})=>{const{id:A,icon:$,parent:J,component:oe,role:fe=[]}=k;m("id",A),m("icon",$),k.from==="team-tmpl"&&(d.linkDisabled=!0);const de=ws(k),me=(ge,De)=>{mc(ge)?d.formState[De]=de.reduce((ce,ae)=>(ce[ae]=ge,ce),{[We]:ge}):Yt(ge)?d.formState[De]=$e(ge):d.formState[De]={}};Ce.NAVIGATION_I18N_FIELDS.forEach(ge=>me(k[ge],ge)),Ce.NAVIGATION_I18N_FIELDS.forEach(ge=>m(ge,d.formState[ge][d.locale])),m("component",oe),m("parent",J),m("role",fe||[]),d.type="edit",d.isRoot=!J,f.current=ge=>{const De=wh(ge,["id","title","description","icon","component","link","role"]);O(De)}},[m,d]);function G(k){const O=k?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>bs)return l("navigation.form.titleTooLong",{len:bs})}return!0}function W(k){const O=k?.trim();return O&&O.length>ys?l("navigation.form.descriptionTooLong",{len:ys}):!0}const V=ve(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k);async function Q(k){const O=k?.trim();if(O){if(Po(V(O)))return!0;try{await _o(O)}catch{return l("navigation.form.invalidIcon")}}return!0}function te(k){const O=k?.trim();return O?Q(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}function X(k){const O=k?.trim();return O?Ne.checkLink(O)?!0:l("navigation.form.invalidLink"):d.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}const ee=I.useCallback(k=>{d.locale=k,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]||(d.formState[O][k]="")}),setTimeout(()=>{y()})},[y,d]),q=I.useCallback(()=>{const{title:k,link:O}=d.formState;if(r!=="bottomNavigation")for(const A of Object.keys(k)){const $=G(k[A]);if($!==!0)return $}for(const A of Object.keys(O)){const $=X(O[A]);if($!==!0)return $}return!0},[r,d.formState]),re=I.useCallback(k=>{const O=q();O===!0?f.current(N(k)):wr.error(O)},[q,N]),F=I.useCallback(k=>{d.locale=We,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O]=Dt(d.formState[O],k)}),i?.(w)},[d,w,i]),H=I.useCallback(k=>{d.locale=k,Ce.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]=d.formState[O][We]}),i?.(w),setTimeout(()=>{y()})},[y,d,w,i]);return I.useImperativeHandle(e,()=>({add:U,edit:z,resetImmediate:()=>j(),reset:()=>setTimeout(()=>j(),0),submit:h(re)}),[U,j,z,h,re]),v.jsxs(ie,{...o,children:[v.jsx(md,{sx:{mb:1},onAdd:H,onChange:ee,onRemoveLocale:F,locale:d.locale,localeMap:u,locales:d.localeList}),v.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})}),r==="bottomNavigation"?v.jsx(rt,{name:"icon",control:p,rules:{validate:te},render:({field:k})=>v.jsx(vo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==We,methods:["select"],iconifyShape:"url",...k})}):v.jsx(rt,{name:"icon",control:p,rules:{validate:Q},render:({field:k})=>v.jsx(vo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==We,...k})}),d.isRoot&&v.jsx(rt,{name:"component",control:p,render:({field:k})=>v.jsx(Ki,{fullWidth:!0,margin:"dense",disabled:d.locale!==We&&k.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:!!b?.component?.message,helperText:b?.component?.message||" ",...Dt(k,"ref")})}),!d.isRoot&&["header"].includes(r)&&v.jsx(rt,{name:"description",control:p,rules:{validate:W},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:d.isEdit,error:!!b?.description?.message,helperText:b?.description?.message||" ",...k})}),v.jsx(rt,{name:"link",control:p,rules:{validate:X},render:({field:k})=>v.jsx(vc,{fullWidth:!0,margin:"dense",children:v.jsx(Pp,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:d.linkDisabled,isOptionEqualToValue:O=>O.label,options:E,renderInput:O=>v.jsx(Ht,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!b?.link?.message,helperText:b?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:R?v.jsx(Ui,{position:"start",sx:{textDecoration:Yy(T||"")?"line-through":""},children:R}):null}}}),renderOption:(O,A)=>v.jsxs(ie,{component:"li",...O,children:[A.label,v.jsx(Ie,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:A.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(O,A)=>{k.onChange(A)}})})}),["dashboard","sessionManager"].includes(r)&&v.jsx(rt,{name:"role",control:p,render:({field:k})=>v.jsx(Ki,{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:!!b?.role?.message,helperText:b?.role?.message||" ",...Dt(k,"ref")})}),r==="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})})]})]})}na.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array,onChange:S.func};function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:l}]=wp(),[s,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),d=I.useCallback(()=>{l(),u.current?.reset()},[l]),h=I.useCallback((g={},m=()=>{})=>{c("add"),u.current?.add(g,y=>m(d,y)),a()},[a,d]),p=I.useCallback((g={},m=()=>{})=>{c("edit"),u.current?.edit(g,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:h,edit:p,close:d}),[h,p,d]),v.jsx(Ch,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:v.jsx(bc,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:v.jsx(na,{ref:u,section:r,components:n,rawNavigations:t})})}ia.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array};function xd({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(g){g.preventDefault(),g.stopPropagation()}const f=I.useCallback(g=>{u(g),r(o)},[r,o]),d=I.useCallback(g=>{u(g),n(o)},[n,o]),h=I.useCallback(g=>{u(g),t(o)},[t,o]),p=I.useCallback(g=>{u(g),i(o)},[i,o]);return v.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&v.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:v.jsx(Oe,{size:"small",color:"success",onClick:f,disabled:c,children:v.jsx(be,{icon:"mdi:plus-box-outline"})})}),v.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:v.jsx(Oe,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:v.jsx(be,{icon:"mdi:pencil-outline"})})}),v.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:v.jsx(Oe,{size:"small",color:"warning",onClick:h,disabled:c,children:o.visible===!1?v.jsx(be,{icon:"mdi:eye-off-outline"}):v.jsx(be,{icon:"mdi:eye-outline"})})}),v.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:v.jsx(Oe,{disabled:s&&!c,size:"small",color:"error",onClick:p,children:v.jsx(be,{icon:"mdi:delete"})})})]})}xd.propTypes={data:S.object.isRequired,className:S.string,add:S.func,edit:S.func,toggle:S.func,del:S.func,section:S.string};const xn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",iS=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},oS=(e,r="en")=>{if(typeof e=="string"){if(fd(e)){const t=new URL(e);return t.searchParams.set("locale",r),t.href}if(hd(e))return e;const n=new URL(e,window.location.origin);return n.searchParams.set("locale",r),n.pathname+n.search}return typeof e=="object"?e[r]||e?.en||e?.zh:e},Qt=(e,r="en",n="header")=>{if(!e?.length)return e;const t=(i,o)=>i&&typeof i=="object"?i[o]||i?.en||i?.zh:i;return At(e,i=>({...i,title:t(i.title,r),description:t(i.description,r),link:yc(i.items?.length?i.link:oS(i.link,r),n),_rawLink:i.link}),"items")},aS=e=>At(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),lS=e=>{if(!e?.length)return null;const r=aS(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=iS(r.theme),r.navigation=lS(sS(r.navigation)),r},sS=(e=[])=>ta(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),wd=(e,r)=>ta(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"),cS={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"/>'},uS={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 dS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(h=>h.section==="sessionManager"&&!["/sessionManager"].includes(h.id)).filter(h=>!!(h?.role||[]).includes(e?.user?.role||"guest")).map(h=>{const p=(a?.componentMountPoints||[]).find(g=>h.component===g.name);return{...h,component:p}}),s=Et(),c=I.useRef(null),u=or({open:!1}),f=ve((h=!u.open)=>{u.open=h}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:v.jsxs(ie,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[v.jsx(Oe,{size:"medium",ref:c,children:v.jsx(be,{icon:cS,fontSize:n,style:{transform:"scale(1.08)"}})}),v.jsx(Ih,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:h})=>v.jsx(Rh,{onClickAway:p=>{p.preventDefault(),p.stopPropagation(),f(!1)},children:v.jsx(Sc,{...h,timeout:350,children:v.jsxs(Tr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[v.jsx(Dh,{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(p=>v.jsx(Th,{disablePadding:!0,children:v.jsxs(kp,{href:Oa(p.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[p?.component?.did?v.jsx(ie,{component:"img",src:`${xc}/blocklet/logo-bundle/${p.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):v.jsx(be,{fontSize:50,icon:p.icon||uS,color:s.palette.text.secondary}),v.jsx(Ie,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Oa(p.title,r)})]})},p.id))}),v.jsx(_h,{session:e,children:v.jsx(bc,{variant:"outlined",fullWidth:!0,href:Ph,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const Cd=S.shape({appLogo:S.node,appName:S.string,theme:S.shape({background:S.string}),enableConnect:S.bool,enableLocale:S.bool,navigation:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object]),icon:S.string,items:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object])}))}))}),Id=S.shape({showText:S.bool,showRole:S.bool,switchDid:S.bool,switchProfile:S.bool,switchPassport:S.bool,disableLogout:S.bool,onLogin:S.func,onLogout:S.func,onSwitchDid:S.func,onSwitchProfile:S.func,onSwitchPassport:S.func,menu:S.array,menuRender:S.func,dark:S.bool,size:S.number}),fS=["admin","owner"],hS=e=>e.endsWith(".ip.abtnet.io"),pS=e=>e.endsWith(".did.abtnet.io"),gS={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:"配置域名"}},vS=1e3*60*60*24*30,Cs=".well-known/service/admin/domains";function Rd({locale:e="en",session:r={}}){const n=r?.user,t=zc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const h=+new Date,p=+new Date(d);return h-p>vS}),a=ve((d,h={})=>wc(gS,d,e,"en",h)),l=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}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 d=qe(window.location.origin,Cs);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&fS.includes(n.role);return window.location.href.includes(Cs)||t||!hS(l)&&!pS(l)?null:v.jsxs(kh,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[v.jsxs(Oh,{sx:{padding:"20px !important"},children:[v.jsx(Ie,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),v.jsx(Ie,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&v.jsx(ie,{component:"ul",children:s.map(d=>v.jsx(Ie,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),v.jsxs(Eh,{sx:{px:"12px !important"},children:[v.jsx(Zt,{onClick:c,children:a("skip")}),f&&v.jsx(Zt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Rd.propTypes={locale:S.string,session:S.object};var Pi,Is;function mS(){if(Is)return Pi;Is=1;const e=Nh();return Pi=(r,n=!1)=>{const t=e(["@arcblock/ws",r].join(":"));return{debug:t,warn:t,info:t,trace:n?t:console.error,error:n?t:console.error}},Pi}var ki,Rs;function bS(){if(Rs)return ki;Rs=1;const e=mS();return ki=(r,n,t)=>class extends r{constructor(o,a={}){super(o,{transport:t,...a}),this._logger=e("client",a.silent),this.emitter=new n,this.onOpen(()=>{this._logger.debug("socket open",o)}),this.onClose(()=>{this._logger.debug("socket close",o)}),this.onError(l=>{this._logger.error("socket error",l.error)}),this.onMessage(l=>{this._logger.debug("socket message",l)})}on(o,a,l={}){this.ensureJoinChannel(o,l),this.emitter.on(o,a)}off(o,a){a?this.emitter.off(o,a):this.emitter.removeAllListeners(o),this.ensureLeaveChannel(o)}disconnect(o,a,l){this.emitter.eventNames().forEach(s=>{this.emitter.removeAllListeners(s)}),super.disconnect(o,a,l)}ensureJoinChannel(o,a={}){if(this.emitter.listenerCount(o)>0)return;const s=this.channel(o,a);s.join().receive("ok",c=>{this._logger.debug("join success",{topic:o,message:c})}).receive("error",c=>{this._logger.error("join error",{topic:o,error:c})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),s.on(o,({status:c,response:u})=>{c==="ok"?this.emitter.emit(o,u):this._logger.debug("response error",{topic:o,status:c,data:u})})}ensureLeaveChannel(o){if(this.emitter.listenerCount(o)>0)return;const l=this.channels.find(s=>s.topic===o);l&&(this.remove(l),l.leave().receive("ok",s=>{this._logger.debug("leave success",{topic:o,message:s})}).receive("error",s=>{this._logger.error("leave error",{topic:o,err:s})}).receive("timeout",()=>{this._logger.debug("leave timeout",{topic:o})}),l.off(o))}subscribe(o,a={}){let l=this.channels.find(s=>s.topic===o);return l||(l=this.channel(o,a),l.join().receive("ok",s=>{this._logger.debug("join success",{topic:o,message:s})}).receive("error",s=>{this._logger.error("join error",{topic:o,error:s})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),l)}unsubscribe(o){this.ensureLeaveChannel(o)}},ki}var Oi,Ds;function yS(){if(Ds)return Oi;Ds=1;const e=Mh(),{Socket:r}=Ah();return Oi=bS()(r,e),Oi}var Ei,Ts;function SS(){return Ts||(Ts=1,Ei={WsClient:yS()}),Ei}var xS=SS();const Rt={};function wS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=qe(r,xc,e);return new xS.WsClient(n,{heartbeatIntervalMs:100*1e3})}function CS(e="admin"){return Rt[e]||(Rt[e]=wS(e)),Rt[e]}const IS=(e="admin")=>{const r=I.use(Bn),{session:n}=r??{};return!Rt[e]&&n.user&&(Rt[e]=CS(e),Rt[e].connect()),Rt[e]},RS={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>'},DS={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"/>'},TS={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 _S(){const e=Et();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Fn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const PS=e=>!ko(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,kS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},OS=async(e,r)=>{try{return await Op.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},ES=async(e,r)=>{const{type:n,did:t}=e;return Cc.isSameAddr(n,"did")?await OS(t,r)||Cn.getLink(e):Cn.getLink(e)},NS=async(e,r,n=!0)=>{const t=Cn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Cn.Link){if(n){const o=await ES(i,r),{type:a,chainId:l,did:s}=i;return Cc.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(""))},MS=e=>Lh.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),AS={comment:(e,r)=>r&&r>1?v.jsxs(v.Fragment,{children:["left ",r," comments on your ",e]}):v.jsxs(v.Fragment,{children:["commented on your ",e]}),like:e=>v.jsxs(v.Fragment,{children:["liked your ",e]}),follow:()=>v.jsx(v.Fragment,{children:"followed you"}),tips:e=>v.jsxs(v.Fragment,{children:["gave tips to your ",e]}),mention:e=>v.jsxs(v.Fragment,{children:["mentioned you in ",e]}),assign:()=>v.jsx(v.Fragment,{children:"assigned you a task"})};function Wt({user:e,color:r=void 0}){const{palette:n}=Et(),t=Oo(qe(Ce.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return v.jsx(Ic,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Wt.displayName="UserLink";function LS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Et(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Ae(()=>{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]),f=Ae(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ve(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return v.jsx(Wt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return v.jsxs(v.Fragment,{children:[v.jsx(Wt,{user:m[0],color:c})," and ",v.jsx(Wt,{user:y,color:c})]});const b=f.length>3,w=b?f.slice(0,2):m;return v.jsxs(v.Fragment,{children:[w.map((D,P)=>v.jsxs(Z.Fragment,{children:[v.jsx(Wt,{user:D,color:c}),P<w.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:v.jsxs(v.Fragment,{children:[", and ",v.jsx(Wt,{user:y,color:c})]})]})}),h=ve(()=>{const m=a?AS[a]:null;return m?m(s,r.length):null}),p=Ae(()=>{const m=d(),y=h();return!m||!y?null:v.jsxs(v.Fragment,{children:[m," ",y]})},[a,s,f,d,h]),g=Ae(()=>{if(!e)return null;const m=kS(e);return m?.targetLink?qe(i,m.targetLink):null},[e,i]);return!a||ko(l)?null:v.jsxs(v.Fragment,{children:[p," ",g&&v.jsx(Ic,{href:g,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const zS={normal:Ea,success:RS,info:Ea,warning:DS,error:TS},jS=ar(Bh)`
44
44
  font-size: 20px;
45
45
  `,FS=ar.div`
46
46
  display: flex;
@@ -1,4 +1,4 @@
1
- import{aG as O1,j as u,r as i,bn as xt,aQ as v1,O as Pe,H as le,a2 as L1,b as Tt,a0 as Ot,f7 as Ne,f as vt,F as F1,cq as Lt,b9 as je,iI as Ft,m as de,cr as Ut,fP as kt,iJ as U1,y as R,fc as k1,gF as R1,a4 as Rt,by as Te,dn as Pt,N as V,L as Ae,iK as Nt,aV as P1,dF as N1,aO as oe,dd as j1,z as me,az as jt,gz as M1,hl as V1,iL as K1,gx as J1,iM as _1,hD as Z1,iN as Mt,iO as G1,iP as Q1,iQ as X1,iR as Vt,iS as z1,iT as Y1,iU as q1,cE as U,iV as Kt,iW as W1,iA as $1,iX as e6,iY as Me,g0 as t6,iZ as n6,i_ as r6,i$ as s6,hm as i6,gS as a6,f5 as o6,dB as c6,T as ie,$ as u6,D as l6,t as d6,v as Ge,C as p6,j0 as Qe,w as f6,he as h6,dH as C6,gn as m6,a5 as y6,Y as Ve,o as J,J as Xe,x as E6,ax as g6,al as A6}from"./index-BfhNDOKb.js";import{v as ze}from"./index-BW_rM4QF.js";import{f as S6}from"./index-BojVbZw0.js";import{b as D6,c as B6,d as w6}from"./spaces-3NySh_Ui.js";import{u as Ke}from"./blocklet-BepSnsS4.js";import{D as b6}from"./DeleteOutline--HOjaz49.js";import{O as Jt}from"./OpenInNew-YONC4zqV.js";import{x as I6}from"./index-DRYJ0xIl.js";import{H as H6}from"./HelpOutline-CxFR9PYg.js";import"./api-CbSTXzd2.js";const x6=O1(u.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 T6(){const[e,r]=i.useState(null),{blocklet:n}=Ke();return i.useEffect(()=>{r(D6(n))},[n]),{storageEndpoint:e}}const _t=i.createContext({}),{Provider:O6,Consumer:On}=_t;function v6({children:e}){const[r,n]=i.useState(!1),[s,o]=i.useState(null),{blocklet:a,actions:{refreshBlocklet:p}}=Ke(),{storageEndpoint:l}=T6(),{api:d}=xt();v1(async()=>{try{if(n(!0),Pe(l)){o(null);return}const C=await B6(l);o(C)}catch(C){console.error(C),le.error(C.message)}finally{n(!1)}},[l]);const h=()=>{o(null),p()},c=async C=>{o(C),await f(C.endpoint),p()},f=async C=>{await d.configBlocklet({input:{did:[a.meta.did],configs:[{key:Tt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:C}]}}),p()};i.useEffect(()=>{async function C(){if(!s)return;const E=await w6(s.endpoint,s.name),A=L1(s,{name:E});o(A)}C()},[]);const m=!!(l&&s);return u.jsx(O6,{value:{loading:r,spaceGateway:s,deleteSpaceGateway:h,updateSpaceGateway:c,storageEndpoint:l,settingStorageEndpoint:f,hasStorageEndpoint:m},children:e})}v6.propTypes={children:Ot.node.isRequired};function L6(){return i.useContext(_t)}const Se=Ne({});function F6({key:e}={key:"md"}){const r=vt();return F1(r.breakpoints.down(e))}var F=(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))(F||{}),Zt=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(Zt||{}),Z=(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))(Z||{});function U6({endpoint:e,deps:r=[]}){return Lt(async()=>{if(!je(e))return;const{headers:n}=await Se.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[s,o,a,p,l,d,h,c,f,m]=[n["x-space-name"],n["x-subscription-id"],n["x-listable"]==="true",n["x-readable"]==="true",n["x-writeable"]==="true",n["x-space-version"],n["x-space-owner-did"],n["x-space-is-available"],n["x-error-code"],n["x-is-site-admin"]],C=s?decodeURIComponent(s):"";if(c===void 0||f===void 0){const E=a&&p&&l;return{version:d,name:C,subscriptionId:o,ownerDid:h||"",isAvailable:E,errorCode:E?0:F.UNAUTHORIZED,isSiteAdmin:m==="true"}}return{version:d,name:C,subscriptionId:o,ownerDid:h,isAvailable:c==="true",errorCode:parseInt(f,10),isSiteAdmin:m==="true"}},{refreshDeps:[e].concat(r),onError(n){console.error(n)}})}const k6=Ft.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{aG as O1,j as u,r as i,bn as xt,aQ as v1,O as Pe,H as le,a2 as L1,b as Tt,a0 as Ot,f7 as Ne,f as vt,F as F1,cq as Lt,b9 as je,iI as Ft,m as de,cr as Ut,fP as kt,iJ as U1,y as R,fc as k1,gF as R1,a4 as Rt,by as Te,dn as Pt,N as V,L as Ae,iK as Nt,aV as P1,dF as N1,aO as oe,dd as j1,z as me,az as jt,gz as M1,hl as V1,iL as K1,gx as J1,iM as _1,hD as Z1,iN as Mt,iO as G1,iP as Q1,iQ as X1,iR as Vt,iS as z1,iT as Y1,iU as q1,cE as U,iV as Kt,iW as W1,iA as $1,iX as e6,iY as Me,g0 as t6,iZ as n6,i_ as r6,i$ as s6,hm as i6,gS as a6,f5 as o6,dB as c6,T as ie,$ as u6,D as l6,t as d6,v as Ge,C as p6,j0 as Qe,w as f6,he as h6,dH as C6,gn as m6,a5 as y6,Y as Ve,o as J,J as Xe,x as E6,ax as g6,al as A6}from"./index-tJqcQJw8.js";import{v as ze}from"./index-KQW85_sG.js";import{f as S6}from"./index-BojVbZw0.js";import{b as D6,c as B6,d as w6}from"./spaces-zGV6wwqp.js";import{u as Ke}from"./blocklet-C03sDJ1i.js";import{D as b6}from"./DeleteOutline-BQGJu1ed.js";import{O as Jt}from"./OpenInNew-DpFE4qHg.js";import{x as I6}from"./index-DRYJ0xIl.js";import{H as H6}from"./HelpOutline-B9rq5AT4.js";import"./api-TFCv4qOf.js";const x6=O1(u.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 T6(){const[e,r]=i.useState(null),{blocklet:n}=Ke();return i.useEffect(()=>{r(D6(n))},[n]),{storageEndpoint:e}}const _t=i.createContext({}),{Provider:O6,Consumer:On}=_t;function v6({children:e}){const[r,n]=i.useState(!1),[s,o]=i.useState(null),{blocklet:a,actions:{refreshBlocklet:p}}=Ke(),{storageEndpoint:l}=T6(),{api:d}=xt();v1(async()=>{try{if(n(!0),Pe(l)){o(null);return}const C=await B6(l);o(C)}catch(C){console.error(C),le.error(C.message)}finally{n(!1)}},[l]);const h=()=>{o(null),p()},c=async C=>{o(C),await f(C.endpoint),p()},f=async C=>{await d.configBlocklet({input:{did:[a.meta.did],configs:[{key:Tt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:C}]}}),p()};i.useEffect(()=>{async function C(){if(!s)return;const E=await w6(s.endpoint,s.name),A=L1(s,{name:E});o(A)}C()},[]);const m=!!(l&&s);return u.jsx(O6,{value:{loading:r,spaceGateway:s,deleteSpaceGateway:h,updateSpaceGateway:c,storageEndpoint:l,settingStorageEndpoint:f,hasStorageEndpoint:m},children:e})}v6.propTypes={children:Ot.node.isRequired};function L6(){return i.useContext(_t)}const Se=Ne({});function F6({key:e}={key:"md"}){const r=vt();return F1(r.breakpoints.down(e))}var F=(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))(F||{}),Zt=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(Zt||{}),Z=(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))(Z||{});function U6({endpoint:e,deps:r=[]}){return Lt(async()=>{if(!je(e))return;const{headers:n}=await Se.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[s,o,a,p,l,d,h,c,f,m]=[n["x-space-name"],n["x-subscription-id"],n["x-listable"]==="true",n["x-readable"]==="true",n["x-writeable"]==="true",n["x-space-version"],n["x-space-owner-did"],n["x-space-is-available"],n["x-error-code"],n["x-is-site-admin"]],C=s?decodeURIComponent(s):"";if(c===void 0||f===void 0){const E=a&&p&&l;return{version:d,name:C,subscriptionId:o,ownerDid:h||"",isAvailable:E,errorCode:E?0:F.UNAUTHORIZED,isSiteAdmin:m==="true"}}return{version:d,name:C,subscriptionId:o,ownerDid:h,isAvailable:c==="true",errorCode:parseInt(f,10),isSiteAdmin:m==="true"}},{refreshDeps:[e].concat(r),onError(n){console.error(n)}})}const k6=Ft.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}"}}}),R6=Ft.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-D_7bRoL6.js";import"./index-BfhNDOKb.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
1
+ import{m as et}from"./index-PGkZ-p10.js";import"./index-tJqcQJw8.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{m as h,j as e,ad as j,N as o,X as g,T as _,t as b,o as n}from"./index-BfhNDOKb.js";import{C as T}from"./click-to-copy-Dlvnt0pX.js";function R({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(T,{"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})}R.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{R as D};
1
+ import{m as h,j as e,ad as j,N as o,X as g,T as _,t as b,o as n}from"./index-tJqcQJw8.js";import{C as T}from"./click-to-copy-OQVm3W8D.js";function R({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(T,{"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})}R.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{R as D};
@@ -1 +1 @@
1
- import{eI as r}from"./index-BfhNDOKb.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};
1
+ import{eI as r}from"./index-tJqcQJw8.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};