@abtnode/webapp 1.17.0-beta-20251105-030013-0c24dbf6 → 1.17.0-beta-20251105-095418-158ab2fa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-Dsdzg0fF.js → AdapterDayjs-CwW3yJy6.js} +7 -7
  4. package/dist/assets/{Add-l70J_4yZ.js → Add-DHlIup-_.js} +1 -1
  5. package/dist/assets/ArrowDropDown-CGzDjHWx.js +1 -0
  6. package/dist/assets/{Autocomplete-BGzNUg3v.js → Autocomplete-CjP5JbiQ.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-qX1unYdA.js → Breadcrumbs-CqLmLkRY.js} +1 -1
  8. package/dist/assets/{ButtonGroup-DWV84mOp.js → ButtonGroup-CxvwZYcf.js} +1 -1
  9. package/dist/assets/{CSSTransition-D0ZJqc3V.js → CSSTransition-Dlzcywxj.js} +1 -1
  10. package/dist/assets/{CallMerge-47e0SFej.js → CallMerge-994DHlWi.js} +1 -1
  11. package/dist/assets/{CardContent-049bCJeP.js → CardContent-H7xoxNm3.js} +1 -1
  12. package/dist/assets/{ChevronLeft-xNPAnZUM.js → ChevronLeft-PICm9Lp2.js} +1 -1
  13. package/dist/assets/{ChevronRight-hEVn0ieo.js → ChevronRight-DvTYd9dZ.js} +1 -1
  14. package/dist/assets/{Clear-DmQaaBy1.js → Clear-knEN1Rym.js} +1 -1
  15. package/dist/assets/{DeleteOutline-CvnvGjYc.js → DeleteOutline-CFtnGb6c.js} +1 -1
  16. package/dist/assets/{Done-rLg9w1bb.js → Done-CWlt8vvh.js} +1 -1
  17. package/dist/assets/{Edit-BLWQBSLN.js → Edit-m2IKFnlf.js} +1 -1
  18. package/dist/assets/{ErrorOutline-wpxhPFAL.js → ErrorOutline-Aey0yo8b.js} +1 -1
  19. package/dist/assets/{FilterList-CBCl7dbD.js → FilterList-DLrTgABJ.js} +1 -1
  20. package/dist/assets/{Google--H7JIVD-.js → Google-CTqQ1YFw.js} +1 -1
  21. package/dist/assets/{HelpOutline-dwnyWw6W.js → HelpOutline-DtFGcBqm.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-CqHZKzOB.js → KeyboardArrowDown-NqSrWQzL.js} +1 -1
  23. package/dist/assets/{Launch-D-brFkhF.js → Launch-CIH2TUaK.js} +1 -1
  24. package/dist/assets/{Link-D4UceNDZ.js → Link-E1Umytm1.js} +1 -1
  25. package/dist/assets/{ListItemButton-BbKr2tws.js → ListItemButton-CW7R9MJP.js} +1 -1
  26. package/dist/assets/{ListSubheader-CPl5W-Om.js → ListSubheader-DqTyGZYI.js} +1 -1
  27. package/dist/assets/{LoadingButton-yUpEuEJK.js → LoadingButton-B7A4RgXc.js} +1 -1
  28. package/dist/assets/{MoreVert-Cy81E-t5.js → MoreVert-Br73441r.js} +1 -1
  29. package/dist/assets/{OpenInNew-B2F4Jqwb.js → OpenInNew-DvFUoslf.js} +1 -1
  30. package/dist/assets/{Refresh-C7TD1E1-.js → Refresh-Cn_oUSfu.js} +1 -1
  31. package/dist/assets/{Search-nsuHiAfr.js → Search-DLfjt_el.js} +1 -1
  32. package/dist/assets/{Stepper-N4JW-HWm.js → Stepper-DM0SHspj.js} +1 -1
  33. package/dist/assets/{Switch-Ch-Dpg3J.js → Switch-IxN80sYn.js} +1 -1
  34. package/dist/assets/{TableSearch-B7cAFRBU.js → TableSearch-CTRJPVoz.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-BEbdhUkr.js → ToggleButtonGroup-BnmJuc3j.js} +1 -1
  36. package/dist/assets/{UnfoldMore-BJCswty9.js → UnfoldMore-vjg-hebM.js} +1 -1
  37. package/dist/assets/{Verified-Cj9BE95b.js → Verified-BqGCaDxj.js} +1 -1
  38. package/dist/assets/{VerifiedUser-CzoOgILE.js → VerifiedUser-DcMwBZWR.js} +1 -1
  39. package/dist/assets/{ViewList-DII-BNLQ.js → ViewList-B4TxWvPd.js} +1 -1
  40. package/dist/assets/{_createAggregator-C4guq0cF.js → _createAggregator-BiwqPoJr.js} +1 -1
  41. package/dist/assets/actions-CUKLYbJ7.js +1 -0
  42. package/dist/assets/{actions-C9R61uoD.js → actions-DupIyXVp.js} +1 -1
  43. package/dist/assets/{agreement-DtxuiQja.js → agreement-4t_ptB8q.js} +1 -1
  44. package/dist/assets/api-BIwSxGZN.js +1 -0
  45. package/dist/assets/{appearance-B_sMk1g7.js → appearance-B-2oG-Hp.js} +1 -1
  46. package/dist/assets/{audit-logs-DHuwThvE.js → audit-logs-6VSChVn8.js} +1 -1
  47. package/dist/assets/{base-chart-BuPD5Oqs.js → base-chart-B3cHgO8w.js} +1 -1
  48. package/dist/assets/{blocklet-BMb-DKa8.js → blocklet-DaethJMv.js} +1 -1
  49. package/dist/assets/{chain-DG7hV9jl.js → chain-CPj2Ti-W.js} +1 -1
  50. package/dist/assets/{click-to-copy-BlUoHpyD.js → click-to-copy-C2pxXVdR.js} +1 -1
  51. package/dist/assets/cloneDeep-D5hlC73V.js +1 -0
  52. package/dist/assets/{collapse-DKt3eXVz.js → collapse-CCV6pFIz.js} +1 -1
  53. package/dist/assets/{config-navigation-C1LKuM9I.js → config-navigation-DgXn6UKP.js} +3 -3
  54. package/dist/assets/{connect-to-UN--0_6w.js → connect-to-DwozgCen.js} +1 -1
  55. package/dist/assets/{cssMode-CLw2RNKf.js → cssMode-C8tkFEyD.js} +1 -1
  56. package/dist/assets/{delete-confirm-CCfwND5U.js → delete-confirm-BaRlJHjy.js} +1 -1
  57. package/dist/assets/{depsEqual-DZ2epQ9y.js → depsEqual-BXmAVsgz.js} +1 -1
  58. package/dist/assets/{detail-DT3mxGBF.js → detail-vdcPdsub.js} +3 -3
  59. package/dist/assets/{domains-ByJxly5j.js → domains-DSehuiMl.js} +2 -2
  60. package/dist/assets/{download-DYcl5mTN.js → download-D-z5nkup.js} +1 -1
  61. package/dist/assets/{edit.svg-DYKibMjZ.js → edit.svg-Byy8vUeF.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-DcjtgFcw.js +1 -0
  63. package/dist/assets/engine-980nsjNz.js +1 -0
  64. package/dist/assets/{freemarker2-l0VGQqvD.js → freemarker2-Ra-URazi.js} +1 -1
  65. package/dist/assets/{get-safe-url-I2vTcMcF.js → get-safe-url-DBGH2Atd.js} +1 -1
  66. package/dist/assets/getValidReactChildren-Dqpr7Uun.js +1 -0
  67. package/dist/assets/{graphqlMode-CA_yndFf.js → graphqlMode-D0L2oiQ5.js} +2 -2
  68. package/dist/assets/{handlebars-BILq1CrH.js → handlebars-C90l_-oL.js} +1 -1
  69. package/dist/assets/{html-CoOIbPZt.js → html-3kOf-Ofj.js} +1 -1
  70. package/dist/assets/{html-title-CRD93SB4.js → html-title-DWH4a57C.js} +1 -1
  71. package/dist/assets/{htmlMode-C2G2f8dC.js → htmlMode-DVDUXKH4.js} +1 -1
  72. package/dist/assets/{iframe-SmTUaAma.js → iframe-CR7NHc3k.js} +1 -1
  73. package/dist/assets/{index-CuAcM2e2.js → index-0OVtskWh.js} +1 -1
  74. package/dist/assets/{index-C5xxqnjy.js → index-7sYVHGTu.js} +1 -1
  75. package/dist/assets/{index-Ee8S2Bwe.js → index-8VHt6g-j.js} +1 -1
  76. package/dist/assets/index-B1J6NhgH.js +1 -0
  77. package/dist/assets/{index-CeSi6fPS.js → index-B3Q4caZv.js} +1 -1
  78. package/dist/assets/{index-BiowOJQr.js → index-BCO6aNYD.js} +3 -3
  79. package/dist/assets/{index-cI3GtZiR.js → index-BHOF6o2R.js} +1 -1
  80. package/dist/assets/{index-By5xDEFZ.js → index-BKYUec21.js} +1 -1
  81. package/dist/assets/{index-1q_fL1CO.js → index-BN938BAQ.js} +1 -1
  82. package/dist/assets/{index-CyeREPie.js → index-BPXg55qR.js} +1 -1
  83. package/dist/assets/{index-COM-tUig.js → index-BRLz5qXD.js} +1 -1
  84. package/dist/assets/{index-DWBKwIO3.js → index-BTEbx_T9.js} +1 -1
  85. package/dist/assets/{index-NTEIlaHw.js → index-Ba_zfjA4.js} +1 -1
  86. package/dist/assets/{index-D4AEyg0i.js → index-Bcn8G-IS.js} +1 -1
  87. package/dist/assets/{index-BE13FI7n.js → index-Bi752DTN.js} +1 -1
  88. package/dist/assets/{index-CL4In6gd.js → index-BiB55PfP.js} +2 -2
  89. package/dist/assets/{index-_nnYDXM-.js → index-Bpo9vUl3.js} +1 -1
  90. package/dist/assets/index-C2XEU2HU.js +375 -0
  91. package/dist/assets/{index-BKgXnbrz.js → index-CDUYMaXc.js} +1 -1
  92. package/dist/assets/{index-9AtlSAca.js → index-CJOwZiJt.js} +1 -1
  93. package/dist/assets/{index-DiSjj8dD.js → index-CLGaLAl2.js} +1 -1
  94. package/dist/assets/{index-B78zCe1U.js → index-Cgrpx1DI.js} +1 -1
  95. package/dist/assets/{index-BcyBYFKw.js → index-ClFBAY35.js} +1 -1
  96. package/dist/assets/{index-B2OP4n2J.js → index-ClvhAEM-.js} +1 -1
  97. package/dist/assets/{index-Cl_OUu5V.js → index-Cy7kRmDd.js} +2 -2
  98. package/dist/assets/{index-BqE2dSbo.js → index-CzNZ4vrz.js} +1 -1
  99. package/dist/assets/{index-SpBKG2cj.js → index-DFo9pU70.js} +1 -1
  100. package/dist/assets/{index-DfDQYXHJ.js → index-DHu6YXpK.js} +1 -1
  101. package/dist/assets/{index-f_-DLUob.js → index-DIAVGp02.js} +1 -1
  102. package/dist/assets/{index-BJzB0IwK.js → index-DO0208Xa.js} +1 -1
  103. package/dist/assets/{index-Di7TwMAz.js → index-DjMy6uEe.js} +1 -1
  104. package/dist/assets/{index-DFZr7N5Q.js → index-DkeN0Vs8.js} +1 -1
  105. package/dist/assets/{index-_RQVek-9.js → index-Do1I9W2m.js} +1 -1
  106. package/dist/assets/{index-B7UU2Xx3.js → index-DxMMf5Oq.js} +1 -1
  107. package/dist/assets/{index-BBJPyEqY.js → index-DxU1eLPz.js} +1 -1
  108. package/dist/assets/{index-BvBppb16.js → index-DxYJI64d.js} +1 -1
  109. package/dist/assets/{index-CCyFCqBE.js → index-EKVCwvhr.js} +1 -1
  110. package/dist/assets/{index-BEjzeaWf.js → index-Fo7ae45_.js} +1 -1
  111. package/dist/assets/{index-BpLexnAZ.js → index-J6Cau62J.js} +3 -3
  112. package/dist/assets/{index-C8GO1leJ.js → index-ZwahcQ7w.js} +4 -4
  113. package/dist/assets/{index-Bz-PgJMC.js → index-aW-DNBM8.js} +9 -9
  114. package/dist/assets/{index-BXhWMfbn.js → index-bAMoW4-i.js} +132 -134
  115. package/dist/assets/{index-DjgzvzkV.js → index-bLYakZ5t.js} +1 -1
  116. package/dist/assets/{index-DEOQ0jcQ.js → index-iHkOxvsz.js} +23 -23
  117. package/dist/assets/{index-CqGdRTFr.js → index-kbhF5feS.js} +1 -1
  118. package/dist/assets/{index-Brhgisql.js → index-n3w6kNQZ.js} +3 -3
  119. package/dist/assets/{index.esm-DLVaVv6G.js → index.esm-5v8LwNqQ.js} +1 -1
  120. package/dist/assets/{install-from-url-B-_Dp6ah.js → install-from-url-CdYG3RNj.js} +1 -1
  121. package/dist/assets/{invitation-BgD3_vhn.js → invitation-YHm3BG7b.js} +1 -1
  122. package/dist/assets/{is-path-prefix-equal-BSoCAT8S.js → is-path-prefix-equal-FbYEzRHn.js} +1 -1
  123. package/dist/assets/{item-Cq6FTbYA.js → item-Y60fpeT8.js} +1 -1
  124. package/dist/assets/{javascript-C-FROqLb.js → javascript-CEPdbm8y.js} +1 -1
  125. package/dist/assets/{jsonMode-DPJOjZF1.js → jsonMode-BeiJ-VTu.js} +1 -1
  126. package/dist/assets/{liquid-C2IF5DcJ.js → liquid-fro2FPdC.js} +1 -1
  127. package/dist/assets/{list-header-CGaXNTl1.js → list-header-D-4s43Ma.js} +1 -1
  128. package/dist/assets/{lock.svg-chUJBTRM.js → lock.svg-CFKs8dts.js} +1 -1
  129. package/dist/assets/{log-CQYCsC7O.js → log-B2R3YYx6.js} +1 -1
  130. package/dist/assets/{lottie-react.esm-BDZ_FnV5.js → lottie-react.esm-dZl_kIo8.js} +1 -1
  131. package/dist/assets/{mdx-DN-yyYQV.js → mdx-CKbnBnxG.js} +1 -1
  132. package/dist/assets/{memory-Cp2D5Xn4.js → memory-BEYVg_vT.js} +1 -1
  133. package/dist/assets/{metric-D8boeqOT.js → metric-Dk641HRF.js} +1 -1
  134. package/dist/assets/omit-BT-I_Y6t.js +1 -0
  135. package/dist/assets/{overview-CmJ-twrW.js → overview-DDcQKxp8.js} +1 -1
  136. package/dist/assets/{permission-yeSmXMT8.js → permission-DctTgsY2.js} +1 -1
  137. package/dist/assets/{preference-B8o0Jhqm.js → preference-B0D7L0kS.js} +4 -4
  138. package/dist/assets/{python-dlp0zMNM.js → python-r4UA2JD-.js} +1 -1
  139. package/dist/assets/{raf-schd.esm-CrHfyPhA.js → raf-schd.esm-B0h33cyd.js} +1 -1
  140. package/dist/assets/{razor-BShM2kTq.js → razor-cVdAc5aU.js} +1 -1
  141. package/dist/assets/{rotate-session-key-cXEhy_K2.js → rotate-session-key-unq5T2yp.js} +1 -1
  142. package/dist/assets/{runtime-BkYiwqrJ.js → runtime-S7cAFC3X.js} +1 -1
  143. package/dist/assets/schema-ChkAxaYY.js +1 -0
  144. package/dist/assets/sdk-Cwj3rYfq.js +1 -0
  145. package/dist/assets/{service-CZ6mQjKM.js → service-DxfeWAmP.js} +1 -1
  146. package/dist/assets/{shorten-label-B41dh7aP.js → shorten-label-Dv1OMi9F.js} +1 -1
  147. package/dist/assets/{simple-select-BvGPk5Cy.js → simple-select-CpwVqN7j.js} +1 -1
  148. package/dist/assets/{spaces-C-llvyn7.js → spaces-D4RSuUOJ.js} +1 -1
  149. package/dist/assets/{status-BX4NNsVD.js → status-BY3CGhBm.js} +1 -1
  150. package/dist/assets/{status-PYw3sa-W.js → status-DoVNxxgy.js} +1 -1
  151. package/dist/assets/{switch-control-IXycQg7u.js → switch-control-CoR6YAgJ.js} +1 -1
  152. package/dist/assets/{table-icons-PekhxfR1.js → table-icons-CvWoxwJm.js} +1 -1
  153. package/dist/assets/{team-C3mY0ELl.js → team-Cy4idyYh.js} +1 -1
  154. package/dist/assets/{toLower-B1XYGfB3.js → toLower-DLISowBN.js} +1 -1
  155. package/dist/assets/toUpper-shmjJ5kv.js +1 -0
  156. package/dist/assets/{traffic-Bj6CYWfW.js → traffic-63nlz0PL.js} +1 -1
  157. package/dist/assets/{tsMode-O71ldBJ0.js → tsMode-CYxSRnJt.js} +1 -1
  158. package/dist/assets/{typescript-awLwl-Q4.js → typescript-CuWOp3GE.js} +1 -1
  159. package/dist/assets/{url-evaluation-Dt0gDvx3.js → url-evaluation-CbmurDMU.js} +1 -1
  160. package/dist/assets/{url-join--yrZIt5c.js → url-join-BRhRhnM9.js} +1 -1
  161. package/dist/assets/{use-mobile-CMlrBzPG.js → use-mobile-cFWUFyHt.js} +1 -1
  162. package/dist/assets/{use-mobile-0LaImk5H.js → use-mobile-u6QOrMeU.js} +1 -1
  163. package/dist/assets/{useAsync-Drf6IH2B.js → useAsync-CWR8bNo_.js} +1 -1
  164. package/dist/assets/{useAsyncRetry-C9hqas1l.js → useAsyncRetry-BAuwSLLg.js} +1 -1
  165. package/dist/assets/{useLocalStorage-pzfOZ90P.js → useLocalStorage-DJDEgIs9.js} +1 -1
  166. package/dist/assets/useThemeProps-BbG1FiFB.js +1 -0
  167. package/dist/assets/{util-CHsC18AZ.js → util-DtLa0nu0.js} +1 -1
  168. package/dist/assets/{wait-container-D-JLmV2c.js → wait-container-C2MBKZ7F.js} +1 -1
  169. package/dist/assets/{without-wallet-BVl72vUK.js → without-wallet-CJgDDD5K.js} +1 -1
  170. package/dist/assets/wrap-locale-Digd0I8n.js +1 -0
  171. package/dist/assets/{xml-clTeeJoN.js → xml-B2Yg59Q0.js} +1 -1
  172. package/dist/assets/{yaml-D17cEXW_.js → yaml-Bfci6VGg.js} +1 -1
  173. package/dist/index.html +1 -1
  174. package/dist/service-worker.js +1 -1
  175. package/package.json +1 -1
  176. package/dist/assets/ArrowDropDown-C4ph_aC2.js +0 -1
  177. package/dist/assets/actions-D2ujhOWD.js +0 -1
  178. package/dist/assets/api-W7sKIR80.js +0 -1
  179. package/dist/assets/cloneDeep-yO838gNj.js +0 -1
  180. package/dist/assets/emotion-cache.browser.esm-Bm19UyCk.js +0 -1
  181. package/dist/assets/engine-BX2tPglZ.js +0 -1
  182. package/dist/assets/getValidReactChildren-Ao387m76.js +0 -1
  183. package/dist/assets/index-4__iBGFR.js +0 -376
  184. package/dist/assets/index-CZlN1gWv.js +0 -1
  185. package/dist/assets/omit-BtJfXKsY.js +0 -1
  186. package/dist/assets/schema-CJmd8wL1.js +0 -1
  187. package/dist/assets/sdk-B9JEpY9l.js +0 -1
  188. package/dist/assets/toUpper-BnIypMIu.js +0 -1
  189. package/dist/assets/useThemeProps-BgkGtCgI.js +0 -1
  190. package/dist/assets/wrap-locale-C5BuyfxR.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Brhgisql.js","./index-BXhWMfbn.js","./index-DGkT7afN.css","./url-join--yrZIt5c.js","./index-CCyFCqBE.js","./_createAggregator-C4guq0cF.js","./depsEqual-DZ2epQ9y.js","./index-BJzB0IwK.js","./index-DRYJ0xIl.js","./toUpper-BnIypMIu.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
- import{b$ as qf,b_ as Vf,r as I,c0 as Kf,eT as Yf,j as g,b8 as it,c2 as rt,c3 as Jf,hH as Qf,hI as Xf,gF as Zf,dt as ep,hJ as tp,du as rp,bP as ac,bQ as np,bN as ip,bO as op,bS as lc,dx as Gn,hK as ap,eD as lp,hv as sp,gZ as cp,dE as up,gW as sc,hL as dp,gJ as fp,fp as pp,eE as hp,hi as gp,V as Ee,a2 as Qe,y as Me,aH as xe,aP as zt,c6 as Et,i as vp,fa as mp,eO as bp,hy as yp,dw as Rr,ez as vr,dh as cc,dB as xp,hM as Sp,dA as uc,bd as $n,dO as nr,hN as F,e_ as K,eH as wp,hO as Yr,be as X,o as x,dM as Wn,aQ as Do,hP as Po,cA as er,aD as ye,b as ft,K as oe,af as Cp,cv as le,b9 as _o,dC as Yt,T as me,a3 as Ne,b1 as Ui,dI as yt,hQ as Ip,bn as dc,E as Hn,hR as Rp,hS as Tp,t as nt,fn as Rn,ay as Dp,br as qe,fd as fc,C as pc,bI as Pp,hT as ka,M as ko,f9 as _p,f6 as hc,H as kt,O as gc,$ as vc,v as Tn,hU as mc,f as jt,dL as kp,by as Op,gN as bc,dJ as Or,a6 as Ep,a7 as Np,hV as Oa,hW as yc,hX as Mp,hY as Ap,hZ as Un,fe as Lp,gf as zp,gg as jp,gl as qn,h_ as Fp,h$ as Bp,gS as Gp,i0 as Dn,i1 as xc,bC as ze,L as Sc,z as Vn,i2 as Ea,i3 as wc,i4 as qi,i5 as $p,i6 as Wp,s as cr,i7 as Hp,f5 as Up,cz as Cc,i8 as qp,bF as Vp,i9 as Kp,dH as Ke,D as Yp,U as Jp,cu as Qp,ia as Xp,a$ as Zp,bg as Na,Q as Pn,a8 as Ma,ib as eh,ic as th,id as rh,ie as nh,ig as Ic,ih,aB as Rc,f0 as Tc,ii as Oo,ij as oh,hr as Dc,ik as ah,b5 as lh,cE as Jt,il as sh,cT as ch,im as uh,d2 as dh,G as Aa,dp as ui,eI as La,dN as fh,io as ph,a4 as Pc,X as za,ip as ja,P as hh,S as Fa}from"./index-BXhWMfbn.js";import{r as gh}from"./omit-BtJfXKsY.js";import{r as vh}from"./cloneDeep-yO838gNj.js";import{r as mh}from"./index-CCyFCqBE.js";import{c as bh,u as yh}from"./_createAggregator-C4guq0cF.js";import{u as Ft}from"./blocklet-BMb-DKa8.js";import{H as xh,G as Sh,M as wh,N as Ch,O as Ba,K as Ih,L as Rh}from"./index-9AtlSAca.js";import{_ as Se,a as we,b as Ge,c as $e,d as We,e as Th,f as _c,u as fe,g as ne,r as Fr,w as _n,h as kc,i as Bt,j as Oc,k as Dh,l as Ph,o as Vi}from"./raf-schd.esm-CrHfyPhA.js";import{_ as A,b as Ga,c as _h,a as kh,d as Oh}from"./redux-DfszZyTl.js";import{_ as Eh}from"./typeof-QjJsDpFa.js";import{u as Ec,b as Nh}from"./team-C3mY0ELl.js";import{b as Mh}from"./actions-C9R61uoD.js";import{u as Ah,a as Lh,C as lt}from"./index.esm-DLVaVv6G.js";import{S as Ki}from"./simple-select-BvGPk5Cy.js";import{b as zh,a as $a}from"./html-title-CRD93SB4.js";import{C as Nc}from"./Clear-DmQaaBy1.js";import{A as jh}from"./ArrowDropDown-C4ph_aC2.js";import{a as Fh}from"./api-W7sKIR80.js";import{A as Bh}from"./Autocomplete-BGzNUg3v.js";import{L as Gh}from"./ListItemButton-BbKr2tws.js";import{u as Mc}from"./use-mobile-0LaImk5H.js";import{u as $h}from"./index-DjgzvzkV.js";import{d as Wh}from"./KeyboardArrowDown-CqHZKzOB.js";import{S as Hh}from"./Search-nsuHiAfr.js";import{A as Uh}from"./Add-l70J_4yZ.js";import{O as qh}from"./OpenInNew-B2F4Jqwb.js";import{t as Vh}from"./index-f_-DLUob.js";import{I as Kh}from"./iframe-SmTUaAma.js";import{B as di}from"./ButtonGroup-DWV84mOp.js";import{L as Wa}from"./LoadingButton-yUpEuEJK.js";import"./depsEqual-DZ2epQ9y.js";import"./url-evaluation-Dt0gDvx3.js";import"./useLocalStorage-pzfOZ90P.js";import"./MoreVert-Cy81E-t5.js";import"./get-safe-url-I2vTcMcF.js";import"./permission-yeSmXMT8.js";import"./ListSubheader-CPl5W-Om.js";import"./getValidReactChildren-Ao387m76.js";function Yh(e){return qf("MuiListItemAvatar",e)}Vf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Jh=e=>{const{alignItems:r,classes:n}=e;return Jf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Yh,n)},Qh=it("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Ha=I.forwardRef(function(r,n){const t=Kf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(Yf),l={...t,alignItems:a.alignItems},s=Jh(l);return g.jsx(Qh,{className:rt(s.root,i),ownerState:l,ref:n,...o})});var Xh=Qf(function(){return Xf?sessionStorage:void 0});function Zh(e,r){return Zf(r,function(n){return e[n]})}function eg(e){return e==null?[]:Zh(e,ep(e))}var tg=tp.isFinite;function Ua(e){return typeof e=="number"&&tg(e)}function rg(e){return typeof e=="number"&&e==rp(e)}var ng=bh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const ig=Object.freeze(Object.defineProperty({__proto__:null,default:ng},Symbol.toStringTag,{value:"Module"}));var og=ac(function(e){var r=np(e);return r=typeof r=="function"?r:void 0,ip(op(e,1,lc,!0),void 0,r)});const ag=Object.freeze(Object.defineProperty({__proto__:null,default:og},Symbol.toStringTag,{value:"Module"}));var Ac=ac(function(e,r){return lc(e)?Mh(e,r):[]}),mr={};const lg=Gn(ag),sg=Gn(ap),cg=Gn(ig);var qa;function ug(){return qa||(qa=1,function(e){var r=mr&&mr.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ie,e.deepWalk=w,e.isMatchSection=P,e.nestNavigationList=ee,e.filterNavigation=Q,e.cleanOrphanNavigation=Z,e.joinLink=j,e.flattenNavigation=M,e.splitNavigationBySection=J;const n=lp(),t=r(lg),i=r(sp),o=r(cp),a=r(sg),l=r(up),s=r(gh),c=r(vh),u=gp(),f=r(mh()),d=r(sc()),p=r(dp),h=r(fp),v=r(cg),m=pp(),y=hp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return y.checkLink}});const b="header",C="/",D="/",_="/";function w($,W=()=>{},{key:L="children",order:N="first"}={}){function O(U,{index:te=0,parent:ae=null,level:de=0}={}){Array.isArray(U)?U.forEach((pe,Ce)=>{O(pe,{index:Ce,parent:ae,level:de+1})}):U&&(N==="first"&&W(U,ae,{index:te,level:de}),O(U[L],{parent:U,level:de}),N==="last"&&W(U,ae,{index:te,level:de}))}O($)}function P($,W){return W===b&&(0,a.default)($)?!0:Array.isArray($)?$.includes(W):$===W}function S($){try{return JSON.parse($)}catch{return $}}function T($){return $.map(W=>{const L={...W};return L.role&&(L.role=S(L.role)),L.section&&(L.section=S(L.section)),L.title&&(L.title=S(L.title)),L.description&&(L.description=S(L.description)),L.link&&(L.link=S(L.link)),L})}function R($="/",W=""){if((0,d.default)(W||""))return W;const L=f.default.join($,W||D);return L.length>1&&L.endsWith("/")?L.slice(0,L.length-1):L}function k($,W,{strict:L=!0}={}){let N=$,O=W;return L||(N=N||"/",O=O||"/"),(0,p.default)(N)&&(0,h.default)(O)&&(0,y.checkLink)(O)?Object.keys(N).reduce((U,te)=>(U[te]=R(N[te],O),U),{}):(0,h.default)(N)&&(0,y.checkLink)(N)&&(0,p.default)(O)?Object.keys(O).reduce((U,te)=>(U[te]=R(N,O[te]),U),{}):(0,h.default)(N)&&(0,h.default)(O)?(0,y.checkLink)(N)||(0,y.checkLink)(O)?R(N,O):O:(0,p.default)(N)&&(0,p.default)(O)?[...new Set([...Object.keys(N),...Object.keys(O)])].reduce((te,ae)=>(te[ae]=R(N[ae],O[ae]),te),{}):O}function j($,W){const L=(0,c.default)($);return w(L,(N,O)=>{const U=N.component||N.child;if(U){const te=W.find(ae=>ae.name===U);te&&(N.link=k(te.link,N.link,{strict:!1}))}else O&&(N.link=k(O.link,N.link))},{key:"items"}),L}function M($=[],{depth:W=1,transform:L=N=>N}={}){const N=(0,c.default)($),O=[];return w(N,(U,te,{level:ae})=>{if(ae>=W){const{items:de=[]}=U;if(de&&Array.isArray(de)&&de.length>0){delete U.items;const pe=de.map(Ce=>L(Ce,U));if(te)te.items.push(...pe);else{const Ce=L((0,s.default)(U,["items"]),te);O.push(Ce,...pe)}}else if(ae===1){const pe=L((0,s.default)(U,["items"]),te);O.push(pe)}}else ae===1&&O.push(U)},{key:"items",order:"last"}),O}function H($){if($.section!=="bottomNavigation")return $;const W={...$};return n.NAVIGATION_I18N_FIELDS.forEach(L=>{const N=W[L];typeof N=="string"&&(W[L]={en:N})}),W}function E($={}){const W=[];function L(O,U={}){const te=[],{children:ae=[],meta:de={}}=O,pe=(0,c.default)(de?.navigation||[]);(0,m.hasStartEngine)(de)&&O.meta?.capabilities?.navigation!==!1&&te.push(...pe);const Ce=U.name||"",Ae=U.mountPoint||C,be=O===$?"":de.name||"",De=O===$?"":O.mountPoint||C;for(const se of ae){if(!(0,m.hasStartEngine)(se.meta))continue;const ve=se.meta.name,ot=se.mountPoint,gr=[Ce,be,ve].filter(Boolean).join("."),si=se.meta.navigation||[],ci=(0,u.joinURL)(Ae,De,ot);se.meta?.capabilities?.navigation!==!1&&W.push({did:se.meta.did,name:gr,link:ci,title:se.meta.title||"",navigation:si.map(Je=>({section:b,...Je}))});const at=pe.find(Je=>Je.component?Je.component===ve:!1);if(at){if(!at.link)if(se.meta.navigation&&se.meta.navigation.length>0){const Je=L(se,{mountPoint:De,name:be});Je.length>0&&(at.items=at.items??[],at.items.push(...Je))}else at.link=D}else if(se.meta?.capabilities?.navigation!==!1){const Je=L(se,{mountPoint:De,name:be}),an={title:se.meta.title,component:ve,id:se.meta.did};Je.length>0?(an.items=Je,an.link=void 0):an.link=D,te.push(an)}}return te}return{navigationList:L($),components:W}}function B($){const W=(0,c.default)($).filter(L=>L.id);return w(W,(L,N)=>{if(L.items&&L.items.length){for(let O=L.items.length-1;O>=0;O--)L.items[O].id||L.items.splice(O,1);L.items.length===0&&L.component&&(L.link=L.link||D)}N&&(L.parent=N.id,L.id=[N.id,L.id].join(_)),L.from=L.from||"yaml",L.visible=L.visible??!0},{key:"items"}),W}function G($,W=2){const L=(0,c.default)($),N=M(L,{depth:W,transform:(O,U)=>(U&&(O._parent||(O._parent=U.id,U.component||(O.link=k(U.link,O.link))),O.section=O.section||U.section||[b],O.visible=O.visible??U.visible,U.role&&(O.role=O.role||U.role)),O.component=[U.component,O.component].filter(Boolean).join("."),O)});return w(N,O=>{O.items&&O.items.length>0&&O.items.reduceRight((U,te)=>{if(te._parent){const ae=O.items.findIndex(de=>de.id===te._parent);ae>=0&&O.items.splice(ae,1),delete te._parent}return null},null)},{key:"items"}),N}function q($,W){return W&&Array.isArray($.items)?$.items.filter(L=>(0,a.default)(L.section)?P($.section,W):!!P(L.section,W)).map(L=>({...L,section:W})):[]}function J($){const W=(0,c.default)($),L=[];for(const N of W){let te=function(ae,de){const pe=q(ae,de);U.push({...O,section:de,items:pe})};const O=(0,c.default)((0,s.default)(N,["items"])),U=[];if(Array.isArray(N.section))for(const ae of N.section)te(N,ae);else if(N.section){const{section:ae}=N;te(N,ae)}else if(N.items&&N.items.length>0){const ae=N.items.reduce((pe,Ce)=>{const{section:Ae=[b]}=Ce||{};return pe.push(...Ae),pe},[]),de=[...new Set(ae)];for(const pe of de)te(N,pe)}else U.push({...N,section:b});L.push(...U)}return L}function ee($=[]){const W=(0,c.default)($);return W.reduceRight((L,N,O)=>{if(N.parent){const U=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);U&&(U.items||(U.items=[]),U.items=[N,...U.items]),W.splice(O,1)}return null},null),W}function Q($,W=[]){const L=ee($);return w(L,O=>{if(O?.component&&(W.some(U=>U.name===O.component)||(O.visible=!1)),O.items&&O.items.length)for(let U=O.items.length-1;U>=0;U--)O.items[U].visible===!1&&O.items.splice(U,1)},{key:"items"}),L.filter(O=>!(O.visible===!1||O.items&&Array.isArray(O.items)&&O.items.length>0&&O.items?.every(U=>U.visible===!1)))}function Z($){return $.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const V=$=>{const[W,L]=(0,v.default)($,N=>N.id==="/team");return[...W,...L]};e.sortRootNavigation=V;const re=$=>{const[,W]=(0,v.default)($,L=>{const N=typeof L.title=="string"?L.title:L.title?.en;return L.id==="/team"&&N==="Access"||L.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=re;function ie($={},W={}){const{beforeProcess:L=se=>se}=W,{navigationList:N,components:O}=E($),U=new Map;N.forEach(se=>{se.items?.forEach(ve=>{U.set((0,u.joinURL)(se.id,ve.id),ve)})});const te=(0,l.default)($,"settings.org.enabled",!1);$?.settings?.navigations&&(Array.isArray($.settings.navigations)?$.settings.navigations=[...$.settings.navigations].filter(se=>!(se?.parent==="/team"&&se.from==="team-tmpl")).map(se=>{if(se.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(se,"private")){const ve=U.get(se.id);ve&&Object.prototype.hasOwnProperty.call(ve,"private")&&(se.private=ve.private)}return!te&&se.section==="userCenter"&&se.id==="/userCenter/orgs"?null:se}).filter(Boolean):$.settings.navigations=[]);const ae=T(re($?.settings?.navigations||[])).map(H),de=G(L(N)),pe=B(de),Ae=J(pe).reduce((se,ve)=>["bottom","social","sessionManager","userCenter"].includes(ve.section)&&ve.items&&ve.items.length>0?(se.push(...ve.items.map(gr=>{const{section:si}=ve,ci=k(ve.link,gr.link),at=[ve.component,gr.component].filter(Boolean).join(".");return{...gr,section:si,link:ci,component:at,parent:""}})),se):(se.push(ve),se),[]),be=M(Ae,{transform(se,ve){let{component:ot}=se;return ve?.component&&(ot=[ve.component,se.component].filter(Boolean).join(".")),H({...se,component:ot})}});return{navigationList:(0,t.default)(ae,be,(se,ve)=>{const ot=["id","section"];return(0,i.default)((0,o.default)(se,ot),(0,o.default)(ve,ot))}),components:O,builtinList:be}}}(mr)),mr}var ke=ug();const Lc=I.createContext(null),Va="/",dg="header",Ka={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Me(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Me(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled}]};function fi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const st=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Me(xe.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),fg=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),pg=(e,r)=>{const n=ke.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(fg("/team",e("navigation.blockletService"),[st("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),st("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),st("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),st("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),st("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),st("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),st("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),st("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ya({name:e}){return g.jsx(bp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function hg({children:e}){const{blocklet:r,actions:n}=Ft(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=ke.parseNavigation(r,{beforeProcess(w){const P=Qe(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Ka,S)&&Ka[S].forEach(T=>{(T.shouldDisplay&&typeof T.shouldDisplay=="function"?T.shouldDisplay:()=>!0)(r)&&!P.some(k=>k.id===T.id)&&P.push(T)})}),pg(t,P)}}),l=zt({rawNavigation:Qe(i),activeSection:dg,components:o}),s=I.useMemo(()=>ke.nestNavigationList(Qe(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const w=ke.filterNavigation(Qe(l.rawNavigation),o);return ke.joinLink(w,o)},[o,l.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const P=ke.flattenNavigation(ke.joinLink(s,o)),S=P.find(T=>T.id===w.id);if(S?.component){if(!o.some(T=>T.name===S.component))return g.jsx(Ya,{name:S.component})}else if(S.parent){const T=P.find(R=>R.id===S.parent);if(T?.component&&!o.some(R=>R.name===T.component))return g.jsx(Ya,{name:T.component})}return S?.link},[s,o]),f=I.useCallback(w=>{l.activeSection=w},[l]),d=I.useCallback(w=>{const P=[];ke.deepWalk(w,(T,R)=>{const k={...Et(T,["children","expand"]),parent:R?.id};P.push(k)});const S=Qe(l.rawNavigation).filter(T=>{if(!l.activeSection)return!1;const R=P.find(k=>fi(k,T));return R?!ke.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...S,...P]},[l]),p=I.useCallback((w=[])=>{const P=Qe(l.rawNavigation).map(S=>{const T=w.find(R=>fi({...R,section:l.activeSection},S));return T?{...S,...T}:S});l.rawNavigation=P},[l]),h=I.useCallback((w,P=Va)=>w.map(T=>{const k=o.find(H=>H.name===T.component)?.link||P,j=T.items||[],{link:M}=T;return{title:T.title,description:T.description,subtitle:u(T),link:M,icon:T.icon,children:h(j,M||Va),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:k}}),[o,u]),v=I.useCallback(w=>{p([w])},[p]),m=I.useCallback(w=>{const P=l.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);l.rawNavigation=Qe(l.rawNavigation).filter(S=>!P.includes(S.id))},[l]),y=I.useCallback((w={},P=-1)=>{const S={...w,id:vp.nanoid(),section:l.activeSection,visible:!0},T=[...l.rawNavigation],R=T.filter(k=>k.section===l.activeSection);if(P<0||P>R.length-1)T.push(S);else{const k=R[P],j=T.findIndex(M=>fi(M,k));T.splice(j,0,S)}return l.rawNavigation=T,S},[l]),b=I.useCallback(w=>{const S=Qe(s).filter(T=>ke.isMatchSection(T.section,w));return h(S)},[s,h]),C=I.useCallback(async w=>{const S=w.map(T=>mp(T,yp)).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(S)},[n]),D=I.useCallback(async w=>{if(w){const P=a.filter(T=>ke.isMatchSection(T.section,w)),S=l.rawNavigation.filter(T=>!ke.isMatchSection(T.section,w));await C(S),l.rawNavigation=[...S,...P]}else await C([]),l.rawNavigation=Qe(a)},[C,l,a]),_=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:C,resetNavigation:D}),[l,c,o,u,f,v,m,y,d,b,C,D]);return g.jsx(Lc.Provider,{value:_,children:e})}function zc(){const e=I.useContext(Lc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ve={},pi,Ja;function gg(){if(Ja)return pi;Ja=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Rr=="object"&&Rr&&Rr.Object===Object&&Rr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,P,S){var T,R,k,j,M,H,E=0,B=!1,G=!1,q=!0;if(typeof w!="function")throw new TypeError(e);P=_(P)||0,b(S)&&(B=!!S.leading,G="maxWait"in S,k=G?p(_(S.maxWait)||0,P):k,q="trailing"in S?!!S.trailing:q);function J(L){var N=T,O=R;return T=R=void 0,E=L,j=w.apply(O,N),j}function ee(L){return E=L,M=setTimeout(V,P),B?J(L):j}function Q(L){var N=L-H,O=L-E,U=P-N;return G?h(U,k-O):U}function Z(L){var N=L-H,O=L-E;return H===void 0||N>=P||N<0||G&&O>=k}function V(){var L=v();if(Z(L))return re(L);M=setTimeout(V,Q(L))}function re(L){return M=void 0,q&&T?J(L):(T=R=void 0,j)}function ie(){M!==void 0&&clearTimeout(M),E=0,T=H=R=M=void 0}function $(){return M===void 0?j:re(v())}function W(){var L=v(),N=Z(L);if(T=arguments,R=this,H=L,N){if(M===void 0)return ee(H);if(G)return M=setTimeout(V,P),J(H)}return M===void 0&&(M=setTimeout(V,P)),j}return W.cancel=ie,W.flush=$,W}function y(w,P,S){var T=!0,R=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(T="leading"in S?!!S.leading:T,R="trailing"in S?!!S.trailing:R),m(w,P,{leading:T,maxWait:P,trailing:R})}function b(w){var P=typeof w;return!!w&&(P=="object"||P=="function")}function C(w){return!!w&&typeof w=="object"}function D(w){return typeof w=="symbol"||C(w)&&d.call(w)==n}function _(w){if(typeof w=="number")return w;if(D(w))return r;if(b(w)){var P=typeof w.valueOf=="function"?w.valueOf():w;w=b(P)?P+"":P}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?l(w.slice(2),S?2:8):i.test(w)?r:+w}return pi=y,pi}var br={exports:{}},Tt={exports:{}},vg=Tt.exports,Qa;function mg(){return Qa||(Qa=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Tt.exports=function(){return performance.now()}:typeof vr<"u"&&vr!==null&&vr.hrtime?(Tt.exports=function(){return(e()-i)/1e6},r=vr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=vr.uptime()*1e9,i=t-o):Date.now?(Tt.exports=function(){return Date.now()-n},n=Date.now()):(Tt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(vg)),Tt.exports}var Xa;function bg(){if(Xa)return br.exports;Xa=1;for(var e=mg(),r=typeof window>"u"?Rr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var l=0,s=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),p=Math.max(0,u-(d-l));l=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}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 br.exports=function(f){return i.call(r,f)},br.exports.cancel=function(){o.apply(r,arguments)},br.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},br.exports}var ln={},Za;function yg(){if(Za)return ln;Za=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return ln}var $t={},el;function xg(){if(el)return $t;el=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.noop=e,$t.intBetween=r,$t.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return $t}var tl;function Sg(){if(tl)return Ve;tl=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.createHorizontalStrength=T,Ve.createVerticalStrength=R,Ve.createScrollingComponent=M,Ve.default=H,Ve.defaultVerticalStrength=Ve.defaultHorizontalStrength=void 0;var e=u(cc()),r=c(uc()),n=xp(),t=c(gg()),i=c(bg()),o=c(yg()),a=xh,l=c(Sp()),s=xg();function c(E){return E&&E.__esModule?E:{default:E}}function u(E){if(E&&E.__esModule)return E;var B={};if(E!=null){for(var G in E)if(Object.prototype.hasOwnProperty.call(E,G)){var q=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,G):{};q.get||q.set?Object.defineProperty(B,G,q):B[G]=E[G]}}return B.default=E,B}function f(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(G){return typeof G}:f=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},f(E)}function d(){return d=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var G=arguments[B];for(var q in G)Object.prototype.hasOwnProperty.call(G,q)&&(E[q]=G[q])}return E},d.apply(this,arguments)}function p(E,B){if(E==null)return{};var G=h(E,B),q,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)q=ee[J],!(B.indexOf(q)>=0)&&Object.prototype.propertyIsEnumerable.call(E,q)&&(G[q]=E[q])}return G}function h(E,B){if(E==null)return{};var G={},q=Object.keys(E),J,ee;for(ee=0;ee<q.length;ee++)J=q[ee],!(B.indexOf(J)>=0)&&(G[J]=E[J]);return G}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var G=0;G<B.length;G++){var q=B[G];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(E,q.key,q)}}function y(E,B,G){return B&&m(E.prototype,B),E}function b(E,B){return B&&(f(B)==="object"||typeof B=="function")?B:w(E)}function C(E){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},C(E)}function D(E,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(B&&B.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),B&&_(E,B)}function _(E,B){return _=Object.setPrototypeOf||function(q,J){return q.__proto__=J,q},_(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function P(E,B,G){return B in E?Object.defineProperty(E,B,{value:G,enumerable:!0,configurable:!0,writable:!0}):E[B]=G,E}var S=150;function T(E){return function(G,q){var J=G.x,ee=G.w,Q=G.y,Z=G.h,V=Math.min(ee/2,E),re=q.x>=J&&q.x<=J+ee,ie=re&&q.y>=Q&&q.y<=Q+Z;if(ie){if(q.x<J+V)return(q.x-J-V)/V;if(q.x>J+ee-V)return-(J+ee-q.x-V)/V}return 0}}function R(E){return function(G,q){var J=G.y,ee=G.h,Q=G.x,Z=G.w,V=Math.min(ee/2,E),re=q.y>=J&&q.y<=J+ee,ie=re&&q.x>=Q&&q.x<=Q+Z;if(ie){if(q.y<J+V)return(q.y-J-V)/V;if(q.y>J+ee-V)return-(J+ee-q.y-V)/V}return 0}}var k=T(S);Ve.defaultHorizontalStrength=k;var j=R(S);Ve.defaultVerticalStrength=j;function M(E){var B=function(G){D(q,G);function q(J,ee){var Q;return v(this,q),Q=b(this,C(q).call(this,J,ee)),P(w(w(Q)),"updateScrolling",(0,t.default)(function(Z){var V=Q.container.getBoundingClientRect(),re=V.left,ie=V.top,$=V.width,W=V.height,L={x:re,y:ie,w:$,h:W},N=(0,s.getCoords)(Z),O=Q.props,U=O.horizontalStrength,te=O.verticalStrength;Q.scaleX=U(L,N),Q.scaleY=te(L,N),!Q.frame&&(Q.scaleX||Q.scaleY)&&Q.startScrolling()},100,{trailing:!1})),P(w(w(Q)),"handleEvent",function(Z){Q.dragging&&!Q.attached&&(Q.attach(),Q.updateScrolling(Z))}),Q.wrappedInstance=e.default.createRef(),Q.scaleX=0,Q.scaleY=0,Q.frame=null,Q.attached=!1,Q.dragging=!1,Q}return y(q,[{key:"componentDidMount",value:function(){var ee=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var Q=this.props.dragDropManager;this.clearMonitorSubscription=Q.getMonitor().subscribeToStateChange(function(){return ee.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var ee=this.props.dragDropManager,Q=ee.getMonitor().isDragging();!this.dragging&&Q?this.dragging=!0:this.dragging&&!Q&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var ee=this,Q=0,Z=function V(){var re=ee.scaleX,ie=ee.scaleY,$=ee.container,W=ee.props,L=W.strengthMultiplier,N=W.onScrollChange;if(L===0||re+ie===0){ee.stopScrolling();return}if(Q+=1,Q%2){var O=$.scrollLeft,U=$.scrollTop,te=$.scrollWidth,ae=$.scrollHeight,de=$.clientWidth,pe=$.clientHeight,Ce=re?$.scrollLeft=(0,s.intBetween)(0,te-de,O+re*L):O,Ae=ie?$.scrollTop=(0,s.intBetween)(0,ae-pe,U+ie*L):U;N(Ce,Ae)}ee.frame=(0,i.default)(V)};Z()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var Q=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,d({ref:this.wrappedInstance},Q))}}]),q}(e.Component);return P(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),P(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),P(B,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:k,strengthMultiplier:30}),(0,l.default)(B,E)}function H(E){var B=M(E);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(q){var J=q.dragDropManager;return J===void 0?null:e.default.createElement(B,d({},G,{dragDropManager:J}))})}}return Ve}var bn=Sg();const wg=$n(bn);var Cg=Sh();const rl=$n(Cg);function jc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Fc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Bc(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}jc.__suppressDeprecationWarning=!0;Fc.__suppressDeprecationWarning=!0;Bc.__suppressDeprecationWarning=!0;function Jr(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-n3w6kNQZ.js","./index-bAMoW4-i.js","./index-DGkT7afN.css","./url-join-BRhRhnM9.js","./index-EKVCwvhr.js","./_createAggregator-BiwqPoJr.js","./depsEqual-BXmAVsgz.js","./index-DO0208Xa.js","./index-DRYJ0xIl.js","./toUpper-shmjJ5kv.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
+ import{b$ as qf,b_ as Vf,r as I,c0 as Kf,eT as Yf,j as g,b8 as it,c2 as rt,c3 as Jf,hz as Qf,hA as Xf,gx as Zf,dt as ep,hB as tp,du as rp,bP as ac,bQ as np,bN as ip,bO as op,bS as lc,dx as Gn,hC as ap,eD as lp,hn as sp,gR as cp,dE as up,gO as sc,hD as dp,gB as fp,fp as pp,eE as hp,ha as gp,V as Ee,a2 as Qe,y as Me,aH as xe,aP as zt,c6 as Et,i as vp,fa as mp,eO as bp,hq as yp,dw as Rr,ez as vr,dh as cc,dB as xp,hE as Sp,dA as uc,bd as $n,dO as nr,hF as F,e_ as K,eH as wp,hG as Yr,be as X,o as x,dM as Wn,aQ as Do,hH as Po,cA as er,aD as ye,b as ft,K as oe,af as Cp,cv as le,b9 as _o,dC as Yt,T as me,a3 as Ne,b1 as Ui,dI as yt,hI as Ip,bn as dc,E as Hn,hJ as Rp,hK as Tp,t as nt,fn as Rn,ay as Dp,br as qe,fd as fc,C as pc,bI as Pp,hL as ka,M as ko,f9 as _p,f6 as hc,H as kt,O as gc,$ as vc,v as Tn,hM as mc,f as jt,dL as kp,by as Op,gF as bc,dJ as Or,a6 as Ep,a7 as Np,hN as Oa,hO as yc,hP as Mp,hQ as Ap,hR as Un,fe as Lp,g7 as zp,g8 as jp,gd as qn,hS as Fp,hT as Bp,gK as Gp,hU as Dn,hV as xc,bC as ze,L as Sc,z as Vn,hW as Ea,hX as wc,hY as qi,hZ as $p,h_ as Wp,s as cr,h$ as Hp,f5 as Up,cz as Cc,i0 as qp,bF as Vp,i1 as Kp,dH as Ke,D as Yp,U as Jp,cu as Qp,i2 as Xp,a$ as Zp,bg as Na,Q as Pn,a8 as Ma,i3 as eh,i4 as th,i5 as rh,i6 as nh,i7 as Ic,i8 as ih,aB as Rc,f0 as Tc,i9 as Oo,ia as oh,hj as Dc,ib as ah,b5 as lh,cE as Jt,ic as sh,cT as ch,id as uh,d2 as dh,G as Aa,dp as ui,eI as La,dN as fh,ie as ph,a4 as Pc,X as za,ig as ja,P as hh,S as Fa}from"./index-bAMoW4-i.js";import{r as gh}from"./omit-BT-I_Y6t.js";import{r as vh}from"./cloneDeep-D5hlC73V.js";import{r as mh}from"./index-EKVCwvhr.js";import{c as bh,u as yh}from"./_createAggregator-BiwqPoJr.js";import{u as Ft}from"./blocklet-DaethJMv.js";import{H as xh,G as Sh,M as wh,N as Ch,O as Ba,K as Ih,L as Rh}from"./index-CJOwZiJt.js";import{_ as Se,a as we,b as Ge,c as $e,d as We,e as Th,f as _c,u as fe,g as ne,r as Fr,w as _n,h as kc,i as Bt,j as Oc,k as Dh,l as Ph,o as Vi}from"./raf-schd.esm-B0h33cyd.js";import{_ as A,b as Ga,c as _h,a as kh,d as Oh}from"./redux-DfszZyTl.js";import{_ as Eh}from"./typeof-QjJsDpFa.js";import{u as Ec,b as Nh}from"./team-Cy4idyYh.js";import{b as Mh}from"./actions-DupIyXVp.js";import{u as Ah,a as Lh,C as lt}from"./index.esm-5v8LwNqQ.js";import{S as Ki}from"./simple-select-CpwVqN7j.js";import{b as zh,a as $a}from"./html-title-DWH4a57C.js";import{C as Nc}from"./Clear-knEN1Rym.js";import{A as jh}from"./ArrowDropDown-CGzDjHWx.js";import{a as Fh}from"./api-BIwSxGZN.js";import{A as Bh}from"./Autocomplete-CjP5JbiQ.js";import{L as Gh}from"./ListItemButton-CW7R9MJP.js";import{u as Mc}from"./use-mobile-u6QOrMeU.js";import{u as $h}from"./index-bLYakZ5t.js";import{d as Wh}from"./KeyboardArrowDown-NqSrWQzL.js";import{S as Hh}from"./Search-DLfjt_el.js";import{A as Uh}from"./Add-DHlIup-_.js";import{O as qh}from"./OpenInNew-DvFUoslf.js";import{t as Vh}from"./index-DIAVGp02.js";import{I as Kh}from"./iframe-CR7NHc3k.js";import{B as di}from"./ButtonGroup-CxvwZYcf.js";import{L as Wa}from"./LoadingButton-B7A4RgXc.js";import"./depsEqual-BXmAVsgz.js";import"./url-evaluation-CbmurDMU.js";import"./useLocalStorage-DJDEgIs9.js";import"./MoreVert-Br73441r.js";import"./get-safe-url-DBGH2Atd.js";import"./permission-DctTgsY2.js";import"./ListSubheader-DqTyGZYI.js";import"./getValidReactChildren-Dqpr7Uun.js";function Yh(e){return qf("MuiListItemAvatar",e)}Vf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Jh=e=>{const{alignItems:r,classes:n}=e;return Jf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Yh,n)},Qh=it("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Ha=I.forwardRef(function(r,n){const t=Kf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(Yf),l={...t,alignItems:a.alignItems},s=Jh(l);return g.jsx(Qh,{className:rt(s.root,i),ownerState:l,ref:n,...o})});var Xh=Qf(function(){return Xf?sessionStorage:void 0});function Zh(e,r){return Zf(r,function(n){return e[n]})}function eg(e){return e==null?[]:Zh(e,ep(e))}var tg=tp.isFinite;function Ua(e){return typeof e=="number"&&tg(e)}function rg(e){return typeof e=="number"&&e==rp(e)}var ng=bh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const ig=Object.freeze(Object.defineProperty({__proto__:null,default:ng},Symbol.toStringTag,{value:"Module"}));var og=ac(function(e){var r=np(e);return r=typeof r=="function"?r:void 0,ip(op(e,1,lc,!0),void 0,r)});const ag=Object.freeze(Object.defineProperty({__proto__:null,default:og},Symbol.toStringTag,{value:"Module"}));var Ac=ac(function(e,r){return lc(e)?Mh(e,r):[]}),mr={};const lg=Gn(ag),sg=Gn(ap),cg=Gn(ig);var qa;function ug(){return qa||(qa=1,function(e){var r=mr&&mr.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ie,e.deepWalk=w,e.isMatchSection=P,e.nestNavigationList=ee,e.filterNavigation=Q,e.cleanOrphanNavigation=Z,e.joinLink=j,e.flattenNavigation=M,e.splitNavigationBySection=J;const n=lp(),t=r(lg),i=r(sp),o=r(cp),a=r(sg),l=r(up),s=r(gh),c=r(vh),u=gp(),f=r(mh()),d=r(sc()),p=r(dp),h=r(fp),v=r(cg),m=pp(),y=hp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return y.checkLink}});const b="header",C="/",D="/",_="/";function w($,W=()=>{},{key:L="children",order:N="first"}={}){function O(U,{index:te=0,parent:ae=null,level:de=0}={}){Array.isArray(U)?U.forEach((pe,Ce)=>{O(pe,{index:Ce,parent:ae,level:de+1})}):U&&(N==="first"&&W(U,ae,{index:te,level:de}),O(U[L],{parent:U,level:de}),N==="last"&&W(U,ae,{index:te,level:de}))}O($)}function P($,W){return W===b&&(0,a.default)($)?!0:Array.isArray($)?$.includes(W):$===W}function S($){try{return JSON.parse($)}catch{return $}}function T($){return $.map(W=>{const L={...W};return L.role&&(L.role=S(L.role)),L.section&&(L.section=S(L.section)),L.title&&(L.title=S(L.title)),L.description&&(L.description=S(L.description)),L.link&&(L.link=S(L.link)),L})}function R($="/",W=""){if((0,d.default)(W||""))return W;const L=f.default.join($,W||D);return L.length>1&&L.endsWith("/")?L.slice(0,L.length-1):L}function k($,W,{strict:L=!0}={}){let N=$,O=W;return L||(N=N||"/",O=O||"/"),(0,p.default)(N)&&(0,h.default)(O)&&(0,y.checkLink)(O)?Object.keys(N).reduce((U,te)=>(U[te]=R(N[te],O),U),{}):(0,h.default)(N)&&(0,y.checkLink)(N)&&(0,p.default)(O)?Object.keys(O).reduce((U,te)=>(U[te]=R(N,O[te]),U),{}):(0,h.default)(N)&&(0,h.default)(O)?(0,y.checkLink)(N)||(0,y.checkLink)(O)?R(N,O):O:(0,p.default)(N)&&(0,p.default)(O)?[...new Set([...Object.keys(N),...Object.keys(O)])].reduce((te,ae)=>(te[ae]=R(N[ae],O[ae]),te),{}):O}function j($,W){const L=(0,c.default)($);return w(L,(N,O)=>{const U=N.component||N.child;if(U){const te=W.find(ae=>ae.name===U);te&&(N.link=k(te.link,N.link,{strict:!1}))}else O&&(N.link=k(O.link,N.link))},{key:"items"}),L}function M($=[],{depth:W=1,transform:L=N=>N}={}){const N=(0,c.default)($),O=[];return w(N,(U,te,{level:ae})=>{if(ae>=W){const{items:de=[]}=U;if(de&&Array.isArray(de)&&de.length>0){delete U.items;const pe=de.map(Ce=>L(Ce,U));if(te)te.items.push(...pe);else{const Ce=L((0,s.default)(U,["items"]),te);O.push(Ce,...pe)}}else if(ae===1){const pe=L((0,s.default)(U,["items"]),te);O.push(pe)}}else ae===1&&O.push(U)},{key:"items",order:"last"}),O}function H($){if($.section!=="bottomNavigation")return $;const W={...$};return n.NAVIGATION_I18N_FIELDS.forEach(L=>{const N=W[L];typeof N=="string"&&(W[L]={en:N})}),W}function E($={}){const W=[];function L(O,U={}){const te=[],{children:ae=[],meta:de={}}=O,pe=(0,c.default)(de?.navigation||[]);(0,m.hasStartEngine)(de)&&O.meta?.capabilities?.navigation!==!1&&te.push(...pe);const Ce=U.name||"",Ae=U.mountPoint||C,be=O===$?"":de.name||"",De=O===$?"":O.mountPoint||C;for(const se of ae){if(!(0,m.hasStartEngine)(se.meta))continue;const ve=se.meta.name,ot=se.mountPoint,gr=[Ce,be,ve].filter(Boolean).join("."),si=se.meta.navigation||[],ci=(0,u.joinURL)(Ae,De,ot);se.meta?.capabilities?.navigation!==!1&&W.push({did:se.meta.did,name:gr,link:ci,title:se.meta.title||"",navigation:si.map(Je=>({section:b,...Je}))});const at=pe.find(Je=>Je.component?Je.component===ve:!1);if(at){if(!at.link)if(se.meta.navigation&&se.meta.navigation.length>0){const Je=L(se,{mountPoint:De,name:be});Je.length>0&&(at.items=at.items??[],at.items.push(...Je))}else at.link=D}else if(se.meta?.capabilities?.navigation!==!1){const Je=L(se,{mountPoint:De,name:be}),an={title:se.meta.title,component:ve,id:se.meta.did};Je.length>0?(an.items=Je,an.link=void 0):an.link=D,te.push(an)}}return te}return{navigationList:L($),components:W}}function B($){const W=(0,c.default)($).filter(L=>L.id);return w(W,(L,N)=>{if(L.items&&L.items.length){for(let O=L.items.length-1;O>=0;O--)L.items[O].id||L.items.splice(O,1);L.items.length===0&&L.component&&(L.link=L.link||D)}N&&(L.parent=N.id,L.id=[N.id,L.id].join(_)),L.from=L.from||"yaml",L.visible=L.visible??!0},{key:"items"}),W}function G($,W=2){const L=(0,c.default)($),N=M(L,{depth:W,transform:(O,U)=>(U&&(O._parent||(O._parent=U.id,U.component||(O.link=k(U.link,O.link))),O.section=O.section||U.section||[b],O.visible=O.visible??U.visible,U.role&&(O.role=O.role||U.role)),O.component=[U.component,O.component].filter(Boolean).join("."),O)});return w(N,O=>{O.items&&O.items.length>0&&O.items.reduceRight((U,te)=>{if(te._parent){const ae=O.items.findIndex(de=>de.id===te._parent);ae>=0&&O.items.splice(ae,1),delete te._parent}return null},null)},{key:"items"}),N}function q($,W){return W&&Array.isArray($.items)?$.items.filter(L=>(0,a.default)(L.section)?P($.section,W):!!P(L.section,W)).map(L=>({...L,section:W})):[]}function J($){const W=(0,c.default)($),L=[];for(const N of W){let te=function(ae,de){const pe=q(ae,de);U.push({...O,section:de,items:pe})};const O=(0,c.default)((0,s.default)(N,["items"])),U=[];if(Array.isArray(N.section))for(const ae of N.section)te(N,ae);else if(N.section){const{section:ae}=N;te(N,ae)}else if(N.items&&N.items.length>0){const ae=N.items.reduce((pe,Ce)=>{const{section:Ae=[b]}=Ce||{};return pe.push(...Ae),pe},[]),de=[...new Set(ae)];for(const pe of de)te(N,pe)}else U.push({...N,section:b});L.push(...U)}return L}function ee($=[]){const W=(0,c.default)($);return W.reduceRight((L,N,O)=>{if(N.parent){const U=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);U&&(U.items||(U.items=[]),U.items=[N,...U.items]),W.splice(O,1)}return null},null),W}function Q($,W=[]){const L=ee($);return w(L,O=>{if(O?.component&&(W.some(U=>U.name===O.component)||(O.visible=!1)),O.items&&O.items.length)for(let U=O.items.length-1;U>=0;U--)O.items[U].visible===!1&&O.items.splice(U,1)},{key:"items"}),L.filter(O=>!(O.visible===!1||O.items&&Array.isArray(O.items)&&O.items.length>0&&O.items?.every(U=>U.visible===!1)))}function Z($){return $.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const V=$=>{const[W,L]=(0,v.default)($,N=>N.id==="/team");return[...W,...L]};e.sortRootNavigation=V;const re=$=>{const[,W]=(0,v.default)($,L=>{const N=typeof L.title=="string"?L.title:L.title?.en;return L.id==="/team"&&N==="Access"||L.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=re;function ie($={},W={}){const{beforeProcess:L=se=>se}=W,{navigationList:N,components:O}=E($),U=new Map;N.forEach(se=>{se.items?.forEach(ve=>{U.set((0,u.joinURL)(se.id,ve.id),ve)})});const te=(0,l.default)($,"settings.org.enabled",!1);$?.settings?.navigations&&(Array.isArray($.settings.navigations)?$.settings.navigations=[...$.settings.navigations].filter(se=>!(se?.parent==="/team"&&se.from==="team-tmpl")).map(se=>{if(se.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(se,"private")){const ve=U.get(se.id);ve&&Object.prototype.hasOwnProperty.call(ve,"private")&&(se.private=ve.private)}return!te&&se.section==="userCenter"&&se.id==="/userCenter/orgs"?null:se}).filter(Boolean):$.settings.navigations=[]);const ae=T(re($?.settings?.navigations||[])).map(H),de=G(L(N)),pe=B(de),Ae=J(pe).reduce((se,ve)=>["bottom","social","sessionManager","userCenter"].includes(ve.section)&&ve.items&&ve.items.length>0?(se.push(...ve.items.map(gr=>{const{section:si}=ve,ci=k(ve.link,gr.link),at=[ve.component,gr.component].filter(Boolean).join(".");return{...gr,section:si,link:ci,component:at,parent:""}})),se):(se.push(ve),se),[]),be=M(Ae,{transform(se,ve){let{component:ot}=se;return ve?.component&&(ot=[ve.component,se.component].filter(Boolean).join(".")),H({...se,component:ot})}});return{navigationList:(0,t.default)(ae,be,(se,ve)=>{const ot=["id","section"];return(0,i.default)((0,o.default)(se,ot),(0,o.default)(ve,ot))}),components:O,builtinList:be}}}(mr)),mr}var ke=ug();const Lc=I.createContext(null),Va="/",dg="header",Ka={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Me(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Me(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled}]};function fi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const st=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Me(xe.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),fg=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),pg=(e,r)=>{const n=ke.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(fg("/team",e("navigation.blockletService"),[st("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),st("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),st("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),st("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),st("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),st("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),st("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),st("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ya({name:e}){return g.jsx(bp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function hg({children:e}){const{blocklet:r,actions:n}=Ft(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=ke.parseNavigation(r,{beforeProcess(w){const P=Qe(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Ka,S)&&Ka[S].forEach(T=>{(T.shouldDisplay&&typeof T.shouldDisplay=="function"?T.shouldDisplay:()=>!0)(r)&&!P.some(k=>k.id===T.id)&&P.push(T)})}),pg(t,P)}}),l=zt({rawNavigation:Qe(i),activeSection:dg,components:o}),s=I.useMemo(()=>ke.nestNavigationList(Qe(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const w=ke.filterNavigation(Qe(l.rawNavigation),o);return ke.joinLink(w,o)},[o,l.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const P=ke.flattenNavigation(ke.joinLink(s,o)),S=P.find(T=>T.id===w.id);if(S?.component){if(!o.some(T=>T.name===S.component))return g.jsx(Ya,{name:S.component})}else if(S.parent){const T=P.find(R=>R.id===S.parent);if(T?.component&&!o.some(R=>R.name===T.component))return g.jsx(Ya,{name:T.component})}return S?.link},[s,o]),f=I.useCallback(w=>{l.activeSection=w},[l]),d=I.useCallback(w=>{const P=[];ke.deepWalk(w,(T,R)=>{const k={...Et(T,["children","expand"]),parent:R?.id};P.push(k)});const S=Qe(l.rawNavigation).filter(T=>{if(!l.activeSection)return!1;const R=P.find(k=>fi(k,T));return R?!ke.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...S,...P]},[l]),p=I.useCallback((w=[])=>{const P=Qe(l.rawNavigation).map(S=>{const T=w.find(R=>fi({...R,section:l.activeSection},S));return T?{...S,...T}:S});l.rawNavigation=P},[l]),h=I.useCallback((w,P=Va)=>w.map(T=>{const k=o.find(H=>H.name===T.component)?.link||P,j=T.items||[],{link:M}=T;return{title:T.title,description:T.description,subtitle:u(T),link:M,icon:T.icon,children:h(j,M||Va),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:k}}),[o,u]),v=I.useCallback(w=>{p([w])},[p]),m=I.useCallback(w=>{const P=l.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);l.rawNavigation=Qe(l.rawNavigation).filter(S=>!P.includes(S.id))},[l]),y=I.useCallback((w={},P=-1)=>{const S={...w,id:vp.nanoid(),section:l.activeSection,visible:!0},T=[...l.rawNavigation],R=T.filter(k=>k.section===l.activeSection);if(P<0||P>R.length-1)T.push(S);else{const k=R[P],j=T.findIndex(M=>fi(M,k));T.splice(j,0,S)}return l.rawNavigation=T,S},[l]),b=I.useCallback(w=>{const S=Qe(s).filter(T=>ke.isMatchSection(T.section,w));return h(S)},[s,h]),C=I.useCallback(async w=>{const S=w.map(T=>mp(T,yp)).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(S)},[n]),D=I.useCallback(async w=>{if(w){const P=a.filter(T=>ke.isMatchSection(T.section,w)),S=l.rawNavigation.filter(T=>!ke.isMatchSection(T.section,w));await C(S),l.rawNavigation=[...S,...P]}else await C([]),l.rawNavigation=Qe(a)},[C,l,a]),_=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:C,resetNavigation:D}),[l,c,o,u,f,v,m,y,d,b,C,D]);return g.jsx(Lc.Provider,{value:_,children:e})}function zc(){const e=I.useContext(Lc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ve={},pi,Ja;function gg(){if(Ja)return pi;Ja=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Rr=="object"&&Rr&&Rr.Object===Object&&Rr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,P,S){var T,R,k,j,M,H,E=0,B=!1,G=!1,q=!0;if(typeof w!="function")throw new TypeError(e);P=_(P)||0,b(S)&&(B=!!S.leading,G="maxWait"in S,k=G?p(_(S.maxWait)||0,P):k,q="trailing"in S?!!S.trailing:q);function J(L){var N=T,O=R;return T=R=void 0,E=L,j=w.apply(O,N),j}function ee(L){return E=L,M=setTimeout(V,P),B?J(L):j}function Q(L){var N=L-H,O=L-E,U=P-N;return G?h(U,k-O):U}function Z(L){var N=L-H,O=L-E;return H===void 0||N>=P||N<0||G&&O>=k}function V(){var L=v();if(Z(L))return re(L);M=setTimeout(V,Q(L))}function re(L){return M=void 0,q&&T?J(L):(T=R=void 0,j)}function ie(){M!==void 0&&clearTimeout(M),E=0,T=H=R=M=void 0}function $(){return M===void 0?j:re(v())}function W(){var L=v(),N=Z(L);if(T=arguments,R=this,H=L,N){if(M===void 0)return ee(H);if(G)return M=setTimeout(V,P),J(H)}return M===void 0&&(M=setTimeout(V,P)),j}return W.cancel=ie,W.flush=$,W}function y(w,P,S){var T=!0,R=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(T="leading"in S?!!S.leading:T,R="trailing"in S?!!S.trailing:R),m(w,P,{leading:T,maxWait:P,trailing:R})}function b(w){var P=typeof w;return!!w&&(P=="object"||P=="function")}function C(w){return!!w&&typeof w=="object"}function D(w){return typeof w=="symbol"||C(w)&&d.call(w)==n}function _(w){if(typeof w=="number")return w;if(D(w))return r;if(b(w)){var P=typeof w.valueOf=="function"?w.valueOf():w;w=b(P)?P+"":P}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?l(w.slice(2),S?2:8):i.test(w)?r:+w}return pi=y,pi}var br={exports:{}},Tt={exports:{}},vg=Tt.exports,Qa;function mg(){return Qa||(Qa=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Tt.exports=function(){return performance.now()}:typeof vr<"u"&&vr!==null&&vr.hrtime?(Tt.exports=function(){return(e()-i)/1e6},r=vr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=vr.uptime()*1e9,i=t-o):Date.now?(Tt.exports=function(){return Date.now()-n},n=Date.now()):(Tt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(vg)),Tt.exports}var Xa;function bg(){if(Xa)return br.exports;Xa=1;for(var e=mg(),r=typeof window>"u"?Rr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var l=0,s=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),p=Math.max(0,u-(d-l));l=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}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 br.exports=function(f){return i.call(r,f)},br.exports.cancel=function(){o.apply(r,arguments)},br.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},br.exports}var ln={},Za;function yg(){if(Za)return ln;Za=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return ln}var $t={},el;function xg(){if(el)return $t;el=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.noop=e,$t.intBetween=r,$t.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return $t}var tl;function Sg(){if(tl)return Ve;tl=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.createHorizontalStrength=T,Ve.createVerticalStrength=R,Ve.createScrollingComponent=M,Ve.default=H,Ve.defaultVerticalStrength=Ve.defaultHorizontalStrength=void 0;var e=u(cc()),r=c(uc()),n=xp(),t=c(gg()),i=c(bg()),o=c(yg()),a=xh,l=c(Sp()),s=xg();function c(E){return E&&E.__esModule?E:{default:E}}function u(E){if(E&&E.__esModule)return E;var B={};if(E!=null){for(var G in E)if(Object.prototype.hasOwnProperty.call(E,G)){var q=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,G):{};q.get||q.set?Object.defineProperty(B,G,q):B[G]=E[G]}}return B.default=E,B}function f(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(G){return typeof G}:f=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},f(E)}function d(){return d=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var G=arguments[B];for(var q in G)Object.prototype.hasOwnProperty.call(G,q)&&(E[q]=G[q])}return E},d.apply(this,arguments)}function p(E,B){if(E==null)return{};var G=h(E,B),q,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)q=ee[J],!(B.indexOf(q)>=0)&&Object.prototype.propertyIsEnumerable.call(E,q)&&(G[q]=E[q])}return G}function h(E,B){if(E==null)return{};var G={},q=Object.keys(E),J,ee;for(ee=0;ee<q.length;ee++)J=q[ee],!(B.indexOf(J)>=0)&&(G[J]=E[J]);return G}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var G=0;G<B.length;G++){var q=B[G];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(E,q.key,q)}}function y(E,B,G){return B&&m(E.prototype,B),E}function b(E,B){return B&&(f(B)==="object"||typeof B=="function")?B:w(E)}function C(E){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},C(E)}function D(E,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(B&&B.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),B&&_(E,B)}function _(E,B){return _=Object.setPrototypeOf||function(q,J){return q.__proto__=J,q},_(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function P(E,B,G){return B in E?Object.defineProperty(E,B,{value:G,enumerable:!0,configurable:!0,writable:!0}):E[B]=G,E}var S=150;function T(E){return function(G,q){var J=G.x,ee=G.w,Q=G.y,Z=G.h,V=Math.min(ee/2,E),re=q.x>=J&&q.x<=J+ee,ie=re&&q.y>=Q&&q.y<=Q+Z;if(ie){if(q.x<J+V)return(q.x-J-V)/V;if(q.x>J+ee-V)return-(J+ee-q.x-V)/V}return 0}}function R(E){return function(G,q){var J=G.y,ee=G.h,Q=G.x,Z=G.w,V=Math.min(ee/2,E),re=q.y>=J&&q.y<=J+ee,ie=re&&q.x>=Q&&q.x<=Q+Z;if(ie){if(q.y<J+V)return(q.y-J-V)/V;if(q.y>J+ee-V)return-(J+ee-q.y-V)/V}return 0}}var k=T(S);Ve.defaultHorizontalStrength=k;var j=R(S);Ve.defaultVerticalStrength=j;function M(E){var B=function(G){D(q,G);function q(J,ee){var Q;return v(this,q),Q=b(this,C(q).call(this,J,ee)),P(w(w(Q)),"updateScrolling",(0,t.default)(function(Z){var V=Q.container.getBoundingClientRect(),re=V.left,ie=V.top,$=V.width,W=V.height,L={x:re,y:ie,w:$,h:W},N=(0,s.getCoords)(Z),O=Q.props,U=O.horizontalStrength,te=O.verticalStrength;Q.scaleX=U(L,N),Q.scaleY=te(L,N),!Q.frame&&(Q.scaleX||Q.scaleY)&&Q.startScrolling()},100,{trailing:!1})),P(w(w(Q)),"handleEvent",function(Z){Q.dragging&&!Q.attached&&(Q.attach(),Q.updateScrolling(Z))}),Q.wrappedInstance=e.default.createRef(),Q.scaleX=0,Q.scaleY=0,Q.frame=null,Q.attached=!1,Q.dragging=!1,Q}return y(q,[{key:"componentDidMount",value:function(){var ee=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var Q=this.props.dragDropManager;this.clearMonitorSubscription=Q.getMonitor().subscribeToStateChange(function(){return ee.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var ee=this.props.dragDropManager,Q=ee.getMonitor().isDragging();!this.dragging&&Q?this.dragging=!0:this.dragging&&!Q&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var ee=this,Q=0,Z=function V(){var re=ee.scaleX,ie=ee.scaleY,$=ee.container,W=ee.props,L=W.strengthMultiplier,N=W.onScrollChange;if(L===0||re+ie===0){ee.stopScrolling();return}if(Q+=1,Q%2){var O=$.scrollLeft,U=$.scrollTop,te=$.scrollWidth,ae=$.scrollHeight,de=$.clientWidth,pe=$.clientHeight,Ce=re?$.scrollLeft=(0,s.intBetween)(0,te-de,O+re*L):O,Ae=ie?$.scrollTop=(0,s.intBetween)(0,ae-pe,U+ie*L):U;N(Ce,Ae)}ee.frame=(0,i.default)(V)};Z()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var Q=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,d({ref:this.wrappedInstance},Q))}}]),q}(e.Component);return P(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),P(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),P(B,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:k,strengthMultiplier:30}),(0,l.default)(B,E)}function H(E){var B=M(E);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(q){var J=q.dragDropManager;return J===void 0?null:e.default.createElement(B,d({},G,{dragDropManager:J}))})}}return Ve}var bn=Sg();const wg=$n(bn);var Cg=Sh();const rl=$n(Cg);function jc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Fc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Bc(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}jc.__suppressDeprecationWarning=!0;Fc.__suppressDeprecationWarning=!0;Bc.__suppressDeprecationWarning=!0;function Jr(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
3
3
 
4
4
  `+o+" uses "+a+" but also contains the following legacy lifecycles:"+(n!==null?`
5
5
  `+n:"")+(t!==null?`
@@ -40,7 +40,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
40
40
  *
41
41
  * @license MIT
42
42
  * @version 1.0.8
43
- */const Bu=Object.freeze({left:0,top:0,width:16,height:16}),En=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tn=Object.freeze({...Bu,...En}),lo=Object.freeze({...tn,body:"",hidden:!1}),ly=Object.freeze({width:null,height:null}),Gu=Object.freeze({...ly,...En});function sy(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function t(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:t(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?t(o):0)}}return r}const cy=/[\s,]+/;function uy(e,r){r.split(cy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const $u={...Gu,preserveAspectRatio:""};function rs(e){const r={...$u},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=sy(n("rotate","")),uy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function dy(e,r){for(const n in $u)if(e[n]!==r[n])return!0;return!1}const Ar=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!Sn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Sn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!Sn(l,n)?null:l}return null},Sn=(e,r)=>e?!!((e.provider===""||e.provider.match(Ar))&&(r&&e.prefix===""||e.prefix.match(Ar))&&e.name.match(Ar)):!1;function fy(e,r){const n={};!e.hFlip!=!r.hFlip&&(n.hFlip=!0),!e.vFlip!=!r.vFlip&&(n.vFlip=!0);const t=((e.rotate||0)+(r.rotate||0))%4;return t&&(n.rotate=t),n}function ns(e,r){const n=fy(e,r);for(const t in lo)t in En?t in e&&!(t in n)&&(n[t]=En[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function py(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function hy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=ns(t[l]||i[l],o)}return a(r),n.forEach(a),ns(e,o)}function Wu(e,r){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{r(i,null),n.push(i)});const t=py(e);for(const i in t){const o=t[i];o&&(r(i,hy(e,i,o)),n.push(i))}return n}const gy={provider:"",aliases:{},not_found:{},...Bu};function ki(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Hu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!ki(e,gy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Ar)||typeof o.body!="string"||!ki(o,lo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Ar)||typeof a!="string"||!n[a]&&!t[a]||!ki(o,lo))return null}return r}const Nn=Object.create(null);function vy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function St(e,r){const n=Nn[e]||(Nn[e]=Object.create(null));return n[r]||(n[r]=vy(e,r))}function Yo(e,r){return Hu(r)?Wu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function my(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function by(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Nn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Nn[i]||{})).forEach(a=>{const l=St(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let $r=!1;function Uu(e){return typeof e=="boolean"&&($r=e),$r}function Wr(e){const r=typeof e=="string"?rn(e,!0,$r):e;if(r){const n=St(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function qu(e,r){const n=rn(e,!0,$r);if(!n)return!1;const t=St(n.provider,n.prefix);return my(t,n.name,r)}function is(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),$r&&!r&&!e.prefix){let i=!1;return Hu(e)&&(e.prefix="",Wu(e,(o,a)=>{a&&qu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Sn({provider:r,prefix:n,name:"a"}))return!1;const t=St(r,n);return!!Yo(t,e)}function yy(e){return!!Wr(e)}function xy(e){const r=Wr(e);return r?{...tn,...r}:null}function Sy(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=St(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Vu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function wy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Vu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Cy=0;function Iy(e,r,n){const t=Cy++,i=Vu.bind(null,n,t);if(!r.pending.length)return i;const o={id:t,icons:r,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}const so=Object.create(null);function os(e,r){so[e]=r}function co(e){return so[e]||so[""]}function Ry(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?rn(i,r,n):i;o&&t.push(o)}),t}var Ty={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Dy(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let w=e.resources.slice(0);for(a=[];w.length>1;){const P=Math.floor(Math.random()*w.length);a.push(w[P]),w=w.slice(0,P).concat(w.slice(P+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function v(){s==="pending"&&(s="aborted"),h(),d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function m(w,P){P&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){s="failed",p.forEach(w=>{w(void 0,u)})}function C(){d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function D(w,P,S){const T=P!=="success";switch(d=d.filter(R=>R!==w),s){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(P==="abort"){u=S,b();return}if(T){u=S,d.length||(a.length?_():b());return}if(h(),C(),!e.random){const R=e.resources.indexOf(w.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",p.forEach(R=>{R(S)})}function _(){if(s!=="pending")return;h();const w=a.shift();if(w===void 0){if(d.length){f=setTimeout(()=>{h(),s==="pending"&&(C(),b())},e.timeout);return}b();return}const P={status:"pending",resource:w,callback:(S,T)=>{D(P,S,T)}};d.push(P),c++,f=setTimeout(_,e.rotate),n(w,r,P.callback)}return setTimeout(_),y}function Ku(e){const r={...Ty,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=Dy(r,l,s,(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 Jo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Zn=Object.create(null),xr=["https://api.simplesvg.com","https://api.unisvg.com"],wn=[];for(;xr.length>0;)xr.length===1||Math.random()>.5?wn.push(xr.shift()):wn.push(xr.pop());Zn[""]=Jo({resources:["https://api.iconify.design"].concat(wn)});function as(e,r){const n=Jo(r);return n===null?!1:(Zn[e]=n,!0)}function ei(e){return Zn[e]}function Py(){return Object.keys(Zn)}function ls(){}const Oi=Object.create(null);function _y(e){if(!Oi[e]){const r=ei(e);if(!r)return;const n=Ku(r),t={config:r,redundancy:n};Oi[e]=t}return Oi[e]}function Yu(e,r,n){let t,i;if(typeof e=="string"){const o=co(e);if(!o)return n(void 0,424),ls;i=o.send;const a=_y(e);a&&(t=a.redundancy)}else{const o=Jo(e);if(o){t=Ku(o);const a=e.resources?e.resources[0]:"",l=co(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),ls):t.query(r,i,n)().abort}const ss="iconify2",Hr="iconify",Ju=Hr+"-count",cs=Hr+"-version",Qu=36e5,ky=168;function uo(e,r){try{return e.getItem(r)}catch{}}function Qo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function us(e,r){try{e.removeItem(r)}catch{}}function fo(e,r){return Qo(e,Ju,r.toString())}function po(e){return parseInt(uo(e,Ju))||0}const At={local:!0,session:!0},Xu={local:new Set,session:new Set};let Xo=!1;function Oy(e){Xo=e}let dn=typeof window>"u"?{}:window;function Zu(e){const r=e+"Storage";try{if(dn&&dn[r]&&typeof dn[r].length=="number")return dn[r]}catch{}At[e]=!1}function ed(e,r){const n=Zu(e);if(!n)return;const t=uo(n,cs);if(t!==ss){if(t){const l=po(n);for(let s=0;s<l;s++)us(n,Hr+s.toString())}Qo(n,cs,ss),fo(n,0);return}const i=Math.floor(Date.now()/Qu)-ky,o=l=>{const s=Hr+l.toString(),c=uo(n,s);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,l))return!0}catch{}us(n,s)}};let a=po(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,fo(n,a)):Xu[e].add(l))}function td(){if(!Xo){Oy(!0);for(const e in At)ed(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=St(t,i);if(!Yo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Ey(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in At)ed(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function Ny(e,r){Xo||td();function n(t){let i;if(!At[t]||!(i=Zu(t)))return;const o=Xu[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=po(i),!fo(i,a+1))return;const l={cached:Math.floor(Date.now()/Qu),provider:e.provider,data:r};return Qo(i,Hr+a.toString(),JSON.stringify(l))}r.lastModified&&!Ey(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function ds(){}function My(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,wy(e)}))}function Ay(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=co(n)))return;o.prepare(n,t,i).forEach(l=>{Yu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Yo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),Ny(e,s)}catch(c){console.error(c)}My(e)})})}))}const Zo=(e,r)=>{const n=Ry(e,!0,Uu()),t=Sy(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,ds)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(St(c,u));const 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=St(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&Ay(s,i[c][u])}),r?Iy(r,t,o):ds},Ly=e=>new Promise((r,n)=>{const t=typeof e=="string"?rn(e,!0):e;if(!t){n(e);return}Zo([t||e],i=>{if(i.length&&t){const o=Wr(t);if(o){r({...tn,...o});return}}n(e)})});function zy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function jy(e,r){const n=typeof e=="string"?rn(e,!0,!0):null;if(!n){const o=zy(e);return{value:e,data:o}}const t=Wr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=Zo([n],()=>r(e,n,Wr(n)));return{value:e,name:n,loading:i}}function Ei(e){return e.hasAttribute("inline")}let rd=!1;try{rd=navigator.vendor.indexOf("Apple")===0}catch{}function Fy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(rd||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const By=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Gy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ho(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const t=e.split(By);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Gy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const $y=e=>e==="unset"||e==="undefined"||e==="none";function nd(e,r){const n={...tn,...e},t={...Gu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=ho(f,s/c)):(u=a==="auto"?s:a,f=l===null?ho(u,c/s):l==="auto"?c:l);const d={},p=(h,v)=>{$y(v)||(d[h]=v.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const Wy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Mn=Wy();function Hy(e){Mn=e}function Uy(){return Mn}function qy(e,r){const n=ei(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function Vy(e){return e===404}const Ky=(e,r,n)=>{const t=[],i=qy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function Yy(e){if(typeof e=="string"){const r=ei(e);if(r)return r.path}return"/"}const Jy=(e,r,n)=>{if(!Mn){n("abort",424);return}let t=Yy(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Mn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Vy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Qy={prepare:Ky,send:Jy};function fs(e,r){switch(e){case"local":case"session":At[e]=r;break;case"all":for(const n in At)At[n]=r;break}}const Ni="data-style";let id="";function Xy(e){id=e}function ps(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ni));n||(n=document.createElement("style"),n.setAttribute(Ni,Ni),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+id}function od(){os("",Qy),Uu(!0);let e;try{e=window}catch{}if(e){if(td(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!is(i))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const t in n){const i="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;as(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>fs(n,!0),disableCache:n=>fs(n,!1),iconExists:yy,getIcon:xy,listIcons:by,addIcon:qu,addCollection:is,calculateSize:ho,buildIcon:nd,loadIcons:Zo,loadIcon:Ly,addAPIProvider:as,appendCustomStyle:Xy,_api:{getAPIConfig:ei,setAPIModule:os,sendAPIQuery:Yu,setFetch:Hy,getFetch:Uy,listAPIProviders:Py}}}function ad(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Zy(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ex(e){return"data:image/svg+xml,"+Zy(e)}function tx(e){return'url("'+ex(e)+'")'}const go={"background-color":"currentColor"},ld={"background-color":"transparent"},hs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},gs={"-webkit-mask":go,mask:go,background:ld};for(const e in gs){const r=gs[e];for(const n in hs)r[e+"-"+n]=hs[n]}function vs(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function rx(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=ad(i,{...o,width:r.width+"",height:r.height+""}),l=tx(a),s=t.style,c={"--svg":l,width:vs(o.width),height:vs(o.height),...n?go:ld};for(const u in c)s.setProperty(u,c[u]);return t}let Lr;function nx(){try{Lr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Lr=null}}function ix(e){return Lr===void 0&&nx(),Lr?Lr.createHTML(e):e}function ox(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=ad(e.body,n);return r.innerHTML=ix(i),r.firstChild}function ms(e,r){const n=r.icon.data,t=r.customisations,i=nd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=ox(i);break;default:a=rx(i,{...tn,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function bs(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function ax(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Ei(this);ps(l,s),this._state=bs({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Ei(this),c=this._state;s!==c.inline&&(c.inline=s,ps(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Ei(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}ms(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=rs(this);(l.attrMode!==c||dy(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=jy(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});s.data?this._gotIconData(s):this._state=bs(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,rs(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=Fy(l.data.body,c),f=this._state.inline;ms(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=od();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const lx=ax()||od(),{enableCache:xT,disableCache:ST,iconExists:wT,getIcon:CT,listIcons:IT,addIcon:RT,addCollection:TT,calculateSize:DT,buildIcon:PT,loadIcons:_T,loadIcon:kT,addAPIProvider:OT,_api:ET}=lx,Gt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Gt(t[n],r,n)}):r(t)),sd=(e,r="children")=>{const n=[];return Gt(e,t=>n.push(t),r),n},ea=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ea(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),cd=e=>/^https?:\/\//.test(e),ud=e=>/^mailto:/i.test(e.trim()),sx=e=>{if(!e||!e?.startsWith("/"))return!1;const r=i=>i.endsWith("/")?i:`${i}/`,n=r(window.location.pathname),t=r(new URL(e,window.location.origin).pathname);return n.startsWith(t)},dd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>sx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},cx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,p=h=>f>s-d&&u<n-1&&f+h>s+d;return e.forEach(h=>{const v=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&p(v)&&(u++,f=0,c[u]=[]),c[u].push({...h,group:!0}),f+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function Xe({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(Do(async()=>{s(!0);try{await Po(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),cd(e))return g.jsx(er,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?g.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(er,{component:"span",...t,sx:i,children:g.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(er,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function ta(e=["en","zh"]){const{blocklet:r}=Ft();return I.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>ft.SUPPORTED_LANGUAGES[c]),l=a.reduce((c,u)=>(c[u]=ft.SUPPORTED_LANGUAGES[u].nativeName,c),{}),s=a.map(c=>({code:c,name:ft.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:l,defaultLocale:o,languages:s}},[r.environments,e])}const ux=e=>e.from!=="team-tmpl";function dx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Cp(e.slice(0,t-1),r.slice(0,i-1)))}function fd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=Ft(),{defaultLocale:t}=ta(),i=n.environments.find(l=>l.key===ft.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=le(l=>{if(l?.startsWith("/"))try{return new URL(l,i?.value).href}catch{console.error("Failed to parse url",{url:l,origin:i?.value})}return l});function a(){const{title:l,subtitle:s}=e;let c=l,u=s;return Yt(l)&&(c=l[r]||l[t]||l.en),!I.isValidElement(s)&&Yt(s)&&(u=s[r]||s[t]||s.en),g.jsxs(oe,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:c}),s&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(_o(o(e.icon))?g.jsx(Xe,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}fd.propTypes={treeNode:x.object.isRequired};const fx=it(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function pd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(fx,{children:g.jsx(Ih,{backend:Rh,...i,children:g.jsx(tm,{generateNodeProps:o=>{const a=ux(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(ye,{icon:"ic:round-drag-indicator"}):g.jsx(oe,{sx:{width:16,height:16}}),title:g.jsx(fd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:dx,theme:ay})})})}pd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var px=sc();const hx=$n(px);function hd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:l=()=>{}}){const{t:s}=Ee(),c=I.useRef(),[u,f]=I.useState(null),d=zt({localeList:[],inputLocale:"",localeError:""}),p=I.useMemo(()=>!!u,[u]),h=I.useMemo(()=>o.includes(i)?i:t,[o,i]),v=I.useMemo(()=>d.localeList.filter(S=>!!a[S]),[d.localeList,a]),m=I.useMemo(()=>Object.keys(Et(a,[...d.localeList,t])).map(S=>({title:a[S],value:S})),[d.localeList]),y=I.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=le(S=>S?S===t||d.localeList.includes(S)?s("navigation.form.localeExists",{value:S}):!0:s("common.requiredErrorText",{name:"Locale"})),C=le((S="")=>{const T=S?.trim(),R=b(T);return R!==!0?d.localeError=R:d.localeError="",R}),D=le(()=>{f(null),d.inputLocale="",d.localeError=""}),_=le(()=>{const S=d.inputLocale?.trim();C(S)===!0&&(D(),d.localeList.push(S),r(S))}),w=le((S,T)=>{S.preventDefault(),S.stopPropagation(),d.localeList=Ac(d.localeList,T),l(T)}),P=le(S=>{const{value:T}=S.target;C(T),d.inputLocale=T});return I.useEffect(()=>{d.localeList=[...o]},[o,d]),yh("enter",()=>{setTimeout(()=>{_()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(zh,{sx:e,value:h,onChange:(S,T)=>{n(T)},children:[g.jsx($a,{label:y,value:t}),v.map(S=>g.jsx($a,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(Ne,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{w(T,S)},children:g.jsx(ye,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(Ne,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{f(S.currentTarget)},children:g.jsx(ye,{icon:"mdi:plus"})})]}),g.jsx(Ui,{open:p,anchorEl:u,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(oe,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:s("navigation.form.localePlaceholder")}),g.jsx(oe,{sx:{mt:1},children:g.jsx(Ki,{required:!0,fullWidth:!0,label:"Locale",value:d.inputLocale,options:m,onChange:P,error:!!d.localeError,helperText:d.localeError||" "})}),g.jsx(oe,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(yt,{size:"small",variant:"contained",onClick:_,children:s("common.confirm")})})]})})]})}hd.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const ra=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function gd(e,r,n=5e3){for(const t of ra){const i=Me(t,e);try{return await Fh.get(i,{params:r,timeout:n})}catch(o){console.warn(`Failed to fetch from ${i}:`,o)}}throw new Error(`All icon API endpoints ${e} failed`)}async function gx({keyword:e,limit:r=999,start:n=0,palette:t=!1}){let i="",o=e;e.includes(":")&&([i,o]=e.split(":"));const{data:a}=await gd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const fn=new Map;async function vx(e){if(fn.has(e))return fn.get(e);const r=(async()=>{const{data:n}=await gd("/collection",{prefix:e}),t=new Set;return n.uncategorized?.forEach(i=>t.add(`${e}:${i}`)),Object.values(n.categories??{}).forEach(i=>{i.forEach(o=>t.add(`${e}:${o}`))}),Array.from(t)})();fn.set(e,r);try{return await r}catch(n){throw fn.delete(e),n}}function mx(e){return Me(ra[0],`${e}.svg`)}function bx(e){try{const r=new URL(e);for(const n of ra)if(r.origin===n)return Ip(r.pathname).replace(".svg","");return""}catch{return""}}function yx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):_o(e)&&(n=bx(e))),{isIconId:r,iconId:n}}const xx=I.lazy(()=>Pp(()=>import("./index-Brhgisql.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),ys=qe(Xe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function vd({icon:e,...r}){const[n,t]=I.useState(!1);return Do(async()=>{t(!1),await Po(e),t(!0)},[e]),e?n?g.jsx(ye,{icon:e,...r}):g.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}vd.propTypes={icon:x.string.isRequired};function vo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=dc(),{blocklet:u}=Ft(),f=Hn(Z=>Z.breakpoints.down("md")),d=u.environments.find(Z=>Z.key===ft.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Ee(),{isIconId:C,iconId:D}=yx(e),[_,w]=I.useState(null),{onChange:P,onBlur:S,sx:T,...R}=a,k=i.includes("upload"),j=i.includes("select"),M=Me(s,"/api/media/upload",u.appPid),H=zt({showPopover:!1}),E=le(Z=>{if(Z?.startsWith("/"))try{const V=c?window.location.origin:d?.value;return new URL(Z,V).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[d?.value,c]),B=le(async Z=>await h.current.getUploader().uploadFile(Z)),G=le(()=>{w(null)}),q=le(()=>{j&&w(m.current)}),J=le(async Z=>{try{if(o==="url"){const V=mx(Z),re=await Rp(V,{width:128,height:128}),ie=await Tp(re,Z);await B(ie)}else P?.(Z)}catch(V){console.error("Failed to pick icon:",V)}G()}),ee=le(Z=>{Z.stopPropagation(),v.current.open(),G()}),Q=le(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(nt,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:j?q:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Rn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(ys,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Rn,{position:"end",children:[g.jsx(Ne,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),P("")},children:g.jsx(Nc,{style:{fontSize:18}})}),k&&g.jsx(Dp,{title:y("common.upload"),children:g.jsx(Ne,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(vd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&g.jsx(oe,{component:jh,sx:{mr:"-6px",fontSize:24,transform:_?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&g.jsx(Ui,{open:!!_,anchorEl:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:G,children:g.jsx(md,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(mo,{ref:h,locale:b,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:Q}),g.jsx(mo,{ref:v,locale:b,apiPath:M,headers:p,onUploadFinish:Q}),g.jsx(Ui,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(ys,{size:120,icon:E(e),alt:"Error"})})]})}vo.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function md({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[p,h]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Ee(),D=96,_=le(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,T=(S-1)*D,R=S*D,k=m.current.slice(T,R);s(j=>[...j,...k]),y.current=S,b.current=R<m.current.length,u(!1)},300))}),w=le(S=>{m.current=S,y.current=1,b.current=S.length>D;const T=S.slice(0,D);s(T),h(S.length===0),b.current&&_()}),{run:P}=fc(async S=>{if(S){u(!0);try{const{icons:T}=await gx({keyword:S});w(T)}catch(T){console.error("Failed to search icons:",T),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:k,clientHeight:j}=v.current;(R+j>=k-150||k<=j)&&_()},T=v.current;return T&&(T.addEventListener("scroll",S),S()),()=>{T&&T.removeEventListener("scroll",S)}},[_,c]),Do(async()=>{if(f)P(f);else{u(!0);try{const S=await vx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[f,P,w]),g.jsxs(Sx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(nt,{label:C("navigation.form.searchIcons"),placeholder:C("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:S=>d(S.target.value),slotProps:{input:{endAdornment:g.jsx(Ne,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx(Nc,{style:{fontSize:18}})})}}}),g.jsx(yt,{onClick:o,children:C("common.cancel")})]}),g.jsxs(oe,{children:[l.length>0&&g.jsx(oe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(S=>g.jsx(wx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(ye,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(oe,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(pc,{size:20})})]})]})}md.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Sx=qe(oe)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),wx=qe(Ne,{shouldForwardProp:e=>e!=="$active"})(({$active:e,theme:r})=>({boxSizing:"content-box",backgroundColor:e?r.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:r.palette.action.hover}}));function mo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return g.jsx(I.Suspense,{children:g.jsx(xx,{locale:r,ref:e,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:i,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:t}})})}mo.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const xs=24,Ss=48,ws="add";x.string.isRequired;function na({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ec(),{t:l,locale:s}=Ee(),{localeMap:c,defaultLocale:u}=ta(),f=le(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),d=le(N=>Ac(Array.from(new Set(xe.NAVIGATION_I18N_FIELDS.flatMap(O=>Yt(N[O])?Object.keys(N[O]):[]))),u)),p=I.useRef(()=>{}),h=zt({isRoot:!0,type:ws,linkDisabled:!1,locale:u,formState:f(),get localeList(){return d(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=Ah({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{xe.NAVIGATION_I18N_FIELDS.forEach(N=>b(N,h.formState[N][h.locale]))},[b,h.locale]);const _=Lh({control:m}),w=_.component,P=_.title,S=_.description,T=_.link,R=_.parent;I.useEffect(()=>{h.formState.title[h.locale]=P},[P]),I.useEffect(()=>{h.formState.description[h.locale]=S},[S]),I.useEffect(()=>{h.formState.link[h.locale]=T},[T]),I.useEffect(()=>{i?.(_)},[_,i]);const k=I.useMemo(()=>t.find(O=>w?n.find(te=>te.name===w).did===O.id:O.id===R),[n,t,w,R]),j=I.useMemo(()=>{if(k?.component){const N=n.find(ae=>ae.name===k.component),{link:O}=N||{},U=Yt(O)?O[h.locale]:O;if(w)return ka(U);const te=Yt(k.link)?k.link[h.locale]:k.link;return ka(Me(U,te||"/"))}return null},[n,h.locale,k,w]),M=I.useMemo(()=>{const{component:N}=k||{},O=n.find(ae=>ae.name===N),{navigation:U=[]}=O||{};return ke.flattenNavigation(U,{transform(ae,de){return de?.section&&(ae.section=ae.section||de.section),ae}}).filter(ae=>ae.link).filter(ae=>ke.isMatchSection(ae.section,r)).map(ae=>({label:ae.link,title:ae.title[s]||ae.title}))},[k,n,r,s]),H=le(()=>{h.isRoot=!0,h.locale=u,h.type=ws,h.linkDisabled=!1,h.formState=f(),y(),C(),p.current=()=>{}}),E=le((N={})=>(h.localeList.length>0&&xe.NAVIGATION_I18N_FIELDS.forEach(O=>{eg(h.formState[O]).length>1&&(N[O]=h.formState[O])}),ko(N.role)&&(N.role=void 0),N)),B=le(({parent:N}={},O=()=>{})=>{h.type="add",h.isRoot=!N,b("parent",N?.id),p.current=U=>{O(U)}}),G=le((N={},O=()=>{})=>{const{id:U,icon:te,parent:ae,component:de,role:pe=[]}=N;b("id",U),b("icon",te),N.from==="team-tmpl"&&(h.linkDisabled=!0);const Ce=d(N),Ae=(be,De)=>{hc(be)?h.formState[De]=Ce.reduce((se,ve)=>(se[ve]=be,se),{[u]:be}):Yt(be)?h.formState[De]=Qe(be):h.formState[De]={}};xe.NAVIGATION_I18N_FIELDS.forEach(be=>Ae(N[be],be)),xe.NAVIGATION_I18N_FIELDS.forEach(be=>b(be,h.formState[be][h.locale])),b("component",de),b("parent",ae),b("role",pe||[]),h.type="edit",h.isRoot=!ae,p.current=be=>{const De=_p(be,["id","title","description","icon","component","link","role"]);O(De)}}),q=le(N=>{const O=N?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>xs)return l("navigation.form.titleTooLong",{len:xs})}return!0}),J=le(N=>{const O=N?.trim();return O&&O.length>Ss?l("navigation.form.descriptionTooLong",{len:Ss}):!0}),ee=le(N=>N?.startsWith("/")?new URL(N,window.location.origin).href:N),Q=le(async N=>{const O=N?.trim();if(O){if(_o(ee(O)))return!0;try{await Po(O)}catch{return l("navigation.form.invalidIcon")}}return!0}),Z=le(N=>{const O=N?.trim();return O?Q(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}),V=le(N=>{const O=N?.trim();return O?ke.checkLink(O)?!0:l("navigation.form.invalidLink"):h.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}),re=le(N=>{h.locale=N,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][N]||(h.formState[O][N]="")}),setTimeout(()=>{C()})}),ie=le(()=>{const{title:N,link:O}=h.formState;if(r!=="bottomNavigation")for(const U of Object.keys(N)){const te=q(N[U]);if(te!==!0)return te}for(const U of Object.keys(O)){const te=V(O[U]);if(te!==!0)return te}return!0}),$=le(N=>{const O=ie();O===!0?p.current(E(N)):kt.error(O)}),W=le(N=>{h.locale=u,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O]=Et(h.formState[O],N)}),i?.(_)}),L=le(N=>{h.locale=N,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][N]=h.formState[O][u]}),i?.(_),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:B,edit:G,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v($)}),[B,H,G,v,$]),g.jsxs(oe,{...o,children:[g.jsx(hd,{sx:{mb:1},onAdd:L,onChange:re,onRemoveLocale:W,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})}),r==="bottomNavigation"?g.jsx(lt,{name:"icon",control:m,rules:{validate:Z},render:({field:N})=>g.jsx(vo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...N})}):g.jsx(lt,{name:"icon",control:m,rules:{validate:Q},render:({field:N})=>g.jsx(vo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,...N})}),h.isRoot&&g.jsx(lt,{name:"component",control:m,render:({field:N})=>g.jsx(Ki,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&N.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Et(N,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(lt,{name:"description",control:m,rules:{validate:J},render:({field:N})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...N})}),g.jsx(lt,{name:"link",control:m,rules:{validate:V},render:({field:N})=>g.jsx(gc,{fullWidth:!0,margin:"dense",children:g.jsx(Bh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:O=>O.label,options:M,renderInput:O=>g.jsx(nt,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:j?g.jsx(Rn,{position:"start",sx:{textDecoration:hx(T||"")?"line-through":""},children:j}):null}}}),renderOption:(O,U)=>g.jsxs(oe,{component:"li",...O,children:[U.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:U.title})]}),margin:"dense",...N,onChange:()=>{},onInputChange:(O,U)=>{N.onChange(U)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(lt,{name:"role",control:m,render:({field:N})=>g.jsx(Ki,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Et(N,"ref")})}),r==="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})})]})]})}na.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:l}]=Nh(),[s,c]=I.useState("add"),u=I.useRef(null),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]),p=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),h=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),g.jsx(vc,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Tn,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(na,{ref:u,section:r,components:n,rawNavigations:t})})}ia.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function bd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Ee(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const f=I.useCallback(v=>{u(v),r(o)},[r,o]),d=I.useCallback(v=>{u(v),n(o)},[n,o]),p=I.useCallback(v=>{u(v),t(o)},[t,o]),h=I.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(Ne,{size:"small",color:"success",onClick:f,disabled:c,children:g.jsx(ye,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(Ne,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:g.jsx(ye,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:g.jsx(Ne,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(ye,{icon:"mdi:eye-off-outline"}):g.jsx(ye,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(Ne,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:g.jsx(ye,{icon:"mdi:delete"})})})]})}bd.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Cn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Cx=e=>{const r={...e},n=e?.background;return typeof n=="string"?r.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(r.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),r},Ix=(e,r="en",n="en")=>{if(typeof e=="string"){if(cd(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(ud(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},rr=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Gt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:mc(o.items?.length?o.link:Ix(o.link,r,n),t),_rawLink:o.link}),"items")},Rx=e=>Gt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Tx=e=>{if(!e?.length)return null;const r=Rx(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return r.forEach(t=>{t.section?Array.isArray(t.section)?t.section.forEach(i=>{n[i]?.push(t)}):typeof t.section=="string"&&n[t.section]?.push(t):n.header.push(t)}),n},oa=e=>{if(!e)return null;const r={...e};return r.theme=Cx(r.theme),r.navigation=Tx(Dx(r.navigation)),r},Dx=(e=[])=>ea(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),yd=(e,r)=>ea(e,(n,t)=>{const i=!n.role||r&&(n.role.includes(r)||n.role.includes("guest"));return t.isLeaf?i:i&&t.filteredChildren?.length},"items"),Px={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},_x={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function kx({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),s=jt(),c=I.useRef(null),u=zt({open:!1}),f=le((p=!u.open)=>{u.open=p}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:g.jsxs(oe,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[g.jsx(Ne,{size:"medium",ref:c,children:g.jsx(ye,{icon:Px,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(kp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Op,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),f(!1)},children:g.jsx(bc,{...p,timeout:350,children:g.jsxs(Or,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Ep,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:l.map(h=>g.jsx(Np,{disablePadding:!0,children:g.jsxs(Gh,{href:Oa(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(oe,{component:"img",src:`${yc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:h.icon||_x,color:s.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Oa(h.title,r)})]})},h.id))}),g.jsx(Mp,{session:e,children:g.jsx(Tn,{variant:"outlined",fullWidth:!0,href:Ap,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const xd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),Sd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number}),Ox=["admin","owner"],Ex=e=>e.endsWith(".ip.abtnet.io"),Nx=e=>e.endsWith(".did.abtnet.io"),Mx={en:{guest:{title:"Notice: You are using a temporary domain",description:"You are accessing this site through a temporary domain. For a better experience, please contact the site administrator to configure a custom domain. Using a custom domain not only makes access more convenient but also ensures your access is more secure."},owner:{title:"Enhance Your Website Security",description:"Dear administrator, we recommend configuring your custom domain immediately, which will:",benefits1:"Automatically obtain HTTPS certificates to ensure secure data transmission",benefits2:"Create an exclusive brand image and increase website credibility",benefits3:"Get a shorter, more memorable access address",benefits4:"Provide visitors with a more professional experience",benefits5:"Domain configuration takes just minutes to complete, taking your website to the next level!"},skip:"Remind Me Later",bindDomain:"Configure Domain"},zh:{guest:{title:"温馨提示:当前使用的是临时域名",description:"您正在通过临时域名访问本站点。为了获得更好的访问体验,请联系站点管理员配置自定义域名。使用自定义域名不仅访问更便捷,还能确保您的访问更加安全。"},owner:{title:"提升网站安全性与专业度",description:"尊敬的管理员,我们建议您尽快配置自定义域名,这样可以:",benefits1:"自动获取 HTTPS 证书,确保数据传输安全",benefits2:"打造专属品牌形象,提升网站可信度",benefits3:"获得更简短、易记的访问地址",benefits4:"为访客提供更专业的访问体验",benefits5:"只需几分钟即可完成域名配置,全面提升您的网站品质!"},skip:"稍后提醒",bindDomain:"配置域名"}},Ax=1e3*60*60*24*30,Cs=".well-known/service/admin/domains";function wd({locale:e="en",session:r={}}){const n=r?.user,t=Mc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>Ax}),a=le((d,p={})=>Un(Mx,d,e,"en",p)),l=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),s=I.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=I.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=I.useCallback(()=>{const d=Me(window.location.origin,Cs);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Ox.includes(n.role);return window.location.href.includes(Cs)||t||!Ex(l)&&!Nx(l)?null:g.jsxs(Lp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(zp,{sx:{padding:"20px !important"},children:[g.jsx(me,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),g.jsx(me,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&g.jsx(oe,{component:"ul",children:s.map(d=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),g.jsxs(jp,{sx:{px:"12px !important"},children:[g.jsx(yt,{onClick:c,children:a("skip")}),f&&g.jsx(yt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}wd.propTypes={locale:x.string,session:x.object};const Ot={};function Lx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Me(r,yc,e);return new Fp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function zx(e="admin"){return Ot[e]||(Ot[e]=Lx(e)),Ot[e]}const jx=(e="admin")=>{const r=I.use(qn),{session:n}=r??{};return!Ot[e]&&n.user&&(Ot[e]=zx(e),Ot[e].connect()),Ot[e]},Fx={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g>'},Bx={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-3v4m0 3v.01"/>'},Gx={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9a9 9 0 0 0-9 9a9 9 0 0 0 9 9zM9 8l6 8m0-8l-6 8"/>'};function $x(){const e=jt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Hn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const kr=new Bp,Wx=e=>!ko(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,Hx=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},Ux=async(e,r)=>{try{return await kr.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},qx=async(e,r)=>{const{type:n,did:t}=e;return xc.isSameAddr(n,"did")?await Ux(t,r)||Dn.getLink(e):Dn.getLink(e)},Vx=async(e,r,n=!0)=>{const t=Dn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Dn.Link){if(n){const o=await qx(i,r),{type:a,chainId:l,did:s}=i;return xc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},Kx=e=>Gp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Yx={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Kt({user:e,color:r=void 0}){const{palette:n}=jt(),t=Vn(Me(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Sc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Kt.displayName="UserLink";function Jx({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=jt(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=ze(()=>{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=ze(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=le(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Kt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Kt,{user:m[0],color:c})," and ",g.jsx(Kt,{user:y,color:c})]});const b=f.length>3,C=b?f.slice(0,2):m;return g.jsxs(g.Fragment,{children:[C.map((D,_)=>g.jsxs(X.Fragment,{children:[g.jsx(Kt,{user:D,color:c}),_<C.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Kt,{user:y,color:c})]})]})}),p=le(()=>{const m=a?Yx[a]:null;return m?m(s,r.length):null}),h=ze(()=>{const m=d(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,s,f,d,p]),v=ze(()=>{if(!e)return null;const m=Hx(e);return m?.targetLink?Me(i,m.targetLink):null},[e,i]);return!a||ko(l)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Sc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const Qx={normal:Ea,success:Fx,info:Ea,warning:Bx,error:Gx},Xx=cr(Up)`
43
+ */const Bu=Object.freeze({left:0,top:0,width:16,height:16}),En=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tn=Object.freeze({...Bu,...En}),lo=Object.freeze({...tn,body:"",hidden:!1}),ly=Object.freeze({width:null,height:null}),Gu=Object.freeze({...ly,...En});function sy(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function t(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:t(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?t(o):0)}}return r}const cy=/[\s,]+/;function uy(e,r){r.split(cy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const $u={...Gu,preserveAspectRatio:""};function rs(e){const r={...$u},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=sy(n("rotate","")),uy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function dy(e,r){for(const n in $u)if(e[n]!==r[n])return!0;return!1}const Ar=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!Sn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Sn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!Sn(l,n)?null:l}return null},Sn=(e,r)=>e?!!((e.provider===""||e.provider.match(Ar))&&(r&&e.prefix===""||e.prefix.match(Ar))&&e.name.match(Ar)):!1;function fy(e,r){const n={};!e.hFlip!=!r.hFlip&&(n.hFlip=!0),!e.vFlip!=!r.vFlip&&(n.vFlip=!0);const t=((e.rotate||0)+(r.rotate||0))%4;return t&&(n.rotate=t),n}function ns(e,r){const n=fy(e,r);for(const t in lo)t in En?t in e&&!(t in n)&&(n[t]=En[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function py(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function hy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=ns(t[l]||i[l],o)}return a(r),n.forEach(a),ns(e,o)}function Wu(e,r){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{r(i,null),n.push(i)});const t=py(e);for(const i in t){const o=t[i];o&&(r(i,hy(e,i,o)),n.push(i))}return n}const gy={provider:"",aliases:{},not_found:{},...Bu};function ki(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Hu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!ki(e,gy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Ar)||typeof o.body!="string"||!ki(o,lo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Ar)||typeof a!="string"||!n[a]&&!t[a]||!ki(o,lo))return null}return r}const Nn=Object.create(null);function vy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function St(e,r){const n=Nn[e]||(Nn[e]=Object.create(null));return n[r]||(n[r]=vy(e,r))}function Yo(e,r){return Hu(r)?Wu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function my(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function by(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Nn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Nn[i]||{})).forEach(a=>{const l=St(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let $r=!1;function Uu(e){return typeof e=="boolean"&&($r=e),$r}function Wr(e){const r=typeof e=="string"?rn(e,!0,$r):e;if(r){const n=St(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function qu(e,r){const n=rn(e,!0,$r);if(!n)return!1;const t=St(n.provider,n.prefix);return my(t,n.name,r)}function is(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),$r&&!r&&!e.prefix){let i=!1;return Hu(e)&&(e.prefix="",Wu(e,(o,a)=>{a&&qu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Sn({provider:r,prefix:n,name:"a"}))return!1;const t=St(r,n);return!!Yo(t,e)}function yy(e){return!!Wr(e)}function xy(e){const r=Wr(e);return r?{...tn,...r}:null}function Sy(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=St(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Vu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function wy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Vu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Cy=0;function Iy(e,r,n){const t=Cy++,i=Vu.bind(null,n,t);if(!r.pending.length)return i;const o={id:t,icons:r,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}const so=Object.create(null);function os(e,r){so[e]=r}function co(e){return so[e]||so[""]}function Ry(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?rn(i,r,n):i;o&&t.push(o)}),t}var Ty={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Dy(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let w=e.resources.slice(0);for(a=[];w.length>1;){const P=Math.floor(Math.random()*w.length);a.push(w[P]),w=w.slice(0,P).concat(w.slice(P+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function v(){s==="pending"&&(s="aborted"),h(),d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function m(w,P){P&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){s="failed",p.forEach(w=>{w(void 0,u)})}function C(){d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function D(w,P,S){const T=P!=="success";switch(d=d.filter(R=>R!==w),s){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(P==="abort"){u=S,b();return}if(T){u=S,d.length||(a.length?_():b());return}if(h(),C(),!e.random){const R=e.resources.indexOf(w.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",p.forEach(R=>{R(S)})}function _(){if(s!=="pending")return;h();const w=a.shift();if(w===void 0){if(d.length){f=setTimeout(()=>{h(),s==="pending"&&(C(),b())},e.timeout);return}b();return}const P={status:"pending",resource:w,callback:(S,T)=>{D(P,S,T)}};d.push(P),c++,f=setTimeout(_,e.rotate),n(w,r,P.callback)}return setTimeout(_),y}function Ku(e){const r={...Ty,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=Dy(r,l,s,(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 Jo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Zn=Object.create(null),xr=["https://api.simplesvg.com","https://api.unisvg.com"],wn=[];for(;xr.length>0;)xr.length===1||Math.random()>.5?wn.push(xr.shift()):wn.push(xr.pop());Zn[""]=Jo({resources:["https://api.iconify.design"].concat(wn)});function as(e,r){const n=Jo(r);return n===null?!1:(Zn[e]=n,!0)}function ei(e){return Zn[e]}function Py(){return Object.keys(Zn)}function ls(){}const Oi=Object.create(null);function _y(e){if(!Oi[e]){const r=ei(e);if(!r)return;const n=Ku(r),t={config:r,redundancy:n};Oi[e]=t}return Oi[e]}function Yu(e,r,n){let t,i;if(typeof e=="string"){const o=co(e);if(!o)return n(void 0,424),ls;i=o.send;const a=_y(e);a&&(t=a.redundancy)}else{const o=Jo(e);if(o){t=Ku(o);const a=e.resources?e.resources[0]:"",l=co(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),ls):t.query(r,i,n)().abort}const ss="iconify2",Hr="iconify",Ju=Hr+"-count",cs=Hr+"-version",Qu=36e5,ky=168;function uo(e,r){try{return e.getItem(r)}catch{}}function Qo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function us(e,r){try{e.removeItem(r)}catch{}}function fo(e,r){return Qo(e,Ju,r.toString())}function po(e){return parseInt(uo(e,Ju))||0}const At={local:!0,session:!0},Xu={local:new Set,session:new Set};let Xo=!1;function Oy(e){Xo=e}let dn=typeof window>"u"?{}:window;function Zu(e){const r=e+"Storage";try{if(dn&&dn[r]&&typeof dn[r].length=="number")return dn[r]}catch{}At[e]=!1}function ed(e,r){const n=Zu(e);if(!n)return;const t=uo(n,cs);if(t!==ss){if(t){const l=po(n);for(let s=0;s<l;s++)us(n,Hr+s.toString())}Qo(n,cs,ss),fo(n,0);return}const i=Math.floor(Date.now()/Qu)-ky,o=l=>{const s=Hr+l.toString(),c=uo(n,s);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,l))return!0}catch{}us(n,s)}};let a=po(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,fo(n,a)):Xu[e].add(l))}function td(){if(!Xo){Oy(!0);for(const e in At)ed(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=St(t,i);if(!Yo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Ey(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in At)ed(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function Ny(e,r){Xo||td();function n(t){let i;if(!At[t]||!(i=Zu(t)))return;const o=Xu[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=po(i),!fo(i,a+1))return;const l={cached:Math.floor(Date.now()/Qu),provider:e.provider,data:r};return Qo(i,Hr+a.toString(),JSON.stringify(l))}r.lastModified&&!Ey(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function ds(){}function My(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,wy(e)}))}function Ay(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=co(n)))return;o.prepare(n,t,i).forEach(l=>{Yu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Yo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),Ny(e,s)}catch(c){console.error(c)}My(e)})})}))}const Zo=(e,r)=>{const n=Ry(e,!0,Uu()),t=Sy(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,ds)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(St(c,u));const 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=St(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&Ay(s,i[c][u])}),r?Iy(r,t,o):ds},Ly=e=>new Promise((r,n)=>{const t=typeof e=="string"?rn(e,!0):e;if(!t){n(e);return}Zo([t||e],i=>{if(i.length&&t){const o=Wr(t);if(o){r({...tn,...o});return}}n(e)})});function zy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function jy(e,r){const n=typeof e=="string"?rn(e,!0,!0):null;if(!n){const o=zy(e);return{value:e,data:o}}const t=Wr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=Zo([n],()=>r(e,n,Wr(n)));return{value:e,name:n,loading:i}}function Ei(e){return e.hasAttribute("inline")}let rd=!1;try{rd=navigator.vendor.indexOf("Apple")===0}catch{}function Fy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(rd||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const By=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Gy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ho(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const t=e.split(By);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Gy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const $y=e=>e==="unset"||e==="undefined"||e==="none";function nd(e,r){const n={...tn,...e},t={...Gu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=ho(f,s/c)):(u=a==="auto"?s:a,f=l===null?ho(u,c/s):l==="auto"?c:l);const d={},p=(h,v)=>{$y(v)||(d[h]=v.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const Wy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Mn=Wy();function Hy(e){Mn=e}function Uy(){return Mn}function qy(e,r){const n=ei(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function Vy(e){return e===404}const Ky=(e,r,n)=>{const t=[],i=qy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function Yy(e){if(typeof e=="string"){const r=ei(e);if(r)return r.path}return"/"}const Jy=(e,r,n)=>{if(!Mn){n("abort",424);return}let t=Yy(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Mn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Vy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Qy={prepare:Ky,send:Jy};function fs(e,r){switch(e){case"local":case"session":At[e]=r;break;case"all":for(const n in At)At[n]=r;break}}const Ni="data-style";let id="";function Xy(e){id=e}function ps(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ni));n||(n=document.createElement("style"),n.setAttribute(Ni,Ni),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+id}function od(){os("",Qy),Uu(!0);let e;try{e=window}catch{}if(e){if(td(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!is(i))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const t in n){const i="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;as(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>fs(n,!0),disableCache:n=>fs(n,!1),iconExists:yy,getIcon:xy,listIcons:by,addIcon:qu,addCollection:is,calculateSize:ho,buildIcon:nd,loadIcons:Zo,loadIcon:Ly,addAPIProvider:as,appendCustomStyle:Xy,_api:{getAPIConfig:ei,setAPIModule:os,sendAPIQuery:Yu,setFetch:Hy,getFetch:Uy,listAPIProviders:Py}}}function ad(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Zy(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ex(e){return"data:image/svg+xml,"+Zy(e)}function tx(e){return'url("'+ex(e)+'")'}const go={"background-color":"currentColor"},ld={"background-color":"transparent"},hs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},gs={"-webkit-mask":go,mask:go,background:ld};for(const e in gs){const r=gs[e];for(const n in hs)r[e+"-"+n]=hs[n]}function vs(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function rx(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=ad(i,{...o,width:r.width+"",height:r.height+""}),l=tx(a),s=t.style,c={"--svg":l,width:vs(o.width),height:vs(o.height),...n?go:ld};for(const u in c)s.setProperty(u,c[u]);return t}let Lr;function nx(){try{Lr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Lr=null}}function ix(e){return Lr===void 0&&nx(),Lr?Lr.createHTML(e):e}function ox(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=ad(e.body,n);return r.innerHTML=ix(i),r.firstChild}function ms(e,r){const n=r.icon.data,t=r.customisations,i=nd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=ox(i);break;default:a=rx(i,{...tn,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function bs(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function ax(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Ei(this);ps(l,s),this._state=bs({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Ei(this),c=this._state;s!==c.inline&&(c.inline=s,ps(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Ei(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}ms(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=rs(this);(l.attrMode!==c||dy(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=jy(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});s.data?this._gotIconData(s):this._state=bs(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,rs(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=Fy(l.data.body,c),f=this._state.inline;ms(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=od();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const lx=ax()||od(),{enableCache:xT,disableCache:ST,iconExists:wT,getIcon:CT,listIcons:IT,addIcon:RT,addCollection:TT,calculateSize:DT,buildIcon:PT,loadIcons:_T,loadIcon:kT,addAPIProvider:OT,_api:ET}=lx,Gt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Gt(t[n],r,n)}):r(t)),sd=(e,r="children")=>{const n=[];return Gt(e,t=>n.push(t),r),n},ea=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ea(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),cd=e=>/^https?:\/\//.test(e),ud=e=>/^mailto:/i.test(e.trim()),sx=e=>{if(!e||!e?.startsWith("/"))return!1;const r=i=>i.endsWith("/")?i:`${i}/`,n=r(window.location.pathname),t=r(new URL(e,window.location.origin).pathname);return n.startsWith(t)},dd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>sx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},cx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,p=h=>f>s-d&&u<n-1&&f+h>s+d;return e.forEach(h=>{const v=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&p(v)&&(u++,f=0,c[u]=[]),c[u].push({...h,group:!0}),f+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function Xe({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(Do(async()=>{s(!0);try{await Po(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),cd(e))return g.jsx(er,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?g.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(er,{component:"span",...t,sx:i,children:g.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(er,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function ta(e=["en","zh"]){const{blocklet:r}=Ft();return I.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>ft.SUPPORTED_LANGUAGES[c]),l=a.reduce((c,u)=>(c[u]=ft.SUPPORTED_LANGUAGES[u].nativeName,c),{}),s=a.map(c=>({code:c,name:ft.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:l,defaultLocale:o,languages:s}},[r.environments,e])}const ux=e=>e.from!=="team-tmpl";function dx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Cp(e.slice(0,t-1),r.slice(0,i-1)))}function fd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=Ft(),{defaultLocale:t}=ta(),i=n.environments.find(l=>l.key===ft.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=le(l=>{if(l?.startsWith("/"))try{return new URL(l,i?.value).href}catch{console.error("Failed to parse url",{url:l,origin:i?.value})}return l});function a(){const{title:l,subtitle:s}=e;let c=l,u=s;return Yt(l)&&(c=l[r]||l[t]||l.en),!I.isValidElement(s)&&Yt(s)&&(u=s[r]||s[t]||s.en),g.jsxs(oe,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:c}),s&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(_o(o(e.icon))?g.jsx(Xe,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}fd.propTypes={treeNode:x.object.isRequired};const fx=it(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function pd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(fx,{children:g.jsx(Ih,{backend:Rh,...i,children:g.jsx(tm,{generateNodeProps:o=>{const a=ux(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(ye,{icon:"ic:round-drag-indicator"}):g.jsx(oe,{sx:{width:16,height:16}}),title:g.jsx(fd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:dx,theme:ay})})})}pd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var px=sc();const hx=$n(px);function hd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:l=()=>{}}){const{t:s}=Ee(),c=I.useRef(),[u,f]=I.useState(null),d=zt({localeList:[],inputLocale:"",localeError:""}),p=I.useMemo(()=>!!u,[u]),h=I.useMemo(()=>o.includes(i)?i:t,[o,i]),v=I.useMemo(()=>d.localeList.filter(S=>!!a[S]),[d.localeList,a]),m=I.useMemo(()=>Object.keys(Et(a,[...d.localeList,t])).map(S=>({title:a[S],value:S})),[d.localeList]),y=I.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=le(S=>S?S===t||d.localeList.includes(S)?s("navigation.form.localeExists",{value:S}):!0:s("common.requiredErrorText",{name:"Locale"})),C=le((S="")=>{const T=S?.trim(),R=b(T);return R!==!0?d.localeError=R:d.localeError="",R}),D=le(()=>{f(null),d.inputLocale="",d.localeError=""}),_=le(()=>{const S=d.inputLocale?.trim();C(S)===!0&&(D(),d.localeList.push(S),r(S))}),w=le((S,T)=>{S.preventDefault(),S.stopPropagation(),d.localeList=Ac(d.localeList,T),l(T)}),P=le(S=>{const{value:T}=S.target;C(T),d.inputLocale=T});return I.useEffect(()=>{d.localeList=[...o]},[o,d]),yh("enter",()=>{setTimeout(()=>{_()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(zh,{sx:e,value:h,onChange:(S,T)=>{n(T)},children:[g.jsx($a,{label:y,value:t}),v.map(S=>g.jsx($a,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(Ne,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{w(T,S)},children:g.jsx(ye,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(Ne,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{f(S.currentTarget)},children:g.jsx(ye,{icon:"mdi:plus"})})]}),g.jsx(Ui,{open:p,anchorEl:u,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(oe,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:s("navigation.form.localePlaceholder")}),g.jsx(oe,{sx:{mt:1},children:g.jsx(Ki,{required:!0,fullWidth:!0,label:"Locale",value:d.inputLocale,options:m,onChange:P,error:!!d.localeError,helperText:d.localeError||" "})}),g.jsx(oe,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(yt,{size:"small",variant:"contained",onClick:_,children:s("common.confirm")})})]})})]})}hd.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const ra=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function gd(e,r,n=5e3){for(const t of ra){const i=Me(t,e);try{return await Fh.get(i,{params:r,timeout:n})}catch(o){console.warn(`Failed to fetch from ${i}:`,o)}}throw new Error(`All icon API endpoints ${e} failed`)}async function gx({keyword:e,limit:r=999,start:n=0,palette:t=!1}){let i="",o=e;e.includes(":")&&([i,o]=e.split(":"));const{data:a}=await gd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const fn=new Map;async function vx(e){if(fn.has(e))return fn.get(e);const r=(async()=>{const{data:n}=await gd("/collection",{prefix:e}),t=new Set;return n.uncategorized?.forEach(i=>t.add(`${e}:${i}`)),Object.values(n.categories??{}).forEach(i=>{i.forEach(o=>t.add(`${e}:${o}`))}),Array.from(t)})();fn.set(e,r);try{return await r}catch(n){throw fn.delete(e),n}}function mx(e){return Me(ra[0],`${e}.svg`)}function bx(e){try{const r=new URL(e);for(const n of ra)if(r.origin===n)return Ip(r.pathname).replace(".svg","");return""}catch{return""}}function yx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):_o(e)&&(n=bx(e))),{isIconId:r,iconId:n}}const xx=I.lazy(()=>Pp(()=>import("./index-n3w6kNQZ.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),ys=qe(Xe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function vd({icon:e,...r}){const[n,t]=I.useState(!1);return Do(async()=>{t(!1),await Po(e),t(!0)},[e]),e?n?g.jsx(ye,{icon:e,...r}):g.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}vd.propTypes={icon:x.string.isRequired};function vo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=dc(),{blocklet:u}=Ft(),f=Hn(Z=>Z.breakpoints.down("md")),d=u.environments.find(Z=>Z.key===ft.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Ee(),{isIconId:C,iconId:D}=yx(e),[_,w]=I.useState(null),{onChange:P,onBlur:S,sx:T,...R}=a,k=i.includes("upload"),j=i.includes("select"),M=Me(s,"/api/media/upload",u.appPid),H=zt({showPopover:!1}),E=le(Z=>{if(Z?.startsWith("/"))try{const V=c?window.location.origin:d?.value;return new URL(Z,V).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[d?.value,c]),B=le(async Z=>await h.current.getUploader().uploadFile(Z)),G=le(()=>{w(null)}),q=le(()=>{j&&w(m.current)}),J=le(async Z=>{try{if(o==="url"){const V=mx(Z),re=await Rp(V,{width:128,height:128}),ie=await Tp(re,Z);await B(ie)}else P?.(Z)}catch(V){console.error("Failed to pick icon:",V)}G()}),ee=le(Z=>{Z.stopPropagation(),v.current.open(),G()}),Q=le(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(nt,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:j?q:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Rn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(ys,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Rn,{position:"end",children:[g.jsx(Ne,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),P("")},children:g.jsx(Nc,{style:{fontSize:18}})}),k&&g.jsx(Dp,{title:y("common.upload"),children:g.jsx(Ne,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(vd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&g.jsx(oe,{component:jh,sx:{mr:"-6px",fontSize:24,transform:_?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&g.jsx(Ui,{open:!!_,anchorEl:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:G,children:g.jsx(md,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(mo,{ref:h,locale:b,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:Q}),g.jsx(mo,{ref:v,locale:b,apiPath:M,headers:p,onUploadFinish:Q}),g.jsx(Ui,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(ys,{size:120,icon:E(e),alt:"Error"})})]})}vo.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function md({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[p,h]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Ee(),D=96,_=le(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,T=(S-1)*D,R=S*D,k=m.current.slice(T,R);s(j=>[...j,...k]),y.current=S,b.current=R<m.current.length,u(!1)},300))}),w=le(S=>{m.current=S,y.current=1,b.current=S.length>D;const T=S.slice(0,D);s(T),h(S.length===0),b.current&&_()}),{run:P}=fc(async S=>{if(S){u(!0);try{const{icons:T}=await gx({keyword:S});w(T)}catch(T){console.error("Failed to search icons:",T),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:k,clientHeight:j}=v.current;(R+j>=k-150||k<=j)&&_()},T=v.current;return T&&(T.addEventListener("scroll",S),S()),()=>{T&&T.removeEventListener("scroll",S)}},[_,c]),Do(async()=>{if(f)P(f);else{u(!0);try{const S=await vx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[f,P,w]),g.jsxs(Sx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(nt,{label:C("navigation.form.searchIcons"),placeholder:C("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:S=>d(S.target.value),slotProps:{input:{endAdornment:g.jsx(Ne,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx(Nc,{style:{fontSize:18}})})}}}),g.jsx(yt,{onClick:o,children:C("common.cancel")})]}),g.jsxs(oe,{children:[l.length>0&&g.jsx(oe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(S=>g.jsx(wx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(ye,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(oe,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(pc,{size:20})})]})]})}md.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Sx=qe(oe)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),wx=qe(Ne,{shouldForwardProp:e=>e!=="$active"})(({$active:e,theme:r})=>({boxSizing:"content-box",backgroundColor:e?r.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:r.palette.action.hover}}));function mo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return g.jsx(I.Suspense,{children:g.jsx(xx,{locale:r,ref:e,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:i,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:t}})})}mo.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const xs=24,Ss=48,ws="add";x.string.isRequired;function na({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ec(),{t:l,locale:s}=Ee(),{localeMap:c,defaultLocale:u}=ta(),f=le(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),d=le(N=>Ac(Array.from(new Set(xe.NAVIGATION_I18N_FIELDS.flatMap(O=>Yt(N[O])?Object.keys(N[O]):[]))),u)),p=I.useRef(()=>{}),h=zt({isRoot:!0,type:ws,linkDisabled:!1,locale:u,formState:f(),get localeList(){return d(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=Ah({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{xe.NAVIGATION_I18N_FIELDS.forEach(N=>b(N,h.formState[N][h.locale]))},[b,h.locale]);const _=Lh({control:m}),w=_.component,P=_.title,S=_.description,T=_.link,R=_.parent;I.useEffect(()=>{h.formState.title[h.locale]=P},[P]),I.useEffect(()=>{h.formState.description[h.locale]=S},[S]),I.useEffect(()=>{h.formState.link[h.locale]=T},[T]),I.useEffect(()=>{i?.(_)},[_,i]);const k=I.useMemo(()=>t.find(O=>w?n.find(te=>te.name===w).did===O.id:O.id===R),[n,t,w,R]),j=I.useMemo(()=>{if(k?.component){const N=n.find(ae=>ae.name===k.component),{link:O}=N||{},U=Yt(O)?O[h.locale]:O;if(w)return ka(U);const te=Yt(k.link)?k.link[h.locale]:k.link;return ka(Me(U,te||"/"))}return null},[n,h.locale,k,w]),M=I.useMemo(()=>{const{component:N}=k||{},O=n.find(ae=>ae.name===N),{navigation:U=[]}=O||{};return ke.flattenNavigation(U,{transform(ae,de){return de?.section&&(ae.section=ae.section||de.section),ae}}).filter(ae=>ae.link).filter(ae=>ke.isMatchSection(ae.section,r)).map(ae=>({label:ae.link,title:ae.title[s]||ae.title}))},[k,n,r,s]),H=le(()=>{h.isRoot=!0,h.locale=u,h.type=ws,h.linkDisabled=!1,h.formState=f(),y(),C(),p.current=()=>{}}),E=le((N={})=>(h.localeList.length>0&&xe.NAVIGATION_I18N_FIELDS.forEach(O=>{eg(h.formState[O]).length>1&&(N[O]=h.formState[O])}),ko(N.role)&&(N.role=void 0),N)),B=le(({parent:N}={},O=()=>{})=>{h.type="add",h.isRoot=!N,b("parent",N?.id),p.current=U=>{O(U)}}),G=le((N={},O=()=>{})=>{const{id:U,icon:te,parent:ae,component:de,role:pe=[]}=N;b("id",U),b("icon",te),N.from==="team-tmpl"&&(h.linkDisabled=!0);const Ce=d(N),Ae=(be,De)=>{hc(be)?h.formState[De]=Ce.reduce((se,ve)=>(se[ve]=be,se),{[u]:be}):Yt(be)?h.formState[De]=Qe(be):h.formState[De]={}};xe.NAVIGATION_I18N_FIELDS.forEach(be=>Ae(N[be],be)),xe.NAVIGATION_I18N_FIELDS.forEach(be=>b(be,h.formState[be][h.locale])),b("component",de),b("parent",ae),b("role",pe||[]),h.type="edit",h.isRoot=!ae,p.current=be=>{const De=_p(be,["id","title","description","icon","component","link","role"]);O(De)}}),q=le(N=>{const O=N?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>xs)return l("navigation.form.titleTooLong",{len:xs})}return!0}),J=le(N=>{const O=N?.trim();return O&&O.length>Ss?l("navigation.form.descriptionTooLong",{len:Ss}):!0}),ee=le(N=>N?.startsWith("/")?new URL(N,window.location.origin).href:N),Q=le(async N=>{const O=N?.trim();if(O){if(_o(ee(O)))return!0;try{await Po(O)}catch{return l("navigation.form.invalidIcon")}}return!0}),Z=le(N=>{const O=N?.trim();return O?Q(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}),V=le(N=>{const O=N?.trim();return O?ke.checkLink(O)?!0:l("navigation.form.invalidLink"):h.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}),re=le(N=>{h.locale=N,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][N]||(h.formState[O][N]="")}),setTimeout(()=>{C()})}),ie=le(()=>{const{title:N,link:O}=h.formState;if(r!=="bottomNavigation")for(const U of Object.keys(N)){const te=q(N[U]);if(te!==!0)return te}for(const U of Object.keys(O)){const te=V(O[U]);if(te!==!0)return te}return!0}),$=le(N=>{const O=ie();O===!0?p.current(E(N)):kt.error(O)}),W=le(N=>{h.locale=u,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O]=Et(h.formState[O],N)}),i?.(_)}),L=le(N=>{h.locale=N,xe.NAVIGATION_I18N_FIELDS.forEach(O=>{h.formState[O][N]=h.formState[O][u]}),i?.(_),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:B,edit:G,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v($)}),[B,H,G,v,$]),g.jsxs(oe,{...o,children:[g.jsx(hd,{sx:{mb:1},onAdd:L,onChange:re,onRemoveLocale:W,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})}),r==="bottomNavigation"?g.jsx(lt,{name:"icon",control:m,rules:{validate:Z},render:({field:N})=>g.jsx(vo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...N})}):g.jsx(lt,{name:"icon",control:m,rules:{validate:Q},render:({field:N})=>g.jsx(vo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==u,...N})}),h.isRoot&&g.jsx(lt,{name:"component",control:m,render:({field:N})=>g.jsx(Ki,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&N.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Et(N,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(lt,{name:"description",control:m,rules:{validate:J},render:({field:N})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...N})}),g.jsx(lt,{name:"link",control:m,rules:{validate:V},render:({field:N})=>g.jsx(gc,{fullWidth:!0,margin:"dense",children:g.jsx(Bh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:O=>O.label,options:M,renderInput:O=>g.jsx(nt,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:j?g.jsx(Rn,{position:"start",sx:{textDecoration:hx(T||"")?"line-through":""},children:j}):null}}}),renderOption:(O,U)=>g.jsxs(oe,{component:"li",...O,children:[U.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:U.title})]}),margin:"dense",...N,onChange:()=>{},onInputChange:(O,U)=>{N.onChange(U)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(lt,{name:"role",control:m,render:({field:N})=>g.jsx(Ki,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Et(N,"ref")})}),r==="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})})]})]})}na.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:l}]=Nh(),[s,c]=I.useState("add"),u=I.useRef(null),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]),p=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),h=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),g.jsx(vc,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Tn,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(na,{ref:u,section:r,components:n,rawNavigations:t})})}ia.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function bd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Ee(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const f=I.useCallback(v=>{u(v),r(o)},[r,o]),d=I.useCallback(v=>{u(v),n(o)},[n,o]),p=I.useCallback(v=>{u(v),t(o)},[t,o]),h=I.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(Ne,{size:"small",color:"success",onClick:f,disabled:c,children:g.jsx(ye,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(Ne,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:g.jsx(ye,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:g.jsx(Ne,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(ye,{icon:"mdi:eye-off-outline"}):g.jsx(ye,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(Ne,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:g.jsx(ye,{icon:"mdi:delete"})})})]})}bd.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Cn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Cx=e=>{const r={...e},n=e?.background;return typeof n=="string"?r.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(r.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),r},Ix=(e,r="en",n="en")=>{if(typeof e=="string"){if(cd(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(ud(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},rr=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Gt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:mc(o.items?.length?o.link:Ix(o.link,r,n),t),_rawLink:o.link}),"items")},Rx=e=>Gt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Tx=e=>{if(!e?.length)return null;const r=Rx(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return r.forEach(t=>{t.section?Array.isArray(t.section)?t.section.forEach(i=>{n[i]?.push(t)}):typeof t.section=="string"&&n[t.section]?.push(t):n.header.push(t)}),n},oa=e=>{if(!e)return null;const r={...e};return r.theme=Cx(r.theme),r.navigation=Tx(Dx(r.navigation)),r},Dx=(e=[])=>ea(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),yd=(e,r)=>ea(e,(n,t)=>{const i=!n.role||r&&(n.role.includes(r)||n.role.includes("guest"));return t.isLeaf?i:i&&t.filteredChildren?.length},"items"),Px={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},_x={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function kx({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),s=jt(),c=I.useRef(null),u=zt({open:!1}),f=le((p=!u.open)=>{u.open=p}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:g.jsxs(oe,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[g.jsx(Ne,{size:"medium",ref:c,children:g.jsx(ye,{icon:Px,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(kp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Op,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),f(!1)},children:g.jsx(bc,{...p,timeout:350,children:g.jsxs(Or,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Ep,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:l.map(h=>g.jsx(Np,{disablePadding:!0,children:g.jsxs(Gh,{href:Oa(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(oe,{component:"img",src:`${yc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:h.icon||_x,color:s.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Oa(h.title,r)})]})},h.id))}),g.jsx(Mp,{session:e,children:g.jsx(Tn,{variant:"outlined",fullWidth:!0,href:Ap,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const xd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),Sd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number}),Ox=["admin","owner"],Ex=e=>e.endsWith(".ip.abtnet.io"),Nx=e=>e.endsWith(".did.abtnet.io"),Mx={en:{guest:{title:"Notice: You are using a temporary domain",description:"You are accessing this site through a temporary domain. For a better experience, please contact the site administrator to configure a custom domain. Using a custom domain not only makes access more convenient but also ensures your access is more secure."},owner:{title:"Enhance Your Website Security",description:"Dear administrator, we recommend configuring your custom domain immediately, which will:",benefits1:"Automatically obtain HTTPS certificates to ensure secure data transmission",benefits2:"Create an exclusive brand image and increase website credibility",benefits3:"Get a shorter, more memorable access address",benefits4:"Provide visitors with a more professional experience",benefits5:"Domain configuration takes just minutes to complete, taking your website to the next level!"},skip:"Remind Me Later",bindDomain:"Configure Domain"},zh:{guest:{title:"温馨提示:当前使用的是临时域名",description:"您正在通过临时域名访问本站点。为了获得更好的访问体验,请联系站点管理员配置自定义域名。使用自定义域名不仅访问更便捷,还能确保您的访问更加安全。"},owner:{title:"提升网站安全性与专业度",description:"尊敬的管理员,我们建议您尽快配置自定义域名,这样可以:",benefits1:"自动获取 HTTPS 证书,确保数据传输安全",benefits2:"打造专属品牌形象,提升网站可信度",benefits3:"获得更简短、易记的访问地址",benefits4:"为访客提供更专业的访问体验",benefits5:"只需几分钟即可完成域名配置,全面提升您的网站品质!"},skip:"稍后提醒",bindDomain:"配置域名"}},Ax=1e3*60*60*24*30,Cs=".well-known/service/admin/domains";function wd({locale:e="en",session:r={}}){const n=r?.user,t=Mc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>Ax}),a=le((d,p={})=>Un(Mx,d,e,"en",p)),l=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),s=I.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=I.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=I.useCallback(()=>{const d=Me(window.location.origin,Cs);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Ox.includes(n.role);return window.location.href.includes(Cs)||t||!Ex(l)&&!Nx(l)?null:g.jsxs(Lp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(zp,{sx:{padding:"20px !important"},children:[g.jsx(me,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),g.jsx(me,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&g.jsx(oe,{component:"ul",children:s.map(d=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),g.jsxs(jp,{sx:{px:"12px !important"},children:[g.jsx(yt,{onClick:c,children:a("skip")}),f&&g.jsx(yt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}wd.propTypes={locale:x.string,session:x.object};const Ot={};function Lx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Me(r,yc,e);return new Fp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function zx(e="admin"){return Ot[e]||(Ot[e]=Lx(e)),Ot[e]}const jx=(e="admin")=>{const r=I.use(qn),{session:n}=r??{};return!Ot[e]&&n.user&&(Ot[e]=zx(e),Ot[e].connect()),Ot[e]},Fx={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g>'},Bx={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-3v4m0 3v.01"/>'},Gx={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9a9 9 0 0 0-9 9a9 9 0 0 0 9 9zM9 8l6 8m0-8l-6 8"/>'};function $x(){const e=jt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Hn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const kr=new Bp,Wx=e=>!ko(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,Hx=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},Ux=async(e,r)=>{try{return await kr.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},qx=async(e,r)=>{const{type:n,did:t}=e;return xc.isSameAddr(n,"did")?await Ux(t,r)||Dn.getLink(e):Dn.getLink(e)},Vx=async(e,r,n=!0)=>{const t=Dn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Dn.Link){if(n){const o=await qx(i,r),{type:a,chainId:l,did:s}=i;return xc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},Kx=e=>Gp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Yx={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Kt({user:e,color:r=void 0}){const{palette:n}=jt(),t=Vn(Me(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Sc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Kt.displayName="UserLink";function Jx({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=jt(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=ze(()=>{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=ze(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=le(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Kt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Kt,{user:m[0],color:c})," and ",g.jsx(Kt,{user:y,color:c})]});const b=f.length>3,C=b?f.slice(0,2):m;return g.jsxs(g.Fragment,{children:[C.map((D,_)=>g.jsxs(X.Fragment,{children:[g.jsx(Kt,{user:D,color:c}),_<C.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Kt,{user:y,color:c})]})]})}),p=le(()=>{const m=a?Yx[a]:null;return m?m(s,r.length):null}),h=ze(()=>{const m=d(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,s,f,d,p]),v=ze(()=>{if(!e)return null;const m=Hx(e);return m?.targetLink?Me(i,m.targetLink):null},[e,i]);return!a||ko(l)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Sc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const Qx={normal:Ea,success:Fx,info:Ea,warning:Bx,error:Gx},Xx=cr(Up)`
44
44
  font-size: 20px;
45
45
  `,Zx=cr.div`
46
46
  display: flex;
@@ -1,4 +1,4 @@
1
- import{aF as c6,j as r,r as t,bn as U1,aQ as l6,M as $,H as R,a1 as u6,b as O1,_ as H1,f8 as e1,f as b1,E as p6,cu as k1,b9 as t1,iR as R1,V,cv as V1,hZ as M1,iS as C6,y as x,fe as d6,gf as h6,a3 as T1,bC as G,dp as j1,K as S,L as J,iT as N1,aV as m6,dG as f6,aO as k,br as g6,z as N,ay as J1,gL as E6,f6 as A6,F as x6,dC as D6,T as b,$ as y6,D as w6,t as S6,v as l1,C as I6,iU as u1,w as B6,hn as F6,dI as L6,h$ as v6,a4 as U6,X as n1,o as B,i as p1,x as O6,aw as H6,ak as b6}from"./index-BXhWMfbn.js";import{v as C1}from"./index-Di7TwMAz.js";import{f as k6}from"./index-BojVbZw0.js";import{b as R6,c as V6,d as M6}from"./spaces-C-llvyn7.js";import{u as a1}from"./blocklet-BMb-DKa8.js";import{D as T6}from"./DeleteOutline-CvnvGjYc.js";import{O as Z1}from"./OpenInNew-B2F4Jqwb.js";import{x as j6}from"./index-DRYJ0xIl.js";import{H as N6}from"./HelpOutline-dwnyWw6W.js";import"./api-W7sKIR80.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 X6({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 z6({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{aF as c6,j as r,r as t,bn as U1,aQ as l6,M as $,H as R,a1 as u6,b as O1,_ as H1,f8 as e1,f as b1,E as p6,cu as k1,b9 as t1,iK as R1,V,cv as V1,hR as M1,iL as C6,y as x,fe as d6,g7 as h6,a3 as T1,bC as G,dp as j1,K as S,L as J,iM as N1,aV as m6,dG as f6,aO as k,br as g6,z as N,ay as J1,gD as E6,f6 as A6,F as x6,dC as D6,T as b,$ as y6,D as w6,t as S6,v as l1,C as I6,iN as u1,w as B6,hf as F6,dI as L6,hT as v6,a4 as U6,X as n1,o as B,i as p1,x as O6,aw as H6,ak as b6}from"./index-bAMoW4-i.js";import{v as C1}from"./index-DjMy6uEe.js";import{f as k6}from"./index-BojVbZw0.js";import{b as R6,c as V6,d as M6}from"./spaces-D4RSuUOJ.js";import{u as a1}from"./blocklet-DaethJMv.js";import{D as T6}from"./DeleteOutline-CFtnGb6c.js";import{O as Z1}from"./OpenInNew-DvFUoslf.js";import{x as j6}from"./index-DRYJ0xIl.js";import{H as N6}from"./HelpOutline-DtFGcBqm.js";import"./api-BIwSxGZN.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 X6({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 z6({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-Bz-PgJMC.js";import"./index-BXhWMfbn.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
1
+ import{m as et}from"./index-aW-DNBM8.js";import"./index-bAMoW4-i.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1 +1 @@
1
- import{V as h,j as e,ac as j,K as o,U as g,T as _,t as b,o as n}from"./index-BXhWMfbn.js";import{C as R}from"./click-to-copy-BlUoHpyD.js";function T({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=h(),i={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(g,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(R,{"data-cy":"click-copy",children:t})]}),e.jsx(_,{component:"div",children:e.jsx(b,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(j,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,params:i.params,onConfirm:i.onConfirm,onCancel:i.onCancel})}T.propTypes={title:n.any.isRequired,keyName:n.any.isRequired,description:n.any.isRequired,confirmPlaceholder:n.any.isRequired,cancel:n.string,confirm:n.string,params:n.object,onCancel:n.func,onConfirm:n.func.isRequired};export{T as D};
1
+ import{V as h,j as e,ac as j,K as o,U as g,T as _,t as b,o as n}from"./index-bAMoW4-i.js";import{C as R}from"./click-to-copy-C2pxXVdR.js";function T({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=h(),i={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(g,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(R,{"data-cy":"click-copy",children:t})]}),e.jsx(_,{component:"div",children:e.jsx(b,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(j,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,params:i.params,onConfirm:i.onConfirm,onCancel:i.onCancel})}T.propTypes={title:n.any.isRequired,keyName:n.any.isRequired,description:n.any.isRequired,confirmPlaceholder:n.any.isRequired,cancel:n.string,confirm:n.string,params:n.object,onCancel:n.func,onConfirm:n.func.isRequired};export{T as D};
@@ -1 +1 @@
1
- import{eJ as r}from"./index-BXhWMfbn.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};
1
+ import{eJ as r}from"./index-bAMoW4-i.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};