@abtnode/webapp 1.17.8-beta-20260116-080047-9fdd00d3 → 1.17.8-beta-20260119-102944-6ba93a16

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 (208) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-CHVRCEwB.js → AdapterDayjs-QPUTgQRV.js} +6 -6
  4. package/dist/assets/{Add-IxR__ozX.js → Add-vvp5juzF.js} +1 -1
  5. package/dist/assets/ArrowDropDown-CZ9_k8VG.js +1 -0
  6. package/dist/assets/{Autocomplete-OhxbbTq9.js → Autocomplete-BqPV4fCq.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-CfkRwQNu.js → Breadcrumbs-DEV3jkdC.js} +1 -1
  8. package/dist/assets/{ButtonGroup--8rwLvQ8.js → ButtonGroup-BDg4XqiR.js} +1 -1
  9. package/dist/assets/{CSSTransition-D4fabzL2.js → CSSTransition-CoGzojVI.js} +1 -1
  10. package/dist/assets/{CallMerge-Di3dNXj5.js → CallMerge-C5DyJ6fm.js} +1 -1
  11. package/dist/assets/{CardContent-CPUlyd-R.js → CardContent-rjL6kB_r.js} +1 -1
  12. package/dist/assets/{ChevronLeft-lzYf4tao.js → ChevronLeft-DqSG9UHo.js} +1 -1
  13. package/dist/assets/{ChevronRight-CO-Fv8kP.js → ChevronRight-DxsEcvUg.js} +1 -1
  14. package/dist/assets/{Clear-DriUx9_Q.js → Clear-Bq2o3otF.js} +1 -1
  15. package/dist/assets/{Delete-DkHujAB7.js → Delete-RCnwfW1g.js} +1 -1
  16. package/dist/assets/{DeleteOutline-DUcJA7eO.js → DeleteOutline-BXoQnWFj.js} +1 -1
  17. package/dist/assets/{Done-B_L7rkHk.js → Done-DVQ_2sA2.js} +1 -1
  18. package/dist/assets/{Edit-DgzPfnB_.js → Edit-DVXYin_T.js} +1 -1
  19. package/dist/assets/{EditOutlined-yXcT-6A0.js → EditOutlined-CHgCULNs.js} +1 -1
  20. package/dist/assets/{ErrorOutline-B7jRfGmR.js → ErrorOutline-qdJUw5q6.js} +1 -1
  21. package/dist/assets/{FilterList-DMbHmf0X.js → FilterList-Dfj9GsZN.js} +1 -1
  22. package/dist/assets/{Google-DMfPhzx4.js → Google-BtG0IwAt.js} +1 -1
  23. package/dist/assets/{HelpOutline-Be59cdK1.js → HelpOutline-DaGemEcX.js} +1 -1
  24. package/dist/assets/{Launch-B8FfXmf_.js → Launch-BsxqWG7C.js} +1 -1
  25. package/dist/assets/{Link-wdDqdiCm.js → Link-BRsXeoEC.js} +1 -1
  26. package/dist/assets/{ListItemButton-BHNRxd8I.js → ListItemButton-kpGgMj08.js} +1 -1
  27. package/dist/assets/{ListSubheader-UFJcQfY_.js → ListSubheader-BTZwmxdp.js} +1 -1
  28. package/dist/assets/{LoadingButton-CUdpFc0p.js → LoadingButton-DZ6V6Qhe.js} +1 -1
  29. package/dist/assets/{LottiePlayer.modern-Jxnonfmi.js → LottiePlayer.modern-H3Pn2YNu.js} +1 -1
  30. package/dist/assets/{MoreVert-BVgcfW7V.js → MoreVert-DxM-B8xa.js} +1 -1
  31. package/dist/assets/{OpenInNew-CEBJXmxa.js → OpenInNew-BUUx7OSU.js} +1 -1
  32. package/dist/assets/{Refresh-DrflkqFW.js → Refresh-BV0ShuHj.js} +1 -1
  33. package/dist/assets/{Replay-qvum4SpI.js → Replay-DyvF6A5F.js} +1 -1
  34. package/dist/assets/{Search-CtujvL0H.js → Search-m3CMNGDm.js} +1 -1
  35. package/dist/assets/{Stepper-CJfsKFpi.js → Stepper-DR0cCC-q.js} +1 -1
  36. package/dist/assets/{TableSearch-CdKaHbVQ.js → TableSearch-okRl0dqT.js} +1 -1
  37. package/dist/assets/{ToggleButtonGroup-BP4C4KFu.js → ToggleButtonGroup-DxIvj50j.js} +1 -1
  38. package/dist/assets/{UnfoldMore-BvZuyACH.js → UnfoldMore-CZT-4-ZR.js} +1 -1
  39. package/dist/assets/Verified-C1aYOY3u.js +1 -0
  40. package/dist/assets/{VerifiedUser-D0ltmMtV.js → VerifiedUser-CS3FW2sd.js} +1 -1
  41. package/dist/assets/{ViewList--urcCqVt.js → ViewList-CXrUBR0t.js} +1 -1
  42. package/dist/assets/{_createAggregator-G6HCftPW.js → _createAggregator-BunO9xPF.js} +1 -1
  43. package/dist/assets/{actions-5RspfWE_.js → actions-CoszoXjw.js} +1 -1
  44. package/dist/assets/{actions-DjLoksgL.js → actions-DE2r6nPV.js} +1 -1
  45. package/dist/assets/{actions-CQAb6_Rz.js → actions-MiEliG9R.js} +1 -1
  46. package/dist/assets/{agreement-b4V3Z14P.js → agreement-CiVQRYD2.js} +1 -1
  47. package/dist/assets/api-CKaiYijO.js +1 -0
  48. package/dist/assets/{appearance-AiyB_V1W.js → appearance-DtyCmGdO.js} +1 -1
  49. package/dist/assets/{ar-BHqjWgUQ.js → ar-DOhYGTlW.js} +1 -1
  50. package/dist/assets/{audit-logs-C4Hps2ag.js → audit-logs-DQ3aFS2x.js} +2 -2
  51. package/dist/assets/{babel-sNEik07f.js → babel-yl1c6pTl.js} +1 -1
  52. package/dist/assets/{base-chart-BE2BHY3Y.js → base-chart-G_tNYsY8.js} +1 -1
  53. package/dist/assets/{blocklet-lDvdqhrX.js → blocklet-CzBGFesP.js} +1 -1
  54. package/dist/assets/{chain-BQMbjNUU.js → chain-z8CuvP-V.js} +1 -1
  55. package/dist/assets/{click-to-copy-C6h97nXy.js → click-to-copy-DXIfZNln.js} +1 -1
  56. package/dist/assets/cloneDeep-BDiWjxRu.js +1 -0
  57. package/dist/assets/config-navigation-BYqsSWyl.js +472 -0
  58. package/dist/assets/{connect-B1msLBDb.js → connect-64-QZQcE.js} +3 -3
  59. package/dist/assets/{connect-to-DeMt1m5c.js → connect-to-CeGdVeiX.js} +3 -3
  60. package/dist/assets/{de-QUGQFv2K.js → de-CtKPdGk6.js} +1 -1
  61. package/dist/assets/{delete-confirm-DyLbGAy5.js → delete-confirm-Dh3X0iXU.js} +1 -1
  62. package/dist/assets/{depsEqual-CM0PEscV.js → depsEqual-Bfsv3kHf.js} +1 -1
  63. package/dist/assets/{detail-C3fs8uRl.js → detail-C4nQbO7d.js} +2 -2
  64. package/dist/assets/{domains-CVE_fz_I.js → domains-7n5twKTf.js} +2 -2
  65. package/dist/assets/{download-f9_CnIWg.js → download-CFyTq_FK.js} +1 -1
  66. package/dist/assets/{edit.svg-Bdq-FCGM.js → edit.svg-DBlxe-2U.js} +1 -1
  67. package/dist/assets/emotion-cache.browser.esm-Cu824RS4.js +1 -0
  68. package/dist/assets/engine-Bbh7Mw-7.js +1 -0
  69. package/dist/assets/{es-C4w6cL07.js → es-BSYtSZPg.js} +1 -1
  70. package/dist/assets/{fr-Bq3UipEu.js → fr-C35fi7h9.js} +1 -1
  71. package/dist/assets/{get-safe-url-RPQVYlWr.js → get-safe-url-BTJDduf6.js} +1 -1
  72. package/dist/assets/getValidReactChildren-T3CvLHYr.js +1 -0
  73. package/dist/assets/{graphql-5mE8kB37.js → graphql-Cnx2YXBE.js} +1 -1
  74. package/dist/assets/{graphqlMode-BHMSwqwV.js → graphqlMode-7KCJGlgj.js} +2 -2
  75. package/dist/assets/{hi-DGZy0DLh.js → hi-5fpYJkiW.js} +1 -1
  76. package/dist/assets/{html-title-DE0TrRVC.js → html-title-CQe12Cut.js} +1 -1
  77. package/dist/assets/{id-DOzDilAf.js → id-DoVb0JYr.js} +1 -1
  78. package/dist/assets/{iframe-B7aYePTd.js → iframe-BWle7w_S.js} +1 -1
  79. package/dist/assets/{index-r58wskKh.js → index-AaVex2Te.js} +1 -1
  80. package/dist/assets/{index-B4azxfc8.js → index-B8JpxHJE.js} +1 -1
  81. package/dist/assets/{index-hG-7kift.js → index-BCrgfevn.js} +2 -2
  82. package/dist/assets/index-BHLEff7q.js +369 -0
  83. package/dist/assets/{index-DbRhfp5G.js → index-BMGgZI9D.js} +1 -1
  84. package/dist/assets/{index-CaLjm3Sr.js → index-BXpvvqAs.js} +1 -1
  85. package/dist/assets/{index-D7yowN9E.js → index-BcZYQGNY.js} +8 -8
  86. package/dist/assets/{index-CEn1Olzp.js → index-Bg6faJyI.js} +1 -1
  87. package/dist/assets/{index-B2xyyyAv.js → index-Bv6Ryg7V.js} +1 -1
  88. package/dist/assets/index-BzFgWQ5w.js +1 -0
  89. package/dist/assets/{index-DaEqVg3j.js → index-C73PGWD5.js} +1 -1
  90. package/dist/assets/{index-B29Pha71.js → index-C97bSDg2.js} +3 -3
  91. package/dist/assets/index-CBCPHvf_.js +102 -0
  92. package/dist/assets/{index-B1mmOd5b.js → index-CJ_aJ5dR.js} +1 -1
  93. package/dist/assets/{index-DmCKwIHx.js → index-CQob6fmR.js} +4 -4
  94. package/dist/assets/{index-BqqU8gwj.js → index-CTjBZAn9.js} +1 -1
  95. package/dist/assets/{index-2l_1Jppv.js → index-CUGajpSS.js} +3 -3
  96. package/dist/assets/{index-CWB_ryH-.js → index-CXEKSKL7.js} +1 -1
  97. package/dist/assets/{index-BgYMQ-SO.js → index-ChmYDkPv.js} +2 -2
  98. package/dist/assets/{index-QndNtIi-.js → index-CoHxWTi-.js} +1 -1
  99. package/dist/assets/{index-9co-KaYp.js → index-D42m9V9f.js} +9 -9
  100. package/dist/assets/{index-EzJJEvjR.js → index-D4yrNQ5O.js} +3 -3
  101. package/dist/assets/{index-CPZ5M8hw.js → index-DBtWMsht.js} +1 -1
  102. package/dist/assets/{index-DaVz8byr.js → index-DHLFobHl.js} +3 -3
  103. package/dist/assets/{index-nVFW1KOC.js → index-DJt6Q1WW.js} +1 -1
  104. package/dist/assets/{index-BtOLGXbe.js → index-DSG25x4F.js} +1 -1
  105. package/dist/assets/{index-BfetuCUm.js → index-DTVaw2Hc.js} +4 -4
  106. package/dist/assets/{index-BfQLSa8k.js → index-DUEj1V-j.js} +1 -1
  107. package/dist/assets/{index-Cmj8zxd_.js → index-DVR29wYi.js} +14 -14
  108. package/dist/assets/index-Denq1UAZ.js +20 -0
  109. package/dist/assets/{index-BcjR7La5.js → index-DfCxzzye.js} +1 -1
  110. package/dist/assets/{index-Beek8Qoq.js → index-DftYcsPB.js} +6 -6
  111. package/dist/assets/{index-B0oOTjeC.js → index-DqCVCPmC.js} +1 -1
  112. package/dist/assets/{index-BIgX2N1A.js → index-DrI_kbUr.js} +6 -6
  113. package/dist/assets/{index-ByymZrPq.js → index-DtIwM7gL.js} +2 -2
  114. package/dist/assets/{index-BBu-RTSN.js → index-DyNVa2Lx.js} +1 -1
  115. package/dist/assets/{index-DYd4YT_K.js → index-G-jrPGsm.js} +1 -1
  116. package/dist/assets/{index-BX6YpiBs.js → index-Ii4Xi_du.js} +2 -2
  117. package/dist/assets/{index-BZ5rC2Lk.js → index-P2FBSyZf.js} +1 -1
  118. package/dist/assets/{index-Ca61GFb8.js → index-dCiAdDNg.js} +1 -1
  119. package/dist/assets/{index-Bm8Rp86x.js → index-kSplQjj2.js} +1 -1
  120. package/dist/assets/{index-82LLl9rh.js → index-nmsk2vjw.js} +2 -2
  121. package/dist/assets/{index-CVpBdzTr.js → index-nsujgMc_.js} +1 -1
  122. package/dist/assets/{index-D3SOJZGy.js → index-u76kHZTc.js} +3 -3
  123. package/dist/assets/{index-gwhKA5OT.js → index-xtzr7R_I.js} +1 -1
  124. package/dist/assets/{index.esm-C5mhDUsD.js → index.esm-iaB2Jgy_.js} +1 -1
  125. package/dist/assets/{install-from-url-DPdbO0Jq.js → install-from-url-CzhDO2C0.js} +1 -1
  126. package/dist/assets/{invitation-3RtS1iUK.js → invitation-C3HrxXln.js} +2 -2
  127. package/dist/assets/is-path-prefix-equal-dPdZJpAg.js +1 -0
  128. package/dist/assets/{isEmail-apFH2MvD.js → isEmail-CmCW4Fgq.js} +1 -1
  129. package/dist/assets/item-C6yFM2Os.js +163 -0
  130. package/dist/assets/{ja-DMq-YXDX.js → ja-DZPUwZ9l.js} +1 -1
  131. package/dist/assets/{jsonMode-RjxYywbi.js → jsonMode-BRueWwe6.js} +1 -1
  132. package/dist/assets/{ko-BrYbXurh.js → ko-q4i4r9g6.js} +1 -1
  133. package/dist/assets/{list-header-BNS6BF2P.js → list-header-s21LDuvb.js} +1 -1
  134. package/dist/assets/{lite-C-Ikw2GQ.js → lite-BBz66z5Z.js} +2 -2
  135. package/dist/assets/{lock.svg-BFdqOrkF.js → lock.svg-DK1hXFWn.js} +1 -1
  136. package/dist/assets/{log-DZlkZyGX.js → log-DRaCmTGd.js} +1 -1
  137. package/dist/assets/{login-method-item-ZVrK6tB1.js → login-method-item-DwSmGt8t.js} +1 -1
  138. package/dist/assets/{lottie-react.esm-A7yQ3Nfv.js → lottie-react.esm-DqwAKW0L.js} +1 -1
  139. package/dist/assets/{memory-CoCFCBkX.js → memory-VAHG3fjG.js} +1 -1
  140. package/dist/assets/{metric-B3S53u3H.js → metric-B6TET6QI.js} +1 -1
  141. package/dist/assets/{monaco-editor-CQ6Pm7Hi.js → monaco-editor-BH4xSgKB.js} +3 -3
  142. package/dist/assets/{mouseTarget-DxlEpFaz.js → mouseTarget-txK7mk_L.js} +1 -1
  143. package/dist/assets/omit-B-qG4p98.js +1 -0
  144. package/dist/assets/{overview-z9AW_vcO.js → overview-D3hqR9Yg.js} +1 -1
  145. package/dist/assets/{permission-C_g43OOf.js → permission-DET008IY.js} +1 -1
  146. package/dist/assets/{preference-1qTmAvHN.js → preference-pxwdMSFg.js} +8 -8
  147. package/dist/assets/{provider-icon-CoJ5ERXe.js → provider-icon-CCZmjsDZ.js} +1 -1
  148. package/dist/assets/{pt-Dl6732JN.js → pt-BFCHl6F1.js} +1 -1
  149. package/dist/assets/{raf-schd.esm-CU1FaTjd.js → raf-schd.esm-BuSKwIfR.js} +1 -1
  150. package/dist/assets/{rotate-session-key-CQOBWeRr.js → rotate-session-key-DE58Q8ag.js} +1 -1
  151. package/dist/assets/{ru-CVUeN9AX.js → ru-CSTl62kK.js} +1 -1
  152. package/dist/assets/runtime-b4EXN3II.js +1 -0
  153. package/dist/assets/schema-DE6tzaXQ.js +1 -0
  154. package/dist/assets/sdk-CxXstbZm.js +1 -0
  155. package/dist/assets/{service-iJdsq1ul.js → service-BpzqSJv4.js} +1 -1
  156. package/dist/assets/{shorten-label-CCnq_MUQ.js → shorten-label-PYNmzpP_.js} +1 -1
  157. package/dist/assets/{simple-select-0S1qRvRS.js → simple-select-BiJQdJOQ.js} +1 -1
  158. package/dist/assets/{spaces-BbUa6G9F.js → spaces-MVFShLV4.js} +1 -1
  159. package/dist/assets/{status-g0Lvwqad.js → status-LmBdrnlB.js} +1 -1
  160. package/dist/assets/{status-B4gHBixJ.js → status-UZAIOWNB.js} +1 -1
  161. package/dist/assets/{switch-control-CwXplLu0.js → switch-control-CE57fLeM.js} +1 -1
  162. package/dist/assets/{table-icons-BwS2Y2wV.js → table-icons-BG66cxZv.js} +1 -1
  163. package/dist/assets/{team-DETQHkho.js → team-DgQYntrc.js} +1 -1
  164. package/dist/assets/{th-32eBNQes.js → th-D75Dlluo.js} +1 -1
  165. package/dist/assets/{toLower-oQZ3J7Wi.js → toLower-DBVF4v1M.js} +1 -1
  166. package/dist/assets/toUpper-RYfZ9dsZ.js +1 -0
  167. package/dist/assets/{traffic-Cqk5X-Ty.js → traffic-7oEMp-9f.js} +1 -1
  168. package/dist/assets/trim-Dm26Hw3f.js +1 -0
  169. package/dist/assets/{url-evaluation-DyzOKILN.js → url-evaluation-CTsNt3ve.js} +1 -1
  170. package/dist/assets/{url-join-BM9fQWnd.js → url-join-oxVMh_nl.js} +1 -1
  171. package/dist/assets/{use-mobile-23djKzeO.js → use-mobile-BS_f_Fn7.js} +1 -1
  172. package/dist/assets/{use-mobile-BmaqHxmL.js → use-mobile-Czu8FCYf.js} +1 -1
  173. package/dist/assets/{useAsync-DtsKmLYR.js → useAsync-sbHIoH6-.js} +1 -1
  174. package/dist/assets/{useAsyncRetry-bd8YRPLB.js → useAsyncRetry-CCLyjAGj.js} +1 -1
  175. package/dist/assets/{useLocalStorage-Cf0vlWCe.js → useLocalStorage-CnqCtMp_.js} +1 -1
  176. package/dist/assets/{useThemeProps-CSqQ3Rdj.js → useThemeProps-DrXM-hmA.js} +1 -1
  177. package/dist/assets/{util-w8OtW6iJ.js → util-odWrmhcv.js} +1 -1
  178. package/dist/assets/{vi-DF8IinAc.js → vi-D1mKYrmb.js} +1 -1
  179. package/dist/assets/{wait-container-CoMsFqPE.js → wait-container-D_OCwH7P.js} +1 -1
  180. package/dist/assets/{without-wallet-U-jwKDa8.js → without-wallet-suCG1vjR.js} +1 -1
  181. package/dist/assets/wrap-locale-C0daq2dx.js +1 -0
  182. package/dist/assets/{zh-ByJkLAV1.js → zh-G2I44gfs.js} +1 -1
  183. package/dist/assets/{zh-tw-34G9tsUP.js → zh-tw-C4Juvs-i.js} +1 -1
  184. package/dist/index.html +1 -1
  185. package/package.json +1 -1
  186. package/dist/assets/ArrowDropDown-BLLloj8o.js +0 -1
  187. package/dist/assets/KeyboardArrowDown-Dlq5aN05.js +0 -1
  188. package/dist/assets/Verified-BAR-FN7O.js +0 -1
  189. package/dist/assets/api-Bv3RStR2.js +0 -1
  190. package/dist/assets/cloneDeep-CheRvpcx.js +0 -1
  191. package/dist/assets/config-navigation-D55MBXAB.js +0 -472
  192. package/dist/assets/emotion-cache.browser.esm-DxLNiXj3.js +0 -1
  193. package/dist/assets/engine-DGEfu7n8.js +0 -1
  194. package/dist/assets/getValidReactChildren-CVyZy5bG.js +0 -1
  195. package/dist/assets/index-CckoDRE8.js +0 -1
  196. package/dist/assets/index-DciiOEW2.js +0 -20
  197. package/dist/assets/index-Duu5UY8_.js +0 -1
  198. package/dist/assets/index-DxkMGrHs.js +0 -358
  199. package/dist/assets/index-K5eCanEK.js +0 -102
  200. package/dist/assets/is-path-prefix-equal-Cc6vYZ8N.js +0 -1
  201. package/dist/assets/item-BinI3jhy.js +0 -163
  202. package/dist/assets/omit-Bk5eP-SH.js +0 -1
  203. package/dist/assets/runtime-CVva7EgW.js +0 -1
  204. package/dist/assets/schema-7NDYbay9.js +0 -1
  205. package/dist/assets/sdk-Dvt1785F.js +0 -1
  206. package/dist/assets/toUpper-lxerpjTR.js +0 -1
  207. package/dist/assets/trim-D7km596D.js +0 -1
  208. package/dist/assets/wrap-locale-DxhU5ODE.js +0 -1
