@abtnode/webapp 1.16.47-beta-20250717-221700-2d886a18 → 1.16.47-beta-20250718-075003-940d2e2a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-CY5F-qOY.js → AdapterDayjs-BFw8WrXl.js} +1 -1
  4. package/dist/assets/{Add-C-JGR7WX.js → Add-3_OvaFrP.js} +1 -1
  5. package/dist/assets/ArrowDropDown-BS9tp8MS.js +1 -0
  6. package/dist/assets/{Autocomplete-BUKgT1H8.js → Autocomplete-8ICuj-KH.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-BHAIleTC.js → Breadcrumbs-BGvPLgGW.js} +1 -1
  8. package/dist/assets/{ButtonGroup-BpbIaw4r.js → ButtonGroup-C0aG4xOT.js} +1 -1
  9. package/dist/assets/{CSSTransition-CEGsXFa4.js → CSSTransition-KO9L5iBp.js} +1 -1
  10. package/dist/assets/{CallMerge-BG9sfWb7.js → CallMerge-F8oCB8nE.js} +1 -1
  11. package/dist/assets/{CardContent-Brh_eQ9r.js → CardContent-Cqmek5wY.js} +1 -1
  12. package/dist/assets/{ChevronLeft-mBfiaSS1.js → ChevronLeft-BPyHvtRf.js} +1 -1
  13. package/dist/assets/{ChevronRight-BhZK0m02.js → ChevronRight-BgqwQ3It.js} +1 -1
  14. package/dist/assets/{Clear-BgmnunuK.js → Clear-DMvY-1OH.js} +1 -1
  15. package/dist/assets/{DeleteOutline-CMvAWFzN.js → DeleteOutline-qcbzQjhi.js} +1 -1
  16. package/dist/assets/{Done-KBM5PYQe.js → Done-BowXQslF.js} +1 -1
  17. package/dist/assets/{Edit-qr4VAp95.js → Edit-BQ0nYDQE.js} +1 -1
  18. package/dist/assets/{ErrorOutline-DrbqnFJ2.js → ErrorOutline-DAMAJ1cH.js} +1 -1
  19. package/dist/assets/{FilterList-C5IPtX8B.js → FilterList-BZwgYvWc.js} +1 -1
  20. package/dist/assets/{Google-BISAgJ7z.js → Google-BbDWC590.js} +1 -1
  21. package/dist/assets/{HelpOutline-C5r6R3H8.js → HelpOutline-Dq1Jw2rR.js} +1 -1
  22. package/dist/assets/{Launch-DirijHL1.js → Launch-DXqdimna.js} +1 -1
  23. package/dist/assets/{Link-RiuSe0e2.js → Link-BRz6zIZp.js} +1 -1
  24. package/dist/assets/{ListItemButton-G0gHUcJH.js → ListItemButton-BQgIuXFI.js} +1 -1
  25. package/dist/assets/{ListSubheader-DA2-DVZb.js → ListSubheader-BOpeFxej.js} +1 -1
  26. package/dist/assets/{LoadingButton-zyVJPqWL.js → LoadingButton-BnL-MknW.js} +1 -1
  27. package/dist/assets/{MoreVert-_f7HjK7U.js → MoreVert-L8j8_EPz.js} +1 -1
  28. package/dist/assets/{OpenInNew-B8Hi9-Aa.js → OpenInNew-CNDlD7xM.js} +1 -1
  29. package/dist/assets/{Refresh-D5HBHck5.js → Refresh-DfIM0DIk.js} +1 -1
  30. package/dist/assets/{Search-BJ29HaSB.js → Search-DhxCIV3r.js} +1 -1
  31. package/dist/assets/{Slider-8UJs62jS.js → Slider-ClGXzRor.js} +1 -1
  32. package/dist/assets/{Stepper-DFkDVDUN.js → Stepper-JT4HRwKe.js} +1 -1
  33. package/dist/assets/{Switch-B-0geYaG.js → Switch-MO_QYoYi.js} +1 -1
  34. package/dist/assets/{TableSearch-B-T4xf1Y.js → TableSearch-DFzxfreZ.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-D0lgwkEn.js → ToggleButtonGroup-ByMjc-sd.js} +1 -1
  36. package/dist/assets/{Verified-D9QmxLSp.js → Verified-CsK6wp5l.js} +1 -1
  37. package/dist/assets/{VerifiedUser-W0URZfI1.js → VerifiedUser-CMhuvwNe.js} +1 -1
  38. package/dist/assets/{ViewList-CBW6lkQ9.js → ViewList-Duo-FkyC.js} +1 -1
  39. package/dist/assets/{_createAggregator-B7uAY9MP.js → _createAggregator-jhHxKsby.js} +1 -1
  40. package/dist/assets/{actions-J2QPqEIR.js → actions-CZaWtcNS.js} +1 -1
  41. package/dist/assets/{actions-Bqwe_eeJ.js → actions-qwmjFYBC.js} +1 -1
  42. package/dist/assets/{agreement-C3fURNDy.js → agreement-D5zRURFk.js} +1 -1
  43. package/dist/assets/api-BgPXZvcj.js +1 -0
  44. package/dist/assets/{appearance-BkUNpZVk.js → appearance-D0pksf5H.js} +1 -1
  45. package/dist/assets/{audit-logs-CgyzZo8L.js → audit-logs-CDjWOFeM.js} +1 -1
  46. package/dist/assets/{base-chart-CzIZI7kP.js → base-chart-CluI6A_u.js} +1 -1
  47. package/dist/assets/{blocklet-CxgGBUvX.js → blocklet-DmmVfj87.js} +1 -1
  48. package/dist/assets/{chain-C1BJFkRR.js → chain-DjRxb2FX.js} +1 -1
  49. package/dist/assets/{click-to-copy-BJD4pP2S.js → click-to-copy-C9lDYNLy.js} +1 -1
  50. package/dist/assets/client-DdpjvpuA.js +1 -0
  51. package/dist/assets/cloneDeep-BrIshN9W.js +1 -0
  52. package/dist/assets/{collapse-BChJU-xb.js → collapse-BQKIAHAH.js} +1 -1
  53. package/dist/assets/{config-navigation-ILBEBfla.js → config-navigation-CQIu6H-p.js} +3 -3
  54. package/dist/assets/{connect-to-D2f0TQaC.js → connect-to-DHpXpfiO.js} +1 -1
  55. package/dist/assets/{cssMode-Cq_mmr8j.js → cssMode-BBItj1D2.js} +1 -1
  56. package/dist/assets/{delete-confirm-CwBSbfmS.js → delete-confirm-BMlllWsg.js} +1 -1
  57. package/dist/assets/{depsEqual-DMHly6fz.js → depsEqual-CgwmaLj6.js} +1 -1
  58. package/dist/assets/{detail-DIUSlB-S.js → detail-C2QPTAoo.js} +3 -3
  59. package/dist/assets/{domains-DBt_qdYG.js → domains-Dl1bYLcB.js} +1 -1
  60. package/dist/assets/{download-BYyG4swb.js → download-BDQD3mNs.js} +1 -1
  61. package/dist/assets/emotion-cache.browser.esm-B0z8ZzTf.js +1 -0
  62. package/dist/assets/engine-DUBYjcGZ.js +1 -0
  63. package/dist/assets/{freemarker2-YNWsYPEX.js → freemarker2-CxtHcqRE.js} +1 -1
  64. package/dist/assets/{get-safe-url-D5Xp3EJt.js → get-safe-url-DjCQU-uR.js} +1 -1
  65. package/dist/assets/getValidReactChildren--K7J75d3.js +1 -0
  66. package/dist/assets/{graphqlMode-CkZj1Pkv.js → graphqlMode-CbjQQAvT.js} +2 -2
  67. package/dist/assets/{handlebars-CIYh89DK.js → handlebars-C66BpWqS.js} +1 -1
  68. package/dist/assets/{html-CzHkpzUZ.js → html-CcZE7wWD.js} +1 -1
  69. package/dist/assets/{htmlMode-BdxWzg-L.js → htmlMode-Co-CiFip.js} +1 -1
  70. package/dist/assets/{iframe-CKLYV5eL.js → iframe-CDG05FDN.js} +1 -1
  71. package/dist/assets/{index-C6eCVPuA.js → index-2lVCCQPq.js} +1 -1
  72. package/dist/assets/{index-DkQMdkDJ.js → index-7JYHSDyg.js} +1 -1
  73. package/dist/assets/{index-CrTw1v2G.js → index-Aeyu2TZE.js} +1 -1
  74. package/dist/assets/{index-BhwBVrhP.js → index-B78o0tBY.js} +1 -1
  75. package/dist/assets/{index-ukCxqYQ3.js → index-B9sYADXK.js} +3 -3
  76. package/dist/assets/{index-BTwjaad9.js → index-BDbOUXLI.js} +1 -1
  77. package/dist/assets/{index-D18QOAa2.js → index-BKWGpyEb.js} +1 -1
  78. package/dist/assets/{index-Cwf3bf57.js → index-BMSZcMWl.js} +1 -1
  79. package/dist/assets/{index-D1w_phcb.js → index-BMW6t5La.js} +3 -3
  80. package/dist/assets/{index-CViKQyIh.js → index-B_5pYJ4-.js} +1 -1
  81. package/dist/assets/{index-DNG5izj4.js → index-Bdl1ybk6.js} +1 -1
  82. package/dist/assets/{index-luUossMM.js → index-BeHzPQZj.js} +1 -1
  83. package/dist/assets/{index-CvywAZEv.js → index-Bf6iPAUC.js} +1 -1
  84. package/dist/assets/{index-C_L0YUuS.js → index-Bh_lBdo5.js} +1 -1
  85. package/dist/assets/{index-CMJ6xnSL.js → index-BnfGPxgW.js} +3 -3
  86. package/dist/assets/{index-DP68LpSl.js → index-By2wVIz8.js} +1 -1
  87. package/dist/assets/{index-ipzNz7Ju.js → index-C3kcppBt.js} +3 -3
  88. package/dist/assets/{index-_8oRZcHP.js → index-C4mOfCm_.js} +104 -105
  89. package/dist/assets/{index-D2I55BMO.js → index-C8N7W-i9.js} +1 -1
  90. package/dist/assets/{index-D2GtEPw5.js → index-CHuu0Peu.js} +1 -1
  91. package/dist/assets/{index-CJwX-OYV.js → index-COm9hgx_.js} +1 -1
  92. package/dist/assets/{index-Cul8PQ9A.js → index-COoCcBTs.js} +1 -1
  93. package/dist/assets/{index-BCocEWMy.js → index-CWitGXiK.js} +1 -1
  94. package/dist/assets/{index-C3hJRnJE.js → index-CgrNfQPb.js} +1 -1
  95. package/dist/assets/{index-C_Wb23_l.js → index-Ci4hOeJE.js} +9 -9
  96. package/dist/assets/{index-DUinRQw4.js → index-CrmgQXdO.js} +1 -1
  97. package/dist/assets/{index-DJ3LOVXA.js → index-DMDr-aHX.js} +1 -1
  98. package/dist/assets/{index-B8TH6W7H.js → index-DOUb8Oty.js} +1 -1
  99. package/dist/assets/{index-BkktSh-D.js → index-D_0TT77X.js} +1 -1
  100. package/dist/assets/{index-Bnzx_d6J.js → index-DcEAUxTy.js} +1 -1
  101. package/dist/assets/{index-BoCWZ9Ig.js → index-DiXzeHiX.js} +1 -1
  102. package/dist/assets/{index-CI3XNytL.js → index-DkZ-t39O.js} +1 -1
  103. package/dist/assets/{index-CSdvRvdf.js → index-Dl5cdLQr.js} +1 -1
  104. package/dist/assets/{index-DWevfoMr.js → index-Dn78lnTO.js} +1 -1
  105. package/dist/assets/{index-CNNYI2ZJ.js → index-Dogk0bXr.js} +1 -1
  106. package/dist/assets/{index-FGF_OyEg.js → index-DqEym-za.js} +1 -1
  107. package/dist/assets/{index-DRXB64XT.js → index-DwRrLRJc.js} +1 -1
  108. package/dist/assets/{index-WCnj110a.js → index-EO2zxFAb.js} +1 -1
  109. package/dist/assets/{index-aDhSn6Mb.js → index-IN1tBuCi.js} +2 -2
  110. package/dist/assets/index-P46fTVgx.js +1 -0
  111. package/dist/assets/{index-gcsLojkd.js → index-PpgfbTC9.js} +1 -1
  112. package/dist/assets/{index-CF-9tLrO.js → index-TN8GUnjq.js} +1 -1
  113. package/dist/assets/{index-10qlFG48.js → index-Zbp1kEfl.js} +1 -1
  114. package/dist/assets/{index-DyuzoqrM.js → index-aHwqwLCS.js} +1 -1
  115. package/dist/assets/{index-DSEgIocn.js → index-aTfhQ_l6.js} +1 -1
  116. package/dist/assets/{index-hcJKr5Kv.js → index-quoltoEL.js} +1 -1
  117. package/dist/assets/{index-UlSeBo7J.js → index-wt9OBpRJ.js} +1 -1
  118. package/dist/assets/{index.esm-BbCeLnEG.js → index.esm-DNwQmbRZ.js} +1 -1
  119. package/dist/assets/{install-from-url-Cssyl_EF.js → install-from-url-n_csAYU3.js} +1 -1
  120. package/dist/assets/{invitation-BbzPu4Vz.js → invitation-CJpjGArf.js} +1 -1
  121. package/dist/assets/{is-path-prefix-equal-xOcqHaZi.js → is-path-prefix-equal-H7FSCLy3.js} +1 -1
  122. package/dist/assets/{item-CA0AhoeU.js → item-DB4nd60x.js} +1 -1
  123. package/dist/assets/{javascript-iz35kkfv.js → javascript-CRAJjnJB.js} +1 -1
  124. package/dist/assets/{jsonMode-DTMWRjiz.js → jsonMode-JVhrkI3w.js} +1 -1
  125. package/dist/assets/{liquid-D_2oxmDK.js → liquid-pnBuAzEz.js} +1 -1
  126. package/dist/assets/{list-header-rZDwQy84.js → list-header-BFKavQgG.js} +1 -1
  127. package/dist/assets/{log-UVsl0ja-.js → log-C7JSHIt2.js} +1 -1
  128. package/dist/assets/{lottie-react.esm-D-ZQShTC.js → lottie-react.esm-D1pS2-gK.js} +1 -1
  129. package/dist/assets/{mdx-9l6bUhTM.js → mdx-DHtsrRy5.js} +1 -1
  130. package/dist/assets/{memory-Bs7i-RSl.js → memory-oRFPonQg.js} +1 -1
  131. package/dist/assets/{metric-Bhfho-F8.js → metric-nsIZMw3V.js} +1 -1
  132. package/dist/assets/omit-B4Sq5gLR.js +1 -0
  133. package/dist/assets/{overview-Dpbkcjeq.js → overview-BP2YMbQO.js} +1 -1
  134. package/dist/assets/{permission-CjJ84P8d.js → permission-CAwWHgKo.js} +1 -1
  135. package/dist/assets/{preference-J3dyippO.js → preference-D2ak1a33.js} +3 -3
  136. package/dist/assets/{python-D62k2JIN.js → python-DXO2W9B9.js} +1 -1
  137. package/dist/assets/{raf-schd.esm-C1oPRTDZ.js → raf-schd.esm-ClEAlDQA.js} +1 -1
  138. package/dist/assets/{razor-B8qk-YVu.js → razor-CKVf_K1K.js} +1 -1
  139. package/dist/assets/{rotate-session-key-D91iBAY4.js → rotate-session-key-IpOZAFU_.js} +1 -1
  140. package/dist/assets/{runtime-tnq2Lk6e.js → runtime-K5Ixf2xG.js} +1 -1
  141. package/dist/assets/schema-Bp4DleAG.js +1 -0
  142. package/dist/assets/sdk-Bvs7QtVW.js +1 -0
  143. package/dist/assets/{service-WuUIzS1n.js → service-De8RUcAB.js} +1 -1
  144. package/dist/assets/{shorten-label-Daz_9q6V.js → shorten-label-BB7eBTVn.js} +1 -1
  145. package/dist/assets/{simple-select-DWPU6K2J.js → simple-select-DuFdntI_.js} +1 -1
  146. package/dist/assets/{spaces-GphSy-vT.js → spaces-DboV6EBE.js} +1 -1
  147. package/dist/assets/{status-8_e4qfZ_.js → status-D0iiky_Q.js} +1 -1
  148. package/dist/assets/{status-RQRQdpaf.js → status-YKpSQSD8.js} +1 -1
  149. package/dist/assets/{switch-control-CKSbA6D9.js → switch-control-BvELbAm3.js} +1 -1
  150. package/dist/assets/{table-icons-oE5i83sx.js → table-icons-BJW-SCQe.js} +1 -1
  151. package/dist/assets/{team-CSpa5Bju.js → team-D7M0Ye34.js} +1 -1
  152. package/dist/assets/{toLower-CN0NnjsS.js → toLower-aE-9IHcm.js} +1 -1
  153. package/dist/assets/toUpper-Bb2HGHT9.js +1 -0
  154. package/dist/assets/{traffic-C_abMGz2.js → traffic-BA1sKvQV.js} +1 -1
  155. package/dist/assets/{tsMode-DPBq0xUc.js → tsMode-cBsNNznm.js} +1 -1
  156. package/dist/assets/{typescript-EAZJ11vd.js → typescript-D0SX8RzB.js} +1 -1
  157. package/dist/assets/{url-evaluation-C9ybfEbS.js → url-evaluation-CNPtf5Sl.js} +1 -1
  158. package/dist/assets/{url-join-B-Ittgpb.js → url-join-BBoInSaA.js} +1 -1
  159. package/dist/assets/{use-mobile-CaA0LsNn.js → use-mobile-B1UpSPIX.js} +1 -1
  160. package/dist/assets/{use-mobile-CFs8fmsh.js → use-mobile-Cebu3wjw.js} +1 -1
  161. package/dist/assets/{useAsync-BKfoGger.js → useAsync-CBexZUTy.js} +1 -1
  162. package/dist/assets/{useAsyncRetry-NHLe7YO4.js → useAsyncRetry-CKBioJX5.js} +1 -1
  163. package/dist/assets/{useLocalStorage-BEs66pts.js → useLocalStorage-BTzsh1Lj.js} +1 -1
  164. package/dist/assets/{useThemeProps-DXk_HLKM.js → useThemeProps-d3GR3gue.js} +1 -1
  165. package/dist/assets/{util-Cbf8gAh_.js → util-DXUxNwaT.js} +1 -1
  166. package/dist/assets/{wait-container-C4klN3Th.js → wait-container-2gTMdAkJ.js} +1 -1
  167. package/dist/assets/{without-wallet-DaUHusY5.js → without-wallet-CIoRe4lL.js} +1 -1
  168. package/dist/assets/{wrap-locale-5NaChz5C.js → wrap-locale-3LS80w24.js} +1 -1
  169. package/dist/assets/{xml-ZkmPNLNd.js → xml-BUC5O1uY.js} +1 -1
  170. package/dist/assets/{yaml-CuZzQDBi.js → yaml-DiA-8wK9.js} +1 -1
  171. package/dist/index.html +1 -1
  172. package/dist/service-worker.js +1 -1
  173. package/package.json +1 -1
  174. package/dist/assets/ArrowDropDown-CFSWcN3J.js +0 -1
  175. package/dist/assets/api-Dksjqhj9.js +0 -1
  176. package/dist/assets/client-D1yTa59W.js +0 -1
  177. package/dist/assets/cloneDeep-DymekVbc.js +0 -1
  178. package/dist/assets/emotion-cache.browser.esm-2hka6KsY.js +0 -1
  179. package/dist/assets/engine-IPaOGJ95.js +0 -1
  180. package/dist/assets/getValidReactChildren-Cq-L2XG5.js +0 -1
  181. package/dist/assets/index-ZXKsu0i-.js +0 -1
  182. package/dist/assets/omit-DOuoJ5G3.js +0 -1
  183. package/dist/assets/schema-C2mGuU4x.js +0 -1
  184. package/dist/assets/sdk-fTtyOYPc.js +0 -1
  185. package/dist/assets/toUpper-Dul2guy6.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-D1w_phcb.js","./index-_8oRZcHP.js","./index-DGkT7afN.css","./url-join-B-Ittgpb.js","./index-CJwX-OYV.js","./_createAggregator-B7uAY9MP.js","./depsEqual-DMHly6fz.js","./index-hcJKr5Kv.js","./index-DRYJ0xIl.js","./toUpper-Dul2guy6.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
