@abtnode/webapp 1.17.5-beta-20251214-231110-497f8d27 → 1.17.6-beta-20251216-081847-bf91c4db

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 (188) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-CgNLGdsV.js → AdapterDayjs-BJDMOH87.js} +1 -1
  4. package/dist/assets/{Add-DY1gS9Dz.js → Add-CwfzHL2f.js} +1 -1
  5. package/dist/assets/ArrowDropDown-BRCFiDo5.js +1 -0
  6. package/dist/assets/{Autocomplete-DBXlHxck.js → Autocomplete-DTfKu22k.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-C4L8U0Mj.js → Breadcrumbs-CI3uNLPY.js} +1 -1
  8. package/dist/assets/{ButtonGroup-3fqwj5Ky.js → ButtonGroup-CE8Yme-Z.js} +1 -1
  9. package/dist/assets/{CSSTransition-hVfsLWm-.js → CSSTransition-Cq_0t7dk.js} +1 -1
  10. package/dist/assets/{CallMerge-BWKncjAQ.js → CallMerge-BpBCpBS4.js} +1 -1
  11. package/dist/assets/{CardContent-S1Olt54S.js → CardContent-VIJU2wwZ.js} +1 -1
  12. package/dist/assets/{ChevronLeft-DGU-DOuV.js → ChevronLeft-DDZiF24z.js} +1 -1
  13. package/dist/assets/{ChevronRight-8InGKmMS.js → ChevronRight-iPKgmmla.js} +1 -1
  14. package/dist/assets/{Clear-BFurvC8R.js → Clear-lc-87cdU.js} +1 -1
  15. package/dist/assets/{Delete-Brb8t62i.js → Delete-Depf4F2y.js} +1 -1
  16. package/dist/assets/{DeleteOutline-P1tPKlQL.js → DeleteOutline-CCoXF09b.js} +1 -1
  17. package/dist/assets/{Done-D7HN06J1.js → Done-KOQXZtlD.js} +1 -1
  18. package/dist/assets/{Edit-CpNEn5zp.js → Edit-BWqfJBJ6.js} +1 -1
  19. package/dist/assets/{ErrorOutline-DlSN54Ps.js → ErrorOutline-B7Ps-w5c.js} +1 -1
  20. package/dist/assets/{FilterList-DCiDc43y.js → FilterList-BGhEWkST.js} +1 -1
  21. package/dist/assets/{Google-D_lyR__A.js → Google-B-6SbnBW.js} +1 -1
  22. package/dist/assets/{HelpOutline-DpBESAst.js → HelpOutline-VHuGbaF6.js} +1 -1
  23. package/dist/assets/{KeyboardArrowDown-DeA6xh4S.js → KeyboardArrowDown-6ORbckfg.js} +1 -1
  24. package/dist/assets/{Launch-Bq5mqcUb.js → Launch-BeO2pbYn.js} +1 -1
  25. package/dist/assets/{Link-CyO965jU.js → Link-pkcRdxt0.js} +1 -1
  26. package/dist/assets/{ListItemButton-BsnowPaA.js → ListItemButton-BUXqqfVc.js} +1 -1
  27. package/dist/assets/{ListSubheader-BcTZxGIx.js → ListSubheader-DzDc9oA3.js} +1 -1
  28. package/dist/assets/{LoadingButton-UXSaquyL.js → LoadingButton-DuEza0fz.js} +1 -1
  29. package/dist/assets/{MoreVert-V2LiAaXF.js → MoreVert-DXy5wrMx.js} +1 -1
  30. package/dist/assets/{OpenInNew-C5gvRiqd.js → OpenInNew-O9EysXQn.js} +1 -1
  31. package/dist/assets/{Refresh-C6MLAQnO.js → Refresh-BT6pxoXK.js} +1 -1
  32. package/dist/assets/{Replay-CSz8ZIga.js → Replay-CBq27_EQ.js} +1 -1
  33. package/dist/assets/{Search-x2lb6Akd.js → Search-edKoOPH1.js} +1 -1
  34. package/dist/assets/{Stepper-D7l565H3.js → Stepper-rWMUaF_2.js} +1 -1
  35. package/dist/assets/{TableSearch-DRmWGhph.js → TableSearch-B1H-6-fg.js} +1 -1
  36. package/dist/assets/{ToggleButtonGroup-DTZuFSiT.js → ToggleButtonGroup-C_82EW2F.js} +1 -1
  37. package/dist/assets/{UnfoldMore-CfZy9D-D.js → UnfoldMore-COp9hgN2.js} +1 -1
  38. package/dist/assets/{Verified-BpXE28d4.js → Verified-CDQAXply.js} +1 -1
  39. package/dist/assets/{VerifiedUser-BNuQYAdH.js → VerifiedUser-DK9YGdyH.js} +1 -1
  40. package/dist/assets/{ViewList-C-96Tk3T.js → ViewList-BbsCfkWP.js} +1 -1
  41. package/dist/assets/{_createAggregator-CImEitD-.js → _createAggregator-Dw9ehKUs.js} +1 -1
  42. package/dist/assets/{actions-B8scXmgC.js → actions-B3lOcEVi.js} +1 -1
  43. package/dist/assets/{actions-kx-IWp3k.js → actions-D6D1nZGR.js} +1 -1
  44. package/dist/assets/{agreement-DP0eUo8S.js → agreement-BJafEhuZ.js} +1 -1
  45. package/dist/assets/api-CzO1JAlF.js +1 -0
  46. package/dist/assets/{appearance-cERzuGGi.js → appearance-DHyuFSLh.js} +1 -1
  47. package/dist/assets/{audit-logs-Cv2ihhLM.js → audit-logs-9W-SjlpY.js} +1 -1
  48. package/dist/assets/{base-chart-DEZPYe4h.js → base-chart-CQIo67AL.js} +1 -1
  49. package/dist/assets/{blocklet-C0-c8dVN.js → blocklet-c-fcHcMv.js} +1 -1
  50. package/dist/assets/{chain-fXxRiV2U.js → chain-DggQDLgW.js} +1 -1
  51. package/dist/assets/{click-to-copy-CGVo7y_H.js → click-to-copy-CUoB1qVU.js} +1 -1
  52. package/dist/assets/cloneDeep-CF0rc6VO.js +1 -0
  53. package/dist/assets/{config-navigation-DLeJwQ7O.js → config-navigation-0EI4c1lJ.js} +3 -3
  54. package/dist/assets/{connect-to-DCLDiA4c.js → connect-to-DYsYwfyz.js} +1 -1
  55. package/dist/assets/{cssMode-JYzCUrBO.js → cssMode-BsY3xqt4.js} +1 -1
  56. package/dist/assets/{delete-confirm-CKUwqxvJ.js → delete-confirm-BuKtLpww.js} +1 -1
  57. package/dist/assets/{depsEqual-B4BFmwuI.js → depsEqual-CDIkAeqx.js} +1 -1
  58. package/dist/assets/{detail-F8H8w9u1.js → detail-DEbKzuLV.js} +3 -3
  59. package/dist/assets/{domains-BpTnyTDn.js → domains-lG_9thiv.js} +1 -1
  60. package/dist/assets/{download-DDdx75jE.js → download-Z-lPT0_Q.js} +1 -1
  61. package/dist/assets/{edit.svg-CBK1UF-9.js → edit.svg-BNlNDOgE.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-DcciVh-V.js +1 -0
  63. package/dist/assets/engine-DHbDpbO8.js +1 -0
  64. package/dist/assets/{freemarker2-BUy2QQDP.js → freemarker2-C5pjFwAf.js} +1 -1
  65. package/dist/assets/{get-safe-url-DwUMajjg.js → get-safe-url-DMzSWw8A.js} +1 -1
  66. package/dist/assets/getValidReactChildren-C2YiZOfP.js +1 -0
  67. package/dist/assets/{graphqlMode-DL2_JbNW.js → graphqlMode-DQJwvpqC.js} +2 -2
  68. package/dist/assets/{handlebars-q_jgTrqQ.js → handlebars-AtbuPgIu.js} +1 -1
  69. package/dist/assets/{html-D9YLKYtv.js → html-BZ4Y9llP.js} +1 -1
  70. package/dist/assets/{html-title-Dp-sqsn-.js → html-title-ZIT73gw4.js} +1 -1
  71. package/dist/assets/{htmlMode-Bz_kRcCe.js → htmlMode-CaNYTMy1.js} +1 -1
  72. package/dist/assets/{iframe-Ca3kRbO-.js → iframe-BeX_RqP4.js} +1 -1
  73. package/dist/assets/{index-D-lCEtM3.js → index-5clu8qhD.js} +1 -1
  74. package/dist/assets/{index-CwQLM6w6.js → index-AQr2b_V7.js} +1 -1
  75. package/dist/assets/{index-BkRtS9xF.js → index-B7tB7lMU.js} +1 -1
  76. package/dist/assets/{index-EFWTbF8B.js → index-BE354x55.js} +1 -1
  77. package/dist/assets/{index-DgrHpp-o.js → index-BGKWLg7d.js} +1 -1
  78. package/dist/assets/{index-CvyKEas9.js → index-BSjBv3t4.js} +1 -1
  79. package/dist/assets/{index-QPSBfX_L.js → index-Bi94s6DF.js} +1 -1
  80. package/dist/assets/{index-COx5xHO6.js → index-BtplxQ7P.js} +1 -1
  81. package/dist/assets/{index-DfKSjTkz.js → index-Bx58QoYR.js} +1 -1
  82. package/dist/assets/{index-BqujSmiU.js → index-Bya-MYDK.js} +1 -1
  83. package/dist/assets/{index-CzaXdOyt.js → index-C0fIFyuA.js} +3 -3
  84. package/dist/assets/{index-t688rAZG.js → index-C3en75nR.js} +1 -1
  85. package/dist/assets/index-C7FK1qLV.js +1 -0
  86. package/dist/assets/{index-CghNgTHC.js → index-C8Gu9f5N.js} +1 -1
  87. package/dist/assets/{index-lxTcvHA2.js → index-CJF8E7TC.js} +1 -1
  88. package/dist/assets/{index-D3FM5z_m.js → index-CLwXTEVs.js} +3 -3
  89. package/dist/assets/{index-Snc2Ei8N.js → index-CNAqYYKs.js} +1 -1
  90. package/dist/assets/{index-sI82kOvs.js → index-CSHkmzNN.js} +30 -34
  91. package/dist/assets/{index-DxWj3O4A.js → index-CWU4hC_i.js} +3 -3
  92. package/dist/assets/{index-BTjnUzI6.js → index-CYG5tlBe.js} +1 -1
  93. package/dist/assets/{index-Bm01pS0y.js → index-CZlU7cPx.js} +1 -1
  94. package/dist/assets/{index-DqhaUjOT.js → index-CfCMnLvt.js} +1 -1
  95. package/dist/assets/{index-C7i09MwD.js → index-CffUOfeg.js} +1 -1
  96. package/dist/assets/{index-JEnbYjKN.js → index-CiR3wNRT.js} +1 -1
  97. package/dist/assets/{index-29D5d56z.js → index-Cihue4u0.js} +1 -1
  98. package/dist/assets/{index-Lkm8XAFp.js → index-CjAXuazv.js} +1 -1
  99. package/dist/assets/{index-C-lLLTqv.js → index-CnSanU-5.js} +2 -2
  100. package/dist/assets/{index-DLSU0S2q.js → index-CwvGvnvI.js} +1 -1
  101. package/dist/assets/{index-87RKuT5C.js → index-CyYCs6Na.js} +6 -6
  102. package/dist/assets/{index-C-Jgy1MF.js → index-D8iAEh5P.js} +1 -1
  103. package/dist/assets/{index-D9CYdevY.js → index-DBPZHeTe.js} +1 -1
  104. package/dist/assets/{index-BOuTBP5N.js → index-DH-JWbgS.js} +1 -1
  105. package/dist/assets/{index-BCxpBrwy.js → index-DKnP8AX5.js} +1 -1
  106. package/dist/assets/{index-BF-3wV6r.js → index-DOuT_eWr.js} +1 -1
  107. package/dist/assets/{index-CS7M20xU.js → index-Dgm3J-5y.js} +1 -1
  108. package/dist/assets/{index-B1mE4gVN.js → index-DvylVaG5.js} +1 -1
  109. package/dist/assets/{index-zltF8Ym1.js → index-FBWsHUHc.js} +1 -1
  110. package/dist/assets/{index-BNrJ3-FU.js → index-JpjTsddL.js} +1 -1
  111. package/dist/assets/{index-HS1vQPHE.js → index-ZHthb_a5.js} +1 -1
  112. package/dist/assets/{index-D26x5oE3.js → index-_wUNu-iB.js} +1 -1
  113. package/dist/assets/{index-qPcTPC8W.js → index-_ylGel7X.js} +1 -1
  114. package/dist/assets/{index-BP8O3XHI.js → index-hkRM3sJd.js} +1 -1
  115. package/dist/assets/{index-CCjtqj3s.js → index-qDXgq7vV.js} +9 -9
  116. package/dist/assets/{index-B0_tF8nw.js → index-sJeutPoU.js} +1 -1
  117. package/dist/assets/{index-BkZRidRp.js → index-tUPbUUvJ.js} +1 -1
  118. package/dist/assets/{index.esm-rxbUJdm1.js → index.esm-XgmtgzU6.js} +1 -1
  119. package/dist/assets/{install-from-url-Vgpqf_RA.js → install-from-url-CGtgqRyi.js} +1 -1
  120. package/dist/assets/{invitation-8UtMlo2J.js → invitation-C_eNuh8O.js} +1 -1
  121. package/dist/assets/{is-path-prefix-equal-5DtBeL0p.js → is-path-prefix-equal-BspuX_I9.js} +1 -1
  122. package/dist/assets/{item-Bo6y5Gud.js → item-wxO3KmF4.js} +1 -1
  123. package/dist/assets/{javascript-DYN9z7wM.js → javascript-CKDwawbm.js} +1 -1
  124. package/dist/assets/{jsonMode-D32rzzdQ.js → jsonMode-BP0R9CmR.js} +1 -1
  125. package/dist/assets/{liquid-BtOj54gG.js → liquid-4UI0Zois.js} +1 -1
  126. package/dist/assets/{list-header-DMsNH71I.js → list-header-C9_FZEk7.js} +1 -1
  127. package/dist/assets/{lock.svg-Cs99iZpo.js → lock.svg-tfWudiuy.js} +1 -1
  128. package/dist/assets/{log-BDpurb-t.js → log-CF_IJCaQ.js} +1 -1
  129. package/dist/assets/{lottie-react.esm-DHr-1U6T.js → lottie-react.esm-BvFBsF4l.js} +1 -1
  130. package/dist/assets/{mdx-BvhFWG4R.js → mdx-O8RIyVTG.js} +1 -1
  131. package/dist/assets/{memory-DdzEg3E6.js → memory-CoHOdYyC.js} +1 -1
  132. package/dist/assets/{metric-C2htX2Yk.js → metric-8WMIjcND.js} +1 -1
  133. package/dist/assets/omit-DbDS-rZP.js +1 -0
  134. package/dist/assets/{overview--R-CMMW-.js → overview-KMBUCZti.js} +1 -1
  135. package/dist/assets/{permission-SRhWeTXb.js → permission-3nsQS0Bo.js} +1 -1
  136. package/dist/assets/{preference-CKq_K8v4.js → preference-DvLBp1_G.js} +3 -3
  137. package/dist/assets/{python-DxaDOp9e.js → python-CCp746AY.js} +1 -1
  138. package/dist/assets/{raf-schd.esm-VXV4zFrR.js → raf-schd.esm-BNZAb83s.js} +1 -1
  139. package/dist/assets/{razor-BRzb-KS4.js → razor-YJwBLn7z.js} +1 -1
  140. package/dist/assets/{rotate-session-key-hCEg8oFb.js → rotate-session-key-D_IS-WkQ.js} +1 -1
  141. package/dist/assets/{runtime-D91pG25y.js → runtime-Dxp6bWyV.js} +1 -1
  142. package/dist/assets/schema-DAPWQjet.js +1 -0
  143. package/dist/assets/sdk-Dbin21P4.js +1 -0
  144. package/dist/assets/{service-dZBUbVK3.js → service-BwsotI3l.js} +1 -1
  145. package/dist/assets/{shorten-label-BF590ANn.js → shorten-label-DJxU7eGt.js} +1 -1
  146. package/dist/assets/{simple-select-BVmpIZiu.js → simple-select-DTAtG4Ai.js} +1 -1
  147. package/dist/assets/{spaces-BJDcrjBg.js → spaces-z72qxe5O.js} +1 -1
  148. package/dist/assets/{status-8XKvO1QE.js → status-3LMMJunc.js} +1 -1
  149. package/dist/assets/{status-DQ167_MQ.js → status-Cj3yOznG.js} +1 -1
  150. package/dist/assets/{switch-control-HQLhcuwU.js → switch-control-DBzGlbkg.js} +1 -1
  151. package/dist/assets/{table-icons-CTYxIeWB.js → table-icons-C-h4FDAF.js} +1 -1
  152. package/dist/assets/{team-CWb9WqYD.js → team-BgfMEJL2.js} +1 -1
  153. package/dist/assets/{toLower-TUYcnZbz.js → toLower-BHBBXNv2.js} +1 -1
  154. package/dist/assets/toUpper-C6xfv6tZ.js +1 -0
  155. package/dist/assets/{traffic-DGVWI219.js → traffic-D-uRzuea.js} +1 -1
  156. package/dist/assets/{tsMode-DHb6BLph.js → tsMode-CeRn61xO.js} +1 -1
  157. package/dist/assets/{typescript-BIlsbF26.js → typescript-DoL6n85S.js} +1 -1
  158. package/dist/assets/{url-evaluation-mq4H4jA_.js → url-evaluation-B3eRUARy.js} +1 -1
  159. package/dist/assets/{url-join-bG8RQ0FO.js → url-join-CfCMzD0L.js} +1 -1
  160. package/dist/assets/{use-mobile-BffT8C8k.js → use-mobile-CHK2BJEL.js} +1 -1
  161. package/dist/assets/{use-mobile-BmJGrK15.js → use-mobile-DW1xADqf.js} +1 -1
  162. package/dist/assets/{useAsync-C6Syz0fD.js → useAsync-DHJaMqFP.js} +1 -1
  163. package/dist/assets/{useAsyncRetry-BG_Bqdv2.js → useAsyncRetry-DE25r2jb.js} +1 -1
  164. package/dist/assets/{useLocalStorage-7RvuX-wT.js → useLocalStorage-BrmzkzdD.js} +1 -1
  165. package/dist/assets/{useThemeProps-DP_44cxZ.js → useThemeProps-Chclx8ny.js} +1 -1
  166. package/dist/assets/{util-BvF3wEH8.js → util-yYX5V34t.js} +1 -1
  167. package/dist/assets/{wait-container-DLuEZWXO.js → wait-container-DXBOHjPe.js} +1 -1
  168. package/dist/assets/{without-wallet-DZoff-em.js → without-wallet-BNsRjeI5.js} +1 -1
  169. package/dist/assets/wrap-locale-Crvlfq9n.js +1 -0
  170. package/dist/assets/{xml-DjQcmk1n.js → xml-ZZLcLPO2.js} +1 -1
  171. package/dist/assets/{yaml-Cdu8Piv-.js → yaml-3xc0kMOl.js} +1 -1
  172. package/dist/assets/{zh-Dr9buZnV.js → zh-CSl2KD_S.js} +1 -1
  173. package/dist/assets/{zh-tw-CeXBj2i0.js → zh-tw-BiloxWNq.js} +1 -1
  174. package/dist/index.html +1 -1
  175. package/dist/service-worker.js +25 -2
  176. package/package.json +1 -1
  177. package/dist/assets/ArrowDropDown-BA2tLXoO.js +0 -1
  178. package/dist/assets/api-D8LqcBu8.js +0 -1
  179. package/dist/assets/cloneDeep-CtZ8Xty4.js +0 -1
  180. package/dist/assets/emotion-cache.browser.esm-CZAf8Clc.js +0 -1
  181. package/dist/assets/engine-C1YpSsUo.js +0 -1
  182. package/dist/assets/getValidReactChildren-7B6f8iqP.js +0 -1
  183. package/dist/assets/index-CCTRr7te.js +0 -1
  184. package/dist/assets/omit-Csc9rFvJ.js +0 -1
  185. package/dist/assets/schema-Bksytr0e.js +0 -1
  186. package/dist/assets/sdk-DXEfKnNl.js +0 -1
  187. package/dist/assets/toUpper-C6wT1Gl8.js +0 -1
  188. package/dist/assets/wrap-locale-CwRGSp3B.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CzaXdOyt.js","./index-87RKuT5C.js","./index-DGkT7afN.css","./url-join-bG8RQ0FO.js","./index-C-Jgy1MF.js","./_createAggregator-CImEitD-.js","./depsEqual-B4BFmwuI.js","./index-BkZRidRp.js","./index-DRYJ0xIl.js","./toUpper-C6wT1Gl8.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
- import{c1 as Kf,c0 as Yf,r as I,c2 as Jf,eT as Xf,j as g,b9 as ct,c4 as st,c5 as Qf,hH as Zf,hI as ep,gF as tp,du as rp,hJ as np,dv as ip,bR as lc,bS as op,bP as ap,bQ as sp,bU as cc,dy as Wn,hK as lp,eD as cp,dG as up,hv as dp,gZ as fp,dF as pp,gW as uc,hL as hp,gJ as gp,fp as vp,eE as mp,hi as bp,V as Le,a3 as tt,y as Re,aP as Ft,c8 as Mt,i as yp,fa as xp,aH as ye,b as Ge,eO as Sp,hB as wp,dx as Dr,ez as br,di as dc,dC as Cp,hM as Ip,dB as fc,be as Hn,dO as or,hN as F,e_ as K,eH as Rp,hO as Xr,bf as Q,o as x,dM as Un,aQ as _o,hP as Po,cB as rr,aD as xe,K as oe,ag as Tp,aT as ae,ba as ko,dD as Xt,T as me,a4 as ze,b2 as qi,bB as wt,hQ as Dp,bo as pc,E as qn,hR as _p,hS as Pp,t as lt,fn as Dn,O as kp,bs as Xe,fd as hc,C as gc,bK as Op,hT as Oa,M as Oo,f9 as Ep,f6 as vc,H as Nt,P as mc,$ as bc,v as _n,hU as yc,f as Bt,dL as Np,bz as Mp,gN as xc,dJ as Nr,a7 as Ap,a8 as Lp,hV as Ea,hW as Sc,hX as zp,hY as jp,hZ as Vn,fe as Fp,gg as Bp,gh as Gp,gm as Kn,bE as je,h_ as $p,he as Wp,h$ as Hp,i0 as Up,gS as qp,i1 as Pn,i2 as wc,L as Cc,z as Yn,i3 as Na,i4 as Ic,i5 as Vi,i6 as Vp,i7 as Kp,s as dr,i8 as Yp,f5 as Jp,cA as Rc,i9 as Xp,bH as Qp,ia as Zp,dI as Ze,D as eh,X as th,cw as rh,ib as nh,b0 as ih,bh as Ma,R as kn,a9 as Aa,ic as oh,id as ah,ie as sh,ig as lh,ih as Tc,ii as ch,aB as Dc,f0 as _c,ij as Eo,ik as uh,hr as Pc,il as dh,b6 as fh,cF as Qt,im as ph,cU as hh,io as gh,d3 as vh,G as La,dq as di,eI as za,dN as mh,ip as bh,a5 as kc,Y as ja,iq as Fa,Q as yh,S as Ba}from"./index-87RKuT5C.js";import{r as xh}from"./omit-Csc9rFvJ.js";import{r as Sh}from"./cloneDeep-CtZ8Xty4.js";import{r as wh}from"./index-C-Jgy1MF.js";import{c as Ch,u as Ih}from"./_createAggregator-CImEitD-.js";import{u as Gt}from"./blocklet-C0-c8dVN.js";import{H as Rh,G as Th,M as Dh,N as _h,O as Ga,K as Ph,L as kh}from"./index-qPcTPC8W.js";import{_ as we,a as Ie,b as Ue,c as qe,d as Ve,e as Oh,f as Oc,u as de,g as ie,r as Gr,w as On,h as Ec,i as $t,j as Nc,k as Eh,l as Nh,o as Ki}from"./raf-schd.esm-VXV4zFrR.js";import{_ as A,b as $a,c as Mh,a as Ah,d as Lh}from"./redux-DfszZyTl.js";import{_ as zh}from"./typeof-QjJsDpFa.js";import{u as Mc,b as jh}from"./team-CWb9WqYD.js";import{b as Fh}from"./actions-kx-IWp3k.js";import{u as Bh,a as Gh,C as ft}from"./index.esm-rxbUJdm1.js";import{S as Yi}from"./simple-select-BVmpIZiu.js";import{b as $h,a as Wa}from"./html-title-Dp-sqsn-.js";import{C as Ac}from"./Clear-BFurvC8R.js";import{A as Wh}from"./ArrowDropDown-BA2tLXoO.js";import{a as Hh}from"./api-D8LqcBu8.js";import{A as Uh}from"./Autocomplete-DBXlHxck.js";import{L as qh}from"./ListItemButton-BsnowPaA.js";import{u as Lc}from"./use-mobile-BffT8C8k.js";import{u as Vh}from"./index-BqujSmiU.js";import{d as Kh}from"./KeyboardArrowDown-DeA6xh4S.js";import{S as Yh}from"./Search-x2lb6Akd.js";import{A as Jh}from"./Add-DY1gS9Dz.js";import{O as Xh}from"./OpenInNew-C5gvRiqd.js";import{t as Qh}from"./index-BF-3wV6r.js";import{I as Zh}from"./iframe-Ca3kRbO-.js";import{B as fi}from"./ButtonGroup-3fqwj5Ky.js";import{L as Ha}from"./LoadingButton-UXSaquyL.js";import"./depsEqual-B4BFmwuI.js";import"./url-evaluation-mq4H4jA_.js";import"./useLocalStorage-7RvuX-wT.js";import"./MoreVert-V2LiAaXF.js";import"./DeleteOutline-P1tPKlQL.js";import"./get-safe-url-DwUMajjg.js";import"./permission-SRhWeTXb.js";import"./ListSubheader-BcTZxGIx.js";import"./getValidReactChildren-7B6f8iqP.js";function eg(e){return Kf("MuiListItemAvatar",e)}Yf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const tg=e=>{const{alignItems:r,classes:n}=e;return Qf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},eg,n)},rg=ct("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Ua=I.forwardRef(function(r,n){const t=Jf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(Xf),s={...t,alignItems:a.alignItems},l=tg(s);return g.jsx(rg,{className:st(l.root,i),ownerState:s,ref:n,...o})});var ng=Zf(function(){return ep?sessionStorage:void 0});function ig(e,r){return tp(r,function(n){return e[n]})}function og(e){return e==null?[]:ig(e,rp(e))}var ag=np.isFinite;function qa(e){return typeof e=="number"&&ag(e)}function sg(e){return typeof e=="number"&&e==ip(e)}var lg=Ch(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const cg=Object.freeze(Object.defineProperty({__proto__:null,default:lg},Symbol.toStringTag,{value:"Module"}));var ug=lc(function(e){var r=op(e);return r=typeof r=="function"?r:void 0,ap(sp(e,1,cc,!0),void 0,r)});const dg=Object.freeze(Object.defineProperty({__proto__:null,default:ug},Symbol.toStringTag,{value:"Module"}));var zc=lc(function(e,r){return cc(e)?Fh(e,r):[]}),yr={};const fg=Wn(dg),pg=Wn(lp),hg=Wn(cg);var Va;function gg(){return Va||(Va=1,function(e){var r=yr&&yr.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ue,e.deepWalk=_,e.isMatchSection=S,e.nestNavigationList=X,e.filterNavigation=Z,e.cleanOrphanNavigation=q,e.joinLink=M,e.flattenNavigation=H,e.splitNavigationBySection=ee;const n=cp(),t=up(),i=r(fg),o=r(dp),a=r(fp),s=r(pg),l=r(pp),c=r(xh),u=r(Sh),f=bp(),d=r(wh()),p=r(uc()),h=r(hp),v=r(gp),m=r(hg),y=vp(),b=mp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return b.checkLink}});const C="header",D="/",P="/",w="/";function _($,W=()=>{},{key:k="children",order:N="first"}={}){function j(V,{index:te=0,parent:se=null,level:fe=0}={}){Array.isArray(V)?V.forEach((ve,Ce)=>{j(ve,{index:Ce,parent:se,level:fe+1})}):V&&(N==="first"&&W(V,se,{index:te,level:fe}),j(V[k],{parent:V,level:fe}),N==="last"&&W(V,se,{index:te,level:fe}))}j($)}function S($,W){return W===C&&(0,s.default)($)?!0:Array.isArray($)?$.includes(W):$===W}function R($){try{return JSON.parse($)}catch{return $}}function T($){return $.map(W=>{const k={...W};return k.role&&(k.role=R(k.role)),k.section&&(k.section=R(k.section)),k.title&&(k.title=R(k.title)),k.description&&(k.description=R(k.description)),k.link&&(k.link=R(k.link)),k})}function O($="/",W=""){if((0,p.default)(W||""))return W;const k=d.default.join($,W||P);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function L($,W,{strict:k=!0}={}){let N=$,j=W;return k||(N=N||"/",j=j||"/"),(0,h.default)(N)&&(0,v.default)(j)&&(0,b.checkLink)(j)?Object.keys(N).reduce((V,te)=>(V[te]=O(N[te],j),V),{}):(0,v.default)(N)&&(0,b.checkLink)(N)&&(0,h.default)(j)?Object.keys(j).reduce((V,te)=>(V[te]=O(N,j[te]),V),{}):(0,v.default)(N)&&(0,v.default)(j)?(0,b.checkLink)(N)||(0,b.checkLink)(j)?O(N,j):j:(0,h.default)(N)&&(0,h.default)(j)?[...new Set([...Object.keys(N),...Object.keys(j)])].reduce((te,se)=>(te[se]=O(N[se],j[se]),te),{}):j}function M($,W){const k=(0,u.default)($);return _(k,(N,j)=>{const V=N.component||N.child;if(V){const te=W.find(se=>se.name===V);te&&(N.link=L(te.link,N.link,{strict:!1}))}else j&&(N.link=L(j.link,N.link))},{key:"items"}),k}function H($=[],{depth:W=1,transform:k=N=>N}={}){const N=(0,u.default)($),j=[];return _(N,(V,te,{level:se})=>{if(se>=W){const{items:fe=[]}=V;if(fe&&Array.isArray(fe)&&fe.length>0){delete V.items;const ve=fe.map(Ce=>k(Ce,V));if(te)te.items.push(...ve);else{const Ce=k((0,c.default)(V,["items"]),te);j.push(Ce,...ve)}}else if(se===1){const ve=k((0,c.default)(V,["items"]),te);j.push(ve)}}else se===1&&j.push(V)},{key:"items",order:"last"}),j}function E($){if($.section!=="bottomNavigation")return $;const W={...$};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const N=W[k];typeof N=="string"&&(W[k]={en:N})}),W}function B($={}){const W=[];function k(j,V={}){const te=[],{children:se=[],meta:fe={}}=j,ve=(0,u.default)(fe?.navigation||[]);(0,y.hasStartEngine)(fe)&&j.meta?.capabilities?.navigation!==!1&&te.push(...ve);const Ce=V.name||"",Se=V.mountPoint||D,_e=j===$?"":fe.name||"",Fe=j===$?"":j.mountPoint||D;for(const Pe of se){if(!(0,y.hasStartEngine)(Pe.meta))continue;const pe=Pe.meta.name,be=Pe.mountPoint,ut=[Ce,_e,pe].filter(Boolean).join("."),mr=Pe.meta.navigation||[],ui=(0,f.joinURL)(Se,Fe,be);Pe.meta?.capabilities?.navigation!==!1&&W.push({did:Pe.meta.did,name:ut,link:ui,title:Pe.meta.title||"",navigation:mr.map(Ke=>({section:C,...Ke}))});const dt=ve.find(Ke=>Ke.component?Ke.component===pe:!1);if(dt){if(!dt.link)if(Pe.meta.navigation&&Pe.meta.navigation.length>0){const Ke=k(Pe,{mountPoint:Fe,name:_e});Ke.length>0&&(dt.items=dt.items??[],dt.items.push(...Ke))}else dt.link=P}else if(Pe.meta?.capabilities?.navigation!==!1){const Ke=k(Pe,{mountPoint:Fe,name:_e}),ln={title:Pe.meta.title,component:pe,id:Pe.meta.did};Ke.length>0?(ln.items=Ke,ln.link=void 0):ln.link=P,te.push(ln)}}return te}return{navigationList:k($),components:W}}function G($){const W=(0,u.default)($).filter(k=>k.id);return _(W,(k,N)=>{if(k.items&&k.items.length){for(let j=k.items.length-1;j>=0;j--)k.items[j].id||k.items.splice(j,1);k.items.length===0&&k.component&&(k.link=k.link||P)}N&&(k.parent=N.id,k.id=[N.id,k.id].join(w)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),W}function U($,W=2){const k=(0,u.default)($),N=H(k,{depth:W,transform:(j,V)=>(V&&(j._parent||(j._parent=V.id,V.component||(j.link=L(V.link,j.link))),j.section=j.section||V.section||[C],j.visible=j.visible??V.visible,V.role&&(j.role=j.role||V.role)),j.component=[V.component,j.component].filter(Boolean).join("."),j)});return _(N,j=>{j.items&&j.items.length>0&&j.items.reduceRight((V,te)=>{if(te._parent){const se=j.items.findIndex(fe=>fe.id===te._parent);se>=0&&j.items.splice(se,1),delete te._parent}return null},null)},{key:"items"}),N}function J($,W){return W&&Array.isArray($.items)?$.items.filter(k=>(0,s.default)(k.section)?S($.section,W):!!S(k.section,W)).map(k=>({...k,section:W})):[]}function ee($){const W=(0,u.default)($),k=[];for(const N of W){let te=function(se,fe){const ve=J(se,fe);V.push({...j,section:fe,items:ve})};const j=(0,u.default)((0,c.default)(N,["items"])),V=[];if(Array.isArray(N.section))for(const se of N.section)te(N,se);else if(N.section){const{section:se}=N;te(N,se)}else if(N.items&&N.items.length>0){const se=N.items.reduce((ve,Ce)=>{const{section:Se=[C]}=Ce||{};return ve.push(...Se),ve},[]),fe=[...new Set(se)];for(const ve of fe)te(N,ve)}else V.push({...N,section:C});k.push(...V)}return k}function X($=[]){const W=(0,u.default)($);return W.reduceRight((k,N,j)=>{if(N.parent){const V=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);V&&(V.items||(V.items=[]),V.items=[N,...V.items]),W.splice(j,1)}return null},null),W}function Z($,W=[]){const k=X($);return _(k,j=>{if(j?.component&&(W.some(V=>V.name===j.component)||(j.visible=!1)),j.items&&j.items.length)for(let V=j.items.length-1;V>=0;V--)j.items[V].visible===!1&&j.items.splice(V,1)},{key:"items"}),k.filter(j=>!(j.visible===!1||j.items&&Array.isArray(j.items)&&j.items.length>0&&j.items?.every(V=>V.visible===!1)))}function q($){return $.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const re=$=>{const[W,k]=(0,m.default)($,V=>V.id===t.NAV_GROUP_SYSTEM),[N,j]=(0,m.default)(k,V=>V.id===t.NAV_GROUP_SERVICES);return[...W,...N,...j]};e.sortRootNavigation=re;const ne=$=>{const[,W]=(0,m.default)($,k=>{const N=typeof k.title=="string"?k.title:k.title?.en;return k.id===t.NAV_GROUP_TEAM||k.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=ne;function ue($={},W={}){const{beforeProcess:k=pe=>pe}=W,{navigationList:N,components:j}=B($),V=new Map;N.forEach(pe=>{pe.items?.forEach(be=>{V.set((0,f.joinURL)(pe.id,be.id),be)})});const te=(0,l.default)($,"settings.org.enabled",!1),se=[t.NAV_GROUP_TEAM,t.NAV_GROUP_SYSTEM,t.NAV_GROUP_SERVICES];$?.settings?.navigations&&(Array.isArray($.settings.navigations)?$.settings.navigations=[...$.settings.navigations].filter(pe=>!(pe.from==="team-tmpl"&&se.includes(pe?.parent))).map(pe=>{if(pe.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(pe,"private")){const be=V.get(pe.id);be&&Object.prototype.hasOwnProperty.call(be,"private")&&(pe.private=be.private)}return!te&&pe.section==="userCenter"&&pe.id==="/userCenter/orgs"?null:pe}).filter(Boolean):$.settings.navigations=[]);const fe=T(ne($?.settings?.navigations||[])).map(E),ve=U(k(N)),Ce=G(ve),_e=ee(Ce).reduce((pe,be)=>["bottom","social","sessionManager","userCenter"].includes(be.section)&&be.items&&be.items.length>0?(pe.push(...be.items.map(mr=>{const{section:ui}=be,dt=L(be.link,mr.link),Ke=[be.component,mr.component].filter(Boolean).join(".");return{...mr,section:ui,link:dt,component:Ke,parent:""}})),pe):(pe.push(be),pe),[]),Fe=H(_e,{transform(pe,be){let{component:ut}=pe;return be?.component&&(ut=[be.component,pe.component].filter(Boolean).join(".")),E({...pe,component:ut})}});return{navigationList:(0,i.default)(fe,Fe,(pe,be)=>{const ut=["id","section"];return(0,o.default)((0,a.default)(pe,ut),(0,a.default)(be,ut))}),components:j,builtinList:Fe}}}(yr)),yr}var Ne=gg();const jc=I.createContext(null),Ka="/",vg="header",Ya={userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled},{id:"/userCenter/nfts",title:{en:"NFTs",zh:"NFTs"},icon:"ant-design:gold-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/nfts"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/settings",title:{en:"Settings",zh:"设置"},icon:"ant-design:setting-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/did-spaces",title:{en:"DID Spaces",zh:"DID Spaces"},icon:"ant-design:cloud-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Follow",zh:"关注"},icon:"ant-design:user-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function pi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const it=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Ja=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),mg=(e,r)=>{const n=Ne.cleanOldNavigationHistory(r),t=n.findIndex(a=>a.id===Ge.NAV_GROUP_TEAM);return t>=0&&n.splice(t,1),n.findIndex(a=>a.id===Ge.NAV_GROUP_SERVICES)===-1&&n.unshift(Ja(Ge.NAV_GROUP_SERVICES,e("navigation.services"),[it("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),it("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),it("notification",e("navigation.notification"),"ant-design:bell-outlined","/admin/notification"),it("aigne",e("navigation.aigne"),"hugeicons:artificial-intelligence-04","/admin/aigne"),it("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),it("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n.findIndex(a=>a.id===Ge.NAV_GROUP_SYSTEM)===-1&&n.unshift(Ja(Ge.NAV_GROUP_SYSTEM,e("navigation.system"),[it("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),it("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),it("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations")])),n};function Xa({name:e}){return g.jsx(Sp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function bg({children:e}){const{blocklet:r,actions:n}=Gt(),{t}=Le(),{navigationList:i,components:o,builtinList:a}=Ne.parseNavigation(r,{beforeProcess(w){const _=tt(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Ya,S)&&Ya[S].forEach(R=>{(R.shouldDisplay&&typeof R.shouldDisplay=="function"?R.shouldDisplay:()=>!0)(r)&&!_.some(O=>O.id===R.id)&&_.push(R)})}),mg(t,_)}}),s=Ft({rawNavigation:tt(i),activeSection:vg,components:o}),l=I.useMemo(()=>Ne.sortRootNavigation(Ne.nestNavigationList(tt(s.rawNavigation))),[s.rawNavigation]),c=I.useMemo(()=>{const w=Ne.filterNavigation(tt(s.rawNavigation),o);return Ne.joinLink(w,o)},[o,s.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const _=Ne.flattenNavigation(Ne.joinLink(l,o)),S=_.find(R=>R.id===w.id);if(S?.component){if(!o.some(R=>R.name===S.component))return g.jsx(Xa,{name:S.component})}else if(S.parent){const R=_.find(T=>T.id===S.parent);if(R?.component&&!o.some(T=>T.name===R.component))return g.jsx(Xa,{name:R.component})}return S?.link},[l,o]),f=I.useCallback(w=>{s.activeSection=w},[s]),d=I.useCallback(w=>{const _=[];Ne.deepWalk(w,(R,T)=>{const O={...Mt(R,["children","expand"]),parent:T?.id};_.push(O)});const S=tt(s.rawNavigation).filter(R=>{if(!s.activeSection)return!1;const T=_.find(O=>pi(O,R));return T?!Ne.isMatchSection(T.section,s.activeSection):!0});s.rawNavigation=[...S,..._]},[s]),p=I.useCallback((w=[])=>{const _=tt(s.rawNavigation).map(S=>{const R=w.find(T=>pi({...T,section:s.activeSection},S));return R?{...S,...R}:S});s.rawNavigation=_},[s]),h=I.useCallback((w,_=Ka)=>w.map(R=>{const O=o.find(H=>H.name===R.component)?.link||_,L=R.items||[],{link:M}=R;return{title:R.title,description:R.description,subtitle:u(R),link:M,icon:R.icon,children:h(L,M||Ka),section:R.section,visible:R.visible,parent:R.parent,component:R.component,id:R.id,role:R.role,from:R.from,__base:O}}),[o,u]),v=I.useCallback(w=>{p([w])},[p]),m=I.useCallback(w=>{const _=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=tt(s.rawNavigation).filter(S=>!_.includes(S.id))},[s]),y=I.useCallback((w={},_=-1)=>{const S={...w,id:yp.nanoid(),section:s.activeSection,visible:!0},R=[...s.rawNavigation],T=R.filter(O=>O.section===s.activeSection);if(_<0||_>T.length-1)R.push(S);else{const O=T[_],L=R.findIndex(M=>pi(M,O));R.splice(L,0,S)}return s.rawNavigation=R,S},[s]),b=I.useCallback(w=>{const S=tt(l).filter(R=>Ne.isMatchSection(R.section,w));return h(S)},[l,h]),C=I.useCallback(async w=>{const S=w.map(R=>xp(R,wp)).map(R=>{const T={...R};return T.role&&Array.isArray(T.role)&&(T.role=JSON.stringify(T.role)),T.section&&Array.isArray(T.section)&&(T.section=JSON.stringify(T.section)),T.title&&T.title instanceof Object&&(T.title=JSON.stringify(T.title)),T.description&&T.description instanceof Object&&(T.description=JSON.stringify(T.description)),T.link&&T.link instanceof Object&&(T.link=JSON.stringify(T.link)),T});await n.configNavigations(S)},[n]),D=I.useCallback(async w=>{if(w){const _=a.filter(R=>Ne.isMatchSection(R.section,w)),S=s.rawNavigation.filter(R=>!Ne.isMatchSection(R.section,w));await C(S),s.rawNavigation=[...S,..._]}else await C([]),s.rawNavigation=tt(a)},[C,s,a]),P=I.useMemo(()=>({state:s,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:C,resetNavigation:D}),[s,c,o,u,f,v,m,y,d,b,C,D]);return g.jsx(jc.Provider,{value:P,children:e})}function Fc(){const e=I.useContext(jc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Qe={},hi,Qa;function yg(){if(Qa)return hi;Qa=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,s=parseInt,l=typeof Dr=="object"&&Dr&&Dr.Object===Object&&Dr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,_,S){var R,T,O,L,M,H,E=0,B=!1,G=!1,U=!0;if(typeof w!="function")throw new TypeError(e);_=P(_)||0,b(S)&&(B=!!S.leading,G="maxWait"in S,O=G?p(P(S.maxWait)||0,_):O,U="trailing"in S?!!S.trailing:U);function J(W){var k=R,N=T;return R=T=void 0,E=W,L=w.apply(N,k),L}function ee(W){return E=W,M=setTimeout(q,_),B?J(W):L}function X(W){var k=W-H,N=W-E,j=_-k;return G?h(j,O-N):j}function Z(W){var k=W-H,N=W-E;return H===void 0||k>=_||k<0||G&&N>=O}function q(){var W=v();if(Z(W))return re(W);M=setTimeout(q,X(W))}function re(W){return M=void 0,U&&R?J(W):(R=T=void 0,L)}function ne(){M!==void 0&&clearTimeout(M),E=0,R=H=T=M=void 0}function ue(){return M===void 0?L:re(v())}function $(){var W=v(),k=Z(W);if(R=arguments,T=this,H=W,k){if(M===void 0)return ee(H);if(G)return M=setTimeout(q,_),J(H)}return M===void 0&&(M=setTimeout(q,_)),L}return $.cancel=ne,$.flush=ue,$}function y(w,_,S){var R=!0,T=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(R="leading"in S?!!S.leading:R,T="trailing"in S?!!S.trailing:T),m(w,_,{leading:R,maxWait:_,trailing:T})}function b(w){var _=typeof w;return!!w&&(_=="object"||_=="function")}function C(w){return!!w&&typeof w=="object"}function D(w){return typeof w=="symbol"||C(w)&&d.call(w)==n}function P(w){if(typeof w=="number")return w;if(D(w))return r;if(b(w)){var _=typeof w.valueOf=="function"?w.valueOf():w;w=b(_)?_+"":_}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?s(w.slice(2),S?2:8):i.test(w)?r:+w}return hi=y,hi}var xr={exports:{}},Pt={exports:{}},xg=Pt.exports,Za;function Sg(){return Za||(Za=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Pt.exports=function(){return performance.now()}:typeof br<"u"&&br!==null&&br.hrtime?(Pt.exports=function(){return(e()-i)/1e6},r=br.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=br.uptime()*1e9,i=t-o):Date.now?(Pt.exports=function(){return Date.now()-n},n=Date.now()):(Pt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(xg)),Pt.exports}var es;function wg(){if(es)return xr.exports;es=1;for(var e=Sg(),r=typeof window>"u"?Dr: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 s=0,l=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),p=Math.max(0,u-(d-s));s=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++l,callback:f,cancelled:!1}),l},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return xr.exports=function(f){return i.call(r,f)},xr.exports.cancel=function(){o.apply(r,arguments)},xr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},xr.exports}var cn={},ts;function Cg(){if(ts)return cn;ts=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return cn}var Ht={},rs;function Ig(){if(rs)return Ht;rs=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.noop=e,Ht.intBetween=r,Ht.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 Ht}var ns;function Rg(){if(ns)return Qe;ns=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.createHorizontalStrength=R,Qe.createVerticalStrength=T,Qe.createScrollingComponent=M,Qe.default=H,Qe.defaultVerticalStrength=Qe.defaultHorizontalStrength=void 0;var e=u(dc()),r=c(fc()),n=Cp(),t=c(yg()),i=c(wg()),o=c(Cg()),a=Rh,s=c(Ip()),l=Ig();function c(E){return E&&E.__esModule?E:{default:E}}function u(E){if(E&&E.__esModule)return E;var B={};if(E!=null){for(var G in E)if(Object.prototype.hasOwnProperty.call(E,G)){var U=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,G):{};U.get||U.set?Object.defineProperty(B,G,U):B[G]=E[G]}}return B.default=E,B}function f(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(G){return typeof G}:f=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},f(E)}function d(){return d=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var G=arguments[B];for(var U in G)Object.prototype.hasOwnProperty.call(G,U)&&(E[U]=G[U])}return E},d.apply(this,arguments)}function p(E,B){if(E==null)return{};var G=h(E,B),U,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)U=ee[J],!(B.indexOf(U)>=0)&&Object.prototype.propertyIsEnumerable.call(E,U)&&(G[U]=E[U])}return G}function h(E,B){if(E==null)return{};var G={},U=Object.keys(E),J,ee;for(ee=0;ee<U.length;ee++)J=U[ee],!(B.indexOf(J)>=0)&&(G[J]=E[J]);return G}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var G=0;G<B.length;G++){var U=B[G];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(E,U.key,U)}}function y(E,B,G){return B&&m(E.prototype,B),E}function b(E,B){return B&&(f(B)==="object"||typeof B=="function")?B:w(E)}function C(E){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},C(E)}function D(E,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(B&&B.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),B&&P(E,B)}function P(E,B){return P=Object.setPrototypeOf||function(U,J){return U.__proto__=J,U},P(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function _(E,B,G){return B in E?Object.defineProperty(E,B,{value:G,enumerable:!0,configurable:!0,writable:!0}):E[B]=G,E}var S=150;function R(E){return function(G,U){var J=G.x,ee=G.w,X=G.y,Z=G.h,q=Math.min(ee/2,E),re=U.x>=J&&U.x<=J+ee,ne=re&&U.y>=X&&U.y<=X+Z;if(ne){if(U.x<J+q)return(U.x-J-q)/q;if(U.x>J+ee-q)return-(J+ee-U.x-q)/q}return 0}}function T(E){return function(G,U){var J=G.y,ee=G.h,X=G.x,Z=G.w,q=Math.min(ee/2,E),re=U.y>=J&&U.y<=J+ee,ne=re&&U.x>=X&&U.x<=X+Z;if(ne){if(U.y<J+q)return(U.y-J-q)/q;if(U.y>J+ee-q)return-(J+ee-U.y-q)/q}return 0}}var O=R(S);Qe.defaultHorizontalStrength=O;var L=T(S);Qe.defaultVerticalStrength=L;function M(E){var B=function(G){D(U,G);function U(J,ee){var X;return v(this,U),X=b(this,C(U).call(this,J,ee)),_(w(w(X)),"updateScrolling",(0,t.default)(function(Z){var q=X.container.getBoundingClientRect(),re=q.left,ne=q.top,ue=q.width,$=q.height,W={x:re,y:ne,w:ue,h:$},k=(0,l.getCoords)(Z),N=X.props,j=N.horizontalStrength,V=N.verticalStrength;X.scaleX=j(W,k),X.scaleY=V(W,k),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),_(w(w(X)),"handleEvent",function(Z){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(Z))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(U,[{key:"componentDidMount",value:function(){var ee=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 ee.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 ee=this.props.dragDropManager,X=ee.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 ee=this,X=0,Z=function q(){var re=ee.scaleX,ne=ee.scaleY,ue=ee.container,$=ee.props,W=$.strengthMultiplier,k=$.onScrollChange;if(W===0||re+ne===0){ee.stopScrolling();return}if(X+=1,X%2){var N=ue.scrollLeft,j=ue.scrollTop,V=ue.scrollWidth,te=ue.scrollHeight,se=ue.clientWidth,fe=ue.clientHeight,ve=re?ue.scrollLeft=(0,l.intBetween)(0,V-se,N+re*W):N,Ce=ne?ue.scrollTop=(0,l.intBetween)(0,te-fe,j+ne*W):j;k(ve,Ce)}ee.frame=(0,i.default)(q)};Z()}},{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 ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var X=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,d({ref:this.wrappedInstance},X))}}]),U}(e.Component);return _(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),_(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),_(B,"defaultProps",{onScrollChange:l.noop,verticalStrength:L,horizontalStrength:O,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(U){var J=U.dragDropManager;return J===void 0?null:e.default.createElement(B,d({},G,{dragDropManager:J}))})}}return Qe}var xn=Rg();const Tg=Hn(xn);var Dg=Th();const is=Hn(Dg);function Bc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Gc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function $c(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}}Bc.__suppressDeprecationWarning=!0;Gc.__suppressDeprecationWarning=!0;$c.__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-C0fIFyuA.js","./index-CyYCs6Na.js","./index-DGkT7afN.css","./url-join-CfCMzD0L.js","./index-D8iAEh5P.js","./_createAggregator-Dw9ehKUs.js","./depsEqual-CDIkAeqx.js","./index-tUPbUUvJ.js","./index-DRYJ0xIl.js","./toUpper-C6xfv6tZ.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
+ import{c1 as Kf,c0 as Yf,r as I,c2 as Jf,eT as Xf,j as g,b9 as ct,c4 as st,c5 as Qf,hH as Zf,hI as ep,gF as tp,du as rp,hJ as np,dv as ip,bR as lc,bS as op,bP as ap,bQ as sp,bU as cc,dy as Wn,hK as lp,eD as cp,dG as up,hv as dp,gZ as fp,dF as pp,gW as uc,hL as hp,gJ as gp,fp as vp,eE as mp,hi as bp,V as Le,a3 as tt,y as Re,aP as Ft,c8 as Mt,i as yp,fa as xp,aH as ye,b as Ge,eO as Sp,hB as wp,dx as Dr,ez as br,di as dc,dC as Cp,hM as Ip,dB as fc,be as Hn,dO as or,hN as F,e_ as K,eH as Rp,hO as Xr,bf as Q,o as x,dM as Un,aQ as _o,hP as Po,cB as rr,aD as xe,K as oe,ag as Tp,aT as ae,ba as ko,dD as Xt,T as me,a4 as ze,b2 as qi,bB as wt,hQ as Dp,bo as pc,E as qn,hR as _p,hS as Pp,t as lt,fn as Dn,O as kp,bs as Xe,fd as hc,C as gc,bK as Op,hT as Oa,M as Oo,f9 as Ep,f6 as vc,H as Nt,P as mc,$ as bc,v as _n,hU as yc,f as Bt,dL as Np,bz as Mp,gN as xc,dJ as Nr,a7 as Ap,a8 as Lp,hV as Ea,hW as Sc,hX as zp,hY as jp,hZ as Vn,fe as Fp,gg as Bp,gh as Gp,gm as Kn,bE as je,h_ as $p,he as Wp,h$ as Hp,i0 as Up,gS as qp,i1 as Pn,i2 as wc,L as Cc,z as Yn,i3 as Na,i4 as Ic,i5 as Vi,i6 as Vp,i7 as Kp,s as dr,i8 as Yp,f5 as Jp,cA as Rc,i9 as Xp,bH as Qp,ia as Zp,dI as Ze,D as eh,X as th,cw as rh,ib as nh,b0 as ih,bh as Ma,R as kn,a9 as Aa,ic as oh,id as ah,ie as sh,ig as lh,ih as Tc,ii as ch,aB as Dc,f0 as _c,ij as Eo,ik as uh,hr as Pc,il as dh,b6 as fh,cF as Qt,im as ph,cU as hh,io as gh,d3 as vh,G as La,dq as di,eI as za,dN as mh,ip as bh,a5 as kc,Y as ja,iq as Fa,Q as yh,S as Ba}from"./index-CyYCs6Na.js";import{r as xh}from"./omit-DbDS-rZP.js";import{r as Sh}from"./cloneDeep-CF0rc6VO.js";import{r as wh}from"./index-D8iAEh5P.js";import{c as Ch,u as Ih}from"./_createAggregator-Dw9ehKUs.js";import{u as Gt}from"./blocklet-c-fcHcMv.js";import{H as Rh,G as Th,M as Dh,N as _h,O as Ga,K as Ph,L as kh}from"./index-_ylGel7X.js";import{_ as we,a as Ie,b as Ue,c as qe,d as Ve,e as Oh,f as Oc,u as de,g as ie,r as Gr,w as On,h as Ec,i as $t,j as Nc,k as Eh,l as Nh,o as Ki}from"./raf-schd.esm-BNZAb83s.js";import{_ as A,b as $a,c as Mh,a as Ah,d as Lh}from"./redux-DfszZyTl.js";import{_ as zh}from"./typeof-QjJsDpFa.js";import{u as Mc,b as jh}from"./team-BgfMEJL2.js";import{b as Fh}from"./actions-D6D1nZGR.js";import{u as Bh,a as Gh,C as ft}from"./index.esm-XgmtgzU6.js";import{S as Yi}from"./simple-select-DTAtG4Ai.js";import{b as $h,a as Wa}from"./html-title-ZIT73gw4.js";import{C as Ac}from"./Clear-lc-87cdU.js";import{A as Wh}from"./ArrowDropDown-BRCFiDo5.js";import{a as Hh}from"./api-CzO1JAlF.js";import{A as Uh}from"./Autocomplete-DTfKu22k.js";import{L as qh}from"./ListItemButton-BUXqqfVc.js";import{u as Lc}from"./use-mobile-CHK2BJEL.js";import{u as Vh}from"./index-Bya-MYDK.js";import{d as Kh}from"./KeyboardArrowDown-6ORbckfg.js";import{S as Yh}from"./Search-edKoOPH1.js";import{A as Jh}from"./Add-CwfzHL2f.js";import{O as Xh}from"./OpenInNew-O9EysXQn.js";import{t as Qh}from"./index-DOuT_eWr.js";import{I as Zh}from"./iframe-BeX_RqP4.js";import{B as fi}from"./ButtonGroup-CE8Yme-Z.js";import{L as Ha}from"./LoadingButton-DuEza0fz.js";import"./depsEqual-CDIkAeqx.js";import"./url-evaluation-B3eRUARy.js";import"./useLocalStorage-BrmzkzdD.js";import"./MoreVert-DXy5wrMx.js";import"./DeleteOutline-CCoXF09b.js";import"./get-safe-url-DMzSWw8A.js";import"./permission-3nsQS0Bo.js";import"./ListSubheader-DzDc9oA3.js";import"./getValidReactChildren-C2YiZOfP.js";function eg(e){return Kf("MuiListItemAvatar",e)}Yf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const tg=e=>{const{alignItems:r,classes:n}=e;return Qf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},eg,n)},rg=ct("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Ua=I.forwardRef(function(r,n){const t=Jf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(Xf),s={...t,alignItems:a.alignItems},l=tg(s);return g.jsx(rg,{className:st(l.root,i),ownerState:s,ref:n,...o})});var ng=Zf(function(){return ep?sessionStorage:void 0});function ig(e,r){return tp(r,function(n){return e[n]})}function og(e){return e==null?[]:ig(e,rp(e))}var ag=np.isFinite;function qa(e){return typeof e=="number"&&ag(e)}function sg(e){return typeof e=="number"&&e==ip(e)}var lg=Ch(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const cg=Object.freeze(Object.defineProperty({__proto__:null,default:lg},Symbol.toStringTag,{value:"Module"}));var ug=lc(function(e){var r=op(e);return r=typeof r=="function"?r:void 0,ap(sp(e,1,cc,!0),void 0,r)});const dg=Object.freeze(Object.defineProperty({__proto__:null,default:ug},Symbol.toStringTag,{value:"Module"}));var zc=lc(function(e,r){return cc(e)?Fh(e,r):[]}),yr={};const fg=Wn(dg),pg=Wn(lp),hg=Wn(cg);var Va;function gg(){return Va||(Va=1,function(e){var r=yr&&yr.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ue,e.deepWalk=_,e.isMatchSection=S,e.nestNavigationList=X,e.filterNavigation=Z,e.cleanOrphanNavigation=q,e.joinLink=M,e.flattenNavigation=H,e.splitNavigationBySection=ee;const n=cp(),t=up(),i=r(fg),o=r(dp),a=r(fp),s=r(pg),l=r(pp),c=r(xh),u=r(Sh),f=bp(),d=r(wh()),p=r(uc()),h=r(hp),v=r(gp),m=r(hg),y=vp(),b=mp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return b.checkLink}});const C="header",D="/",P="/",w="/";function _($,W=()=>{},{key:k="children",order:N="first"}={}){function j(V,{index:te=0,parent:se=null,level:fe=0}={}){Array.isArray(V)?V.forEach((ve,Ce)=>{j(ve,{index:Ce,parent:se,level:fe+1})}):V&&(N==="first"&&W(V,se,{index:te,level:fe}),j(V[k],{parent:V,level:fe}),N==="last"&&W(V,se,{index:te,level:fe}))}j($)}function S($,W){return W===C&&(0,s.default)($)?!0:Array.isArray($)?$.includes(W):$===W}function R($){try{return JSON.parse($)}catch{return $}}function T($){return $.map(W=>{const k={...W};return k.role&&(k.role=R(k.role)),k.section&&(k.section=R(k.section)),k.title&&(k.title=R(k.title)),k.description&&(k.description=R(k.description)),k.link&&(k.link=R(k.link)),k})}function O($="/",W=""){if((0,p.default)(W||""))return W;const k=d.default.join($,W||P);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function L($,W,{strict:k=!0}={}){let N=$,j=W;return k||(N=N||"/",j=j||"/"),(0,h.default)(N)&&(0,v.default)(j)&&(0,b.checkLink)(j)?Object.keys(N).reduce((V,te)=>(V[te]=O(N[te],j),V),{}):(0,v.default)(N)&&(0,b.checkLink)(N)&&(0,h.default)(j)?Object.keys(j).reduce((V,te)=>(V[te]=O(N,j[te]),V),{}):(0,v.default)(N)&&(0,v.default)(j)?(0,b.checkLink)(N)||(0,b.checkLink)(j)?O(N,j):j:(0,h.default)(N)&&(0,h.default)(j)?[...new Set([...Object.keys(N),...Object.keys(j)])].reduce((te,se)=>(te[se]=O(N[se],j[se]),te),{}):j}function M($,W){const k=(0,u.default)($);return _(k,(N,j)=>{const V=N.component||N.child;if(V){const te=W.find(se=>se.name===V);te&&(N.link=L(te.link,N.link,{strict:!1}))}else j&&(N.link=L(j.link,N.link))},{key:"items"}),k}function H($=[],{depth:W=1,transform:k=N=>N}={}){const N=(0,u.default)($),j=[];return _(N,(V,te,{level:se})=>{if(se>=W){const{items:fe=[]}=V;if(fe&&Array.isArray(fe)&&fe.length>0){delete V.items;const ve=fe.map(Ce=>k(Ce,V));if(te)te.items.push(...ve);else{const Ce=k((0,c.default)(V,["items"]),te);j.push(Ce,...ve)}}else if(se===1){const ve=k((0,c.default)(V,["items"]),te);j.push(ve)}}else se===1&&j.push(V)},{key:"items",order:"last"}),j}function E($){if($.section!=="bottomNavigation")return $;const W={...$};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const N=W[k];typeof N=="string"&&(W[k]={en:N})}),W}function B($={}){const W=[];function k(j,V={}){const te=[],{children:se=[],meta:fe={}}=j,ve=(0,u.default)(fe?.navigation||[]);(0,y.hasStartEngine)(fe)&&j.meta?.capabilities?.navigation!==!1&&te.push(...ve);const Ce=V.name||"",Se=V.mountPoint||D,_e=j===$?"":fe.name||"",Fe=j===$?"":j.mountPoint||D;for(const Pe of se){if(!(0,y.hasStartEngine)(Pe.meta))continue;const pe=Pe.meta.name,be=Pe.mountPoint,ut=[Ce,_e,pe].filter(Boolean).join("."),mr=Pe.meta.navigation||[],ui=(0,f.joinURL)(Se,Fe,be);Pe.meta?.capabilities?.navigation!==!1&&W.push({did:Pe.meta.did,name:ut,link:ui,title:Pe.meta.title||"",navigation:mr.map(Ke=>({section:C,...Ke}))});const dt=ve.find(Ke=>Ke.component?Ke.component===pe:!1);if(dt){if(!dt.link)if(Pe.meta.navigation&&Pe.meta.navigation.length>0){const Ke=k(Pe,{mountPoint:Fe,name:_e});Ke.length>0&&(dt.items=dt.items??[],dt.items.push(...Ke))}else dt.link=P}else if(Pe.meta?.capabilities?.navigation!==!1){const Ke=k(Pe,{mountPoint:Fe,name:_e}),ln={title:Pe.meta.title,component:pe,id:Pe.meta.did};Ke.length>0?(ln.items=Ke,ln.link=void 0):ln.link=P,te.push(ln)}}return te}return{navigationList:k($),components:W}}function G($){const W=(0,u.default)($).filter(k=>k.id);return _(W,(k,N)=>{if(k.items&&k.items.length){for(let j=k.items.length-1;j>=0;j--)k.items[j].id||k.items.splice(j,1);k.items.length===0&&k.component&&(k.link=k.link||P)}N&&(k.parent=N.id,k.id=[N.id,k.id].join(w)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),W}function U($,W=2){const k=(0,u.default)($),N=H(k,{depth:W,transform:(j,V)=>(V&&(j._parent||(j._parent=V.id,V.component||(j.link=L(V.link,j.link))),j.section=j.section||V.section||[C],j.visible=j.visible??V.visible,V.role&&(j.role=j.role||V.role)),j.component=[V.component,j.component].filter(Boolean).join("."),j)});return _(N,j=>{j.items&&j.items.length>0&&j.items.reduceRight((V,te)=>{if(te._parent){const se=j.items.findIndex(fe=>fe.id===te._parent);se>=0&&j.items.splice(se,1),delete te._parent}return null},null)},{key:"items"}),N}function J($,W){return W&&Array.isArray($.items)?$.items.filter(k=>(0,s.default)(k.section)?S($.section,W):!!S(k.section,W)).map(k=>({...k,section:W})):[]}function ee($){const W=(0,u.default)($),k=[];for(const N of W){let te=function(se,fe){const ve=J(se,fe);V.push({...j,section:fe,items:ve})};const j=(0,u.default)((0,c.default)(N,["items"])),V=[];if(Array.isArray(N.section))for(const se of N.section)te(N,se);else if(N.section){const{section:se}=N;te(N,se)}else if(N.items&&N.items.length>0){const se=N.items.reduce((ve,Ce)=>{const{section:Se=[C]}=Ce||{};return ve.push(...Se),ve},[]),fe=[...new Set(se)];for(const ve of fe)te(N,ve)}else V.push({...N,section:C});k.push(...V)}return k}function X($=[]){const W=(0,u.default)($);return W.reduceRight((k,N,j)=>{if(N.parent){const V=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);V&&(V.items||(V.items=[]),V.items=[N,...V.items]),W.splice(j,1)}return null},null),W}function Z($,W=[]){const k=X($);return _(k,j=>{if(j?.component&&(W.some(V=>V.name===j.component)||(j.visible=!1)),j.items&&j.items.length)for(let V=j.items.length-1;V>=0;V--)j.items[V].visible===!1&&j.items.splice(V,1)},{key:"items"}),k.filter(j=>!(j.visible===!1||j.items&&Array.isArray(j.items)&&j.items.length>0&&j.items?.every(V=>V.visible===!1)))}function q($){return $.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const re=$=>{const[W,k]=(0,m.default)($,V=>V.id===t.NAV_GROUP_SYSTEM),[N,j]=(0,m.default)(k,V=>V.id===t.NAV_GROUP_SERVICES);return[...W,...N,...j]};e.sortRootNavigation=re;const ne=$=>{const[,W]=(0,m.default)($,k=>{const N=typeof k.title=="string"?k.title:k.title?.en;return k.id===t.NAV_GROUP_TEAM||k.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=ne;function ue($={},W={}){const{beforeProcess:k=pe=>pe}=W,{navigationList:N,components:j}=B($),V=new Map;N.forEach(pe=>{pe.items?.forEach(be=>{V.set((0,f.joinURL)(pe.id,be.id),be)})});const te=(0,l.default)($,"settings.org.enabled",!1),se=[t.NAV_GROUP_TEAM,t.NAV_GROUP_SYSTEM,t.NAV_GROUP_SERVICES];$?.settings?.navigations&&(Array.isArray($.settings.navigations)?$.settings.navigations=[...$.settings.navigations].filter(pe=>!(pe.from==="team-tmpl"&&se.includes(pe?.parent))).map(pe=>{if(pe.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(pe,"private")){const be=V.get(pe.id);be&&Object.prototype.hasOwnProperty.call(be,"private")&&(pe.private=be.private)}return!te&&pe.section==="userCenter"&&pe.id==="/userCenter/orgs"?null:pe}).filter(Boolean):$.settings.navigations=[]);const fe=T(ne($?.settings?.navigations||[])).map(E),ve=U(k(N)),Ce=G(ve),_e=ee(Ce).reduce((pe,be)=>["bottom","social","sessionManager","userCenter"].includes(be.section)&&be.items&&be.items.length>0?(pe.push(...be.items.map(mr=>{const{section:ui}=be,dt=L(be.link,mr.link),Ke=[be.component,mr.component].filter(Boolean).join(".");return{...mr,section:ui,link:dt,component:Ke,parent:""}})),pe):(pe.push(be),pe),[]),Fe=H(_e,{transform(pe,be){let{component:ut}=pe;return be?.component&&(ut=[be.component,pe.component].filter(Boolean).join(".")),E({...pe,component:ut})}});return{navigationList:(0,i.default)(fe,Fe,(pe,be)=>{const ut=["id","section"];return(0,o.default)((0,a.default)(pe,ut),(0,a.default)(be,ut))}),components:j,builtinList:Fe}}}(yr)),yr}var Ne=gg();const jc=I.createContext(null),Ka="/",vg="header",Ya={userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled},{id:"/userCenter/nfts",title:{en:"NFTs",zh:"NFTs"},icon:"ant-design:gold-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/nfts"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/settings",title:{en:"Settings",zh:"设置"},icon:"ant-design:setting-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/did-spaces",title:{en:"DID Spaces",zh:"DID Spaces"},icon:"ant-design:cloud-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Follow",zh:"关注"},icon:"ant-design:user-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function pi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const it=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Ja=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),mg=(e,r)=>{const n=Ne.cleanOldNavigationHistory(r),t=n.findIndex(a=>a.id===Ge.NAV_GROUP_TEAM);return t>=0&&n.splice(t,1),n.findIndex(a=>a.id===Ge.NAV_GROUP_SERVICES)===-1&&n.unshift(Ja(Ge.NAV_GROUP_SERVICES,e("navigation.services"),[it("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),it("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),it("notification",e("navigation.notification"),"ant-design:bell-outlined","/admin/notification"),it("aigne",e("navigation.aigne"),"hugeicons:artificial-intelligence-04","/admin/aigne"),it("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),it("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n.findIndex(a=>a.id===Ge.NAV_GROUP_SYSTEM)===-1&&n.unshift(Ja(Ge.NAV_GROUP_SYSTEM,e("navigation.system"),[it("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),it("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),it("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations")])),n};function Xa({name:e}){return g.jsx(Sp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function bg({children:e}){const{blocklet:r,actions:n}=Gt(),{t}=Le(),{navigationList:i,components:o,builtinList:a}=Ne.parseNavigation(r,{beforeProcess(w){const _=tt(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Ya,S)&&Ya[S].forEach(R=>{(R.shouldDisplay&&typeof R.shouldDisplay=="function"?R.shouldDisplay:()=>!0)(r)&&!_.some(O=>O.id===R.id)&&_.push(R)})}),mg(t,_)}}),s=Ft({rawNavigation:tt(i),activeSection:vg,components:o}),l=I.useMemo(()=>Ne.sortRootNavigation(Ne.nestNavigationList(tt(s.rawNavigation))),[s.rawNavigation]),c=I.useMemo(()=>{const w=Ne.filterNavigation(tt(s.rawNavigation),o);return Ne.joinLink(w,o)},[o,s.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const _=Ne.flattenNavigation(Ne.joinLink(l,o)),S=_.find(R=>R.id===w.id);if(S?.component){if(!o.some(R=>R.name===S.component))return g.jsx(Xa,{name:S.component})}else if(S.parent){const R=_.find(T=>T.id===S.parent);if(R?.component&&!o.some(T=>T.name===R.component))return g.jsx(Xa,{name:R.component})}return S?.link},[l,o]),f=I.useCallback(w=>{s.activeSection=w},[s]),d=I.useCallback(w=>{const _=[];Ne.deepWalk(w,(R,T)=>{const O={...Mt(R,["children","expand"]),parent:T?.id};_.push(O)});const S=tt(s.rawNavigation).filter(R=>{if(!s.activeSection)return!1;const T=_.find(O=>pi(O,R));return T?!Ne.isMatchSection(T.section,s.activeSection):!0});s.rawNavigation=[...S,..._]},[s]),p=I.useCallback((w=[])=>{const _=tt(s.rawNavigation).map(S=>{const R=w.find(T=>pi({...T,section:s.activeSection},S));return R?{...S,...R}:S});s.rawNavigation=_},[s]),h=I.useCallback((w,_=Ka)=>w.map(R=>{const O=o.find(H=>H.name===R.component)?.link||_,L=R.items||[],{link:M}=R;return{title:R.title,description:R.description,subtitle:u(R),link:M,icon:R.icon,children:h(L,M||Ka),section:R.section,visible:R.visible,parent:R.parent,component:R.component,id:R.id,role:R.role,from:R.from,__base:O}}),[o,u]),v=I.useCallback(w=>{p([w])},[p]),m=I.useCallback(w=>{const _=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=tt(s.rawNavigation).filter(S=>!_.includes(S.id))},[s]),y=I.useCallback((w={},_=-1)=>{const S={...w,id:yp.nanoid(),section:s.activeSection,visible:!0},R=[...s.rawNavigation],T=R.filter(O=>O.section===s.activeSection);if(_<0||_>T.length-1)R.push(S);else{const O=T[_],L=R.findIndex(M=>pi(M,O));R.splice(L,0,S)}return s.rawNavigation=R,S},[s]),b=I.useCallback(w=>{const S=tt(l).filter(R=>Ne.isMatchSection(R.section,w));return h(S)},[l,h]),C=I.useCallback(async w=>{const S=w.map(R=>xp(R,wp)).map(R=>{const T={...R};return T.role&&Array.isArray(T.role)&&(T.role=JSON.stringify(T.role)),T.section&&Array.isArray(T.section)&&(T.section=JSON.stringify(T.section)),T.title&&T.title instanceof Object&&(T.title=JSON.stringify(T.title)),T.description&&T.description instanceof Object&&(T.description=JSON.stringify(T.description)),T.link&&T.link instanceof Object&&(T.link=JSON.stringify(T.link)),T});await n.configNavigations(S)},[n]),D=I.useCallback(async w=>{if(w){const _=a.filter(R=>Ne.isMatchSection(R.section,w)),S=s.rawNavigation.filter(R=>!Ne.isMatchSection(R.section,w));await C(S),s.rawNavigation=[...S,..._]}else await C([]),s.rawNavigation=tt(a)},[C,s,a]),P=I.useMemo(()=>({state:s,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:C,resetNavigation:D}),[s,c,o,u,f,v,m,y,d,b,C,D]);return g.jsx(jc.Provider,{value:P,children:e})}function Fc(){const e=I.useContext(jc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Qe={},hi,Qa;function yg(){if(Qa)return hi;Qa=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,s=parseInt,l=typeof Dr=="object"&&Dr&&Dr.Object===Object&&Dr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,_,S){var R,T,O,L,M,H,E=0,B=!1,G=!1,U=!0;if(typeof w!="function")throw new TypeError(e);_=P(_)||0,b(S)&&(B=!!S.leading,G="maxWait"in S,O=G?p(P(S.maxWait)||0,_):O,U="trailing"in S?!!S.trailing:U);function J(W){var k=R,N=T;return R=T=void 0,E=W,L=w.apply(N,k),L}function ee(W){return E=W,M=setTimeout(q,_),B?J(W):L}function X(W){var k=W-H,N=W-E,j=_-k;return G?h(j,O-N):j}function Z(W){var k=W-H,N=W-E;return H===void 0||k>=_||k<0||G&&N>=O}function q(){var W=v();if(Z(W))return re(W);M=setTimeout(q,X(W))}function re(W){return M=void 0,U&&R?J(W):(R=T=void 0,L)}function ne(){M!==void 0&&clearTimeout(M),E=0,R=H=T=M=void 0}function ue(){return M===void 0?L:re(v())}function $(){var W=v(),k=Z(W);if(R=arguments,T=this,H=W,k){if(M===void 0)return ee(H);if(G)return M=setTimeout(q,_),J(H)}return M===void 0&&(M=setTimeout(q,_)),L}return $.cancel=ne,$.flush=ue,$}function y(w,_,S){var R=!0,T=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(R="leading"in S?!!S.leading:R,T="trailing"in S?!!S.trailing:T),m(w,_,{leading:R,maxWait:_,trailing:T})}function b(w){var _=typeof w;return!!w&&(_=="object"||_=="function")}function C(w){return!!w&&typeof w=="object"}function D(w){return typeof w=="symbol"||C(w)&&d.call(w)==n}function P(w){if(typeof w=="number")return w;if(D(w))return r;if(b(w)){var _=typeof w.valueOf=="function"?w.valueOf():w;w=b(_)?_+"":_}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?s(w.slice(2),S?2:8):i.test(w)?r:+w}return hi=y,hi}var xr={exports:{}},Pt={exports:{}},xg=Pt.exports,Za;function Sg(){return Za||(Za=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Pt.exports=function(){return performance.now()}:typeof br<"u"&&br!==null&&br.hrtime?(Pt.exports=function(){return(e()-i)/1e6},r=br.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=br.uptime()*1e9,i=t-o):Date.now?(Pt.exports=function(){return Date.now()-n},n=Date.now()):(Pt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(xg)),Pt.exports}var es;function wg(){if(es)return xr.exports;es=1;for(var e=Sg(),r=typeof window>"u"?Dr: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 s=0,l=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),p=Math.max(0,u-(d-s));s=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++l,callback:f,cancelled:!1}),l},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return xr.exports=function(f){return i.call(r,f)},xr.exports.cancel=function(){o.apply(r,arguments)},xr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},xr.exports}var cn={},ts;function Cg(){if(ts)return cn;ts=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return cn}var Ht={},rs;function Ig(){if(rs)return Ht;rs=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.noop=e,Ht.intBetween=r,Ht.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 Ht}var ns;function Rg(){if(ns)return Qe;ns=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.createHorizontalStrength=R,Qe.createVerticalStrength=T,Qe.createScrollingComponent=M,Qe.default=H,Qe.defaultVerticalStrength=Qe.defaultHorizontalStrength=void 0;var e=u(dc()),r=c(fc()),n=Cp(),t=c(yg()),i=c(wg()),o=c(Cg()),a=Rh,s=c(Ip()),l=Ig();function c(E){return E&&E.__esModule?E:{default:E}}function u(E){if(E&&E.__esModule)return E;var B={};if(E!=null){for(var G in E)if(Object.prototype.hasOwnProperty.call(E,G)){var U=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,G):{};U.get||U.set?Object.defineProperty(B,G,U):B[G]=E[G]}}return B.default=E,B}function f(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(G){return typeof G}:f=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},f(E)}function d(){return d=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var G=arguments[B];for(var U in G)Object.prototype.hasOwnProperty.call(G,U)&&(E[U]=G[U])}return E},d.apply(this,arguments)}function p(E,B){if(E==null)return{};var G=h(E,B),U,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)U=ee[J],!(B.indexOf(U)>=0)&&Object.prototype.propertyIsEnumerable.call(E,U)&&(G[U]=E[U])}return G}function h(E,B){if(E==null)return{};var G={},U=Object.keys(E),J,ee;for(ee=0;ee<U.length;ee++)J=U[ee],!(B.indexOf(J)>=0)&&(G[J]=E[J]);return G}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var G=0;G<B.length;G++){var U=B[G];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(E,U.key,U)}}function y(E,B,G){return B&&m(E.prototype,B),E}function b(E,B){return B&&(f(B)==="object"||typeof B=="function")?B:w(E)}function C(E){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},C(E)}function D(E,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(B&&B.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),B&&P(E,B)}function P(E,B){return P=Object.setPrototypeOf||function(U,J){return U.__proto__=J,U},P(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function _(E,B,G){return B in E?Object.defineProperty(E,B,{value:G,enumerable:!0,configurable:!0,writable:!0}):E[B]=G,E}var S=150;function R(E){return function(G,U){var J=G.x,ee=G.w,X=G.y,Z=G.h,q=Math.min(ee/2,E),re=U.x>=J&&U.x<=J+ee,ne=re&&U.y>=X&&U.y<=X+Z;if(ne){if(U.x<J+q)return(U.x-J-q)/q;if(U.x>J+ee-q)return-(J+ee-U.x-q)/q}return 0}}function T(E){return function(G,U){var J=G.y,ee=G.h,X=G.x,Z=G.w,q=Math.min(ee/2,E),re=U.y>=J&&U.y<=J+ee,ne=re&&U.x>=X&&U.x<=X+Z;if(ne){if(U.y<J+q)return(U.y-J-q)/q;if(U.y>J+ee-q)return-(J+ee-U.y-q)/q}return 0}}var O=R(S);Qe.defaultHorizontalStrength=O;var L=T(S);Qe.defaultVerticalStrength=L;function M(E){var B=function(G){D(U,G);function U(J,ee){var X;return v(this,U),X=b(this,C(U).call(this,J,ee)),_(w(w(X)),"updateScrolling",(0,t.default)(function(Z){var q=X.container.getBoundingClientRect(),re=q.left,ne=q.top,ue=q.width,$=q.height,W={x:re,y:ne,w:ue,h:$},k=(0,l.getCoords)(Z),N=X.props,j=N.horizontalStrength,V=N.verticalStrength;X.scaleX=j(W,k),X.scaleY=V(W,k),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),_(w(w(X)),"handleEvent",function(Z){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(Z))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(U,[{key:"componentDidMount",value:function(){var ee=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 ee.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 ee=this.props.dragDropManager,X=ee.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 ee=this,X=0,Z=function q(){var re=ee.scaleX,ne=ee.scaleY,ue=ee.container,$=ee.props,W=$.strengthMultiplier,k=$.onScrollChange;if(W===0||re+ne===0){ee.stopScrolling();return}if(X+=1,X%2){var N=ue.scrollLeft,j=ue.scrollTop,V=ue.scrollWidth,te=ue.scrollHeight,se=ue.clientWidth,fe=ue.clientHeight,ve=re?ue.scrollLeft=(0,l.intBetween)(0,V-se,N+re*W):N,Ce=ne?ue.scrollTop=(0,l.intBetween)(0,te-fe,j+ne*W):j;k(ve,Ce)}ee.frame=(0,i.default)(q)};Z()}},{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 ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var X=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,d({ref:this.wrappedInstance},X))}}]),U}(e.Component);return _(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),_(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),_(B,"defaultProps",{onScrollChange:l.noop,verticalStrength:L,horizontalStrength:O,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(U){var J=U.dragDropManager;return J===void 0?null:e.default.createElement(B,d({},G,{dragDropManager:J}))})}}return Qe}var xn=Rg();const Tg=Hn(xn);var Dg=Th();const is=Hn(Dg);function Bc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Gc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function $c(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}}Bc.__suppressDeprecationWarning=!0;Gc.__suppressDeprecationWarning=!0;$c.__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 $u=Object.freeze({left:0,top:0,width:16,height:16}),Mn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),nn=Object.freeze({...$u,...Mn}),lo=Object.freeze({...nn,body:"",hidden:!1}),dy=Object.freeze({width:null,height:null}),Wu=Object.freeze({...dy,...Mn});function fy(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 py=/[\s,]+/;function hy(e,r){r.split(py).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Hu={...Wu,preserveAspectRatio:""};function il(e){const r={...Hu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=fy(n("rotate","")),hy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function gy(e,r){for(const n in Hu)if(e[n]!==r[n])return!0;return!1}const zr=/^[a-z0-9]+(-[a-z0-9]+)*$/,on=(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 s=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:t,prefix:l,name:s};return r&&!Cn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Cn(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!Cn(s,n)?null:s}return null},Cn=(e,r)=>e?!!((e.provider===""||e.provider.match(zr))&&(r&&e.prefix===""||e.prefix.match(zr))&&e.name.match(zr)):!1;function vy(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 ol(e,r){const n=vy(e,r);for(const t in lo)t in Mn?t in e&&!(t in n)&&(n[t]=Mn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function my(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 s=t[a]&&t[a].parent,l=s&&o(s);l&&(i[a]=[s].concat(l))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function by(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=ol(t[s]||i[s],o)}return a(r),n.forEach(a),ol(e,o)}function Uu(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=my(e);for(const i in t){const o=t[i];o&&(r(i,by(e,i,o)),n.push(i))}return n}const yy={provider:"",aliases:{},not_found:{},...$u};function Oi(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function qu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Oi(e,yy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(zr)||typeof o.body!="string"||!Oi(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(zr)||typeof a!="string"||!n[a]&&!t[a]||!Oi(o,lo))return null}return r}const An=Object.create(null);function xy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function It(e,r){const n=An[e]||(An[e]=Object.create(null));return n[r]||(n[r]=xy(e,r))}function Jo(e,r){return qu(r)?Uu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Sy(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function wy(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(An)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(An[i]||{})).forEach(a=>{const s=It(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let Hr=!1;function Vu(e){return typeof e=="boolean"&&(Hr=e),Hr}function Ur(e){const r=typeof e=="string"?on(e,!0,Hr):e;if(r){const n=It(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Ku(e,r){const n=on(e,!0,Hr);if(!n)return!1;const t=It(n.provider,n.prefix);return Sy(t,n.name,r)}function al(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Hr&&!r&&!e.prefix){let i=!1;return qu(e)&&(e.prefix="",Uu(e,(o,a)=>{a&&Ku(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Cn({provider:r,prefix:n,name:"a"}))return!1;const t=It(r,n);return!!Jo(t,e)}function Cy(e){return!!Ur(e)}function Iy(e){const r=Ur(e);return r?{...nn,...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,s=i.name,l=n[o]||(n[o]=Object.create(null)),c=l[a]||(l[a]=It(o,a));let u;s in c.icons?u=r.loaded:a===""||c.missing.has(s)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:s};u.push(f)}),r}function Yu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Ty(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,s=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const c=l.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!==s&&(n||Yu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Dy=0;function _y(e,r,n){const t=Dy++,i=Yu.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 co=Object.create(null);function sl(e,r){co[e]=r}function uo(e){return co[e]||co[""]}function Py(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?on(i,r,n):i;o&&t.push(o)}),t}var ky={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Oy(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let w=e.resources.slice(0);for(a=[];w.length>1;){const _=Math.floor(Math.random()*w.length);a.push(w[_]),w=w.slice(0,_).concat(w.slice(_+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let l="pending",c=0,u,f=null,d=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function v(){l==="pending"&&(l="aborted"),h(),d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function m(w,_){_&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){l="failed",p.forEach(w=>{w(void 0,u)})}function C(){d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function D(w,_,S){const R=_!=="success";switch(d=d.filter(T=>T!==w),l){case"pending":break;case"failed":if(R||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){u=S,b();return}if(R){u=S,d.length||(a.length?P():b());return}if(h(),C(),!e.random){const T=e.resources.indexOf(w.resource);T!==-1&&T!==e.index&&(e.index=T)}l="completed",p.forEach(T=>{T(S)})}function P(){if(l!=="pending")return;h();const w=a.shift();if(w===void 0){if(d.length){f=setTimeout(()=>{h(),l==="pending"&&(C(),b())},e.timeout);return}b();return}const _={status:"pending",resource:w,callback:(S,R)=>{D(_,S,R)}};d.push(_),c++,f=setTimeout(P,e.rotate),n(w,r,_.callback)}return setTimeout(P),y}function Ju(e){const r={...ky,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=Oy(r,s,l,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(s){return n.find(l=>s(l))||null}return{query:i,find:o,setIndex:s=>{r.index=s},getIndex:()=>r.index,cleanup:t}}function Xo(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 ti=Object.create(null),wr=["https://api.simplesvg.com","https://api.unisvg.com"],In=[];for(;wr.length>0;)wr.length===1||Math.random()>.5?In.push(wr.shift()):In.push(wr.pop());ti[""]=Xo({resources:["https://api.iconify.design"].concat(In)});function ll(e,r){const n=Xo(r);return n===null?!1:(ti[e]=n,!0)}function ri(e){return ti[e]}function Ey(){return Object.keys(ti)}function cl(){}const Ei=Object.create(null);function Ny(e){if(!Ei[e]){const r=ri(e);if(!r)return;const n=Ju(r),t={config:r,redundancy:n};Ei[e]=t}return Ei[e]}function Xu(e,r,n){let t,i;if(typeof e=="string"){const o=uo(e);if(!o)return n(void 0,424),cl;i=o.send;const a=Ny(e);a&&(t=a.redundancy)}else{const o=Xo(e);if(o){t=Ju(o);const a=e.resources?e.resources[0]:"",s=uo(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),cl):t.query(r,i,n)().abort}const ul="iconify2",qr="iconify",Qu=qr+"-count",dl=qr+"-version",Zu=36e5,My=168;function fo(e,r){try{return e.getItem(r)}catch{}}function Qo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function fl(e,r){try{e.removeItem(r)}catch{}}function po(e,r){return Qo(e,Qu,r.toString())}function ho(e){return parseInt(fo(e,Qu))||0}const zt={local:!0,session:!0},ed={local:new Set,session:new Set};let Zo=!1;function Ay(e){Zo=e}let pn=typeof window>"u"?{}:window;function td(e){const r=e+"Storage";try{if(pn&&pn[r]&&typeof pn[r].length=="number")return pn[r]}catch{}zt[e]=!1}function rd(e,r){const n=td(e);if(!n)return;const t=fo(n,dl);if(t!==ul){if(t){const s=ho(n);for(let l=0;l<s;l++)fl(n,qr+l.toString())}Qo(n,dl,ul),po(n,0);return}const i=Math.floor(Date.now()/Zu)-My,o=s=>{const l=qr+s.toString(),c=fo(n,l);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,s))return!0}catch{}fl(n,l)}};let a=ho(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,po(n,a)):ed[e].add(s))}function nd(){if(!Zo){Ay(!0);for(const e in zt)rd(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=It(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 Ly(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in zt)rd(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function zy(e,r){Zo||nd();function n(t){let i;if(!zt[t]||!(i=td(t)))return;const o=ed[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=ho(i),!po(i,a+1))return;const s={cached:Math.floor(Date.now()/Zu),provider:e.provider,data:r};return Qo(i,qr+a.toString(),JSON.stringify(s))}r.lastModified&&!Ly(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function pl(){}function jy(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ty(e)}))}function Fy(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=uo(n)))return;o.prepare(n,t,i).forEach(s=>{Xu(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=Jo(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),zy(e,l)}catch(c){console.error(c)}jy(e)})})}))}const ea=(e,r)=>{const n=Py(e,!0,Vu()),t=Ry(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,pl)}),()=>{l=!1}}const i=Object.create(null),o=[];let a,s;return t.pending.forEach(l=>{const{provider:c,prefix:u}=l;if(u===s&&c===a)return;a=c,s=u,o.push(It(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(l=>{const{provider:c,prefix:u,name:f}=l,d=It(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&Fy(l,i[c][u])}),r?_y(r,t,o):pl},By=e=>new Promise((r,n)=>{const t=typeof e=="string"?on(e,!0):e;if(!t){n(e);return}ea([t||e],i=>{if(i.length&&t){const o=Ur(t);if(o){r({...nn,...o});return}}n(e)})});function Gy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function $y(e,r){const n=typeof e=="string"?on(e,!0,!0):null;if(!n){const o=Gy(e);return{value:e,data:o}}const t=Ur(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ea([n],()=>r(e,n,Ur(n)));return{value:e,name:n,loading:i}}function Ni(e){return e.hasAttribute("inline")}let id=!1;try{id=navigator.vendor.indexOf("Apple")===0}catch{}function Wy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(id||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const Hy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Uy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function go(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(Hy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Uy.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const qy=e=>e==="unset"||e==="undefined"||e==="none";function od(e,r){const n={...nn,...e},t={...Wu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,s=t.height,l=i.width,c=i.height;let u,f;a===null?(f=s===null?"1em":s==="auto"?c:s,u=go(f,l/c)):(u=a==="auto"?l:a,f=s===null?go(u,c/l):s==="auto"?c:s);const d={},p=(h,v)=>{qy(v)||(d[h]=v.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:d,body:o}}const Vy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ln=Vy();function Ky(e){Ln=e}function Yy(){return Ln}function Jy(e,r){const n=ri(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 Xy(e){return e===404}const Qy=(e,r,n)=>{const t=[],i=Jy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},s=0;return n.forEach((l,c)=>{s+=l.length+1,s>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},s=l.length),a.icons.push(l)}),t.push(a),t};function Zy(e){if(typeof e=="string"){const r=ri(e);if(r)return r.path}return"/"}const ex=(e,r,n)=>{if(!Ln){n("abort",424);return}let t=Zy(r.provider);switch(r.type){case"icons":{const o=r.prefix,s=r.icons.join(","),l=new URLSearchParams({icons:s});t+=o+".json?"+l.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;Ln(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Xy(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)})},tx={prepare:Qy,send:ex};function hl(e,r){switch(e){case"local":case"session":zt[e]=r;break;case"all":for(const n in zt)zt[n]=r;break}}const Mi="data-style";let ad="";function rx(e){ad=e}function gl(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Mi));n||(n=document.createElement("style"),n.setAttribute(Mi,Mi),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+ad}function sd(){sl("",tx),Vu(!0);let e;try{e=window}catch{}if(e){if(nd(),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"||!al(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;ll(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>hl(n,!0),disableCache:n=>hl(n,!1),iconExists:Cy,getIcon:Iy,listIcons:wy,addIcon:Ku,addCollection:al,calculateSize:go,buildIcon:od,loadIcons:ea,loadIcon:By,addAPIProvider:ll,appendCustomStyle:rx,_api:{getAPIConfig:ri,setAPIModule:sl,sendAPIQuery:Xu,setFetch:Ky,getFetch:Yy,listAPIProviders:Ey}}}function ld(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 nx(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ix(e){return"data:image/svg+xml,"+nx(e)}function ox(e){return'url("'+ix(e)+'")'}const vo={"background-color":"currentColor"},cd={"background-color":"transparent"},vl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ml={"-webkit-mask":vo,mask:vo,background:cd};for(const e in ml){const r=ml[e];for(const n in vl)r[e+"-"+n]=vl[n]}function bl(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function ax(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=ld(i,{...o,width:r.width+"",height:r.height+""}),s=ox(a),l=t.style,c={"--svg":s,width:bl(o.width),height:bl(o.height),...n?vo:cd};for(const u in c)l.setProperty(u,c[u]);return t}let jr;function sx(){try{jr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{jr=null}}function lx(e){return jr===void 0&&sx(),jr?jr.createHTML(e):e}function cx(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=ld(e.body,n);return r.innerHTML=lx(i),r.firstChild}function yl(e,r){const n=r.icon.data,t=r.customisations,i=od(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=cx(i);break;default:a=ax(i,{...nn,...n},o==="mask")}const s=Array.from(e.childNodes).find(l=>{const c=l.tagName&&l.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});s?a.tagName==="SPAN"&&s.tagName===a.tagName?s.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,s):e.appendChild(a)}function xl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function ux(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 s=this._shadowRoot=this.attachShadow({mode:"open"}),l=Ni(this);gl(s,l),this._state=xl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Ni(this),c=this._state;l!==c.inline&&(c.inline=l,gl(this._shadowRoot,l))}else this._queueCheck()}get icon(){const s=this.getAttribute("icon");if(s&&s.slice(0,1)==="{")try{return JSON.parse(s)}catch{}return s}set icon(s){typeof s=="object"&&(s=JSON.stringify(s)),this.setAttribute("icon",s)}get inline(){return Ni(this)}set inline(s){s?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const s=this._state;if(s.rendered){const l=this._shadowRoot;if(s.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}yl(l,s)}}get status(){const s=this._state;return s.rendered?"rendered":s.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const s=this._state,l=this.getAttribute("icon");if(l!==s.icon.value){this._iconChanged(l);return}if(!s.rendered)return;const c=this.getAttribute("mode"),u=il(this);(s.attrMode!==c||gy(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=$y(s,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});l.data?this._gotIconData(l):this._state=xl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,il(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=Wy(s.data.body,c),f=this._state.inline;yl(this._shadowRoot,this._state={rendered:!0,icon:s,inline:f,customisations:l,attrMode:c,renderedMode:u})}};i.forEach(s=>{s in o.prototype||Object.defineProperty(o.prototype,s,{get:function(){return this.getAttribute(s)},set:function(l){l!==null?this.setAttribute(s,l):this.removeAttribute(s)}})});const a=sd();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const dx=ux()||sd(),{enableCache:RT,disableCache:TT,iconExists:DT,getIcon:_T,listIcons:PT,addIcon:kT,addCollection:OT,calculateSize:ET,buildIcon:NT,loadIcons:MT,loadIcon:AT,addAPIProvider:LT,_api:zT}=dx,Wt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Wt(t[n],r,n)}):r(t)),ud=(e,r="children")=>{const n=[];return Wt(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)}),dd=e=>/^https?:\/\//.test(e),fd=e=>/^mailto:/i.test(e.trim()),fx=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=>fx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},px=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),l=Math.ceil(s/n),c=[[]];let u=0,f=0;const d=l*.2,p=h=>f>l-d&&u<n-1&&f+h>l+d;return e.forEach(h=>{const v=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&p(v)&&(u++,f=0,c[u]=[]),c[u].push({...h,group:!0}),f+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function rt({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),[s,l]=I.useState(!0);if(_o(async()=>{l(!0);try{await Po(e),a(!0)}catch{a(!1)}l(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),dd(e))return g.jsx(rr,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return s?g.jsx(xe,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(rr,{component:"span",...t,sx:i,children:g.jsx(xe,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(rr,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function ra(e=["en","zh"]){const{blocklet:r}=Gt();return I.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>Ge.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=Ge.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:Ge.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const hx=e=>e.from!=="team-tmpl";function gx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Tp(e.slice(0,t-1),r.slice(0,i-1)))}function hd({treeNode:e}){const{locale:r}=Le(),{blocklet:n}=Gt(),{defaultLocale:t}=ra(),i=n.environments.find(s=>s.key===Ge.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=ae(s=>{if(s?.startsWith("/"))try{return new URL(s,i?.value).href}catch{console.error("Failed to parse url",{url:s,origin:i?.value})}return s});function a(){const{title:s,subtitle:l}=e;let c=s,u=l;return Xt(s)&&(c=s[r]||s[t]||s.en),!I.isValidElement(l)&&Xt(l)&&(u=l[r]||l[t]||l.en),g.jsxs(oe,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:c}),l&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(ko(o(e.icon))?g.jsx(rt,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(xe,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}hd.propTypes={treeNode:x.object.isRequired};const vx=ct(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function gd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(vx,{children:g.jsx(Ph,{backend:kh,...i,children:g.jsx(om,{generateNodeProps:o=>{const a=hx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(xe,{icon:"ic:round-drag-indicator"}):g.jsx(oe,{sx:{width:16,height:16}}),title:g.jsx(hd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:gx,theme:uy})})})}gd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var mx=uc();const bx=Hn(mx);function vd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Le(),c=I.useRef(),[u,f]=I.useState(null),d=Ft({localeList:[],inputLocale:"",localeError:""}),p=I.useMemo(()=>!!u,[u]),h=I.useMemo(()=>o.includes(i)?i:t,[o,i]),v=I.useMemo(()=>d.localeList.filter(S=>!!a[S]),[d.localeList,a]),m=I.useMemo(()=>Object.keys(Mt(a,[...d.localeList,t])).map(S=>({title:a[S],value:S})),[d.localeList]),y=I.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=ae(S=>S?S===t||d.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),C=ae((S="")=>{const R=S?.trim(),T=b(R);return T!==!0?d.localeError=T:d.localeError="",T}),D=ae(()=>{f(null),d.inputLocale="",d.localeError=""}),P=ae(()=>{const S=d.inputLocale?.trim();C(S)===!0&&(D(),d.localeList.push(S),r(S))}),w=ae((S,R)=>{S.preventDefault(),S.stopPropagation(),d.localeList=zc(d.localeList,R),s(R)}),_=ae(S=>{const{value:R}=S.target;C(R),d.inputLocale=R});return I.useEffect(()=>{d.localeList=[...o]},[o,d]),Ih("enter",()=>{setTimeout(()=>{P()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs($h,{sx:e,value:h,onChange:(S,R)=>{n(R)},children:[g.jsx(Wa,{label:y,value:t}),v.map(S=>g.jsx(Wa,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(ze,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:R=>{w(R,S)},children:g.jsx(xe,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(ze,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{f(S.currentTarget)},children:g.jsx(xe,{icon:"mdi:plus"})})]}),g.jsx(qi,{open:p,anchorEl:u,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(oe,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(oe,{sx:{mt:1},children:g.jsx(Yi,{required:!0,fullWidth:!0,label:"Locale",value:d.inputLocale,options:m,onChange:_,error:!!d.localeError,helperText:d.localeError||" "})}),g.jsx(oe,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(wt,{size:"small",variant:"contained",onClick:P,children:l("common.confirm")})})]})})]})}vd.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const na=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function md(e,r,n=5e3){for(const t of na){const i=Re(t,e);try{return await Hh.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 yx({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 md("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const hn=new Map;async function xx(e){if(hn.has(e))return hn.get(e);const r=(async()=>{const{data:n}=await md("/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)})();hn.set(e,r);try{return await r}catch(n){throw hn.delete(e),n}}function Sx(e){return Re(na[0],`${e}.svg`)}function wx(e){try{const r=new URL(e);for(const n of na)if(r.origin===n)return Dp(r.pathname).replace(".svg","");return""}catch{return""}}function Cx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):ko(e)&&(n=wx(e))),{isIconId:r,iconId:n}}const Ix=I.lazy(()=>Op(()=>import("./index-CzaXdOyt.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}))),Sl=Xe(rt)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function bd({icon:e,...r}){const[n,t]=I.useState(!1);return _o(async()=>{t(!1),await Po(e),t(!0)},[e]),e?n?g.jsx(xe,{icon:e,...r}):g.jsx(xe,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(xe,{icon:"material-symbols-light:select-rounded",...r})}bd.propTypes={icon:x.string.isRequired};function mo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=pc(),{blocklet:u}=Gt(),f=qn(Z=>Z.breakpoints.down("md")),d=u.environments.find(Z=>Z.key===Ge.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=s(),h=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Le(),{isIconId:C,iconId:D}=Cx(e),[P,w]=I.useState(null),{onChange:_,onBlur:S,sx:R,...T}=a,O=i.includes("upload"),L=i.includes("select"),M=Re(l,"/api/media/upload",u.appPid),H=Ft({showPopover:!1}),E=ae(Z=>{if(Z?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(Z,q).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[d?.value,c]),B=ae(async Z=>await h.current.getUploader().uploadFile(Z)),G=ae(()=>{w(null)}),U=ae(()=>{L&&w(m.current)}),J=ae(async Z=>{try{if(o==="url"){const q=Sx(Z),re=await _p(q,{width:128,height:128}),ne=await Pp(re,Z);await B(ne)}else _?.(Z)}catch(q){console.error("Failed to pick icon:",q)}G()}),ee=ae(Z=>{Z.stopPropagation(),v.current.open(),G()}),X=ae(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(lt,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...R},onClick:L?U:void 0,...T,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Dn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(Sl,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Dn,{position:"end",children:[g.jsx(ze,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),_("")},children:g.jsx(Ac,{style:{fontSize:18}})}),O&&g.jsx(kp,{title:y("common.upload"),children:g.jsx(ze,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(bd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),L&&g.jsx(oe,{component:Wh,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),L&&g.jsx(qi,{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:G,children:g.jsx(yd,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(bo,{ref:h,locale:b,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(bo,{ref:v,locale:b,apiPath:M,headers:p,onUploadFinish:X}),g.jsx(qi,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(Sl,{size:120,icon:E(e),alt:"Error"})})]})}mo.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function yd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[s,l]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[p,h]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Le(),D=96,P=ae(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,R=(S-1)*D,T=S*D,O=m.current.slice(R,T);l(L=>[...L,...O]),y.current=S,b.current=T<m.current.length,u(!1)},300))}),w=ae(S=>{m.current=S,y.current=1,b.current=S.length>D;const R=S.slice(0,D);l(R),h(S.length===0),b.current&&P()}),{run:_}=hc(async S=>{if(S){u(!0);try{const{icons:R}=await yx({keyword:S});w(R)}catch(R){console.error("Failed to search icons:",R),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:T,scrollHeight:O,clientHeight:L}=v.current;(T+L>=O-150||O<=L)&&P()},R=v.current;return R&&(R.addEventListener("scroll",S),S()),()=>{R&&R.removeEventListener("scroll",S)}},[P,c]),_o(async()=>{if(f)_(f);else{u(!0);try{const S=await xx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[f,_,w]),g.jsxs(Rx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(lt,{label:C("navigation.form.searchIcons"),placeholder:C("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:S=>d(S.target.value),slotProps:{input:{endAdornment:g.jsx(ze,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx(Ac,{style:{fontSize:18}})})}}}),g.jsx(wt,{onClick:o,children:C("common.cancel")})]}),g.jsxs(oe,{children:[s.length>0&&g.jsx(oe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:s.map(S=>g.jsx(Tx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(xe,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(oe,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(gc,{size:20})})]})]})}yd.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Rx=Xe(oe)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),Tx=Xe(ze,{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 bo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return g.jsx(I.Suspense,{children:g.jsx(Ix,{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}})})}bo.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const wl=24,Cl=48,Il="add";x.string.isRequired;function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Mc(),{t:s,locale:l}=Le(),{localeMap:c,defaultLocale:u}=ra(),f=ae(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),d=ae(k=>zc(Array.from(new Set(ye.NAVIGATION_I18N_FIELDS.flatMap(N=>Xt(k[N])?Object.keys(k[N]):[]))),u)),p=I.useRef(()=>{}),h=Ft({isRoot:!0,type:Il,linkDisabled:!1,locale:u,formState:f(),get localeList(){return d(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=Bh({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{ye.NAVIGATION_I18N_FIELDS.forEach(k=>b(k,h.formState[k][h.locale]))},[b,h.locale]);const P=Gh({control:m}),w=P.component,_=P.title,S=P.description,R=P.link,T=P.parent;I.useEffect(()=>{h.formState.title[h.locale]=_},[_]),I.useEffect(()=>{h.formState.description[h.locale]=S},[S]),I.useEffect(()=>{h.formState.link[h.locale]=R},[R]),I.useEffect(()=>{i?.(P)},[P,i]);const O=I.useMemo(()=>t.find(N=>w?n.find(V=>V.name===w).did===N.id:N.id===T),[n,t,w,T]),L=I.useMemo(()=>{if(O?.component){const k=n.find(te=>te.name===O.component),{link:N}=k||{},j=Xt(N)?N[h.locale]:N;if(w)return Oa(j);const V=Xt(O.link)?O.link[h.locale]:O.link;return Oa(Re(j,V||"/"))}return null},[n,h.locale,O,w]),M=I.useMemo(()=>{const{component:k}=O||{},N=n.find(te=>te.name===k),{navigation:j=[]}=N||{};return Ne.flattenNavigation(j,{transform(te,se){return se?.section&&(te.section=te.section||se.section),te}}).filter(te=>te.link).filter(te=>Ne.isMatchSection(te.section,r)).map(te=>({label:te.link,title:te.title[l]||te.title}))},[O,n,r,l]),H=ae(()=>{h.isRoot=!0,h.locale=u,h.type=Il,h.linkDisabled=!1,h.formState=f(),y(),C(),p.current=()=>{}}),E=ae((k={})=>(h.localeList.length>0&&ye.NAVIGATION_I18N_FIELDS.forEach(N=>{og(h.formState[N]).length>1&&(k[N]=h.formState[N])}),Oo(k.role)&&(k.role=void 0),k)),B=ae(({parent:k}={},N=()=>{})=>{h.type="add",h.isRoot=!k,b("parent",k?.id),p.current=j=>{N(j)}}),G=ae((k={},N=()=>{})=>{const{id:j,icon:V,parent:te,component:se,role:fe=[]}=k;b("id",j),b("icon",V),k.from==="team-tmpl"&&(h.linkDisabled=!0);const ve=d(k),Ce=(Se,_e)=>{vc(Se)?h.formState[_e]=ve.reduce((Fe,Pe)=>(Fe[Pe]=Se,Fe),{[u]:Se}):Xt(Se)?h.formState[_e]=tt(Se):h.formState[_e]={}};ye.NAVIGATION_I18N_FIELDS.forEach(Se=>Ce(k[Se],Se)),ye.NAVIGATION_I18N_FIELDS.forEach(Se=>b(Se,h.formState[Se][h.locale])),b("component",se),b("parent",te),b("role",fe||[]),h.type="edit",h.isRoot=!te,p.current=Se=>{const _e=Ep(Se,["id","title","description","icon","component","link","role"]);N(_e)}}),U=ae(k=>{const N=k?.trim();if(r!=="bottomNavigation"){if(!N)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(N.length>wl)return s("navigation.form.titleTooLong",{len:wl})}return!0}),J=ae(k=>{const N=k?.trim();return N&&N.length>Cl?s("navigation.form.descriptionTooLong",{len:Cl}):!0}),ee=ae(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k),X=ae(async k=>{const N=k?.trim();if(N){if(ko(ee(N)))return!0;try{await Po(N)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=ae(k=>{const N=k?.trim();return N?X(N):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),q=ae(k=>{const N=k?.trim();return N?Ne.checkLink(N)?!0:s("navigation.form.invalidLink"):h.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),re=ae(k=>{h.locale=k,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]||(h.formState[N][k]="")}),setTimeout(()=>{C()})}),ne=ae(()=>{const{title:k,link:N}=h.formState;if(r!=="bottomNavigation")for(const j of Object.keys(k)){const V=U(k[j]);if(V!==!0)return V}for(const j of Object.keys(N)){const V=q(N[j]);if(V!==!0)return V}return!0}),ue=ae(k=>{const N=ne();N===!0?p.current(E(k)):Nt.error(N)}),$=ae(k=>{h.locale=u,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N]=Mt(h.formState[N],k)}),i?.(P)}),W=ae(k=>{h.locale=k,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]=h.formState[N][u]}),i?.(P),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:B,edit:G,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v(ue)}),[B,H,G,v,ue]),g.jsxs(oe,{...o,children:[g.jsx(vd,{sx:{mb:1},onAdd:W,onChange:re,onRemoveLocale:$,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(ft,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...k})}),r==="bottomNavigation"?g.jsx(ft,{name:"icon",control:m,rules:{validate:Z},render:({field:k})=>g.jsx(mo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...k})}):g.jsx(ft,{name:"icon",control:m,rules:{validate:X},render:({field:k})=>g.jsx(mo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,...k})}),h.isRoot&&g.jsx(ft,{name:"component",control:m,render:({field:k})=>g.jsx(Yi,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&k.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(N=>({title:N.title,value:N.name,description:N.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Mt(k,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(ft,{name:"description",control:m,rules:{validate:J},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...k})}),g.jsx(ft,{name:"link",control:m,rules:{validate:q},render:({field:k})=>g.jsx(mc,{fullWidth:!0,margin:"dense",children:g.jsx(Uh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:N=>N.label,options:M,renderInput:N=>g.jsx(lt,{...N,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:L?g.jsx(Dn,{position:"start",sx:{textDecoration:bx(R||"")?"line-through":""},children:L}):null}}}),renderOption:(N,j)=>g.jsxs(oe,{component:"li",...N,children:[j.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:j.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(N,j)=>{k.onChange(j)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(ft,{name:"role",control:m,render:({field:k})=>g.jsx(Yi,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:a.map(N=>({title:N.title,value:N.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Mt(k,"ref")})}),r==="bottomNavigation"&&g.jsx(ft,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...k})})]})]})}ia.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function oa({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Le(),[o,{setTrue:a,setFalse:s}]=jh(),[l,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[l];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,l]),d=I.useCallback(()=>{s(),u.current?.reset()},[s]),p=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),h=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),g.jsx(bc,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(_n,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(ia,{ref:u,section:r,components:n,rawNavigations:t})})}oa.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function xd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Le(),l=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const f=I.useCallback(v=>{u(v),r(o)},[r,o]),d=I.useCallback(v=>{u(v),n(o)},[n,o]),p=I.useCallback(v=>{u(v),t(o)},[t,o]),h=I.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:s(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(ze,{size:"small",color:"success",onClick:f,disabled:c,children:g.jsx(xe,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:s(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(ze,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:g.jsx(xe,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?s("navigation.action.noEdit"):o.visible?s("navigation.action.hide"):s("navigation.action.show"),children:g.jsx(ze,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(xe,{icon:"mdi:eye-off-outline"}):g.jsx(xe,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:s(l&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(ze,{disabled:l&&!c,size:"small",color:"error",onClick:h,children:g.jsx(xe,{icon:"mdi:delete"})})})]})}xd.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Rn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Dx=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},_x=(e,r="en",n="en")=>{if(typeof e=="string"){if(dd(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(fd(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},ir=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Wt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:yc(o.items?.length?o.link:_x(o.link,r,n),t),_rawLink:o.link}),"items")},Px=e=>Wt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),kx=e=>{if(!e?.length)return null;const r=Px(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},aa=e=>{if(!e)return null;const r={...e};return r.theme=Dx(r.theme),r.navigation=kx(Ox(r.navigation)),r},Ox=(e=[])=>ta(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),Sd=(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"),Ex={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"/>'},Nx={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 Mx({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),l=Bt(),c=I.useRef(null),u=Ft({open:!1}),f=ae((p=!u.open)=>{u.open=p}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return s.length===0||!e?.user?null:g.jsxs(oe,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[g.jsx(ze,{size:"medium",ref:c,children:g.jsx(xe,{icon:Ex,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(Np,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Mp,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),f(!1)},children:g.jsx(xc,{...p,timeout:350,children:g.jsxs(Nr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Ap,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:s.map(h=>g.jsx(Lp,{disablePadding:!0,children:g.jsxs(qh,{href:Ea(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(oe,{component:"img",src:`${Sc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(xe,{fontSize:50,icon:h.icon||Nx,color:l.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Ea(h.title,r)})]})},h.id))}),g.jsx(zp,{session:e,children:g.jsx(_n,{variant:"outlined",fullWidth:!0,href:jp,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const wd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),Cd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number}),Ax=["admin","owner"],Lx=e=>e.endsWith(".ip.abtnet.io"),zx=e=>e.endsWith(".did.abtnet.io"),jx={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:"配置域名"}},Fx=1e3*60*60*24*30,Rl=".well-known/service/admin/domains";function Id({locale:e="en",session:r={}}){const n=r?.user,t=Lc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>Fx}),a=ae((d,p={})=>Vn(jx,d,e,"en",p)),s=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),l=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=Re(window.location.origin,Rl);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Ax.includes(n.role);return window.location.href.includes(Rl)||t||!Lx(s)&&!zx(s)?null:g.jsxs(Fp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(Bp,{sx:{padding:"20px !important"},children:[g.jsx(me,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),g.jsx(me,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&g.jsx(oe,{component:"ul",children:l.map(d=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),g.jsxs(Gp,{sx:{px:"12px !important"},children:[g.jsx(wt,{onClick:c,children:a("skip")}),f&&g.jsx(wt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Id.propTypes={locale:x.string,session:x.object};const Ee={};function Bx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Re(r,Sc,e);return new Hp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function Gx(e="admin"){return Ee[e]||(Ee[e]=Bx(e)),Ee[e]}const $x=(e="admin")=>{const r=I.use(Kn),{session:n}=r??{},t=je(()=>n.user?.did,[n.user]),i=$p(t);return Wp(()=>{Object.keys(Ee).forEach(o=>{Ee[o]?.isConnected()&&Ee[o]?.disconnect(),delete Ee[o]})}),t?(i&&i!==t&&Object.keys(Ee).forEach(o=>{Ee[o]&&(Ee[o].isConnected()&&Ee[o].disconnect(),Ee[o].connect())}),!Ee[e]&&n.user&&(Ee[e]=Gx(e),Ee[e].connect()),Ee[e]):null},Wx={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>'},Hx={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"/>'},Ux={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 qx(){const e=Bt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=qn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const Er=new Up,Vx=e=>!Oo(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,Kx=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},Yx=async(e,r)=>{try{return await Er.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},Jx=async(e,r)=>{const{type:n,did:t}=e;return wc.isSameAddr(n,"did")?await Yx(t,r)||Pn.getLink(e):Pn.getLink(e)},Xx=async(e,r,n=!0)=>{const t=Pn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Pn.Link){if(n){const o=await Jx(i,r),{type:a,chainId:s,did:l}=i;return wc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${s}" data-did="${l}">${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="${s}" data-did="${l}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},Qx=e=>qp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Zx={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Jt({user:e,color:r=void 0}){const{palette:n}=Bt(),t=Yn(Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Cc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Jt.displayName="UserLink";function eS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Bt(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=je(()=>{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=je(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ae(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Jt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Jt,{user:m[0],color:c})," and ",g.jsx(Jt,{user:y,color:c})]});const b=f.length>3,C=b?f.slice(0,2):m;return g.jsxs(g.Fragment,{children:[C.map((D,P)=>g.jsxs(Q.Fragment,{children:[g.jsx(Jt,{user:D,color:c}),P<C.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Jt,{user:y,color:c})]})]})}),p=ae(()=>{const m=a?Zx[a]:null;return m?m(l,r.length):null}),h=je(()=>{const m=d(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,l,f,d,p]),v=je(()=>{if(!e)return null;const m=Kx(e);return m?.targetLink?Re(i,m.targetLink):null},[e,i]);return!a||Oo(s)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Cc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const tS={normal:Na,success:Wx,info:Na,warning:Hx,error:Ux},rS=dr(Jp)`
43
+ */const $u=Object.freeze({left:0,top:0,width:16,height:16}),Mn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),nn=Object.freeze({...$u,...Mn}),lo=Object.freeze({...nn,body:"",hidden:!1}),dy=Object.freeze({width:null,height:null}),Wu=Object.freeze({...dy,...Mn});function fy(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 py=/[\s,]+/;function hy(e,r){r.split(py).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Hu={...Wu,preserveAspectRatio:""};function il(e){const r={...Hu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=fy(n("rotate","")),hy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function gy(e,r){for(const n in Hu)if(e[n]!==r[n])return!0;return!1}const zr=/^[a-z0-9]+(-[a-z0-9]+)*$/,on=(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 s=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:t,prefix:l,name:s};return r&&!Cn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Cn(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!Cn(s,n)?null:s}return null},Cn=(e,r)=>e?!!((e.provider===""||e.provider.match(zr))&&(r&&e.prefix===""||e.prefix.match(zr))&&e.name.match(zr)):!1;function vy(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 ol(e,r){const n=vy(e,r);for(const t in lo)t in Mn?t in e&&!(t in n)&&(n[t]=Mn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function my(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 s=t[a]&&t[a].parent,l=s&&o(s);l&&(i[a]=[s].concat(l))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function by(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=ol(t[s]||i[s],o)}return a(r),n.forEach(a),ol(e,o)}function Uu(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=my(e);for(const i in t){const o=t[i];o&&(r(i,by(e,i,o)),n.push(i))}return n}const yy={provider:"",aliases:{},not_found:{},...$u};function Oi(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function qu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Oi(e,yy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(zr)||typeof o.body!="string"||!Oi(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(zr)||typeof a!="string"||!n[a]&&!t[a]||!Oi(o,lo))return null}return r}const An=Object.create(null);function xy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function It(e,r){const n=An[e]||(An[e]=Object.create(null));return n[r]||(n[r]=xy(e,r))}function Jo(e,r){return qu(r)?Uu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Sy(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function wy(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(An)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(An[i]||{})).forEach(a=>{const s=It(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let Hr=!1;function Vu(e){return typeof e=="boolean"&&(Hr=e),Hr}function Ur(e){const r=typeof e=="string"?on(e,!0,Hr):e;if(r){const n=It(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Ku(e,r){const n=on(e,!0,Hr);if(!n)return!1;const t=It(n.provider,n.prefix);return Sy(t,n.name,r)}function al(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Hr&&!r&&!e.prefix){let i=!1;return qu(e)&&(e.prefix="",Uu(e,(o,a)=>{a&&Ku(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Cn({provider:r,prefix:n,name:"a"}))return!1;const t=It(r,n);return!!Jo(t,e)}function Cy(e){return!!Ur(e)}function Iy(e){const r=Ur(e);return r?{...nn,...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,s=i.name,l=n[o]||(n[o]=Object.create(null)),c=l[a]||(l[a]=It(o,a));let u;s in c.icons?u=r.loaded:a===""||c.missing.has(s)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:s};u.push(f)}),r}function Yu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Ty(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,s=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const c=l.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!==s&&(n||Yu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Dy=0;function _y(e,r,n){const t=Dy++,i=Yu.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 co=Object.create(null);function sl(e,r){co[e]=r}function uo(e){return co[e]||co[""]}function Py(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?on(i,r,n):i;o&&t.push(o)}),t}var ky={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Oy(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let w=e.resources.slice(0);for(a=[];w.length>1;){const _=Math.floor(Math.random()*w.length);a.push(w[_]),w=w.slice(0,_).concat(w.slice(_+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let l="pending",c=0,u,f=null,d=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function v(){l==="pending"&&(l="aborted"),h(),d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function m(w,_){_&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){l="failed",p.forEach(w=>{w(void 0,u)})}function C(){d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function D(w,_,S){const R=_!=="success";switch(d=d.filter(T=>T!==w),l){case"pending":break;case"failed":if(R||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){u=S,b();return}if(R){u=S,d.length||(a.length?P():b());return}if(h(),C(),!e.random){const T=e.resources.indexOf(w.resource);T!==-1&&T!==e.index&&(e.index=T)}l="completed",p.forEach(T=>{T(S)})}function P(){if(l!=="pending")return;h();const w=a.shift();if(w===void 0){if(d.length){f=setTimeout(()=>{h(),l==="pending"&&(C(),b())},e.timeout);return}b();return}const _={status:"pending",resource:w,callback:(S,R)=>{D(_,S,R)}};d.push(_),c++,f=setTimeout(P,e.rotate),n(w,r,_.callback)}return setTimeout(P),y}function Ju(e){const r={...ky,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=Oy(r,s,l,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(s){return n.find(l=>s(l))||null}return{query:i,find:o,setIndex:s=>{r.index=s},getIndex:()=>r.index,cleanup:t}}function Xo(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 ti=Object.create(null),wr=["https://api.simplesvg.com","https://api.unisvg.com"],In=[];for(;wr.length>0;)wr.length===1||Math.random()>.5?In.push(wr.shift()):In.push(wr.pop());ti[""]=Xo({resources:["https://api.iconify.design"].concat(In)});function ll(e,r){const n=Xo(r);return n===null?!1:(ti[e]=n,!0)}function ri(e){return ti[e]}function Ey(){return Object.keys(ti)}function cl(){}const Ei=Object.create(null);function Ny(e){if(!Ei[e]){const r=ri(e);if(!r)return;const n=Ju(r),t={config:r,redundancy:n};Ei[e]=t}return Ei[e]}function Xu(e,r,n){let t,i;if(typeof e=="string"){const o=uo(e);if(!o)return n(void 0,424),cl;i=o.send;const a=Ny(e);a&&(t=a.redundancy)}else{const o=Xo(e);if(o){t=Ju(o);const a=e.resources?e.resources[0]:"",s=uo(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),cl):t.query(r,i,n)().abort}const ul="iconify2",qr="iconify",Qu=qr+"-count",dl=qr+"-version",Zu=36e5,My=168;function fo(e,r){try{return e.getItem(r)}catch{}}function Qo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function fl(e,r){try{e.removeItem(r)}catch{}}function po(e,r){return Qo(e,Qu,r.toString())}function ho(e){return parseInt(fo(e,Qu))||0}const zt={local:!0,session:!0},ed={local:new Set,session:new Set};let Zo=!1;function Ay(e){Zo=e}let pn=typeof window>"u"?{}:window;function td(e){const r=e+"Storage";try{if(pn&&pn[r]&&typeof pn[r].length=="number")return pn[r]}catch{}zt[e]=!1}function rd(e,r){const n=td(e);if(!n)return;const t=fo(n,dl);if(t!==ul){if(t){const s=ho(n);for(let l=0;l<s;l++)fl(n,qr+l.toString())}Qo(n,dl,ul),po(n,0);return}const i=Math.floor(Date.now()/Zu)-My,o=s=>{const l=qr+s.toString(),c=fo(n,l);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,s))return!0}catch{}fl(n,l)}};let a=ho(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,po(n,a)):ed[e].add(s))}function nd(){if(!Zo){Ay(!0);for(const e in zt)rd(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=It(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 Ly(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in zt)rd(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function zy(e,r){Zo||nd();function n(t){let i;if(!zt[t]||!(i=td(t)))return;const o=ed[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=ho(i),!po(i,a+1))return;const s={cached:Math.floor(Date.now()/Zu),provider:e.provider,data:r};return Qo(i,qr+a.toString(),JSON.stringify(s))}r.lastModified&&!Ly(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function pl(){}function jy(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ty(e)}))}function Fy(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=uo(n)))return;o.prepare(n,t,i).forEach(s=>{Xu(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=Jo(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),zy(e,l)}catch(c){console.error(c)}jy(e)})})}))}const ea=(e,r)=>{const n=Py(e,!0,Vu()),t=Ry(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,pl)}),()=>{l=!1}}const i=Object.create(null),o=[];let a,s;return t.pending.forEach(l=>{const{provider:c,prefix:u}=l;if(u===s&&c===a)return;a=c,s=u,o.push(It(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(l=>{const{provider:c,prefix:u,name:f}=l,d=It(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&Fy(l,i[c][u])}),r?_y(r,t,o):pl},By=e=>new Promise((r,n)=>{const t=typeof e=="string"?on(e,!0):e;if(!t){n(e);return}ea([t||e],i=>{if(i.length&&t){const o=Ur(t);if(o){r({...nn,...o});return}}n(e)})});function Gy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function $y(e,r){const n=typeof e=="string"?on(e,!0,!0):null;if(!n){const o=Gy(e);return{value:e,data:o}}const t=Ur(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ea([n],()=>r(e,n,Ur(n)));return{value:e,name:n,loading:i}}function Ni(e){return e.hasAttribute("inline")}let id=!1;try{id=navigator.vendor.indexOf("Apple")===0}catch{}function Wy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(id||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const Hy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Uy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function go(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(Hy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Uy.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const qy=e=>e==="unset"||e==="undefined"||e==="none";function od(e,r){const n={...nn,...e},t={...Wu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,s=t.height,l=i.width,c=i.height;let u,f;a===null?(f=s===null?"1em":s==="auto"?c:s,u=go(f,l/c)):(u=a==="auto"?l:a,f=s===null?go(u,c/l):s==="auto"?c:s);const d={},p=(h,v)=>{qy(v)||(d[h]=v.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:d,body:o}}const Vy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ln=Vy();function Ky(e){Ln=e}function Yy(){return Ln}function Jy(e,r){const n=ri(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 Xy(e){return e===404}const Qy=(e,r,n)=>{const t=[],i=Jy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},s=0;return n.forEach((l,c)=>{s+=l.length+1,s>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},s=l.length),a.icons.push(l)}),t.push(a),t};function Zy(e){if(typeof e=="string"){const r=ri(e);if(r)return r.path}return"/"}const ex=(e,r,n)=>{if(!Ln){n("abort",424);return}let t=Zy(r.provider);switch(r.type){case"icons":{const o=r.prefix,s=r.icons.join(","),l=new URLSearchParams({icons:s});t+=o+".json?"+l.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;Ln(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Xy(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)})},tx={prepare:Qy,send:ex};function hl(e,r){switch(e){case"local":case"session":zt[e]=r;break;case"all":for(const n in zt)zt[n]=r;break}}const Mi="data-style";let ad="";function rx(e){ad=e}function gl(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Mi));n||(n=document.createElement("style"),n.setAttribute(Mi,Mi),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+ad}function sd(){sl("",tx),Vu(!0);let e;try{e=window}catch{}if(e){if(nd(),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"||!al(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;ll(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>hl(n,!0),disableCache:n=>hl(n,!1),iconExists:Cy,getIcon:Iy,listIcons:wy,addIcon:Ku,addCollection:al,calculateSize:go,buildIcon:od,loadIcons:ea,loadIcon:By,addAPIProvider:ll,appendCustomStyle:rx,_api:{getAPIConfig:ri,setAPIModule:sl,sendAPIQuery:Xu,setFetch:Ky,getFetch:Yy,listAPIProviders:Ey}}}function ld(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 nx(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ix(e){return"data:image/svg+xml,"+nx(e)}function ox(e){return'url("'+ix(e)+'")'}const vo={"background-color":"currentColor"},cd={"background-color":"transparent"},vl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ml={"-webkit-mask":vo,mask:vo,background:cd};for(const e in ml){const r=ml[e];for(const n in vl)r[e+"-"+n]=vl[n]}function bl(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function ax(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=ld(i,{...o,width:r.width+"",height:r.height+""}),s=ox(a),l=t.style,c={"--svg":s,width:bl(o.width),height:bl(o.height),...n?vo:cd};for(const u in c)l.setProperty(u,c[u]);return t}let jr;function sx(){try{jr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{jr=null}}function lx(e){return jr===void 0&&sx(),jr?jr.createHTML(e):e}function cx(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=ld(e.body,n);return r.innerHTML=lx(i),r.firstChild}function yl(e,r){const n=r.icon.data,t=r.customisations,i=od(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=cx(i);break;default:a=ax(i,{...nn,...n},o==="mask")}const s=Array.from(e.childNodes).find(l=>{const c=l.tagName&&l.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});s?a.tagName==="SPAN"&&s.tagName===a.tagName?s.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,s):e.appendChild(a)}function xl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function ux(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 s=this._shadowRoot=this.attachShadow({mode:"open"}),l=Ni(this);gl(s,l),this._state=xl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Ni(this),c=this._state;l!==c.inline&&(c.inline=l,gl(this._shadowRoot,l))}else this._queueCheck()}get icon(){const s=this.getAttribute("icon");if(s&&s.slice(0,1)==="{")try{return JSON.parse(s)}catch{}return s}set icon(s){typeof s=="object"&&(s=JSON.stringify(s)),this.setAttribute("icon",s)}get inline(){return Ni(this)}set inline(s){s?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const s=this._state;if(s.rendered){const l=this._shadowRoot;if(s.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}yl(l,s)}}get status(){const s=this._state;return s.rendered?"rendered":s.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const s=this._state,l=this.getAttribute("icon");if(l!==s.icon.value){this._iconChanged(l);return}if(!s.rendered)return;const c=this.getAttribute("mode"),u=il(this);(s.attrMode!==c||gy(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=$y(s,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});l.data?this._gotIconData(l):this._state=xl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,il(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=Wy(s.data.body,c),f=this._state.inline;yl(this._shadowRoot,this._state={rendered:!0,icon:s,inline:f,customisations:l,attrMode:c,renderedMode:u})}};i.forEach(s=>{s in o.prototype||Object.defineProperty(o.prototype,s,{get:function(){return this.getAttribute(s)},set:function(l){l!==null?this.setAttribute(s,l):this.removeAttribute(s)}})});const a=sd();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const dx=ux()||sd(),{enableCache:RT,disableCache:TT,iconExists:DT,getIcon:_T,listIcons:PT,addIcon:kT,addCollection:OT,calculateSize:ET,buildIcon:NT,loadIcons:MT,loadIcon:AT,addAPIProvider:LT,_api:zT}=dx,Wt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Wt(t[n],r,n)}):r(t)),ud=(e,r="children")=>{const n=[];return Wt(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)}),dd=e=>/^https?:\/\//.test(e),fd=e=>/^mailto:/i.test(e.trim()),fx=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=>fx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},px=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),l=Math.ceil(s/n),c=[[]];let u=0,f=0;const d=l*.2,p=h=>f>l-d&&u<n-1&&f+h>l+d;return e.forEach(h=>{const v=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&p(v)&&(u++,f=0,c[u]=[]),c[u].push({...h,group:!0}),f+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function rt({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),[s,l]=I.useState(!0);if(_o(async()=>{l(!0);try{await Po(e),a(!0)}catch{a(!1)}l(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),dd(e))return g.jsx(rr,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return s?g.jsx(xe,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(rr,{component:"span",...t,sx:i,children:g.jsx(xe,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(rr,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function ra(e=["en","zh"]){const{blocklet:r}=Gt();return I.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>Ge.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=Ge.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:Ge.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const hx=e=>e.from!=="team-tmpl";function gx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Tp(e.slice(0,t-1),r.slice(0,i-1)))}function hd({treeNode:e}){const{locale:r}=Le(),{blocklet:n}=Gt(),{defaultLocale:t}=ra(),i=n.environments.find(s=>s.key===Ge.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=ae(s=>{if(s?.startsWith("/"))try{return new URL(s,i?.value).href}catch{console.error("Failed to parse url",{url:s,origin:i?.value})}return s});function a(){const{title:s,subtitle:l}=e;let c=s,u=l;return Xt(s)&&(c=s[r]||s[t]||s.en),!I.isValidElement(l)&&Xt(l)&&(u=l[r]||l[t]||l.en),g.jsxs(oe,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:c}),l&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(ko(o(e.icon))?g.jsx(rt,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(xe,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}hd.propTypes={treeNode:x.object.isRequired};const vx=ct(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function gd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(vx,{children:g.jsx(Ph,{backend:kh,...i,children:g.jsx(om,{generateNodeProps:o=>{const a=hx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(xe,{icon:"ic:round-drag-indicator"}):g.jsx(oe,{sx:{width:16,height:16}}),title:g.jsx(hd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:gx,theme:uy})})})}gd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var mx=uc();const bx=Hn(mx);function vd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Le(),c=I.useRef(),[u,f]=I.useState(null),d=Ft({localeList:[],inputLocale:"",localeError:""}),p=I.useMemo(()=>!!u,[u]),h=I.useMemo(()=>o.includes(i)?i:t,[o,i]),v=I.useMemo(()=>d.localeList.filter(S=>!!a[S]),[d.localeList,a]),m=I.useMemo(()=>Object.keys(Mt(a,[...d.localeList,t])).map(S=>({title:a[S],value:S})),[d.localeList]),y=I.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=ae(S=>S?S===t||d.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),C=ae((S="")=>{const R=S?.trim(),T=b(R);return T!==!0?d.localeError=T:d.localeError="",T}),D=ae(()=>{f(null),d.inputLocale="",d.localeError=""}),P=ae(()=>{const S=d.inputLocale?.trim();C(S)===!0&&(D(),d.localeList.push(S),r(S))}),w=ae((S,R)=>{S.preventDefault(),S.stopPropagation(),d.localeList=zc(d.localeList,R),s(R)}),_=ae(S=>{const{value:R}=S.target;C(R),d.inputLocale=R});return I.useEffect(()=>{d.localeList=[...o]},[o,d]),Ih("enter",()=>{setTimeout(()=>{P()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs($h,{sx:e,value:h,onChange:(S,R)=>{n(R)},children:[g.jsx(Wa,{label:y,value:t}),v.map(S=>g.jsx(Wa,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(ze,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:R=>{w(R,S)},children:g.jsx(xe,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(ze,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{f(S.currentTarget)},children:g.jsx(xe,{icon:"mdi:plus"})})]}),g.jsx(qi,{open:p,anchorEl:u,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(oe,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(oe,{sx:{mt:1},children:g.jsx(Yi,{required:!0,fullWidth:!0,label:"Locale",value:d.inputLocale,options:m,onChange:_,error:!!d.localeError,helperText:d.localeError||" "})}),g.jsx(oe,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(wt,{size:"small",variant:"contained",onClick:P,children:l("common.confirm")})})]})})]})}vd.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const na=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function md(e,r,n=5e3){for(const t of na){const i=Re(t,e);try{return await Hh.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 yx({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 md("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const hn=new Map;async function xx(e){if(hn.has(e))return hn.get(e);const r=(async()=>{const{data:n}=await md("/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)})();hn.set(e,r);try{return await r}catch(n){throw hn.delete(e),n}}function Sx(e){return Re(na[0],`${e}.svg`)}function wx(e){try{const r=new URL(e);for(const n of na)if(r.origin===n)return Dp(r.pathname).replace(".svg","");return""}catch{return""}}function Cx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):ko(e)&&(n=wx(e))),{isIconId:r,iconId:n}}const Ix=I.lazy(()=>Op(()=>import("./index-C0fIFyuA.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}))),Sl=Xe(rt)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function bd({icon:e,...r}){const[n,t]=I.useState(!1);return _o(async()=>{t(!1),await Po(e),t(!0)},[e]),e?n?g.jsx(xe,{icon:e,...r}):g.jsx(xe,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(xe,{icon:"material-symbols-light:select-rounded",...r})}bd.propTypes={icon:x.string.isRequired};function mo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=pc(),{blocklet:u}=Gt(),f=qn(Z=>Z.breakpoints.down("md")),d=u.environments.find(Z=>Z.key===Ge.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=s(),h=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Le(),{isIconId:C,iconId:D}=Cx(e),[P,w]=I.useState(null),{onChange:_,onBlur:S,sx:R,...T}=a,O=i.includes("upload"),L=i.includes("select"),M=Re(l,"/api/media/upload",u.appPid),H=Ft({showPopover:!1}),E=ae(Z=>{if(Z?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(Z,q).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[d?.value,c]),B=ae(async Z=>await h.current.getUploader().uploadFile(Z)),G=ae(()=>{w(null)}),U=ae(()=>{L&&w(m.current)}),J=ae(async Z=>{try{if(o==="url"){const q=Sx(Z),re=await _p(q,{width:128,height:128}),ne=await Pp(re,Z);await B(ne)}else _?.(Z)}catch(q){console.error("Failed to pick icon:",q)}G()}),ee=ae(Z=>{Z.stopPropagation(),v.current.open(),G()}),X=ae(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(lt,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...R},onClick:L?U:void 0,...T,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Dn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(Sl,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Dn,{position:"end",children:[g.jsx(ze,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),_("")},children:g.jsx(Ac,{style:{fontSize:18}})}),O&&g.jsx(kp,{title:y("common.upload"),children:g.jsx(ze,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(bd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),L&&g.jsx(oe,{component:Wh,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),L&&g.jsx(qi,{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:G,children:g.jsx(yd,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(bo,{ref:h,locale:b,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(bo,{ref:v,locale:b,apiPath:M,headers:p,onUploadFinish:X}),g.jsx(qi,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(Sl,{size:120,icon:E(e),alt:"Error"})})]})}mo.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function yd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[s,l]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[p,h]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Le(),D=96,P=ae(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,R=(S-1)*D,T=S*D,O=m.current.slice(R,T);l(L=>[...L,...O]),y.current=S,b.current=T<m.current.length,u(!1)},300))}),w=ae(S=>{m.current=S,y.current=1,b.current=S.length>D;const R=S.slice(0,D);l(R),h(S.length===0),b.current&&P()}),{run:_}=hc(async S=>{if(S){u(!0);try{const{icons:R}=await yx({keyword:S});w(R)}catch(R){console.error("Failed to search icons:",R),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:T,scrollHeight:O,clientHeight:L}=v.current;(T+L>=O-150||O<=L)&&P()},R=v.current;return R&&(R.addEventListener("scroll",S),S()),()=>{R&&R.removeEventListener("scroll",S)}},[P,c]),_o(async()=>{if(f)_(f);else{u(!0);try{const S=await xx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[f,_,w]),g.jsxs(Rx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(lt,{label:C("navigation.form.searchIcons"),placeholder:C("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:S=>d(S.target.value),slotProps:{input:{endAdornment:g.jsx(ze,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx(Ac,{style:{fontSize:18}})})}}}),g.jsx(wt,{onClick:o,children:C("common.cancel")})]}),g.jsxs(oe,{children:[s.length>0&&g.jsx(oe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:s.map(S=>g.jsx(Tx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(xe,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(oe,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(gc,{size:20})})]})]})}yd.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Rx=Xe(oe)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),Tx=Xe(ze,{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 bo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return g.jsx(I.Suspense,{children:g.jsx(Ix,{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}})})}bo.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const wl=24,Cl=48,Il="add";x.string.isRequired;function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Mc(),{t:s,locale:l}=Le(),{localeMap:c,defaultLocale:u}=ra(),f=ae(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),d=ae(k=>zc(Array.from(new Set(ye.NAVIGATION_I18N_FIELDS.flatMap(N=>Xt(k[N])?Object.keys(k[N]):[]))),u)),p=I.useRef(()=>{}),h=Ft({isRoot:!0,type:Il,linkDisabled:!1,locale:u,formState:f(),get localeList(){return d(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=Bh({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{ye.NAVIGATION_I18N_FIELDS.forEach(k=>b(k,h.formState[k][h.locale]))},[b,h.locale]);const P=Gh({control:m}),w=P.component,_=P.title,S=P.description,R=P.link,T=P.parent;I.useEffect(()=>{h.formState.title[h.locale]=_},[_]),I.useEffect(()=>{h.formState.description[h.locale]=S},[S]),I.useEffect(()=>{h.formState.link[h.locale]=R},[R]),I.useEffect(()=>{i?.(P)},[P,i]);const O=I.useMemo(()=>t.find(N=>w?n.find(V=>V.name===w).did===N.id:N.id===T),[n,t,w,T]),L=I.useMemo(()=>{if(O?.component){const k=n.find(te=>te.name===O.component),{link:N}=k||{},j=Xt(N)?N[h.locale]:N;if(w)return Oa(j);const V=Xt(O.link)?O.link[h.locale]:O.link;return Oa(Re(j,V||"/"))}return null},[n,h.locale,O,w]),M=I.useMemo(()=>{const{component:k}=O||{},N=n.find(te=>te.name===k),{navigation:j=[]}=N||{};return Ne.flattenNavigation(j,{transform(te,se){return se?.section&&(te.section=te.section||se.section),te}}).filter(te=>te.link).filter(te=>Ne.isMatchSection(te.section,r)).map(te=>({label:te.link,title:te.title[l]||te.title}))},[O,n,r,l]),H=ae(()=>{h.isRoot=!0,h.locale=u,h.type=Il,h.linkDisabled=!1,h.formState=f(),y(),C(),p.current=()=>{}}),E=ae((k={})=>(h.localeList.length>0&&ye.NAVIGATION_I18N_FIELDS.forEach(N=>{og(h.formState[N]).length>1&&(k[N]=h.formState[N])}),Oo(k.role)&&(k.role=void 0),k)),B=ae(({parent:k}={},N=()=>{})=>{h.type="add",h.isRoot=!k,b("parent",k?.id),p.current=j=>{N(j)}}),G=ae((k={},N=()=>{})=>{const{id:j,icon:V,parent:te,component:se,role:fe=[]}=k;b("id",j),b("icon",V),k.from==="team-tmpl"&&(h.linkDisabled=!0);const ve=d(k),Ce=(Se,_e)=>{vc(Se)?h.formState[_e]=ve.reduce((Fe,Pe)=>(Fe[Pe]=Se,Fe),{[u]:Se}):Xt(Se)?h.formState[_e]=tt(Se):h.formState[_e]={}};ye.NAVIGATION_I18N_FIELDS.forEach(Se=>Ce(k[Se],Se)),ye.NAVIGATION_I18N_FIELDS.forEach(Se=>b(Se,h.formState[Se][h.locale])),b("component",se),b("parent",te),b("role",fe||[]),h.type="edit",h.isRoot=!te,p.current=Se=>{const _e=Ep(Se,["id","title","description","icon","component","link","role"]);N(_e)}}),U=ae(k=>{const N=k?.trim();if(r!=="bottomNavigation"){if(!N)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(N.length>wl)return s("navigation.form.titleTooLong",{len:wl})}return!0}),J=ae(k=>{const N=k?.trim();return N&&N.length>Cl?s("navigation.form.descriptionTooLong",{len:Cl}):!0}),ee=ae(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k),X=ae(async k=>{const N=k?.trim();if(N){if(ko(ee(N)))return!0;try{await Po(N)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=ae(k=>{const N=k?.trim();return N?X(N):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),q=ae(k=>{const N=k?.trim();return N?Ne.checkLink(N)?!0:s("navigation.form.invalidLink"):h.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),re=ae(k=>{h.locale=k,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]||(h.formState[N][k]="")}),setTimeout(()=>{C()})}),ne=ae(()=>{const{title:k,link:N}=h.formState;if(r!=="bottomNavigation")for(const j of Object.keys(k)){const V=U(k[j]);if(V!==!0)return V}for(const j of Object.keys(N)){const V=q(N[j]);if(V!==!0)return V}return!0}),ue=ae(k=>{const N=ne();N===!0?p.current(E(k)):Nt.error(N)}),$=ae(k=>{h.locale=u,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N]=Mt(h.formState[N],k)}),i?.(P)}),W=ae(k=>{h.locale=k,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]=h.formState[N][u]}),i?.(P),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:B,edit:G,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v(ue)}),[B,H,G,v,ue]),g.jsxs(oe,{...o,children:[g.jsx(vd,{sx:{mb:1},onAdd:W,onChange:re,onRemoveLocale:$,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(ft,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...k})}),r==="bottomNavigation"?g.jsx(ft,{name:"icon",control:m,rules:{validate:Z},render:({field:k})=>g.jsx(mo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...k})}):g.jsx(ft,{name:"icon",control:m,rules:{validate:X},render:({field:k})=>g.jsx(mo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,...k})}),h.isRoot&&g.jsx(ft,{name:"component",control:m,render:({field:k})=>g.jsx(Yi,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&k.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(N=>({title:N.title,value:N.name,description:N.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Mt(k,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(ft,{name:"description",control:m,rules:{validate:J},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...k})}),g.jsx(ft,{name:"link",control:m,rules:{validate:q},render:({field:k})=>g.jsx(mc,{fullWidth:!0,margin:"dense",children:g.jsx(Uh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:N=>N.label,options:M,renderInput:N=>g.jsx(lt,{...N,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:L?g.jsx(Dn,{position:"start",sx:{textDecoration:bx(R||"")?"line-through":""},children:L}):null}}}),renderOption:(N,j)=>g.jsxs(oe,{component:"li",...N,children:[j.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:j.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(N,j)=>{k.onChange(j)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(ft,{name:"role",control:m,render:({field:k})=>g.jsx(Yi,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:a.map(N=>({title:N.title,value:N.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Mt(k,"ref")})}),r==="bottomNavigation"&&g.jsx(ft,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...k})})]})]})}ia.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function oa({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Le(),[o,{setTrue:a,setFalse:s}]=jh(),[l,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[l];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,l]),d=I.useCallback(()=>{s(),u.current?.reset()},[s]),p=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),h=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),g.jsx(bc,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(_n,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(ia,{ref:u,section:r,components:n,rawNavigations:t})})}oa.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function xd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Le(),l=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const f=I.useCallback(v=>{u(v),r(o)},[r,o]),d=I.useCallback(v=>{u(v),n(o)},[n,o]),p=I.useCallback(v=>{u(v),t(o)},[t,o]),h=I.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:s(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(ze,{size:"small",color:"success",onClick:f,disabled:c,children:g.jsx(xe,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:s(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(ze,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:g.jsx(xe,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?s("navigation.action.noEdit"):o.visible?s("navigation.action.hide"):s("navigation.action.show"),children:g.jsx(ze,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(xe,{icon:"mdi:eye-off-outline"}):g.jsx(xe,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:s(l&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(ze,{disabled:l&&!c,size:"small",color:"error",onClick:h,children:g.jsx(xe,{icon:"mdi:delete"})})})]})}xd.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Rn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Dx=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},_x=(e,r="en",n="en")=>{if(typeof e=="string"){if(dd(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(fd(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},ir=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Wt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:yc(o.items?.length?o.link:_x(o.link,r,n),t),_rawLink:o.link}),"items")},Px=e=>Wt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),kx=e=>{if(!e?.length)return null;const r=Px(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},aa=e=>{if(!e)return null;const r={...e};return r.theme=Dx(r.theme),r.navigation=kx(Ox(r.navigation)),r},Ox=(e=[])=>ta(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),Sd=(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"),Ex={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"/>'},Nx={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 Mx({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),l=Bt(),c=I.useRef(null),u=Ft({open:!1}),f=ae((p=!u.open)=>{u.open=p}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return s.length===0||!e?.user?null:g.jsxs(oe,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[g.jsx(ze,{size:"medium",ref:c,children:g.jsx(xe,{icon:Ex,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(Np,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Mp,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),f(!1)},children:g.jsx(xc,{...p,timeout:350,children:g.jsxs(Nr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Ap,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:s.map(h=>g.jsx(Lp,{disablePadding:!0,children:g.jsxs(qh,{href:Ea(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(oe,{component:"img",src:`${Sc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(xe,{fontSize:50,icon:h.icon||Nx,color:l.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Ea(h.title,r)})]})},h.id))}),g.jsx(zp,{session:e,children:g.jsx(_n,{variant:"outlined",fullWidth:!0,href:jp,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const wd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),Cd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number}),Ax=["admin","owner"],Lx=e=>e.endsWith(".ip.abtnet.io"),zx=e=>e.endsWith(".did.abtnet.io"),jx={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:"配置域名"}},Fx=1e3*60*60*24*30,Rl=".well-known/service/admin/domains";function Id({locale:e="en",session:r={}}){const n=r?.user,t=Lc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>Fx}),a=ae((d,p={})=>Vn(jx,d,e,"en",p)),s=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),l=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=Re(window.location.origin,Rl);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Ax.includes(n.role);return window.location.href.includes(Rl)||t||!Lx(s)&&!zx(s)?null:g.jsxs(Fp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(Bp,{sx:{padding:"20px !important"},children:[g.jsx(me,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),g.jsx(me,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&g.jsx(oe,{component:"ul",children:l.map(d=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),g.jsxs(Gp,{sx:{px:"12px !important"},children:[g.jsx(wt,{onClick:c,children:a("skip")}),f&&g.jsx(wt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Id.propTypes={locale:x.string,session:x.object};const Ee={};function Bx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Re(r,Sc,e);return new Hp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function Gx(e="admin"){return Ee[e]||(Ee[e]=Bx(e)),Ee[e]}const $x=(e="admin")=>{const r=I.use(Kn),{session:n}=r??{},t=je(()=>n.user?.did,[n.user]),i=$p(t);return Wp(()=>{Object.keys(Ee).forEach(o=>{Ee[o]?.isConnected()&&Ee[o]?.disconnect(),delete Ee[o]})}),t?(i&&i!==t&&Object.keys(Ee).forEach(o=>{Ee[o]&&(Ee[o].isConnected()&&Ee[o].disconnect(),Ee[o].connect())}),!Ee[e]&&n.user&&(Ee[e]=Gx(e),Ee[e].connect()),Ee[e]):null},Wx={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>'},Hx={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"/>'},Ux={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 qx(){const e=Bt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=qn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const Er=new Up,Vx=e=>!Oo(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,Kx=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},Yx=async(e,r)=>{try{return await Er.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},Jx=async(e,r)=>{const{type:n,did:t}=e;return wc.isSameAddr(n,"did")?await Yx(t,r)||Pn.getLink(e):Pn.getLink(e)},Xx=async(e,r,n=!0)=>{const t=Pn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Pn.Link){if(n){const o=await Jx(i,r),{type:a,chainId:s,did:l}=i;return wc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${s}" data-did="${l}">${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="${s}" data-did="${l}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},Qx=e=>qp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Zx={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Jt({user:e,color:r=void 0}){const{palette:n}=Bt(),t=Yn(Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Cc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Jt.displayName="UserLink";function eS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Bt(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=je(()=>{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=je(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ae(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Jt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Jt,{user:m[0],color:c})," and ",g.jsx(Jt,{user:y,color:c})]});const b=f.length>3,C=b?f.slice(0,2):m;return g.jsxs(g.Fragment,{children:[C.map((D,P)=>g.jsxs(Q.Fragment,{children:[g.jsx(Jt,{user:D,color:c}),P<C.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Jt,{user:y,color:c})]})]})}),p=ae(()=>{const m=a?Zx[a]:null;return m?m(l,r.length):null}),h=je(()=>{const m=d(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,l,f,d,p]),v=je(()=>{if(!e)return null;const m=Kx(e);return m?.targetLink?Re(i,m.targetLink):null},[e,i]);return!a||Oo(s)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Cc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const tS={normal:Na,success:Wx,info:Na,warning:Hx,error:Ux},rS=dr(Jp)`
44
44
  font-size: 20px;
45
45
  `,nS=dr.div`
46
46
  display: flex;
@@ -1,4 +1,4 @@
1
- import{aF as U1,j as r,r as t,bo as O1,aQ as l6,M as $,H as R,a2 as u6,b as H1,a0 as b1,f8 as e1,f as k1,E as p6,cw as R1,ba as t1,iS as V1,V,aT as M1,hZ as T1,iT as C6,y as x,fe as d6,gg as h6,a4 as j1,bE as G,dq as N1,K as S,L as J,iU as J1,aW as m6,dH as f6,aO as k,bs as g6,z as N,O as Z1,gL as E6,f6 as A6,F as x6,dD as D6,T as b,$ as y6,D as w6,t as S6,v as l1,C as B6,iV as u1,w as I6,hn as F6,bB as L6,i0 as v6,a5 as U6,Y as n1,o as I,i as p1,x as O6,ax as H6,al as b6}from"./index-87RKuT5C.js";import{v as C1}from"./index-CS7M20xU.js";import{f as k6}from"./index-BojVbZw0.js";import{b as R6,c as V6,d as M6}from"./spaces-BJDcrjBg.js";import{u as a1}from"./blocklet-C0-c8dVN.js";import{D as T6}from"./DeleteOutline-P1tPKlQL.js";import{O as P1}from"./OpenInNew-C5gvRiqd.js";import{x as j6}from"./index-DRYJ0xIl.js";import{H as N6}from"./HelpOutline-DpBESAst.js";import"./api-D8LqcBu8.js";const J6=U1(r.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"})),He=U1(r.jsx("path",{d:"M6 6h12v12H6z"}));function Z6(){const[e,n]=t.useState(null),{blocklet:a}=a1();return t.useEffect(()=>{n(R6(a))},[a]),{storageEndpoint:e}}const Q1=t.createContext({}),{Provider:P6,Consumer:be}=Q1;function Q6({children:e}){const[n,a]=t.useState(!1),[s,o]=t.useState(null),{blocklet:i,actions:{refreshBlocklet:u}}=a1(),{storageEndpoint:c}=Z6(),{api:p}=O1();l6(async()=>{try{if(a(!0),$(c)){o(null);return}const d=await V6(c);o(d)}catch(d){console.error(d),R.error(d.message)}finally{a(!1)}},[c]);const l=()=>{o(null),u()},C=async d=>{o(d),await m(d.endpoint),u()},m=async d=>{await p.configBlocklet({input:{did:[i.meta.did],configs:[{key:H1.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:d}]}}),u()};t.useEffect(()=>{async function d(){if(!s)return;const E=await M6(s.endpoint,s.name),w=u6(s,{name:E});o(w)}d()},[]);const f=!!(c&&s);return r.jsx(P6,{value:{loading:n,spaceGateway:s,deleteSpaceGateway:l,updateSpaceGateway:C,storageEndpoint:c,settingStorageEndpoint:m,hasStorageEndpoint:f},children:e})}Q6.propTypes={children:b1.node.isRequired};function G6(){return t.useContext(Q1)}const Z=e1({});function X6({key:e}={key:"md"}){const n=k1();return p6(n.breakpoints.down(e))}var A=(e=>(e[e.NETWORK_ERROR=1001]="NETWORK_ERROR",e[e.UNAUTHORIZED=1002]="UNAUTHORIZED",e[e.EXPIRED=1003]="EXPIRED",e[e.PAST_DUE=1004]="PAST_DUE",e[e.INVALID=1005]="INVALID",e[e.UNIT_LIMIT=1006]="UNIT_LIMIT",e[e.CORS_BLOCKED=1007]="CORS_BLOCKED",e[e.INCOMPATIBLE=1008]="INCOMPATIBLE",e))(A||{}),G1=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(G1||{}),v=(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))(v||{});function z6({endpoint:e,deps:n=[]}){return R1(async()=>{if(!t1(e))return;const{headers:a}=await Z.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[s,o,i,u,c,p,l,C,m,f]=[a["x-space-name"],a["x-subscription-id"],a["x-listable"]==="true",a["x-readable"]==="true",a["x-writeable"]==="true",a["x-space-version"],a["x-space-owner-did"],a["x-space-is-available"],a["x-error-code"],a["x-is-site-admin"]],d=s?decodeURIComponent(s):"";if(C===void 0||m===void 0){const E=i&&u&&c;return{version:p,name:d,subscriptionId:o,ownerDid:l||"",isAvailable:E,errorCode:E?0:A.UNAUTHORIZED,isSiteAdmin:f==="true"}}return{version:p,name:d,subscriptionId:o,ownerDid:l,isAvailable:C==="true",errorCode:parseInt(m,10),isSiteAdmin:f==="true"}},{refreshDeps:[e].concat(n),onError(a){console.error(a)}})}const K6=V1.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
1
+ import{aF as U1,j as r,r as t,bo as O1,aQ as l6,M as $,H as R,a2 as u6,b as H1,a0 as b1,f8 as e1,f as k1,E as p6,cw as R1,ba as t1,iS as V1,V,aT as M1,hZ as T1,iT as C6,y as x,fe as d6,gg as h6,a4 as j1,bE as G,dq as N1,K as S,L as J,iU as J1,aW as m6,dH as f6,aO as k,bs as g6,z as N,O as Z1,gL as E6,f6 as A6,F as x6,dD as D6,T as b,$ as y6,D as w6,t as S6,v as l1,C as B6,iV as u1,w as I6,hn as F6,bB as L6,i0 as v6,a5 as U6,Y as n1,o as I,i as p1,x as O6,ax as H6,al as b6}from"./index-CyYCs6Na.js";import{v as C1}from"./index-Dgm3J-5y.js";import{f as k6}from"./index-BojVbZw0.js";import{b as R6,c as V6,d as M6}from"./spaces-z72qxe5O.js";import{u as a1}from"./blocklet-c-fcHcMv.js";import{D as T6}from"./DeleteOutline-CCoXF09b.js";import{O as P1}from"./OpenInNew-O9EysXQn.js";import{x as j6}from"./index-DRYJ0xIl.js";import{H as N6}from"./HelpOutline-VHuGbaF6.js";import"./api-CzO1JAlF.js";const J6=U1(r.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"})),He=U1(r.jsx("path",{d:"M6 6h12v12H6z"}));function Z6(){const[e,n]=t.useState(null),{blocklet:a}=a1();return t.useEffect(()=>{n(R6(a))},[a]),{storageEndpoint:e}}const Q1=t.createContext({}),{Provider:P6,Consumer:be}=Q1;function Q6({children:e}){const[n,a]=t.useState(!1),[s,o]=t.useState(null),{blocklet:i,actions:{refreshBlocklet:u}}=a1(),{storageEndpoint:c}=Z6(),{api:p}=O1();l6(async()=>{try{if(a(!0),$(c)){o(null);return}const d=await V6(c);o(d)}catch(d){console.error(d),R.error(d.message)}finally{a(!1)}},[c]);const l=()=>{o(null),u()},C=async d=>{o(d),await m(d.endpoint),u()},m=async d=>{await p.configBlocklet({input:{did:[i.meta.did],configs:[{key:H1.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:d}]}}),u()};t.useEffect(()=>{async function d(){if(!s)return;const E=await M6(s.endpoint,s.name),w=u6(s,{name:E});o(w)}d()},[]);const f=!!(c&&s);return r.jsx(P6,{value:{loading:n,spaceGateway:s,deleteSpaceGateway:l,updateSpaceGateway:C,storageEndpoint:c,settingStorageEndpoint:m,hasStorageEndpoint:f},children:e})}Q6.propTypes={children:b1.node.isRequired};function G6(){return t.useContext(Q1)}const Z=e1({});function X6({key:e}={key:"md"}){const n=k1();return p6(n.breakpoints.down(e))}var A=(e=>(e[e.NETWORK_ERROR=1001]="NETWORK_ERROR",e[e.UNAUTHORIZED=1002]="UNAUTHORIZED",e[e.EXPIRED=1003]="EXPIRED",e[e.PAST_DUE=1004]="PAST_DUE",e[e.INVALID=1005]="INVALID",e[e.UNIT_LIMIT=1006]="UNIT_LIMIT",e[e.CORS_BLOCKED=1007]="CORS_BLOCKED",e[e.INCOMPATIBLE=1008]="INCOMPATIBLE",e))(A||{}),G1=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(G1||{}),v=(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))(v||{});function z6({endpoint:e,deps:n=[]}){return R1(async()=>{if(!t1(e))return;const{headers:a}=await Z.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[s,o,i,u,c,p,l,C,m,f]=[a["x-space-name"],a["x-subscription-id"],a["x-listable"]==="true",a["x-readable"]==="true",a["x-writeable"]==="true",a["x-space-version"],a["x-space-owner-did"],a["x-space-is-available"],a["x-error-code"],a["x-is-site-admin"]],d=s?decodeURIComponent(s):"";if(C===void 0||m===void 0){const E=i&&u&&c;return{version:p,name:d,subscriptionId:o,ownerDid:l||"",isAvailable:E,errorCode:E?0:A.UNAUTHORIZED,isSiteAdmin:f==="true"}}return{version:p,name:d,subscriptionId:o,ownerDid:l,isAvailable:C==="true",errorCode:parseInt(m,10),isSiteAdmin:f==="true"}},{refreshDeps:[e].concat(n),onError(a){console.error(a)}})}const K6=V1.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}"}}}),Y6=V1.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-CCjtqj3s.js";import"./index-87RKuT5C.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
1
+ import{m as et}from"./index-qDXgq7vV.js";import"./index-CyYCs6Na.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1 +1 @@
1
- import{V as h,j as e,ad as j,K as o,X as g,T as _,t as b,o as n}from"./index-87RKuT5C.js";import{C as R}from"./click-to-copy-CGVo7y_H.js";function T({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=h(),i={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(g,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(R,{"data-cy":"click-copy",children:t})]}),e.jsx(_,{component:"div",children:e.jsx(b,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(j,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,params:i.params,onConfirm:i.onConfirm,onCancel:i.onCancel})}T.propTypes={title:n.any.isRequired,keyName:n.any.isRequired,description:n.any.isRequired,confirmPlaceholder:n.any.isRequired,cancel:n.string,confirm:n.string,params:n.object,onCancel:n.func,onConfirm:n.func.isRequired};export{T as D};
1
+ import{V as h,j as e,ad as j,K as o,X as g,T as _,t as b,o as n}from"./index-CyYCs6Na.js";import{C as R}from"./click-to-copy-CUoB1qVU.js";function T({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=h(),i={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(g,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(R,{"data-cy":"click-copy",children:t})]}),e.jsx(_,{component:"div",children:e.jsx(b,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(j,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,params:i.params,onConfirm:i.onConfirm,onCancel:i.onCancel})}T.propTypes={title:n.any.isRequired,keyName:n.any.isRequired,description:n.any.isRequired,confirmPlaceholder:n.any.isRequired,cancel:n.string,confirm:n.string,params:n.object,onCancel:n.func,onConfirm:n.func.isRequired};export{T as D};
@@ -1 +1 @@
1
- import{eJ as r}from"./index-87RKuT5C.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};
1
+ import{eJ as r}from"./index-CyYCs6Na.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};