@@ -1,163 +0,0 @@
1
- import{c as Qt,j as l,W as se,c0 as Le,r as T,ab as fe,fx as bi,dt as vi,ep as xi,fy as dr,i as et,cQ as wi,cR as Xt,B as R,aD as H,aT as Si,fz as it,aH as hn,cx as ki,K as M,fA as ji,es as fr,C as ee,aB as Y,fB as hr,ck as Ti,aQ as pr,bd as mr,fC as ot,au as gr,M as Ue,y as ve,dh as Ve,fD as Oi,al as ye,cd as yr,ct as br,ao as Yt,Q as ae,bz as pn,b5 as Ci,aP as mn,dT as Ei,fE as Ii,fF as Ri,fG as Pi,dS as Mi,by as _i,be as Li,fH as Di,bb as zi,bc as Fi,em as Wi,fI as Ni,fn as gn,P as he,V as pe,ad as Jt,fh as yn,o as C,ac as Ai,fJ as vr,U as Bi,X as De,bD as He,cU as $i,cV as xr,az as Ki,e_ as bn,aA as Ui,aS as Zt,cq as Vi,cr as Hi,at as qi,e0 as Gi,bF as je,f6 as Qi,H as ue,am as Xi,d as Yi,ax as Ji,as as Zi,k as eo,l as wr,cy as to,a3 as no,c4 as ro}from"./index-BIgX2N1A.js";import{u as io}from"./index-CckoDRE8.js";import{d as oo}from"./KeyboardArrowDown-Dlq5aN05.js";import{P as so}from"./ChevronLeft-lzYf4tao.js";import{N as ao}from"./ChevronRight-CO-Fv8kP.js";import{S as lo}from"./Search-CtujvL0H.js";import{y as co}from"./index-BfQLSa8k.js";import{o as uo,u as fo}from"./blocklet-lDvdqhrX.js";import{A as ho}from"./Autocomplete-OhxbbTq9.js";import{V as po}from"./Verified-BAR-FN7O.js";import{S as mo,V as go}from"./VerifiedUser-D0ltmMtV.js";import{A as yo}from"./Add-IxR__ozX.js";import{L as Sr}from"./Launch-B8FfXmf_.js";import{D as bo}from"./Done-B_L7rkHk.js";import{D as kr}from"./DeleteOutline-DUcJA7eO.js";import{D as vo}from"./delete-confirm-DyLbGAy5.js";import{I as xo}from"./MoreVert-BVgcfW7V.js";import{g as Re}from"./get-safe-url-RPQVYlWr.js";import{B as vn}from"./ButtonGroup--8rwLvQ8.js";const wo=Qt(l.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"})),So=Qt(l.jsx("path",{d:"M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5m-1 4h-2.19l2 2H16zM2 4.27l3.11 3.11C3.29 8.12 2 9.91 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3z"})),ko=Qt(l.jsx("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5m-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4zm-3-4h8v2H8z"})),ec="blocklet-add-component-registry",tc="server-add-registry",jo={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m8 16l2-6l6-2l-2 6l-6 2"/><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-9v2m0 14v2m-9-9h2m14 0h2"/></g>'},Te=/^[a-z0-9]+(-[a-z0-9]+)*$/,tt=(t,e,n,r="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const a=i.pop(),c=i.pop(),u={provider:i.length>0?i[0]:r,prefix:c,name:a};return e&&!Be(u)?null:u}const o=i[0],s=o.split("-");if(s.length>1){const a={provider:r,prefix:s.shift(),name:s.join("-")};return e&&!Be(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:o};return e&&!Be(a,n)?null:a}return null},Be=(t,e)=>t?!!((t.provider===""||t.provider.match(Te))&&(e&&t.prefix===""||t.prefix.match(Te))&&t.name.match(Te)):!1,jr=Object.freeze({left:0,top:0,width:16,height:16}),qe=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),en=Object.freeze({...jr,...qe}),jt=Object.freeze({...en,body:"",hidden:!1});function To(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function xn(t,e){const n=To(t,e);for(const r in jt)r in qe?r in t&&!(r in n)&&(n[r]=qe[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function Oo(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);function o(s){if(n[s])return i[s]=[];if(!(s in i)){i[s]=null;const a=r[s]&&r[s].parent,c=a&&o(a);c&&(i[s]=[a].concat(c))}return i[s]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function Co(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let o={};function s(a){o=xn(r[a]||i[a],o)}return s(e),n.forEach(s),xn(t,o)}function Tr(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(i=>{e(i,null),n.push(i)});const r=Oo(t);for(const i in r){const o=r[i];o&&(e(i,Co(t,i,o)),n.push(i))}return n}const Eo={provider:"",aliases:{},not_found:{},...jr};function st(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Or(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!st(t,Eo))return null;const n=e.icons;for(const i in n){const o=n[i];if(!i.match(Te)||typeof o.body!="string"||!st(o,jt))return null}const r=e.aliases||Object.create(null);for(const i in r){const o=r[i],s=o.parent;if(!i.match(Te)||typeof s!="string"||!n[s]&&!r[s]||!st(o,jt))return null}return e}const wn=Object.create(null);function Io(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function de(t,e){const n=wn[t]||(wn[t]=Object.create(null));return n[e]||(n[e]=Io(t,e))}function tn(t,e){return Or(e)?Tr(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function Ro(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let Pe=!1;function Cr(t){return typeof t=="boolean"&&(Pe=t),Pe}function Po(t){const e=typeof t=="string"?tt(t,!0,Pe):t;if(e){const n=de(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Mo(t,e){const n=tt(t,!0,Pe);if(!n)return!1;const r=de(n.provider,n.prefix);return Ro(r,n.name,e)}function _o(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),Pe&&!e&&!t.prefix){let i=!1;return Or(t)&&(t.prefix="",Tr(t,(o,s)=>{s&&Mo(o,s)&&(i=!0)})),i}const n=t.prefix;if(!Be({provider:e,prefix:n,name:"a"}))return!1;const r=de(e,n);return!!tn(r,t)}const Er=Object.freeze({width:null,height:null}),Ir=Object.freeze({...Er,...qe}),Lo=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Do=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Sn(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(Lo);if(r===null||!r.length)return t;const i=[];let o=r.shift(),s=Do.test(o);for(;;){if(s){const a=parseFloat(o);isNaN(a)?i.push(o):i.push(Math.ceil(a*e*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");s=!s}}const zo=t=>t==="unset"||t==="undefined"||t==="none";function Fo(t,e){const n={...en,...t},r={...Ir,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const h=[],g=v.hFlip,b=v.vFlip;let p=v.rotate;g?b?p+=2:(h.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),h.push("scale(-1 1)"),i.top=i.left=0):b&&(h.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),h.push("scale(1 -1)"),i.top=i.left=0);let w;switch(p<0&&(p-=Math.floor(p/4)*4),p=p%4,p){case 1:w=i.height/2+i.top,h.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:h.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,h.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}p%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),h.length&&(o='<g transform="'+h.join(" ")+'">'+o+"</g>")});const s=r.width,a=r.height,c=i.width,u=i.height;let f,d;s===null?(d=a===null?"1em":a==="auto"?u:a,f=Sn(d,c/u)):(f=s==="auto"?c:s,d=a===null?Sn(f,u/c):a==="auto"?u:a);const m={},x=(v,h)=>{zo(h)||(m[v]=h.toString())};return x("width",f),x("height",d),m.viewBox=i.left.toString()+" "+i.top.toString()+" "+c.toString()+" "+u.toString(),{attributes:m,body:o}}const Wo=/\sid="(\S+)"/g,No="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ao=0;function Bo(t,e=No){const n=[];let r;for(;r=Wo.exec(t);)n.push(r[1]);if(!n.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const s=typeof e=="function"?e(o):e+(Ao++).toString(),a=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}const Tt=Object.create(null);function $o(t,e){Tt[t]=e}function Ot(t){return Tt[t]||Tt[""]}function nn(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const rn=Object.create(null),Se=["https://api.simplesvg.com","https://api.unisvg.com"],$e=[];for(;Se.length>0;)Se.length===1||Math.random()>.5?$e.push(Se.shift()):$e.push(Se.pop());rn[""]=nn({resources:["https://api.iconify.design"].concat($e)});function Ko(t,e){const n=nn(e);return n===null?!1:(rn[t]=n,!0)}function on(t){return rn[t]}const Uo=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let kn=Uo();function Vo(t,e){const n=on(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(s=>{i=Math.max(i,s.length)});const o=e+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function Ho(t){return t===404}const qo=(t,e,n)=>{const r=[],i=Vo(t,e),o="icons";let s={type:o,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,u)=>{a+=c.length+1,a>=i&&u>0&&(r.push(s),s={type:o,provider:t,prefix:e,icons:[]},a=c.length),s.icons.push(c)}),r.push(s),r};function Go(t){if(typeof t=="string"){const e=on(t);if(e)return e.path}return"/"}const Qo=(t,e,n)=>{if(!kn){n("abort",424);return}let r=Go(e.provider);switch(e.type){case"icons":{const o=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});r+=o+".json?"+c.toString();break}case"custom":{const o=e.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;kn(t+r).then(o=>{const s=o.status;if(s!==200){setTimeout(()=>{n(Ho(s)?"abort":"next",s)});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)})},Xo={prepare:qo,send:Qo};function Yo(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.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 r={provider:"",prefix:"",name:""};return t.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,s=i.prefix,a=i.name,c=n[o]||(n[o]=Object.create(null)),u=c[s]||(c[s]=de(o,s));let f;a in u.icons?f=e.loaded:s===""||u.missing.has(a)?f=e.missing:f=e.pending;const d={provider:o,prefix:s,name:a};f.push(d)}),e}function Rr(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==e))})}function Jo(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,i=t.prefix;e.forEach(o=>{const s=o.icons,a=s.pending.length;s.pending=s.pending.filter(c=>{if(c.prefix!==i)return!0;const u=c.name;if(t.icons[u])s.loaded.push({provider:r,prefix:i,name:u});else if(t.missing.has(u))s.missing.push({provider:r,prefix:i,name:u});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||Rr([t],o.id),o.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),o.abort))})}))}let Zo=0;function es(t,e,n){const r=Zo++,i=Rr.bind(null,n,r);if(!e.pending.length)return i;const o={id:r,icons:e,callback:t,abort:i};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(o)}),i}function ts(t,e=!0,n=!1){const r=[];return t.forEach(i=>{const o=typeof i=="string"?tt(i,e,n):i;o&&r.push(o)}),r}var ns={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function rs(t,e,n,r){const i=t.resources.length,o=t.random?Math.floor(Math.random()*i):t.index;let s;if(t.random){let O=t.resources.slice(0);for(s=[];O.length>1;){const P=Math.floor(Math.random()*O.length);s.push(O[P]),O=O.slice(0,P).concat(O.slice(P+1))}s=s.concat(O)}else s=t.resources.slice(o).concat(t.resources.slice(0,o));const a=Date.now();let c="pending",u=0,f,d=null,m=[],x=[];typeof r=="function"&&x.push(r);function v(){d&&(clearTimeout(d),d=null)}function h(){c==="pending"&&(c="aborted"),v(),m.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),m=[]}function g(O,P){P&&(x=[]),typeof O=="function"&&x.push(O)}function b(){return{startTime:a,payload:e,status:c,queriesSent:u,queriesPending:m.length,subscribe:g,abort:h}}function p(){c="failed",x.forEach(O=>{O(void 0,f)})}function w(){m.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),m=[]}function j(O,P,_){const L=P!=="success";switch(m=m.filter(E=>E!==O),c){case"pending":break;case"failed":if(L||!t.dataAfterTimeout)return;break;default:return}if(P==="abort"){f=_,p();return}if(L){f=_,m.length||(s.length?I():p());return}if(v(),w(),!t.random){const E=t.resources.indexOf(O.resource);E!==-1&&E!==t.index&&(t.index=E)}c="completed",x.forEach(E=>{E(_)})}function I(){if(c!=="pending")return;v();const O=s.shift();if(O===void 0){if(m.length){d=setTimeout(()=>{v(),c==="pending"&&(w(),p())},t.timeout);return}p();return}const P={status:"pending",resource:O,callback:(_,L)=>{j(P,_,L)}};m.push(P),u++,d=setTimeout(I,t.rotate),n(O,e,P.callback)}return setTimeout(I),b}function Pr(t){const e={...ns,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function i(a,c,u){const f=rs(e,a,c,(d,m)=>{r(),u&&u(d,m)});return n.push(f),f}function o(a){return n.find(c=>a(c))||null}return{query:i,find:o,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function jn(){}const at=Object.create(null);function is(t){if(!at[t]){const e=on(t);if(!e)return;const n=Pr(e),r={config:e,redundancy:n};at[t]=r}return at[t]}function os(t,e,n){let r,i;if(typeof t=="string"){const o=Ot(t);if(!o)return n(void 0,424),jn;i=o.send;const s=is(t);s&&(r=s.redundancy)}else{const o=nn(t);if(o){r=Pr(o);const s=t.resources?t.resources[0]:"",a=Ot(s);a&&(i=a.send)}}return!r||!i?(n(void 0,424),jn):r.query(e,i,n)().abort}const Tn="iconify2",Me="iconify",Mr=Me+"-count",On=Me+"-version",_r=36e5,ss=168;function Ct(t,e){try{return t.getItem(e)}catch{}}function sn(t,e,n){try{return t.setItem(e,n),!0}catch{}}function Cn(t,e){try{t.removeItem(e)}catch{}}function Et(t,e){return sn(t,Mr,e.toString())}function It(t){return parseInt(Ct(t,Mr))||0}const nt={local:!0,session:!0},Lr={local:new Set,session:new Set};let an=!1;function as(t){an=t}let ze=typeof window>"u"?{}:window;function Dr(t){const e=t+"Storage";try{if(ze&&ze[e]&&typeof ze[e].length=="number")return ze[e]}catch{}nt[t]=!1}function zr(t,e){const n=Dr(t);if(!n)return;const r=Ct(n,On);if(r!==Tn){if(r){const a=It(n);for(let c=0;c<a;c++)Cn(n,Me+c.toString())}sn(n,On,Tn),Et(n,0);return}const i=Math.floor(Date.now()/_r)-ss,o=a=>{const c=Me+a.toString(),u=Ct(n,c);if(typeof u=="string"){try{const f=JSON.parse(u);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>i&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&e(f,a))return!0}catch{}Cn(n,c)}};let s=It(n);for(let a=s-1;a>=0;a--)o(a)||(a===s-1?(s--,Et(n,s)):Lr[t].add(a))}function Fr(){if(!an){as(!0);for(const t in nt)zr(t,e=>{const n=e.data,r=e.provider,i=n.prefix,o=de(r,i);if(!tn(o,n).length)return!1;const s=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,s):s,!0})}}function ls(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in nt)zr(r,i=>{const o=i.data;return i.provider!==t.provider||o.prefix!==t.prefix||o.lastModified===e});return!0}function cs(t,e){an||Fr();function n(r){let i;if(!nt[r]||!(i=Dr(r)))return;const o=Lr[r];let s;if(o.size)o.delete(s=Array.from(o).shift());else if(s=It(i),!Et(i,s+1))return;const a={cached:Math.floor(Date.now()/_r),provider:t.provider,data:e};return sn(i,Me+s.toString(),JSON.stringify(a))}e.lastModified&&!ls(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function En(){}function us(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Jo(t)}))}function ds(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,i=t.iconsToLoad;delete t.iconsToLoad;let o;if(!i||!(o=Ot(n)))return;o.prepare(n,r,i).forEach(a=>{os(n,a,c=>{if(typeof c!="object")a.icons.forEach(u=>{t.missing.add(u)});else try{const u=tn(t,c);if(!u.length)return;const f=t.pendingIcons;f&&u.forEach(d=>{f.delete(d)}),cs(t,c)}catch(u){console.error(u)}us(t)})})}))}const fs=(t,e)=>{const n=ts(t,!0,Cr()),r=Yo(n);if(!r.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(r.loaded,r.missing,r.pending,En)}),()=>{c=!1}}const i=Object.create(null),o=[];let s,a;return r.pending.forEach(c=>{const{provider:u,prefix:f}=c;if(f===a&&u===s)return;s=u,a=f,o.push(de(u,f));const d=i[u]||(i[u]=Object.create(null));d[f]||(d[f]=[])}),r.pending.forEach(c=>{const{provider:u,prefix:f,name:d}=c,m=de(u,f),x=m.pendingIcons||(m.pendingIcons=new Set);x.has(d)||(x.add(d),i[u][f].push(d))}),o.forEach(c=>{const{provider:u,prefix:f}=c;i[u][f].length&&ds(c,i[u][f])}),e?es(e,r,o):En};function hs(t,e){const n={...t};for(const r in e){const i=e[r],o=typeof i;r in Er?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const ps=/[\s,]+/;function ms(t,e){e.split(ps).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function gs(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(t);return isNaN(i)?0:r(i)}else if(n!==t){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(t.slice(0,t.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return e}function ys(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function bs(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function vs(t){return"data:image/svg+xml,"+bs(t)}function xs(t){return'url("'+vs(t)+'")'}let Oe;function ws(){try{Oe=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{Oe=null}}function Ss(t){return Oe===void 0&&ws(),Oe?Oe.createHTML(t):t}const Wr={...Ir,inline:!1},ks={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},js={display:"inline-block"},Rt={backgroundColor:"currentColor"},Nr={backgroundColor:"transparent"},In={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Rn={WebkitMask:Rt,mask:Rt,background:Nr};for(const t in Rn){const e=Rn[t];for(const n in In)e[t+n]=In[n]}const Ts={...Wr,inline:!0};function Pn(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const Os=(t,e,n,r)=>{const i=n?Ts:Wr,o=hs(i,e),s=e.mode||"svg",a={},c=e.style||{},u={...s==="svg"?ks:{},ref:r};for(let b in e){const p=e[b];if(p!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":o[b]=p===!0||p==="true"||p===1;break;case"flip":typeof p=="string"&&ms(o,p);break;case"color":a.color=p;break;case"rotate":typeof p=="string"?o[b]=gs(p):typeof p=="number"&&(o[b]=p);break;case"ariaHidden":case"aria-hidden":p!==!0&&p!=="true"&&delete u["aria-hidden"];break;default:i[b]===void 0&&(u[b]=p)}}const f=Fo(t,o),d=f.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),s==="svg"){u.style={...a,...c},Object.assign(u,d);let b=0,p=e.id;return typeof p=="string"&&(p=p.replace(/-/g,"_")),u.dangerouslySetInnerHTML={__html:Ss(Bo(f.body,p?()=>p+"ID"+b++:"iconifyReact"))},se.createElement("svg",u)}const{body:m,width:x,height:v}=t,h=s==="mask"||(s==="bg"?!1:m.indexOf("currentColor")!==-1),g=ys(m,{...d,width:x+"",height:v+""});return u.style={...a,"--svg":xs(g),width:Pn(d.width),height:Pn(d.height),...js,...h?Rt:Nr,...c},se.createElement("span",u)};Cr(!0);$o("",Xo);if(typeof document<"u"&&typeof window<"u"){Fr();const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!_o(r))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const r="IconifyProviders["+n+"] is invalid.";try{const i=e[n];if(typeof i!="object"||!i||i.resources===void 0)continue;Ko(n,i)||console.error(r)}catch{console.error(r)}}}}class Ar extends se.Component{constructor(e){super(e),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(e){this.state.icon!==e&&this.setState({icon:e})}_checkIcon(e){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(e||n.icon===null)&&this._setData({data:r});return}let i;if(typeof r!="string"||(i=tt(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const o=Po(i);if(!o){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),o!==null&&(this._loading={name:r,abort:fs([i],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const s=["iconify"];i.prefix!==""&&s.push("iconify--"+i.prefix),i.provider!==""&&s.push("iconify--"+i.provider),this._setData({data:o,classes:s}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(e){e.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const e=this.props,n=this.state.icon;if(n===null)return e.children?e.children:se.createElement("span",{});let r=e;return n.classes&&(r={...e,className:(typeof e.className=="string"?e.className+" ":"")+n.classes.join(" ")}),Os({...en,...n.data},r,e._inline,e._ref)}}const oe=se.forwardRef(function(e,n){const r={...e,_ref:n,_inline:!1};return se.createElement(Ar,r)});se.forwardRef(function(e,n){const r={...e,_ref:n,_inline:!0};return se.createElement(Ar,r)});const Br={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 18a3.5 3.5 0 0 0 0-7h-1A5 4.5 0 0 0 7 9a4.6 4.4 0 0 0-2.1 8.4M12 13v9m-3-3l3 3l3-3"/>'};var Cs={694:(t,e,n)=>{var r=n(925);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function s(u,f,d,m,x,v){if(v!==r){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}function a(){return s}s.isRequired=s;var c={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:a,element:s,elementType:s,instanceOf:a,node:s,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:o,resetWarningCache:i};return c.PropTypes=c,c}},556:(t,e,n)=>{t.exports=n(694)()},925:t=>{t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},115:t=>{var e=typeof Element<"u",n=typeof Map=="function",r=typeof Set=="function",i=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(s,a){if(s===a)return!0;if(s&&a&&typeof s=="object"&&typeof a=="object"){if(s.constructor!==a.constructor)return!1;var c,u,f,d;if(Array.isArray(s)){if((c=s.length)!=a.length)return!1;for(u=c;u--!=0;)if(!o(s[u],a[u]))return!1;return!0}if(n&&s instanceof Map&&a instanceof Map){if(s.size!==a.size)return!1;for(d=s.entries();!(u=d.next()).done;)if(!a.has(u.value[0]))return!1;for(d=s.entries();!(u=d.next()).done;)if(!o(u.value[1],a.get(u.value[0])))return!1;return!0}if(r&&s instanceof Set&&a instanceof Set){if(s.size!==a.size)return!1;for(d=s.entries();!(u=d.next()).done;)if(!a.has(u.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(s)&&ArrayBuffer.isView(a)){if((c=s.length)!=a.length)return!1;for(u=c;u--!=0;)if(s[u]!==a[u])return!1;return!0}if(s.constructor===RegExp)return s.source===a.source&&s.flags===a.flags;if(s.valueOf!==Object.prototype.valueOf&&typeof s.valueOf=="function"&&typeof a.valueOf=="function")return s.valueOf()===a.valueOf();if(s.toString!==Object.prototype.toString&&typeof s.toString=="function"&&typeof a.toString=="function")return s.toString()===a.toString();if((c=(f=Object.keys(s)).length)!==Object.keys(a).length)return!1;for(u=c;u--!=0;)if(!Object.prototype.hasOwnProperty.call(a,f[u]))return!1;if(e&&s instanceof Element)return!1;for(u=c;u--!=0;)if((f[u]!=="_owner"&&f[u]!=="__v"&&f[u]!=="__o"||!s.$$typeof)&&!o(s[f[u]],a[f[u]]))return!1;return!0}return s!=s&&a!=a}t.exports=function(s,a){try{return o(s,a)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}}}},Mn={};function U(t){var e=Mn[t];if(e!==void 0)return e.exports;var n=Mn[t]={exports:{}};return Cs[t](n,n.exports,U),n.exports}U.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return U.d(e,{a:e}),e},U.d=(t,e)=>{for(var n in e)U.o(e,n)&&!U.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},U.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),U.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var $r={};function Kr(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Kr(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}U.d($r,{A:()=>ya});const ce=function(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Kr(t))&&(r&&(r+=" "),r+=e);return r},k=(_n={default:()=>se,useMemo:()=>T.useMemo,useRef:()=>T.useRef},lt={},U.d(lt,_n),lt);var _n,lt;const Ge=function(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")},Es=typeof Le=="object"&&Le&&Le.Object===Object&&Le;var Is=typeof self=="object"&&self&&self.Object===Object&&self;const Ur=Es||Is||Function("return this")(),ct=function(){return Ur.Date.now()};var Rs=/\s/,Ps=/^\s+/;const Ms=function(t){return t&&t.slice(0,(function(e){for(var n=e.length;n--&&Rs.test(e.charAt(n)););return n})(t)+1).replace(Ps,"")},Qe=Ur.Symbol;var Vr=Object.prototype,_s=Vr.hasOwnProperty,Ls=Vr.toString,ke=Qe?Qe.toStringTag:void 0,Ds=Object.prototype.toString,Ln=Qe?Qe.toStringTag:void 0;const zs=function(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Ln&&Ln in Object(t)?(function(e){var n=_s.call(e,ke),r=e[ke];try{e[ke]=void 0;var i=!0}catch{}var o=Ls.call(e);return i&&(n?e[ke]=r:delete e[ke]),o})(t):(function(e){return Ds.call(e)})(t)};var Fs=/^[-+]0x[0-9a-f]+$/i,Ws=/^0b[01]+$/i,Ns=/^0o[0-7]+$/i,As=parseInt;const Dn=function(t){if(typeof t=="number")return t;if((function(r){return typeof r=="symbol"||(function(i){return i!=null&&typeof i=="object"})(r)&&zs(r)=="[object Symbol]"})(t))return NaN;if(Ge(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ge(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ms(t);var n=Ws.test(t);return n||Ns.test(t)?As(t.slice(2),n?2:8):Fs.test(t)?NaN:+t};var Bs=Math.max,$s=Math.min;const Pt=function(t,e,n){var r,i,o,s,a,c,u=0,f=!1,d=!1,m=!0;if(typeof t!="function")throw new TypeError("Expected a function");function x(p){var w=r,j=i;return r=i=void 0,u=p,s=t.apply(j,w)}function v(p){var w=p-c;return c===void 0||w>=e||w<0||d&&p-u>=o}function h(){var p=ct();if(v(p))return g(p);a=setTimeout(h,(function(w){var j=e-(w-c);return d?$s(j,o-(w-u)):j})(p))}function g(p){return a=void 0,m&&r?x(p):(r=i=void 0,s)}function b(){var p=ct(),w=v(p);if(r=arguments,i=this,c=p,w){if(a===void 0)return(function(j){return u=j,a=setTimeout(h,e),f?x(j):s})(c);if(d)return clearTimeout(a),a=setTimeout(h,e),x(c)}return a===void 0&&(a=setTimeout(h,e)),s}return e=Dn(e)||0,Ge(n)&&(f=!!n.leading,o=(d="maxWait"in n)?Bs(Dn(n.maxWait)||0,e):o,m="trailing"in n?!!n.trailing:m),b.cancel=function(){a!==void 0&&clearTimeout(a),u=0,r=c=i=a=void 0},b.flush=function(){return a===void 0?s:g(ct())},b},zn=function(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError("Expected a function");return Ge(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Pt(t,e,{leading:r,maxWait:e,trailing:i})};var Ks=U(115),Us=U.n(Ks),Hr=(function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some((function(i,o){return i[0]===n&&(r=o,!0)})),r}return(function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i<o.length;i++){var s=o[i];n.call(r,s[1],s[0])}},e})()})(),Mt=typeof window<"u"&&typeof document<"u"&&window.document===document,Xe=U.g!==void 0&&U.g.Math===Math?U.g:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),Vs=typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Xe):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Hs=["top","right","bottom","left","width","height","size","weight"],qs=typeof MutationObserver<"u",Gs=(function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=(function(e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&a()}function s(){Vs(o)}function a(){var c=Date.now();if(n){if(c-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,20);i=c}return a})(this.refresh.bind(this))}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var n=this.observers_,r=n.indexOf(e);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter((function(n){return n.gatherActive(),n.hasActive()}));return e.forEach((function(n){return n.broadcastActive()})),e.length>0},t.prototype.connect_=function(){Mt&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),qs?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Mt&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n;Hs.some((function(i){return!!~r.indexOf(i)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t})(),Fn=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},xe=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Xe},Wn=Ye(0,0,0,0);function Ke(t){return parseFloat(t)||0}function Nn(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(r,i){return r+Ke(t["border-"+i+"-width"])}),0)}var Qs=typeof SVGGraphicsElement<"u"?function(t){return t instanceof xe(t).SVGGraphicsElement}:function(t){return t instanceof xe(t).SVGElement&&typeof t.getBBox=="function"};function Xs(t){return Mt?Qs(t)?(function(e){var n=e.getBBox();return Ye(0,0,n.width,n.height)})(t):(function(e){var n=e.clientWidth,r=e.clientHeight;if(!n&&!r)return Wn;var i=xe(e).getComputedStyle(e),o=(function(m){for(var x={},v=0,h=["top","right","bottom","left"];v<h.length;v++){var g=h[v],b=m["padding-"+g];x[g]=Ke(b)}return x})(i),s=o.left+o.right,a=o.top+o.bottom,c=Ke(i.width),u=Ke(i.height);if(i.boxSizing==="border-box"&&(Math.round(c+s)!==n&&(c-=Nn(i,"left","right")+s),Math.round(u+a)!==r&&(u-=Nn(i,"top","bottom")+a)),!(function(m){return m===xe(m).document.documentElement})(e)){var f=Math.round(c+s)-n,d=Math.round(u+a)-r;Math.abs(f)!==1&&(c-=f),Math.abs(d)!==1&&(u-=d)}return Ye(o.left,o.top,c,u)})(t):Wn}function Ye(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Ys=(function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ye(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=Xs(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t})(),Js=function(t,e){var n=(function(r){var i=r.x,o=r.y,s=r.width,a=r.height,c=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,u=Object.create(c.prototype);return Fn(u,{x:i,y:o,width:s,height:a,top:o,right:i+s,bottom:a+o,left:i}),u})(e);Fn(this,{target:t,contentRect:n})},Zs=(function(){function t(e,n,r){if(this.activeObservations_=[],this.observations_=new Hr,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=r}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(e instanceof xe(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new Ys(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(e instanceof xe(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(n){n.isActive()&&e.activeObservations_.push(n)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map((function(r){return new Js(r.target,r.broadcastRect())}));this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t})(),qr=typeof WeakMap<"u"?new WeakMap:new Hr,Gr=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Gs.getInstance(),r=new Zs(e,n,this);qr.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){Gr.prototype[t]=function(){var e;return(e=qr.get(this))[t].apply(e,arguments)}}));const An=Xe.ResizeObserver!==void 0?Xe.ResizeObserver:Gr,te="Left",ne="Right",re="Up",ie="Down",me={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},ut={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},Bn="mousemove",$n="mouseup";function Kn(t,e){if(e===0)return t;const n=Math.PI/180*e;return[t[0]*Math.cos(n)+t[1]*Math.sin(n),t[1]*Math.cos(n)-t[0]*Math.sin(n)]}function ea(t){const{trackMouse:e}=t,n=k.useRef(Object.assign({},ut)),r=k.useRef(Object.assign({},me)),i=k.useRef(Object.assign({},r.current));let o;for(o in i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},me),t),me)r.current[o]===void 0&&(r.current[o]=me[o]);const[s,a]=k.useMemo((()=>(function(c,u){const f=g=>{const b="touches"in g;b&&g.touches.length>1||c(((p,w)=>{w.trackMouse&&!b&&(document.addEventListener(Bn,d),document.addEventListener($n,x));const{clientX:j,clientY:I}=b?g.touches[0]:g,O=Kn([j,I],w.rotationAngle);return w.onTouchStartOrOnMouseDown&&w.onTouchStartOrOnMouseDown({event:g}),Object.assign(Object.assign(Object.assign({},p),ut),{initial:O.slice(),xy:O,start:g.timeStamp||0})}))},d=g=>{c(((b,p)=>{const w="touches"in g;if(w&&g.touches.length>1)return b;if(g.timeStamp-b.start>p.swipeDuration)return b.swiping?Object.assign(Object.assign({},b),{swiping:!1}):b;const{clientX:j,clientY:I}=w?g.touches[0]:g,[O,P]=Kn([j,I],p.rotationAngle),_=O-b.xy[0],L=P-b.xy[1],E=Math.abs(_),A=Math.abs(L),W=(g.timeStamp||0)-b.start,V=Math.sqrt(E*E+A*A)/(W||1),N=[_/(W||1),L/(W||1)],K=(function(B,X,Z,yi){return B>X?Z>0?ne:te:yi>0?ie:re})(E,A,_,L),S=typeof p.delta=="number"?p.delta:p.delta[K.toLowerCase()]||me.delta;if(E<S&&A<S&&!b.swiping)return b;const D={absX:E,absY:A,deltaX:_,deltaY:L,dir:K,event:g,first:b.first,initial:b.initial,velocity:V,vxvy:N};D.first&&p.onSwipeStart&&p.onSwipeStart(D),p.onSwiping&&p.onSwiping(D);let Q=!1;return(p.onSwiping||p.onSwiped||p[`onSwiped${K}`])&&(Q=!0),Q&&p.preventScrollOnSwipe&&p.trackTouch&&g.cancelable&&g.preventDefault(),Object.assign(Object.assign({},b),{first:!1,eventData:D,swiping:!0})}))},m=g=>{c(((b,p)=>{let w;if(b.swiping&&b.eventData){if(g.timeStamp-b.start<p.swipeDuration){w=Object.assign(Object.assign({},b.eventData),{event:g}),p.onSwiped&&p.onSwiped(w);const j=p[`onSwiped${w.dir}`];j&&j(w)}}else p.onTap&&p.onTap({event:g});return p.onTouchEndOrOnMouseUp&&p.onTouchEndOrOnMouseUp({event:g}),Object.assign(Object.assign(Object.assign({},b),ut),{eventData:w})}))},x=g=>{document.removeEventListener(Bn,d),document.removeEventListener($n,x),m(g)},v=(g,b)=>{let p=()=>{};if(g&&g.addEventListener){const w=Object.assign(Object.assign({},me.touchEventOptions),b.touchEventOptions),j=[["touchstart",f,w],["touchmove",d,Object.assign(Object.assign({},w),b.preventScrollOnSwipe?{passive:!1}:{})],["touchend",m,w]];j.forEach((([I,O,P])=>g.addEventListener(I,O,P))),p=()=>j.forEach((([I,O])=>g.removeEventListener(I,O)))}return p},h={ref:g=>{g!==null&&c(((b,p)=>{if(b.el===g)return b;const w={};return b.el&&b.el!==g&&b.cleanUpTouch&&(b.cleanUpTouch(),w.cleanUpTouch=void 0),p.trackTouch&&g&&(w.cleanUpTouch=v(g,p)),Object.assign(Object.assign(Object.assign({},b),{el:g}),w)}))}};return u.trackMouse&&(h.onMouseDown=f),[h,v]})((c=>n.current=c(n.current,r.current)),{trackMouse:e})),[e]);return n.current=(function(c,u,f,d){return u.trackTouch&&c.el?c.cleanUpTouch?u.preventScrollOnSwipe!==f.preventScrollOnSwipe||u.touchEventOptions.passive!==f.touchEventOptions.passive?(c.cleanUpTouch(),Object.assign(Object.assign({},c),{cleanUpTouch:d(c.el,u)})):c:Object.assign(Object.assign({},c),{cleanUpTouch:d(c.el,u)}):(c.cleanUpTouch&&c.cleanUpTouch(),Object.assign(Object.assign({},c),{cleanUpTouch:void 0}))})(n.current,r.current,i.current,a),s}var y=U(556);function Ce(t){return Ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(t)}function Un(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,r)}return n}function Vn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Un(Object(n),!0).forEach((function(r){ta(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Un(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function ta(t,e,n){return(e=(function(r){var i=(function(o){if(Ce(o)!="object"||!o)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var a=s.call(o,"string");if(Ce(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(r);return Ce(i)=="symbol"?i:i+""})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var na={description:"",fullscreen:"",isFullscreen:!1,originalAlt:"",originalHeight:"",originalWidth:"",originalTitle:"",sizes:"",srcSet:"",loading:"eager"},_t=k.default.memo((function(t){var e=Vn(Vn({},na),t),n=e.description,r=e.fullscreen,i=e.handleImageLoaded,o=e.isFullscreen,s=e.onImageError,a=e.original,c=e.originalAlt,u=e.originalHeight,f=e.originalWidth,d=e.originalTitle,m=e.sizes,x=e.srcSet,v=e.loading,h=o&&r||a;return k.default.createElement(k.default.Fragment,null,k.default.createElement("img",{className:"image-gallery-image",src:h,alt:c,srcSet:x,height:u,width:f,sizes:m,title:d,onLoad:function(g){return i(g,a)},onError:s,loading:v}),n&&k.default.createElement("span",{className:"image-gallery-description"},n))}));_t.displayName="Item",_t.propTypes={description:y.string,fullscreen:y.string,handleImageLoaded:y.func.isRequired,isFullscreen:y.bool,onImageError:y.func.isRequired,original:y.string.isRequired,originalAlt:y.string,originalHeight:y.string,originalWidth:y.string,originalTitle:y.string,sizes:y.string,srcSet:y.string,loading:y.string};const ra=_t;function Ee(t){return Ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(t)}function Hn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,r)}return n}function qn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hn(Object(n),!0).forEach((function(r){ia(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hn(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function ia(t,e,n){return(e=(function(r){var i=(function(o){if(Ee(o)!="object"||!o)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var a=s.call(o,"string");if(Ee(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(r);return Ee(i)=="symbol"?i:i+""})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var oa={left:k.default.createElement("polyline",{points:"15 18 9 12 15 6"}),right:k.default.createElement("polyline",{points:"9 18 15 12 9 6"}),top:k.default.createElement("polyline",{points:"6 15 12 9 18 15"}),bottom:k.default.createElement("polyline",{points:"6 9 12 15 18 9"}),maximize:k.default.createElement("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"}),minimize:k.default.createElement("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"}),play:k.default.createElement("polygon",{points:"5 3 19 12 5 21 5 3"}),pause:k.default.createElement(k.default.Fragment,null,k.default.createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),k.default.createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))},sa={strokeWidth:1,viewBox:"0 0 24 24"},Qr=function(t){var e=qn(qn({},sa),t),n=e.strokeWidth,r=e.viewBox,i=e.icon;return k.default.createElement("svg",{className:"image-gallery-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:r,fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round"},oa[i])};Qr.propTypes={strokeWidth:y.number,viewBox:y.string,icon:(0,y.oneOf)(["left","right","top","bottom","maximize","minimize","play","pause"]).isRequired};const we=Qr;var Lt=k.default.memo((function(t){var e=t.isFullscreen,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-fullscreen-button",onClick:n,"aria-label":"Open Fullscreen"},k.default.createElement(we,{strokeWidth:2,icon:e?"minimize":"maximize"}))}));Lt.displayName="Fullscreen",Lt.propTypes={isFullscreen:y.bool.isRequired,onClick:y.func.isRequired};const aa=Lt;var Dt=k.default.memo((function(t){var e=t.disabled,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-left-nav",disabled:e,onClick:n,"aria-label":"Previous Slide"},k.default.createElement(we,{icon:"left",viewBox:"6 0 12 24"}))}));Dt.displayName="LeftNav",Dt.propTypes={disabled:y.bool.isRequired,onClick:y.func.isRequired};const la=Dt;var zt=k.default.memo((function(t){var e=t.disabled,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-right-nav",disabled:e,onClick:n,"aria-label":"Next Slide"},k.default.createElement(we,{icon:"right",viewBox:"6 0 12 24"}))}));zt.displayName="RightNav",zt.propTypes={disabled:y.bool.isRequired,onClick:y.func.isRequired};const ca=zt;var Ft=k.default.memo((function(t){var e=t.isPlaying,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-play-button",onClick:n,"aria-label":"Play or Pause Slideshow"},k.default.createElement(we,{strokeWidth:2,icon:e?"pause":"play"}))}));Ft.displayName="PlayPause",Ft.propTypes={isPlaying:y.bool.isRequired,onClick:y.func.isRequired};const ua=Ft;function Ie(t){return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(t)}function Wt(){return Wt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Wt.apply(null,arguments)}function Gn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,r)}return n}function Qn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gn(Object(n),!0).forEach((function(r){da(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gn(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function da(t,e,n){return(e=(function(r){var i=(function(o){if(Ie(o)!="object"||!o)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var a=s.call(o,"string");if(Ie(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)})(r);return Ie(i)=="symbol"?i:i+""})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var fa={className:"",delta:0,onSwiping:function(){},onSwiped:function(){}},Xr=function(t){var e=Qn(Qn({},fa),t),n=e.children,r=e.className,i=ea({delta:e.delta,onSwiping:e.onSwiping,onSwiped:e.onSwiped});return k.default.createElement("div",Wt({},i,{className:r}),n)};Xr.propTypes={children:y.node.isRequired,className:y.string,delta:y.number,onSwiped:y.func,onSwiping:y.func};const Xn=Xr;var Nt=k.default.memo((function(t){var e=t.disabled,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-top-nav",disabled:e,onClick:n,"aria-label":"Previous Slide"},k.default.createElement(we,{icon:"top",viewBox:"6 0 12 24"}))}));Nt.displayName="TopNav",Nt.propTypes={disabled:y.bool.isRequired,onClick:y.func.isRequired};const ha=Nt;var At=k.default.memo((function(t){var e=t.disabled,n=t.onClick;return k.default.createElement("button",{type:"button",className:"image-gallery-icon image-gallery-bottom-nav",disabled:e,onClick:n,"aria-label":"Next Slide"},k.default.createElement(we,{icon:"bottom",viewBox:"6 0 12 24"}))}));At.displayName="BottomNav",At.propTypes={disabled:y.bool.isRequired,onClick:y.func.isRequired};const pa=At;function be(t){return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(t)}function Yn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,r)}return n}function Jn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yn(Object(n),!0).forEach((function(r){ge(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yn(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function ma(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Jr(r.key),r)}}function Yr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Yr=function(){return!!t})()}function Je(t){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Je(t)}function Bt(t,e){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Bt(t,e)}function ge(t,e,n){return(e=Jr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jr(t){var e=(function(n){if(be(n)!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,"string");if(be(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(t);return be(e)=="symbol"?e:e+""}var Zn=["fullscreenchange","MSFullscreenChange","mozfullscreenchange","webkitfullscreenchange"],ga=(0,y.arrayOf)((0,y.shape)({srcSet:y.string,media:y.string}));function er(t){var e=parseInt(t.keyCode||t.which||0,10);return e===66||e===62}var $t=(function(){function t(e){var n,r,i,o;return(function(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")})(this,t),ge((r=this,o=[e],i=Je(i=t),n=(function(s,a){if(a&&(be(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c})(s)})(r,Yr()?Reflect.construct(i,o||[],Je(r).constructor):i.apply(r,o))),"onBulletClick",(function(s,a){var c=n.props,u=c.onBulletClick,f=c.items,d=n.state.currentIndex;s.target.blur(),d!==a&&(f.length===2?n.slideToIndexWithStyleReset(a,s):n.slideToIndex(a,s)),u&&u(s,a)})),n.state={currentIndex:e.startIndex,thumbsTranslate:0,thumbsSwipedTranslate:0,currentSlideOffset:0,galleryWidth:0,galleryHeight:0,thumbnailsWrapperWidth:0,thumbnailsWrapperHeight:0,thumbsStyle:{transition:"all ".concat(e.slideDuration,"ms ease-out")},isFullscreen:!1,isSwipingThumbnail:!1,isPlaying:!1},n.loadedImages={},n.imageGallery=k.default.createRef(),n.thumbnailsWrapper=k.default.createRef(),n.thumbnails=k.default.createRef(),n.imageGallerySlideWrapper=k.default.createRef(),n.handleImageLoaded=n.handleImageLoaded.bind(n),n.handleKeyDown=n.handleKeyDown.bind(n),n.handleMouseDown=n.handleMouseDown.bind(n),n.handleResize=n.handleResize.bind(n),n.handleOnSwiped=n.handleOnSwiped.bind(n),n.handleScreenChange=n.handleScreenChange.bind(n),n.handleSwiping=n.handleSwiping.bind(n),n.handleThumbnailSwiping=n.handleThumbnailSwiping.bind(n),n.handleOnThumbnailSwiped=n.handleOnThumbnailSwiped.bind(n),n.onThumbnailMouseLeave=n.onThumbnailMouseLeave.bind(n),n.handleImageError=n.handleImageError.bind(n),n.pauseOrPlay=n.pauseOrPlay.bind(n),n.renderThumbInner=n.renderThumbInner.bind(n),n.renderItem=n.renderItem.bind(n),n.slideLeft=n.slideLeft.bind(n),n.slideRight=n.slideRight.bind(n),n.toggleFullScreen=n.toggleFullScreen.bind(n),n.togglePlay=n.togglePlay.bind(n),n.unthrottledSlideToIndex=n.slideToIndex,n.slideToIndex=zn(n.unthrottledSlideToIndex,e.slideDuration,{trailing:!1}),e.lazyLoad&&(n.lazyLoaded=[]),n}return(function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Bt(e,n)})(t,k.default.Component),(function(e,n){return n&&ma(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e})(t,[{key:"componentDidMount",value:function(){var e=this.props,n=e.autoPlay,r=e.useWindowKeyDown;n&&this.play(),r?window.addEventListener("keydown",this.handleKeyDown):this.imageGallery.current.addEventListener("keydown",this.handleKeyDown),window.addEventListener("mousedown",this.handleMouseDown),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),this.addScreenChangeEvent()}},{key:"componentDidUpdate",value:function(e,n){var r=this.props,i=r.items,o=r.lazyLoad,s=r.slideDuration,a=r.slideInterval,c=r.startIndex,u=r.thumbnailPosition,f=r.showThumbnails,d=r.useWindowKeyDown,m=this.state,x=m.currentIndex,v=m.isPlaying,h=e.items.length!==i.length,g=!Us()(e.items,i),b=e.startIndex!==c,p=e.thumbnailPosition!==u,w=e.showThumbnails!==f;a===e.slideInterval&&s===e.slideDuration||v&&(this.pause(),this.play()),p&&(this.removeResizeObserver(),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper)),w&&f&&this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),w&&!f&&this.removeThumbnailsResizeObserver(),(h||w)&&this.handleResize(),n.currentIndex!==x&&this.slideThumbnailBar(),e.slideDuration!==s&&(this.slideToIndex=zn(this.unthrottledSlideToIndex,s,{trailing:!1})),!o||e.lazyLoad&&!g||(this.lazyLoaded=[]),d!==e.useWindowKeyDown&&(d?(this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown),window.addEventListener("keydown",this.handleKeyDown)):(window.removeEventListener("keydown",this.handleKeyDown),this.imageGallery.current.addEventListener("keydown",this.handleKeyDown))),(b||g)&&this.setState({currentIndex:c,slideStyle:{transition:"none"}})}},{key:"componentWillUnmount",value:function(){var e=this.props.useWindowKeyDown;window.removeEventListener("mousedown",this.handleMouseDown),this.removeScreenChangeEvent(),this.removeResizeObserver(),this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null),this.transitionTimer&&window.clearTimeout(this.transitionTimer),e?window.removeEventListener("keydown",this.handleKeyDown):this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"onSliding",value:function(){var e=this,n=this.state,r=n.currentIndex,i=n.isTransitioning,o=this.props,s=o.onSlide,a=o.slideDuration;this.transitionTimer=window.setTimeout((function(){i&&(e.setState({isTransitioning:!i,isSwipingThumbnail:!1}),s&&s(r))}),a+50)}},{key:"onThumbnailClick",value:function(e,n){var r=this.props,i=r.onThumbnailClick,o=r.items,s=this.state.currentIndex;e.target.parentNode.parentNode.blur(),s!==n&&(o.length===2?this.slideToIndexWithStyleReset(n,e):this.slideToIndex(n,e)),i&&i(e,n)}},{key:"onThumbnailMouseOver",value:function(e,n){var r=this;this.thumbnailMouseOverTimer&&(window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null),this.thumbnailMouseOverTimer=window.setTimeout((function(){r.slideToIndex(n),r.pause()}),300)}},{key:"onThumbnailMouseLeave",value:function(){if(this.thumbnailMouseOverTimer){var e=this.props.autoPlay;window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null,e&&this.play()}}},{key:"setThumbsTranslate",value:function(e){this.setState({thumbsTranslate:e})}},{key:"setModalFullscreen",value:function(e){var n=this.props.onScreenChange;this.setState({modalFullscreen:e}),n&&n(e)}},{key:"getThumbsTranslate",value:function(e){var n,r=this.props,i=r.disableThumbnailScroll,o=r.items,s=this.state,a=s.thumbnailsWrapperWidth,c=s.thumbnailsWrapperHeight,u=this.thumbnails&&this.thumbnails.current;if(i)return 0;if(u){if(this.isThumbnailVertical()){if(u.scrollHeight<=c)return 0;n=u.scrollHeight-c}else{if(u.scrollWidth<=a||a<=0)return 0;n=u.scrollWidth-a}return e*(n/(o.length-1))}return 0}},{key:"getThumbnailPositionClassName",value:function(e){switch(e){case"left":e=" ".concat("image-gallery-thumbnails-left");break;case"right":e=" ".concat("image-gallery-thumbnails-right");break;case"bottom":e=" ".concat("image-gallery-thumbnails-bottom");break;case"top":e=" ".concat("image-gallery-thumbnails-top")}return e}},{key:"getAlignmentClassName",value:function(e){var n=this.state.currentIndex,r=this.props,i=r.infinite,o=r.items,s="",a="image-gallery-left",c="image-gallery-right";switch(e){case n-1:s=" ".concat(a);break;case n:s=" ".concat("image-gallery-center");break;case n+1:s=" ".concat(c)}return o.length>=3&&i&&(e===0&&n===o.length-1?s=" ".concat(c):e===o.length-1&&n===0&&(s=" ".concat(a))),s}},{key:"getTranslateXForTwoSlide",value:function(e){var n=this.state,r=n.currentIndex,i=n.currentSlideOffset,o=n.previousIndex,s=r!==o,a=e===0&&o===0,c=e===1&&o===1,u=e===0&&r===1,f=e===1&&r===0,d=i===0,m=-100*r+100*e+i;return i>0?this.direction="left":i<0&&(this.direction="right"),f&&i>0&&(m=-100+i),u&&i<0&&(m=100+i),s?a&&d&&this.direction==="left"?m=100:c&&d&&this.direction==="right"&&(m=-100):(f&&d&&this.direction==="left"&&(m=-100),u&&d&&this.direction==="right"&&(m=100)),m}},{key:"getThumbnailBarHeight",value:function(){return this.isThumbnailVertical()?{height:this.state.gallerySlideWrapperHeight}:{}}},{key:"getSlideStyle",value:function(e){var n=this.state,r=n.currentIndex,i=n.currentSlideOffset,o=n.slideStyle,s=this.props,a=s.infinite,c=s.items,u=s.useTranslate3D,f=s.isRTL,d=s.slideVertically,m=-100*r,x=c.length-1,v=(m+100*e)*(f?-1:1)+i;a&&c.length>2&&(r===0&&e===x?v=-100*(f?-1:1)+i:r===x&&e===0&&(v=100*(f?-1:1)+i)),a&&c.length===2&&(v=this.getTranslateXForTwoSlide(e));var h=d?"translate(0, ".concat(v,"%)"):"translate(".concat(v,"%, 0)");return u&&(h=d?"translate3d(0, ".concat(v,"%, 0)"):"translate3d(".concat(v,"%, 0, 0)")),Jn({display:this.isSlideVisible(e)?"inherit":"none",WebkitTransform:h,MozTransform:h,msTransform:h,OTransform:h,transform:h},o)}},{key:"getCurrentIndex",value:function(){return this.state.currentIndex}},{key:"getThumbnailStyle",value:function(){var e,n=this.props,r=n.useTranslate3D,i=n.isRTL,o=this.state,s=o.thumbsTranslate,a=o.thumbsStyle,c=i?-1*s:s;return this.isThumbnailVertical()?(e="translate(0, ".concat(s,"px)"),r&&(e="translate3d(0, ".concat(s,"px, 0)"))):(e="translate(".concat(c,"px, 0)"),r&&(e="translate3d(".concat(c,"px, 0, 0)"))),Jn({WebkitTransform:e,MozTransform:e,msTransform:e,OTransform:e,transform:e},a)}},{key:"getSlideItems",value:function(){var e=this,n=this.state.currentIndex,r=this.props,i=r.items,o=r.slideOnThumbnailOver,s=r.onClick,a=r.lazyLoad,c=r.onTouchMove,u=r.onTouchEnd,f=r.onTouchStart,d=r.onMouseOver,m=r.onMouseLeave,x=r.renderItem,v=r.renderThumbInner,h=r.showThumbnails,g=r.showBullets,b=[],p=[],w=[];return i.forEach((function(j,I){var O=e.getAlignmentClassName(I),P=j.originalClass?" ".concat(j.originalClass):"",_=j.thumbnailClass?" ".concat(j.thumbnailClass):"",L=j.renderItem||x||e.renderItem,E=j.renderThumbInner||v||e.renderThumbInner,A=!a||O||e.lazyLoaded[I];A&&a&&!e.lazyLoaded[I]&&(e.lazyLoaded[I]=!0);var W=e.getSlideStyle(I),V=k.default.createElement("div",{"aria-label":"Go to Slide ".concat(I+1),key:"slide-".concat(I),tabIndex:"-1",className:"image-gallery-slide ".concat(O," ").concat(P),style:W,onClick:s,onKeyUp:e.handleSlideKeyUp,onTouchMove:c,onTouchEnd:u,onTouchStart:f,onMouseOver:d,onFocus:d,onMouseLeave:m,role:"button"},A?L(j):k.default.createElement("div",{style:{height:"100%"}}));if(b.push(V),h&&j.thumbnail){var N=ce("image-gallery-thumbnail",_,{active:n===I});p.push(k.default.createElement("button",{key:"thumbnail-".concat(I),type:"button",tabIndex:"0","aria-pressed":n===I?"true":"false","aria-label":"Go to Slide ".concat(I+1),className:N,onMouseLeave:o?e.onThumbnailMouseLeave:null,onMouseOver:function(S){return e.handleThumbnailMouseOver(S,I)},onFocus:function(S){return e.handleThumbnailMouseOver(S,I)},onKeyUp:function(S){return e.handleThumbnailKeyUp(S,I)},onClick:function(S){return e.onThumbnailClick(S,I)}},E(j)))}if(g){var K=ce("image-gallery-bullet",j.bulletClass,{active:n===I});w.push(k.default.createElement("button",{type:"button",key:"bullet-".concat(I),className:K,onClick:function(S){return e.onBulletClick(S,I)},"aria-pressed":n===I?"true":"false","aria-label":"Go to Slide ".concat(I+1)}))}})),{slides:b,thumbnails:p,bullets:w}}},{key:"ignoreIsTransitioning",value:function(){var e=this.props.items,n=this.state,r=n.previousIndex,i=n.currentIndex,o=e.length-1;return Math.abs(r-i)>1&&!(r===0&&i===o)&&!(r===o&&i===0)}},{key:"isFirstOrLastSlide",value:function(e){return e===this.props.items.length-1||e===0}},{key:"slideIsTransitioning",value:function(e){var n=this.state,r=n.isTransitioning,i=n.previousIndex,o=n.currentIndex;return r&&!(e===i||e===o)}},{key:"isSlideVisible",value:function(e){return!this.slideIsTransitioning(e)||this.ignoreIsTransitioning()&&!this.isFirstOrLastSlide(e)}},{key:"slideThumbnailBar",value:function(){var e=this.state,n=e.currentIndex,r=e.isSwipingThumbnail,i=-this.getThumbsTranslate(n);r||(n===0?this.setState({thumbsTranslate:0,thumbsSwipedTranslate:0}):this.setState({thumbsTranslate:i,thumbsSwipedTranslate:i}))}},{key:"canSlide",value:function(){return this.props.items.length>=2}},{key:"canSlideLeft",value:function(){var e=this.props,n=e.infinite,r=e.isRTL;return n||(r?this.canSlideNext():this.canSlidePrevious())}},{key:"canSlideRight",value:function(){var e=this.props,n=e.infinite,r=e.isRTL;return n||(r?this.canSlidePrevious():this.canSlideNext())}},{key:"canSlidePrevious",value:function(){return this.state.currentIndex>0}},{key:"canSlideNext",value:function(){return this.state.currentIndex<this.props.items.length-1}},{key:"handleSwiping",value:function(e){var n=e.event,r=e.absX,i=e.absY,o=e.dir,s=this.props,a=s.disableSwipe,c=s.stopPropagation,u=s.swipingTransitionDuration,f=this.state,d=f.galleryWidth,m=f.galleryHeight,x=f.isTransitioning,v=f.swipingUpDown,h=f.swipingLeftRight,g=this.props.slideVertically;if((o!==re&&o!==ie&&!v||h||(v||this.setState({swipingUpDown:!0}),g))&&(o!==te&&o!==ne||h||this.setState({swipingLeftRight:!0}),!a))if(c&&n.preventDefault(),x)this.setState({currentSlideOffset:0});else{if((o===te||o===ne)&&g||(o===re||o===ie)&&!g)return;var b=ge(ge(ge(ge({},te,-1),ne,1),re,-1),ie,1)[o],p=r/d*100;g&&(p=i/m*100),Math.abs(p)>=100&&(p=100);var w={transition:"transform ".concat(u,"ms ease-out")};this.setState({currentSlideOffset:b*p,slideStyle:w})}}},{key:"handleThumbnailSwiping",value:function(e){var n=e.event,r=e.absX,i=e.absY,o=e.dir,s=this.props,a=s.stopPropagation,c=s.swipingThumbnailTransitionDuration,u=this.state,f=u.thumbsSwipedTranslate,d=u.thumbnailsWrapperHeight,m=u.thumbnailsWrapperWidth,x=u.swipingUpDown,v=u.swipingLeftRight;if(this.isThumbnailVertical()){if((o===te||o===ne||v)&&!x)return void(v||this.setState({swipingLeftRight:!0}));o!==re&&o!==ie||x||this.setState({swipingUpDown:!0})}else{if((o===re||o===ie||x)&&!v)return void(x||this.setState({swipingUpDown:!0}));o!==te&&o!==ne||v||this.setState({swipingLeftRight:!0})}var h,g,b,p,w,j=this.thumbnails&&this.thumbnails.current;if(this.isThumbnailVertical()?(h=f+(o===ie?i:-i),g=j.scrollHeight-d+20,b=Math.abs(h)>g,p=h>20,w=j.scrollHeight<=d):(h=f+(o===ne?r:-r),g=j.scrollWidth-m+20,b=Math.abs(h)>g,p=h>20,w=j.scrollWidth<=m),!w&&(o!==te&&o!==re||!b)&&(o!==ne&&o!==ie||!p)){a&&n.stopPropagation();var I={transition:"transform ".concat(c,"ms ease-out")};this.setState({thumbsTranslate:h,thumbsStyle:I})}}},{key:"handleOnThumbnailSwiped",value:function(){var e=this.state.thumbsTranslate,n=this.props.slideDuration;this.resetSwipingDirection(),this.setState({isSwipingThumbnail:!0,thumbsSwipedTranslate:e,thumbsStyle:{transition:"all ".concat(n,"ms ease-out")}})}},{key:"sufficientSwipe",value:function(){var e=this.state.currentSlideOffset,n=this.props.swipeThreshold;return Math.abs(e)>n}},{key:"resetSwipingDirection",value:function(){var e=this.state,n=e.swipingUpDown,r=e.swipingLeftRight;n&&this.setState({swipingUpDown:!1}),r&&this.setState({swipingLeftRight:!1})}},{key:"handleOnSwiped",value:function(e){var n=e.event,r=e.dir,i=e.velocity,o=this.props,s=o.disableSwipe,a=o.stopPropagation,c=o.flickThreshold,u=this.props.slideVertically;if(!s){var f=this.props.isRTL;a&&n.stopPropagation(),this.resetSwipingDirection();var d=(r===te?1:-1)*(f?-1:1);u&&(d=r===re?1:-1);var m=u?i>c&&!(r===te||r===ne):i>c&&!(r===re||r===ie);this.handleOnSwipedTo(d,m)}}},{key:"handleOnSwipedTo",value:function(e,n){var r=this.state,i=r.currentIndex,o=r.isTransitioning,s=i;!this.sufficientSwipe()&&!n||o||(s+=e),(e===-1&&!this.canSlideLeft()||e===1&&!this.canSlideRight())&&(s=i),this.unthrottledSlideToIndex(s)}},{key:"handleMouseDown",value:function(){this.imageGallery.current.classList.add("image-gallery-using-mouse")}},{key:"handleKeyDown",value:function(e){var n=this.props,r=n.disableKeyDown,i=n.useBrowserFullscreen,o=this.state.isFullscreen;if(this.imageGallery.current.classList.remove("image-gallery-using-mouse"),!r)switch(parseInt(e.keyCode||e.which||0,10)){case 37:this.canSlideLeft()&&!this.playPauseIntervalId&&this.slideLeft(e);break;case 39:this.canSlideRight()&&!this.playPauseIntervalId&&this.slideRight(e);break;case 27:o&&!i&&this.exitFullScreen()}}},{key:"handleImageError",value:function(e){var n=this.props.onErrorImageURL;n&&e.target.src.indexOf(n)===-1&&(e.target.src=n)}},{key:"removeThumbnailsResizeObserver",value:function(){this.resizeThumbnailWrapperObserver&&this.thumbnailsWrapper&&this.thumbnailsWrapper.current&&(this.resizeThumbnailWrapperObserver.unobserve(this.thumbnailsWrapper.current),this.resizeThumbnailWrapperObserver=null)}},{key:"removeResizeObserver",value:function(){this.resizeSlideWrapperObserver&&this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&(this.resizeSlideWrapperObserver.unobserve(this.imageGallerySlideWrapper.current),this.resizeSlideWrapperObserver=null),this.removeThumbnailsResizeObserver()}},{key:"handleResize",value:function(){var e=this.state.currentIndex;this.imageGallery&&(this.imageGallery&&this.imageGallery.current&&this.setState({galleryWidth:this.imageGallery.current.offsetWidth,galleryHeight:this.imageGallery.current.offsetHeight}),this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&this.setState({gallerySlideWrapperHeight:this.imageGallerySlideWrapper.current.offsetHeight}),this.setThumbsTranslate(-this.getThumbsTranslate(e)))}},{key:"initSlideWrapperResizeObserver",value:function(e){var n=this;e&&!e.current||(this.resizeSlideWrapperObserver=new An(Pt((function(r){r&&r.forEach((function(i){n.setState({thumbnailsWrapperWidth:i.contentRect.width},n.handleResize)}))}),50)),this.resizeSlideWrapperObserver.observe(e.current))}},{key:"initThumbnailWrapperResizeObserver",value:function(e){var n=this;e&&!e.current||(this.resizeThumbnailWrapperObserver=new An(Pt((function(r){r&&r.forEach((function(i){n.setState({thumbnailsWrapperHeight:i.contentRect.height},n.handleResize)}))}),50)),this.resizeThumbnailWrapperObserver.observe(e.current))}},{key:"toggleFullScreen",value:function(){this.state.isFullscreen?this.exitFullScreen():this.fullScreen()}},{key:"togglePlay",value:function(){this.playPauseIntervalId?this.pause():this.play()}},{key:"handleScreenChange",value:function(){var e=this.props,n=e.onScreenChange,r=e.useBrowserFullscreen,i=document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,o=this.imageGallery.current===i;n&&n(o),r&&this.setState({isFullscreen:o})}},{key:"slideToIndex",value:function(e,n){var r=this.state,i=r.currentIndex,o=r.isTransitioning,s=this.props,a=s.items,c=s.slideDuration,u=s.onBeforeSlide;if(!o){n&&this.playPauseIntervalId&&(this.pause(!1),this.play(!1));var f=a.length-1,d=e;e<0?d=f:e>f&&(d=0),u&&d!==i&&u(d),this.setState({previousIndex:i,currentIndex:d,isTransitioning:d!==i,currentSlideOffset:0,slideStyle:{transition:"all ".concat(c,"ms ease-out")}},this.onSliding)}}},{key:"slideLeft",value:function(e){var n=this.props.isRTL;this.slideTo(e,n?"right":"left")}},{key:"slideRight",value:function(e){var n=this.props.isRTL;this.slideTo(e,n?"left":"right")}},{key:"slideTo",value:function(e,n){var r=this.state,i=r.currentIndex,o=r.isTransitioning,s=this.props.items,a=i+(n==="left"?-1:1);o||(s.length===2?this.slideToIndexWithStyleReset(a,e):this.slideToIndex(a,e))}},{key:"slideToIndexWithStyleReset",value:function(e,n){var r=this,i=this.state,o=i.currentIndex,s=i.currentSlideOffset;this.setState({currentSlideOffset:s+(o>e?.001:-.001),slideStyle:{transition:"none"}},(function(){window.setTimeout((function(){return r.slideToIndex(e,n)}),25)}))}},{key:"handleThumbnailMouseOver",value:function(e,n){this.props.slideOnThumbnailOver&&this.onThumbnailMouseOver(e,n)}},{key:"handleThumbnailKeyUp",value:function(e,n){er(e)&&this.onThumbnailClick(e,n)}},{key:"handleSlideKeyUp",value:function(e){er(e)&&(0,this.props.onClick)(e)}},{key:"isThumbnailVertical",value:function(){var e=this.props.thumbnailPosition;return e==="left"||e==="right"}},{key:"addScreenChangeEvent",value:function(){var e=this;Zn.forEach((function(n){document.addEventListener(n,e.handleScreenChange)}))}},{key:"removeScreenChangeEvent",value:function(){var e=this;Zn.forEach((function(n){document.removeEventListener(n,e.handleScreenChange)}))}},{key:"fullScreen",value:function(){var e=this.props.useBrowserFullscreen,n=this.imageGallery.current;e?n.requestFullscreen?n.requestFullscreen():n.msRequestFullscreen?n.msRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():this.setModalFullscreen(!0):this.setModalFullscreen(!0),this.setState({isFullscreen:!0})}},{key:"exitFullScreen",value:function(){var e=this.state.isFullscreen,n=this.props.useBrowserFullscreen;e&&(n?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this.setModalFullscreen(!1):this.setModalFullscreen(!1),this.setState({isFullscreen:!1}))}},{key:"pauseOrPlay",value:function(){var e=this.props.infinite,n=this.state.currentIndex;e||this.canSlideRight()?this.slideToIndex(n+1):this.pause()}},{key:"play",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=this.props,r=n.onPlay,i=n.slideInterval,o=n.slideDuration,s=this.state.currentIndex;this.playPauseIntervalId||(this.setState({isPlaying:!0}),this.playPauseIntervalId=window.setInterval(this.pauseOrPlay,Math.max(i,o)),r&&e&&r(s))}},{key:"pause",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=this.props.onPause,r=this.state.currentIndex;this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null,this.setState({isPlaying:!1}),n&&e&&n(r))}},{key:"isImageLoaded",value:function(e){return!!this.loadedImages[e.original]||(this.loadedImages[e.original]=!0,!1)}},{key:"handleImageLoaded",value:function(e,n){var r=this.props.onImageLoad;!this.loadedImages[n]&&r&&(this.loadedImages[n]=!0,r(e))}},{key:"renderItem",value:function(e){var n=this.state.isFullscreen,r=this.props.onImageError||this.handleImageError;return k.default.createElement(ra,{description:e.description,fullscreen:e.fullscreen,handleImageLoaded:this.handleImageLoaded,isFullscreen:n,onImageError:r,original:e.original,originalAlt:e.originalAlt,originalHeight:e.originalHeight,originalWidth:e.originalWidth,originalTitle:e.originalTitle,sizes:e.sizes,loading:e.loading,srcSet:e.srcSet})}},{key:"renderThumbInner",value:function(e){var n=this.props.onThumbnailError||this.handleImageError;return k.default.createElement("span",{className:"image-gallery-thumbnail-inner"},k.default.createElement("img",{className:"image-gallery-thumbnail-image",src:e.thumbnail,height:e.thumbnailHeight,width:e.thumbnailWidth,alt:e.thumbnailAlt,title:e.thumbnailTitle,loading:e.thumbnailLoading,onError:n}),e.thumbnailLabel&&k.default.createElement("div",{className:"image-gallery-thumbnail-label"},e.thumbnailLabel))}},{key:"render",value:function(){var e=this.state,n=e.currentIndex,r=e.isFullscreen,i=e.modalFullscreen,o=e.isPlaying,s=this.props,a=s.additionalClass,c=s.disableThumbnailSwipe,u=s.indexSeparator,f=s.isRTL,d=s.items,m=s.thumbnailPosition,x=s.renderFullscreenButton,v=s.renderCustomControls,h=s.renderLeftNav,g=s.renderRightNav,b=s.renderTopNav,p=s.renderBottomNav,w=s.showBullets,j=s.showFullscreenButton,I=s.showIndex,O=s.showThumbnails,P=s.showNav,_=s.showPlayButton,L=s.slideVertically,E=s.renderPlayPauseButton,A=this.getThumbnailStyle(),W=this.getSlideItems(),V=W.slides,N=W.thumbnails,K=W.bullets,S=ce("image-gallery-slide-wrapper",this.getThumbnailPositionClassName(m),{"image-gallery-rtl":f}),D=ce("image-gallery-bullets",{"image-gallery-bullets-vertical":L}),Q=k.default.createElement("div",{ref:this.imageGallerySlideWrapper,className:S},v&&v(),this.canSlide()?k.default.createElement(k.default.Fragment,null,P&&k.default.createElement(k.default.Fragment,null,L?b(this.slideLeft,!this.canSlideLeft()):h(this.slideLeft,!this.canSlideLeft()),L?p(this.slideRight,!this.canSlideRight()):g(this.slideRight,!this.canSlideRight())),k.default.createElement(Xn,{className:"image-gallery-swipe",delta:0,onSwiping:this.handleSwiping,onSwiped:this.handleOnSwiped},k.default.createElement("div",{className:"image-gallery-slides"},V))):k.default.createElement("div",{className:"image-gallery-slides"},V),_&&E(this.togglePlay,o),w&&k.default.createElement("div",{className:D},k.default.createElement("div",{className:"image-gallery-bullets-container",role:"navigation","aria-label":"Bullet Navigation"},K)),j&&x(this.toggleFullScreen,r),I&&k.default.createElement("div",{className:"image-gallery-index"},k.default.createElement("span",{className:"image-gallery-index-current"},n+1),k.default.createElement("span",{className:"image-gallery-index-separator"},u),k.default.createElement("span",{className:"image-gallery-index-total"},d.length))),B=ce("image-gallery",a,{"fullscreen-modal":i}),X=ce("image-gallery-content",this.getThumbnailPositionClassName(m),{fullscreen:r}),Z=ce("image-gallery-thumbnails-wrapper",this.getThumbnailPositionClassName(m),{"thumbnails-wrapper-rtl":!this.isThumbnailVertical()&&f},{"thumbnails-swipe-horizontal":!this.isThumbnailVertical()&&!c},{"thumbnails-swipe-vertical":this.isThumbnailVertical()&&!c});return k.default.createElement("div",{ref:this.imageGallery,className:B,"aria-live":"polite"},k.default.createElement("div",{className:X},(m==="bottom"||m==="right")&&Q,O&&N.length>0?k.default.createElement(Xn,{className:Z,delta:0,onSwiping:!c&&this.handleThumbnailSwiping,onSwiped:!c&&this.handleOnThumbnailSwiped},k.default.createElement("div",{className:"image-gallery-thumbnails",ref:this.thumbnailsWrapper,style:this.getThumbnailBarHeight()},k.default.createElement("nav",{ref:this.thumbnails,className:"image-gallery-thumbnails-container",style:A,"aria-label":"Thumbnail Navigation"},N))):null,(m==="top"||m==="left")&&Q))}}])})();$t.propTypes={flickThreshold:y.number,items:(0,y.arrayOf)((0,y.shape)({bulletClass:y.string,bulletOnClick:y.func,description:y.string,original:y.string,originalHeight:y.number,originalWidth:y.number,loading:y.string,thumbnailHeight:y.number,thumbnailWidth:y.number,thumbnailLoading:y.string,fullscreen:y.string,originalAlt:y.string,originalTitle:y.string,thumbnail:y.string,thumbnailAlt:y.string,thumbnailLabel:y.string,thumbnailTitle:y.string,originalClass:y.string,thumbnailClass:y.string,renderItem:y.func,renderThumbInner:y.func,imageSet:ga,srcSet:y.string,sizes:y.string})).isRequired,showNav:y.bool,autoPlay:y.bool,lazyLoad:y.bool,infinite:y.bool,showIndex:y.bool,showBullets:y.bool,showThumbnails:y.bool,showPlayButton:y.bool,showFullscreenButton:y.bool,disableThumbnailScroll:y.bool,disableKeyDown:y.bool,disableSwipe:y.bool,disableThumbnailSwipe:y.bool,useBrowserFullscreen:y.bool,onErrorImageURL:y.string,indexSeparator:y.string,thumbnailPosition:(0,y.oneOf)(["top","bottom","left","right"]),startIndex:y.number,slideDuration:y.number,slideInterval:y.number,slideOnThumbnailOver:y.bool,swipeThreshold:y.number,swipingTransitionDuration:y.number,swipingThumbnailTransitionDuration:y.number,onSlide:y.func,onBeforeSlide:y.func,onScreenChange:y.func,onPause:y.func,onPlay:y.func,onClick:y.func,onImageLoad:y.func,onImageError:y.func,onTouchMove:y.func,onTouchEnd:y.func,onTouchStart:y.func,onMouseOver:y.func,onMouseLeave:y.func,onBulletClick:y.func,onThumbnailError:y.func,onThumbnailClick:y.func,renderCustomControls:y.func,renderLeftNav:y.func,renderRightNav:y.func,renderTopNav:y.func,renderBottomNav:y.func,renderPlayPauseButton:y.func,renderFullscreenButton:y.func,renderItem:y.func,renderThumbInner:y.func,stopPropagation:y.bool,additionalClass:y.string,useTranslate3D:y.bool,isRTL:y.bool,useWindowKeyDown:y.bool,slideVertically:y.bool},$t.defaultProps={onErrorImageURL:"",additionalClass:"",showNav:!0,autoPlay:!1,lazyLoad:!1,infinite:!0,showIndex:!1,showBullets:!1,showThumbnails:!0,showPlayButton:!0,showFullscreenButton:!0,disableThumbnailScroll:!1,disableKeyDown:!1,disableSwipe:!1,disableThumbnailSwipe:!1,useTranslate3D:!0,isRTL:!1,useBrowserFullscreen:!0,flickThreshold:.4,stopPropagation:!1,indexSeparator:" / ",thumbnailPosition:"bottom",startIndex:0,slideDuration:450,swipingTransitionDuration:0,swipingThumbnailTransitionDuration:0,onSlide:null,onBeforeSlide:null,onScreenChange:null,onPause:null,onPlay:null,onClick:null,onImageLoad:null,onImageError:null,onTouchMove:null,onTouchEnd:null,onTouchStart:null,onMouseOver:null,onMouseLeave:null,onBulletClick:null,onThumbnailError:null,onThumbnailClick:null,renderCustomControls:null,renderThumbInner:null,renderItem:null,slideInterval:3e3,slideOnThumbnailOver:!1,swipeThreshold:30,slideVertically:!1,renderLeftNav:function(t,e){return k.default.createElement(la,{onClick:t,disabled:e})},renderRightNav:function(t,e){return k.default.createElement(ca,{onClick:t,disabled:e})},renderTopNav:function(t,e){return k.default.createElement(ha,{onClick:t,disabled:e})},renderBottomNav:function(t,e){return k.default.createElement(pa,{onClick:t,disabled:e})},renderPlayPauseButton:function(t,e){return k.default.createElement(ua,{onClick:t,isPlaying:e})},renderFullscreenButton:function(t,e){return k.default.createElement(aa,{onClick:t,isFullscreen:e})},useWindowKeyDown:!0};const ya=$t;var ba=$r.A;function va(){var t=new Map;function e(n){var r=n.root,i=n.rootMargin,o=n.threshold,s=t.get(r);s||(s=new Map,t.set(r,s));var a=JSON.stringify({rootMargin:i,threshold:o}),c=s.get(a);if(!c){var u=new Map,f=new IntersectionObserver(function(d){d.forEach(function(m){var x=u.get(m.target);x?.(m)})},{root:r,rootMargin:i,threshold:o});c={observer:f,entryCallbacks:u},s.set(a,c)}return{observe:function(m,x){var v,h;(v=c)==null||v.entryCallbacks.set(m,x),(h=c)==null||h.observer.observe(m)},unobserve:function(m){var x,v;(x=c)==null||x.entryCallbacks.delete(m),(v=c)==null||v.observer.unobserve(m)}}}return{getObserver:e}}var xa="0px",wa=[0],Sa=va();function ka(t){var e,n,r=(e=t?.rootMargin)!=null?e:xa,i=(n=t?.threshold)!=null?n:wa,o=T.useRef(null),s=T.useRef(null),a=T.useRef(null),c=T.useState(),u=c[0],f=c[1],d=T.useCallback(function(){var h=o.current;if(!h){f(void 0);return}var g=Sa.getObserver({root:s.current,rootMargin:r,threshold:i});g.observe(h,function(b){f(b)}),a.current=g},[r,i]),m=T.useCallback(function(){var h=a.current,g=o.current;g&&h?.unobserve(g),a.current=null},[]),x=T.useCallback(function(h){m(),o.current=h,d()},[d,m]),v=T.useCallback(function(h){m(),s.current=h,d()},[d,m]);return[x,{entry:u,rootRef:v}]}function Kt(){return Kt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Kt.apply(this,arguments)}function ja(t){var e,n=ka(t),r=n[0],i=n[1],o=!!((e=i.entry)!=null&&e.isIntersecting),s=T.useState(o),a=s[0],c=s[1];return o&&!a&&c(!0),[r,Kt({},i,{isVisible:o,wasEverVisible:a})]}var Ta=100;function Oa(t){var e=t.loading,n=t.hasNextPage,r=t.onLoadMore,i=t.rootMargin,o=t.disabled,s=t.delayInMs,a=s===void 0?Ta:s,c=ja({rootMargin:i}),u=c[0],f=c[1],d=f.rootRef,m=f.isVisible,x=!o&&!e&&m&&n;return T.useEffect(function(){if(x){var v=setTimeout(function(){r()},a);return function(){clearTimeout(v)}}},[r,x,a]),[u,{rootRef:d}]}const Ca={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>'},Ea={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M18.333 2c1.96 0 3.56 1.537 3.662 3.472l.005.195v12.666c0 1.96-1.537 3.56-3.472 3.662l-.195.005H5.667a3.667 3.667 0 0 1-3.662-3.472L2 18.333V5.667c0-1.96 1.537-3.56 3.472-3.662L5.667 2h12.666zm-2.626 7.293a1 1 0 0 0-1.414 0L11 12.585l-1.293-1.292l-.094-.083a1 1 0 0 0-1.32 1.497l2 2l.094.083a1 1 0 0 0 1.32-.083l4-4l.083-.094a1 1 0 0 0-.083-1.32z"/></g>'},Ia={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12"/>'};var dt=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function ft(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent("on".concat(e),function(){n(window.event)})}function Zr(t,e){for(var n=e.slice(0,e.length-1),r=0;r<n.length;r++)n[r]=t[n[r].toLowerCase()];return n}function ei(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");for(var e=t.split(","),n=e.lastIndexOf("");n>=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function Ra(t,e){for(var n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,i=!0,o=0;o<n.length;o++)r.indexOf(n[o])===-1&&(i=!1);return i}var ln={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":dt?173:189,"=":dt?61:187,";":dt?59:186,"'":222,"[":219,"]":221,"\\":220},le={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Ut={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},$={16:!1,18:!1,17:!1,91:!1},F={};for(var Fe=1;Fe<20;Fe++)ln["f".concat(Fe)]=111+Fe;var z=[],tr=!1,ti="all",ni=[],rt=function(e){return ln[e.toLowerCase()]||le[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function ri(t){ti=t||"all"}function _e(){return ti||"all"}function Pa(){return z.slice(0)}function Ma(t){var e=t.target||t.srcElement,n=e.tagName,r=!0;return(e.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function _a(t){return typeof t=="string"&&(t=rt(t)),z.indexOf(t)!==-1}function La(t,e){var n,r;t||(t=_e());for(var i in F)if(Object.prototype.hasOwnProperty.call(F,i))for(n=F[i],r=0;r<n.length;)n[r].scope===t?n.splice(r,1):r++;_e()===t&&ri(e||"all")}function Da(t){var e=t.keyCode||t.which||t.charCode,n=z.indexOf(e);if(n>=0&&z.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&z.splice(0,z.length),(e===93||e===224)&&(e=91),e in $){$[e]=!1;for(var r in le)le[r]===e&&(G[r]=!1)}}function za(t){if(typeof t>"u")Object.keys(F).forEach(function(s){return delete F[s]});else if(Array.isArray(t))t.forEach(function(s){s.key&&ht(s)});else if(typeof t=="object")t.key&&ht(t);else if(typeof t=="string"){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=n[0],o=n[1];typeof i=="function"&&(o=i,i=""),ht({key:t,scope:i,method:o,splitKey:"+"})}}var ht=function(e){var n=e.key,r=e.scope,i=e.method,o=e.splitKey,s=o===void 0?"+":o,a=ei(n);a.forEach(function(c){var u=c.split(s),f=u.length,d=u[f-1],m=d==="*"?"*":rt(d);if(F[m]){r||(r=_e());var x=f>1?Zr(le,u):[];F[m]=F[m].filter(function(v){var h=i?v.method===i:!0;return!(h&&v.scope===r&&Ra(v.mods,x))})}})};function nr(t,e,n,r){if(e.element===r){var i;if(e.scope===n||e.scope==="all"){i=e.mods.length>0;for(var o in $)Object.prototype.hasOwnProperty.call($,o)&&(!$[o]&&e.mods.indexOf(+o)>-1||$[o]&&e.mods.indexOf(+o)===-1)&&(i=!1);(e.mods.length===0&&!$[16]&&!$[18]&&!$[17]&&!$[91]||i||e.shortcut==="*")&&e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}}function rr(t,e){var n=F["*"],r=t.keyCode||t.which||t.charCode;if(G.filter.call(this,t)){if((r===93||r===224)&&(r=91),z.indexOf(r)===-1&&r!==229&&z.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(v){var h=Ut[v];t[v]&&z.indexOf(h)===-1?z.push(h):!t[v]&&z.indexOf(h)>-1?z.splice(z.indexOf(h),1):v==="metaKey"&&t[v]&&z.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(z=z.slice(z.indexOf(h))))}),r in $){$[r]=!0;for(var i in le)le[i]===r&&(G[i]=!0);if(!n)return}for(var o in $)Object.prototype.hasOwnProperty.call($,o)&&($[o]=t[Ut[o]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(z.indexOf(17)===-1&&z.push(17),z.indexOf(18)===-1&&z.push(18),$[17]=!0,$[18]=!0);var s=_e();if(n)for(var a=0;a<n.length;a++)n[a].scope===s&&(t.type==="keydown"&&n[a].keydown||t.type==="keyup"&&n[a].keyup)&&nr(t,n[a],s,e);if(r in F){for(var c=0;c<F[r].length;c++)if((t.type==="keydown"&&F[r][c].keydown||t.type==="keyup"&&F[r][c].keyup)&&F[r][c].key){for(var u=F[r][c],f=u.splitKey,d=u.key.split(f),m=[],x=0;x<d.length;x++)m.push(rt(d[x]));m.sort().join("")===z.sort().join("")&&nr(t,u,s,e)}}}}function Fa(t){return ni.indexOf(t)>-1}function G(t,e,n){z=[];var r=ei(t),i=[],o="all",s=document,a=0,c=!1,u=!0,f="+",d=!1;for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(s=e.element),e.keyup&&(c=e.keyup),e.keydown!==void 0&&(u=e.keydown),e.capture!==void 0&&(d=e.capture),typeof e.splitKey=="string"&&(f=e.splitKey)),typeof e=="string"&&(o=e);a<r.length;a++)t=r[a].split(f),i=[],t.length>1&&(i=Zr(le,t)),t=t[t.length-1],t=t==="*"?"*":rt(t),t in F||(F[t]=[]),F[t].push({keyup:c,keydown:u,scope:o,mods:i,shortcut:r[a],method:n,key:r[a],splitKey:f,element:s});typeof s<"u"&&!Fa(s)&&window&&(ni.push(s),ft(s,"keydown",function(m){rr(m,s)},d),tr||(tr=!0,ft(window,"focus",function(){z=[]},d)),ft(s,"keyup",function(m){rr(m,s),Da(m)},d))}function Wa(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(F).forEach(function(n){var r=F[n].find(function(i){return i.scope===e&&i.shortcut===t});r&&r.method&&r.method()})}var pt={setScope:ri,getScope:_e,deleteScope:La,getPressedKeyCodes:Pa,isPressed:_a,filter:Ma,trigger:Wa,unbind:za,keyMap:ln,modifier:le,modifierMap:Ut};for(var mt in pt)Object.prototype.hasOwnProperty.call(pt,mt)&&(G[mt]=pt[mt]);if(typeof window<"u"){var Na=window.hotkeys;G.noConflict=function(t){return t&&window.hotkeys===G&&(window.hotkeys=Na),G},window.hotkeys=G}G.filter=function(){return!0};var ii=function(e,n){var r=e.target,i=r&&r.tagName;return!!(i&&n&&n.includes(i))},Aa=function(e){return ii(e,["INPUT","TEXTAREA","SELECT"])};function Ba(t,e,n,r){n instanceof Array&&(r=n,n=void 0);var i=n||{},o=i.enableOnTags,s=i.filter,a=i.keyup,c=i.keydown,u=i.filterPreventDefault,f=u===void 0?!0:u,d=i.enabled,m=d===void 0?!0:d,x=i.enableOnContentEditable,v=x===void 0?!1:x,h=T.useRef(null),g=T.useCallback(function(b,p){var w,j;return s&&!s(b)?!f:Aa(b)&&!ii(b,o)||(w=b.target)!=null&&w.isContentEditable&&!v?!0:h.current===null||document.activeElement===h.current||(j=h.current)!=null&&j.contains(document.activeElement)?(e(b,p),!0):!1},r?[h,o,s].concat(r):[h,o,s]);return T.useEffect(function(){if(!m){G.unbind(t,g);return}return a&&c!==!0&&(n.keydown=!1),G(t,n||{},g),function(){return G.unbind(t,g)}},[g,t,m]),h}G.isPressed;const oi=T.createContext({open:!1,toggleOpen:t=>{}});function $a({children:t}){const[e,n]=T.useState(!1),r=o=>{n(o??!o)},i=T.useMemo(()=>({open:e,toggleOpen:r}),[e]);return l.jsx(oi.Provider,{value:i,children:t})}function cn(){return T.useContext(oi)}const J={nameAsc:"title",nameDesc:"title",popularity:"stats.downloads",publishAt:"lastPublishedAt",mobilePageSize:10,pageSize:18,currentPage:1,defaultCurrentPage:1,blockletsPath:"/api/v2/blocklets.json",categoriesPath:"/api/blocklets/categories",explorePath:"/api/blocklets/explore",exploreDidsPath:"/api/blocklets/dids",cacheSize:100},Ka=t=>et(async()=>{const{data:e}=await t.get(J.categoriesPath);return Array.isArray(e)?e:[]},{manual:!0});function Ua(t,e){const n=t.menu?{sortBy:"popularity",sortDirection:"desc",showResources:"true",...Si(t,["sortBy","sortDirection","showResources"])}:{sortBy:"popularity",sortDirection:"desc",showResources:"true",...t,menu:void 0},{onFilterChange:r,onSearchSelect:i=a=>{e.onFilterChange({...n,keyword:a.title})},emptyCategory:o}=e;!n.category&&!o&&(n.category="All");const s=a=>{const c={...n,...a};r(it(c,u=>u===""||u===void 0))};return{filters:t,cleanFilter:a=>{const c=a?it(n,(u,f)=>a.includes(f)):{};r(it(c,u=>u===""||u===void 0))},handleActiveMenu:a=>{a!==t.menu&&r({menu:a})},handleSort:(a,c)=>{s({sortBy:a,sortDirection:c||a==="nameAsc"?"asc":"desc"})},handleKeyword:a=>{s({category:void 0,keyword:a||void 0})},handlePrice:a=>{s({price:a===t.price?void 0:a})},handleCategory:a=>{s({category:a===t.category?"":a})},handleDeveloper:a=>{s({owner:a||void 0})},handlePage:a=>{s({currentPage:a})},handleSwitchIsOfficial:a=>{s({isOfficial:a==="true"?"true":""})},handleSwitchShowResources:a=>{s({showResources:a})},handleSearchSelect:a=>{i(a)}}}const Va=(t,e,n)=>t&&e||!n,si=t=>[{name:t("sort.popularity"),value:"popularity"},{name:t("sort.lastPublished"),value:"publishAt"}],ai=(t,e,n)=>{const r=Ei(t),i=Ii(r.search);if(Ri(t)?.endsWith(".gif"))return i.imageFilter?Pi({...r,search:""}):t;if(i.imageFilter)return t;const o=n||window.blocklet?.version,{w:s,h:a}=typeof e=="object"?{w:e.w,h:e.h}:{w:e,h:e};return Yt(t,{...s||a?{imageFilter:"resize",w:s,h:a}:{},v:o})},Ha=t=>[{name:t("blocklet.free"),value:"free"},{name:t("blocklet.payment"),value:"payment"}],qa=(t=[],e="en")=>t.map(n=>({name:n.locales[e]||n.locales.en,value:n._id})),Ga=t=>Array.isArray(t)?t.map(e=>e.message).join(`
2
- `):t.response?.data?.error?t.response.data.error.message||t.response.data.error:t.message||t,Qa=(t,e)=>t?.replace(/{(\w*)}/g,(n,r)=>e.hasOwnProperty(r)?e[r]:""),Xa=()=>window.innerWidth<=600,Ya={common:{title:"Blocklet Store",searchStore:"Search Blocklet",showResources:"Show extensions",official:"Official Blocklets",price:"Price",category:"Category",categories:"Categories",resourceType:"Resource Type",clear:"Clear",cancel:"Cancel",search:"Search",fetchError:"Failed to fetch data, please try again later",searchPlaceholder:"Search blocklet"},explore:{title:"Explore",trending:"Trending",topRated:"Top Rated",recentlyUpdated:"Recently Updated",viewDetail:"View Details"},sort:{sort:"Sort",rating:"Rating",popularity:"Most Popular",lastPublished:"Latest Published"},category:{all:"All",placeholder:"Category name",helperText:"Please select a category"},blocklet:{noResults:"No blocklet found.",free:"Free",search:'Results for "{keyword}"',authorTag:"Blocklet by {name}",resourceTag:"Extensions for {name}",resultCount:"{count} Blocklets",emptyTip:"Tips:",filterTip:"Appropriately reduce the filter conditions",keywordTip:"Try other keywords",owner:"Blocklets from {name}",noBlockletPart1:'No Blocklets associated with"',noBlockletPart2:'"were found',noCategoryResults1:'No "',noCategoryResults2:'" Blocklets'},autocomplete:{expandResult:'View all search results for "{name}"'}},Ja={common:{title:"Blocklet 商店",searchStore:"搜索 Blocklet",showResources:"显示扩展",official:"官方 Blocklet",price:"价格",category:"类别",categories:"类别",resourceType:"资源类型",clear:"清除",cancel:"取消",search:"搜索",fetchError:"获取数据失败, 请稍后再试",searchPlaceholder:"搜索 Blocklet"},explore:{title:"探索",trending:"趋势",topRated:"评分最高",recentlyUpdated:"最近更新",viewDetail:"查看详情"},sort:{sort:"排序",rating:"评分",popularity:"最热门",lastPublished:"最新发布"},category:{all:"全部",placeholder:"分类名称",helperText:"请选择分类"},blocklet:{noResults:"未搜索到 Blocklet",free:"免费",search:'搜索 "{keyword}" 的结果',authorTag:"{name} 的 Blocklet",resourceTag:"{name} 的拓展",resultCount:"{count} 个 Blocklet",emptyTip:"建议:",filterTip:"适当减少筛选条件",keywordTip:"尝试其他关键字",owner:"来自 {name} 的 Blocklets",noBlockletPart1:'没有找到与"',noBlockletPart2:'"相关的 Blocklets',noCategoryResults1:'无 "',noCategoryResults2:'" 类别的 Blocklets'},autocomplete:{expandResult:"查看 “{name}” 的所有搜索结果"}},gt={en:hn(Ya),zh:hn(Ja)},li=(t,e)=>{const n={};return t&&(n["x-blocklet-server-version"]=t),e&&(n["x-blocklet-store-version"]=e),n},Za=t=>(e,n)=>{const r=gt[t]?gt[t][e]:gt.en[e];return Qa(r,n)||e},ci={errors:{fetchCategoriesError:null},loadings:{fetchCategoriesLoading:!1},compact:!1,endpoint:"",wrapChildren:()=>null,t:t=>t,storeVersion:"",minItemWidth:350,serverVersion:"",layout:{},selectedCategory:void 0,categoryList:[],blockletRender:()=>null,locale:"en",categoryOptions:[],priceOptions:[],storeApi:null,baseSearch:!1,showResourcesSwitch:!1,showCategory:!1,tagFilters:[],developerName:"",onFilterChange:()=>{},updateDeveloperName:()=>{},getCategoryLocale:()=>null,search:{filters:{},cleanFilter:()=>{},handleActiveMenu:()=>{},handleSort:()=>{},handleKeyword:()=>{},handlePrice:()=>{},handleCategory:()=>{},handleDeveloper:()=>{},handleSwitchShowResources:()=>{},handleSwitchIsOfficial:()=>{},handleSearchSelect:()=>{},handlePage:()=>{}}},ui=T.createContext(ci),{Provider:el,Consumer:nc}=ui;function tl(t){const{locale:e="zh",filters:n={},serverVersion:r="",onFilterChange:i=()=>{},minItemWidth:o=350,queryFilter:s=!0,layout:a={},wrapChildren:c=B=>B,extraFilter:u=B=>B,baseSearch:f=!1,fetchCategoryDelay:d=0,showResourcesSwitch:m=!1,showCategory:x=!0,tagFilters:v=[],children:h,storeVersion:g,onSearchSelect:b=()=>{},endpoint:p,blockletRender:w,compact:j=!1}=t,I=li(r,g),O=T.useMemo(()=>dr({baseURL:p,headers:I}),[p]),P=Ua(n,{onFilterChange:i,emptyCategory:!a.showExplore,onSearchSelect:b}),[_,L]=T.useState(""),{data:E=[],error:A,loading:W,run:V}=Ka(O),N=T.useMemo(()=>{const B=uo(E,[Z=>Z.name],["asc"]),X=B.findIndex(Z=>Z.name==="All"||Z.locales.en==="All");return X>-1?[{...B[X],_id:"All"},...B.slice(0,X),...B.slice(X+1)]:B},[E]),K=T.useCallback(Za(e),[e]),S=T.useMemo(()=>qa(N,e),[N,e]),D=Ha(K),Q={search:P,compact:j,errors:{fetchCategoriesError:A},loadings:{fetchCategoriesLoading:W},extraFilter:u,endpoint:p,queryFilter:s,layout:{showExplore:a.showExplore??!1,showCategory:a.showCategory??!0,showTitle:a.showTitle??!0,showSearch:a.showSearch??!0},minItemWidth:o,wrapChildren:c,t:K,storeVersion:g,serverVersion:r,selectedCategory:P.filters.category||(a.showExplore?"":"All"),categoryList:N,blockletRender:w,locale:e,categoryOptions:S,priceOptions:D,storeApi:O,baseSearch:f,showResourcesSwitch:m,showCategory:x,tagFilters:v,onFilterChange:i,getCategoryLocale:B=>{if(!B)return null;const X=E.find(Z=>Z._id===B||Z.locales.en==="All");return X?X.locales[e]||X.locales.en:null},get developerName(){return _},updateDeveloperName:L};return T.useEffect(()=>{setTimeout(V,d||0)},[p,V,d]),l.jsx(el,{value:Q,children:h})}function q(){return T.useContext(ui)||ci}function di({children:t,onClick:e,size:n=32,...r}){return l.jsx(Y,{...r,onClick:e,variant:"outlined",sx:[{minWidth:n,height:n,p:0,borderColor:"divider","&:hover":{borderColor:"divider"},borderRadius:2,color:"text.secondary"},...Array.isArray(r.sx)?r.sx:[r.sx]],children:t})}function We(t,e){return t===void 0?e:t}function un({xs:t=void 0,sm:e=void 0,md:n=void 0,lg:r=void 0,xl:i=void 0,exact:o=!1}){const s=fe(),a=ye(s.breakpoints.down("sm")),c=ye(s.breakpoints.between("sm","md")),u=ye(s.breakpoints.between("md","lg")),f=ye(s.breakpoints.between("lg","xl"));if(o)return a?t||null:c?e||null:u?n||null:f?r||null:i||null;let d=t;return a||(d=We(e,d),c)||(d=We(n,d),u)||(d=We(r,d),f)?d:We(i,d)}function nl({children:t}){const{open:e,toggleOpen:n}=cn();return l.jsx(un,{xs:l.jsx(Oi,{open:e,onClose:()=>n(!1),children:t}),md:l.jsx(R,{children:t})})}function rl({loading:t=!1,disabled:e,...n}){return l.jsx(Y,{disableElevation:!0,disabled:e||t===!0,...n,sx:[{borderRadius:"4px"},...Array.isArray(n.sx)?n.sx:[n.sx]],startIcon:t&&l.jsx(ee,{size:"1em"})})}function Vt({value:t,options:e,onChange:n,placeholder:r="",...i}){const o=T.useRef(null),s=fe(),[a,c]=T.useState(!1),[u,f]=T.useState(t!==null?t:""),d=ye(s.breakpoints.down("sm"));T.useEffect(()=>{f(t!==null?t:"")},[t]);const m=T.useCallback(()=>{c(!1)},[]),x=T.useCallback(()=>{c(!0)},[]);function v(g){f(g.value),n(g.value),d&&m()}function h(g){return g===u}return l.jsxs(l.Fragment,{children:[l.jsxs(il,{ref:o,onClick:x,variant:"outlined",size:"medium",className:["my-select__selector",_i(u)?"":"my-select__selector--active"].join(" "),sx:{minWidth:{xs:"100px",md:"auto"},color:"text.primary",borderRadius:"8px"},...i,children:[e.find(g=>g.value===u)?.name||r,l.jsx(Mi,{className:"my-select__arrowdown",component:oo,sx:{width:18,height:18}})]}),l.jsx(Li,{open:a,anchorEl:o.current,transition:!0,sx:{zIndex:"9999"},children:({TransitionProps:g,placement:b})=>l.jsx(Di,{...g,style:{transformOrigin:b==="bottom"?"center top":"center bottom"},children:l.jsx(zi,{children:l.jsx(Fi,{onClickAway:m,children:l.jsx(ol,{autoFocusItem:a,onMouseEnter:x,onMouseLeave:m,children:e.map(p=>l.jsxs(Ue,{onClick:()=>v(p),sx:{fontSize:14},children:[l.jsx(Wi,{sx:{mr:1,fontSize:16,visibility:h(p.value)?"visible":"hidden"}}),p.name]},p.value))})})})})})]})}const il=he(rl)`
3
- border: 1px solid ${t=>t.theme.palette.divider};
4
- padding: 6px 8px 6px 12px;
5
- font-weight: ${t=>t.theme.typography.fontWeightRegular};
6
- font-size: 14px;
7
- color: ${t=>t.theme.palette.text.secondary};
8
- line-height: 1;
9
- text-transform: none;
10
- & + & {
11
- margin-left: 10px;
12
- }
13
- .my-select__arrowdown {
14
- color: ${t=>t.theme.palette.grey[400]};
15
- font-size: 14px;
16
- margin-left: 6px;
17
- }
18
- .my-select__icon {
19
- font-size: 0;
20
- svg {
21
- color: ${t=>t.theme.palette.grey[400]};
22
- font-size: 18px;
23
- margin-right: 3px;
24
- }
25
- }
26
- `,ol=he(mr)`
27
- .my-select__option__icon {
28
- color: transparent;
29
- font-size: 14px;
30
- margin: 0 3px 0 -5px;
31
- }
32
- .my-select__option {
33
- font-size: 14px;
34
- color: #999;
35
- }
36
- .my-select__option--active {
37
- &,
38
- .my-select__option__icon {
39
- color: ${t=>t.theme.palette.primary.main};
40
- }
41
- }
42
- `;function fi(){const{search:t,t:e}=q(),{filters:n,handleSort:r,handlePrice:i}=t,o=si(e);return l.jsxs(H,{direction:{xs:"row",md:"column"},sx:{alignItems:{xs:"center",md:"flex-start"},gap:{xs:1,md:2},width:{xs:"100%",md:"auto"},justifyContent:"space-between"},children:[l.jsx(yr,{control:l.jsx(br,{checked:n.price==="free",size:"small",sx:{"& .MuiSvgIcon-fontSizeSmall":{fontSize:16,color:"text.hint"}},onChange:s=>i(s.target.checked?"free":"")}),label:e("blocklet.free")}),l.jsx(Vt,{value:n.sortBy||o[0].value,options:o,onChange:s=>r(s),placeholder:e("sort.sort")})]})}function sl({menus:t=[]}){const{selectedCategory:e,search:n,t:r,categoryOptions:i,loadings:o,layout:s,baseSearch:a,compact:c}=q(),{filters:u,handleActiveMenu:f,handleCategory:d,cleanFilter:m}=n,{toggleOpen:x}=cn();T.useEffect(()=>{x(!1)},[Object.values(u).join("")]);const v=Va(a,s.showSearch,u.keyword);return s.showCategory&&!c?l.jsxs(nl,{children:[l.jsx(un,{xs:l.jsxs(H,{direction:"row",justifyContent:"space-between",alignItems:"center",p:2,mb:.5,gap:2,borderBottom:1,borderColor:"divider",children:[l.jsx(di,{onClick:()=>x(!1),children:l.jsx(fr,{})}),l.jsx(M,{flex:1,variant:"body1",fontWeight:"fontWeightMedium",children:r("common.category")})]}),md:null}),l.jsx(H,{visibility:o.fetchCategoriesLoading?"hidden":"visible",width:{xs:268,md:200},boxSizing:"content-box",p:{xs:2,md:0},pr:{md:6},children:v?l.jsxs(l.Fragment,{children:[s.showExplore&&l.jsxs(R,{mb:3,pb:3,borderBottom:1,borderColor:"divider",children:[l.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[l.jsx(oe,{icon:jo,width:20,height:20}),l.jsx(M,{variant:"body1",color:!e&&!u.menu?"text.primary":"grey.400",fontWeight:!e&&!u.menu?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{x(!1),m()},children:r("explore.title")})]}),t.map(h=>l.jsxs(R,{display:"flex",alignItems:"center",mt:2,gap:1,children:[typeof h.icon=="string"?l.jsx(oe,{icon:h.icon,width:20,height:20}):h.icon,l.jsx(M,{variant:"body1",color:u.menu===h.key?"text.primary":"grey.400",fontWeight:u.menu===h.key?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{x(!1),f(h.key),h.onClick?.()},children:h.title})]},h.key))]}),!!i.length&&l.jsx(H,{gap:2,children:i.map(h=>l.jsx(M,{variant:"body1",title:h.name,sx:{cursor:"pointer"},"data-cy":"filter",color:e===h.value?"text.primary":"grey.400",textTransform:"capitalize",onClick:()=>{e===h.value?m():d(h.value),x(!1)},children:h.name},h.value))})]}):l.jsx(fi,{})})]}):null}function dn(){const{endpoint:t,serverVersion:e,storeVersion:n}=q(),r=li(e,n),i=T.useMemo(()=>dr({baseURL:t,headers:r}),[t]);return{get:async o=>{const{data:s}=await i.get(o);return s},post:async(o,s)=>{const{data:a}=await i.post(o,s);return a}}}const hi=T.memo(function(t){return l.jsx(R,{...t,sx:[{height:60,display:"flex",alignItems:"center",justifyContent:"center"},...Array.isArray(t.sx)?t.sx:[t.sx]],children:l.jsx(ee,{})})});function ir({icon:t=null,children:e=null,maxWidth:n=100,title:r=""}){return(e===0||e)&&l.jsxs(H,{direction:"row",sx:{alignItems:"center",gap:1,maxWidth:n,overflow:"hidden"},children:[t,l.jsx(M,{variant:"body2",title:r||(typeof e=="string"?e:void 0),sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})]})}const al=16/9,yt=292,Ht=189,Ze=336;function ll(){const{t,search:e}=q(),{get:n}=dn(),r=fe(),i=ye(r.breakpoints.down("md")),o=window.blocklet?.preferences?.homeBanner||[],{data:s=[],error:a,loading:c}=et(async()=>{const h=await n(Yt(J.blockletsPath,{didList:o.map(g=>g.did).join(",")}));return h?.dataList?o.map(g=>h.dataList.find(b=>b.did===g.did)):[]});a&&console.error("Get Banner Blocklets error:",a);const u={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:100,cursor:"pointer",color:"text.hint"};return!a&&o.length>0?l.jsxs(l.Fragment,{children:[l.jsx(M,{component:"h2",variant:"h2",sx:{mt:{xs:2,md:0},mb:3},children:t("explore.title")}),l.jsx(R,{sx:{height:{xs:"auto",md:yt},minHeight:yt,position:"relative",border:1,borderColor:"divider",borderRadius:3,overflow:"hidden"},children:c?l.jsxs(R,{sx:{p:5,display:{md:"flex"},gap:5,alignItems:"center",justifyContent:"center"},children:[l.jsx(ae,{variant:"rounded",height:Ht,width:Ze}),l.jsxs(R,{sx:{flex:1,height:"100%"},children:[l.jsx(ae,{variant:"text",height:50,width:100}),l.jsx(ae,{variant:"text",height:40,width:"100%"}),l.jsx(ae,{variant:"text",height:40,width:300}),l.jsxs(R,{sx:{display:"flex",gap:1,my:2},children:[l.jsx(ae,{variant:"circular",height:20,width:20}),l.jsx(ae,{variant:"text",height:20,width:50})]}),l.jsx(ae,{variant:"rounded",height:30,width:100})]})]}):l.jsx(ba,{showNav:!0,autoPlay:!0,slideDuration:i?500:1e3,slideInterval:5e3,showPlayButton:!1,showIndex:!1,showBullets:!1,showThumbnails:!1,showFullscreenButton:!1,renderLeftNav:h=>l.jsx(R,{onClick:h,sx:{display:{xs:"none",md:"block"}},children:l.jsx(so,{sx:{...u,left:5}})}),renderRightNav:h=>l.jsx(R,{onClick:h,sx:{display:{xs:"none",md:"block"}},children:l.jsx(ao,{sx:{...u,right:5}})}),items:o.map((h,g)=>({original:h.did,renderItem:()=>{const b=s[g]||{},p=h.cover||ul(h.did,b.screenshots?.[0]),w=ai(p,r.breakpoints.values.md*2);return l.jsxs(H,{direction:{xs:"column",md:"row"},onClick:()=>e.handleSearchSelect(b),sx:{height:{xs:"auto",md:yt},display:"flex",justifyContent:"center",alignItems:{xs:"flex-start",md:"center"},p:{xs:2,md:5},gap:{xs:2,md:5},cursor:"pointer","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url("${w}")`,backgroundSize:"cover",filter:"blur(50px)",opacity:.15,zIndex:0}},children:[f(w),l.jsxs(H,{sx:{flex:1,height:"100%",gap:3},children:[l.jsxs(R,{sx:{flex:1},children:[d(h.name||b.title||h.name),m(h.desc||b.description)]}),b.did&&x(b,h.baseNum),v(b)]})]})}}))})})]}):null;function f(h){return l.jsx(R,{sx:{borderRadius:2,overflow:"hidden",position:"relative",width:{xs:"100%",md:Ze}},children:l.jsx(dl,{url:h})})}function d(h){return l.jsx(M,{variant:"h2",sx:{width:"100%"},children:h})}function m(h){return l.jsx(M,{variant:"body2",sx:{color:"text.secondary",textAlign:"left",width:"100%",minHeight:70,maxHeight:71,pt:1,display:"-webkit-box",lineClamp:3,WebkitLineClamp:3,textWrap:"wrap",overflow:"hidden",WebkitBoxOrient:"vertical"},children:h})}function x(h,g=0){const{did:b,owner:p,stats:w}=h;return l.jsxs(R,{sx:{display:"flex",alignItems:"center",gap:2,color:"text.secondary"},children:[l.jsx(ir,{icon:l.jsx(Ve,{src:p.avatar,did:b,size:20,variant:"circle"}),children:p.fullName}),l.jsx(ir,{icon:l.jsx(oe,{icon:Br}),title:`${w.downloads+g}`,children:cl(w.downloads+g)})]})}function v(h){return l.jsx(Y,{variant:"outlined",size:"small",onClick:()=>e.handleSearchSelect(h),sx:{width:"fit-content",textTransform:"none",borderRadius:1,borderColor:"grey.300","&:hover":{borderColor:"divider"}},children:t("explore.viewDetail")})}}const cl=t=>Number.isNaN(t)?0:t<1e3?t:t<1e6?`${(t/1e3).toFixed(1)}k`:t<1e9?`${(t/1e6).toFixed(1)}m`:`${(t/1e9).toFixed(1)}b`,ul=(t,e)=>t&&e?`/assets/${t}/screenshots/${e}`:"";function dl({url:t}){const[e,n]=T.useState(!0);return l.jsxs(l.Fragment,{children:[e&&l.jsx(ae,{variant:"rectangular",sx:{width:{xs:"100%",md:Ze},height:{xs:"auto",md:Ht}}}),l.jsx(R,{component:"img",src:t,alt:"",onLoad:()=>n(!1),onError:()=>n(!1),sx:{display:e?"none":"block",width:{xs:"100%",md:Ze},height:{xs:"auto",md:Ht},borderRadius:2,border:1,borderColor:"divider",objectFit:"container",cursor:"pointer",aspectRatio:al}})]})}function fl({title:t,blocklets:e}){const{blockletRender:n,serverVersion:r}=q();return l.jsxs(R,{sx:{mt:3},children:[l.jsx(M,{component:"h3",variant:"h3",sx:{mb:2},children:t}),l.jsx(pn,{container:!0,spacing:2,sx:{boxSizing:"border-box",maxWidth:"calc(100vw - 16px)"},children:e.map(i=>l.jsx(pn,{"data-blocklet-did":i.did,sx:{p:"2px"},size:{xs:12,md:6},children:l.jsx(R,{sx:{padding:"1px"},children:n({blocklet:i,blocklets:e,serverVersion:r})})},i.did))})]})}function hl(){const{get:t}=dn(),{t:e}=q(),{data:n=[],error:r,loading:i}=et(async()=>{const o=await t(J.explorePath);return Array.isArray(o)?o:[]});return r?l.jsx(Xt,{error:new Error(`Failed to fetch blocklets from ${J.explorePath}`)}):i?l.jsx(hi,{mt:15}):l.jsxs(l.Fragment,{children:[l.jsx(ll,{}),n.map(o=>o.blocklets?.length>0?l.jsx(fl,{title:e(`explore.${o.type}`),blocklets:o.blocklets},o.type):null)]})}const bt="__FREE_TEXT__",or="__NO_RESULT__",vt=40;function pi({endpoint:t,t:e,locale:n,filters:r,handleKeyword:i,handleSearchSelect:o,...s}){const a=T.useRef(null),c=T.useRef(!1),[u,f]=T.useState(!1),[d,m]=T.useState(""),[x,v]=T.useState(!1),h=dn(),[g,b]=T.useState(!1),p=s?.placeholder||e("common.searchStore"),w=async S=>{b(!0);const D=await h.get(ve(t,Yt(J.blockletsPath,S)));return b(!1),D.dataList||[]},{data:j,run:I}=et(S=>S?w({sortBy:J.nameDesc,page:1,pageSize:10,keyword:S,showResources:"true"}):Promise.resolve([]),{manual:!0});T.useEffect(()=>{b(!0),I(r.keyword),m(r.keyword||"")},[r.keyword,I]),Ba("ctrl + k, command + k",S=>(S.stopPropagation(),S.preventDefault(),a.current?.querySelector("input")?.focus(),!1),{enableOnTags:["INPUT"]});const O=hr(S=>I(S),{wait:300}),P={name:bt,title:d,did:""};let _=[];return d&&(g?_=[P]:j?.length?_=[P,...j]:_=[{name:or,title:e("blocklet.noResults"),did:""}]),l.jsxs(l.Fragment,{children:[l.jsxs(Ti,{fullScreen:!0,open:x,sx:{display:{md:"none"}},children:[l.jsxs(R,{sx:{p:2,pb:0,display:"flex",alignItems:"center",gap:2},children:[l.jsx(pr,{fullWidth:!0,sx:{bgcolor:"grey.50",px:1,py:.5,".MuiInputBase-input":{p:1},".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},autoFocus:!0,placeholder:p,className:"bl-autocomplete-input",value:d,onChange:S=>L(S.target.value),startAdornment:N(x),endAdornment:K()}),l.jsx(Y,{variant:"outlined",onClick:()=>{v(!1),m(r.keyword||"")},children:e("common.cancel")})]}),l.jsx(mr,{sx:{p:.5},children:_.map(S=>W(S))})]}),l.jsx(R,{sx:{display:{sx:"block",md:"none"},paddingTop:1,opacity:.5},children:l.jsx(oe,{icon:ot,style:{fontSize:22,color:"inherit"},onClick:()=>v(!0)})}),l.jsx(ho,{ref:a,open:!!d&&u,size:"small",onOpen:()=>f(!0),onClose:(S,D)=>{f(!1),D==="selectOption"&&!c.current&&i(d)},onKeyDown:S=>{S.key==="Enter"&&!d&&E()},disableClearable:!0,inputValue:d,onInputChange:(S,D)=>L(D),isOptionEqualToValue:(S,D)=>S.name===D.name,getOptionLabel:S=>S.title,getOptionKey:S=>S.name,noOptionsText:e("blocklet.noResults"),autoHighlight:!0,forcePopupIcon:!1,slotProps:{paper:{sx:{mt:.5,minWidth:"100%",width:"fit-content","& > ul":{p:.5}}}},renderInput:S=>l.jsx(gr,{...S,InputProps:{...S.InputProps,autoFocus:!0,placeholder:p,className:"bl-autocomplete-input",value:d,startAdornment:N(u),endAdornment:K()}}),filterOptions:S=>S,...s,options:_,renderOption:(S,D)=>W(D),value:P,sx:[{bgcolor:"grey.50",borderRadius:"8px",overflow:"hidden",".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},...Array.isArray(s.sx)?s.sx:[s.sx]]})]});function L(S){b(!0),m(S),c.current=!1,O.run(S)}function E(){v(!1),m(""),L(""),i("")}function A(S){S?.did?(v(!1),c.current=!0,m(""),o(S)):S.name===bt&&(v(!1),i(d))}function W(S){return l.jsxs(Ue,{sx:{display:"flex",alignItems:"center",gap:1,p:1.5,borderRadius:"8px"},onClick:()=>A(S),children:[V(S),l.jsxs(M,{variant:"body1",children:[l.jsx(M,{sx:{fontWeight:"fontWeightMedium",display:"flex",alignItems:"center",gap:1},children:S.title}),l.jsx(M,{sx:{fontSize:"13px",color:"text.hint"},children:S.category?.locales?.[n||"en"]||""})]})]},S.did)}function V(S){if([bt,or].includes(S.name))return l.jsx(R,{sx:{width:vt,p:"6px",display:"flex",justifyContent:"center",alignItems:"center",color:"text.hint",bgcolor:"grey.100",borderRadius:"8px"},children:l.jsx(oe,{icon:ot,style:{fontSize:28}})});let D="";return S.logo&&(D=ve(t,"assets",S.did,ai(S.logo,vt,S.version))),l.jsx(Ve,{src:D,size:vt,style:{borderRadius:"8px",overflow:"hidden"}})}function N(S=!0){return l.jsx(R,{sx:{display:"flex",pl:.5,alignItems:"center",color:"text.hint"},children:S&&d&&g?l.jsx(ee,{color:"inherit",size:16}):l.jsx(oe,{icon:ot,style:{fontSize:16,cursor:"default"}})})}function K(){return d?l.jsx(R,{sx:{display:"flex",alignItems:"center",color:"text.hint"},children:l.jsx(oe,{icon:Ia,style:{fontSize:20,cursor:"pointer",color:"inherit"},onClick:()=>E()})}):null}}function pl({placeholder:t,...e}){const{search:n,t:r}=q(),{filters:i,handleKeyword:o}=n,[s,a]=T.useState(i.keyword||""),c=hr(o,{wait:300}),u=m=>{const{value:x}=m.target;a(x),c.run(x)},f=()=>{a(""),o("")};T.useEffect(()=>{a(i.keyword||"")},[i.keyword]);const d=t||r("common.searchPlaceholder");return l.jsx(ml,{inputProps:{"data-cy":"search-blocklet"},startAdornment:l.jsx(gn,{position:"start",children:l.jsx(gl,{sx:{fontSize:18,ml:-.5}})}),onChange:u,placeholder:d,value:s,title:d,"data-cy":"search",endAdornment:s&&l.jsx(gn,{position:"end",children:l.jsx(yl,{"data-cy":"search-delete",onClick:f})}),...e})}const ml=he(pr)`
43
- background-color: ${t=>t.theme.palette.grey[50]};
44
- font-size: 14px;
45
- border-radius: 6px;
46
- width: 100%;
47
- .MuiInputBase-input {
48
- padding: 8px 0 8px 0px;
49
- }
50
- .MuiOutlinedInput-notchedOutline {
51
- border: none;
52
- }
53
- .Mui-focused {
54
- background-color: #f6f6f6;
55
- .MuiInputBase-input::placeholder {
56
- color: transparent;
57
- }
58
- }
59
- `,gl=he(lo)`
60
- color: ${t=>t.theme.palette.grey[500]};
61
- `,yl=he(fr)`
62
- color: ${t=>t.theme.palette.grey[500]};
63
- font-size: 16px;
64
- cursor: pointer;
65
- `;function bl(){const{search:t,t:e,endpoint:n,locale:r,getCategoryLocale:i,developerName:o,showResourcesSwitch:s,layout:a,baseSearch:c,categoryOptions:u,compact:f}=q(),{filters:d,handleSort:m,handlePrice:x,handleDeveloper:v,handleSwitchShowResources:h,cleanFilter:g,handleCategory:b,handleSwitchIsOfficial:p}=t,w=si(e);return l.jsxs(H,{className:"filter-bar",direction:{xs:"column",md:"row"},spacing:{xs:1,md:0},sx:{position:"sticky",top:0,zIndex:1e3,alignItems:{xs:"flex-start",md:"center"},justifyContent:"space-between",gap:2,pt:{xs:2,md:0},px:0,pb:f?2:3,backgroundColor:"background.default"},children:[!f&&l.jsx(M,{variant:"h2",sx:{textTransform:"capitalize"},children:i(d.category)}),l.jsxs(H,{direction:"row",sx:{flex:1,alignItems:"center",flexWrap:{xs:"wrap",md:"nowrap"},width:"100%",justifyContent:{xs:"flex-start",md:"flex-end"},gap:2},children:[a.showSearch?l.jsx(R,{sx:{flex:1,flexBasis:{xs:"100%",md:"auto"}},children:c?l.jsx(pl,{}):l.jsx(pi,{locale:r,endpoint:n,sx:{display:{md:"block",xs:"none"},flex:1,mr:1,width:"350px"},t:e,filters:t.filters,handleKeyword:t.handleKeyword,handleSearchSelect:t.handleSearchSelect})}):null,d.owner&&o&&l.jsx(mn,{label:e("blocklet.authorTag",{name:o}),size:"small",onDelete:()=>v("")}),d.resourceDid&&d.resourceBlocklet&&l.jsx(mn,{label:e("blocklet.resourceTag",{name:d.resourceBlocklet}),size:"small",onDelete:()=>g(["resourceDid","resourceBlocklet","showResources"])}),l.jsx(xt,{checked:d.isOfficial==="true",onChange:j=>p(j?"true":"false"),label:e("common.official")}),s?l.jsx(xt,{checked:d.showResources!=="false",onChange:j=>h(j?"true":"false"),label:e("common.showResources")}):null,l.jsx(xt,{checked:d.price==="free",onChange:j=>x(j?"free":""),label:e("blocklet.free")}),f&&l.jsx(R,{children:l.jsx(Vt,{value:d.category||u[0]?.value,options:u,placeholder:e("common.category"),onChange:j=>b(j)})}),l.jsx(Vt,{value:d.sortBy||w[0].value,options:w,placeholder:e("sort.sort"),onChange:j=>m(j)})]})]})}function xt({checked:t,onChange:e,label:n}){const r=fe();return l.jsx(yr,{sx:{m:0,p:0},className:"check-button",control:l.jsx(br,{checked:t,icon:l.jsx(oe,{style:{padding:0,color:r.palette.text.secondary},icon:Ca}),checkedIcon:l.jsx(oe,{style:{padding:0,color:r.palette.primary.main},icon:Ea}),size:"large",sx:{p:0,mr:1},onChange:i=>e(i.target.checked)}),label:n})}function Ne({children:t}){return l.jsxs(R,{sx:{display:"flex",mt:2,flexDirection:"column",alignItems:"center",justifyContent:"center",color:"text.hint"},children:[l.jsx(co,{}),t]})}function sr(){const{t}=q();return l.jsx(M,{style:{textAlign:"center"},variant:"subtitle2",children:t("blocklet.noResults")})}function wt({filterTip:t=!1,keywordTip:e=!1}){const{t:n,locale:r}=q(),i=()=>r==="zh"?"、":" , ";return l.jsxs(R,{sx:{mt:1,display:"flex"},children:[l.jsx(M,{style:{marginRight:"16px"},children:n("blocklet.emptyTip")}),t&&l.jsx(M,{children:n("blocklet.filterTip")}),t&&e&&i(),e&&l.jsx(M,{children:n("blocklet.keywordTip")})]})}function St({primaryStart:t,primaryEnd:e,filter:n}){return l.jsxs(M,{variant:"subtitle2",sx:{display:"flex",gap:.5,mx:.5},children:[l.jsx(M,{children:t}),l.jsx(M,{title:n,color:"primary",sx:{maxWidth:"30vw",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}),l.jsxs(M,{children:[e," "]})]})}function vl(){const{t,search:e,getCategoryLocale:n,selectedCategory:r}=q(),{filters:i}=e,o=!!r||!!i.price;if(i.keyword&&o)return l.jsxs(Ne,{children:[l.jsx(St,{primaryStart:t("blocklet.noBlockletPart1"),primaryEnd:t("blocklet.noBlockletPart2"),filter:i.keyword}),l.jsx(wt,{keywordTip:!0,filterTip:!0})]});if(i.keyword)return l.jsxs(Ne,{children:[l.jsx(St,{primaryStart:t("blocklet.noBlockletPart1"),primaryEnd:t("blocklet.noBlockletPart2"),filter:i.keyword}),l.jsx(wt,{keywordTip:!0})]});if(o){const s=n(r);return l.jsxs(Ne,{children:[s?l.jsx(St,{primaryStart:t("blocklet.noCategoryResults1"),primaryEnd:t("blocklet.noCategoryResults2"),filter:s}):l.jsx(sr,{}),l.jsx(wt,{filterTip:!0})]})}return l.jsx(Ne,{children:l.jsx(sr,{})})}const xl=(t,e,n,r)=>io(async i=>{i||(n.currentPage=n.defaultCurrentPage);const{currentPage:o,pageSize:s}=n,a={...e,category:e.category==="All"?"":e.category,sortBy:J[e.sortBy],page:o,pageSize:s};r(null);const{data:c={}}=await t.get(J.blockletsPath,{params:a});return n.currentPage++,{page:o,pageSize:s,list:c?.dataList||[],total:c?.total||0}},{isNoMore:i=>i?i.page*i.pageSize>=i.total:!1,reloadDeps:[t,Ni(e)],onError:r});function wl(){const{storeApi:t,search:e,extraFilter:n,errors:r,updateDeveloperName:i}=q(),{filters:o}=e,s=Ci({currentPage:J.currentPage,pageSize:Xa()?J.mobilePageSize:J.pageSize,defaultCurrentPage:J.defaultCurrentPage}),[a,c]=T.useState(null),u=xl(t,o,s,c),f=T.useMemo(()=>n?n(u.data?.list||[]):u.data?.list||[],[u.data,n]);return T.useEffect(()=>{const d=f.find(m=>m.owner.did===o.owner);i(d?.owner.fullName||d?.author.name||"")},[o.owner,f,i]),{blocklets:f,fetchBlockletsError:a,loadMore:u.loadMore,hasNextPage:!u.noMore,total:u.data?.total||0,loadings:{fetchBlockletsLoading:u.loading,loadingMore:u.loadingMore},errors:{...r,fetchBlockletsError:a}}}function Sl(){const{t,search:e,endpoint:n,blockletRender:r,serverVersion:i,minItemWidth:o,layout:s,baseSearch:a,compact:c}=q(),{filters:u}=e,{blocklets:f,errors:d,loadMore:m,loadings:x,hasNextPage:v,total:h}=wl(),[g]=Oa({loading:x.fetchBlockletsLoading||x.loadingMore,hasNextPage:v,onLoadMore:m});if(d.fetchBlockletsError){const j=new Error(`Failed to fetch blocklets from ${n}: ${Ga(d.fetchBlockletsError)}`);return l.jsx(Xt,{error:j})}const b=a&&s.showSearch||!u.keyword;return l.jsxs(l.Fragment,{children:[b?l.jsx(bl,{}):l.jsxs(l.Fragment,{children:[l.jsx(un,{xs:l.jsx(fi,{}),md:null}),w()]}),p(),!x.fetchBlockletsLoading&&v&&l.jsx(R,{ref:g,sx:{height:70,minHeight:70,display:"flex",justifyContent:"center",py:2,overflow:"hidden"},children:x.loadingMore?l.jsx(ee,{}):null})]});function p(){return x.fetchBlockletsLoading?l.jsx(hi,{mt:15}):f.length?l.jsx(R,{className:"blocklet-list",sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:`repeat(auto-fill, minmax(${o}px, 1fr))`},p:"2px",rowGap:2,columnGap:c?0:2},children:f.map(j=>l.jsx(R,{"data-blocklet-did":j.did,sx:{minWidth:{xs:"100%",sm:o},maxWidth:"calc(100vw - 32px)"},children:r({blocklet:j,blocklets:f,serverVersion:i})},j.did))}):l.jsx(vl,{})}function w(){return l.jsxs(H,{direction:"row",className:"search-result-title",sx:{alignItems:"center",justifyContent:"space-between",mb:2,mt:{xs:2,md:0}},children:[l.jsx(M,{variant:"h3",title:u.keyword,sx:{maxWidth:"50vw",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t("blocklet.search",{keyword:u.keyword})}),l.jsx(M,{variant:"body1",sx:{color:"text.hint",fontSize:13},children:t("blocklet.resultCount",{count:h})})]})}}function kl(){const{t,selectedCategory:e,getCategoryLocale:n,locale:r,search:i}=q(),{toggleOpen:o}=cn(),s=ki().arcSphere,a=!!window.blocklet?.navigation?.some(c=>c.section==="bottomNavigation");return l.jsxs(R,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l.jsxs(M,{variant:"body1",sx:{display:{xs:"flex",md:"none"},alignItems:"center",gap:1,py:2,fontWeight:"fontWeightMedium"},children:[l.jsx(di,{onClick:()=>o(!0),children:l.jsx(ji,{})}),n(e)||t("common.category")]}),s&&a&&l.jsx(pi,{locale:r,endpoint:window.blocklet?.prefix||"/",sx:{display:{md:"block",xs:"none"},mr:1,width:"350px"},t,filters:i.filters,handleKeyword:i.handleKeyword,handleSearchSelect:i.handleSearchSelect})]})}function jl({menus:t=[],children:e=void 0}){const{search:n,layout:r,compact:i}=q(),{filters:o}=n,s=T.useRef(null),a=o.category||o.keyword||o.price,c=t.find(u=>u.key===o.menu)?.key;return l.jsx($a,{children:l.jsxs(wi,{FallbackComponent:Xt,children:[!i&&l.jsx(kl,{}),l.jsxs(R,{ref:s,className:"list-container",sx:{display:"flex",height:"100%",pt:{xs:0,md:i?0:5}},children:[l.jsx(sl,{menus:t}),l.jsxs(H,{sx:[{height:"100%",position:"relative",flex:1},i?{overflowY:"auto",ml:-2,pr:1,pb:2}:{overflow:"visible"}],children:[c&&e?.(c),!c&&(r.showExplore&&!a?l.jsx(hl,{}):l.jsx(Sl,{}))]})]})]})})}function rc(t){const{menus:e,children:n,...r}=t,i=fe(),o=bi(vi({},i,{typography:{h1:{fontSize:32,fontWeight:700,lineHeight:1.375,textAlign:"left"},h2:{fontSize:24,fontWeight:700,lineHeight:1.3333333,textAlign:"left"},h3:{fontSize:18,fontWeight:600,lineHeight:1.5,textAlign:"left"},fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:700}}));return l.jsx(xi,{theme:o,children:l.jsx(tl,{...r,children:l.jsx(jl,{menus:e,children:n})})})}const ic={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M22 12.54c-1.804-.345-2.701-1.08-3.523-2.94c-.487.696-1.102 1.568-.92 2.4c.028.238-.32 1-.557 1H3c0 5.208 3.164 7 6.196 7c4.124.022 7.828-1.376 9.854-5c1.146-.101 2.296-1.505 2.95-2.46z"/><path d="M5 10h3v3H5zm3 0h3v3H8zm3 0h3v3h-3zM8 7h3v3H8zm3 0h3v3h-3zm0-3h3v3h-3zM4.571 18c1.5 0 2.047-.074 2.958-.78M10 16v.01"/></g>'},Tl=(t,e)=>!e||!t?!0:yn.satisfies(yn.coerce(t),e);function Ol({children:t,serverVersion:e="",requirementVersion:n="",...r}){const{t:i}=pe();return Tl(e,n)?t:l.jsx(Jt,{title:i("store.tooltip.upgradeServer",{serverVersion:e,version:n}),arrow:!0,children:l.jsx(M,{children:l.jsx(Y,{disabled:!0,variant:"outlined",...r,children:i("common.upgradeServer")})})})}Ol.propTypes={children:C.node.isRequired,serverVersion:C.string,requirementVersion:C.string};he("div")`
66
- background-color: transparent !important;
67
- & > :not(.Mui-disabled) {
68
- position: relative;
69
- z-index: 1;
70
- &::before {
71
- content: '';
72
- position: absolute;
73
- height: 100%;
74
- width: 100%;
75
- left: 0;
76
- top: 0;
77
- transition: opacity 0.3s;
78
- }
79
- &:hover::before {
80
- opacity: 0;
81
- }
82
- &::after {
83
- content: '';
84
- position: absolute;
85
- height: 100%;
86
- width: 100%;
87
- top: 0;
88
- left: 0;
89
- border-radius: 2px;
90
- background-color: ${t=>t.theme.palette.primary.main};
91
- transform: scale(0.1);
92
- opacity: 0;
93
- z-index: -1;
94
- transition:
95
- transform 0.3s,
96
- opacity 0.3s,
97
- background-color 0.3s;
98
- }
99
- &:hover::after {
100
- opacity: 1;
101
- transform-origin: center;
102
- transform: scale(1);
103
- }
104
- }
105
- & > :not(.Mui-disabled) {
106
- background-color: transparent !important;
107
- color: ${t=>t.theme.palette.primary.main}!important;
108
- }
109
- & > :not(.Mui-disabled) {
110
- &:hover {
111
- color: ${t=>t.theme.palette.common.white}!important;
112
- }
113
- }
114
- `;const ar=(t="")=>t.replace(/(<([^>]+)>)/gi,"").trim(),Cl=(t="")=>{const e=parseInt(t,10);return Number.isNaN(e)?t:e<1e3?e:e<1e6?`${(e/1e3).toFixed(1)}k`:e<1e9?`${(e/1e6).toFixed(1)}m`:`${(e/1e9).toFixed(1)}b`};function qt({title:t,sx:e,children:n,slotProps:r,fontSize:i=12,fontWeight:o=500,color:s="text.contrast",...a}){return t?l.jsx(Jt,{title:t,placement:"top",...a,slotProps:{popper:{...r?.popper,sx:Ai({[`& .${vr.tooltip}`]:{fontSize:i,fontWeight:o,boxShadow:2,marginBottom:"6px !important",borderRadius:"8px",cursor:"default",color:s,display:"flex",alignItems:"center"}},r?.popper?.sx)}},children:n}):n}function Ae({icon:t=null,children:e=null,maxWidth:n=100,title:r=void 0,sx:i={}}){return(e===0||e)&&l.jsxs(H,{direction:"row",sx:[{alignItems:"center",gap:.5},{maxWidth:n,overflow:"hidden"},...Array.isArray(i)?i:[i]],children:[t,l.jsx(qt,{title:r||(typeof e=="string"?e:""),children:l.jsx(M,{variant:"body2",sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default"},children:e})})]})}function oc({...t}){const{title:e,description:n="",cover:r="",avatar:i,author:o,download:s,did:a,official:c,buttonText:u="Install",buttonDisabled:f,buttonLoading:d,button:m,onButtonClick:x=()=>{},onMainClick:v,className:h,ref:g,icons:b,status:p,...w}=t,j=fe(),I=(E,A=()=>!1)=>(W,...V)=>{const N=E instanceof Function;(A()||N)&&(W.preventDefault(),W.stopPropagation(),N&&E(...V))},O=v&&I(v),P=I(x,()=>!!(m||f||d)),_=T.isValidElement(e)?{children:e}:{title:ar(e),dangerouslySetInnerHTML:{__html:e}},L=T.isValidElement(n)?{children:n}:{title:ar(n),dangerouslySetInnerHTML:{__html:n}};return l.jsxs(Bi,{variant:"outlined",onClick:O,...w,sx:{p:{xs:2,md:3},borderRadius:1,...w.sx},children:[l.jsxs(H,{direction:"row",sx:{flex:1,gap:1,alignItems:"center",overflow:"hidden","& > *":{flexShrink:0}},children:[l.jsx(Ve,{src:r,did:a,size:48,variant:"rounded",style:{borderRadius:"8px",overflow:"hidden"}}),l.jsx(M,{className:"blocklet-title",..._,sx:[{fontWeight:"fontWeightMedium",fontSize:16,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",cursor:"default",pl:.5,"&&":{flexShrink:1}},...Array.isArray(_.sx)?_.sx:[_.sx]]}),l.jsxs(R,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:[c&&l.jsx(qt,{title:c.tooltip,children:l.jsx(po,{sx:{color:c.color||"#D97706",fontSize:c.size||18}})}),b?.map(E=>l.jsx(qt,{title:E.title,children:typeof E.icon=="string"?l.jsx(De,{icon:E.icon,style:{color:E.color}}):E.icon},E.key))]}),x&&l.jsxs(He,{variant:"outlined",size:"small",disabled:f||d,style:{color:j.palette.text.primary,borderColor:j.palette.grey[300],borderRadius:8,fontSize:13,fontWeight:j.typography.fontWeightMedium},onClick:P,children:[d&&l.jsx(ee,{size:15,style:{marginRight:3,color:"inherit"}}),u]}),m]}),l.jsx(H,{sx:{py:2},children:l.jsx(M,{className:"blocklet-description",variant:"body2",...L,sx:[{color:"text.secondary",display:"-webkit-box",lineClamp:2,WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",cursor:"default",height:40},...Array.isArray(L.sx)?L.sx:[L.sx]]})}),l.jsxs(H,{direction:"row",sx:{alignItems:"center",gap:2,color:"text.secondary"},children:[l.jsx(Ae,{icon:l.jsx(Ve,{src:i,did:a,size:20,variant:"circle"}),maxWidth:200,children:o}),l.jsx(Ae,{icon:l.jsx(De,{icon:Br}),title:s,children:Cl(s)}),p?.filter(E=>E.align!=="right").map(E=>l.jsx(Ae,{icon:typeof E.icon=="string"?l.jsx(De,{icon:E.icon}):E.icon,title:E.title,maxWidth:E.maxWidth,children:E.text},E.key)),l.jsx(R,{sx:{flex:1}}),p?.filter(E=>E.align==="right").map(E=>l.jsx(Ae,{icon:typeof E.icon=="string"?l.jsx(De,{icon:E.icon}):E.icon,title:E.title,maxWidth:E.maxWidth,sx:{color:E.color},children:E.text},E.key))]})]})}const sc=he("div")`
115
- background-color: transparent !important;
116
- & > :not(.Mui-disabled) {
117
- position: relative;
118
- z-index: 1;
119
- &::before {
120
- content: '';
121
- position: absolute;
122
- height: 100%;
123
- width: 100%;
124
- left: 0;
125
- top: 0;
126
- transition: opacity 0.3s;
127
- }
128
- &:hover::before {
129
- opacity: 0;
130
- }
131
- &::after {
132
- content: '';
133
- position: absolute;
134
- height: 100%;
135
- width: 100%;
136
- top: 0;
137
- left: 0;
138
- border-radius: 2px;
139
- background-color: ${t=>t.theme.palette.primary.main};
140
- transform: scale(0.1);
141
- opacity: 0;
142
- z-index: -1;
143
- transition:
144
- transform 0.3s,
145
- opacity 0.3s,
146
- background-color 0.3s;
147
- }
148
- &:hover::after {
149
- opacity: 1;
150
- transform-origin: center;
151
- transform: scale(1);
152
- }
153
- }
154
- & > :not(.Mui-disabled) {
155
- background-color: transparent !important;
156
- color: ${t=>t.theme.palette.primary.main}!important;
157
- }
158
- & > :not(.Mui-disabled) {
159
- &:hover {
160
- color: ${t=>t.theme.palette.common.white}!important;
161
- }
162
- }
163
- `,ac={meta:C.object.isRequired,onCancel:C.func.isRequired};function El({action:t,onSelect:e,onNext:n}){const{t:r}=pe(),i=[{action:"purchase",title:r("store.purchase.purchase.title"),description:r("store.purchase.purchase.description")},{action:"verify",title:r("store.purchase.verify.title"),description:r("store.purchase.verify.description")}];return l.jsxs(l.Fragment,{children:[l.jsx($i,{children:i.map(o=>l.jsxs(xr,{button:!0,selected:t===o.action,onClick:()=>e(o.action),children:[l.jsx(Ki,{sx:{minWidth:48},children:o.action==="purchase"?l.jsx(mo,{style:{color:t==="purchase"?bn.primary.main:"#AAA",fontSize:32}}):l.jsx(go,{style:{color:t==="verify"?bn.primary.main:"#AAA",fontSize:32}})}),l.jsx(Ui,{primary:o.title,secondary:o.description})]},o.action))}),n&&l.jsx(He,{fullWidth:!0,disabled:!t,variant:"contained",color:"primary",style:{marginTop:16},onClick:n,children:r("common.next")})]})}El.propTypes={action:C.oneOf(["both","purchase","verify"]).isRequired,onSelect:C.func.isRequired,onNext:C.func.isRequired};function Il({disabled:t=!1,storeList:e=[],teamDid:n,onAdd:r=()=>{},scope:i="",hiddenChildren:o=!1,open:s=!1,onClose:a=()=>{}}){const{api:c}=Zt(),[u,f]=T.useState(!1),[d,m]=T.useState(!0),[x,v]=T.useState(!1),[h,g]=T.useState(""),[b,p]=T.useState(""),{t:w}=pe(),j=async()=>{f(!0);try{const{decoded:O}=Gi(h,e);await c.addBlockletStore({input:{teamDid:n,url:O,scope:i}}),r(O),v(!1),a()}catch(O){const P=`${w("store.blockletRegistry.addFailed")} ${je(O)}`;p(P)}finally{f(!1)}},I=()=>{v(!1),a()};return l.jsxs(l.Fragment,{children:[!o&&l.jsxs(xr,{button:!0,disabled:t,sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1},onClick:()=>{v(!0)},children:[l.jsx(yo,{font:!0}),l.jsx(M,{variant:"inherit",children:w("store.blockletRegistry.addRegistry")})]}),l.jsxs(Vi,{title:w("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:s||x,onClose:I,PaperProps:{style:{minHeight:"auto"}},actions:l.jsxs(l.Fragment,{children:[l.jsx(He,{onClick:O=>{O.stopPropagation(),I()},color:"inherit",children:w("common.cancel")}),l.jsxs(He,{onClick:O=>{O.stopPropagation(),j()},color:"primary","data-cy":"install-blocklet-next-step",disabled:u||!h||d,variant:"contained",autoFocus:!0,children:[u&&l.jsx(ee,{size:16}),w("common.confirm")]})]}),children:[l.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:l.jsx(Hi,{component:"div",children:l.jsx(M,{component:"div",children:l.jsx(gr,{label:w("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"add-blocklet-store-url",fullWidth:!0,value:h,onChange:O=>{p(null);let P=!1;O.target.value.trim()||(P=!0),O.target.value.trim()||p(w("store.blockletRegistry.registryUrlEmpty")),g(O.target.value),m(P)},disabled:u,onKeyPress:O=>{O.key==="Enter"&&(O.preventDefault(),O.target.value.trim()?j():p(w("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!b&&l.jsx(qi,{severity:"error",style:{width:"100%"},children:b})]})]})}Il.propTypes={teamDid:C.string.isRequired,disabled:C.bool,storeList:C.array,onAdd:C.func,scope:C.string,hiddenChildren:C.bool,open:C.bool,onClose:C.func};var kt,lr;function Rl(){if(lr)return kt;lr=1;var t={};const{NODE_MODES:e}=Qi();return kt={isInServerlessMode:({mode:r,previousMode:i}={})=>r===e.SERVERLESS||i===e.SERVERLESS||t.ABT_NODE_DEBUG_AS_SERVERLESS==="true"},kt}var Pl=Rl();function fn({store:t,teamDid:e,onDelete:n=()=>{},children:r=null,projectId:i="",scope:o=""}){const{api:s}=Zt(),{t:a}=pe(),c=fo(),[u,f]=T.useState(!1),[d,m]=T.useState(null),x=fe(),v=()=>{f(!1),m(null)},h=async()=>{try{f(!0),await s.deleteBlockletStore({input:{teamDid:e,url:t.url,projectId:i,scope:o}}),await c?.actions?.refreshBlocklet(),n&&typeof n=="function"&&n()}catch(p){ue.error(`Remove Blocklet Store Error: ${je(p)}`)}finally{f(!1),m(null)}},g={keyName:t.url,title:a("store.blockletRegistry.deleteRegistry"),description:a("store.blockletRegistry.deleteDesc",{name:`<b>${t.url}</b>`,color:x.palette.error.main}),confirmPlaceholder:a("store.blockletRegistry.confirmDesc",{name:t.url}),confirm:a("common.delConfirm"),cancel:a("common.cancel"),onConfirm:h,onCancel:v},b=p=>{t.protected||(p.stopPropagation(),m(g))};return l.jsxs(l.Fragment,{children:[r?l.jsx("span",{onClick:b,children:r}):l.jsx(Y,{"data-cy":"store-action-delete",color:"primary",disabled:u,onClick:b,size:"small",children:l.jsx(kr,{sx:{zoom:.95}})}),d&&l.jsx(vo,{keyName:d.keyName,title:d.title,description:d.description,confirmPlaceholder:d.confirmPlaceholder,confirm:d.confirm,cancel:d.cancel,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})]})}fn.propTypes={children:C.node,teamDid:C.string.isRequired,store:C.object.isRequired,onDelete:C.func,projectId:C.string,scope:C.string};const Ml=({store:t,userDid:e})=>{const n=window.blocklet?.tenantMode!==Xi.BLOCKLET_TENANT_MODES.MULTIPLE;return t.protected?!1:t.scope&&t.scope===e?!0:n?t.scope==="studio":!1};function mi({connectedStore:t,onDisconnect:e=()=>{},onDelete:n=()=>{},store:r,teamDid:i,projectId:o=""}){const[s,a]=T.useState(null),c=!!s,{t:u}=pe(),{session:f}=Yi(),[d,m]=T.useState(!1),x=p=>{p.stopPropagation(),window.open(Re(`${ve(r.url,"search?menu=my-blocklets")}`,{allowDomains:null}))},v=p=>{a(p.currentTarget)},h=()=>{a(null)},g=()=>{m(!1),e()},b=[{label:u("common.visitStore"),action:x,icon:Sr},{label:u("common.disconnect"),action:()=>{h(),m(!0)},icon:So,hidden:!t}];return l.jsxs(l.Fragment,{children:[l.jsx(Y,{ref:s,color:"primary",onClick:v,size:"small",children:l.jsx(xo,{sx:{zoom:.95}})}),l.jsxs(Ji,{anchorEl:s,open:c,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[b.map(p=>p.hidden?null:l.jsxs(Ue,{dense:!0,onClick:p.action,disabled:p.disabled,children:[p.icon&&l.jsx(p.icon,{color:"action",sx:{marginRight:1}}),l.jsx(R,{sx:{color:"action"},children:p.label})]},p.label)),Ml({store:r,userDid:f?.user?.did})&&l.jsx(fn,{store:r,onDelete:n,teamDid:i,projectId:o,scope:r.scope||"studio",children:l.jsxs(Ue,{dense:!0,disabled:r.protected,children:[l.jsx(kr,{sx:{color:r.protected?"action":"error.main",marginRight:1}}),l.jsx(R,{sx:{color:r.protected?"action":"error.main"},children:u("common.delete")})]})})]}),d&&l.jsx(Zi,{displayError:!0,title:`${u("common.disconnect")} ${r.name}`,description:u("blocklet.publish.disconnectStoreTip"),confirm:u("common.confirm"),onConfirm:g,onCancel:()=>m(!1)})]})}mi.propTypes={connectedStore:C.object.isRequired,onDisconnect:C.func,onDelete:C.func,store:C.object.isRequired,teamDid:C.string.isRequired,projectId:C.string};function _l({messageType:t,onOpen:e,onClose:n}){const r=T.useRef(null),i=T.useRef(null),o=async a=>{setTimeout(()=>{try{n?.()}catch{}},10*1e3),r.current&&(clearInterval(i.current),r.current.close());const c=Math.random().toString(36).slice(2);r.current=window.open(`${wr.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window?key=${c}`,"_blank"),e?.(r.current),i.current=setInterval(()=>{(!r.current||r.current.closed)&&(r.current=null,clearInterval(i.current),setTimeout(()=>{n?.()},1100))},200),await Promise.resolve(a(r.current,u=>{if(!r.current){localStorage.setItem(`open-window-url-${c}`,JSON.stringify({url:u,time:Date.now()}));return}r.current.location.href=Re(u,{allowDomains:null})}))},s=eo(a=>{const{type:c,error:u}=a.data;r.current&&c===t&&u&&(ue.error(u),n?.())});return T.useEffect(()=>(window.addEventListener("message",s),()=>{window.removeEventListener("message",s)}),[s]),o}function Gt({connectedStore:t,sx:e={},...n}){return l.jsx(to,{sx:{width:24,height:24,...e},src:ve(t.storeUrl,wr.WELLKNOWN_SERVICE_PATH_PREFIX,`/user/avatar/${t.developerDid}?imageFilter=resize&w=120&h=120`),...n})}Gt.propTypes={connectedStore:C.object.isRequired,sx:C.object};function gi({storeUrl:t,storeName:e,published:n,did:r="",version:i=""}){const{t:o}=pe(),s=()=>{window.open(Re(`${ve(t,r&&i?`/blocklets/${r}/${i}`:"/search?menu=my-blocklets")}`,{allowDomains:null}))};return l.jsxs(R,{children:[l.jsx(M,{variant:"subtitle2",children:o(n?"blocklet.publish.publishToStoreSuccess":"blocklet.publish.uploadToStoreSuccess",{name:e})}),l.jsx(Y,{size:"small",sx:{mt:1},onClick:s,variant:"contained",color:"success",children:o("common.visitTarget",{name:e})})]})}gi.propTypes={storeName:C.string.isRequired,storeUrl:C.string.isRequired,published:C.bool.isRequired,did:C.string,version:C.string};const cr={CONNECT:"connect",SELECT:"select"},ur=no(({className:t,...e})=>l.jsx(Jt,{...e,classes:{popper:t}}))(({theme:t})=>({[`& .${vr.tooltip}`]:{backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.87)",borderRadius:8,padding:t.spacing(2),fontSize:t.typography.pxToRem(12),border:"1px solid rgba(0,0,0,0.08)",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.05)"}}));function Ll({teamDid:t,projectId:e="",releaseId:n="",store:r,warningList:i=[],onDelete:o=()=>{},kind:s="store",published:a=!1,connectedStore:c=null,releaseType:u="",onPublish:f=()=>{},onOpenConnectStore:d=()=>{},onSelectConnectStore:m=()=>{},behavior:x=cr.CONNECT,scope:v="",version:h=""}){const{t:g}=pe(),{api:b,info:p,inService:w}=Zt(),[j,I]=T.useState(!1),O=_l({messageType:"connect-store-message",onOpen:()=>I(!0),onClose:()=>I(!1)}),P=s==="publish",_=!!c,L=S=>{if(S.stopPropagation(),P){window.open(Re(ve(r.url,"developer/blocklets"),{allowDomains:null}));return}window.open(Re(r.url,{allowDomains:null}))},E=()=>{if(x===cr.SELECT){m(r);return}O(async(S,D)=>{try{const Q=await b.connectToStore({input:{did:t,storeUrl:r.url,storeId:r.id,storeName:r.name,projectId:e}});if(!Q?.url){ue.error("failed to connect to store");return}D(Q.url),await d({did:t,projectId:e,storeId:r.id}),I(!1)}catch(Q){const B=je(Q);ue.error(B),I(!1)}})},A=async()=>{try{await b.disconnectFromStore({input:{did:t,storeId:r.id,projectId:e,storeScope:v}}),o()}catch(S){ue.error(je(S))}},W=()=>{I(!0),b.publishToStore({input:{did:t,storeId:r.id,storeName:r.name,projectId:e,releaseId:n,type:u}}).then(S=>{ue.success(l.jsx(gi,{storeName:c.storeName,storeUrl:c.storeUrl,did:e,version:h,published:S.url==="published"}),{duration:1e4}),f?.(null)}).catch(S=>{ue.error(je(S)),f?.(S)}).finally(()=>{I(!1)})};T.useEffect(()=>{_&&I(!1)},[_]);const V=T.useMemo(()=>!(w&&Pl.isInServerlessMode(p)),[w,p]),N=i.length>0,K=l.jsxs(Y,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130,height:"100%"},disabled:N,onClick:W,children:[j?l.jsx(ee,{sx:{marginRight:1},size:16}):l.jsx(wo,{sx:{marginRight:1,fontSize:20}}),g("common.upload")]});return l.jsxs(R,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",overflow:"hidden",width:"100%"},children:[!P&&j&&l.jsx(ee,{sx:{marginRight:2},size:16}),l.jsxs(R,{sx:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},children:[l.jsx(R,{sx:{display:"flex",flexDirection:"row"},children:l.jsx(M,{component:"span",sx:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variant:"subtitle1",children:r.name})}),l.jsx(M,{sx:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},component:"span",variant:"inherit",children:`${r.url}`})]}),l.jsxs(R,{sx:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},children:[c&&l.jsx(ur,{placement:"top",title:l.jsxs(R,{children:[l.jsx(M,{component:"span",variant:"caption",sx:{opacity:.7},children:g("blocklet.publish.developerInfo")}),l.jsxs(R,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1,mt:1},children:[l.jsx(Gt,{connectedStore:c,sx:{width:42,height:42}}),l.jsxs(R,{sx:{flex:1},children:[l.jsx(M,{component:"span",variant:"subtitle1",children:c.developerName}),l.jsx(ro,{size:14,copyable:!0,compact:!0,responsive:!1,did:c.developerDid})]})]})]}),children:l.jsx(R,{children:l.jsx(Gt,{connectedStore:c,sx:{marginRight:1,cursor:"help"}})})}),P&&l.jsxs(vn,{disabled:j,variant:"outlined",sx:{height:38},size:"small",children:[!_&&l.jsxs(Y,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:E,children:[j?l.jsx(ee,{sx:{marginRight:1},size:16}):l.jsx(ko,{sx:{marginRight:1}}),g("common.connect")]}),_&&a&&l.jsxs(Y,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[j?l.jsx(ee,{sx:{marginRight:1},size:16}):l.jsx(bo,{sx:{marginRight:1}}),g("common.uploaded")]}),_&&!a&&(N?l.jsx(ur,{title:l.jsxs(R,{children:[l.jsx(R,{sx:{color:"error.main",mb:.5},children:g("blocklet.publish.storeRule.warning")}),i.map((S,D)=>l.jsxs(R,{sx:{color:"error.main"},children:[D+1,". ",S]},S))]}),children:l.jsx("div",{children:K})}):K),l.jsx(mi,{projectId:e,connectedStore:c,store:r,onDelete:o,teamDid:t,onDisconnect:A})]}),!P&&l.jsxs(vn,{disabled:j,variant:"outlined",sx:{height:36},size:"small",children:[l.jsx(Y,{"data-cy":"store-open-url",onClick:L,children:l.jsx(Sr,{sx:{zoom:.9}})}),!r.protected&&V&&l.jsx(fn,{store:r,onDelete:o,teamDid:t,scope:""})]})]})]})}Ll.propTypes={kind:C.string,teamDid:C.string.isRequired,published:C.bool,connectedStore:C.shape({storeName:C.string,storeId:C.string,storeUrl:C.string,developerDid:C.string,developerName:C.string}),warningList:C.array,projectId:C.string,releaseId:C.string,releaseType:C.string,store:C.shape({id:C.string.isRequired,name:C.string.isRequired,url:C.string.isRequired,protected:C.bool,connected:C.bool}).isRequired,scope:C.string,onDelete:C.func,onPublish:C.func,onOpenConnectStore:C.func,behavior:C.string,onSelectConnectStore:C.func,version:C.string};export{Il as A,El as C,So as L,tc as S,rc as _,Ol as a,Ll as b,ac as c,ic as d,sc as e,Pl as f,ec as g,oc as s,_l as u};
@@ -1 +0,0 @@
1
- import{ai as e,aM as a}from"./index-BIgX2N1A.js";const t=e(a);export{t as r};
@@ -1 +0,0 @@
1
- import{V as k,aS as C,r as d,j as t,K as c,bz as p,t as B,o as m,aU as a,B as l,aV as D,ad as x,bx as H,X as L,bA as M,bB as z,bC as U}from"./index-BIgX2N1A.js";import{H as N}from"./index-Ca61GFb8.js";import{u as v}from"./blocklet-lDvdqhrX.js";import{y as S}from"./index-BfQLSa8k.js";import{x as $}from"./index-D29L5UKE.js";import{C as E,M as P}from"./memory-CoCFCBkX.js";import{B as T}from"./status-B4gHBixJ.js";import{T as w,a as W}from"./ToggleButtonGroup-BP4C4KFu.js";import"./FilterList-DMbHmf0X.js";import"./CSSTransition-D4fabzL2.js";import"./emotion-cache.browser.esm-DxLNiXj3.js";import"./index-Bm8Rp86x.js";import"./redux-Ab4buSXY.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-CM0PEscV.js";import"./TableSearch-CdKaHbVQ.js";import"./Search-CtujvL0H.js";import"./Clear-DriUx9_Q.js";import"./MoreVert-BVgcfW7V.js";import"./base-chart-BE2BHY3Y.js";import"./index-gwhKA5OT.js";import"./getValidReactChildren-CVyZy5bG.js";function R({blocklet:r,cpuHistory:y=[],memoryHistory:u=[],...j}){const{t:i}=k(),{info:f}=C(),{runtimeHistory:s}=v(),[g,b]=d.useState(null),n=d.useCallback(e=>r.status!=="running"?t.jsx(c,{children:i("blocklet.runtimeInfo.noRunning")}):e.length?null:t.jsx(S,{children:i("common.empty")}),[r.status,i]),o=d.useCallback(e=>{b(e)},[]);return s.length===0?t.jsx(c,{children:i("blocklet.runtimeInfo.noRunning")}):t.jsxs(A,{component:"div",...j,memoryHistory:u,cpuHistory:y,children:[t.jsxs(p,{className:"page-metrics",container:!0,spacing:5,children:[t.jsx(p,{sx:{pt:"16px !important"},size:12,children:t.jsx(c,{sx:{fontSize:"16px",fontWeight:"bold"},children:"CPU"})}),s?.map(e=>t.jsx(p,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:t.jsx(E,{title:`${e.name} CPU`,empty:n(e.cpu),currentLoad:e.appRuntimeInfo?.cpuUsage||0,cpus:e.appRuntimeInfo?.cpus||[],history:e.cpu,onHover:o,hoverIndex:g,style:{height:150}})},`${e.key}-cpu`))]}),t.jsxs(p,{className:"page-metrics",container:!0,spacing:5,sx:{mt:1},children:[t.jsx(p,{sx:{pt:"16px !important"},size:12,children:t.jsx(c,{sx:{fontSize:"16px",fontWeight:"bold"},children:"Memory"})}),s?.map(e=>t.jsx(p,{sx:{pt:"16px !important"},size:{lg:4,md:6,sm:6,xs:12},children:t.jsx(P,{title:`${e.name} Memory`,empty:n(e.memory),total:f.runtimeConfig?.blockletMaxMemoryLimit?$.parseSize(`${f.runtimeConfig.blockletMaxMemoryLimit*(e.key===r?.meta?.did?s.length-1:1)}MiB`):0,used:e.appRuntimeInfo?.memoryUsage||0,history:e.memory,onHover:o,hoverIndex:g,style:{height:150}})},`${e.key}-memory`))]})]})}R.propTypes={blocklet:m.object.isRequired,cpuHistory:m.arrayOf(m.shape({date:m.number,value:m.number})),memoryHistory:m.arrayOf(m.shape({date:m.number,value:m.number}))};const A=B(c)``;function ue(){const{t:r,locale:y}=k(),[u,j]=d.useState(6),{blocklet:i,actions:{refreshBlocklet:f}}=v(),s=d.useMemo(()=>{const n=[];return a.forEachBlockletSync(i,(o,{ancestors:e,id:I,level:h})=>{o?.meta?.did&&o.meta.did!==i.meta.did&&n.push({type:"blocklet",groupId:i.meta.did,groupName:a.getDisplayName(i),id:I,name:a.getDisplayName(o,!0),blocklet:i,component:o,level:h-1>=0?h-1:0,runtimeInfo:o.runtimeInfo,ancestors:e})}),n},[i]);d.useEffect(()=>{f({hours:u});const n=setInterval(()=>{f({hours:u})},1e3*10);return()=>{clearInterval(n)}},[u]);const g=n=>z(Number(n||0),{locale:U(y)}),b=[{label:r("common.name"),name:"name",options:{customBodyRenderLite(n){const{name:o,component:e,level:I,ancestors:h}=s[n];return t.jsxs(l,{sx:{display:"flex",alignItems:"center",pl:I*2},children:[t.jsx(D,{size:20,blocklet:e,ancestors:h}),t.jsx(l,{sx:{ml:1},children:o}),t.jsx(T,{variant:"pin",style:{marginLeft:8},status:a.isBlockletRunning(e)?"running":e.status,source:e.source,progress:e.progress})]})}}},{label:r("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(n){const{runtimeInfo:o,component:e}=s[n];return a.isBlockletRunning(e)?g(o?.uptime):t.jsx(x,{title:r("common.noData"),children:"--"})}}},{label:r("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(n){const{runtimeInfo:o,component:e}=s[n];return a.isBlockletRunning(e)?H(o?.memoryUsage||0):t.jsx(x,{title:r("common.noData"),children:"--"})}}},{label:r("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(n){const{runtimeInfo:o,component:e}=s[n];return a.isBlockletRunning(e)?`${(o?.cpuUsage||0).toFixed(1)}%`:t.jsx(x,{title:r("common.noData"),children:"--"})}}},{label:r("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(n){const{runtimeInfo:o}=s[n];return o?.uptime?t.jsxs(l,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(L,{icon:o?.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),t.jsx(l,{sx:{ml:1},children:o?.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:r("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid",options:{customBodyRenderLite(n){const{runtimeInfo:o,component:e}=s[n];return a.isBlockletRunning(e)?o?.pid:t.jsx(x,{title:r("common.noData"),children:"--"})}}},{label:r("blocklet.runtimeInfo.port"),name:"runtimeInfo.port",options:{customBodyRenderLite(n){const{runtimeInfo:o,component:e}=s[n];return a.isBlockletRunning(e)?o?.port:t.jsx(x,{title:r("common.noData"),children:"--"})}}}];return t.jsxs(G,{component:"div",children:[t.jsxs(l,{sx:{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2},children:[t.jsx(c,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:2},children:r("analytics.trend")}),t.jsx(w,{size:"small",exclusive:!0,value:u,onChange:(n,o)=>{M(o)&&j(o)},children:[1,3,6,12,24].map(n=>t.jsxs(W,{value:n,children:[n,"H"]},n))})]}),t.jsx(l,{children:t.jsx(R,{blocklet:i})}),t.jsx(l,{sx:{mt:3},children:t.jsx(N,{title:r("analytics.detail"),className:"monitor-table",locale:y,data:s,columns:b,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]})}const G=B(c)``;export{ue as default};
@@ -1 +0,0 @@
1
- import{r}from"./without-wallet-U-jwKDa8.js";var e=r();export{e as s};
@@ -1 +0,0 @@
1
- import{aC as o}from"./index-BIgX2N1A.js";const e=o();export{e as b};
@@ -1 +0,0 @@
1
- import{ak as r}from"./index-BIgX2N1A.js";function p(t){return r(t).toUpperCase()}export{p as t};
@@ -1 +0,0 @@
1
- import{bp as u,ak as d,bq as l,br as s,bs as o,bt as f,bu as c}from"./index-BIgX2N1A.js";function m(e,t){for(var r=-1,a=e.length;++r<a&&u(t,e[r],0)>-1;);return r}function S(e,t,r){if(e=d(e),e&&(r||t===void 0))return l(e);if(!e||!(t=s(t)))return e;var a=o(e),n=o(t),b=m(a,n),i=f(a,n)+1;return c(a,b,i).join("")}const x=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"}));export{x as a,S as t};
@@ -1 +0,0 @@
1
- import{j as r,T as o}from"./index-BIgX2N1A.js";import{t as a}from"./index-Duu5UY8_.js";function p(t){return function(n){return r.jsx(o,{translations:a,children:r.jsx(t,{...n})})}}export{p as w};