- import{hw as Nf,hx as Mf,gn as Af,dp as Lf,hy as zf,dq as jf,bL as Zs,bM as Ff,bJ as Bf,bK as Gf,bO as ec,dt as An,hz as $f,ez as Wf,hi as Hf,gB as Uf,gy as tc,hA as qf,gr as Vf,fp as Kf,eA as Yf,h4 as Jf,m as Oe,a3 as Ge,y as Ue,E as Ie,aP as or,r as I,j as v,c2 as Dt,J as Qf,fa as Xf,eK as Zf,ho as eh,ds as Sr,ev as fr,dd as rc,dx as th,hB as rh,dw as nc,bd as Ln,dK as Xt,hC as B,eW as K,eD as nh,hD as Hr,be as Z,o as S,dI as zn,aO as ih,aQ as wo,hE as Co,cw as ni,aE as ye,b8 as mt,N as ie,ag as oh,b as kt,cr as ge,b9 as Io,dy as Yt,T as Re,a4 as ke,b1 as Fi,dE as Zt,hF as ah,bn as ic,F as jn,hG as lh,hH as sh,t as Ht,fm as Bi,az as ch,dc as qe,fc as oc,C as uh,bE as dh,hI as Ra,O as Ro,f9 as fh,H as xr,Q as ac,f2 as lc,$ as hh,v as sc,f as Et,dH as ph,bu as gh,gD as cc,dF as Dr,a7 as vh,a8 as mh,hJ as Da,hK as uc,hL as bh,hM as yh,g4 as Fn,hN as Sh,gK as xh,hO as wn,hP as dc,by as Me,L as fc,z as Do,hQ as Ta,hR as hc,hS as Gi,hT as wh,hU as Ch,s as ar,hV as Ih,f1 as Rh,cv as pc,bB as Dh,hW as Th,fJ as gc,fd as Ph,gH as _h,gF as kh,hX as Oh,hY as Eh,hZ as Nh,h_ as Mh,h$ as vc,i0 as Ah,aC as mc,eY as bc,i1 as To,i2 as Lh,he as yc,b_ as ot,i3 as zh,b5 as jh,cA as Ut,i4 as Fh,cP as Bh,i5 as Gh,G as Pa,dk as ii,eE as _a,dJ as $h,i6 as Wh,a5 as Sc,Y as ka,dD as Ze,i7 as Oa,R as Hh,S as Ea,U as Na}from"./index-_8oRZcHP.js";import{r as Uh}from"./omit-DOuoJ5G3.js";import{r as qh}from"./cloneDeep-DymekVbc.js";import{r as Vh}from"./index-CJwX-OYV.js";import{c as Kh,u as Yh}from"./_createAggregator-B7uAY9MP.js";import{u as Nt}from"./blocklet-CxgGBUvX.js";import{H as Jh,G as Qh,M as Xh,N as Zh,O as Ma,K as ep,L as tp}from"./index-CF-9tLrO.js";import{_ as Se,a as xe,b as je,c as Fe,d as Be,e as rp,f as xc,u as ce,g as ne,r as Mr,w as Cn,h as wc,i as Mt,j as Cc,k as np,l as ip,o as $i}from"./raf-schd.esm-C1oPRTDZ.js";import{_ as M,b as Aa,c as op,a as ap,d as lp}from"./redux-DfszZyTl.js";import{_ as sp}from"./typeof-QjJsDpFa.js";import{u as Ic,b as cp}from"./team-CSpa5Bju.js";import{b as up}from"./actions-J2QPqEIR.js";import{u as dp,a as fp,C as rt}from"./index.esm-BbCeLnEG.js";import{S as Wi}from"./simple-select-DWPU6K2J.js";import{b as hp,a as La}from"./index-CI3XNytL.js";import{C as Rc}from"./Clear-BgmnunuK.js";import{A as pp}from"./ArrowDropDown-CFSWcN3J.js";import{a as gp}from"./api-Dksjqhj9.js";import{A as vp}from"./Autocomplete-BUKgT1H8.js";import{L as mp}from"./ListItemButton-G0gHUcJH.js";import{e as bp}from"./client-D1yTa59W.js";import{u as Dc}from"./use-mobile-CFs8fmsh.js";import{I as yp}from"./iframe-CKLYV5eL.js";import{B as oi}from"./ButtonGroup-BpbIaw4r.js";import{L as za}from"./LoadingButton-zyVJPqWL.js";import"./depsEqual-DMHly6fz.js";import"./url-evaluation-C9ybfEbS.js";import"./useLocalStorage-BEs66pts.js";import"./MoreVert-_f7HjK7U.js";import"./get-safe-url-D5Xp3EJt.js";import"./permission-CjJ84P8d.js";import"./ListSubheader-DA2-DVZb.js";import"./getValidReactChildren-Cq-L2XG5.js";var Sp=Nf(function(){return Mf?sessionStorage:void 0});function xp(e,r){return Af(r,function(n){return e[n]})}function wp(e){return e==null?[]:xp(e,Lf(e))}var Cp=zf.isFinite;function Ip(e){return typeof e=="number"&&Cp(e)}function Rp(e){return typeof e=="number"&&e==jf(e)}var Dp=Kh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const Tp=Object.freeze(Object.defineProperty({__proto__:null,default:Dp},Symbol.toStringTag,{value:"Module"}));var Pp=Zs(function(e){var r=Ff(e);return r=typeof r=="function"?r:void 0,Bf(Gf(e,1,ec,!0),void 0,r)});const _p=Object.freeze(Object.defineProperty({__proto__:null,default:Pp},Symbol.toStringTag,{value:"Module"}));var Tc=Zs(function(e,r){return ec(e)?up(e,r):[]}),hr={};const kp=An(_p),Op=An($f),Ep=An(Tp);var ja;function Np(){return ja||(ja=1,function(e){var r=hr&&hr.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=re,e.deepWalk=k,e.isMatchSection=x,e.nestNavigationList=Q,e.filterNavigation=te,e.cleanOrphanNavigation=X,e.joinLink=E,e.flattenNavigation=j,e.splitNavigationBySection=V;const n=Wf(),t=r(kp),i=r(Hf),o=r(Uf),a=r(Op),l=r(Uh),s=r(qh),c=Jf(),u=r(Vh()),f=r(tc()),d=r(qf),h=r(Vf),p=r(Ep),g=Kf(),m=Yf();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return m.checkLink}});const y="header",b="/",w="/",P="/";function k(F,H=()=>{},{key:_="children",order:O="first"}={}){function A($,{index:J=0,parent:oe=null,level:de=0}={}){Array.isArray($)?$.forEach((se,me)=>{A(se,{index:me,parent:oe,level:de+1})}):$&&(O==="first"&&H($,oe,{index:J,level:de}),A($[_],{parent:$,level:de}),O==="last"&&H($,oe,{index:J,level:de}))}A(F)}function x(F,H){return H===y&&(0,a.default)(F)?!0:Array.isArray(F)?F.includes(H):F===H}function D(F){try{return JSON.parse(F)}catch{return F}}function C(F){return F.map(H=>{const _={...H};return _.role&&(_.role=D(_.role)),_.section&&(_.section=D(_.section)),_.title&&(_.title=D(_.title)),_.description&&(_.description=D(_.description)),_.link&&(_.link=D(_.link)),_})}function T(F="/",H=""){if((0,f.default)(H||""))return H;const _=u.default.join(F,H||w);return _.length>1&&_.endsWith("/")?_.slice(0,_.length-1):_}function R(F,H,{strict:_=!0}={}){let O=F,A=H;return _||(O=O||"/",A=A||"/"),(0,d.default)(O)&&(0,h.default)(A)&&(0,m.checkLink)(A)?Object.keys(O).reduce(($,J)=>($[J]=T(O[J],A),$),{}):(0,h.default)(O)&&(0,m.checkLink)(O)&&(0,d.default)(A)?Object.keys(A).reduce(($,J)=>($[J]=T(O,A[J]),$),{}):(0,h.default)(O)&&(0,h.default)(A)?(0,m.checkLink)(O)||(0,m.checkLink)(A)?T(O,A):A:(0,d.default)(O)&&(0,d.default)(A)?[...new Set([...Object.keys(O),...Object.keys(A)])].reduce((J,oe)=>(J[oe]=T(O[oe],A[oe]),J),{}):A}function E(F,H){const _=(0,s.default)(F);return k(_,(O,A)=>{const $=O.component||O.child;if($){const J=H.find(oe=>oe.name===$);J&&(O.link=R(J.link,O.link,{strict:!1}))}else A&&(O.link=R(A.link,O.link))},{key:"items"}),_}function j(F=[],{depth:H=1,transform:_=O=>O}={}){const O=(0,s.default)(F),A=[];return k(O,($,J,{level:oe})=>{if(oe>=H){const{items:de=[]}=$;if(de&&Array.isArray(de)&&de.length>0){delete $.items;const se=de.map(me=>_(me,$));if(J)J.items.push(...se);else{const me=_((0,l.default)($,["items"]),J);A.push(me,...se)}}else if(oe===1){const se=_((0,l.default)($,["items"]),J);A.push(se)}}else oe===1&&A.push($)},{key:"items",order:"last"}),A}function N(F){if(F.section!=="bottomNavigation")return F;const H={...F};return n.NAVIGATION_I18N_FIELDS.forEach(_=>{const O=H[_];typeof O=="string"&&(H[_]={en:O})}),H}function U(F={}){const H=[];function _(A,$={}){const J=[],{children:oe=[],meta:de={}}=A,se=(0,s.default)(de?.navigation||[]);(0,g.hasStartEngine)(de)&&A.meta?.capabilities?.navigation!==!1&&J.push(...se);const me=$.name||"",ve=$.mountPoint||b,ue=A===F?"":de.name||"",be=A===F?"":A.mountPoint||b;for(const fe of oe){if(!(0,g.hasStartEngine)(fe.meta))continue;const Ve=fe.meta.name,ei=fe.mountPoint,ti=[me,ue,Ve].filter(Boolean).join("."),ri=fe.meta.navigation||[],Ef=(0,c.joinURL)(ve,be,ei);fe.meta?.capabilities?.navigation!==!1&&H.push({did:fe.meta.did,name:ti,link:Ef,title:fe.meta.title||"",navigation:ri.map(Je=>({section:y,...Je}))});const Lt=se.find(Je=>Je.component?Je.component===Ve:!1);if(Lt){if(!Lt.link)if(fe.meta.navigation&&fe.meta.navigation.length>0){const Je=_(fe,{mountPoint:be,name:ue});Je.length>0&&(Lt.items=Lt.items??[],Lt.items.push(...Je))}else Lt.link=w}else if(fe.meta?.capabilities?.navigation!==!1){const Je=_(fe,{mountPoint:be,name:ue}),en={title:fe.meta.title,component:Ve,id:fe.meta.did};Je.length>0?(en.items=Je,en.link=void 0):en.link=w,J.push(en)}}return J}return{navigationList:_(F),components:H}}function z(F){const H=(0,s.default)(F).filter(_=>_.id);return k(H,(_,O)=>{if(_.items&&_.items.length){for(let A=_.items.length-1;A>=0;A--)_.items[A].id||_.items.splice(A,1);_.items.length===0&&_.component&&(_.link=_.link||w)}O&&(_.parent=O.id,_.id=[O.id,_.id].join(P)),_.from=_.from||"yaml",_.visible=_.visible??!0},{key:"items"}),H}function G(F,H=2){const _=(0,s.default)(F),O=j(_,{depth:H,transform:(A,$)=>($&&(A._parent||(A._parent=$.id,$.component||(A.link=R($.link,A.link))),A.section=A.section||$.section||[y],A.visible=A.visible??$.visible,$.role&&(A.role=A.role||$.role)),A.component=[$.component,A.component].filter(Boolean).join("."),A)});return k(O,A=>{A.items&&A.items.length>0&&A.items.reduceRight(($,J)=>{if(J._parent){const oe=A.items.findIndex(de=>de.id===J._parent);oe>=0&&A.items.splice(oe,1),delete J._parent}return null},null)},{key:"items"}),O}function W(F,H){return H&&Array.isArray(F.items)?F.items.filter(_=>(0,a.default)(_.section)?x(F.section,H):!!x(_.section,H)).map(_=>({..._,section:H})):[]}function V(F){const H=(0,s.default)(F),_=[];for(const O of H){let J=function(oe,de){const se=W(oe,de);$.push({...A,section:de,items:se})};const A=(0,s.default)((0,l.default)(O,["items"])),$=[];if(Array.isArray(O.section))for(const oe of O.section)J(O,oe);else if(O.section){const{section:oe}=O;J(O,oe)}else if(O.items&&O.items.length>0){const oe=O.items.reduce((se,me)=>{const{section:ve=[y]}=me||{};return se.push(...ve),se},[]),de=[...new Set(oe)];for(const se of de)J(O,se)}else $.push({...O,section:y});_.push(...$)}return _}function Q(F=[]){const H=(0,s.default)(F);return H.reduceRight((_,O,A)=>{if(O.parent){const $=H.find(J=>O.section&&J.section?J.section===O.section&&J.id===O.parent:J.id===O.parent);$&&($.items||($.items=[]),$.items=[O,...$.items]),H.splice(A,1)}return null},null),H}function te(F,H=[]){const _=Q(F);return k(_,A=>{if(A?.component&&(H.some($=>$.name===A.component)||(A.visible=!1)),A.items&&A.items.length)for(let $=A.items.length-1;$>=0;$--)A.items[$].visible===!1&&A.items.splice($,1)},{key:"items"}),_.filter(A=>!(A.visible===!1||A.items&&Array.isArray(A.items)&&A.items.length>0&&A.items?.every($=>$.visible===!1)))}function X(F){return F.map(H=>H.items&&Array.isArray(H.items)&&H.items.length===1&&["header","footer","",void 0,null].includes(H.section)?H.items[0]:H)}const ee=F=>{const[H,_]=(0,p.default)(F,O=>O.id==="/team");return[...H,..._]};e.sortRootNavigation=ee;const q=F=>{const[,H]=(0,p.default)(F,_=>{const O=typeof _.title=="string"?_.title:_.title?.en;return _.id==="/team"&&O==="Access"||_.id==="/dashboard"&&O==="Blocklet"});return H};e.cleanOldNavigationHistory=q;function re(F={},H={}){const{beforeProcess:_=ue=>ue}=H,{navigationList:O,components:A}=U(F);F?.settings?.navigations&&(Array.isArray(F.settings.navigations)?F.settings.navigations=[...F.settings.navigations].filter(ue=>!(ue?.parent==="/team"&&ue.from==="team-tmpl")):F.settings.navigations=[]);const $=C(q(F?.settings?.navigations||[])).map(N),J=G(_(O)),oe=z(J),se=V(oe).reduce((ue,be)=>["bottom","social","sessionManager","userCenter"].includes(be.section)&&be.items&&be.items.length>0?(ue.push(...be.items.map(Ve=>{const{section:ei}=be,ti=R(be.link,Ve.link),ri=[be.component,Ve.component].filter(Boolean).join(".");return{...Ve,section:ei,link:ti,component:ri,parent:""}})),ue):(ue.push(be),ue),[]),me=j(se,{transform(ue,be){let{component:fe}=ue;return be?.component&&(fe=[be.component,ue.component].filter(Boolean).join(".")),N({...ue,component:fe})}});return{navigationList:(0,t.default)($,me,(ue,be)=>{const fe=["id","section"];return(0,i.default)((0,o.default)(ue,fe),(0,o.default)(be,fe))}),components:A,builtinList:me}}}(hr)),hr}var Ee=Np();const Pc=I.createContext(null),Fa="/",Mp="header",Ba={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function ai(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const nt=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Ap=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Lp=(e,r)=>{const n=Ee.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(Ap("/team",e("navigation.blockletService"),[nt("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),nt("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),nt("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),nt("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),nt("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),nt("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),nt("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),nt("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ga({name:e}){return v.jsx(Zf,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function zp({children:e}){const{blocklet:r,actions:n}=Nt(),{t}=Oe(),{navigationList:i,components:o,builtinList:a}=Ee.parseNavigation(r,{beforeProcess(x){const D=Ge(x);return["dashboard","userCenter"].forEach(C=>{Object.prototype.hasOwnProperty.call(Ba,C)&&Ba[C].forEach(T=>{D.some(R=>R.id===T.id)||D.push(T)})}),Lp(t,D)}}),l=or({rawNavigation:Ge(i),activeSection:Mp,components:o}),s=I.useMemo(()=>Ee.nestNavigationList(Ge(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const x=Ee.filterNavigation(Ge(l.rawNavigation),o);return Ee.joinLink(x,o)},[o,l.rawNavigation]),u=I.useCallback(x=>{if(!x.id)return"";const D=Ee.flattenNavigation(Ee.joinLink(s,o)),C=D.find(T=>T.id===x.id);if(C?.component){if(!o.some(T=>T.name===C.component))return v.jsx(Ga,{name:C.component})}else if(C.parent){const T=D.find(R=>R.id===C.parent);if(T?.component&&!o.some(R=>R.name===T.component))return v.jsx(Ga,{name:T.component})}return C?.link},[s,o]),f=I.useCallback(x=>{l.activeSection=x},[l]),d=I.useCallback(x=>{const D=[];Ee.deepWalk(x,(T,R)=>{const E={...Dt(T,["children","expand"]),parent:R?.id};D.push(E)});const C=Ge(l.rawNavigation).filter(T=>{if(!l.activeSection)return!1;const R=D.find(E=>ai(E,T));return R?!Ee.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...C,...D]},[l]),h=I.useCallback((x=[])=>{const D=Ge(l.rawNavigation).map(C=>{const T=x.find(R=>ai({...R,section:l.activeSection},C));return T?{...C,...T}:C});l.rawNavigation=D},[l]),p=I.useCallback((x,D=Fa)=>x.map(T=>{const E=o.find(U=>U.name===T.component)?.link||D,j=T.items||[],{link:N}=T;return{title:T.title,description:T.description,subtitle:u(T),link:N,icon:T.icon,children:p(j,N||Fa),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:E}}),[o,u]),g=I.useCallback(x=>{h([x])},[h]),m=I.useCallback(x=>{const D=l.rawNavigation.filter(C=>C.id===x||C.parent===x).map(C=>C.id);l.rawNavigation=Ge(l.rawNavigation).filter(C=>!D.includes(C.id))},[l]),y=I.useCallback((x={},D=-1)=>{const C={...x,id:Qf.nanoid(),section:l.activeSection,visible:!0},T=[...l.rawNavigation],R=T.filter(E=>E.section===l.activeSection);if(D<0||D>R.length-1)T.push(C);else{const E=R[D],j=T.findIndex(N=>ai(N,E));T.splice(j,0,C)}return l.rawNavigation=T,C},[l]),b=I.useCallback(x=>{const C=Ge(s).filter(T=>Ee.isMatchSection(T.section,x));return p(C)},[s,p]),w=I.useCallback(async x=>{const C=x.map(T=>Xf(T,eh)).map(T=>{const R={...T};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(C)},[n]),P=I.useCallback(async()=>{await w([]),l.rawNavigation=Ge(a)},[w,l,a]),k=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:g,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:w,resetNavigation:P}),[l,c,o,u,f,g,m,y,d,b,w,P]);return v.jsx(Pc.Provider,{value:k,children:e})}function _c(){const e=I.useContext(Pc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},li,$a;function jp(){if($a)return li;$a=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Sr=="object"&&Sr&&Sr.Object===Object&&Sr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,h=Math.max,p=Math.min,g=function(){return u.Date.now()};function m(x,D,C){var T,R,E,j,N,U,z=0,G=!1,W=!1,V=!0;if(typeof x!="function")throw new TypeError(e);D=k(D)||0,b(C)&&(G=!!C.leading,W="maxWait"in C,E=W?h(k(C.maxWait)||0,D):E,V="trailing"in C?!!C.trailing:V);function Q(O){var A=T,$=R;return T=R=void 0,z=O,j=x.apply($,A),j}function te(O){return z=O,N=setTimeout(q,D),G?Q(O):j}function X(O){var A=O-U,$=O-z,J=D-A;return W?p(J,E-$):J}function ee(O){var A=O-U,$=O-z;return U===void 0||A>=D||A<0||W&&$>=E}function q(){var O=g();if(ee(O))return re(O);N=setTimeout(q,X(O))}function re(O){return N=void 0,V&&T?Q(O):(T=R=void 0,j)}function F(){N!==void 0&&clearTimeout(N),z=0,T=U=R=N=void 0}function H(){return N===void 0?j:re(g())}function _(){var O=g(),A=ee(O);if(T=arguments,R=this,U=O,A){if(N===void 0)return te(U);if(W)return N=setTimeout(q,D),Q(U)}return N===void 0&&(N=setTimeout(q,D)),j}return _.cancel=F,_.flush=H,_}function y(x,D,C){var T=!0,R=!0;if(typeof x!="function")throw new TypeError(e);return b(C)&&(T="leading"in C?!!C.leading:T,R="trailing"in C?!!C.trailing:R),m(x,D,{leading:T,maxWait:D,trailing:R})}function b(x){var D=typeof x;return!!x&&(D=="object"||D=="function")}function w(x){return!!x&&typeof x=="object"}function P(x){return typeof x=="symbol"||w(x)&&d.call(x)==n}function k(x){if(typeof x=="number")return x;if(P(x))return r;if(b(x)){var D=typeof x.valueOf=="function"?x.valueOf():x;x=b(D)?D+"":D}if(typeof x!="string")return x===0?x:+x;x=x.replace(t,"");var C=o.test(x);return C||a.test(x)?l(x.slice(2),C?2:8):i.test(x)?r:+x}return li=y,li}var pr={exports:{}},xt={exports:{}},Fp=xt.exports,Wa;function Bp(){return Wa||(Wa=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?xt.exports=function(){return performance.now()}:typeof fr<"u"&&fr!==null&&fr.hrtime?(xt.exports=function(){return(e()-i)/1e6},r=fr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=fr.uptime()*1e9,i=t-o):Date.now?(xt.exports=function(){return Date.now()-n},n=Date.now()):(xt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Fp)),xt.exports}var Ha;function Gp(){if(Ha)return pr.exports;Ha=1;for(var e=Bp(),r=typeof window>"u"?Sr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var l=0,s=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),h=Math.max(0,u-(d-l));l=h+d,setTimeout(function(){var p=c.slice(0);c.length=0;for(var g=0;g<p.length;g++)if(!p[g].cancelled)try{p[g].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(h))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return pr.exports=function(f){return i.call(r,f)},pr.exports.cancel=function(){o.apply(r,arguments)},pr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},pr.exports}var tn={},Ua;function $p(){if(Ua)return tn;Ua=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return tn}var zt={},qa;function Wp(){if(qa)return zt;qa=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.noop=e,zt.intBetween=r,zt.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return zt}var Va;function Hp(){if(Va)return Ke;Va=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=T,Ke.createVerticalStrength=R,Ke.createScrollingComponent=N,Ke.default=U,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(rc()),r=c(nc()),n=th(),t=c(jp()),i=c(Gp()),o=c($p()),a=Jh,l=c(rh()),s=Wp();function c(z){return z&&z.__esModule?z:{default:z}}function u(z){if(z&&z.__esModule)return z;var G={};if(z!=null){for(var W in z)if(Object.prototype.hasOwnProperty.call(z,W)){var V=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(z,W):{};V.get||V.set?Object.defineProperty(G,W,V):G[W]=z[W]}}return G.default=z,G}function f(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(W){return typeof W}:f=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},f(z)}function d(){return d=Object.assign||function(z){for(var G=1;G<arguments.length;G++){var W=arguments[G];for(var V in W)Object.prototype.hasOwnProperty.call(W,V)&&(z[V]=W[V])}return z},d.apply(this,arguments)}function h(z,G){if(z==null)return{};var W=p(z,G),V,Q;if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(z);for(Q=0;Q<te.length;Q++)V=te[Q],!(G.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(z,V)&&(W[V]=z[V])}return W}function p(z,G){if(z==null)return{};var W={},V=Object.keys(z),Q,te;for(te=0;te<V.length;te++)Q=V[te],!(G.indexOf(Q)>=0)&&(W[Q]=z[Q]);return W}function g(z,G){if(!(z instanceof G))throw new TypeError("Cannot call a class as a function")}function m(z,G){for(var W=0;W<G.length;W++){var V=G[W];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(z,V.key,V)}}function y(z,G,W){return G&&m(z.prototype,G),z}function b(z,G){return G&&(f(G)==="object"||typeof G=="function")?G:x(z)}function w(z){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(W){return W.__proto__||Object.getPrototypeOf(W)},w(z)}function P(z,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(G&&G.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),G&&k(z,G)}function k(z,G){return k=Object.setPrototypeOf||function(V,Q){return V.__proto__=Q,V},k(z,G)}function x(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function D(z,G,W){return G in z?Object.defineProperty(z,G,{value:W,enumerable:!0,configurable:!0,writable:!0}):z[G]=W,z}var C=150;function T(z){return function(W,V){var Q=W.x,te=W.w,X=W.y,ee=W.h,q=Math.min(te/2,z),re=V.x>=Q&&V.x<=Q+te,F=re&&V.y>=X&&V.y<=X+ee;if(F){if(V.x<Q+q)return(V.x-Q-q)/q;if(V.x>Q+te-q)return-(Q+te-V.x-q)/q}return 0}}function R(z){return function(W,V){var Q=W.y,te=W.h,X=W.x,ee=W.w,q=Math.min(te/2,z),re=V.y>=Q&&V.y<=Q+te,F=re&&V.x>=X&&V.x<=X+ee;if(F){if(V.y<Q+q)return(V.y-Q-q)/q;if(V.y>Q+te-q)return-(Q+te-V.y-q)/q}return 0}}var E=T(C);Ke.defaultHorizontalStrength=E;var j=R(C);Ke.defaultVerticalStrength=j;function N(z){var G=function(W){P(V,W);function V(Q,te){var X;return g(this,V),X=b(this,w(V).call(this,Q,te)),D(x(x(X)),"updateScrolling",(0,t.default)(function(ee){var q=X.container.getBoundingClientRect(),re=q.left,F=q.top,H=q.width,_=q.height,O={x:re,y:F,w:H,h:_},A=(0,s.getCoords)(ee),$=X.props,J=$.horizontalStrength,oe=$.verticalStrength;X.scaleX=J(O,A),X.scaleY=oe(O,A),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),D(x(x(X)),"handleEvent",function(ee){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(ee))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(V,[{key:"componentDidMount",value:function(){var te=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return te.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var te=this.props.dragDropManager,X=te.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var te=this,X=0,ee=function q(){var re=te.scaleX,F=te.scaleY,H=te.container,_=te.props,O=_.strengthMultiplier,A=_.onScrollChange;if(O===0||re+F===0){te.stopScrolling();return}if(X+=1,X%2){var $=H.scrollLeft,J=H.scrollTop,oe=H.scrollWidth,de=H.scrollHeight,se=H.clientWidth,me=H.clientHeight,ve=re?H.scrollLeft=(0,s.intBetween)(0,oe-se,$+re*O):$,ue=F?H.scrollTop=(0,s.intBetween)(0,de-me,J+F*O):J;A(ve,ue)}te.frame=(0,i.default)(q)};ee()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var te=this.props;te.strengthMultiplier,te.verticalStrength,te.horizontalStrength,te.onScrollChange;var X=h(te,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(z,d({ref:this.wrappedInstance},X))}}]),V}(e.Component);return D(G,"displayName","Scrolling(".concat((0,o.default)(z),")")),D(G,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),D(G,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:E,strengthMultiplier:30}),(0,l.default)(G,z)}function U(z){var G=N(z);return function(W){return e.default.createElement(a.DragDropContextConsumer,null,function(V){var Q=V.dragDropManager;return Q===void 0?null:e.default.createElement(G,d({},W,{dragDropManager:Q}))})}}return Ke}var gn=Hp();const Up=Ln(gn);var qp=Qh();const Ka=Ln(qp);function kc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Oc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Ec(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}}kc.__suppressDeprecationWarning=!0;Oc.__suppressDeprecationWarning=!0;Ec.__suppressDeprecationWarning=!0;function Ur(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-BMW6t5La.js","./index-C4mOfCm_.js","./index-DGkT7afN.css","./url-join-BBoInSaA.js","./index-COm9hgx_.js","./_createAggregator-jhHxKsby.js","./depsEqual-CgwmaLj6.js","./index-quoltoEL.js","./index-DRYJ0xIl.js","./toUpper-Bb2HGHT9.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
+ import{hw as Nf,hx as Mf,gn as Af,dp as Lf,hy as zf,dq as jf,bL as Zs,bM as Ff,bJ as Bf,bK as Gf,bO as ec,dt as An,hz as $f,ez as Wf,hi as Hf,gB as Uf,gy as tc,hA as qf,gr as Vf,fp as Kf,eA as Yf,h4 as Jf,m as Oe,a3 as Ge,y as Ue,E as Ie,aP as or,r as I,j as v,c2 as Dt,J as Qf,fa as Xf,eK as Zf,ho as eh,ds as Sr,ev as fr,dd as rc,dx as th,hB as rh,dw as nc,bd as Ln,dK as Xt,hC as B,eW as K,eD as nh,hD as Hr,be as Z,o as S,dI as zn,aO as ih,aQ as wo,hE as Co,cw as ni,aE as ye,b8 as mt,N as ie,ag as oh,b as kt,cr as ge,b9 as Io,dy as Yt,T as Re,a4 as ke,b1 as Fi,dE as Zt,hF as ah,bn as ic,F as jn,hG as lh,hH as sh,t as Ht,fm as Bi,az as ch,dc as qe,fc as oc,C as uh,bE as dh,hI as Ra,O as Ro,f9 as fh,H as xr,Q as ac,f2 as lc,$ as hh,v as sc,f as Et,dH as ph,bu as gh,gD as cc,dF as Dr,a7 as vh,a8 as mh,hJ as Da,hK as uc,hL as bh,hM as yh,g4 as Fn,hN as Sh,gK as xh,hO as wn,hP as dc,by as Me,L as fc,z as Do,hQ as Ta,hR as hc,hS as Gi,hT as wh,hU as Ch,s as ar,hV as Ih,f1 as Rh,cv as pc,bB as Dh,hW as Th,fJ as gc,fd as Ph,gH as _h,gF as kh,hX as Oh,hY as Eh,hZ as Nh,h_ as Mh,h$ as vc,i0 as Ah,aC as mc,eY as bc,i1 as To,i2 as Lh,he as yc,b_ as ot,i3 as zh,b5 as jh,cA as Ut,i4 as Fh,cP as Bh,i5 as Gh,G as Pa,dk as ii,eE as _a,dJ as $h,i6 as Wh,a5 as Sc,Y as ka,dD as Ze,i7 as Oa,R as Hh,S as Ea,U as Na}from"./index-C4mOfCm_.js";import{r as Uh}from"./omit-B4Sq5gLR.js";import{r as qh}from"./cloneDeep-BrIshN9W.js";import{r as Vh}from"./index-COm9hgx_.js";import{c as Kh,u as Yh}from"./_createAggregator-jhHxKsby.js";import{u as Nt}from"./blocklet-DmmVfj87.js";import{H as Jh,G as Qh,M as Xh,N as Zh,O as Ma,K as ep,L as tp}from"./index-TN8GUnjq.js";import{_ as Se,a as xe,b as je,c as Fe,d as Be,e as rp,f as xc,u as ce,g as ne,r as Mr,w as Cn,h as wc,i as Mt,j as Cc,k as np,l as ip,o as $i}from"./raf-schd.esm-ClEAlDQA.js";import{_ as M,b as Aa,c as op,a as ap,d as lp}from"./redux-DfszZyTl.js";import{_ as sp}from"./typeof-QjJsDpFa.js";import{u as Ic,b as cp}from"./team-D7M0Ye34.js";import{b as up}from"./actions-CZaWtcNS.js";import{u as dp,a as fp,C as rt}from"./index.esm-DNwQmbRZ.js";import{S as Wi}from"./simple-select-DuFdntI_.js";import{b as hp,a as La}from"./index-DkZ-t39O.js";import{C as Rc}from"./Clear-DMvY-1OH.js";import{A as pp}from"./ArrowDropDown-BS9tp8MS.js";import{a as gp}from"./api-BgPXZvcj.js";import{A as vp}from"./Autocomplete-8ICuj-KH.js";import{L as mp}from"./ListItemButton-BQgIuXFI.js";import{e as bp}from"./client-DdpjvpuA.js";import{u as Dc}from"./use-mobile-Cebu3wjw.js";import{I as yp}from"./iframe-CDG05FDN.js";import{B as oi}from"./ButtonGroup-C0aG4xOT.js";import{L as za}from"./LoadingButton-BnL-MknW.js";import"./depsEqual-CgwmaLj6.js";import"./url-evaluation-CNPtf5Sl.js";import"./useLocalStorage-BTzsh1Lj.js";import"./MoreVert-L8j8_EPz.js";import"./get-safe-url-DjCQU-uR.js";import"./permission-CAwWHgKo.js";import"./ListSubheader-BOpeFxej.js";import"./getValidReactChildren--K7J75d3.js";var Sp=Nf(function(){return Mf?sessionStorage:void 0});function xp(e,r){return Af(r,function(n){return e[n]})}function wp(e){return e==null?[]:xp(e,Lf(e))}var Cp=zf.isFinite;function Ip(e){return typeof e=="number"&&Cp(e)}function Rp(e){return typeof e=="number"&&e==jf(e)}var Dp=Kh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const Tp=Object.freeze(Object.defineProperty({__proto__:null,default:Dp},Symbol.toStringTag,{value:"Module"}));var Pp=Zs(function(e){var r=Ff(e);return r=typeof r=="function"?r:void 0,Bf(Gf(e,1,ec,!0),void 0,r)});const _p=Object.freeze(Object.defineProperty({__proto__:null,default:Pp},Symbol.toStringTag,{value:"Module"}));var Tc=Zs(function(e,r){return ec(e)?up(e,r):[]}),hr={};const kp=An(_p),Op=An($f),Ep=An(Tp);var ja;function Np(){return ja||(ja=1,function(e){var r=hr&&hr.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=re,e.deepWalk=k,e.isMatchSection=x,e.nestNavigationList=Q,e.filterNavigation=te,e.cleanOrphanNavigation=X,e.joinLink=E,e.flattenNavigation=j,e.splitNavigationBySection=V;const n=Wf(),t=r(kp),i=r(Hf),o=r(Uf),a=r(Op),l=r(Uh),s=r(qh),c=Jf(),u=r(Vh()),f=r(tc()),d=r(qf),h=r(Vf),p=r(Ep),g=Kf(),m=Yf();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return m.checkLink}});const y="header",b="/",w="/",P="/";function k(F,H=()=>{},{key:_="children",order:O="first"}={}){function A($,{index:J=0,parent:oe=null,level:de=0}={}){Array.isArray($)?$.forEach((se,me)=>{A(se,{index:me,parent:oe,level:de+1})}):$&&(O==="first"&&H($,oe,{index:J,level:de}),A($[_],{parent:$,level:de}),O==="last"&&H($,oe,{index:J,level:de}))}A(F)}function x(F,H){return H===y&&(0,a.default)(F)?!0:Array.isArray(F)?F.includes(H):F===H}function D(F){try{return JSON.parse(F)}catch{return F}}function C(F){return F.map(H=>{const _={...H};return _.role&&(_.role=D(_.role)),_.section&&(_.section=D(_.section)),_.title&&(_.title=D(_.title)),_.description&&(_.description=D(_.description)),_.link&&(_.link=D(_.link)),_})}function T(F="/",H=""){if((0,f.default)(H||""))return H;const _=u.default.join(F,H||w);return _.length>1&&_.endsWith("/")?_.slice(0,_.length-1):_}function R(F,H,{strict:_=!0}={}){let O=F,A=H;return _||(O=O||"/",A=A||"/"),(0,d.default)(O)&&(0,h.default)(A)&&(0,m.checkLink)(A)?Object.keys(O).reduce(($,J)=>($[J]=T(O[J],A),$),{}):(0,h.default)(O)&&(0,m.checkLink)(O)&&(0,d.default)(A)?Object.keys(A).reduce(($,J)=>($[J]=T(O,A[J]),$),{}):(0,h.default)(O)&&(0,h.default)(A)?(0,m.checkLink)(O)||(0,m.checkLink)(A)?T(O,A):A:(0,d.default)(O)&&(0,d.default)(A)?[...new Set([...Object.keys(O),...Object.keys(A)])].reduce((J,oe)=>(J[oe]=T(O[oe],A[oe]),J),{}):A}function E(F,H){const _=(0,s.default)(F);return k(_,(O,A)=>{const $=O.component||O.child;if($){const J=H.find(oe=>oe.name===$);J&&(O.link=R(J.link,O.link,{strict:!1}))}else A&&(O.link=R(A.link,O.link))},{key:"items"}),_}function j(F=[],{depth:H=1,transform:_=O=>O}={}){const O=(0,s.default)(F),A=[];return k(O,($,J,{level:oe})=>{if(oe>=H){const{items:de=[]}=$;if(de&&Array.isArray(de)&&de.length>0){delete $.items;const se=de.map(me=>_(me,$));if(J)J.items.push(...se);else{const me=_((0,l.default)($,["items"]),J);A.push(me,...se)}}else if(oe===1){const se=_((0,l.default)($,["items"]),J);A.push(se)}}else oe===1&&A.push($)},{key:"items",order:"last"}),A}function N(F){if(F.section!=="bottomNavigation")return F;const H={...F};return n.NAVIGATION_I18N_FIELDS.forEach(_=>{const O=H[_];typeof O=="string"&&(H[_]={en:O})}),H}function U(F={}){const H=[];function _(A,$={}){const J=[],{children:oe=[],meta:de={}}=A,se=(0,s.default)(de?.navigation||[]);(0,g.hasStartEngine)(de)&&A.meta?.capabilities?.navigation!==!1&&J.push(...se);const me=$.name||"",ve=$.mountPoint||b,ue=A===F?"":de.name||"",be=A===F?"":A.mountPoint||b;for(const fe of oe){if(!(0,g.hasStartEngine)(fe.meta))continue;const Ve=fe.meta.name,ei=fe.mountPoint,ti=[me,ue,Ve].filter(Boolean).join("."),ri=fe.meta.navigation||[],Ef=(0,c.joinURL)(ve,be,ei);fe.meta?.capabilities?.navigation!==!1&&H.push({did:fe.meta.did,name:ti,link:Ef,title:fe.meta.title||"",navigation:ri.map(Je=>({section:y,...Je}))});const Lt=se.find(Je=>Je.component?Je.component===Ve:!1);if(Lt){if(!Lt.link)if(fe.meta.navigation&&fe.meta.navigation.length>0){const Je=_(fe,{mountPoint:be,name:ue});Je.length>0&&(Lt.items=Lt.items??[],Lt.items.push(...Je))}else Lt.link=w}else if(fe.meta?.capabilities?.navigation!==!1){const Je=_(fe,{mountPoint:be,name:ue}),en={title:fe.meta.title,component:Ve,id:fe.meta.did};Je.length>0?(en.items=Je,en.link=void 0):en.link=w,J.push(en)}}return J}return{navigationList:_(F),components:H}}function z(F){const H=(0,s.default)(F).filter(_=>_.id);return k(H,(_,O)=>{if(_.items&&_.items.length){for(let A=_.items.length-1;A>=0;A--)_.items[A].id||_.items.splice(A,1);_.items.length===0&&_.component&&(_.link=_.link||w)}O&&(_.parent=O.id,_.id=[O.id,_.id].join(P)),_.from=_.from||"yaml",_.visible=_.visible??!0},{key:"items"}),H}function G(F,H=2){const _=(0,s.default)(F),O=j(_,{depth:H,transform:(A,$)=>($&&(A._parent||(A._parent=$.id,$.component||(A.link=R($.link,A.link))),A.section=A.section||$.section||[y],A.visible=A.visible??$.visible,$.role&&(A.role=A.role||$.role)),A.component=[$.component,A.component].filter(Boolean).join("."),A)});return k(O,A=>{A.items&&A.items.length>0&&A.items.reduceRight(($,J)=>{if(J._parent){const oe=A.items.findIndex(de=>de.id===J._parent);oe>=0&&A.items.splice(oe,1),delete J._parent}return null},null)},{key:"items"}),O}function W(F,H){return H&&Array.isArray(F.items)?F.items.filter(_=>(0,a.default)(_.section)?x(F.section,H):!!x(_.section,H)).map(_=>({..._,section:H})):[]}function V(F){const H=(0,s.default)(F),_=[];for(const O of H){let J=function(oe,de){const se=W(oe,de);$.push({...A,section:de,items:se})};const A=(0,s.default)((0,l.default)(O,["items"])),$=[];if(Array.isArray(O.section))for(const oe of O.section)J(O,oe);else if(O.section){const{section:oe}=O;J(O,oe)}else if(O.items&&O.items.length>0){const oe=O.items.reduce((se,me)=>{const{section:ve=[y]}=me||{};return se.push(...ve),se},[]),de=[...new Set(oe)];for(const se of de)J(O,se)}else $.push({...O,section:y});_.push(...$)}return _}function Q(F=[]){const H=(0,s.default)(F);return H.reduceRight((_,O,A)=>{if(O.parent){const $=H.find(J=>O.section&&J.section?J.section===O.section&&J.id===O.parent:J.id===O.parent);$&&($.items||($.items=[]),$.items=[O,...$.items]),H.splice(A,1)}return null},null),H}function te(F,H=[]){const _=Q(F);return k(_,A=>{if(A?.component&&(H.some($=>$.name===A.component)||(A.visible=!1)),A.items&&A.items.length)for(let $=A.items.length-1;$>=0;$--)A.items[$].visible===!1&&A.items.splice($,1)},{key:"items"}),_.filter(A=>!(A.visible===!1||A.items&&Array.isArray(A.items)&&A.items.length>0&&A.items?.every($=>$.visible===!1)))}function X(F){return F.map(H=>H.items&&Array.isArray(H.items)&&H.items.length===1&&["header","footer","",void 0,null].includes(H.section)?H.items[0]:H)}const ee=F=>{const[H,_]=(0,p.default)(F,O=>O.id==="/team");return[...H,..._]};e.sortRootNavigation=ee;const q=F=>{const[,H]=(0,p.default)(F,_=>{const O=typeof _.title=="string"?_.title:_.title?.en;return _.id==="/team"&&O==="Access"||_.id==="/dashboard"&&O==="Blocklet"});return H};e.cleanOldNavigationHistory=q;function re(F={},H={}){const{beforeProcess:_=ue=>ue}=H,{navigationList:O,components:A}=U(F);F?.settings?.navigations&&(Array.isArray(F.settings.navigations)?F.settings.navigations=[...F.settings.navigations].filter(ue=>!(ue?.parent==="/team"&&ue.from==="team-tmpl")):F.settings.navigations=[]);const $=C(q(F?.settings?.navigations||[])).map(N),J=G(_(O)),oe=z(J),se=V(oe).reduce((ue,be)=>["bottom","social","sessionManager","userCenter"].includes(be.section)&&be.items&&be.items.length>0?(ue.push(...be.items.map(Ve=>{const{section:ei}=be,ti=R(be.link,Ve.link),ri=[be.component,Ve.component].filter(Boolean).join(".");return{...Ve,section:ei,link:ti,component:ri,parent:""}})),ue):(ue.push(be),ue),[]),me=j(se,{transform(ue,be){let{component:fe}=ue;return be?.component&&(fe=[be.component,ue.component].filter(Boolean).join(".")),N({...ue,component:fe})}});return{navigationList:(0,t.default)($,me,(ue,be)=>{const fe=["id","section"];return(0,i.default)((0,o.default)(ue,fe),(0,o.default)(be,fe))}),components:A,builtinList:me}}}(hr)),hr}var Ee=Np();const Pc=I.createContext(null),Fa="/",Mp="header",Ba={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function ai(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const nt=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Ap=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Lp=(e,r)=>{const n=Ee.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(Ap("/team",e("navigation.blockletService"),[nt("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),nt("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),nt("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),nt("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),nt("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),nt("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),nt("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),nt("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ga({name:e}){return v.jsx(Zf,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function zp({children:e}){const{blocklet:r,actions:n}=Nt(),{t}=Oe(),{navigationList:i,components:o,builtinList:a}=Ee.parseNavigation(r,{beforeProcess(x){const D=Ge(x);return["dashboard","userCenter"].forEach(C=>{Object.prototype.hasOwnProperty.call(Ba,C)&&Ba[C].forEach(T=>{D.some(R=>R.id===T.id)||D.push(T)})}),Lp(t,D)}}),l=or({rawNavigation:Ge(i),activeSection:Mp,components:o}),s=I.useMemo(()=>Ee.nestNavigationList(Ge(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const x=Ee.filterNavigation(Ge(l.rawNavigation),o);return Ee.joinLink(x,o)},[o,l.rawNavigation]),u=I.useCallback(x=>{if(!x.id)return"";const D=Ee.flattenNavigation(Ee.joinLink(s,o)),C=D.find(T=>T.id===x.id);if(C?.component){if(!o.some(T=>T.name===C.component))return v.jsx(Ga,{name:C.component})}else if(C.parent){const T=D.find(R=>R.id===C.parent);if(T?.component&&!o.some(R=>R.name===T.component))return v.jsx(Ga,{name:T.component})}return C?.link},[s,o]),f=I.useCallback(x=>{l.activeSection=x},[l]),d=I.useCallback(x=>{const D=[];Ee.deepWalk(x,(T,R)=>{const E={...Dt(T,["children","expand"]),parent:R?.id};D.push(E)});const C=Ge(l.rawNavigation).filter(T=>{if(!l.activeSection)return!1;const R=D.find(E=>ai(E,T));return R?!Ee.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...C,...D]},[l]),h=I.useCallback((x=[])=>{const D=Ge(l.rawNavigation).map(C=>{const T=x.find(R=>ai({...R,section:l.activeSection},C));return T?{...C,...T}:C});l.rawNavigation=D},[l]),p=I.useCallback((x,D=Fa)=>x.map(T=>{const E=o.find(U=>U.name===T.component)?.link||D,j=T.items||[],{link:N}=T;return{title:T.title,description:T.description,subtitle:u(T),link:N,icon:T.icon,children:p(j,N||Fa),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:E}}),[o,u]),g=I.useCallback(x=>{h([x])},[h]),m=I.useCallback(x=>{const D=l.rawNavigation.filter(C=>C.id===x||C.parent===x).map(C=>C.id);l.rawNavigation=Ge(l.rawNavigation).filter(C=>!D.includes(C.id))},[l]),y=I.useCallback((x={},D=-1)=>{const C={...x,id:Qf.nanoid(),section:l.activeSection,visible:!0},T=[...l.rawNavigation],R=T.filter(E=>E.section===l.activeSection);if(D<0||D>R.length-1)T.push(C);else{const E=R[D],j=T.findIndex(N=>ai(N,E));T.splice(j,0,C)}return l.rawNavigation=T,C},[l]),b=I.useCallback(x=>{const C=Ge(s).filter(T=>Ee.isMatchSection(T.section,x));return p(C)},[s,p]),w=I.useCallback(async x=>{const C=x.map(T=>Xf(T,eh)).map(T=>{const R={...T};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(C)},[n]),P=I.useCallback(async()=>{await w([]),l.rawNavigation=Ge(a)},[w,l,a]),k=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:g,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:w,resetNavigation:P}),[l,c,o,u,f,g,m,y,d,b,w,P]);return v.jsx(Pc.Provider,{value:k,children:e})}function _c(){const e=I.useContext(Pc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},li,$a;function jp(){if($a)return li;$a=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Sr=="object"&&Sr&&Sr.Object===Object&&Sr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,h=Math.max,p=Math.min,g=function(){return u.Date.now()};function m(x,D,C){var T,R,E,j,N,U,z=0,G=!1,W=!1,V=!0;if(typeof x!="function")throw new TypeError(e);D=k(D)||0,b(C)&&(G=!!C.leading,W="maxWait"in C,E=W?h(k(C.maxWait)||0,D):E,V="trailing"in C?!!C.trailing:V);function Q(O){var A=T,$=R;return T=R=void 0,z=O,j=x.apply($,A),j}function te(O){return z=O,N=setTimeout(q,D),G?Q(O):j}function X(O){var A=O-U,$=O-z,J=D-A;return W?p(J,E-$):J}function ee(O){var A=O-U,$=O-z;return U===void 0||A>=D||A<0||W&&$>=E}function q(){var O=g();if(ee(O))return re(O);N=setTimeout(q,X(O))}function re(O){return N=void 0,V&&T?Q(O):(T=R=void 0,j)}function F(){N!==void 0&&clearTimeout(N),z=0,T=U=R=N=void 0}function H(){return N===void 0?j:re(g())}function _(){var O=g(),A=ee(O);if(T=arguments,R=this,U=O,A){if(N===void 0)return te(U);if(W)return N=setTimeout(q,D),Q(U)}return N===void 0&&(N=setTimeout(q,D)),j}return _.cancel=F,_.flush=H,_}function y(x,D,C){var T=!0,R=!0;if(typeof x!="function")throw new TypeError(e);return b(C)&&(T="leading"in C?!!C.leading:T,R="trailing"in C?!!C.trailing:R),m(x,D,{leading:T,maxWait:D,trailing:R})}function b(x){var D=typeof x;return!!x&&(D=="object"||D=="function")}function w(x){return!!x&&typeof x=="object"}function P(x){return typeof x=="symbol"||w(x)&&d.call(x)==n}function k(x){if(typeof x=="number")return x;if(P(x))return r;if(b(x)){var D=typeof x.valueOf=="function"?x.valueOf():x;x=b(D)?D+"":D}if(typeof x!="string")return x===0?x:+x;x=x.replace(t,"");var C=o.test(x);return C||a.test(x)?l(x.slice(2),C?2:8):i.test(x)?r:+x}return li=y,li}var pr={exports:{}},xt={exports:{}},Fp=xt.exports,Wa;function Bp(){return Wa||(Wa=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?xt.exports=function(){return performance.now()}:typeof fr<"u"&&fr!==null&&fr.hrtime?(xt.exports=function(){return(e()-i)/1e6},r=fr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=fr.uptime()*1e9,i=t-o):Date.now?(xt.exports=function(){return Date.now()-n},n=Date.now()):(xt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Fp)),xt.exports}var Ha;function Gp(){if(Ha)return pr.exports;Ha=1;for(var e=Bp(),r=typeof window>"u"?Sr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var l=0,s=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),h=Math.max(0,u-(d-l));l=h+d,setTimeout(function(){var p=c.slice(0);c.length=0;for(var g=0;g<p.length;g++)if(!p[g].cancelled)try{p[g].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(h))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return pr.exports=function(f){return i.call(r,f)},pr.exports.cancel=function(){o.apply(r,arguments)},pr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},pr.exports}var tn={},Ua;function $p(){if(Ua)return tn;Ua=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return tn}var zt={},qa;function Wp(){if(qa)return zt;qa=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.noop=e,zt.intBetween=r,zt.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return zt}var Va;function Hp(){if(Va)return Ke;Va=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=T,Ke.createVerticalStrength=R,Ke.createScrollingComponent=N,Ke.default=U,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(rc()),r=c(nc()),n=th(),t=c(jp()),i=c(Gp()),o=c($p()),a=Jh,l=c(rh()),s=Wp();function c(z){return z&&z.__esModule?z:{default:z}}function u(z){if(z&&z.__esModule)return z;var G={};if(z!=null){for(var W in z)if(Object.prototype.hasOwnProperty.call(z,W)){var V=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(z,W):{};V.get||V.set?Object.defineProperty(G,W,V):G[W]=z[W]}}return G.default=z,G}function f(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(W){return typeof W}:f=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},f(z)}function d(){return d=Object.assign||function(z){for(var G=1;G<arguments.length;G++){var W=arguments[G];for(var V in W)Object.prototype.hasOwnProperty.call(W,V)&&(z[V]=W[V])}return z},d.apply(this,arguments)}function h(z,G){if(z==null)return{};var W=p(z,G),V,Q;if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(z);for(Q=0;Q<te.length;Q++)V=te[Q],!(G.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(z,V)&&(W[V]=z[V])}return W}function p(z,G){if(z==null)return{};var W={},V=Object.keys(z),Q,te;for(te=0;te<V.length;te++)Q=V[te],!(G.indexOf(Q)>=0)&&(W[Q]=z[Q]);return W}function g(z,G){if(!(z instanceof G))throw new TypeError("Cannot call a class as a function")}function m(z,G){for(var W=0;W<G.length;W++){var V=G[W];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(z,V.key,V)}}function y(z,G,W){return G&&m(z.prototype,G),z}function b(z,G){return G&&(f(G)==="object"||typeof G=="function")?G:x(z)}function w(z){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(W){return W.__proto__||Object.getPrototypeOf(W)},w(z)}function P(z,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(G&&G.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),G&&k(z,G)}function k(z,G){return k=Object.setPrototypeOf||function(V,Q){return V.__proto__=Q,V},k(z,G)}function x(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function D(z,G,W){return G in z?Object.defineProperty(z,G,{value:W,enumerable:!0,configurable:!0,writable:!0}):z[G]=W,z}var C=150;function T(z){return function(W,V){var Q=W.x,te=W.w,X=W.y,ee=W.h,q=Math.min(te/2,z),re=V.x>=Q&&V.x<=Q+te,F=re&&V.y>=X&&V.y<=X+ee;if(F){if(V.x<Q+q)return(V.x-Q-q)/q;if(V.x>Q+te-q)return-(Q+te-V.x-q)/q}return 0}}function R(z){return function(W,V){var Q=W.y,te=W.h,X=W.x,ee=W.w,q=Math.min(te/2,z),re=V.y>=Q&&V.y<=Q+te,F=re&&V.x>=X&&V.x<=X+ee;if(F){if(V.y<Q+q)return(V.y-Q-q)/q;if(V.y>Q+te-q)return-(Q+te-V.y-q)/q}return 0}}var E=T(C);Ke.defaultHorizontalStrength=E;var j=R(C);Ke.defaultVerticalStrength=j;function N(z){var G=function(W){P(V,W);function V(Q,te){var X;return g(this,V),X=b(this,w(V).call(this,Q,te)),D(x(x(X)),"updateScrolling",(0,t.default)(function(ee){var q=X.container.getBoundingClientRect(),re=q.left,F=q.top,H=q.width,_=q.height,O={x:re,y:F,w:H,h:_},A=(0,s.getCoords)(ee),$=X.props,J=$.horizontalStrength,oe=$.verticalStrength;X.scaleX=J(O,A),X.scaleY=oe(O,A),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),D(x(x(X)),"handleEvent",function(ee){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(ee))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(V,[{key:"componentDidMount",value:function(){var te=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return te.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var te=this.props.dragDropManager,X=te.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var te=this,X=0,ee=function q(){var re=te.scaleX,F=te.scaleY,H=te.container,_=te.props,O=_.strengthMultiplier,A=_.onScrollChange;if(O===0||re+F===0){te.stopScrolling();return}if(X+=1,X%2){var $=H.scrollLeft,J=H.scrollTop,oe=H.scrollWidth,de=H.scrollHeight,se=H.clientWidth,me=H.clientHeight,ve=re?H.scrollLeft=(0,s.intBetween)(0,oe-se,$+re*O):$,ue=F?H.scrollTop=(0,s.intBetween)(0,de-me,J+F*O):J;A(ve,ue)}te.frame=(0,i.default)(q)};ee()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var te=this.props;te.strengthMultiplier,te.verticalStrength,te.horizontalStrength,te.onScrollChange;var X=h(te,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(z,d({ref:this.wrappedInstance},X))}}]),V}(e.Component);return D(G,"displayName","Scrolling(".concat((0,o.default)(z),")")),D(G,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),D(G,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:E,strengthMultiplier:30}),(0,l.default)(G,z)}function U(z){var G=N(z);return function(W){return e.default.createElement(a.DragDropContextConsumer,null,function(V){var Q=V.dragDropManager;return Q===void 0?null:e.default.createElement(G,d({},W,{dragDropManager:Q}))})}}return Ke}var gn=Hp();const Up=Ln(gn);var qp=Qh();const Ka=Ln(qp);function kc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Oc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Ec(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}}kc.__suppressDeprecationWarning=!0;Oc.__suppressDeprecationWarning=!0;Ec.__suppressDeprecationWarning=!0;function Ur(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 Eu=Object.freeze({left:0,top:0,width:16,height:16}),Dn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Jr=Object.freeze({...Eu,...Dn}),ro=Object.freeze({...Jr,body:"",hidden:!1}),kb=Object.freeze({width:null,height:null}),Nu=Object.freeze({...kb,...Dn});function Ob(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 Eb=/[\s,]+/;function Nb(e,r){r.split(Eb).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Mu={...Nu,preserveAspectRatio:""};function Kl(e){const r={...Mu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=Ob(n("rotate","")),Nb(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function Mb(e,r){for(const n in Mu)if(e[n]!==r[n])return!0;return!1}const kr=/^[a-z0-9]+(-[a-z0-9]+)*$/,Qr=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!bn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!bn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!bn(l,n)?null:l}return null},bn=(e,r)=>e?!!((e.provider===""||e.provider.match(kr))&&(r&&e.prefix===""||e.prefix.match(kr))&&e.name.match(kr)):!1;function Ab(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 Yl(e,r){const n=Ab(e,r);for(const t in ro)t in Dn?t in e&&!(t in n)&&(n[t]=Dn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Lb(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function zb(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=Yl(t[l]||i[l],o)}return a(r),n.forEach(a),Yl(e,o)}function Au(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=Lb(e);for(const i in t){const o=t[i];o&&(r(i,zb(e,i,o)),n.push(i))}return n}const jb={provider:"",aliases:{},not_found:{},...Eu};function Ii(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Lu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ii(e,jb))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(kr)||typeof o.body!="string"||!Ii(o,ro))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(kr)||typeof a!="string"||!n[a]&&!t[a]||!Ii(o,ro))return null}return r}const Tn=Object.create(null);function Fb(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function gt(e,r){const n=Tn[e]||(Tn[e]=Object.create(null));return n[r]||(n[r]=Fb(e,r))}function Uo(e,r){return Lu(r)?Au(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Bb(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function Gb(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Tn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Tn[i]||{})).forEach(a=>{const l=gt(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let zr=!1;function zu(e){return typeof e=="boolean"&&(zr=e),zr}function jr(e){const r=typeof e=="string"?Qr(e,!0,zr):e;if(r){const n=gt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function ju(e,r){const n=Qr(e,!0,zr);if(!n)return!1;const t=gt(n.provider,n.prefix);return Bb(t,n.name,r)}function Jl(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),zr&&!r&&!e.prefix){let i=!1;return Lu(e)&&(e.prefix="",Au(e,(o,a)=>{a&&ju(o,a)&&(i=!0)})),i}const n=e.prefix;if(!bn({provider:r,prefix:n,name:"a"}))return!1;const t=gt(r,n);return!!Uo(t,e)}function $b(e){return!!jr(e)}function Wb(e){const r=jr(e);return r?{...Jr,...r}:null}function Hb(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=gt(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Fu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Ub(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Fu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let qb=0;function Vb(e,r,n){const t=qb++,i=Fu.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 no=Object.create(null);function Ql(e,r){no[e]=r}function io(e){return no[e]||no[""]}function Kb(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?Qr(i,r,n):i;o&&t.push(o)}),t}var Yb={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Jb(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let x=e.resources.slice(0);for(a=[];x.length>1;){const D=Math.floor(Math.random()*x.length);a.push(x[D]),x=x.slice(0,D).concat(x.slice(D+1))}a=a.concat(x)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],h=[];typeof t=="function"&&h.push(t);function p(){f&&(clearTimeout(f),f=null)}function g(){s==="pending"&&(s="aborted"),p(),d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function m(x,D){D&&(h=[]),typeof x=="function"&&h.push(x)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:g}}function b(){s="failed",h.forEach(x=>{x(void 0,u)})}function w(){d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function P(x,D,C){const T=D!=="success";switch(d=d.filter(R=>R!==x),s){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(D==="abort"){u=C,b();return}if(T){u=C,d.length||(a.length?k():b());return}if(p(),w(),!e.random){const R=e.resources.indexOf(x.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",h.forEach(R=>{R(C)})}function k(){if(s!=="pending")return;p();const x=a.shift();if(x===void 0){if(d.length){f=setTimeout(()=>{p(),s==="pending"&&(w(),b())},e.timeout);return}b();return}const D={status:"pending",resource:x,callback:(C,T)=>{P(D,C,T)}};d.push(D),c++,f=setTimeout(k,e.rotate),n(x,r,D.callback)}return setTimeout(k),y}function Bu(e){const r={...Yb,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=Jb(r,l,s,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(l){return n.find(s=>l(s))||null}return{query:i,find:o,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:t}}function qo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Un=Object.create(null),vr=["https://api.simplesvg.com","https://api.unisvg.com"],yn=[];for(;vr.length>0;)vr.length===1||Math.random()>.5?yn.push(vr.shift()):yn.push(vr.pop());Un[""]=qo({resources:["https://api.iconify.design"].concat(yn)});function Xl(e,r){const n=qo(r);return n===null?!1:(Un[e]=n,!0)}function qn(e){return Un[e]}function Qb(){return Object.keys(Un)}function Zl(){}const Ri=Object.create(null);function Xb(e){if(!Ri[e]){const r=qn(e);if(!r)return;const n=Bu(r),t={config:r,redundancy:n};Ri[e]=t}return Ri[e]}function Gu(e,r,n){let t,i;if(typeof e=="string"){const o=io(e);if(!o)return n(void 0,424),Zl;i=o.send;const a=Xb(e);a&&(t=a.redundancy)}else{const o=qo(e);if(o){t=Bu(o);const a=e.resources?e.resources[0]:"",l=io(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),Zl):t.query(r,i,n)().abort}const es="iconify2",Fr="iconify",$u=Fr+"-count",ts=Fr+"-version",Wu=36e5,Zb=168;function oo(e,r){try{return e.getItem(r)}catch{}}function Vo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function rs(e,r){try{e.removeItem(r)}catch{}}function ao(e,r){return Vo(e,$u,r.toString())}function lo(e){return parseInt(oo(e,$u))||0}const _t={local:!0,session:!0},Hu={local:new Set,session:new Set};let Ko=!1;function ey(e){Ko=e}let an=typeof window>"u"?{}:window;function Uu(e){const r=e+"Storage";try{if(an&&an[r]&&typeof an[r].length=="number")return an[r]}catch{}_t[e]=!1}function qu(e,r){const n=Uu(e);if(!n)return;const t=oo(n,ts);if(t!==es){if(t){const l=lo(n);for(let s=0;s<l;s++)rs(n,Fr+s.toString())}Vo(n,ts,es),ao(n,0);return}const i=Math.floor(Date.now()/Wu)-Zb,o=l=>{const s=Fr+l.toString(),c=oo(n,s);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,l))return!0}catch{}rs(n,s)}};let a=lo(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,ao(n,a)):Hu[e].add(l))}function Vu(){if(!Ko){ey(!0);for(const e in _t)qu(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=gt(t,i);if(!Uo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function ty(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in _t)qu(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function ry(e,r){Ko||Vu();function n(t){let i;if(!_t[t]||!(i=Uu(t)))return;const o=Hu[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=lo(i),!ao(i,a+1))return;const l={cached:Math.floor(Date.now()/Wu),provider:e.provider,data:r};return Vo(i,Fr+a.toString(),JSON.stringify(l))}r.lastModified&&!ty(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function ns(){}function ny(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ub(e)}))}function iy(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=io(n)))return;o.prepare(n,t,i).forEach(l=>{Gu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Uo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),ry(e,s)}catch(c){console.error(c)}ny(e)})})}))}const Yo=(e,r)=>{const n=Kb(e,!0,zu()),t=Hb(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,ns)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(gt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:f}=s,d=gt(c,u),h=d.pendingIcons||(d.pendingIcons=new Set);h.has(f)||(h.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&iy(s,i[c][u])}),r?Vb(r,t,o):ns},oy=e=>new Promise((r,n)=>{const t=typeof e=="string"?Qr(e,!0):e;if(!t){n(e);return}Yo([t||e],i=>{if(i.length&&t){const o=jr(t);if(o){r({...Jr,...o});return}}n(e)})});function ay(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function ly(e,r){const n=typeof e=="string"?Qr(e,!0,!0):null;if(!n){const o=ay(e);return{value:e,data:o}}const t=jr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=Yo([n],()=>r(e,n,jr(n)));return{value:e,name:n,loading:i}}function Di(e){return e.hasAttribute("inline")}let Ku=!1;try{Ku=navigator.vendor.indexOf("Apple")===0}catch{}function sy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(Ku||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const cy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function so(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(cy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=uy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const dy=e=>e==="unset"||e==="undefined"||e==="none";function Yu(e,r){const n={...Jr,...e},t={...Nu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(p=>{const g=[],m=p.hFlip,y=p.vFlip;let b=p.rotate;m?y?b+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):y&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let w;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:w=i.height/2+i.top,g.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,g.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}b%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=so(f,s/c)):(u=a==="auto"?s:a,f=l===null?so(u,c/s):l==="auto"?c:l);const d={},h=(p,g)=>{dy(g)||(d[p]=g.toString())};return h("width",u),h("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const fy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Pn=fy();function hy(e){Pn=e}function py(){return Pn}function gy(e,r){const n=qn(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function vy(e){return e===404}const my=(e,r,n)=>{const t=[],i=gy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function by(e){if(typeof e=="string"){const r=qn(e);if(r)return r.path}return"/"}const yy=(e,r,n)=>{if(!Pn){n("abort",424);return}let t=by(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Pn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(vy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Sy={prepare:my,send:yy};function is(e,r){switch(e){case"local":case"session":_t[e]=r;break;case"all":for(const n in _t)_t[n]=r;break}}const Ti="data-style";let Ju="";function xy(e){Ju=e}function os(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ti));n||(n=document.createElement("style"),n.setAttribute(Ti,Ti),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+Ju}function Qu(){Ql("",Sy),zu(!0);let e;try{e=window}catch{}if(e){if(Vu(),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"||!Jl(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;Xl(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>is(n,!0),disableCache:n=>is(n,!1),iconExists:$b,getIcon:Wb,listIcons:Gb,addIcon:ju,addCollection:Jl,calculateSize:so,buildIcon:Yu,loadIcons:Yo,loadIcon:oy,addAPIProvider:Xl,appendCustomStyle:xy,_api:{getAPIConfig:qn,setAPIModule:Ql,sendAPIQuery:Gu,setFetch:hy,getFetch:py,listAPIProviders:Qb}}}function Xu(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 wy(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Cy(e){return"data:image/svg+xml,"+wy(e)}function Iy(e){return'url("'+Cy(e)+'")'}const co={"background-color":"currentColor"},Zu={"background-color":"transparent"},as={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ls={"-webkit-mask":co,mask:co,background:Zu};for(const e in ls){const r=ls[e];for(const n in as)r[e+"-"+n]=as[n]}function ss(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Ry(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=Xu(i,{...o,width:r.width+"",height:r.height+""}),l=Iy(a),s=t.style,c={"--svg":l,width:ss(o.width),height:ss(o.height),...n?co:Zu};for(const u in c)s.setProperty(u,c[u]);return t}let Or;function Dy(){try{Or=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Or=null}}function Ty(e){return Or===void 0&&Dy(),Or?Or.createHTML(e):e}function Py(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=Xu(e.body,n);return r.innerHTML=Ty(i),r.firstChild}function cs(e,r){const n=r.icon.data,t=r.customisations,i=Yu(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=Py(i);break;default:a=Ry(i,{...Jr,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function us(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function _y(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Di(this);os(l,s),this._state=us({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Di(this),c=this._state;s!==c.inline&&(c.inline=s,os(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Di(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}cs(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=Kl(this);(l.attrMode!==c||Mb(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=ly(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const h={value:c,name:u,data:f};h.data?this._gotIconData(h):d.icon=h});s.data?this._gotIconData(s):this._state=us(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,Kl(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=sy(l.data.body,c),f=this._state.inline;cs(this._shadowRoot,this._state={rendered:!0,icon:l,inline:f,customisations:s,attrMode:c,renderedMode:u})}};i.forEach(l=>{l in o.prototype||Object.defineProperty(o.prototype,l,{get:function(){return this.getAttribute(l)},set:function(s){s!==null?this.setAttribute(l,s):this.removeAttribute(l)}})});const a=Qu();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const ky=_y()||Qu(),{enableCache:zR,disableCache:jR,iconExists:FR,getIcon:BR,listIcons:GR,addIcon:$R,addCollection:WR,calculateSize:HR,buildIcon:UR,loadIcons:qR,loadIcon:VR,addAPIProvider:KR,_api:YR}=ky,At=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:At(t[n],r,n)}):r(t)),ed=(e,r="children")=>{const n=[];return At(e,t=>n.push(t),r),n},Jo=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=Jo(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),td=e=>/^https?:\/\//.test(e),Oy=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)},rd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>Oy(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},Ey=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((p,g)=>p+i+(g[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,h=p=>f>s-d&&u<n-1&&f+p>s+d;return e.forEach(p=>{const g=i+(p[a]?.length||0)*o;t&&h(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&h(g)&&(u++,f=0,c[u]=[]),c[u].push({...p,group:!0}),f+=i,p[a]&&p[a].forEach(m=>{t&&h(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c},Ny=(e,r)=>{const n=o=>{const a=o.match(/^(\d+\.\d+\.\d+(?:-[^-]+?-\d{8}))/);return a?a[1]:o},t=n(e),i=n(r);return t===i&&e!==r?!1:ih.gte(t,i)};function Qe({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=I.useState(!1),[l,s]=I.useState(!0);if(wo(async()=>{s(!0);try{await Co(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),td(e))return v.jsx(ni,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?v.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?v.jsx(ni,{component:"span",...t,sx:i,children:v.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),v.jsx(ni,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}const My=e=>e.from!=="team-tmpl";function Ay({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&oh(e.slice(0,t-1),r.slice(0,i-1)))}function nd({treeNode:e}){const{locale:r}=Oe(),{blocklet:n}=Nt(),t=n.environments.find(a=>a.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=ge(a=>{if(a?.startsWith("/"))try{return new URL(a,t?.value).href}catch{console.error("Failed to parse url",{url:a,origin:t?.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return Yt(a)&&(s=a[r]),!I.isValidElement(l)&&Yt(l)&&(c=l[r]),v.jsxs(ie,{sx:{display:"flex",alignItems:"center"},children:[v.jsx(Re,{variant:"subtitle1",sx:{fontSize:16},children:s}),l&&v.jsx(Re,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:c})]})}return v.jsxs(v.Fragment,{children:[e.icon&&(Io(i(e.icon))?v.jsx(Qe,{size:16,style:{marginRight:4},icon:i(e.icon)}):v.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}nd.propTypes={treeNode:S.object.isRequired};const Ly=mt(ie)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function id({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),v.jsx(Ly,{children:v.jsx(ep,{backend:tp,...i,children:v.jsx(Iv,{generateNodeProps:o=>{const a=My(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?v.jsx(ye,{icon:"ic:round-drag-indicator"}):v.jsx(ie,{sx:{width:16,height:16}}),title:v.jsx(nd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Ay,theme:_b})})})}id.propTypes={treeData:S.object.isRequired,setTreeData:S.func,renderActions:S.func};var zy=tc();const jy=Ln(zy),ln="en";function od({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},locale:t=ln,locales:i=[],localeMap:o={},onRemoveLocale:a=()=>{}}){const{t:l}=Oe(),s=I.useRef(),[c,u]=I.useState(null),f=or({localeList:[],inputLocale:"",localeError:""}),d=I.useMemo(()=>!!c,[c]),h=I.useMemo(()=>i.includes(t)?t:ln,[i,t]),p=I.useMemo(()=>Object.keys(Dt(o,[...f.localeList,ln])).map(x=>({title:o[x],value:x})),[f.localeList]),g=I.useMemo(()=>`Default (${o[ln]||Object.values(o)?.[0]})`,[o]);I.useEffect(()=>{f.localeList=[...i]},[i,f]),Yh("enter",()=>{setTimeout(()=>{b()})},{target:s});function m(x){return x?x==="en"||f.localeList.includes(x)?l("navigation.form.localeExists",{value:x}):!0:l("common.requiredErrorText",{name:"Locale"})}function y(x=""){const D=x?.trim(),C=m(D);return C!==!0?f.localeError=C:f.localeError="",C}function b(){const x=f.inputLocale?.trim();y(x)===!0&&(w(),f.localeList.push(x),r(x))}function w(){u(null),f.inputLocale="",f.localeError=""}function P(x,D){x.preventDefault(),x.stopPropagation(),f.localeList=Tc(f.localeList,D),a(D)}function k(x){const{value:D}=x.target;y(D),f.inputLocale=D}return v.jsxs(v.Fragment,{children:[v.jsxs(hp,{sx:e,value:h,onChange:(x,D)=>{n(D)},children:[v.jsx(La,{label:g,value:"en"}),f.localeList.map(x=>v.jsx(La,{sx:{position:"relative"},label:v.jsxs(v.Fragment,{children:[o[x],v.jsx(ke,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:D=>{P(D,x)},children:v.jsx(ye,{icon:"mdi:close",height:14})})]}),value:x},x)),v.jsx(ke,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:x=>{u(x.currentTarget)},children:v.jsx(ye,{icon:"mdi:plus"})})]}),v.jsx(Fi,{open:d,anchorEl:c,onClose:w,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:v.jsxs(ie,{sx:{p:2,width:"270px"},children:[v.jsx(Re,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),v.jsx(ie,{sx:{mt:1},children:v.jsx(Wi,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:p,onChange:k,error:!!f.localeError,helperText:f.localeError||" "})}),v.jsx(ie,{sx:{display:"flex",justifyContent:"flex-end"},children:v.jsx(Zt,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}od.propTypes={sx:S.any,onAdd:S.func,onChange:S.func,onRemoveLocale:S.func,locale:S.string,localeMap:S.object,locales:S.array};const Qo=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function ad(e,r,n=5e3){for(const t of Qo){const i=Ue(t,e);try{return await gp.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 Fy({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 ad("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const sn=new Map;async function By(e){if(sn.has(e))return sn.get(e);const r=(async()=>{const{data:n}=await ad("/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)})();sn.set(e,r);try{return await r}catch(n){throw sn.delete(e),n}}function Gy(e){return Ue(Qo[0],`${e}.svg`)}function $y(e){try{const r=new URL(e);for(const n of Qo)if(r.origin===n)return ah(r.pathname).replace(".svg","");return""}catch{return""}}function Wy(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Io(e)&&(n=$y(e))),{isIconId:r,iconId:n}}const Hy=I.lazy(()=>dh(()=>import("./index-D1w_phcb.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}))),ds=qe(Qe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function ld({icon:e,...r}){const[n,t]=I.useState(!1);return wo(async()=>{t(!1),await Co(e),t(!0)},[e]),e?n?v.jsx(ye,{icon:e,...r}):v.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):v.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}ld.propTypes={icon:S.string.isRequired};function uo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=ic(),{blocklet:u}=Nt(),f=jn(ee=>ee.breakpoints.down("md")),d=u.environments.find(ee=>ee.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),h=l(),p=I.useRef(null),g=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Oe(),{isIconId:w,iconId:P}=Wy(e),[k,x]=I.useState(null),{onChange:D,onBlur:C,sx:T,...R}=a,E=i.includes("upload"),j=i.includes("select"),N=Ue(s,"/api/media/upload",u.appPid),U=or({showPopover:!1}),z=ge(ee=>{if(ee?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(ee,q).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[d?.value,c]),G=ge(async ee=>await p.current.getUploader().uploadFile(ee)),W=ge(()=>{x(null)}),V=ge(()=>{j&&x(m.current)}),Q=ge(async ee=>{try{if(o==="url"){const q=Gy(ee),re=await lh(q,{width:128,height:128}),F=await sh(re,ee);await G(F)}else D?.(ee)}catch(q){console.error("Failed to pick icon:",q)}W()}),te=ge(ee=>{ee.stopPropagation(),g.current.open(),W()}),X=ge(ee=>{a?.onChange?.(ee.data.url)});return v.jsxs(v.Fragment,{children:[v.jsx(Ht,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:j?V:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:v.jsx(Bi,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(U.showPopover=!0)},onMouseLeave:()=>{U.showPopover=!1},children:v.jsx(ds,{size:28,icon:z(e),alt:"Error"})}),endAdornment:v.jsxs(Bi,{position:"end",children:[v.jsx(ke,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),D("")},children:v.jsx(Rc,{style:{fontSize:18}})}),E&&v.jsx(ch,{title:y("common.upload"),children:v.jsx(ke,{disableFocusRipple:!1,disableRipple:!1,onClick:te,children:v.jsx(ld,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&v.jsx(ie,{component:pp,sx:{mr:"-6px",fontSize:24,transform:k?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&v.jsx(Fi,{open:!!k,anchorEl:k,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:W,children:v.jsx(sd,{label:n,placeholder:t,value:w?P:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:Q,onClose:W})}),v.jsx(fo,{ref:p,locale:b,apiPath:N,headers:h,imageEditorProps:{},onUploadFinish:X}),v.jsx(fo,{ref:g,locale:b,apiPath:N,headers:h,onUploadFinish:X}),v.jsx(Fi,{sx:{pointerEvents:"none"},open:U.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{U.showPopover=!1},disableRestoreFocus:!0,children:v.jsx(ds,{size:120,icon:z(e),alt:"Error"})})]})}uo.propTypes={value:S.string.isRequired,label:S.any,placeholder:S.any,helperText:S.string,methods:S.arrayOf(S.oneOf(["select","upload"])),iconifyShape:S.oneOf(["id","url"])};function sd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[h,p]=I.useState(!1),g=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:w}=Oe(),P=96,k=ge(()=>{!b.current||c||(u(!0),setTimeout(()=>{const C=y.current+1,T=(C-1)*P,R=C*P,E=m.current.slice(T,R);s(j=>[...j,...E]),y.current=C,b.current=R<m.current.length,u(!1)},300))}),x=ge(C=>{m.current=C,y.current=1,b.current=C.length>P;const T=C.slice(0,P);s(T),p(C.length===0),b.current&&k()}),{run:D}=oc(async C=>{if(C){u(!0);try{const{icons:T}=await Fy({keyword:C});x(T)}catch(T){console.error("Failed to search icons:",T),p(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const C=()=>{if(!g.current)return;const{scrollTop:R,scrollHeight:E,clientHeight:j}=g.current;(R+j>=E-150||E<=j)&&k()},T=g.current;return T&&(T.addEventListener("scroll",C),C()),()=>{T&&T.removeEventListener("scroll",C)}},[k,c]),wo(async()=>{if(f)D(f);else{u(!0);try{const C=await By("mdi-light");x(C)}catch(C){console.error("Failed to fetch default icons:",C),p(!0)}finally{u(!1)}}},[f,D,x]),v.jsxs(Uy,{ref:g,sx:t,...a,children:[v.jsxs(ie,{className:"icon-picker-input",children:[v.jsx(Ht,{label:w("navigation.form.searchIcons"),placeholder:w("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:C=>d(C.target.value),slotProps:{input:{endAdornment:v.jsx(ke,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:v.jsx(Rc,{style:{fontSize:18}})})}}}),v.jsx(Zt,{onClick:o,children:w("common.cancel")})]}),v.jsxs(ie,{children:[l.length>0&&v.jsx(ie,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(C=>v.jsx(qy,{$active:n===C,onClick:()=>{i(C)},children:v.jsx(ye,{icon:C,width:"32",height:"32"})},C))}),h&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:v.jsx(ie,{sx:{textAlign:"center"},children:"No matching results"})}),c&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center"},children:v.jsx(uh,{size:20})})]})]})}sd.propTypes={label:S.any,placeholder:S.any,value:S.string,sx:S.object,onPick:S.func.isRequired,onClose:S.func.isRequired};const Uy=qe(ie)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),qy=qe(ke,{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 fo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return v.jsx(I.Suspense,{children:v.jsx(Hy,{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}})})}fo.propTypes={ref:S.any,locale:S.string,apiPath:S.string,headers:S.object,imageEditorProps:S.object,onUploadFinish:S.func};const fs=24,hs=48,ps="add",$e="en",gs={title:{[$e]:""},description:{[$e]:""},link:{[$e]:""}};function vs(e){return Tc(Array.from(new Set(Ie.NAVIGATION_I18N_FIELDS.flatMap(r=>Yt(e[r])?Object.keys(e[r]):[]))),$e)}S.string.isRequired;function Xo({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ic(),{t:l,locale:s}=Oe(),{blocklet:c}=Nt(),u=I.useMemo(()=>{const _=c.environments.find(A=>A.key==="BLOCKLET_APP_LANGUAGES");return(_?_.value.split(","):["en","zh"]).filter(A=>kt.SUPPORTED_LANGUAGES[A]).reduce((A,$)=>(A[$]=kt.SUPPORTED_LANGUAGES[$].nativeName,A),{})},[c.environments]),f=I.useRef(()=>{}),d=or({isRoot:!0,type:ps,linkDisabled:!1,locale:$e,formState:Ge(gs),get localeList(){return vs(d.formState)}}),{handleSubmit:h,control:p,reset:g,setValue:m,clearErrors:y,formState:{errors:b}}=dp({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{Ie.NAVIGATION_I18N_FIELDS.forEach(_=>m(_,d.formState[_][d.locale]))},[m,d.locale]);const w=fp({control:p}),P=w.component,k=w.title,x=w.description,D=w.link,C=w.parent;I.useEffect(()=>{d.formState.title[d.locale]=k},[k]),I.useEffect(()=>{d.formState.description[d.locale]=x},[x]),I.useEffect(()=>{d.formState.link[d.locale]=D},[D]),I.useEffect(()=>{i?.(w)},[w,i]);const T=I.useMemo(()=>t.find(O=>P?n.find($=>$.name===P).did===O.id:O.id===C),[n,t,P,C]),R=I.useMemo(()=>{if(T?.component){const _=n.find(J=>J.name===T.component),{link:O}=_||{},A=Yt(O)?O[d.locale]:O;if(P)return Ra(A);const $=Yt(T.link)?T.link[d.locale]:T.link;return Ra(Ue(A,$||"/"))}return null},[n,d.locale,T,P]),E=I.useMemo(()=>{const{component:_}=T||{},O=n.find(J=>J.name===_),{navigation:A=[]}=O||{};return Ee.flattenNavigation(A,{transform(J,oe){return oe?.section&&(J.section=J.section||oe.section),J}}).filter(J=>J.link).filter(J=>Ee.isMatchSection(J.section,r)).map(J=>({label:J.link,title:J.title[s]||J.title}))},[T,n,r,s]),j=I.useCallback(()=>{d.isRoot=!0,d.locale=$e,d.type=ps,d.linkDisabled=!1,d.formState=Ge(gs),g(),y(),f.current=()=>{}},[y,g,d]),N=I.useCallback((_={})=>(d.localeList.length>0&&Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{wp(d.formState[O]).length>1&&(_[O]=d.formState[O])}),Ro(_.role)&&(_.role=void 0),_),[d.localeList,d.formState]),U=I.useCallback(({parent:_}={},O=()=>{})=>{d.type="add",d.isRoot=!_,m("parent",_?.id),f.current=A=>{O(A)}},[m,d]),z=I.useCallback((_={},O=()=>{})=>{const{id:A,icon:$,parent:J,component:oe,role:de=[]}=_;m("id",A),m("icon",$),_.from==="team-tmpl"&&(d.linkDisabled=!0);const se=vs(_),me=(ve,ue)=>{lc(ve)?d.formState[ue]=se.reduce((be,fe)=>(be[fe]=ve,be),{[$e]:ve}):Yt(ve)?d.formState[ue]=Ge(ve):d.formState[ue]={}};Ie.NAVIGATION_I18N_FIELDS.forEach(ve=>me(_[ve],ve)),Ie.NAVIGATION_I18N_FIELDS.forEach(ve=>m(ve,d.formState[ve][d.locale])),m("component",oe),m("parent",J),m("role",de||[]),d.type="edit",d.isRoot=!J,f.current=ve=>{const ue=fh(ve,["id","title","description","icon","component","link","role"]);O(ue)}},[m,d]);function G(_){const O=_?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>fs)return l("navigation.form.titleTooLong",{len:fs})}return!0}function W(_){const O=_?.trim();return O&&O.length>hs?l("navigation.form.descriptionTooLong",{len:hs}):!0}const V=ge(_=>_?.startsWith("/")?new URL(_,window.location.origin).href:_);async function Q(_){const O=_?.trim();if(O){if(Io(V(O)))return!0;try{await Co(O)}catch{return l("navigation.form.invalidIcon")}}return!0}function te(_){const O=_?.trim();return O?Q(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}function X(_){const O=_?.trim();return O?Ee.checkLink(O)?!0:l("navigation.form.invalidLink"):d.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}const ee=I.useCallback(_=>{d.locale=_,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][_]||(d.formState[O][_]="")}),setTimeout(()=>{y()})},[y,d]),q=I.useCallback(()=>{const{title:_,link:O}=d.formState;if(r!=="bottomNavigation")for(const A of Object.keys(_)){const $=G(_[A]);if($!==!0)return $}for(const A of Object.keys(O)){const $=X(O[A]);if($!==!0)return $}return!0},[r,d.formState]),re=I.useCallback(_=>{const O=q();O===!0?f.current(N(_)):xr.error(O)},[q,N]),F=I.useCallback(_=>{d.locale=$e,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O]=Dt(d.formState[O],_)}),i?.(w)},[d,w,i]),H=I.useCallback(_=>{d.locale=_,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][_]=d.formState[O][$e]}),i?.(w),setTimeout(()=>{y()})},[y,d,w,i]);return I.useImperativeHandle(e,()=>({add:U,edit:z,resetImmediate:()=>j(),reset:()=>setTimeout(()=>j(),0),submit:h(re)}),[U,j,z,h,re]),v.jsxs(ie,{...o,children:[v.jsx(od,{sx:{mb:1},onAdd:H,onChange:ee,onRemoveLocale:F,locale:d.locale,localeMap:u,locales:d.localeList}),v.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:_})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",..._})}),r==="bottomNavigation"?v.jsx(rt,{name:"icon",control:p,rules:{validate:te},render:({field:_})=>v.jsx(uo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==$e,methods:["select"],iconifyShape:"url",..._})}):v.jsx(rt,{name:"icon",control:p,rules:{validate:Q},render:({field:_})=>v.jsx(uo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==$e,..._})}),d.isRoot&&v.jsx(rt,{name:"component",control:p,render:({field:_})=>v.jsx(Wi,{fullWidth:!0,margin:"dense",disabled:d.locale!==$e&&_.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!b?.component?.message,helperText:b?.component?.message||" ",...Dt(_,"ref")})}),!d.isRoot&&["header"].includes(r)&&v.jsx(rt,{name:"description",control:p,rules:{validate:W},render:({field:_})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:d.isEdit,error:!!b?.description?.message,helperText:b?.description?.message||" ",..._})}),v.jsx(rt,{name:"link",control:p,rules:{validate:X},render:({field:_})=>v.jsx(ac,{fullWidth:!0,margin:"dense",children:v.jsx(vp,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:d.linkDisabled,isOptionEqualToValue:O=>O.label,options:E,renderInput:O=>v.jsx(Ht,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!b?.link?.message,helperText:b?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:R?v.jsx(Bi,{position:"start",sx:{textDecoration:jy(D||"")?"line-through":""},children:R}):null}}}),renderOption:(O,A)=>v.jsxs(ie,{component:"li",...O,children:[A.label,v.jsx(Re,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:A.title})]}),margin:"dense",..._,onChange:()=>{},onInputChange:(O,A)=>{_.onChange(A)}})})}),["dashboard","sessionManager"].includes(r)&&v.jsx(rt,{name:"role",control:p,render:({field:_})=>v.jsx(Wi,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!b?.role?.message,helperText:b?.role?.message||" ",...Dt(_,"ref")})}),r==="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:_})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",..._})})]})]})}Xo.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array,onChange:S.func};function Zo({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Oe(),[o,{setTrue:a,setFalse:l}]=cp(),[s,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),d=I.useCallback(()=>{l(),u.current?.reset()},[l]),h=I.useCallback((g={},m=()=>{})=>{c("add"),u.current?.add(g,y=>m(d,y)),a()},[a,d]),p=I.useCallback((g={},m=()=>{})=>{c("edit"),u.current?.edit(g,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:h,edit:p,close:d}),[h,p,d]),v.jsx(hh,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:v.jsx(sc,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:v.jsx(Xo,{ref:u,section:r,components:n,rawNavigations:t})})}Zo.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array};function cd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Oe(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(g){g.preventDefault(),g.stopPropagation()}const f=I.useCallback(g=>{u(g),r(o)},[r,o]),d=I.useCallback(g=>{u(g),n(o)},[n,o]),h=I.useCallback(g=>{u(g),t(o)},[t,o]),p=I.useCallback(g=>{u(g),i(o)},[i,o]);return v.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&v.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:v.jsx(ke,{size:"small",color:"success",onClick:f,disabled:c,children:v.jsx(ye,{icon:"mdi:plus-box-outline"})})}),v.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:v.jsx(ke,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:v.jsx(ye,{icon:"mdi:pencil-outline"})})}),v.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:v.jsx(ke,{size:"small",color:"warning",onClick:h,disabled:c,children:o.visible===!1?v.jsx(ye,{icon:"mdi:eye-off-outline"}):v.jsx(ye,{icon:"mdi:eye-outline"})})}),v.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:v.jsx(ke,{disabled:s&&!c,size:"small",color:"error",onClick:p,children:v.jsx(ye,{icon:"mdi:delete"})})})]})}cd.propTypes={data:S.object.isRequired,className:S.string,add:S.func,edit:S.func,toggle:S.func,del:S.func,section:S.string};const Sn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Vy=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},Ky=(e,r="en")=>{if(typeof e=="string"){if(td(e)){const t=new URL(e);return t.searchParams.set("locale",r),t.href}const n=new URL(e,window.location.origin);return n.searchParams.set("locale",r),n.pathname+n.search}return typeof e=="object"?e[r]||e?.en||e?.zh:e},Qt=(e,r="en")=>{if(!e?.length)return e;const n=(t,i)=>t&&typeof t=="object"?t[i]||t?.en||t?.zh:t;return At(e,t=>({...t,title:n(t.title,r),description:n(t.description,r),link:t.items?.length?t.link:Ky(t.link,r),_rawLink:t.link}),"items")},Yy=e=>At(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Jy=e=>{if(!e?.length)return null;const r=Yy(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},ea=e=>{if(!e)return null;const r={...e};return r.theme=Vy(r.theme),r.navigation=Jy(Qy(r.navigation)),r},Qy=(e=[])=>Jo(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),ud=(e,r)=>Jo(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"),Xy={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"/>'},Zy={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 eS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(h=>h.section==="sessionManager"&&!["/sessionManager"].includes(h.id)).filter(h=>!!(h?.role||[]).includes(e?.user?.role||"guest")).map(h=>{const p=(a?.componentMountPoints||[]).find(g=>h.component===g.name);return{...h,component:p}}),s=Et(),c=I.useRef(null),u=or({open:!1}),f=ge((h=!u.open)=>{u.open=h}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:v.jsxs(ie,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[v.jsx(ke,{size:"medium",ref:c,children:v.jsx(ye,{icon:Xy,fontSize:n,style:{transform:"scale(1.08)"}})}),v.jsx(ph,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:h})=>v.jsx(gh,{onClickAway:p=>{p.preventDefault(),p.stopPropagation(),f(!1)},children:v.jsx(cc,{...h,timeout:350,children:v.jsxs(Dr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[v.jsx(vh,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:l.map(p=>v.jsx(mh,{disablePadding:!0,children:v.jsxs(mp,{href:Da(p.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[p?.component?.did?v.jsx(ie,{component:"img",src:`${uc}/blocklet/logo-bundle/${p.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):v.jsx(ye,{fontSize:50,icon:p.icon||Zy,color:s.palette.text.secondary}),v.jsx(Re,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Da(p.title,r)})]})},p.id))}),v.jsx(bh,{session:e,children:v.jsx(sc,{variant:"outlined",fullWidth:!0,href:yh,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const dd=S.shape({appLogo:S.node,appName:S.string,theme:S.shape({background:S.string}),enableConnect:S.bool,enableLocale:S.bool,navigation:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object]),icon:S.string,items:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object])}))}))}),fd=S.shape({showText:S.bool,showRole:S.bool,switchDid:S.bool,switchProfile:S.bool,switchPassport:S.bool,disableLogout:S.bool,onLogin:S.func,onLogout:S.func,onSwitchDid:S.func,onSwitchProfile:S.func,onSwitchPassport:S.func,menu:S.array,menuRender:S.func,dark:S.bool,size:S.number}),Rt={};function tS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Ue(r,uc,e);return new Sh.WsClient(n,{heartbeatIntervalMs:100*1e3})}function rS(e="admin"){return Rt[e]||(Rt[e]=tS(e)),Rt[e]}const nS=(e="admin")=>{const r=I.use(Fn),{session:n}=r??{};return!Rt[e]&&n.user&&(Rt[e]=rS(e),Rt[e].connect()),Rt[e]},iS={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>'},oS={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"/>'},aS={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 lS(){const e=Et();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=jn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const sS=e=>!Ro(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,cS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},uS=async(e,r)=>{try{return await bp.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},dS=async(e,r)=>{const{type:n,did:t}=e;return dc.isSameAddr(n,"did")?await uS(t,r)||wn.getLink(e):wn.getLink(e)},fS=async(e,r,n=!0)=>{const t=wn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof wn.Link){if(n){const o=await dS(i,r),{type:a,chainId:l,did:s}=i;return dc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},hS=e=>xh.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),pS={comment:(e,r)=>r&&r>1?v.jsxs(v.Fragment,{children:["left ",r," comments on your ",e]}):v.jsxs(v.Fragment,{children:["commented on your ",e]}),like:e=>v.jsxs(v.Fragment,{children:["liked your ",e]}),follow:()=>v.jsx(v.Fragment,{children:"followed you"}),tips:e=>v.jsxs(v.Fragment,{children:["gave tips to your ",e]}),mention:e=>v.jsxs(v.Fragment,{children:["mentioned you in ",e]}),assign:()=>v.jsx(v.Fragment,{children:"assigned you a task"})};function Wt({user:e,color:r=void 0}){const{palette:n}=Et(),t=Do(Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return v.jsx(fc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Wt.displayName="UserLink";function gS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Et(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Me(()=>{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=Me(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ge(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return v.jsx(Wt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return v.jsxs(v.Fragment,{children:[v.jsx(Wt,{user:m[0],color:c})," and ",v.jsx(Wt,{user:y,color:c})]});const b=f.length>3,w=b?f.slice(0,2):m;return v.jsxs(v.Fragment,{children:[w.map((P,k)=>v.jsxs(Z.Fragment,{children:[v.jsx(Wt,{user:P,color:c}),k<w.length-1?", ":""]},P.did)),b?`, and ${f.length-2} others`:v.jsxs(v.Fragment,{children:[", and ",v.jsx(Wt,{user:y,color:c})]})]})}),h=ge(()=>{const m=a?pS[a]:null;return m?m(s,r.length):null}),p=Me(()=>{const m=d(),y=h();return!m||!y?null:v.jsxs(v.Fragment,{children:[m," ",y]})},[a,s,f,d,h]),g=Me(()=>{if(!e)return null;const m=cS(e);return m?.targetLink?Ue(i,m.targetLink):null},[e,i]);return!a||Ro(l)?null:v.jsxs(v.Fragment,{children:[p," ",g&&v.jsx(fc,{href:g,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const vS={normal:Ta,success:iS,info:Ta,warning:oS,error:aS},mS=ar(Rh)`
43
+ */const Eu=Object.freeze({left:0,top:0,width:16,height:16}),Dn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Jr=Object.freeze({...Eu,...Dn}),ro=Object.freeze({...Jr,body:"",hidden:!1}),kb=Object.freeze({width:null,height:null}),Nu=Object.freeze({...kb,...Dn});function Ob(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 Eb=/[\s,]+/;function Nb(e,r){r.split(Eb).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Mu={...Nu,preserveAspectRatio:""};function Kl(e){const r={...Mu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=Ob(n("rotate","")),Nb(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function Mb(e,r){for(const n in Mu)if(e[n]!==r[n])return!0;return!1}const kr=/^[a-z0-9]+(-[a-z0-9]+)*$/,Qr=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!bn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!bn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!bn(l,n)?null:l}return null},bn=(e,r)=>e?!!((e.provider===""||e.provider.match(kr))&&(r&&e.prefix===""||e.prefix.match(kr))&&e.name.match(kr)):!1;function Ab(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 Yl(e,r){const n=Ab(e,r);for(const t in ro)t in Dn?t in e&&!(t in n)&&(n[t]=Dn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Lb(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function zb(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=Yl(t[l]||i[l],o)}return a(r),n.forEach(a),Yl(e,o)}function Au(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=Lb(e);for(const i in t){const o=t[i];o&&(r(i,zb(e,i,o)),n.push(i))}return n}const jb={provider:"",aliases:{},not_found:{},...Eu};function Ii(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Lu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ii(e,jb))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(kr)||typeof o.body!="string"||!Ii(o,ro))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(kr)||typeof a!="string"||!n[a]&&!t[a]||!Ii(o,ro))return null}return r}const Tn=Object.create(null);function Fb(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function gt(e,r){const n=Tn[e]||(Tn[e]=Object.create(null));return n[r]||(n[r]=Fb(e,r))}function Uo(e,r){return Lu(r)?Au(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Bb(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function Gb(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Tn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Tn[i]||{})).forEach(a=>{const l=gt(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let zr=!1;function zu(e){return typeof e=="boolean"&&(zr=e),zr}function jr(e){const r=typeof e=="string"?Qr(e,!0,zr):e;if(r){const n=gt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function ju(e,r){const n=Qr(e,!0,zr);if(!n)return!1;const t=gt(n.provider,n.prefix);return Bb(t,n.name,r)}function Jl(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),zr&&!r&&!e.prefix){let i=!1;return Lu(e)&&(e.prefix="",Au(e,(o,a)=>{a&&ju(o,a)&&(i=!0)})),i}const n=e.prefix;if(!bn({provider:r,prefix:n,name:"a"}))return!1;const t=gt(r,n);return!!Uo(t,e)}function $b(e){return!!jr(e)}function Wb(e){const r=jr(e);return r?{...Jr,...r}:null}function Hb(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=gt(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Fu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Ub(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Fu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let qb=0;function Vb(e,r,n){const t=qb++,i=Fu.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 no=Object.create(null);function Ql(e,r){no[e]=r}function io(e){return no[e]||no[""]}function Kb(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?Qr(i,r,n):i;o&&t.push(o)}),t}var Yb={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Jb(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let x=e.resources.slice(0);for(a=[];x.length>1;){const D=Math.floor(Math.random()*x.length);a.push(x[D]),x=x.slice(0,D).concat(x.slice(D+1))}a=a.concat(x)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],h=[];typeof t=="function"&&h.push(t);function p(){f&&(clearTimeout(f),f=null)}function g(){s==="pending"&&(s="aborted"),p(),d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function m(x,D){D&&(h=[]),typeof x=="function"&&h.push(x)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:g}}function b(){s="failed",h.forEach(x=>{x(void 0,u)})}function w(){d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function P(x,D,C){const T=D!=="success";switch(d=d.filter(R=>R!==x),s){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(D==="abort"){u=C,b();return}if(T){u=C,d.length||(a.length?k():b());return}if(p(),w(),!e.random){const R=e.resources.indexOf(x.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",h.forEach(R=>{R(C)})}function k(){if(s!=="pending")return;p();const x=a.shift();if(x===void 0){if(d.length){f=setTimeout(()=>{p(),s==="pending"&&(w(),b())},e.timeout);return}b();return}const D={status:"pending",resource:x,callback:(C,T)=>{P(D,C,T)}};d.push(D),c++,f=setTimeout(k,e.rotate),n(x,r,D.callback)}return setTimeout(k),y}function Bu(e){const r={...Yb,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=Jb(r,l,s,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(l){return n.find(s=>l(s))||null}return{query:i,find:o,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:t}}function qo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Un=Object.create(null),vr=["https://api.simplesvg.com","https://api.unisvg.com"],yn=[];for(;vr.length>0;)vr.length===1||Math.random()>.5?yn.push(vr.shift()):yn.push(vr.pop());Un[""]=qo({resources:["https://api.iconify.design"].concat(yn)});function Xl(e,r){const n=qo(r);return n===null?!1:(Un[e]=n,!0)}function qn(e){return Un[e]}function Qb(){return Object.keys(Un)}function Zl(){}const Ri=Object.create(null);function Xb(e){if(!Ri[e]){const r=qn(e);if(!r)return;const n=Bu(r),t={config:r,redundancy:n};Ri[e]=t}return Ri[e]}function Gu(e,r,n){let t,i;if(typeof e=="string"){const o=io(e);if(!o)return n(void 0,424),Zl;i=o.send;const a=Xb(e);a&&(t=a.redundancy)}else{const o=qo(e);if(o){t=Bu(o);const a=e.resources?e.resources[0]:"",l=io(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),Zl):t.query(r,i,n)().abort}const es="iconify2",Fr="iconify",$u=Fr+"-count",ts=Fr+"-version",Wu=36e5,Zb=168;function oo(e,r){try{return e.getItem(r)}catch{}}function Vo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function rs(e,r){try{e.removeItem(r)}catch{}}function ao(e,r){return Vo(e,$u,r.toString())}function lo(e){return parseInt(oo(e,$u))||0}const _t={local:!0,session:!0},Hu={local:new Set,session:new Set};let Ko=!1;function ey(e){Ko=e}let an=typeof window>"u"?{}:window;function Uu(e){const r=e+"Storage";try{if(an&&an[r]&&typeof an[r].length=="number")return an[r]}catch{}_t[e]=!1}function qu(e,r){const n=Uu(e);if(!n)return;const t=oo(n,ts);if(t!==es){if(t){const l=lo(n);for(let s=0;s<l;s++)rs(n,Fr+s.toString())}Vo(n,ts,es),ao(n,0);return}const i=Math.floor(Date.now()/Wu)-Zb,o=l=>{const s=Fr+l.toString(),c=oo(n,s);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,l))return!0}catch{}rs(n,s)}};let a=lo(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,ao(n,a)):Hu[e].add(l))}function Vu(){if(!Ko){ey(!0);for(const e in _t)qu(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=gt(t,i);if(!Uo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function ty(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in _t)qu(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function ry(e,r){Ko||Vu();function n(t){let i;if(!_t[t]||!(i=Uu(t)))return;const o=Hu[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=lo(i),!ao(i,a+1))return;const l={cached:Math.floor(Date.now()/Wu),provider:e.provider,data:r};return Vo(i,Fr+a.toString(),JSON.stringify(l))}r.lastModified&&!ty(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function ns(){}function ny(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ub(e)}))}function iy(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=io(n)))return;o.prepare(n,t,i).forEach(l=>{Gu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Uo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),ry(e,s)}catch(c){console.error(c)}ny(e)})})}))}const Yo=(e,r)=>{const n=Kb(e,!0,zu()),t=Hb(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,ns)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(gt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:f}=s,d=gt(c,u),h=d.pendingIcons||(d.pendingIcons=new Set);h.has(f)||(h.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&iy(s,i[c][u])}),r?Vb(r,t,o):ns},oy=e=>new Promise((r,n)=>{const t=typeof e=="string"?Qr(e,!0):e;if(!t){n(e);return}Yo([t||e],i=>{if(i.length&&t){const o=jr(t);if(o){r({...Jr,...o});return}}n(e)})});function ay(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function ly(e,r){const n=typeof e=="string"?Qr(e,!0,!0):null;if(!n){const o=ay(e);return{value:e,data:o}}const t=jr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=Yo([n],()=>r(e,n,jr(n)));return{value:e,name:n,loading:i}}function Di(e){return e.hasAttribute("inline")}let Ku=!1;try{Ku=navigator.vendor.indexOf("Apple")===0}catch{}function sy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(Ku||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const cy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function so(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(cy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=uy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const dy=e=>e==="unset"||e==="undefined"||e==="none";function Yu(e,r){const n={...Jr,...e},t={...Nu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(p=>{const g=[],m=p.hFlip,y=p.vFlip;let b=p.rotate;m?y?b+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):y&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let w;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:w=i.height/2+i.top,g.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,g.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}b%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=so(f,s/c)):(u=a==="auto"?s:a,f=l===null?so(u,c/s):l==="auto"?c:l);const d={},h=(p,g)=>{dy(g)||(d[p]=g.toString())};return h("width",u),h("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const fy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Pn=fy();function hy(e){Pn=e}function py(){return Pn}function gy(e,r){const n=qn(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function vy(e){return e===404}const my=(e,r,n)=>{const t=[],i=gy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function by(e){if(typeof e=="string"){const r=qn(e);if(r)return r.path}return"/"}const yy=(e,r,n)=>{if(!Pn){n("abort",424);return}let t=by(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Pn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(vy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Sy={prepare:my,send:yy};function is(e,r){switch(e){case"local":case"session":_t[e]=r;break;case"all":for(const n in _t)_t[n]=r;break}}const Ti="data-style";let Ju="";function xy(e){Ju=e}function os(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ti));n||(n=document.createElement("style"),n.setAttribute(Ti,Ti),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+Ju}function Qu(){Ql("",Sy),zu(!0);let e;try{e=window}catch{}if(e){if(Vu(),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"||!Jl(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;Xl(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>is(n,!0),disableCache:n=>is(n,!1),iconExists:$b,getIcon:Wb,listIcons:Gb,addIcon:ju,addCollection:Jl,calculateSize:so,buildIcon:Yu,loadIcons:Yo,loadIcon:oy,addAPIProvider:Xl,appendCustomStyle:xy,_api:{getAPIConfig:qn,setAPIModule:Ql,sendAPIQuery:Gu,setFetch:hy,getFetch:py,listAPIProviders:Qb}}}function Xu(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 wy(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Cy(e){return"data:image/svg+xml,"+wy(e)}function Iy(e){return'url("'+Cy(e)+'")'}const co={"background-color":"currentColor"},Zu={"background-color":"transparent"},as={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ls={"-webkit-mask":co,mask:co,background:Zu};for(const e in ls){const r=ls[e];for(const n in as)r[e+"-"+n]=as[n]}function ss(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Ry(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=Xu(i,{...o,width:r.width+"",height:r.height+""}),l=Iy(a),s=t.style,c={"--svg":l,width:ss(o.width),height:ss(o.height),...n?co:Zu};for(const u in c)s.setProperty(u,c[u]);return t}let Or;function Dy(){try{Or=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Or=null}}function Ty(e){return Or===void 0&&Dy(),Or?Or.createHTML(e):e}function Py(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=Xu(e.body,n);return r.innerHTML=Ty(i),r.firstChild}function cs(e,r){const n=r.icon.data,t=r.customisations,i=Yu(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=Py(i);break;default:a=Ry(i,{...Jr,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function us(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function _y(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Di(this);os(l,s),this._state=us({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Di(this),c=this._state;s!==c.inline&&(c.inline=s,os(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Di(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}cs(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=Kl(this);(l.attrMode!==c||Mb(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=ly(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const h={value:c,name:u,data:f};h.data?this._gotIconData(h):d.icon=h});s.data?this._gotIconData(s):this._state=us(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,Kl(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=sy(l.data.body,c),f=this._state.inline;cs(this._shadowRoot,this._state={rendered:!0,icon:l,inline:f,customisations:s,attrMode:c,renderedMode:u})}};i.forEach(l=>{l in o.prototype||Object.defineProperty(o.prototype,l,{get:function(){return this.getAttribute(l)},set:function(s){s!==null?this.setAttribute(l,s):this.removeAttribute(l)}})});const a=Qu();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const ky=_y()||Qu(),{enableCache:zR,disableCache:jR,iconExists:FR,getIcon:BR,listIcons:GR,addIcon:$R,addCollection:WR,calculateSize:HR,buildIcon:UR,loadIcons:qR,loadIcon:VR,addAPIProvider:KR,_api:YR}=ky,At=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:At(t[n],r,n)}):r(t)),ed=(e,r="children")=>{const n=[];return At(e,t=>n.push(t),r),n},Jo=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=Jo(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),td=e=>/^https?:\/\//.test(e),Oy=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)},rd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>Oy(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},Ey=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((p,g)=>p+i+(g[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,h=p=>f>s-d&&u<n-1&&f+p>s+d;return e.forEach(p=>{const g=i+(p[a]?.length||0)*o;t&&h(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&h(g)&&(u++,f=0,c[u]=[]),c[u].push({...p,group:!0}),f+=i,p[a]&&p[a].forEach(m=>{t&&h(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c},Ny=(e,r)=>{const n=o=>{const a=o.match(/^(\d+\.\d+\.\d+(?:-[^-]+?-\d{8}))/);return a?a[1]:o},t=n(e),i=n(r);return t===i&&e!==r?!1:ih.gte(t,i)};function Qe({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=I.useState(!1),[l,s]=I.useState(!0);if(wo(async()=>{s(!0);try{await Co(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),td(e))return v.jsx(ni,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?v.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?v.jsx(ni,{component:"span",...t,sx:i,children:v.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),v.jsx(ni,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}const My=e=>e.from!=="team-tmpl";function Ay({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&oh(e.slice(0,t-1),r.slice(0,i-1)))}function nd({treeNode:e}){const{locale:r}=Oe(),{blocklet:n}=Nt(),t=n.environments.find(a=>a.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=ge(a=>{if(a?.startsWith("/"))try{return new URL(a,t?.value).href}catch{console.error("Failed to parse url",{url:a,origin:t?.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return Yt(a)&&(s=a[r]),!I.isValidElement(l)&&Yt(l)&&(c=l[r]),v.jsxs(ie,{sx:{display:"flex",alignItems:"center"},children:[v.jsx(Re,{variant:"subtitle1",sx:{fontSize:16},children:s}),l&&v.jsx(Re,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:c})]})}return v.jsxs(v.Fragment,{children:[e.icon&&(Io(i(e.icon))?v.jsx(Qe,{size:16,style:{marginRight:4},icon:i(e.icon)}):v.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}nd.propTypes={treeNode:S.object.isRequired};const Ly=mt(ie)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function id({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),v.jsx(Ly,{children:v.jsx(ep,{backend:tp,...i,children:v.jsx(Iv,{generateNodeProps:o=>{const a=My(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?v.jsx(ye,{icon:"ic:round-drag-indicator"}):v.jsx(ie,{sx:{width:16,height:16}}),title:v.jsx(nd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Ay,theme:_b})})})}id.propTypes={treeData:S.object.isRequired,setTreeData:S.func,renderActions:S.func};var zy=tc();const jy=Ln(zy),ln="en";function od({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},locale:t=ln,locales:i=[],localeMap:o={},onRemoveLocale:a=()=>{}}){const{t:l}=Oe(),s=I.useRef(),[c,u]=I.useState(null),f=or({localeList:[],inputLocale:"",localeError:""}),d=I.useMemo(()=>!!c,[c]),h=I.useMemo(()=>i.includes(t)?t:ln,[i,t]),p=I.useMemo(()=>Object.keys(Dt(o,[...f.localeList,ln])).map(x=>({title:o[x],value:x})),[f.localeList]),g=I.useMemo(()=>`Default (${o[ln]||Object.values(o)?.[0]})`,[o]);I.useEffect(()=>{f.localeList=[...i]},[i,f]),Yh("enter",()=>{setTimeout(()=>{b()})},{target:s});function m(x){return x?x==="en"||f.localeList.includes(x)?l("navigation.form.localeExists",{value:x}):!0:l("common.requiredErrorText",{name:"Locale"})}function y(x=""){const D=x?.trim(),C=m(D);return C!==!0?f.localeError=C:f.localeError="",C}function b(){const x=f.inputLocale?.trim();y(x)===!0&&(w(),f.localeList.push(x),r(x))}function w(){u(null),f.inputLocale="",f.localeError=""}function P(x,D){x.preventDefault(),x.stopPropagation(),f.localeList=Tc(f.localeList,D),a(D)}function k(x){const{value:D}=x.target;y(D),f.inputLocale=D}return v.jsxs(v.Fragment,{children:[v.jsxs(hp,{sx:e,value:h,onChange:(x,D)=>{n(D)},children:[v.jsx(La,{label:g,value:"en"}),f.localeList.map(x=>v.jsx(La,{sx:{position:"relative"},label:v.jsxs(v.Fragment,{children:[o[x],v.jsx(ke,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:D=>{P(D,x)},children:v.jsx(ye,{icon:"mdi:close",height:14})})]}),value:x},x)),v.jsx(ke,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:x=>{u(x.currentTarget)},children:v.jsx(ye,{icon:"mdi:plus"})})]}),v.jsx(Fi,{open:d,anchorEl:c,onClose:w,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:v.jsxs(ie,{sx:{p:2,width:"270px"},children:[v.jsx(Re,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),v.jsx(ie,{sx:{mt:1},children:v.jsx(Wi,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:p,onChange:k,error:!!f.localeError,helperText:f.localeError||" "})}),v.jsx(ie,{sx:{display:"flex",justifyContent:"flex-end"},children:v.jsx(Zt,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}od.propTypes={sx:S.any,onAdd:S.func,onChange:S.func,onRemoveLocale:S.func,locale:S.string,localeMap:S.object,locales:S.array};const Qo=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function ad(e,r,n=5e3){for(const t of Qo){const i=Ue(t,e);try{return await gp.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 Fy({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 ad("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const sn=new Map;async function By(e){if(sn.has(e))return sn.get(e);const r=(async()=>{const{data:n}=await ad("/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)})();sn.set(e,r);try{return await r}catch(n){throw sn.delete(e),n}}function Gy(e){return Ue(Qo[0],`${e}.svg`)}function $y(e){try{const r=new URL(e);for(const n of Qo)if(r.origin===n)return ah(r.pathname).replace(".svg","");return""}catch{return""}}function Wy(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Io(e)&&(n=$y(e))),{isIconId:r,iconId:n}}const Hy=I.lazy(()=>dh(()=>import("./index-BMW6t5La.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}))),ds=qe(Qe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function ld({icon:e,...r}){const[n,t]=I.useState(!1);return wo(async()=>{t(!1),await Co(e),t(!0)},[e]),e?n?v.jsx(ye,{icon:e,...r}):v.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):v.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}ld.propTypes={icon:S.string.isRequired};function uo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=ic(),{blocklet:u}=Nt(),f=jn(ee=>ee.breakpoints.down("md")),d=u.environments.find(ee=>ee.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),h=l(),p=I.useRef(null),g=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Oe(),{isIconId:w,iconId:P}=Wy(e),[k,x]=I.useState(null),{onChange:D,onBlur:C,sx:T,...R}=a,E=i.includes("upload"),j=i.includes("select"),N=Ue(s,"/api/media/upload",u.appPid),U=or({showPopover:!1}),z=ge(ee=>{if(ee?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(ee,q).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[d?.value,c]),G=ge(async ee=>await p.current.getUploader().uploadFile(ee)),W=ge(()=>{x(null)}),V=ge(()=>{j&&x(m.current)}),Q=ge(async ee=>{try{if(o==="url"){const q=Gy(ee),re=await lh(q,{width:128,height:128}),F=await sh(re,ee);await G(F)}else D?.(ee)}catch(q){console.error("Failed to pick icon:",q)}W()}),te=ge(ee=>{ee.stopPropagation(),g.current.open(),W()}),X=ge(ee=>{a?.onChange?.(ee.data.url)});return v.jsxs(v.Fragment,{children:[v.jsx(Ht,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:j?V:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:v.jsx(Bi,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(U.showPopover=!0)},onMouseLeave:()=>{U.showPopover=!1},children:v.jsx(ds,{size:28,icon:z(e),alt:"Error"})}),endAdornment:v.jsxs(Bi,{position:"end",children:[v.jsx(ke,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),D("")},children:v.jsx(Rc,{style:{fontSize:18}})}),E&&v.jsx(ch,{title:y("common.upload"),children:v.jsx(ke,{disableFocusRipple:!1,disableRipple:!1,onClick:te,children:v.jsx(ld,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&v.jsx(ie,{component:pp,sx:{mr:"-6px",fontSize:24,transform:k?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&v.jsx(Fi,{open:!!k,anchorEl:k,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:W,children:v.jsx(sd,{label:n,placeholder:t,value:w?P:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:Q,onClose:W})}),v.jsx(fo,{ref:p,locale:b,apiPath:N,headers:h,imageEditorProps:{},onUploadFinish:X}),v.jsx(fo,{ref:g,locale:b,apiPath:N,headers:h,onUploadFinish:X}),v.jsx(Fi,{sx:{pointerEvents:"none"},open:U.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{U.showPopover=!1},disableRestoreFocus:!0,children:v.jsx(ds,{size:120,icon:z(e),alt:"Error"})})]})}uo.propTypes={value:S.string.isRequired,label:S.any,placeholder:S.any,helperText:S.string,methods:S.arrayOf(S.oneOf(["select","upload"])),iconifyShape:S.oneOf(["id","url"])};function sd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[h,p]=I.useState(!1),g=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:w}=Oe(),P=96,k=ge(()=>{!b.current||c||(u(!0),setTimeout(()=>{const C=y.current+1,T=(C-1)*P,R=C*P,E=m.current.slice(T,R);s(j=>[...j,...E]),y.current=C,b.current=R<m.current.length,u(!1)},300))}),x=ge(C=>{m.current=C,y.current=1,b.current=C.length>P;const T=C.slice(0,P);s(T),p(C.length===0),b.current&&k()}),{run:D}=oc(async C=>{if(C){u(!0);try{const{icons:T}=await Fy({keyword:C});x(T)}catch(T){console.error("Failed to search icons:",T),p(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const C=()=>{if(!g.current)return;const{scrollTop:R,scrollHeight:E,clientHeight:j}=g.current;(R+j>=E-150||E<=j)&&k()},T=g.current;return T&&(T.addEventListener("scroll",C),C()),()=>{T&&T.removeEventListener("scroll",C)}},[k,c]),wo(async()=>{if(f)D(f);else{u(!0);try{const C=await By("mdi-light");x(C)}catch(C){console.error("Failed to fetch default icons:",C),p(!0)}finally{u(!1)}}},[f,D,x]),v.jsxs(Uy,{ref:g,sx:t,...a,children:[v.jsxs(ie,{className:"icon-picker-input",children:[v.jsx(Ht,{label:w("navigation.form.searchIcons"),placeholder:w("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:C=>d(C.target.value),slotProps:{input:{endAdornment:v.jsx(ke,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:v.jsx(Rc,{style:{fontSize:18}})})}}}),v.jsx(Zt,{onClick:o,children:w("common.cancel")})]}),v.jsxs(ie,{children:[l.length>0&&v.jsx(ie,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(C=>v.jsx(qy,{$active:n===C,onClick:()=>{i(C)},children:v.jsx(ye,{icon:C,width:"32",height:"32"})},C))}),h&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:v.jsx(ie,{sx:{textAlign:"center"},children:"No matching results"})}),c&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center"},children:v.jsx(uh,{size:20})})]})]})}sd.propTypes={label:S.any,placeholder:S.any,value:S.string,sx:S.object,onPick:S.func.isRequired,onClose:S.func.isRequired};const Uy=qe(ie)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),qy=qe(ke,{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 fo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return v.jsx(I.Suspense,{children:v.jsx(Hy,{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}})})}fo.propTypes={ref:S.any,locale:S.string,apiPath:S.string,headers:S.object,imageEditorProps:S.object,onUploadFinish:S.func};const fs=24,hs=48,ps="add",$e="en",gs={title:{[$e]:""},description:{[$e]:""},link:{[$e]:""}};function vs(e){return Tc(Array.from(new Set(Ie.NAVIGATION_I18N_FIELDS.flatMap(r=>Yt(e[r])?Object.keys(e[r]):[]))),$e)}S.string.isRequired;function Xo({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ic(),{t:l,locale:s}=Oe(),{blocklet:c}=Nt(),u=I.useMemo(()=>{const _=c.environments.find(A=>A.key==="BLOCKLET_APP_LANGUAGES");return(_?_.value.split(","):["en","zh"]).filter(A=>kt.SUPPORTED_LANGUAGES[A]).reduce((A,$)=>(A[$]=kt.SUPPORTED_LANGUAGES[$].nativeName,A),{})},[c.environments]),f=I.useRef(()=>{}),d=or({isRoot:!0,type:ps,linkDisabled:!1,locale:$e,formState:Ge(gs),get localeList(){return vs(d.formState)}}),{handleSubmit:h,control:p,reset:g,setValue:m,clearErrors:y,formState:{errors:b}}=dp({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{Ie.NAVIGATION_I18N_FIELDS.forEach(_=>m(_,d.formState[_][d.locale]))},[m,d.locale]);const w=fp({control:p}),P=w.component,k=w.title,x=w.description,D=w.link,C=w.parent;I.useEffect(()=>{d.formState.title[d.locale]=k},[k]),I.useEffect(()=>{d.formState.description[d.locale]=x},[x]),I.useEffect(()=>{d.formState.link[d.locale]=D},[D]),I.useEffect(()=>{i?.(w)},[w,i]);const T=I.useMemo(()=>t.find(O=>P?n.find($=>$.name===P).did===O.id:O.id===C),[n,t,P,C]),R=I.useMemo(()=>{if(T?.component){const _=n.find(J=>J.name===T.component),{link:O}=_||{},A=Yt(O)?O[d.locale]:O;if(P)return Ra(A);const $=Yt(T.link)?T.link[d.locale]:T.link;return Ra(Ue(A,$||"/"))}return null},[n,d.locale,T,P]),E=I.useMemo(()=>{const{component:_}=T||{},O=n.find(J=>J.name===_),{navigation:A=[]}=O||{};return Ee.flattenNavigation(A,{transform(J,oe){return oe?.section&&(J.section=J.section||oe.section),J}}).filter(J=>J.link).filter(J=>Ee.isMatchSection(J.section,r)).map(J=>({label:J.link,title:J.title[s]||J.title}))},[T,n,r,s]),j=I.useCallback(()=>{d.isRoot=!0,d.locale=$e,d.type=ps,d.linkDisabled=!1,d.formState=Ge(gs),g(),y(),f.current=()=>{}},[y,g,d]),N=I.useCallback((_={})=>(d.localeList.length>0&&Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{wp(d.formState[O]).length>1&&(_[O]=d.formState[O])}),Ro(_.role)&&(_.role=void 0),_),[d.localeList,d.formState]),U=I.useCallback(({parent:_}={},O=()=>{})=>{d.type="add",d.isRoot=!_,m("parent",_?.id),f.current=A=>{O(A)}},[m,d]),z=I.useCallback((_={},O=()=>{})=>{const{id:A,icon:$,parent:J,component:oe,role:de=[]}=_;m("id",A),m("icon",$),_.from==="team-tmpl"&&(d.linkDisabled=!0);const se=vs(_),me=(ve,ue)=>{lc(ve)?d.formState[ue]=se.reduce((be,fe)=>(be[fe]=ve,be),{[$e]:ve}):Yt(ve)?d.formState[ue]=Ge(ve):d.formState[ue]={}};Ie.NAVIGATION_I18N_FIELDS.forEach(ve=>me(_[ve],ve)),Ie.NAVIGATION_I18N_FIELDS.forEach(ve=>m(ve,d.formState[ve][d.locale])),m("component",oe),m("parent",J),m("role",de||[]),d.type="edit",d.isRoot=!J,f.current=ve=>{const ue=fh(ve,["id","title","description","icon","component","link","role"]);O(ue)}},[m,d]);function G(_){const O=_?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>fs)return l("navigation.form.titleTooLong",{len:fs})}return!0}function W(_){const O=_?.trim();return O&&O.length>hs?l("navigation.form.descriptionTooLong",{len:hs}):!0}const V=ge(_=>_?.startsWith("/")?new URL(_,window.location.origin).href:_);async function Q(_){const O=_?.trim();if(O){if(Io(V(O)))return!0;try{await Co(O)}catch{return l("navigation.form.invalidIcon")}}return!0}function te(_){const O=_?.trim();return O?Q(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}function X(_){const O=_?.trim();return O?Ee.checkLink(O)?!0:l("navigation.form.invalidLink"):d.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}const ee=I.useCallback(_=>{d.locale=_,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][_]||(d.formState[O][_]="")}),setTimeout(()=>{y()})},[y,d]),q=I.useCallback(()=>{const{title:_,link:O}=d.formState;if(r!=="bottomNavigation")for(const A of Object.keys(_)){const $=G(_[A]);if($!==!0)return $}for(const A of Object.keys(O)){const $=X(O[A]);if($!==!0)return $}return!0},[r,d.formState]),re=I.useCallback(_=>{const O=q();O===!0?f.current(N(_)):xr.error(O)},[q,N]),F=I.useCallback(_=>{d.locale=$e,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O]=Dt(d.formState[O],_)}),i?.(w)},[d,w,i]),H=I.useCallback(_=>{d.locale=_,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][_]=d.formState[O][$e]}),i?.(w),setTimeout(()=>{y()})},[y,d,w,i]);return I.useImperativeHandle(e,()=>({add:U,edit:z,resetImmediate:()=>j(),reset:()=>setTimeout(()=>j(),0),submit:h(re)}),[U,j,z,h,re]),v.jsxs(ie,{...o,children:[v.jsx(od,{sx:{mb:1},onAdd:H,onChange:ee,onRemoveLocale:F,locale:d.locale,localeMap:u,locales:d.localeList}),v.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:_})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",..._})}),r==="bottomNavigation"?v.jsx(rt,{name:"icon",control:p,rules:{validate:te},render:({field:_})=>v.jsx(uo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==$e,methods:["select"],iconifyShape:"url",..._})}):v.jsx(rt,{name:"icon",control:p,rules:{validate:Q},render:({field:_})=>v.jsx(uo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==$e,..._})}),d.isRoot&&v.jsx(rt,{name:"component",control:p,render:({field:_})=>v.jsx(Wi,{fullWidth:!0,margin:"dense",disabled:d.locale!==$e&&_.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!b?.component?.message,helperText:b?.component?.message||" ",...Dt(_,"ref")})}),!d.isRoot&&["header"].includes(r)&&v.jsx(rt,{name:"description",control:p,rules:{validate:W},render:({field:_})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:d.isEdit,error:!!b?.description?.message,helperText:b?.description?.message||" ",..._})}),v.jsx(rt,{name:"link",control:p,rules:{validate:X},render:({field:_})=>v.jsx(ac,{fullWidth:!0,margin:"dense",children:v.jsx(vp,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:d.linkDisabled,isOptionEqualToValue:O=>O.label,options:E,renderInput:O=>v.jsx(Ht,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!b?.link?.message,helperText:b?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:R?v.jsx(Bi,{position:"start",sx:{textDecoration:jy(D||"")?"line-through":""},children:R}):null}}}),renderOption:(O,A)=>v.jsxs(ie,{component:"li",...O,children:[A.label,v.jsx(Re,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:A.title})]}),margin:"dense",..._,onChange:()=>{},onInputChange:(O,A)=>{_.onChange(A)}})})}),["dashboard","sessionManager"].includes(r)&&v.jsx(rt,{name:"role",control:p,render:({field:_})=>v.jsx(Wi,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!b?.role?.message,helperText:b?.role?.message||" ",...Dt(_,"ref")})}),r==="bottomNavigation"&&v.jsx(rt,{name:"title",control:p,rules:{validate:G},render:({field:_})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",..._})})]})]})}Xo.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array,onChange:S.func};function Zo({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Oe(),[o,{setTrue:a,setFalse:l}]=cp(),[s,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),d=I.useCallback(()=>{l(),u.current?.reset()},[l]),h=I.useCallback((g={},m=()=>{})=>{c("add"),u.current?.add(g,y=>m(d,y)),a()},[a,d]),p=I.useCallback((g={},m=()=>{})=>{c("edit"),u.current?.edit(g,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:h,edit:p,close:d}),[h,p,d]),v.jsx(hh,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:v.jsx(sc,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:v.jsx(Xo,{ref:u,section:r,components:n,rawNavigations:t})})}Zo.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array};function cd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Oe(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(g){g.preventDefault(),g.stopPropagation()}const f=I.useCallback(g=>{u(g),r(o)},[r,o]),d=I.useCallback(g=>{u(g),n(o)},[n,o]),h=I.useCallback(g=>{u(g),t(o)},[t,o]),p=I.useCallback(g=>{u(g),i(o)},[i,o]);return v.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&v.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:v.jsx(ke,{size:"small",color:"success",onClick:f,disabled:c,children:v.jsx(ye,{icon:"mdi:plus-box-outline"})})}),v.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:v.jsx(ke,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:v.jsx(ye,{icon:"mdi:pencil-outline"})})}),v.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:v.jsx(ke,{size:"small",color:"warning",onClick:h,disabled:c,children:o.visible===!1?v.jsx(ye,{icon:"mdi:eye-off-outline"}):v.jsx(ye,{icon:"mdi:eye-outline"})})}),v.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:v.jsx(ke,{disabled:s&&!c,size:"small",color:"error",onClick:p,children:v.jsx(ye,{icon:"mdi:delete"})})})]})}cd.propTypes={data:S.object.isRequired,className:S.string,add:S.func,edit:S.func,toggle:S.func,del:S.func,section:S.string};const Sn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Vy=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},Ky=(e,r="en")=>{if(typeof e=="string"){if(td(e)){const t=new URL(e);return t.searchParams.set("locale",r),t.href}const n=new URL(e,window.location.origin);return n.searchParams.set("locale",r),n.pathname+n.search}return typeof e=="object"?e[r]||e?.en||e?.zh:e},Qt=(e,r="en")=>{if(!e?.length)return e;const n=(t,i)=>t&&typeof t=="object"?t[i]||t?.en||t?.zh:t;return At(e,t=>({...t,title:n(t.title,r),description:n(t.description,r),link:t.items?.length?t.link:Ky(t.link,r),_rawLink:t.link}),"items")},Yy=e=>At(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Jy=e=>{if(!e?.length)return null;const r=Yy(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},ea=e=>{if(!e)return null;const r={...e};return r.theme=Vy(r.theme),r.navigation=Jy(Qy(r.navigation)),r},Qy=(e=[])=>Jo(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),ud=(e,r)=>Jo(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"),Xy={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"/>'},Zy={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 eS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(h=>h.section==="sessionManager"&&!["/sessionManager"].includes(h.id)).filter(h=>!!(h?.role||[]).includes(e?.user?.role||"guest")).map(h=>{const p=(a?.componentMountPoints||[]).find(g=>h.component===g.name);return{...h,component:p}}),s=Et(),c=I.useRef(null),u=or({open:!1}),f=ge((h=!u.open)=>{u.open=h}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:v.jsxs(ie,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[v.jsx(ke,{size:"medium",ref:c,children:v.jsx(ye,{icon:Xy,fontSize:n,style:{transform:"scale(1.08)"}})}),v.jsx(ph,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:h})=>v.jsx(gh,{onClickAway:p=>{p.preventDefault(),p.stopPropagation(),f(!1)},children:v.jsx(cc,{...h,timeout:350,children:v.jsxs(Dr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[v.jsx(vh,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:l.map(p=>v.jsx(mh,{disablePadding:!0,children:v.jsxs(mp,{href:Da(p.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[p?.component?.did?v.jsx(ie,{component:"img",src:`${uc}/blocklet/logo-bundle/${p.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):v.jsx(ye,{fontSize:50,icon:p.icon||Zy,color:s.palette.text.secondary}),v.jsx(Re,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Da(p.title,r)})]})},p.id))}),v.jsx(bh,{session:e,children:v.jsx(sc,{variant:"outlined",fullWidth:!0,href:yh,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const dd=S.shape({appLogo:S.node,appName:S.string,theme:S.shape({background:S.string}),enableConnect:S.bool,enableLocale:S.bool,navigation:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object]),icon:S.string,items:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object])}))}))}),fd=S.shape({showText:S.bool,showRole:S.bool,switchDid:S.bool,switchProfile:S.bool,switchPassport:S.bool,disableLogout:S.bool,onLogin:S.func,onLogout:S.func,onSwitchDid:S.func,onSwitchProfile:S.func,onSwitchPassport:S.func,menu:S.array,menuRender:S.func,dark:S.bool,size:S.number}),Rt={};function tS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Ue(r,uc,e);return new Sh.WsClient(n,{heartbeatIntervalMs:100*1e3})}function rS(e="admin"){return Rt[e]||(Rt[e]=tS(e)),Rt[e]}const nS=(e="admin")=>{const r=I.use(Fn),{session:n}=r??{};return!Rt[e]&&n.user&&(Rt[e]=rS(e),Rt[e].connect()),Rt[e]},iS={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>'},oS={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"/>'},aS={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 lS(){const e=Et();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=jn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const sS=e=>!Ro(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,cS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},uS=async(e,r)=>{try{return await bp.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},dS=async(e,r)=>{const{type:n,did:t}=e;return dc.isSameAddr(n,"did")?await uS(t,r)||wn.getLink(e):wn.getLink(e)},fS=async(e,r,n=!0)=>{const t=wn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof wn.Link){if(n){const o=await dS(i,r),{type:a,chainId:l,did:s}=i;return dc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},hS=e=>xh.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),pS={comment:(e,r)=>r&&r>1?v.jsxs(v.Fragment,{children:["left ",r," comments on your ",e]}):v.jsxs(v.Fragment,{children:["commented on your ",e]}),like:e=>v.jsxs(v.Fragment,{children:["liked your ",e]}),follow:()=>v.jsx(v.Fragment,{children:"followed you"}),tips:e=>v.jsxs(v.Fragment,{children:["gave tips to your ",e]}),mention:e=>v.jsxs(v.Fragment,{children:["mentioned you in ",e]}),assign:()=>v.jsx(v.Fragment,{children:"assigned you a task"})};function Wt({user:e,color:r=void 0}){const{palette:n}=Et(),t=Do(Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return v.jsx(fc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Wt.displayName="UserLink";function gS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Et(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Me(()=>{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=Me(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ge(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return v.jsx(Wt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return v.jsxs(v.Fragment,{children:[v.jsx(Wt,{user:m[0],color:c})," and ",v.jsx(Wt,{user:y,color:c})]});const b=f.length>3,w=b?f.slice(0,2):m;return v.jsxs(v.Fragment,{children:[w.map((P,k)=>v.jsxs(Z.Fragment,{children:[v.jsx(Wt,{user:P,color:c}),k<w.length-1?", ":""]},P.did)),b?`, and ${f.length-2} others`:v.jsxs(v.Fragment,{children:[", and ",v.jsx(Wt,{user:y,color:c})]})]})}),h=ge(()=>{const m=a?pS[a]:null;return m?m(s,r.length):null}),p=Me(()=>{const m=d(),y=h();return!m||!y?null:v.jsxs(v.Fragment,{children:[m," ",y]})},[a,s,f,d,h]),g=Me(()=>{if(!e)return null;const m=cS(e);return m?.targetLink?Ue(i,m.targetLink):null},[e,i]);return!a||Ro(l)?null:v.jsxs(v.Fragment,{children:[p," ",g&&v.jsx(fc,{href:g,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const vS={normal:Ta,success:iS,info:Ta,warning:oS,error:aS},mS=ar(Rh)`
44
44
  font-size: 20px;
45
45
  `,bS=ar.div`
46
46
  display: flex;
@@ -1,4 +1,4 @@
1
- import{aG as c6,j as r,r as t,bn as U1,aQ as l6,O as $,H as R,a2 as u6,b as O1,a0 as H1,f8 as e1,f as b1,F as p6,cq as k1,b9 as t1,iz as R1,m as V,cr as V1,fJ as M1,iA as C6,y as x,fd as d6,gH as h6,a4 as T1,by as G,dk as j1,N as S,L as J,iB as N1,aV as m6,dC as f6,aO as k,dc as g6,z as N,az as J1,gt as E6,f2 as A6,I as x6,dy as D6,T as b,$ as y6,D as w6,t as S6,v as l1,C as B6,iC as u1,w as I6,h9 as F6,dE as L6,gh as v6,a5 as U6,Y as n1,o as I,J as p1,x as O6,ax as H6,al as b6}from"./index-_8oRZcHP.js";import{v as C1}from"./index-DWevfoMr.js";import{f as k6}from"./index-BojVbZw0.js";import{b as R6,c as V6,d as M6}from"./spaces-GphSy-vT.js";import{u as a1}from"./blocklet-CxgGBUvX.js";import{D as T6}from"./DeleteOutline-CMvAWFzN.js";import{O as Z1}from"./OpenInNew-B8Hi9-Aa.js";import{x as j6}from"./index-DRYJ0xIl.js";import{H as N6}from"./HelpOutline-C5r6R3H8.js";import"./api-Dksjqhj9.js";const J6=c6(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"}));function Z6(){const[e,n]=t.useState(null),{blocklet:a}=a1();return t.useEffect(()=>{n(R6(a))},[a]),{storageEndpoint:e}}const P1=t.createContext({}),{Provider:P6,Consumer:He}=P1;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}=U1();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:O1.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:H1.node.isRequired};function G6(){return t.useContext(P1)}const Z=e1({});function z6({key:e}={key:"md"}){const n=b1();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||{}),Q1=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(Q1||{}),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 X6({endpoint:e,deps:n=[]}){return k1(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=R1.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
1
+ import{aG as c6,j as r,r as t,bn as U1,aQ as l6,O as $,H as R,a2 as u6,b as O1,a0 as H1,f8 as e1,f as b1,F as p6,cq as k1,b9 as t1,iz as R1,m as V,cr as V1,fJ as M1,iA as C6,y as x,fd as d6,gH as h6,a4 as T1,by as G,dk as j1,N as S,L as J,iB as N1,aV as m6,dC as f6,aO as k,dc as g6,z as N,az as J1,gt as E6,f2 as A6,I as x6,dy as D6,T as b,$ as y6,D as w6,t as S6,v as l1,C as B6,iC as u1,w as I6,h9 as F6,dE as L6,gh as v6,a5 as U6,Y as n1,o as I,J as p1,x as O6,ax as H6,al as b6}from"./index-C4mOfCm_.js";import{v as C1}from"./index-Dn78lnTO.js";import{f as k6}from"./index-BojVbZw0.js";import{b as R6,c as V6,d as M6}from"./spaces-DboV6EBE.js";import{u as a1}from"./blocklet-DmmVfj87.js";import{D as T6}from"./DeleteOutline-qcbzQjhi.js";import{O as Z1}from"./OpenInNew-CNDlD7xM.js";import{x as j6}from"./index-DRYJ0xIl.js";import{H as N6}from"./HelpOutline-Dq1Jw2rR.js";import"./api-BgPXZvcj.js";const J6=c6(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"}));function Z6(){const[e,n]=t.useState(null),{blocklet:a}=a1();return t.useEffect(()=>{n(R6(a))},[a]),{storageEndpoint:e}}const P1=t.createContext({}),{Provider:P6,Consumer:He}=P1;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}=U1();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:O1.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:H1.node.isRequired};function G6(){return t.useContext(P1)}const Z=e1({});function z6({key:e}={key:"md"}){const n=b1();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||{}),Q1=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(Q1||{}),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 X6({endpoint:e,deps:n=[]}){return k1(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=R1.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=R1.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-C_Wb23_l.js";import"./index-_8oRZcHP.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
1
+ import{m as et}from"./index-Ci4hOeJE.js";import"./index-C4mOfCm_.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1 +1 @@
1
- import{m as h,j as e,ad as j,N as o,X as g,T as _,t as b,o as n}from"./index-_8oRZcHP.js";import{C as T}from"./click-to-copy-BJD4pP2S.js";function R({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=h(),i={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(g,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(T,{"data-cy":"click-copy",children:t})]}),e.jsx(_,{component:"div",children:e.jsx(b,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(j,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,params:i.params,onConfirm:i.onConfirm,onCancel:i.onCancel})}R.propTypes={title:n.any.isRequired,keyName:n.any.isRequired,description:n.any.isRequired,confirmPlaceholder:n.any.isRequired,cancel:n.string,confirm:n.string,params:n.object,onCancel:n.func,onConfirm:n.func.isRequired};export{R as D};
1
+ import{m as h,j as e,ad as j,N as o,X as g,T as _,t as b,o as n}from"./index-C4mOfCm_.js";import{C as T}from"./click-to-copy-C9lDYNLy.js";function R({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=h(),i={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(g,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(T,{"data-cy":"click-copy",children:t})]}),e.jsx(_,{component:"div",children:e.jsx(b,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(j,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,params:i.params,onConfirm:i.onConfirm,onCancel:i.onCancel})}R.propTypes={title:n.any.isRequired,keyName:n.any.isRequired,description:n.any.isRequired,confirmPlaceholder:n.any.isRequired,cancel:n.string,confirm:n.string,params:n.object,onCancel:n.func,onConfirm:n.func.isRequired};export{R as D};
@@ -1 +1 @@
1
- import{eF as r}from"./index-_8oRZcHP.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};
1
+ import{eF as r}from"./index-C4mOfCm_.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};