@abtnode/webapp 1.17.6-beta-20251218-120326-5b44dadf → 1.17.6-beta-20251219-114550-06c96cf5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-DbXM02a3.js → AdapterDayjs-BjFsoQ-w.js} +1 -1
  4. package/dist/assets/{Add-17-jFd7z.js → Add-DwgbzyUw.js} +1 -1
  5. package/dist/assets/ArrowDropDown-CbNJotqT.js +1 -0
  6. package/dist/assets/{Autocomplete-C8NhTbRF.js → Autocomplete-Dm1_2YSl.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-8EmlaNJn.js → Breadcrumbs-CJg6cGOH.js} +1 -1
  8. package/dist/assets/{ButtonGroup-BI0yydFN.js → ButtonGroup-Td8BNrZx.js} +1 -1
  9. package/dist/assets/{CSSTransition-680AnN9b.js → CSSTransition-y8iKTN7d.js} +1 -1
  10. package/dist/assets/{CallMerge-BWum6aKS.js → CallMerge-KptmKwB4.js} +1 -1
  11. package/dist/assets/{CardContent-Be8HVTG5.js → CardContent-ewSbhAdG.js} +1 -1
  12. package/dist/assets/{ChevronLeft-Bqr4v0-x.js → ChevronLeft-nSrR9D_I.js} +1 -1
  13. package/dist/assets/{ChevronRight-C92WXl3G.js → ChevronRight-CRb5GVq5.js} +1 -1
  14. package/dist/assets/{Clear-BEIkQJ0G.js → Clear-CP-1JSsG.js} +1 -1
  15. package/dist/assets/{Delete-etfqa5ht.js → Delete-zum6vOfn.js} +1 -1
  16. package/dist/assets/{DeleteOutline-Cbw_xWxX.js → DeleteOutline-BRn6KXm4.js} +1 -1
  17. package/dist/assets/{Done-BmIqndwD.js → Done-BD3-Bno_.js} +1 -1
  18. package/dist/assets/{Edit-C2AKW3eS.js → Edit-fbuEYDWz.js} +1 -1
  19. package/dist/assets/{ErrorOutline-ClnZlnrx.js → ErrorOutline-eTinVSTi.js} +1 -1
  20. package/dist/assets/{FilterList-CZU1TLat.js → FilterList-CoptEImh.js} +1 -1
  21. package/dist/assets/{Google-P_iv8JkV.js → Google-DYe0WpSM.js} +1 -1
  22. package/dist/assets/{HelpOutline-OXFYzlS-.js → HelpOutline-CTq25q-V.js} +1 -1
  23. package/dist/assets/{KeyboardArrowDown-CPhWpi6G.js → KeyboardArrowDown-DBKPniSI.js} +1 -1
  24. package/dist/assets/{Launch-Cqfwr2jr.js → Launch-BMpdke3b.js} +1 -1
  25. package/dist/assets/{Link-3-c9oFLq.js → Link-Bum1u5am.js} +1 -1
  26. package/dist/assets/{ListItemButton-B_8LnCjp.js → ListItemButton-DAHFrrOj.js} +1 -1
  27. package/dist/assets/{ListSubheader-4ZgX-yqr.js → ListSubheader-DmTgdBz5.js} +1 -1
  28. package/dist/assets/{LoadingButton-DlIR2Kfo.js → LoadingButton-Hr-4vZXO.js} +1 -1
  29. package/dist/assets/{MoreVert-C4JPmAZs.js → MoreVert-Bs574HAx.js} +1 -1
  30. package/dist/assets/{OpenInNew-BIfjUAPQ.js → OpenInNew-Df7bSVHt.js} +1 -1
  31. package/dist/assets/{Refresh-Dpf0qLZl.js → Refresh-mfLuZ9Wj.js} +1 -1
  32. package/dist/assets/{Replay-B86FlV2V.js → Replay-CUAnOum2.js} +1 -1
  33. package/dist/assets/{Search-D5OHIH5t.js → Search-CCrESOjg.js} +1 -1
  34. package/dist/assets/{Stepper-k2fg0C07.js → Stepper-CDtZbh-4.js} +1 -1
  35. package/dist/assets/{TableSearch-DKi7Ktdg.js → TableSearch-hUcYhTcB.js} +1 -1
  36. package/dist/assets/{ToggleButtonGroup-DjxoDLGP.js → ToggleButtonGroup-B8Mjp9ll.js} +1 -1
  37. package/dist/assets/{UnfoldMore-BlVk7See.js → UnfoldMore-DDQ8EkCp.js} +1 -1
  38. package/dist/assets/{Verified-6JELqJq_.js → Verified-D2LDOD6a.js} +1 -1
  39. package/dist/assets/{VerifiedUser-Bglv4i1U.js → VerifiedUser-dJrRBh25.js} +1 -1
  40. package/dist/assets/{ViewList-YgHYVpVp.js → ViewList-Dd0smq67.js} +1 -1
  41. package/dist/assets/{_createAggregator-B12F8TpH.js → _createAggregator-Btgpq5ky.js} +1 -1
  42. package/dist/assets/{actions-BUAriJOB.js → actions-Bsd5QbHY.js} +1 -1
  43. package/dist/assets/{actions-DS_Ri_37.js → actions-PjGF5ddj.js} +1 -1
  44. package/dist/assets/{agreement-r1s2sh3Y.js → agreement-CR0Ele2A.js} +1 -1
  45. package/dist/assets/api-IHWlq8qW.js +1 -0
  46. package/dist/assets/{appearance-aM7wH57p.js → appearance-Dde_YYZa.js} +1 -1
  47. package/dist/assets/{audit-logs-zQaiGV7b.js → audit-logs-BA1_e5TT.js} +1 -1
  48. package/dist/assets/{base-chart-ADeRHccn.js → base-chart-DoQaNYbB.js} +1 -1
  49. package/dist/assets/{blocklet-BmfFK15q.js → blocklet-9wr_FD8g.js} +1 -1
  50. package/dist/assets/{chain-B7t_6AFd.js → chain-xcMn0w3E.js} +1 -1
  51. package/dist/assets/{click-to-copy-B1Ez8jE-.js → click-to-copy-BkgGJ2iu.js} +1 -1
  52. package/dist/assets/cloneDeep-DvQOj2-I.js +1 -0
  53. package/dist/assets/{config-navigation-B481mXc2.js → config-navigation-B8xULYAA.js} +21 -21
  54. package/dist/assets/{connect-to-CIL-wYnq.js → connect-to-D7kv9JZG.js} +2 -2
  55. package/dist/assets/{cssMode-Rm-CifKW.js → cssMode-CrKT5NTU.js} +1 -1
  56. package/dist/assets/{delete-confirm-CuK1fe0a.js → delete-confirm-DsbMbRAa.js} +1 -1
  57. package/dist/assets/{depsEqual-Cn18gXKK.js → depsEqual-BIKlqTyk.js} +1 -1
  58. package/dist/assets/{detail-IsCuaNgz.js → detail-Y8udUtll.js} +3 -3
  59. package/dist/assets/{domains-C6NvGCZC.js → domains-B-frEuQt.js} +1 -1
  60. package/dist/assets/{download-Bi8Vdh5L.js → download-DjEQp-4L.js} +1 -1
  61. package/dist/assets/{edit.svg-17FJ505g.js → edit.svg-_S0cvmEV.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-B4otC3_4.js +1 -0
  63. package/dist/assets/engine-B_GmO38d.js +1 -0
  64. package/dist/assets/{freemarker2-d8rE1704.js → freemarker2-DMLRgxDr.js} +1 -1
  65. package/dist/assets/{get-safe-url-CDPasMZR.js → get-safe-url-DcDP4eG0.js} +1 -1
  66. package/dist/assets/getValidReactChildren-DUKHPCTn.js +1 -0
  67. package/dist/assets/{graphqlMode-DBqrr_Ti.js → graphqlMode-BF3BGh5s.js} +2 -2
  68. package/dist/assets/{handlebars-cbZ5wMAy.js → handlebars-D79JLSFR.js} +1 -1
  69. package/dist/assets/{html-BQvWPc3p.js → html-BnBm7tse.js} +1 -1
  70. package/dist/assets/{html-title-DCtKzGAT.js → html-title-CFJOQU04.js} +1 -1
  71. package/dist/assets/{htmlMode-Cmym7gaz.js → htmlMode-Dbi5GsHR.js} +1 -1
  72. package/dist/assets/{iframe-Db5U2ou8.js → iframe-DTPDSES_.js} +1 -1
  73. package/dist/assets/{index-DExySHId.js → index-8vHqMMTo.js} +1 -1
  74. package/dist/assets/{index-YVUABogE.js → index-B3S0fIB2.js} +1 -1
  75. package/dist/assets/{index-CG4ppk8J.js → index-B3f37Bjf.js} +1 -1
  76. package/dist/assets/{index-B-CzffZS.js → index-B6CCglEp.js} +1 -1
  77. package/dist/assets/{index-DGikbjUL.js → index-BESOxZme.js} +1 -1
  78. package/dist/assets/{index-DWu1iSJu.js → index-BOjP8MFh.js} +1 -1
  79. package/dist/assets/{index-Cbdkr0wH.js → index-BprceCor.js} +1 -1
  80. package/dist/assets/{index-CNDdV4IL.js → index-Br_3Odot.js} +1 -1
  81. package/dist/assets/{index-CB511uzw.js → index-BruXFS68.js} +1 -1
  82. package/dist/assets/{index-Bm0XXN_O.js → index-C-G6LjU2.js} +1 -1
  83. package/dist/assets/{index-nv0vusfQ.js → index-C0xGIN2P.js} +1 -1
  84. package/dist/assets/{index-B8HlSswG.js → index-C4bxvfjr.js} +1 -1
  85. package/dist/assets/{index-BBX_ii_N.js → index-C6w6MwHd.js} +1 -1
  86. package/dist/assets/{index-uYv-1R7S.js → index-CSqb8yB_.js} +1 -1
  87. package/dist/assets/{index-CpezWuja.js → index-CZVZy3tE.js} +1 -1
  88. package/dist/assets/{index-BiJP3v8L.js → index-CaHbIkEa.js} +1 -1
  89. package/dist/assets/{index-Bzx8w-Mu.js → index-CeVw-yV4.js} +1 -1
  90. package/dist/assets/{index-688fVCdg.js → index-Cj3feFCu.js} +1 -1
  91. package/dist/assets/{index-DT3F-KxU.js → index-CnaB1RS2.js} +1 -1
  92. package/dist/assets/{index-B9EmgVee.js → index-Cqnb030V.js} +1 -1
  93. package/dist/assets/{index-BjARkkNc.js → index-Crh7ejXx.js} +3 -3
  94. package/dist/assets/{index-C2xdmced.js → index-CsR2mhWN.js} +1 -1
  95. package/dist/assets/{index-uT6ey1Ij.js → index-CusFNu14.js} +1 -1
  96. package/dist/assets/{index-D4-1sQAl.js → index-Cy1gRvjJ.js} +1 -1
  97. package/dist/assets/{index-CZSoNWI1.js → index-CySEKiOM.js} +1 -1
  98. package/dist/assets/{index-BT4EuDNg.js → index-D09yH344.js} +1 -1
  99. package/dist/assets/{index-C1ATBIiS.js → index-D49gl1dV.js} +1 -1
  100. package/dist/assets/{index-CpRoN1v3.js → index-DAIx6BU9.js} +9 -9
  101. package/dist/assets/{index-B4wihLhl.js → index-DAzO4vT3.js} +1 -1
  102. package/dist/assets/{index-CWj_8JE3.js → index-DKlmfMu8.js} +1 -1
  103. package/dist/assets/{index-CYbhWvbu.js → index-DSki-yHd.js} +3 -3
  104. package/dist/assets/index-DdF52dPT.js +1 -0
  105. package/dist/assets/{index-CiIX-HNp.js → index-DfO0PkR5.js} +2 -2
  106. package/dist/assets/{index-BzuzQ5ox.js → index-DkNsYHWd.js} +1 -1
  107. package/dist/assets/{index-CPCvlb_T.js → index-DmsOwDxy.js} +1 -1
  108. package/dist/assets/{index-DijM3Brt.js → index-DpFVufZF.js} +4 -4
  109. package/dist/assets/{index-CpDPXgfj.js → index-DqKWQ6lA.js} +1 -1
  110. package/dist/assets/{index-DhYO7LNp.js → index-Dter8RWU.js} +1 -1
  111. package/dist/assets/{index-COMjcH0c.js → index-DxeaApG7.js} +1 -1
  112. package/dist/assets/{index-owbIHPzo.js → index-FOfUOpKU.js} +1 -1
  113. package/dist/assets/{index-2wL8aZ8Y.js → index-TkRGX0aU.js} +1 -1
  114. package/dist/assets/{index-C7eGFDSn.js → index-_p9TGBvO.js} +1 -1
  115. package/dist/assets/{index-CndCNiXH.js → index-aQCP0zMr.js} +3 -3
  116. package/dist/assets/{index-B1nZmgB5.js → index-gW2LRVpQ.js} +3 -3
  117. package/dist/assets/{index-Ad8X02VO.js → index-gY5iKTIg.js} +1 -1
  118. package/dist/assets/{index.esm--uzTB2FV.js → index.esm-DNw2WsMP.js} +1 -1
  119. package/dist/assets/{install-from-url-C0_MJ6GL.js → install-from-url-ChxBmd8y.js} +1 -1
  120. package/dist/assets/{invitation-DSBhIqPu.js → invitation-CK-9fzay.js} +1 -1
  121. package/dist/assets/{is-path-prefix-equal-nx3bAefD.js → is-path-prefix-equal-z6rXFfWF.js} +1 -1
  122. package/dist/assets/{item-ZFwK1W_m.js → item-Bi4YOXoV.js} +1 -1
  123. package/dist/assets/{javascript-QDfkina6.js → javascript-gR9EmbFN.js} +1 -1
  124. package/dist/assets/{jsonMode-CByhSCCJ.js → jsonMode-C2iokhm3.js} +1 -1
  125. package/dist/assets/{liquid-BLsruGsx.js → liquid-DlmH91G9.js} +1 -1
  126. package/dist/assets/{list-header-C17aMDSV.js → list-header-CiZSpcHw.js} +1 -1
  127. package/dist/assets/{lock.svg-Ce14O-HS.js → lock.svg-D4RerwXL.js} +1 -1
  128. package/dist/assets/{log-BYBaL_HU.js → log-fHnfsRRc.js} +1 -1
  129. package/dist/assets/{lottie-react.esm-BT7Tc0ny.js → lottie-react.esm-DwGuMXwe.js} +1 -1
  130. package/dist/assets/{mdx-DGszQu-n.js → mdx-B4KL37qQ.js} +1 -1
  131. package/dist/assets/{memory-DEYeLtlR.js → memory-_jD3viB0.js} +1 -1
  132. package/dist/assets/{metric-CcZM7hMw.js → metric-D-n9wLBp.js} +1 -1
  133. package/dist/assets/omit-CPRZ0B0R.js +1 -0
  134. package/dist/assets/{overview-DNJ7u_wX.js → overview-DTGYE6TZ.js} +1 -1
  135. package/dist/assets/{permission-B57fakhN.js → permission-a5zDq7rM.js} +1 -1
  136. package/dist/assets/{preference-BdUFP7FH.js → preference-B-CYFAI3.js} +3 -3
  137. package/dist/assets/{python-DwNaTwnF.js → python-BM52WTwZ.js} +1 -1
  138. package/dist/assets/{raf-schd.esm-CnTVXaU3.js → raf-schd.esm-B5OMlrCf.js} +1 -1
  139. package/dist/assets/{razor-CYG0tniA.js → razor-DrYd4877.js} +1 -1
  140. package/dist/assets/{rotate-session-key-rywGtiKG.js → rotate-session-key-DETYEvOS.js} +1 -1
  141. package/dist/assets/{runtime-Br1BXdVa.js → runtime-C5Qv_-EQ.js} +1 -1
  142. package/dist/assets/schema-BpWVtFwc.js +1 -0
  143. package/dist/assets/sdk-BCvN9-9d.js +1 -0
  144. package/dist/assets/{service-JGRCidBc.js → service-CU627QjX.js} +1 -1
  145. package/dist/assets/{shorten-label-DNQydA43.js → shorten-label-izVabXeE.js} +1 -1
  146. package/dist/assets/{simple-select-DTSEgkTK.js → simple-select-BSptVRvh.js} +1 -1
  147. package/dist/assets/{spaces-BCtuyMgR.js → spaces-CGMxc8V-.js} +1 -1
  148. package/dist/assets/{status-CfOHQcWj.js → status-Cc65Exxv.js} +1 -1
  149. package/dist/assets/{status-ClxmfwnA.js → status-DsuywKQN.js} +1 -1
  150. package/dist/assets/{switch-control-_mPRn1TT.js → switch-control-BrQIub8A.js} +1 -1
  151. package/dist/assets/{table-icons-BCjGfZ_O.js → table-icons-hVAZnA0-.js} +1 -1
  152. package/dist/assets/{team-DJ1sxIWJ.js → team-651xYHqY.js} +1 -1
  153. package/dist/assets/{toLower-BSV3IbDQ.js → toLower-BTh_yPFG.js} +1 -1
  154. package/dist/assets/toUpper-BY5QEPjh.js +1 -0
  155. package/dist/assets/{traffic-CKmj2zi9.js → traffic-DEO0b2pJ.js} +1 -1
  156. package/dist/assets/{tsMode-DT1APwIi.js → tsMode-DFoW-qGq.js} +1 -1
  157. package/dist/assets/{typescript-esvOVxsa.js → typescript-yTEHeHqu.js} +1 -1
  158. package/dist/assets/{url-evaluation-DNJ48_wb.js → url-evaluation-htR8cP0c.js} +1 -1
  159. package/dist/assets/{url-join-CDhrsaDR.js → url-join-CvBUjlHE.js} +1 -1
  160. package/dist/assets/{use-mobile-BlNK1r7t.js → use-mobile-B2fvjcjL.js} +1 -1
  161. package/dist/assets/{use-mobile-Do94upEI.js → use-mobile-CD0b5-fF.js} +1 -1
  162. package/dist/assets/{useAsync-BJIXRppj.js → useAsync-DTSaiLA6.js} +1 -1
  163. package/dist/assets/{useAsyncRetry-D8_fwb_i.js → useAsyncRetry-3oMBxbWI.js} +1 -1
  164. package/dist/assets/{useLocalStorage-BT1idF5p.js → useLocalStorage-pDiaOOl8.js} +1 -1
  165. package/dist/assets/{useThemeProps-Cjy804xx.js → useThemeProps-D2o2I8tH.js} +1 -1
  166. package/dist/assets/{util-BuBDzST7.js → util-CO7za6kW.js} +1 -1
  167. package/dist/assets/{wait-container-C3xVNo3H.js → wait-container-CKMtOVZ5.js} +1 -1
  168. package/dist/assets/{without-wallet-CSLsp-R3.js → without-wallet-Bz0faV9X.js} +1 -1
  169. package/dist/assets/wrap-locale-BbjqZMGZ.js +1 -0
  170. package/dist/assets/{xml-XqwsWxhl.js → xml-DOoQrL1t.js} +1 -1
  171. package/dist/assets/{yaml-CCl6p8Pa.js → yaml-CEc3MOv9.js} +1 -1
  172. package/dist/index.html +1 -1
  173. package/package.json +1 -1
  174. package/dist/assets/ArrowDropDown-JQ3Rq4ea.js +0 -1
  175. package/dist/assets/api-D8P27G7r.js +0 -1
  176. package/dist/assets/cloneDeep-CH6T7y2B.js +0 -1
  177. package/dist/assets/emotion-cache.browser.esm-Cvn7wadW.js +0 -1
  178. package/dist/assets/engine-Df3lbfPA.js +0 -1
  179. package/dist/assets/getValidReactChildren-BjYEIaVV.js +0 -1
  180. package/dist/assets/index-BvSt3OAt.js +0 -1
  181. package/dist/assets/omit-0SEPYCGW.js +0 -1
  182. package/dist/assets/schema-BKOGdXcY.js +0 -1
  183. package/dist/assets/sdk-Ml4VOZ8I.js +0 -1
  184. package/dist/assets/toUpper-P9za5QoT.js +0 -1
  185. package/dist/assets/wrap-locale-BnQ35YJ5.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B1nZmgB5.js","./index-DijM3Brt.js","./index-DGkT7afN.css","./url-join-CDhrsaDR.js","./index-DWu1iSJu.js","./_createAggregator-B12F8TpH.js","./depsEqual-Cn18gXKK.js","./index-C7eGFDSn.js","./index-DRYJ0xIl.js","./toUpper-P9za5QoT.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
- import{c1 as fp,c0 as pp,r as C,c2 as hp,eT as gp,j as g,b9 as Xe,c4 as ct,c5 as vp,hz as mp,hA as bp,gx as yp,du as xp,hB as Sp,dv as wp,bR as Sc,bS as Cp,bP as Ip,bQ as Rp,bU as wc,dy as Qn,hC as Tp,eD as _p,dG as Dp,hn as Pp,gR as kp,dF as Op,gO as Cc,hD as Ep,gB as Np,fp as Mp,eE as Ap,ha as Lp,V as Ee,a3 as rt,y as Re,aP as Bt,c8 as At,i as zp,fa as jp,aH as be,b as $e,eO as Fp,ht as Bp,dx as Dr,ez as br,di as Ic,dC as $p,hE as Gp,dB as Rc,be as Zn,dO as or,hF as F,e_ as K,eH as Wp,hG as Qr,bf as Q,o as x,dM as ei,aQ as jo,hH as Fo,cB as rr,aD as ye,K as re,ag as Hp,aT as oe,ba as Bo,dD as Xt,T as de,a4 as je,b2 as eo,bB as Ct,hI as Up,bo as Tc,E as Zr,hJ as qp,hK as Vp,t as ut,fn as Mn,O as Kp,bs as Qe,fd as _c,C as Dc,bK as Yp,hL as to,M as $o,f9 as Jp,f6 as Pc,H as Mt,P as kc,$ as Oc,v as An,hM as Ec,f as ot,dL as Xp,bz as Qp,gF as Nc,dJ as Mr,a7 as Zp,a8 as eh,hN as Ga,hO as Mc,hP as th,hQ as rh,hR as ti,fe as nh,g8 as ih,g9 as oh,ge as ri,bE as Te,hS as ah,h6 as sh,hT as lh,hU as ch,gK as uh,hV as Ln,hW as Ac,L as Lc,z as ni,hX as Wa,hY as zc,hZ as ro,h_ as dh,h$ as fh,s as dr,i0 as ph,f5 as hh,cA as jc,i1 as gh,bH as vh,i2 as mh,dI as et,D as bh,X as yh,cw as xh,i3 as Sh,b0 as wh,bh as Ha,R as zn,a9 as Ua,i4 as Ch,i5 as Ih,i6 as Rh,i7 as Th,i8 as Fc,i9 as _h,aB as Bc,f0 as $c,ia as Go,ib as Dh,hj as Gc,ic as Ph,b6 as kh,cF as Qt,id as Oh,ie as Wc,dq as In,I as Eh,av as jn,ig as Nh,bA as Mh,cz as Wo,ih as Ah,gI as Lh,ii as Hc,aW as zh,ij as jh,cU as Fh,ik as Bh,d3 as $h,G as qa,eI as Va,dN as Gh,a5 as Uc,Y as Ka,il as Ya,Q as Wh,S as Ja}from"./index-DijM3Brt.js";import{r as Hh}from"./omit-0SEPYCGW.js";import{r as Uh}from"./cloneDeep-CH6T7y2B.js";import{r as qh}from"./index-DWu1iSJu.js";import{c as Vh,u as Kh}from"./_createAggregator-B12F8TpH.js";import{u as $t}from"./blocklet-BmfFK15q.js";import{H as Yh,G as Jh,M as Xh,N as Qh,O as Xa,K as Zh,L as eg}from"./index-Cbdkr0wH.js";import{_ as we,a as Ie,b as Ue,c as qe,d as Ve,e as tg,f as qc,u as fe,g as ae,r as Gr,w as Fn,h as Vc,i as Gt,j as Kc,k as rg,l as ng,o as no}from"./raf-schd.esm-CnTVXaU3.js";import{_ as A,b as Qa,c as ig,a as og,d as ag}from"./redux-DfszZyTl.js";import{_ as sg}from"./typeof-QjJsDpFa.js";import{u as Yc,b as lg}from"./team-DJ1sxIWJ.js";import{b as cg}from"./actions-BUAriJOB.js";import{u as ug,a as dg,C as pt}from"./index.esm--uzTB2FV.js";import{S as io}from"./simple-select-DTSEgkTK.js";import{b as fg,a as Za,T as pg}from"./html-title-DCtKzGAT.js";import{C as Jc}from"./Clear-BEIkQJ0G.js";import{A as hg}from"./ArrowDropDown-JQ3Rq4ea.js";import{a as gg}from"./api-D8P27G7r.js";import{A as vg}from"./Autocomplete-C8NhTbRF.js";import{L as mg}from"./ListItemButton-B_8LnCjp.js";import{u as Xc}from"./use-mobile-BlNK1r7t.js";import{u as bg}from"./index-688fVCdg.js";import{d as yg}from"./KeyboardArrowDown-CPhWpi6G.js";import{S as xg}from"./Search-D5OHIH5t.js";import{A as Sg}from"./Add-17-jFd7z.js";import{O as wg}from"./OpenInNew-BIfjUAPQ.js";import{t as Cg}from"./index-CZSoNWI1.js";import{I as Ig}from"./iframe-Db5U2ou8.js";import{B as yi}from"./ButtonGroup-BI0yydFN.js";import{L as es}from"./LoadingButton-DlIR2Kfo.js";import"./depsEqual-Cn18gXKK.js";import"./url-evaluation-DNJ48_wb.js";import"./useLocalStorage-BT1idF5p.js";import"./MoreVert-C4JPmAZs.js";import"./DeleteOutline-Cbw_xWxX.js";import"./get-safe-url-CDPasMZR.js";import"./permission-B57fakhN.js";import"./ListSubheader-4ZgX-yqr.js";import"./getValidReactChildren-BjYEIaVV.js";function Rg(e){return fp("MuiListItemAvatar",e)}pp("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Tg=e=>{const{alignItems:r,classes:n}=e;return vp({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Rg,n)},_g=Xe("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),ts=C.forwardRef(function(r,n){const t=hp({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=C.useContext(gp),s={...t,alignItems:a.alignItems},l=Tg(s);return g.jsx(_g,{className:ct(l.root,i),ownerState:s,ref:n,...o})});var Dg=mp(function(){return bp?sessionStorage:void 0});function Pg(e,r){return yp(r,function(n){return e[n]})}function kg(e){return e==null?[]:Pg(e,xp(e))}var Og=Sp.isFinite;function rs(e){return typeof e=="number"&&Og(e)}function Eg(e){return typeof e=="number"&&e==wp(e)}var Ng=Vh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const Mg=Object.freeze(Object.defineProperty({__proto__:null,default:Ng},Symbol.toStringTag,{value:"Module"}));var Ag=Sc(function(e){var r=Cp(e);return r=typeof r=="function"?r:void 0,Ip(Rp(e,1,wc,!0),void 0,r)});const Lg=Object.freeze(Object.defineProperty({__proto__:null,default:Ag},Symbol.toStringTag,{value:"Module"}));var Qc=Sc(function(e,r){return wc(e)?cg(e,r):[]}),yr={};const zg=Qn(Lg),jg=Qn(Tp),Fg=Qn(Mg);var ns;function Bg(){return ns||(ns=1,function(e){var r=yr&&yr.__importDefault||function(G){return G&&G.__esModule?G:{default:G}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ue,e.deepWalk=D,e.isMatchSection=S,e.nestNavigationList=X,e.filterNavigation=Z,e.cleanOrphanNavigation=q,e.joinLink=M,e.flattenNavigation=H,e.splitNavigationBySection=ee;const n=_p(),t=Dp(),i=r(zg),o=r(Pp),a=r(kp),s=r(jg),l=r(Op),c=r(Hh),u=r(Uh),d=Lp(),f=r(qh()),p=r(Cc()),h=r(Ep),v=r(Np),m=r(Fg),b=Mp(),y=Ap();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return y.checkLink}});const I="header",_="/",P="/",w="/";function D(G,W=()=>{},{key:k="children",order:N="first"}={}){function j(V,{index:te=0,parent:se=null,level:pe=0}={}){Array.isArray(V)?V.forEach((me,Ce)=>{j(me,{index:Ce,parent:se,level:pe+1})}):V&&(N==="first"&&W(V,se,{index:te,level:pe}),j(V[k],{parent:V,level:pe}),N==="last"&&W(V,se,{index:te,level:pe}))}j(G)}function S(G,W){return W===I&&(0,s.default)(G)?!0:Array.isArray(G)?G.includes(W):G===W}function T(G){try{return JSON.parse(G)}catch{return G}}function R(G){return G.map(W=>{const k={...W};return k.role&&(k.role=T(k.role)),k.section&&(k.section=T(k.section)),k.title&&(k.title=T(k.title)),k.description&&(k.description=T(k.description)),k.link&&(k.link=T(k.link)),k})}function O(G="/",W=""){if((0,p.default)(W||""))return W;const k=f.default.join(G,W||P);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function L(G,W,{strict:k=!0}={}){let N=G,j=W;return k||(N=N||"/",j=j||"/"),(0,h.default)(N)&&(0,v.default)(j)&&(0,y.checkLink)(j)?Object.keys(N).reduce((V,te)=>(V[te]=O(N[te],j),V),{}):(0,v.default)(N)&&(0,y.checkLink)(N)&&(0,h.default)(j)?Object.keys(j).reduce((V,te)=>(V[te]=O(N,j[te]),V),{}):(0,v.default)(N)&&(0,v.default)(j)?(0,y.checkLink)(N)||(0,y.checkLink)(j)?O(N,j):j:(0,h.default)(N)&&(0,h.default)(j)?[...new Set([...Object.keys(N),...Object.keys(j)])].reduce((te,se)=>(te[se]=O(N[se],j[se]),te),{}):j}function M(G,W){const k=(0,u.default)(G);return D(k,(N,j)=>{const V=N.component||N.child;if(V){const te=W.find(se=>se.name===V);te&&(N.link=L(te.link,N.link,{strict:!1}))}else j&&(N.link=L(j.link,N.link))},{key:"items"}),k}function H(G=[],{depth:W=1,transform:k=N=>N}={}){const N=(0,u.default)(G),j=[];return D(N,(V,te,{level:se})=>{if(se>=W){const{items:pe=[]}=V;if(pe&&Array.isArray(pe)&&pe.length>0){delete V.items;const me=pe.map(Ce=>k(Ce,V));if(te)te.items.push(...me);else{const Ce=k((0,c.default)(V,["items"]),te);j.push(Ce,...me)}}else if(se===1){const me=k((0,c.default)(V,["items"]),te);j.push(me)}}else se===1&&j.push(V)},{key:"items",order:"last"}),j}function E(G){if(G.section!=="bottomNavigation")return G;const W={...G};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const N=W[k];typeof N=="string"&&(W[k]={en:N})}),W}function B(G={}){const W=[];function k(j,V={}){const te=[],{children:se=[],meta:pe={}}=j,me=(0,u.default)(pe?.navigation||[]);(0,b.hasStartEngine)(pe)&&j.meta?.capabilities?.navigation!==!1&&te.push(...me);const Ce=V.name||"",Se=V.mountPoint||_,Pe=j===G?"":pe.name||"",Fe=j===G?"":j.mountPoint||_;for(const ke of se){if(!(0,b.hasStartEngine)(ke.meta))continue;const he=ke.meta.name,xe=ke.mountPoint,dt=[Ce,Pe,he].filter(Boolean).join("."),mr=ke.meta.navigation||[],bi=(0,d.joinURL)(Se,Fe,xe);ke.meta?.capabilities?.navigation!==!1&&W.push({did:ke.meta.did,name:dt,link:bi,title:ke.meta.title||"",navigation:mr.map(Ke=>({section:I,...Ke}))});const ft=me.find(Ke=>Ke.component?Ke.component===he:!1);if(ft){if(!ft.link)if(ke.meta.navigation&&ke.meta.navigation.length>0){const Ke=k(ke,{mountPoint:Fe,name:Pe});Ke.length>0&&(ft.items=ft.items??[],ft.items.push(...Ke))}else ft.link=P}else if(ke.meta?.capabilities?.navigation!==!1){const Ke=k(ke,{mountPoint:Fe,name:Pe}),dn={title:ke.meta.title,component:he,id:ke.meta.did};Ke.length>0?(dn.items=Ke,dn.link=void 0):dn.link=P,te.push(dn)}}return te}return{navigationList:k(G),components:W}}function $(G){const W=(0,u.default)(G).filter(k=>k.id);return D(W,(k,N)=>{if(k.items&&k.items.length){for(let j=k.items.length-1;j>=0;j--)k.items[j].id||k.items.splice(j,1);k.items.length===0&&k.component&&(k.link=k.link||P)}N&&(k.parent=N.id,k.id=[N.id,k.id].join(w)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),W}function U(G,W=2){const k=(0,u.default)(G),N=H(k,{depth:W,transform:(j,V)=>(V&&(j._parent||(j._parent=V.id,V.component||(j.link=L(V.link,j.link))),j.section=j.section||V.section||[I],j.visible=j.visible??V.visible,V.role&&(j.role=j.role||V.role)),j.component=[V.component,j.component].filter(Boolean).join("."),j)});return D(N,j=>{j.items&&j.items.length>0&&j.items.reduceRight((V,te)=>{if(te._parent){const se=j.items.findIndex(pe=>pe.id===te._parent);se>=0&&j.items.splice(se,1),delete te._parent}return null},null)},{key:"items"}),N}function J(G,W){return W&&Array.isArray(G.items)?G.items.filter(k=>(0,s.default)(k.section)?S(G.section,W):!!S(k.section,W)).map(k=>({...k,section:W})):[]}function ee(G){const W=(0,u.default)(G),k=[];for(const N of W){let te=function(se,pe){const me=J(se,pe);V.push({...j,section:pe,items:me})};const j=(0,u.default)((0,c.default)(N,["items"])),V=[];if(Array.isArray(N.section))for(const se of N.section)te(N,se);else if(N.section){const{section:se}=N;te(N,se)}else if(N.items&&N.items.length>0){const se=N.items.reduce((me,Ce)=>{const{section:Se=[I]}=Ce||{};return me.push(...Se),me},[]),pe=[...new Set(se)];for(const me of pe)te(N,me)}else V.push({...N,section:I});k.push(...V)}return k}function X(G=[]){const W=(0,u.default)(G);return W.reduceRight((k,N,j)=>{if(N.parent){const V=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);V&&(V.items||(V.items=[]),V.items=[N,...V.items]),W.splice(j,1)}return null},null),W}function Z(G,W=[]){const k=X(G);return D(k,j=>{if(j?.component&&(W.some(V=>V.name===j.component)||(j.visible=!1)),j.items&&j.items.length)for(let V=j.items.length-1;V>=0;V--)j.items[V].visible===!1&&j.items.splice(V,1)},{key:"items"}),k.filter(j=>!(j.visible===!1||j.items&&Array.isArray(j.items)&&j.items.length>0&&j.items?.every(V=>V.visible===!1)))}function q(G){return G.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const ne=G=>{const[W,k]=(0,m.default)(G,V=>V.id===t.NAV_GROUP_SYSTEM),[N,j]=(0,m.default)(k,V=>V.id===t.NAV_GROUP_SERVICES);return[...W,...N,...j]};e.sortRootNavigation=ne;const ie=G=>{const[,W]=(0,m.default)(G,k=>{const N=typeof k.title=="string"?k.title:k.title?.en;return k.id===t.NAV_GROUP_TEAM||k.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=ie;function ue(G={},W={}){const{beforeProcess:k=he=>he}=W,{navigationList:N,components:j}=B(G),V=new Map;N.forEach(he=>{he.items?.forEach(xe=>{V.set((0,d.joinURL)(he.id,xe.id),xe)})});const te=(0,l.default)(G,"settings.org.enabled",!1),se=[t.NAV_GROUP_TEAM,t.NAV_GROUP_SYSTEM,t.NAV_GROUP_SERVICES];G?.settings?.navigations&&(Array.isArray(G.settings.navigations)?G.settings.navigations=[...G.settings.navigations].filter(he=>!(he.from==="team-tmpl"&&se.includes(he?.parent))).map(he=>{if(he.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(he,"private")){const xe=V.get(he.id);xe&&Object.prototype.hasOwnProperty.call(xe,"private")&&(he.private=xe.private)}return!te&&he.section==="userCenter"&&he.id==="/userCenter/orgs"?null:he}).filter(Boolean):G.settings.navigations=[]);const pe=R(ie(G?.settings?.navigations||[])).map(E),me=U(k(N)),Ce=$(me),Pe=ee(Ce).reduce((he,xe)=>["bottom","social","sessionManager","userCenter"].includes(xe.section)&&xe.items&&xe.items.length>0?(he.push(...xe.items.map(mr=>{const{section:bi}=xe,ft=L(xe.link,mr.link),Ke=[xe.component,mr.component].filter(Boolean).join(".");return{...mr,section:bi,link:ft,component:Ke,parent:""}})),he):(he.push(xe),he),[]),Fe=H(Pe,{transform(he,xe){let{component:dt}=he;return xe?.component&&(dt=[xe.component,he.component].filter(Boolean).join(".")),E({...he,component:dt})}});return{navigationList:(0,i.default)(pe,Fe,(he,xe)=>{const dt=["id","section"];return(0,o.default)((0,a.default)(he,dt),(0,a.default)(xe,dt))}),components:j,builtinList:Fe}}}(yr)),yr}var Ae=Bg();const Zc=C.createContext(null),is="/",$g="header",os={userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled},{id:"/userCenter/nfts",title:{en:"NFTs",zh:"NFTs"},icon:"ant-design:gold-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/nfts"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/settings",title:{en:"Settings",zh:"设置"},icon:"ant-design:setting-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/did-spaces",title:{en:"DID Spaces",zh:"DID Spaces"},icon:"ant-design:cloud-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Follow",zh:"关注"},icon:"ant-design:user-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function xi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const at=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),as=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Gg=(e,r)=>{const n=Ae.cleanOldNavigationHistory(r),t=n.findIndex(a=>a.id===$e.NAV_GROUP_TEAM);return t>=0&&n.splice(t,1),n.findIndex(a=>a.id===$e.NAV_GROUP_SERVICES)===-1&&n.unshift(as($e.NAV_GROUP_SERVICES,e("navigation.services"),[at("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),at("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),at("notification",e("navigation.notification"),"ant-design:bell-outlined","/admin/notification"),at("aigne",e("navigation.aigne"),"hugeicons:artificial-intelligence-04","/admin/aigne"),at("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),at("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n.findIndex(a=>a.id===$e.NAV_GROUP_SYSTEM)===-1&&n.unshift(as($e.NAV_GROUP_SYSTEM,e("navigation.system"),[at("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),at("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),at("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations")])),n};function ss({name:e}){return g.jsx(Fp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Wg({children:e}){const{blocklet:r,actions:n}=$t(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=Ae.parseNavigation(r,{beforeProcess(w){const D=rt(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(os,S)&&os[S].forEach(T=>{(T.shouldDisplay&&typeof T.shouldDisplay=="function"?T.shouldDisplay:()=>!0)(r)&&!D.some(O=>O.id===T.id)&&D.push(T)})}),Gg(t,D)}}),s=Bt({rawNavigation:rt(i),activeSection:$g,components:o}),l=C.useMemo(()=>Ae.sortRootNavigation(Ae.nestNavigationList(rt(s.rawNavigation))),[s.rawNavigation]),c=C.useMemo(()=>{const w=Ae.filterNavigation(rt(s.rawNavigation),o);return Ae.joinLink(w,o)},[o,s.rawNavigation]),u=C.useCallback(w=>{if(!w.id)return"";const D=Ae.flattenNavigation(Ae.joinLink(l,o)),S=D.find(T=>T.id===w.id);if(S?.component){if(!o.some(T=>T.name===S.component))return g.jsx(ss,{name:S.component})}else if(S.parent){const T=D.find(R=>R.id===S.parent);if(T?.component&&!o.some(R=>R.name===T.component))return g.jsx(ss,{name:T.component})}return S?.link},[l,o]),d=C.useCallback(w=>{s.activeSection=w},[s]),f=C.useCallback(w=>{const D=[];Ae.deepWalk(w,(T,R)=>{const O={...At(T,["children","expand"]),parent:R?.id};D.push(O)});const S=rt(s.rawNavigation).filter(T=>{if(!s.activeSection)return!1;const R=D.find(O=>xi(O,T));return R?!Ae.isMatchSection(R.section,s.activeSection):!0});s.rawNavigation=[...S,...D]},[s]),p=C.useCallback((w=[])=>{const D=rt(s.rawNavigation).map(S=>{const T=w.find(R=>xi({...R,section:s.activeSection},S));return T?{...S,...T}:S});s.rawNavigation=D},[s]),h=C.useCallback((w,D=is)=>w.map(T=>{const O=o.find(H=>H.name===T.component)?.link||D,L=T.items||[],{link:M}=T;return{title:T.title,description:T.description,subtitle:u(T),link:M,icon:T.icon,children:h(L,M||is),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:O}}),[o,u]),v=C.useCallback(w=>{p([w])},[p]),m=C.useCallback(w=>{const D=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=rt(s.rawNavigation).filter(S=>!D.includes(S.id))},[s]),b=C.useCallback((w={},D=-1)=>{const S={...w,id:zp.nanoid(),section:s.activeSection,visible:!0},T=[...s.rawNavigation],R=T.filter(O=>O.section===s.activeSection);if(D<0||D>R.length-1)T.push(S);else{const O=R[D],L=T.findIndex(M=>xi(M,O));T.splice(L,0,S)}return s.rawNavigation=T,S},[s]),y=C.useCallback(w=>{const S=rt(l).filter(T=>Ae.isMatchSection(T.section,w));return h(S)},[l,h]),I=C.useCallback(async w=>{const S=w.map(T=>jp(T,Bp)).map(T=>{const R={...T};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(S)},[n]),_=C.useCallback(async w=>{if(w){const D=a.filter(T=>Ae.isMatchSection(T.section,w)),S=s.rawNavigation.filter(T=>!Ae.isMatchSection(T.section,w));await I(S),s.rawNavigation=[...S,...D]}else await I([]),s.rawNavigation=rt(a)},[I,s,a]),P=C.useMemo(()=>({state:s,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:d,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:b,updateNavigationTree:f,getNavigation:y,saveNavigationList:I,resetNavigation:_}),[s,c,o,u,d,v,m,b,f,y,I,_]);return g.jsx(Zc.Provider,{value:P,children:e})}function eu(){const e=C.useContext(Zc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ze={},Si,ls;function Hg(){if(ls)return Si;ls=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l=typeof Dr=="object"&&Dr&&Dr.Object===Object&&Dr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype,f=d.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,D,S){var T,R,O,L,M,H,E=0,B=!1,$=!1,U=!0;if(typeof w!="function")throw new TypeError(e);D=P(D)||0,y(S)&&(B=!!S.leading,$="maxWait"in S,O=$?p(P(S.maxWait)||0,D):O,U="trailing"in S?!!S.trailing:U);function J(W){var k=T,N=R;return T=R=void 0,E=W,L=w.apply(N,k),L}function ee(W){return E=W,M=setTimeout(q,D),B?J(W):L}function X(W){var k=W-H,N=W-E,j=D-k;return $?h(j,O-N):j}function Z(W){var k=W-H,N=W-E;return H===void 0||k>=D||k<0||$&&N>=O}function q(){var W=v();if(Z(W))return ne(W);M=setTimeout(q,X(W))}function ne(W){return M=void 0,U&&T?J(W):(T=R=void 0,L)}function ie(){M!==void 0&&clearTimeout(M),E=0,T=H=R=M=void 0}function ue(){return M===void 0?L:ne(v())}function G(){var W=v(),k=Z(W);if(T=arguments,R=this,H=W,k){if(M===void 0)return ee(H);if($)return M=setTimeout(q,D),J(H)}return M===void 0&&(M=setTimeout(q,D)),L}return G.cancel=ie,G.flush=ue,G}function b(w,D,S){var T=!0,R=!0;if(typeof w!="function")throw new TypeError(e);return y(S)&&(T="leading"in S?!!S.leading:T,R="trailing"in S?!!S.trailing:R),m(w,D,{leading:T,maxWait:D,trailing:R})}function y(w){var D=typeof w;return!!w&&(D=="object"||D=="function")}function I(w){return!!w&&typeof w=="object"}function _(w){return typeof w=="symbol"||I(w)&&f.call(w)==n}function P(w){if(typeof w=="number")return w;if(_(w))return r;if(y(w)){var D=typeof w.valueOf=="function"?w.valueOf():w;w=y(D)?D+"":D}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?s(w.slice(2),S?2:8):i.test(w)?r:+w}return Si=b,Si}var xr={exports:{}},kt={exports:{}},Ug=kt.exports,cs;function qg(){return cs||(cs=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?kt.exports=function(){return performance.now()}:typeof br<"u"&&br!==null&&br.hrtime?(kt.exports=function(){return(e()-i)/1e6},r=br.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=br.uptime()*1e9,i=t-o):Date.now?(kt.exports=function(){return Date.now()-n},n=Date.now()):(kt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Ug)),kt.exports}var us;function Vg(){if(us)return xr.exports;us=1;for(var e=qg(),r=typeof window>"u"?Dr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var s=0,l=0,c=[],u=1e3/60;i=function(d){if(c.length===0){var f=e(),p=Math.max(0,u-(f-s));s=p+f,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++l,callback:d,cancelled:!1}),l},o=function(d){for(var f=0;f<c.length;f++)c[f].handle===d&&(c[f].cancelled=!0)}}return xr.exports=function(d){return i.call(r,d)},xr.exports.cancel=function(){o.apply(r,arguments)},xr.exports.polyfill=function(d){d||(d=r),d.requestAnimationFrame=i,d.cancelAnimationFrame=o},xr.exports}var fn={},ds;function Kg(){if(ds)return fn;ds=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return fn}var Ht={},fs;function Yg(){if(fs)return Ht;fs=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.noop=e,Ht.intBetween=r,Ht.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return Ht}var ps;function Jg(){if(ps)return Ze;ps=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.createHorizontalStrength=T,Ze.createVerticalStrength=R,Ze.createScrollingComponent=M,Ze.default=H,Ze.defaultVerticalStrength=Ze.defaultHorizontalStrength=void 0;var e=u(Ic()),r=c(Rc()),n=$p(),t=c(Hg()),i=c(Vg()),o=c(Kg()),a=Yh,s=c(Gp()),l=Yg();function c(E){return E&&E.__esModule?E:{default:E}}function u(E){if(E&&E.__esModule)return E;var B={};if(E!=null){for(var $ in E)if(Object.prototype.hasOwnProperty.call(E,$)){var U=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,$):{};U.get||U.set?Object.defineProperty(B,$,U):B[$]=E[$]}}return B.default=E,B}function d(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function($){return typeof $}:d=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},d(E)}function f(){return f=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var $=arguments[B];for(var U in $)Object.prototype.hasOwnProperty.call($,U)&&(E[U]=$[U])}return E},f.apply(this,arguments)}function p(E,B){if(E==null)return{};var $=h(E,B),U,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)U=ee[J],!(B.indexOf(U)>=0)&&Object.prototype.propertyIsEnumerable.call(E,U)&&($[U]=E[U])}return $}function h(E,B){if(E==null)return{};var $={},U=Object.keys(E),J,ee;for(ee=0;ee<U.length;ee++)J=U[ee],!(B.indexOf(J)>=0)&&($[J]=E[J]);return $}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var $=0;$<B.length;$++){var U=B[$];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(E,U.key,U)}}function b(E,B,$){return B&&m(E.prototype,B),E}function y(E,B){return B&&(d(B)==="object"||typeof B=="function")?B:w(E)}function I(E){return I=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},I(E)}function _(E,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(B&&B.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),B&&P(E,B)}function P(E,B){return P=Object.setPrototypeOf||function(U,J){return U.__proto__=J,U},P(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function D(E,B,$){return B in E?Object.defineProperty(E,B,{value:$,enumerable:!0,configurable:!0,writable:!0}):E[B]=$,E}var S=150;function T(E){return function($,U){var J=$.x,ee=$.w,X=$.y,Z=$.h,q=Math.min(ee/2,E),ne=U.x>=J&&U.x<=J+ee,ie=ne&&U.y>=X&&U.y<=X+Z;if(ie){if(U.x<J+q)return(U.x-J-q)/q;if(U.x>J+ee-q)return-(J+ee-U.x-q)/q}return 0}}function R(E){return function($,U){var J=$.y,ee=$.h,X=$.x,Z=$.w,q=Math.min(ee/2,E),ne=U.y>=J&&U.y<=J+ee,ie=ne&&U.x>=X&&U.x<=X+Z;if(ie){if(U.y<J+q)return(U.y-J-q)/q;if(U.y>J+ee-q)return-(J+ee-U.y-q)/q}return 0}}var O=T(S);Ze.defaultHorizontalStrength=O;var L=R(S);Ze.defaultVerticalStrength=L;function M(E){var B=function($){_(U,$);function U(J,ee){var X;return v(this,U),X=y(this,I(U).call(this,J,ee)),D(w(w(X)),"updateScrolling",(0,t.default)(function(Z){var q=X.container.getBoundingClientRect(),ne=q.left,ie=q.top,ue=q.width,G=q.height,W={x:ne,y:ie,w:ue,h:G},k=(0,l.getCoords)(Z),N=X.props,j=N.horizontalStrength,V=N.verticalStrength;X.scaleX=j(W,k),X.scaleY=V(W,k),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),D(w(w(X)),"handleEvent",function(Z){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(Z))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return b(U,[{key:"componentDidMount",value:function(){var ee=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return ee.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var ee=this.props.dragDropManager,X=ee.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var ee=this,X=0,Z=function q(){var ne=ee.scaleX,ie=ee.scaleY,ue=ee.container,G=ee.props,W=G.strengthMultiplier,k=G.onScrollChange;if(W===0||ne+ie===0){ee.stopScrolling();return}if(X+=1,X%2){var N=ue.scrollLeft,j=ue.scrollTop,V=ue.scrollWidth,te=ue.scrollHeight,se=ue.clientWidth,pe=ue.clientHeight,me=ne?ue.scrollLeft=(0,l.intBetween)(0,V-se,N+ne*W):N,Ce=ie?ue.scrollTop=(0,l.intBetween)(0,te-pe,j+ie*W):j;k(me,Ce)}ee.frame=(0,i.default)(q)};Z()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var X=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,f({ref:this.wrappedInstance},X))}}]),U}(e.Component);return D(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),D(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),D(B,"defaultProps",{onScrollChange:l.noop,verticalStrength:L,horizontalStrength:O,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function($){return e.default.createElement(a.DragDropContextConsumer,null,function(U){var J=U.dragDropManager;return J===void 0?null:e.default.createElement(B,f({},$,{dragDropManager:J}))})}}return Ze}var Rn=Jg();const Xg=Zn(Rn);var Qg=Jh();const hs=Zn(Qg);function tu(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function ru(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function nu(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}tu.__suppressDeprecationWarning=!0;ru.__suppressDeprecationWarning=!0;nu.__suppressDeprecationWarning=!0;function en(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-gW2LRVpQ.js","./index-DpFVufZF.js","./index-DGkT7afN.css","./url-join-CvBUjlHE.js","./index-BOjP8MFh.js","./_createAggregator-Btgpq5ky.js","./depsEqual-BIKlqTyk.js","./index-_p9TGBvO.js","./index-DRYJ0xIl.js","./toUpper-BY5QEPjh.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
+ import{c1 as fp,c0 as pp,r as C,c2 as hp,eT as gp,j as g,b9 as Xe,c4 as ct,c5 as vp,hz as mp,hA as bp,gx as yp,du as xp,hB as Sp,dv as wp,bR as Sc,bS as Cp,bP as Ip,bQ as Rp,bU as wc,dy as Qn,hC as Tp,eD as _p,dG as Dp,hn as Pp,gR as kp,dF as Op,gO as Cc,hD as Ep,gB as Np,fp as Mp,eE as Ap,ha as Lp,V as Ee,a3 as rt,y as Re,aP as Bt,c8 as At,i as zp,fa as jp,aH as be,b as $e,eO as Fp,ht as Bp,dx as _r,ez as br,di as Ic,dC as $p,hE as Gp,dB as Rc,be as Zn,dO as or,hF as F,e_ as K,eH as Wp,hG as Qr,bf as Q,o as x,dM as ei,aQ as jo,hH as Fo,cB as rr,aD as ye,K as re,ag as Hp,aT as oe,ba as Bo,dD as Xt,T as de,a4 as je,b2 as eo,bB as Ct,hI as Up,bo as Tc,E as Zr,hJ as qp,hK as Vp,t as ut,fn as Mn,O as Kp,bs as Qe,fd as _c,C as Dc,bK as Yp,hL as to,M as $o,f9 as Jp,f6 as Pc,H as Mt,P as kc,$ as Oc,v as An,hM as Ec,f as ot,dL as Xp,bz as Qp,gF as Nc,dJ as Mr,a7 as Zp,a8 as eh,hN as Ga,hO as Mc,hP as th,hQ as rh,hR as ti,fe as nh,g8 as ih,g9 as oh,ge as ri,bE as Te,hS as ah,h6 as sh,hT as lh,hU as ch,gK as uh,hV as Ln,hW as Ac,L as Lc,z as ni,hX as Wa,hY as zc,hZ as ro,h_ as dh,h$ as fh,s as dr,i0 as ph,f5 as hh,cA as jc,i1 as gh,bH as vh,i2 as mh,dI as et,D as bh,X as yh,cw as xh,i3 as Sh,b0 as wh,bh as Ha,R as zn,a9 as Ua,i4 as Ch,i5 as Ih,i6 as Rh,i7 as Th,i8 as Fc,i9 as _h,aB as Bc,f0 as $c,ia as Go,ib as Dh,hj as Gc,ic as Ph,b6 as kh,cF as Qt,id as Oh,ie as Wc,dq as In,I as Eh,av as jn,ig as Nh,bA as Mh,cz as Wo,ih as Ah,gI as Lh,ii as Hc,aW as zh,ij as jh,cU as Fh,ik as Bh,d3 as $h,G as qa,eI as Va,dN as Gh,a5 as Uc,Y as Ka,il as Ya,Q as Wh,S as Ja}from"./index-DpFVufZF.js";import{r as Hh}from"./omit-CPRZ0B0R.js";import{r as Uh}from"./cloneDeep-DvQOj2-I.js";import{r as qh}from"./index-BOjP8MFh.js";import{c as Vh,u as Kh}from"./_createAggregator-Btgpq5ky.js";import{u as $t}from"./blocklet-9wr_FD8g.js";import{H as Yh,G as Jh,M as Xh,N as Qh,O as Xa,K as Zh,L as eg}from"./index-BprceCor.js";import{_ as we,a as Ie,b as Ue,c as qe,d as Ve,e as tg,f as qc,u as fe,g as ae,r as Gr,w as Fn,h as Vc,i as Gt,j as Kc,k as rg,l as ng,o as no}from"./raf-schd.esm-B5OMlrCf.js";import{_ as A,b as Qa,c as ig,a as og,d as ag}from"./redux-DfszZyTl.js";import{_ as sg}from"./typeof-QjJsDpFa.js";import{u as Yc,b as lg}from"./team-651xYHqY.js";import{b as cg}from"./actions-Bsd5QbHY.js";import{u as ug,a as dg,C as pt}from"./index.esm-DNw2WsMP.js";import{S as io}from"./simple-select-BSptVRvh.js";import{b as fg,a as Za,T as pg}from"./html-title-CFJOQU04.js";import{C as Jc}from"./Clear-CP-1JSsG.js";import{A as hg}from"./ArrowDropDown-CbNJotqT.js";import{a as gg}from"./api-IHWlq8qW.js";import{A as vg}from"./Autocomplete-Dm1_2YSl.js";import{L as mg}from"./ListItemButton-DAHFrrOj.js";import{u as Xc}from"./use-mobile-B2fvjcjL.js";import{u as bg}from"./index-Cj3feFCu.js";import{d as yg}from"./KeyboardArrowDown-DBKPniSI.js";import{S as xg}from"./Search-CCrESOjg.js";import{A as Sg}from"./Add-DwgbzyUw.js";import{O as wg}from"./OpenInNew-Df7bSVHt.js";import{t as Cg}from"./index-CySEKiOM.js";import{I as Ig}from"./iframe-DTPDSES_.js";import{B as yi}from"./ButtonGroup-Td8BNrZx.js";import{L as es}from"./LoadingButton-Hr-4vZXO.js";import"./depsEqual-BIKlqTyk.js";import"./url-evaluation-htR8cP0c.js";import"./useLocalStorage-pDiaOOl8.js";import"./MoreVert-Bs574HAx.js";import"./DeleteOutline-BRn6KXm4.js";import"./get-safe-url-DcDP4eG0.js";import"./permission-a5zDq7rM.js";import"./ListSubheader-DmTgdBz5.js";import"./getValidReactChildren-DUKHPCTn.js";function Rg(e){return fp("MuiListItemAvatar",e)}pp("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Tg=e=>{const{alignItems:r,classes:n}=e;return vp({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Rg,n)},_g=Xe("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),ts=C.forwardRef(function(r,n){const t=hp({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=C.useContext(gp),s={...t,alignItems:a.alignItems},l=Tg(s);return g.jsx(_g,{className:ct(l.root,i),ownerState:s,ref:n,...o})});var Dg=mp(function(){return bp?sessionStorage:void 0});function Pg(e,r){return yp(r,function(n){return e[n]})}function kg(e){return e==null?[]:Pg(e,xp(e))}var Og=Sp.isFinite;function rs(e){return typeof e=="number"&&Og(e)}function Eg(e){return typeof e=="number"&&e==wp(e)}var Ng=Vh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const Mg=Object.freeze(Object.defineProperty({__proto__:null,default:Ng},Symbol.toStringTag,{value:"Module"}));var Ag=Sc(function(e){var r=Cp(e);return r=typeof r=="function"?r:void 0,Ip(Rp(e,1,wc,!0),void 0,r)});const Lg=Object.freeze(Object.defineProperty({__proto__:null,default:Ag},Symbol.toStringTag,{value:"Module"}));var Qc=Sc(function(e,r){return wc(e)?cg(e,r):[]}),yr={};const zg=Qn(Lg),jg=Qn(Tp),Fg=Qn(Mg);var ns;function Bg(){return ns||(ns=1,function(e){var r=yr&&yr.__importDefault||function(G){return G&&G.__esModule?G:{default:G}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ue,e.deepWalk=D,e.isMatchSection=S,e.nestNavigationList=X,e.filterNavigation=Z,e.cleanOrphanNavigation=q,e.joinLink=M,e.flattenNavigation=H,e.splitNavigationBySection=ee;const n=_p(),t=Dp(),i=r(zg),o=r(Pp),a=r(kp),s=r(jg),l=r(Op),c=r(Hh),u=r(Uh),d=Lp(),f=r(qh()),p=r(Cc()),h=r(Ep),v=r(Np),m=r(Fg),y=Mp(),b=Ap();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return b.checkLink}});const I="header",_="/",P="/",w="/";function D(G,W=()=>{},{key:k="children",order:N="first"}={}){function j(V,{index:te=0,parent:se=null,level:pe=0}={}){Array.isArray(V)?V.forEach((me,Ce)=>{j(me,{index:Ce,parent:se,level:pe+1})}):V&&(N==="first"&&W(V,se,{index:te,level:pe}),j(V[k],{parent:V,level:pe}),N==="last"&&W(V,se,{index:te,level:pe}))}j(G)}function S(G,W){return W===I&&(0,s.default)(G)?!0:Array.isArray(G)?G.includes(W):G===W}function T(G){try{return JSON.parse(G)}catch{return G}}function R(G){return G.map(W=>{const k={...W};return k.role&&(k.role=T(k.role)),k.section&&(k.section=T(k.section)),k.title&&(k.title=T(k.title)),k.description&&(k.description=T(k.description)),k.link&&(k.link=T(k.link)),k})}function O(G="/",W=""){if((0,p.default)(W||""))return W;const k=f.default.join(G,W||P);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function L(G,W,{strict:k=!0}={}){let N=G,j=W;return k||(N=N||"/",j=j||"/"),(0,h.default)(N)&&(0,v.default)(j)&&(0,b.checkLink)(j)?Object.keys(N).reduce((V,te)=>(V[te]=O(N[te],j),V),{}):(0,v.default)(N)&&(0,b.checkLink)(N)&&(0,h.default)(j)?Object.keys(j).reduce((V,te)=>(V[te]=O(N,j[te]),V),{}):(0,v.default)(N)&&(0,v.default)(j)?(0,b.checkLink)(N)||(0,b.checkLink)(j)?O(N,j):j:(0,h.default)(N)&&(0,h.default)(j)?[...new Set([...Object.keys(N),...Object.keys(j)])].reduce((te,se)=>(te[se]=O(N[se],j[se]),te),{}):j}function M(G,W){const k=(0,u.default)(G);return D(k,(N,j)=>{const V=N.component||N.child;if(V){const te=W.find(se=>se.name===V);te&&(N.link=L(te.link,N.link,{strict:!1}))}else j&&(N.link=L(j.link,N.link))},{key:"items"}),k}function H(G=[],{depth:W=1,transform:k=N=>N}={}){const N=(0,u.default)(G),j=[];return D(N,(V,te,{level:se})=>{if(se>=W){const{items:pe=[]}=V;if(pe&&Array.isArray(pe)&&pe.length>0){delete V.items;const me=pe.map(Ce=>k(Ce,V));if(te)te.items.push(...me);else{const Ce=k((0,c.default)(V,["items"]),te);j.push(Ce,...me)}}else if(se===1){const me=k((0,c.default)(V,["items"]),te);j.push(me)}}else se===1&&j.push(V)},{key:"items",order:"last"}),j}function E(G){if(G.section!=="bottomNavigation")return G;const W={...G};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const N=W[k];typeof N=="string"&&(W[k]={en:N})}),W}function B(G={}){const W=[];function k(j,V={}){const te=[],{children:se=[],meta:pe={}}=j,me=(0,u.default)(pe?.navigation||[]);(0,y.hasStartEngine)(pe)&&j.meta?.capabilities?.navigation!==!1&&te.push(...me);const Ce=V.name||"",Se=V.mountPoint||_,Pe=j===G?"":pe.name||"",Fe=j===G?"":j.mountPoint||_;for(const ke of se){if(!(0,y.hasStartEngine)(ke.meta))continue;const he=ke.meta.name,xe=ke.mountPoint,dt=[Ce,Pe,he].filter(Boolean).join("."),mr=ke.meta.navigation||[],bi=(0,d.joinURL)(Se,Fe,xe);ke.meta?.capabilities?.navigation!==!1&&W.push({did:ke.meta.did,name:dt,link:bi,title:ke.meta.title||"",navigation:mr.map(Ke=>({section:I,...Ke}))});const ft=me.find(Ke=>Ke.component?Ke.component===he:!1);if(ft){if(!ft.link)if(ke.meta.navigation&&ke.meta.navigation.length>0){const Ke=k(ke,{mountPoint:Fe,name:Pe});Ke.length>0&&(ft.items=ft.items??[],ft.items.push(...Ke))}else ft.link=P}else if(ke.meta?.capabilities?.navigation!==!1){const Ke=k(ke,{mountPoint:Fe,name:Pe}),dn={title:ke.meta.title,component:he,id:ke.meta.did};Ke.length>0?(dn.items=Ke,dn.link=void 0):dn.link=P,te.push(dn)}}return te}return{navigationList:k(G),components:W}}function $(G){const W=(0,u.default)(G).filter(k=>k.id);return D(W,(k,N)=>{if(k.items&&k.items.length){for(let j=k.items.length-1;j>=0;j--)k.items[j].id||k.items.splice(j,1);k.items.length===0&&k.component&&(k.link=k.link||P)}N&&(k.parent=N.id,k.id=[N.id,k.id].join(w)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),W}function U(G,W=2){const k=(0,u.default)(G),N=H(k,{depth:W,transform:(j,V)=>(V&&(j._parent||(j._parent=V.id,V.component||(j.link=L(V.link,j.link))),j.section=j.section||V.section||[I],j.visible=j.visible??V.visible,V.role&&(j.role=j.role||V.role)),j.component=[V.component,j.component].filter(Boolean).join("."),j)});return D(N,j=>{j.items&&j.items.length>0&&j.items.reduceRight((V,te)=>{if(te._parent){const se=j.items.findIndex(pe=>pe.id===te._parent);se>=0&&j.items.splice(se,1),delete te._parent}return null},null)},{key:"items"}),N}function J(G,W){return W&&Array.isArray(G.items)?G.items.filter(k=>(0,s.default)(k.section)?S(G.section,W):!!S(k.section,W)).map(k=>({...k,section:W})):[]}function ee(G){const W=(0,u.default)(G),k=[];for(const N of W){let te=function(se,pe){const me=J(se,pe);V.push({...j,section:pe,items:me})};const j=(0,u.default)((0,c.default)(N,["items"])),V=[];if(Array.isArray(N.section))for(const se of N.section)te(N,se);else if(N.section){const{section:se}=N;te(N,se)}else if(N.items&&N.items.length>0){const se=N.items.reduce((me,Ce)=>{const{section:Se=[I]}=Ce||{};return me.push(...Se),me},[]),pe=[...new Set(se)];for(const me of pe)te(N,me)}else V.push({...N,section:I});k.push(...V)}return k}function X(G=[]){const W=(0,u.default)(G);return W.reduceRight((k,N,j)=>{if(N.parent){const V=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);V&&(V.items||(V.items=[]),V.items=[N,...V.items]),W.splice(j,1)}return null},null),W}function Z(G,W=[]){const k=X(G);return D(k,j=>{if(j?.component&&(W.some(V=>V.name===j.component)||(j.visible=!1)),j.items&&j.items.length)for(let V=j.items.length-1;V>=0;V--)j.items[V].visible===!1&&j.items.splice(V,1)},{key:"items"}),k.filter(j=>!(j.visible===!1||j.items&&Array.isArray(j.items)&&j.items.length>0&&j.items?.every(V=>V.visible===!1)))}function q(G){return G.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const ne=G=>{const[W,k]=(0,m.default)(G,V=>V.id===t.NAV_GROUP_SYSTEM),[N,j]=(0,m.default)(k,V=>V.id===t.NAV_GROUP_SERVICES);return[...W,...N,...j]};e.sortRootNavigation=ne;const ie=G=>{const[,W]=(0,m.default)(G,k=>{const N=typeof k.title=="string"?k.title:k.title?.en;return k.id===t.NAV_GROUP_TEAM||k.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=ie;function ue(G={},W={}){const{beforeProcess:k=he=>he}=W,{navigationList:N,components:j}=B(G),V=new Map;N.forEach(he=>{he.items?.forEach(xe=>{V.set((0,d.joinURL)(he.id,xe.id),xe)})});const te=(0,l.default)(G,"settings.org.enabled",!1),se=[t.NAV_GROUP_TEAM,t.NAV_GROUP_SYSTEM,t.NAV_GROUP_SERVICES];G?.settings?.navigations&&(Array.isArray(G.settings.navigations)?G.settings.navigations=[...G.settings.navigations].filter(he=>!(he.from==="team-tmpl"&&se.includes(he?.parent))).map(he=>{if(he.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(he,"private")){const xe=V.get(he.id);xe&&Object.prototype.hasOwnProperty.call(xe,"private")&&(he.private=xe.private)}return!te&&he.section==="userCenter"&&he.id==="/userCenter/orgs"?null:he}).filter(Boolean):G.settings.navigations=[]);const pe=R(ie(G?.settings?.navigations||[])).map(E),me=U(k(N)),Ce=$(me),Pe=ee(Ce).reduce((he,xe)=>["bottom","social","sessionManager","userCenter"].includes(xe.section)&&xe.items&&xe.items.length>0?(he.push(...xe.items.map(mr=>{const{section:bi}=xe,ft=L(xe.link,mr.link),Ke=[xe.component,mr.component].filter(Boolean).join(".");return{...mr,section:bi,link:ft,component:Ke,parent:""}})),he):(he.push(xe),he),[]),Fe=H(Pe,{transform(he,xe){let{component:dt}=he;return xe?.component&&(dt=[xe.component,he.component].filter(Boolean).join(".")),E({...he,component:dt})}});return{navigationList:(0,i.default)(pe,Fe,(he,xe)=>{const dt=["id","section"];return(0,o.default)((0,a.default)(he,dt),(0,a.default)(xe,dt))}),components:j,builtinList:Fe}}}(yr)),yr}var Ae=Bg();const Zc=C.createContext(null),is="/",$g="header",os={userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled},{id:"/userCenter/nfts",title:{en:"NFTs",zh:"NFTs"},icon:"ant-design:gold-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/nfts"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/settings",title:{en:"Settings",zh:"设置"},icon:"ant-design:setting-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/did-spaces",title:{en:"DID Spaces",zh:"DID Spaces"},icon:"ant-design:cloud-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Follow",zh:"关注"},icon:"ant-design:user-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function xi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const at=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),as=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Gg=(e,r)=>{const n=Ae.cleanOldNavigationHistory(r),t=n.findIndex(a=>a.id===$e.NAV_GROUP_TEAM);return t>=0&&n.splice(t,1),n.findIndex(a=>a.id===$e.NAV_GROUP_SERVICES)===-1&&n.unshift(as($e.NAV_GROUP_SERVICES,e("navigation.services"),[at("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),at("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),at("notification",e("navigation.notification"),"ant-design:bell-outlined","/admin/notification"),at("aigne",e("navigation.aigne"),"hugeicons:artificial-intelligence-04","/admin/aigne"),at("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),at("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n.findIndex(a=>a.id===$e.NAV_GROUP_SYSTEM)===-1&&n.unshift(as($e.NAV_GROUP_SYSTEM,e("navigation.system"),[at("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),at("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),at("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations")])),n};function ss({name:e}){return g.jsx(Fp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Wg({children:e}){const{blocklet:r,actions:n}=$t(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=Ae.parseNavigation(r,{beforeProcess(w){const D=rt(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(os,S)&&os[S].forEach(T=>{(T.shouldDisplay&&typeof T.shouldDisplay=="function"?T.shouldDisplay:()=>!0)(r)&&!D.some(O=>O.id===T.id)&&D.push(T)})}),Gg(t,D)}}),s=Bt({rawNavigation:rt(i),activeSection:$g,components:o}),l=C.useMemo(()=>Ae.sortRootNavigation(Ae.nestNavigationList(rt(s.rawNavigation))),[s.rawNavigation]),c=C.useMemo(()=>{const w=Ae.filterNavigation(rt(s.rawNavigation),o);return Ae.joinLink(w,o)},[o,s.rawNavigation]),u=C.useCallback(w=>{if(!w.id)return"";const D=Ae.flattenNavigation(Ae.joinLink(l,o)),S=D.find(T=>T.id===w.id);if(S?.component){if(!o.some(T=>T.name===S.component))return g.jsx(ss,{name:S.component})}else if(S.parent){const T=D.find(R=>R.id===S.parent);if(T?.component&&!o.some(R=>R.name===T.component))return g.jsx(ss,{name:T.component})}return S?.link},[l,o]),d=C.useCallback(w=>{s.activeSection=w},[s]),f=C.useCallback(w=>{const D=[];Ae.deepWalk(w,(T,R)=>{const O={...At(T,["children","expand"]),parent:R?.id};D.push(O)});const S=rt(s.rawNavigation).filter(T=>{if(!s.activeSection)return!1;const R=D.find(O=>xi(O,T));return R?!Ae.isMatchSection(R.section,s.activeSection):!0});s.rawNavigation=[...S,...D]},[s]),p=C.useCallback((w=[])=>{const D=rt(s.rawNavigation).map(S=>{const T=w.find(R=>xi({...R,section:s.activeSection},S));return T?{...S,...T}:S});s.rawNavigation=D},[s]),h=C.useCallback((w,D=is)=>w.map(T=>{const O=o.find(H=>H.name===T.component)?.link||D,L=T.items||[],{link:M}=T;return{title:T.title,description:T.description,subtitle:u(T),link:M,icon:T.icon,children:h(L,M||is),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:O}}),[o,u]),v=C.useCallback(w=>{p([w])},[p]),m=C.useCallback(w=>{const D=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=rt(s.rawNavigation).filter(S=>!D.includes(S.id))},[s]),y=C.useCallback((w={},D=-1)=>{const S={...w,id:zp.nanoid(),section:s.activeSection,visible:!0},T=[...s.rawNavigation],R=T.filter(O=>O.section===s.activeSection);if(D<0||D>R.length-1)T.push(S);else{const O=R[D],L=T.findIndex(M=>xi(M,O));T.splice(L,0,S)}return s.rawNavigation=T,S},[s]),b=C.useCallback(w=>{const S=rt(l).filter(T=>Ae.isMatchSection(T.section,w));return h(S)},[l,h]),I=C.useCallback(async w=>{const S=w.map(T=>jp(T,Bp)).map(T=>{const R={...T};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(S)},[n]),_=C.useCallback(async w=>{if(w){const D=a.filter(T=>Ae.isMatchSection(T.section,w)),S=s.rawNavigation.filter(T=>!Ae.isMatchSection(T.section,w));await I(S),s.rawNavigation=[...S,...D]}else await I([]),s.rawNavigation=rt(a)},[I,s,a]),P=C.useMemo(()=>({state:s,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:d,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:f,getNavigation:b,saveNavigationList:I,resetNavigation:_}),[s,c,o,u,d,v,m,y,f,b,I,_]);return g.jsx(Zc.Provider,{value:P,children:e})}function eu(){const e=C.useContext(Zc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ze={},Si,ls;function Hg(){if(ls)return Si;ls=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l=typeof _r=="object"&&_r&&_r.Object===Object&&_r,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype,f=d.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,D,S){var T,R,O,L,M,H,E=0,B=!1,$=!1,U=!0;if(typeof w!="function")throw new TypeError(e);D=P(D)||0,b(S)&&(B=!!S.leading,$="maxWait"in S,O=$?p(P(S.maxWait)||0,D):O,U="trailing"in S?!!S.trailing:U);function J(W){var k=T,N=R;return T=R=void 0,E=W,L=w.apply(N,k),L}function ee(W){return E=W,M=setTimeout(q,D),B?J(W):L}function X(W){var k=W-H,N=W-E,j=D-k;return $?h(j,O-N):j}function Z(W){var k=W-H,N=W-E;return H===void 0||k>=D||k<0||$&&N>=O}function q(){var W=v();if(Z(W))return ne(W);M=setTimeout(q,X(W))}function ne(W){return M=void 0,U&&T?J(W):(T=R=void 0,L)}function ie(){M!==void 0&&clearTimeout(M),E=0,T=H=R=M=void 0}function ue(){return M===void 0?L:ne(v())}function G(){var W=v(),k=Z(W);if(T=arguments,R=this,H=W,k){if(M===void 0)return ee(H);if($)return M=setTimeout(q,D),J(H)}return M===void 0&&(M=setTimeout(q,D)),L}return G.cancel=ie,G.flush=ue,G}function y(w,D,S){var T=!0,R=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(T="leading"in S?!!S.leading:T,R="trailing"in S?!!S.trailing:R),m(w,D,{leading:T,maxWait:D,trailing:R})}function b(w){var D=typeof w;return!!w&&(D=="object"||D=="function")}function I(w){return!!w&&typeof w=="object"}function _(w){return typeof w=="symbol"||I(w)&&f.call(w)==n}function P(w){if(typeof w=="number")return w;if(_(w))return r;if(b(w)){var D=typeof w.valueOf=="function"?w.valueOf():w;w=b(D)?D+"":D}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?s(w.slice(2),S?2:8):i.test(w)?r:+w}return Si=y,Si}var xr={exports:{}},kt={exports:{}},Ug=kt.exports,cs;function qg(){return cs||(cs=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?kt.exports=function(){return performance.now()}:typeof br<"u"&&br!==null&&br.hrtime?(kt.exports=function(){return(e()-i)/1e6},r=br.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=br.uptime()*1e9,i=t-o):Date.now?(kt.exports=function(){return Date.now()-n},n=Date.now()):(kt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Ug)),kt.exports}var us;function Vg(){if(us)return xr.exports;us=1;for(var e=qg(),r=typeof window>"u"?_r:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var s=0,l=0,c=[],u=1e3/60;i=function(d){if(c.length===0){var f=e(),p=Math.max(0,u-(f-s));s=p+f,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++l,callback:d,cancelled:!1}),l},o=function(d){for(var f=0;f<c.length;f++)c[f].handle===d&&(c[f].cancelled=!0)}}return xr.exports=function(d){return i.call(r,d)},xr.exports.cancel=function(){o.apply(r,arguments)},xr.exports.polyfill=function(d){d||(d=r),d.requestAnimationFrame=i,d.cancelAnimationFrame=o},xr.exports}var fn={},ds;function Kg(){if(ds)return fn;ds=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return fn}var Ht={},fs;function Yg(){if(fs)return Ht;fs=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.noop=e,Ht.intBetween=r,Ht.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return Ht}var ps;function Jg(){if(ps)return Ze;ps=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.createHorizontalStrength=T,Ze.createVerticalStrength=R,Ze.createScrollingComponent=M,Ze.default=H,Ze.defaultVerticalStrength=Ze.defaultHorizontalStrength=void 0;var e=u(Ic()),r=c(Rc()),n=$p(),t=c(Hg()),i=c(Vg()),o=c(Kg()),a=Yh,s=c(Gp()),l=Yg();function c(E){return E&&E.__esModule?E:{default:E}}function u(E){if(E&&E.__esModule)return E;var B={};if(E!=null){for(var $ in E)if(Object.prototype.hasOwnProperty.call(E,$)){var U=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,$):{};U.get||U.set?Object.defineProperty(B,$,U):B[$]=E[$]}}return B.default=E,B}function d(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function($){return typeof $}:d=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},d(E)}function f(){return f=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var $=arguments[B];for(var U in $)Object.prototype.hasOwnProperty.call($,U)&&(E[U]=$[U])}return E},f.apply(this,arguments)}function p(E,B){if(E==null)return{};var $=h(E,B),U,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)U=ee[J],!(B.indexOf(U)>=0)&&Object.prototype.propertyIsEnumerable.call(E,U)&&($[U]=E[U])}return $}function h(E,B){if(E==null)return{};var $={},U=Object.keys(E),J,ee;for(ee=0;ee<U.length;ee++)J=U[ee],!(B.indexOf(J)>=0)&&($[J]=E[J]);return $}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var $=0;$<B.length;$++){var U=B[$];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(E,U.key,U)}}function y(E,B,$){return B&&m(E.prototype,B),E}function b(E,B){return B&&(d(B)==="object"||typeof B=="function")?B:w(E)}function I(E){return I=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},I(E)}function _(E,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(B&&B.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),B&&P(E,B)}function P(E,B){return P=Object.setPrototypeOf||function(U,J){return U.__proto__=J,U},P(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function D(E,B,$){return B in E?Object.defineProperty(E,B,{value:$,enumerable:!0,configurable:!0,writable:!0}):E[B]=$,E}var S=150;function T(E){return function($,U){var J=$.x,ee=$.w,X=$.y,Z=$.h,q=Math.min(ee/2,E),ne=U.x>=J&&U.x<=J+ee,ie=ne&&U.y>=X&&U.y<=X+Z;if(ie){if(U.x<J+q)return(U.x-J-q)/q;if(U.x>J+ee-q)return-(J+ee-U.x-q)/q}return 0}}function R(E){return function($,U){var J=$.y,ee=$.h,X=$.x,Z=$.w,q=Math.min(ee/2,E),ne=U.y>=J&&U.y<=J+ee,ie=ne&&U.x>=X&&U.x<=X+Z;if(ie){if(U.y<J+q)return(U.y-J-q)/q;if(U.y>J+ee-q)return-(J+ee-U.y-q)/q}return 0}}var O=T(S);Ze.defaultHorizontalStrength=O;var L=R(S);Ze.defaultVerticalStrength=L;function M(E){var B=function($){_(U,$);function U(J,ee){var X;return v(this,U),X=b(this,I(U).call(this,J,ee)),D(w(w(X)),"updateScrolling",(0,t.default)(function(Z){var q=X.container.getBoundingClientRect(),ne=q.left,ie=q.top,ue=q.width,G=q.height,W={x:ne,y:ie,w:ue,h:G},k=(0,l.getCoords)(Z),N=X.props,j=N.horizontalStrength,V=N.verticalStrength;X.scaleX=j(W,k),X.scaleY=V(W,k),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),D(w(w(X)),"handleEvent",function(Z){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(Z))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(U,[{key:"componentDidMount",value:function(){var ee=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return ee.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var ee=this.props.dragDropManager,X=ee.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var ee=this,X=0,Z=function q(){var ne=ee.scaleX,ie=ee.scaleY,ue=ee.container,G=ee.props,W=G.strengthMultiplier,k=G.onScrollChange;if(W===0||ne+ie===0){ee.stopScrolling();return}if(X+=1,X%2){var N=ue.scrollLeft,j=ue.scrollTop,V=ue.scrollWidth,te=ue.scrollHeight,se=ue.clientWidth,pe=ue.clientHeight,me=ne?ue.scrollLeft=(0,l.intBetween)(0,V-se,N+ne*W):N,Ce=ie?ue.scrollTop=(0,l.intBetween)(0,te-pe,j+ie*W):j;k(me,Ce)}ee.frame=(0,i.default)(q)};Z()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var X=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,f({ref:this.wrappedInstance},X))}}]),U}(e.Component);return D(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),D(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),D(B,"defaultProps",{onScrollChange:l.noop,verticalStrength:L,horizontalStrength:O,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function($){return e.default.createElement(a.DragDropContextConsumer,null,function(U){var J=U.dragDropManager;return J===void 0?null:e.default.createElement(B,f({},$,{dragDropManager:J}))})}}return Ze}var Rn=Jg();const Xg=Zn(Rn);var Qg=Jh();const hs=Zn(Qg);function tu(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function ru(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function nu(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}tu.__suppressDeprecationWarning=!0;ru.__suppressDeprecationWarning=!0;nu.__suppressDeprecationWarning=!0;function en(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
3
3
 
4
4
  `+o+" uses "+a+" but also contains the following legacy lifecycles:"+(n!==null?`
5
5
  `+n:"")+(t!==null?`
@@ -7,10 +7,10 @@ import{c1 as fp,c0 as pp,r as C,c2 as hp,eT as gp,j as g,b9 as Xe,c4 as ct,c5 as
7
7
  `+i:"")+`
8
8
 
9
9
  The above lifecycles should be removed. Learn more about this warning here:
10
- https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(r.componentWillMount=tu,r.componentWillReceiveProps=ru),typeof r.getSnapshotBeforeUpdate=="function"){if(typeof r.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");r.componentWillUpdate=nu;var s=r.componentDidUpdate;r.componentDidUpdate=function(c,u,d){var f=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:d;s.call(this,c,u,f)}}return e}function iu(e){var r,n,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(n=iu(e[r]))&&(t&&(t+=" "),t+=n);else for(r in e)e[r]&&(t&&(t+=" "),t+=r);return t}function tt(){for(var e,r,n=0,t="";n<arguments.length;)(e=arguments[n++])&&(r=iu(e))&&(t&&(t+=" "),t+=r);return t}function gs(e){var r=e.cellCount,n=e.cellSize,t=e.computeMetadataCallback,i=e.computeMetadataCallbackProps,o=e.nextCellsCount,a=e.nextCellSize,s=e.nextScrollToIndex,l=e.scrollToIndex,c=e.updateScrollOffsetForScrollToIndex;(r!==o||(typeof n=="number"||typeof a=="number")&&n!==a)&&(t(i),l>=0&&l===s&&c())}function Zt(e,r){if(e==null)return{};var n,t,i=or(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)n=o[t],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Zg=function(){function e(r){var n=r.cellCount,t=r.cellSizeGetter,i=r.estimatedCellSize;Ie(this,e),A(this,"_cellSizeAndPositionData",{}),A(this,"_lastMeasuredIndex",-1),A(this,"_lastBatchedIndex",-1),A(this,"_cellCount",void 0),A(this,"_cellSizeGetter",void 0),A(this,"_estimatedCellSize",void 0),this._cellSizeGetter=t,this._cellCount=n,this._estimatedCellSize=i}return we(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(n){var t=n.cellCount,i=n.estimatedCellSize,o=n.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=i,this._cellSizeGetter=o}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(n){if(n<0||n>=this._cellCount)throw Error("Requested index ".concat(n," is outside of range 0..").concat(this._cellCount));if(n>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),i=t.offset+t.size,o=this._lastMeasuredIndex+1;o<=n;o++){var a=this._cellSizeGetter({index:o});if(a===void 0||isNaN(a))throw Error("Invalid size returned for cell ".concat(o," of value ").concat(a));a===null?(this._cellSizeAndPositionData[o]={offset:i,size:0},this._lastBatchedIndex=n):(this._cellSizeAndPositionData[o]={offset:i,size:a},i+=a,this._lastMeasuredIndex=n)}return this._cellSizeAndPositionData[n]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var n=this.getSizeAndPositionOfLastMeasuredCell(),t=n.offset+n.size,i=this._cellCount-this._lastMeasuredIndex-1,o=i*this._estimatedCellSize;return t+o}},{key:"getUpdatedOffsetForIndex",value:function(n){var t=n.align,i=t===void 0?"auto":t,o=n.containerSize,a=n.currentOffset,s=n.targetIndex;if(o<=0)return 0;var l=this.getSizeAndPositionOfCell(s),c=l.offset,u=c-o+l.size,d;switch(i){case"start":d=c;break;case"end":d=u;break;case"center":d=c-(o-l.size)/2;break;default:d=Math.max(u,Math.min(c,a));break}var f=this.getTotalSize();return Math.max(0,Math.min(f-o,d))}},{key:"getVisibleCellRange",value:function(n){var t=n.containerSize,i=n.offset,o=this.getTotalSize();if(o===0)return{};var a=i+t,s=this._findNearestCell(i),l=this.getSizeAndPositionOfCell(s);i=l.offset+l.size;for(var c=s;i<a&&c<this._cellCount-1;)c++,i+=this.getSizeAndPositionOfCell(c).size;return{start:s,stop:c}}},{key:"resetCell",value:function(n){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,n-1)}},{key:"_binarySearch",value:function(n,t,i){for(;t<=n;){var o=t+Math.floor((n-t)/2),a=this.getSizeAndPositionOfCell(o).offset;if(a===i)return o;a<i?t=o+1:a>i&&(n=o-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(n,t){for(var i=1;n<this._cellCount&&this.getSizeAndPositionOfCell(n).offset<t;)n+=i,i*=2;return this._binarySearch(Math.min(n,this._cellCount-1),Math.floor(n/2),t)}},{key:"_findNearestCell",value:function(n){if(isNaN(n))throw Error("Invalid offset ".concat(n," specified"));n=Math.max(0,n);var t=this.getSizeAndPositionOfLastMeasuredCell(),i=Math.max(0,this._lastMeasuredIndex);return t.offset>=n?this._binarySearch(i,0,n):this._exponentialSearch(i,n)}}]),e}(),ev=15e5,tv=16777100,rv=function(){return typeof window<"u"},nv=function(){return!!window.chrome},iv=function(){return rv()&&nv()?tv:ev},vs=function(){function e(r){var n=r.maxScrollSize,t=n===void 0?iv():n,i=Zt(r,["maxScrollSize"]);Ie(this,e),A(this,"_cellSizeAndPositionManager",void 0),A(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new Zg(i),this._maxScrollSize=t}return we(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(n){this._cellSizeAndPositionManager.configure(n)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(n){var t=n.containerSize,i=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize(),s=this._getOffsetPercentage({containerSize:t,offset:i,totalSize:a});return Math.round(s*(a-o))}},{key:"getSizeAndPositionOfCell",value:function(n){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(n)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(n){var t=n.align,i=t===void 0?"auto":t,o=n.containerSize,a=n.currentOffset,s=n.targetIndex;a=this._safeOffsetToOffset({containerSize:o,offset:a});var l=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:o,currentOffset:a,targetIndex:s});return this._offsetToSafeOffset({containerSize:o,offset:l})}},{key:"getVisibleCellRange",value:function(n){var t=n.containerSize,i=n.offset;return i=this._safeOffsetToOffset({containerSize:t,offset:i}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:i})}},{key:"resetCell",value:function(n){this._cellSizeAndPositionManager.resetCell(n)}},{key:"_getOffsetPercentage",value:function(n){var t=n.containerSize,i=n.offset,o=n.totalSize;return o<=t?0:i/(o-t)}},{key:"_offsetToSafeOffset",value:function(n){var t=n.containerSize,i=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize();if(o===a)return i;var s=this._getOffsetPercentage({containerSize:t,offset:i,totalSize:o});return Math.round(s*(a-t))}},{key:"_safeOffsetToOffset",value:function(n){var t=n.containerSize,i=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize();if(o===a)return i;var s=this._getOffsetPercentage({containerSize:t,offset:i,totalSize:a});return Math.round(s*(o-t))}}]),e}();function ar(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,r={};return function(n){var t=n.callback,i=n.indices,o=Object.keys(i),a=!e||o.every(function(l){var c=i[l];return Array.isArray(c)?c.length>0:c>=0}),s=o.length!==Object.keys(r).length||o.some(function(l){var c=r[l],u=i[l];return Array.isArray(u)?c.join(",")!==u.join(","):c!==u});r=i,a&&s&&t(i)}}var pn=-1,st=1;function ov(e){var r=e.cellCount,n=e.overscanCellsCount,t=e.scrollDirection,i=e.startIndex,o=e.stopIndex;return t===st?{overscanStartIndex:Math.max(0,i),overscanStopIndex:Math.min(r-1,o+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(r-1,o)}}function ms(e){var r=e.cellSize,n=e.cellSizeAndPositionManager,t=e.previousCellsCount,i=e.previousCellSize,o=e.previousScrollToAlignment,a=e.previousScrollToIndex,s=e.previousSize,l=e.scrollOffset,c=e.scrollToAlignment,u=e.scrollToIndex,d=e.size,f=e.sizeJustIncreasedFromZero,p=e.updateScrollIndexCallback,h=n.getCellCount(),v=u>=0&&u<h,m=d!==s||f||!i||typeof r=="number"&&r!==i;v&&(m||c!==o||u!==a)?p(u):!v&&h>0&&(d<s||h<t)&&l>n.getTotalSize()-d&&p(h-1)}function av(e){for(var r=e.cellCache,n=e.cellRenderer,t=e.columnSizeAndPositionManager,i=e.columnStartIndex,o=e.columnStopIndex,a=e.deferredMeasurementCache,s=e.horizontalOffsetAdjustment,l=e.isScrolling,c=e.isScrollingOptOut,u=e.parent,d=e.rowSizeAndPositionManager,f=e.rowStartIndex,p=e.rowStopIndex,h=e.styleCache,v=e.verticalOffsetAdjustment,m=e.visibleColumnIndices,b=e.visibleRowIndices,y=[],I=t.areOffsetsAdjusted()||d.areOffsetsAdjusted(),_=!l&&!I,P=f;P<=p;P++)for(var w=d.getSizeAndPositionOfCell(P),D=i;D<=o;D++){var S=t.getSizeAndPositionOfCell(D),T=D>=m.start&&D<=m.stop&&P>=b.start&&P<=b.stop,R="".concat(P,"-").concat(D),O=void 0;_&&h[R]?O=h[R]:a&&!a.has(P,D)?O={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(O={height:w.size,left:S.offset+s,position:"absolute",top:w.offset+v,width:S.size},h[R]=O);var L={columnIndex:D,isScrolling:l,isVisible:T,key:R,parent:u,rowIndex:P,style:O},M=void 0;(c||l)&&!s&&!v?(r[R]||(r[R]=n(L)),M=r[R]):M=n(L),!(M==null||M===!1)&&y.push(M)}return y}const sv=!!(typeof window<"u"&&window.document&&window.document.createElement);var hn;function oo(e){if((!hn&&hn!==0||e)&&sv){var r=document.createElement("div");r.style.position="absolute",r.style.top="-9999px",r.style.width="50px",r.style.height="50px",r.style.overflow="scroll",document.body.appendChild(r),hn=r.offsetWidth-r.clientWidth,document.body.removeChild(r)}return hn}var ze;typeof window<"u"?ze=window:typeof self<"u"?ze=self:ze={};var lv=ze.requestAnimationFrame||ze.webkitRequestAnimationFrame||ze.mozRequestAnimationFrame||ze.oRequestAnimationFrame||ze.msRequestAnimationFrame||function(e){return ze.setTimeout(e,1e3/60)},cv=ze.cancelAnimationFrame||ze.webkitCancelAnimationFrame||ze.mozCancelAnimationFrame||ze.oCancelAnimationFrame||ze.msCancelAnimationFrame||function(e){ze.clearTimeout(e)},bs=lv,uv=cv,sr=function(r){return uv(r.id)},Ho=function(r,n){var t;Promise.resolve().then(function(){t=Date.now()});var i=function a(){Date.now()-t>=n?r.call():o.id=bs(a)},o={id:bs(i)};return o},ys,xs;function Ss(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function Dt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ss(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ss(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var dv=150,wi={OBSERVED:"observed",REQUESTED:"requested"},fv=function(){return null},gt=(xs=ys=function(e){Ue(r,e);function r(n){var t;Ie(this,r),t=qe(this,Ve(r).call(this,n)),A(F(t),"_onGridRenderedMemoizer",ar()),A(F(t),"_onScrollMemoizer",ar(!1)),A(F(t),"_deferredInvalidateColumnIndex",null),A(F(t),"_deferredInvalidateRowIndex",null),A(F(t),"_recomputeScrollLeftFlag",!1),A(F(t),"_recomputeScrollTopFlag",!1),A(F(t),"_horizontalScrollBarSize",0),A(F(t),"_verticalScrollBarSize",0),A(F(t),"_scrollbarPresenceChanged",!1),A(F(t),"_scrollingContainer",void 0),A(F(t),"_childrenToDisplay",void 0),A(F(t),"_columnStartIndex",void 0),A(F(t),"_columnStopIndex",void 0),A(F(t),"_rowStartIndex",void 0),A(F(t),"_rowStopIndex",void 0),A(F(t),"_renderedColumnStartIndex",0),A(F(t),"_renderedColumnStopIndex",0),A(F(t),"_renderedRowStartIndex",0),A(F(t),"_renderedRowStopIndex",0),A(F(t),"_initialScrollTop",void 0),A(F(t),"_initialScrollLeft",void 0),A(F(t),"_disablePointerEventsTimeoutId",void 0),A(F(t),"_styleCache",{}),A(F(t),"_cellCache",{}),A(F(t),"_debounceScrollEndedCallback",function(){t._disablePointerEventsTimeoutId=null,t.setState({isScrolling:!1,needToResetStyleCache:!1})}),A(F(t),"_invokeOnGridRenderedHelper",function(){var a=t.props.onSectionRendered;t._onGridRenderedMemoizer({callback:a,indices:{columnOverscanStartIndex:t._columnStartIndex,columnOverscanStopIndex:t._columnStopIndex,columnStartIndex:t._renderedColumnStartIndex,columnStopIndex:t._renderedColumnStopIndex,rowOverscanStartIndex:t._rowStartIndex,rowOverscanStopIndex:t._rowStopIndex,rowStartIndex:t._renderedRowStartIndex,rowStopIndex:t._renderedRowStopIndex}})}),A(F(t),"_setScrollingContainerRef",function(a){t._scrollingContainer=a}),A(F(t),"_onScroll",function(a){a.target===t._scrollingContainer&&t.handleScrollEvent(a.target)});var i=new vs({cellCount:n.columnCount,cellSizeGetter:function(s){return r._wrapSizeGetter(n.columnWidth)(s)},estimatedCellSize:r._getEstimatedColumnSize(n)}),o=new vs({cellCount:n.rowCount,cellSizeGetter:function(s){return r._wrapSizeGetter(n.rowHeight)(s)},estimatedCellSize:r._getEstimatedRowSize(n)});return t.state={instanceProps:{columnSizeAndPositionManager:i,rowSizeAndPositionManager:o,prevColumnWidth:n.columnWidth,prevRowHeight:n.rowHeight,prevColumnCount:n.columnCount,prevRowCount:n.rowCount,prevIsScrolling:n.isScrolling===!0,prevScrollToColumn:n.scrollToColumn,prevScrollToRow:n.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:st,scrollDirectionVertical:st,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},n.scrollToRow>0&&(t._initialScrollTop=t._getCalculatedScrollTop(n,t.state)),n.scrollToColumn>0&&(t._initialScrollLeft=t._getCalculatedScrollLeft(n,t.state)),t}return we(r,[{key:"getOffsetForCell",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.alignment,o=i===void 0?this.props.scrollToAlignment:i,a=t.columnIndex,s=a===void 0?this.props.scrollToColumn:a,l=t.rowIndex,c=l===void 0?this.props.scrollToRow:l,u=Dt({},this.props,{scrollToAlignment:o,scrollToColumn:s,scrollToRow:c});return{scrollLeft:this._getCalculatedScrollLeft(u),scrollTop:this._getCalculatedScrollTop(u)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(t){var i=t.scrollLeft,o=i===void 0?0:i,a=t.scrollTop,s=a===void 0?0:a;if(!(s<0)){this._debounceScrollEnded();var l=this.props,c=l.autoHeight,u=l.autoWidth,d=l.height,f=l.width,p=this.state.instanceProps,h=p.scrollbarSize,v=p.rowSizeAndPositionManager.getTotalSize(),m=p.columnSizeAndPositionManager.getTotalSize(),b=Math.min(Math.max(0,m-f+h),o),y=Math.min(Math.max(0,v-d+h),s);if(this.state.scrollLeft!==b||this.state.scrollTop!==y){var I=b!==this.state.scrollLeft?b>this.state.scrollLeft?st:pn:this.state.scrollDirectionHorizontal,_=y!==this.state.scrollTop?y>this.state.scrollTop?st:pn:this.state.scrollDirectionVertical,P={isScrolling:!0,scrollDirectionHorizontal:I,scrollDirectionVertical:_,scrollPositionChangeReason:wi.OBSERVED};c||(P.scrollTop=y),u||(P.scrollLeft=b),P.needToResetStyleCache=!1,this.setState(P)}this._invokeOnScrollMemoizer({scrollLeft:b,scrollTop:y,totalColumnsWidth:m,totalRowsHeight:v})}}},{key:"invalidateCellSizeAfterRender",value:function(t){var i=t.columnIndex,o=t.rowIndex;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,i):i,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){var t=this.props,i=t.columnCount,o=t.rowCount,a=this.state.instanceProps;a.columnSizeAndPositionManager.getSizeAndPositionOfCell(i-1),a.rowSizeAndPositionManager.getSizeAndPositionOfCell(o-1)}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.columnIndex,o=i===void 0?0:i,a=t.rowIndex,s=a===void 0?0:a,l=this.props,c=l.scrollToColumn,u=l.scrollToRow,d=this.state.instanceProps;d.columnSizeAndPositionManager.resetCell(o),d.rowSizeAndPositionManager.resetCell(s),this._recomputeScrollLeftFlag=c>=0&&(this.state.scrollDirectionHorizontal===st?o<=c:o>=c),this._recomputeScrollTopFlag=u>=0&&(this.state.scrollDirectionVertical===st?s<=u:s>=u),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(t){var i=t.columnIndex,o=t.rowIndex,a=this.props.columnCount,s=this.props;a>1&&i!==void 0&&this._updateScrollLeftForScrollToColumn(Dt({},s,{scrollToColumn:i})),o!==void 0&&this._updateScrollTopForScrollToRow(Dt({},s,{scrollToRow:o}))}},{key:"componentDidMount",value:function(){var t=this.props,i=t.getScrollbarSize,o=t.height,a=t.scrollLeft,s=t.scrollToColumn,l=t.scrollTop,c=t.scrollToRow,u=t.width,d=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),d.scrollbarSizeMeasured||this.setState(function(h){var v=Dt({},h,{needToResetStyleCache:!1});return v.instanceProps.scrollbarSize=i(),v.instanceProps.scrollbarSizeMeasured=!0,v}),typeof a=="number"&&a>=0||typeof l=="number"&&l>=0){var f=r._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:a,scrollTop:l});f&&(f.needToResetStyleCache=!1,this.setState(f))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var p=o>0&&u>0;s>=0&&p&&this._updateScrollLeftForScrollToColumn(),c>=0&&p&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:a||0,scrollTop:l||0,totalColumnsWidth:d.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:d.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(t,i){var o=this,a=this.props,s=a.autoHeight,l=a.autoWidth,c=a.columnCount,u=a.height,d=a.rowCount,f=a.scrollToAlignment,p=a.scrollToColumn,h=a.scrollToRow,v=a.width,m=this.state,b=m.scrollLeft,y=m.scrollPositionChangeReason,I=m.scrollTop,_=m.instanceProps;this._handleInvalidatedGridSize();var P=c>0&&t.columnCount===0||d>0&&t.rowCount===0;y===wi.REQUESTED&&(!l&&b>=0&&(b!==this._scrollingContainer.scrollLeft||P)&&(this._scrollingContainer.scrollLeft=b),!s&&I>=0&&(I!==this._scrollingContainer.scrollTop||P)&&(this._scrollingContainer.scrollTop=I));var w=(t.width===0||t.height===0)&&u>0&&v>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):ms({cellSizeAndPositionManager:_.columnSizeAndPositionManager,previousCellsCount:t.columnCount,previousCellSize:t.columnWidth,previousScrollToAlignment:t.scrollToAlignment,previousScrollToIndex:t.scrollToColumn,previousSize:t.width,scrollOffset:b,scrollToAlignment:f,scrollToIndex:p,size:v,sizeJustIncreasedFromZero:w,updateScrollIndexCallback:function(){return o._updateScrollLeftForScrollToColumn(o.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):ms({cellSizeAndPositionManager:_.rowSizeAndPositionManager,previousCellsCount:t.rowCount,previousCellSize:t.rowHeight,previousScrollToAlignment:t.scrollToAlignment,previousScrollToIndex:t.scrollToRow,previousSize:t.height,scrollOffset:I,scrollToAlignment:f,scrollToIndex:h,size:u,sizeJustIncreasedFromZero:w,updateScrollIndexCallback:function(){return o._updateScrollTopForScrollToRow(o.props)}}),this._invokeOnGridRenderedHelper(),b!==i.scrollLeft||I!==i.scrollTop){var D=_.rowSizeAndPositionManager.getTotalSize(),S=_.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:b,scrollTop:I,totalColumnsWidth:S,totalRowsHeight:D})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&sr(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var t=this.props,i=t.autoContainerWidth,o=t.autoHeight,a=t.autoWidth,s=t.className,l=t.containerProps,c=t.containerRole,u=t.containerStyle,d=t.height,f=t.id,p=t.noContentRenderer,h=t.role,v=t.style,m=t.tabIndex,b=t.width,y=this.state,I=y.instanceProps,_=y.needToResetStyleCache,P=this._isScrolling(),w={boxSizing:"border-box",direction:"ltr",height:o?"auto":d,position:"relative",width:a?"auto":b,WebkitOverflowScrolling:"touch",willChange:"transform"};_&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var D=I.columnSizeAndPositionManager.getTotalSize(),S=I.rowSizeAndPositionManager.getTotalSize(),T=S>d?I.scrollbarSize:0,R=D>b?I.scrollbarSize:0;(R!==this._horizontalScrollBarSize||T!==this._verticalScrollBarSize)&&(this._horizontalScrollBarSize=R,this._verticalScrollBarSize=T,this._scrollbarPresenceChanged=!0),w.overflowX=D+T<=b?"hidden":"auto",w.overflowY=S+R<=d?"hidden":"auto";var O=this._childrenToDisplay,L=O.length===0&&d>0&&b>0;return C.createElement("div",K({ref:this._setScrollingContainerRef},l,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:tt("ReactVirtualized__Grid",s),id:f,onScroll:this._onScroll,role:h,style:Dt({},w,{},v),tabIndex:m}),O.length>0&&C.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:c,style:Dt({width:i?"auto":D,height:S,maxWidth:D,maxHeight:S,overflow:"hidden",pointerEvents:P?"none":"",position:"relative"},u)},O),L&&p())}},{key:"_calculateChildrenToRender",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=t.cellRenderer,a=t.cellRangeRenderer,s=t.columnCount,l=t.deferredMeasurementCache,c=t.height,u=t.overscanColumnCount,d=t.overscanIndicesGetter,f=t.overscanRowCount,p=t.rowCount,h=t.width,v=t.isScrollingOptOut,m=i.scrollDirectionHorizontal,b=i.scrollDirectionVertical,y=i.instanceProps,I=this._initialScrollTop>0?this._initialScrollTop:i.scrollTop,_=this._initialScrollLeft>0?this._initialScrollLeft:i.scrollLeft,P=this._isScrolling(t,i);if(this._childrenToDisplay=[],c>0&&h>0){var w=y.columnSizeAndPositionManager.getVisibleCellRange({containerSize:h,offset:_}),D=y.rowSizeAndPositionManager.getVisibleCellRange({containerSize:c,offset:I}),S=y.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:h,offset:_}),T=y.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:c,offset:I});this._renderedColumnStartIndex=w.start,this._renderedColumnStopIndex=w.stop,this._renderedRowStartIndex=D.start,this._renderedRowStopIndex=D.stop;var R=d({direction:"horizontal",cellCount:s,overscanCellsCount:u,scrollDirection:m,startIndex:typeof w.start=="number"?w.start:0,stopIndex:typeof w.stop=="number"?w.stop:-1}),O=d({direction:"vertical",cellCount:p,overscanCellsCount:f,scrollDirection:b,startIndex:typeof D.start=="number"?D.start:0,stopIndex:typeof D.stop=="number"?D.stop:-1}),L=R.overscanStartIndex,M=R.overscanStopIndex,H=O.overscanStartIndex,E=O.overscanStopIndex;if(l){if(!l.hasFixedHeight()){for(var B=H;B<=E;B++)if(!l.has(B,0)){L=0,M=s-1;break}}if(!l.hasFixedWidth()){for(var $=L;$<=M;$++)if(!l.has(0,$)){H=0,E=p-1;break}}}this._childrenToDisplay=a({cellCache:this._cellCache,cellRenderer:o,columnSizeAndPositionManager:y.columnSizeAndPositionManager,columnStartIndex:L,columnStopIndex:M,deferredMeasurementCache:l,horizontalOffsetAdjustment:S,isScrolling:P,isScrollingOptOut:v,parent:this,rowSizeAndPositionManager:y.rowSizeAndPositionManager,rowStartIndex:H,rowStopIndex:E,scrollLeft:_,scrollTop:I,styleCache:this._styleCache,verticalOffsetAdjustment:T,visibleColumnIndices:w,visibleRowIndices:D}),this._columnStartIndex=L,this._columnStopIndex=M,this._rowStartIndex=H,this._rowStopIndex=E}}},{key:"_debounceScrollEnded",value:function(){var t=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&sr(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=Ho(this._debounceScrollEndedCallback,t)}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"&&typeof this._deferredInvalidateRowIndex=="number"){var t=this._deferredInvalidateColumnIndex,i=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:t,rowIndex:i})}}},{key:"_invokeOnScrollMemoizer",value:function(t){var i=this,o=t.scrollLeft,a=t.scrollTop,s=t.totalColumnsWidth,l=t.totalRowsHeight;this._onScrollMemoizer({callback:function(u){var d=u.scrollLeft,f=u.scrollTop,p=i.props,h=p.height,v=p.onScroll,m=p.width;v({clientHeight:h,clientWidth:m,scrollHeight:l,scrollLeft:d,scrollTop:f,scrollWidth:s})},indices:{scrollLeft:o,scrollTop:a}})}},{key:"_isScrolling",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return Object.hasOwnProperty.call(t,"isScrolling")?!!t.isScrolling:!!i.isScrolling}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var t=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,t({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(t){var i=t.scrollLeft,o=t.scrollTop,a=r._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:i,scrollTop:o});a&&(a.needToResetStyleCache=!1,this.setState(a))}},{key:"_getCalculatedScrollLeft",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return r._getCalculatedScrollLeft(t,i)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=r._getScrollLeftForScrollToColumnStateUpdate(t,i);o&&(o.needToResetStyleCache=!1,this.setState(o))}},{key:"_getCalculatedScrollTop",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return r._getCalculatedScrollTop(t,i)}},{key:"_resetStyleCache",value:function(){var t=this._styleCache,i=this._cellCache,o=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var a=this._rowStartIndex;a<=this._rowStopIndex;a++)for(var s=this._columnStartIndex;s<=this._columnStopIndex;s++){var l="".concat(a,"-").concat(s);this._styleCache[l]=t[l],o&&(this._cellCache[l]=i[l])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=r._getScrollTopForScrollToRowStateUpdate(t,i);o&&(o.needToResetStyleCache=!1,this.setState(o))}}],[{key:"getDerivedStateFromProps",value:function(t,i){var o={};t.columnCount===0&&i.scrollLeft!==0||t.rowCount===0&&i.scrollTop!==0?(o.scrollLeft=0,o.scrollTop=0):(t.scrollLeft!==i.scrollLeft&&t.scrollToColumn<0||t.scrollTop!==i.scrollTop&&t.scrollToRow<0)&&Object.assign(o,r._getScrollToPositionStateUpdate({prevState:i,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}));var a=i.instanceProps;o.needToResetStyleCache=!1,(t.columnWidth!==a.prevColumnWidth||t.rowHeight!==a.prevRowHeight)&&(o.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:t.columnCount,estimatedCellSize:r._getEstimatedColumnSize(t),cellSizeGetter:r._wrapSizeGetter(t.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:t.rowCount,estimatedCellSize:r._getEstimatedRowSize(t),cellSizeGetter:r._wrapSizeGetter(t.rowHeight)}),(a.prevColumnCount===0||a.prevRowCount===0)&&(a.prevColumnCount=0,a.prevRowCount=0),t.autoHeight&&t.isScrolling===!1&&a.prevIsScrolling===!0&&Object.assign(o,{isScrolling:!1});var s,l;return gs({cellCount:a.prevColumnCount,cellSize:typeof a.prevColumnWidth=="number"?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:t,nextCellsCount:t.columnCount,nextCellSize:typeof t.columnWidth=="number"?t.columnWidth:null,nextScrollToIndex:t.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){s=r._getScrollLeftForScrollToColumnStateUpdate(t,i)}}),gs({cellCount:a.prevRowCount,cellSize:typeof a.prevRowHeight=="number"?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:t,nextCellsCount:t.rowCount,nextCellSize:typeof t.rowHeight=="number"?t.rowHeight:null,nextScrollToIndex:t.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){l=r._getScrollTopForScrollToRowStateUpdate(t,i)}}),a.prevColumnCount=t.columnCount,a.prevColumnWidth=t.columnWidth,a.prevIsScrolling=t.isScrolling===!0,a.prevRowCount=t.rowCount,a.prevRowHeight=t.rowHeight,a.prevScrollToColumn=t.scrollToColumn,a.prevScrollToRow=t.scrollToRow,a.scrollbarSize=t.getScrollbarSize(),a.scrollbarSize===void 0?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,o.instanceProps=a,Dt({},o,{},s,{},l)}},{key:"_getEstimatedColumnSize",value:function(t){return typeof t.columnWidth=="number"?t.columnWidth:t.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(t){return typeof t.rowHeight=="number"?t.rowHeight:t.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(t){var i=t.prevState,o=t.scrollLeft,a=t.scrollTop,s={scrollPositionChangeReason:wi.REQUESTED};return typeof o=="number"&&o>=0&&(s.scrollDirectionHorizontal=o>i.scrollLeft?st:pn,s.scrollLeft=o),typeof a=="number"&&a>=0&&(s.scrollDirectionVertical=a>i.scrollTop?st:pn,s.scrollTop=a),typeof o=="number"&&o>=0&&o!==i.scrollLeft||typeof a=="number"&&a>=0&&a!==i.scrollTop?s:{}}},{key:"_wrapSizeGetter",value:function(t){return typeof t=="function"?t:function(){return t}}},{key:"_getCalculatedScrollLeft",value:function(t,i){var o=t.columnCount,a=t.height,s=t.scrollToAlignment,l=t.scrollToColumn,c=t.width,u=i.scrollLeft,d=i.instanceProps;if(o>0){var f=o-1,p=l<0?f:Math.min(f,l),h=d.rowSizeAndPositionManager.getTotalSize(),v=d.scrollbarSizeMeasured&&h>a?d.scrollbarSize:0;return d.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:s,containerSize:c-v,currentOffset:u,targetIndex:p})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(t,i){var o=i.scrollLeft,a=r._getCalculatedScrollLeft(t,i);return typeof a=="number"&&a>=0&&o!==a?r._getScrollToPositionStateUpdate({prevState:i,scrollLeft:a,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(t,i){var o=t.height,a=t.rowCount,s=t.scrollToAlignment,l=t.scrollToRow,c=t.width,u=i.scrollTop,d=i.instanceProps;if(a>0){var f=a-1,p=l<0?f:Math.min(f,l),h=d.columnSizeAndPositionManager.getTotalSize(),v=d.scrollbarSizeMeasured&&h>c?d.scrollbarSize:0;return d.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:s,containerSize:o-v,currentOffset:u,targetIndex:p})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(t,i){var o=i.scrollTop,a=r._getCalculatedScrollTop(t,i);return typeof a=="number"&&a>=0&&o!==a?r._getScrollToPositionStateUpdate({prevState:i,scrollLeft:-1,scrollTop:a}):{}}}]),r}(C.PureComponent),A(ys,"propTypes",null),xs);A(gt,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:av,containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:oo,noContentRenderer:fv,onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:ov,overscanRowCount:10,role:"grid",scrollingResetTimeInterval:dv,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1});en(gt);var pv=1;function ou(e){var r=e.cellCount,n=e.overscanCellsCount,t=e.scrollDirection,i=e.startIndex,o=e.stopIndex;return n=Math.max(1,n),t===pv?{overscanStartIndex:Math.max(0,i-1),overscanStopIndex:Math.min(r-1,o+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(r-1,o+1)}}var ws,Cs;function Is(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function hv(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Is(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Is(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var au=(Cs=ws=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),A(F(t),"_columnStartIndex",0),A(F(t),"_columnStopIndex",0),A(F(t),"_rowStartIndex",0),A(F(t),"_rowStopIndex",0),A(F(t),"_onKeyDown",function(s){var l=t.props,c=l.columnCount,u=l.disabled,d=l.mode,f=l.rowCount;if(!u){var p=t._getScrollState(),h=p.scrollToColumn,v=p.scrollToRow,m=t._getScrollState(),b=m.scrollToColumn,y=m.scrollToRow;switch(s.key){case"ArrowDown":y=Math.min(d==="cells"?y+1:t._rowStopIndex+1,f-1);break;case"ArrowLeft":b=Math.max(d==="cells"?b-1:t._columnStartIndex-1,0);break;case"ArrowRight":b=Math.min(d==="cells"?b+1:t._columnStopIndex+1,c-1);break;case"ArrowUp":y=Math.max(d==="cells"?y-1:t._rowStartIndex-1,0);break}(b!==h||y!==v)&&(s.preventDefault(),t._updateScrollState({scrollToColumn:b,scrollToRow:y}))}}),A(F(t),"_onSectionRendered",function(s){var l=s.columnStartIndex,c=s.columnStopIndex,u=s.rowStartIndex,d=s.rowStopIndex;t._columnStartIndex=l,t._columnStopIndex=c,t._rowStartIndex=u,t._rowStopIndex=d}),t}return we(r,[{key:"setScrollIndexes",value:function(t){var i=t.scrollToColumn,o=t.scrollToRow;this.setState({scrollToRow:o,scrollToColumn:i})}},{key:"render",value:function(){var t=this.props,i=t.className,o=t.children,a=this._getScrollState(),s=a.scrollToColumn,l=a.scrollToRow;return C.createElement("div",{className:i,onKeyDown:this._onKeyDown},o({onSectionRendered:this._onSectionRendered,scrollToColumn:s,scrollToRow:l}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(t){var i=t.scrollToColumn,o=t.scrollToRow,a=this.props,s=a.isControlled,l=a.onScrollToChange;typeof l=="function"&&l({scrollToColumn:i,scrollToRow:o}),s||this.setState({scrollToColumn:i,scrollToRow:o})}}],[{key:"getDerivedStateFromProps",value:function(t,i){return t.isControlled?{}:t.scrollToColumn!==i.instanceProps.prevScrollToColumn||t.scrollToRow!==i.instanceProps.prevScrollToRow?hv({},i,{scrollToColumn:t.scrollToColumn,scrollToRow:t.scrollToRow,instanceProps:{prevScrollToColumn:t.scrollToColumn,prevScrollToRow:t.scrollToRow}}):{}}}]),r}(C.PureComponent),A(ws,"propTypes",null),Cs);A(au,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0});en(au);function su(e,r){var n;typeof r<"u"?n=r:typeof window<"u"?n=window:typeof self<"u"?n=self:n=Wp;var t=typeof n.document<"u"&&n.document.attachEvent;if(!t){var i=function(){var D=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(S){return n.setTimeout(S,20)};return function(S){return D(S)}}(),o=function(){var D=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.clearTimeout;return function(S){return D(S)}}(),a=function(S){var T=S.__resizeTriggers__,R=T.firstElementChild,O=T.lastElementChild,L=R.firstElementChild;O.scrollLeft=O.scrollWidth,O.scrollTop=O.scrollHeight,L.style.width=R.offsetWidth+1+"px",L.style.height=R.offsetHeight+1+"px",R.scrollLeft=R.scrollWidth,R.scrollTop=R.scrollHeight},s=function(S){return S.offsetWidth!=S.__resizeLast__.width||S.offsetHeight!=S.__resizeLast__.height},l=function(S){if(!(S.target.className&&typeof S.target.className.indexOf=="function"&&S.target.className.indexOf("contract-trigger")<0&&S.target.className.indexOf("expand-trigger")<0)){var T=this;a(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=i(function(){s(T)&&(T.__resizeLast__.width=T.offsetWidth,T.__resizeLast__.height=T.offsetHeight,T.__resizeListeners__.forEach(function(R){R.call(T,S)}))})}},c=!1,u="",d="animationstart",f="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h="";{var v=n.document.createElement("fakeelement");if(v.style.animationName!==void 0&&(c=!0),c===!1){for(var m=0;m<f.length;m++)if(v.style[f[m]+"AnimationName"]!==void 0){h=f[m],u="-"+h.toLowerCase()+"-",d=p[m],c=!0;break}}}var b="resizeanim",y="@"+u+"keyframes "+b+" { from { opacity: 0; } to { opacity: 0; } } ",I=u+"animation: 1ms "+b+"; "}var _=function(S){if(!S.getElementById("detectElementResize")){var T=(y||"")+".resize-triggers { "+(I||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',R=S.head||S.getElementsByTagName("head")[0],O=S.createElement("style");O.id="detectElementResize",O.type="text/css",e!=null&&O.setAttribute("nonce",e),O.styleSheet?O.styleSheet.cssText=T:O.appendChild(S.createTextNode(T)),R.appendChild(O)}},P=function(S,T){if(t)S.attachEvent("onresize",T);else{if(!S.__resizeTriggers__){var R=S.ownerDocument,O=n.getComputedStyle(S);O&&O.position=="static"&&(S.style.position="relative"),_(R),S.__resizeLast__={},S.__resizeListeners__=[],(S.__resizeTriggers__=R.createElement("div")).className="resize-triggers";var L='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var M=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return L}});S.__resizeTriggers__.innerHTML=M.createHTML("")}else S.__resizeTriggers__.innerHTML=L;S.appendChild(S.__resizeTriggers__),a(S),S.addEventListener("scroll",l,!0),d&&(S.__resizeTriggers__.__animationListener__=function(E){E.animationName==b&&a(S)},S.__resizeTriggers__.addEventListener(d,S.__resizeTriggers__.__animationListener__))}S.__resizeListeners__.push(T)}},w=function(S,T){if(t)S.detachEvent("onresize",T);else if(S.__resizeListeners__.splice(S.__resizeListeners__.indexOf(T),1),!S.__resizeListeners__.length){S.removeEventListener("scroll",l,!0),S.__resizeTriggers__.__animationListener__&&(S.__resizeTriggers__.removeEventListener(d,S.__resizeTriggers__.__animationListener__),S.__resizeTriggers__.__animationListener__=null);try{S.__resizeTriggers__=!S.removeChild(S.__resizeTriggers__)}catch{}}};return{addResizeListener:P,removeResizeListener:w}}var Rs,Ts;function _s(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function gv(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?_s(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_s(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var lu=(Ts=Rs=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"state",{height:t.props.defaultHeight||0,width:t.props.defaultWidth||0}),A(F(t),"_parentNode",void 0),A(F(t),"_autoSizer",void 0),A(F(t),"_window",void 0),A(F(t),"_detectElementResize",void 0),A(F(t),"_onResize",function(){var s=t.props,l=s.disableHeight,c=s.disableWidth,u=s.onResize;if(t._parentNode){var d=t._parentNode.offsetHeight||0,f=t._parentNode.offsetWidth||0,p=t._window||window,h=p.getComputedStyle(t._parentNode)||{},v=parseInt(h.paddingLeft,10)||0,m=parseInt(h.paddingRight,10)||0,b=parseInt(h.paddingTop,10)||0,y=parseInt(h.paddingBottom,10)||0,I=d-b-y,_=f-v-m;(!l&&t.state.height!==I||!c&&t.state.width!==_)&&(t.setState({height:d-b-y,width:f-v-m}),u({height:d,width:f}))}}),A(F(t),"_setRef",function(s){t._autoSizer=s}),t}return we(r,[{key:"componentDidMount",value:function(){var t=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=su(t,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var t=this.props,i=t.children,o=t.className,a=t.disableHeight,s=t.disableWidth,l=t.style,c=this.state,u=c.height,d=c.width,f={overflow:"visible"},p={};return a||(f.height=0,p.height=u),s||(f.width=0,p.width=d),C.createElement("div",{className:o,ref:this._setRef,style:gv({},f,{},l)},i(p))}}]),r}(C.Component),A(Rs,"propTypes",null),Ts);A(lu,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var Ds,Ps,vv=(Ps=Ds=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"_child",void 0),A(F(t),"_measure",function(){var s=t.props,l=s.cache,c=s.columnIndex,u=c===void 0?0:c,d=s.parent,f=s.rowIndex,p=f===void 0?t.props.index||0:f,h=t._getCellMeasurements(),v=h.height,m=h.width;(v!==l.getHeight(p,u)||m!==l.getWidth(p,u))&&(l.set(p,u,m,v),d&&typeof d.recomputeGridSize=="function"&&d.recomputeGridSize({columnIndex:u,rowIndex:p}))}),A(F(t),"_registerChild",function(s){s&&!(s instanceof Element)&&console.warn("CellMeasurer registerChild expects to be passed Element or null"),t._child=s,s&&t._maybeMeasureCell()}),t}return we(r,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var t=this.props.children;return typeof t=="function"?t({measure:this._measure,registerChild:this._registerChild}):t}},{key:"_getCellMeasurements",value:function(){var t=this.props.cache,i=this._child||Qr.findDOMNode(this);if(i&&i.ownerDocument&&i.ownerDocument.defaultView&&i instanceof i.ownerDocument.defaultView.HTMLElement){var o=i.style.width,a=i.style.height;t.hasFixedWidth()||(i.style.width="auto"),t.hasFixedHeight()||(i.style.height="auto");var s=Math.ceil(i.offsetHeight),l=Math.ceil(i.offsetWidth);return o&&(i.style.width=o),a&&(i.style.height=a),{height:s,width:l}}else return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var t=this.props,i=t.cache,o=t.columnIndex,a=o===void 0?0:o,s=t.parent,l=t.rowIndex,c=l===void 0?this.props.index||0:l;if(!i.has(c,a)){var u=this._getCellMeasurements(),d=u.height,f=u.width;i.set(c,a,f,d),s&&typeof s.invalidateCellSizeAfterRender=="function"&&s.invalidateCellSizeAfterRender({columnIndex:a,rowIndex:c})}}}]),r}(C.PureComponent),A(Ds,"propTypes",null),Ps);A(vv,"__internalCellMeasurerFlag",!1);function ks(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function mv(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?ks(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ks(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var bv=150,Ut={OBSERVED:"observed",REQUESTED:"requested"},ii=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),A(F(t),"_calculateSizeAndPositionDataOnNextUpdate",!1),A(F(t),"_onSectionRenderedMemoizer",ar()),A(F(t),"_onScrollMemoizer",ar(!1)),A(F(t),"_invokeOnSectionRenderedHelper",function(){var s=t.props,l=s.cellLayoutManager,c=s.onSectionRendered;t._onSectionRenderedMemoizer({callback:c,indices:{indices:l.getLastRenderedIndices()}})}),A(F(t),"_setScrollingContainerRef",function(s){t._scrollingContainer=s}),A(F(t),"_updateScrollPositionForScrollToCell",function(){var s=t.props,l=s.cellLayoutManager,c=s.height,u=s.scrollToAlignment,d=s.scrollToCell,f=s.width,p=t.state,h=p.scrollLeft,v=p.scrollTop;if(d>=0){var m=l.getScrollPositionForCell({align:u,cellIndex:d,height:c,scrollLeft:h,scrollTop:v,width:f});(m.scrollLeft!==h||m.scrollTop!==v)&&t._setScrollPosition(m)}}),A(F(t),"_onScroll",function(s){if(s.target===t._scrollingContainer){t._enablePointerEventsAfterDelay();var l=t.props,c=l.cellLayoutManager,u=l.height,d=l.isScrollingChange,f=l.width,p=t._scrollbarSize,h=c.getTotalSize(),v=h.height,m=h.width,b=Math.max(0,Math.min(m-f+p,s.target.scrollLeft)),y=Math.max(0,Math.min(v-u+p,s.target.scrollTop));if(t.state.scrollLeft!==b||t.state.scrollTop!==y){var I=s.cancelable?Ut.OBSERVED:Ut.REQUESTED;t.state.isScrolling||d(!0),t.setState({isScrolling:!0,scrollLeft:b,scrollPositionChangeReason:I,scrollTop:y})}t._invokeOnScrollMemoizer({scrollLeft:b,scrollTop:y,totalWidth:m,totalHeight:v})}}),t._scrollbarSize=oo(),t._scrollbarSize===void 0?(t._scrollbarSizeMeasured=!1,t._scrollbarSize=0):t._scrollbarSizeMeasured=!0,t}return we(r,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var t=this.props,i=t.cellLayoutManager,o=t.scrollLeft,a=t.scrollToCell,s=t.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=oo(),this._scrollbarSizeMeasured=!0,this.setState({})),a>=0?this._updateScrollPositionForScrollToCell():(o>=0||s>=0)&&this._setScrollPosition({scrollLeft:o,scrollTop:s}),this._invokeOnSectionRenderedHelper();var l=i.getTotalSize(),c=l.height,u=l.width;this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:s||0,totalHeight:c,totalWidth:u})}},{key:"componentDidUpdate",value:function(t,i){var o=this.props,a=o.height,s=o.scrollToAlignment,l=o.scrollToCell,c=o.width,u=this.state,d=u.scrollLeft,f=u.scrollPositionChangeReason,p=u.scrollTop;f===Ut.REQUESTED&&(d>=0&&d!==i.scrollLeft&&d!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=d),p>=0&&p!==i.scrollTop&&p!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=p)),(a!==t.height||s!==t.scrollToAlignment||l!==t.scrollToCell||c!==t.width)&&this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var t=this.props,i=t.autoHeight,o=t.cellCount,a=t.cellLayoutManager,s=t.className,l=t.height,c=t.horizontalOverscanSize,u=t.id,d=t.noContentRenderer,f=t.style,p=t.verticalOverscanSize,h=t.width,v=this.state,m=v.isScrolling,b=v.scrollLeft,y=v.scrollTop;(this._lastRenderedCellCount!==o||this._lastRenderedCellLayoutManager!==a||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=o,this._lastRenderedCellLayoutManager=a,this._calculateSizeAndPositionDataOnNextUpdate=!1,a.calculateSizeAndPositionData());var I=a.getTotalSize(),_=I.height,P=I.width,w=Math.max(0,b-c),D=Math.max(0,y-p),S=Math.min(P,b+h+c),T=Math.min(_,y+l+p),R=l>0&&h>0?a.cellRenderers({height:T-D,isScrolling:m,width:S-w,x:w,y:D}):[],O={boxSizing:"border-box",direction:"ltr",height:i?"auto":l,position:"relative",WebkitOverflowScrolling:"touch",width:h,willChange:"transform"},L=_>l?this._scrollbarSize:0,M=P>h?this._scrollbarSize:0;return O.overflowX=P+L<=h?"hidden":"auto",O.overflowY=_+M<=l?"hidden":"auto",C.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:tt("ReactVirtualized__Collection",s),id:u,onScroll:this._onScroll,role:"grid",style:mv({},O,{},f),tabIndex:0},o>0&&C.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:_,maxHeight:_,maxWidth:P,overflow:"hidden",pointerEvents:m?"none":"",width:P}},R),o===0&&d())}},{key:"_enablePointerEventsAfterDelay",value:function(){var t=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){var i=t.props.isScrollingChange;i(!1),t._disablePointerEventsTimeoutId=null,t.setState({isScrolling:!1})},bv)}},{key:"_invokeOnScrollMemoizer",value:function(t){var i=this,o=t.scrollLeft,a=t.scrollTop,s=t.totalHeight,l=t.totalWidth;this._onScrollMemoizer({callback:function(u){var d=u.scrollLeft,f=u.scrollTop,p=i.props,h=p.height,v=p.onScroll,m=p.width;v({clientHeight:h,clientWidth:m,scrollHeight:s,scrollLeft:d,scrollTop:f,scrollWidth:l})},indices:{scrollLeft:o,scrollTop:a}})}},{key:"_setScrollPosition",value:function(t){var i=t.scrollLeft,o=t.scrollTop,a={scrollPositionChangeReason:Ut.REQUESTED};i>=0&&(a.scrollLeft=i),o>=0&&(a.scrollTop=o),(i>=0&&i!==this.state.scrollLeft||o>=0&&o!==this.state.scrollTop)&&this.setState(a)}}],[{key:"getDerivedStateFromProps",value:function(t,i){return t.cellCount===0&&(i.scrollLeft!==0||i.scrollTop!==0)?{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:Ut.REQUESTED}:t.scrollLeft!==i.scrollLeft||t.scrollTop!==i.scrollTop?{scrollLeft:t.scrollLeft!=null?t.scrollLeft:i.scrollLeft,scrollTop:t.scrollTop!=null?t.scrollTop:i.scrollTop,scrollPositionChangeReason:Ut.REQUESTED}:null}}]),r}(C.PureComponent);A(ii,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0});ii.propTypes={};en(ii);var yv=function(){function e(r){var n=r.height,t=r.width,i=r.x,o=r.y;Ie(this,e),this.height=n,this.width=t,this.x=i,this.y=o,this._indexMap={},this._indices=[]}return we(e,[{key:"addCellIndex",value:function(n){var t=n.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),xv=100,Sv=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xv;Ie(this,e),this._sectionSize=r,this._cellMetadata=[],this._sections={}}return we(e,[{key:"getCellIndices",value:function(n){var t=n.height,i=n.width,o=n.x,a=n.y,s={};return this.getSections({height:t,width:i,x:o,y:a}).forEach(function(l){return l.getCellIndices().forEach(function(c){s[c]=c})}),Object.keys(s).map(function(l){return s[l]})}},{key:"getCellMetadata",value:function(n){var t=n.index;return this._cellMetadata[t]}},{key:"getSections",value:function(n){for(var t=n.height,i=n.width,o=n.x,a=n.y,s=Math.floor(o/this._sectionSize),l=Math.floor((o+i-1)/this._sectionSize),c=Math.floor(a/this._sectionSize),u=Math.floor((a+t-1)/this._sectionSize),d=[],f=s;f<=l;f++)for(var p=c;p<=u;p++){var h="".concat(f,".").concat(p);this._sections[h]||(this._sections[h]=new yv({height:this._sectionSize,width:this._sectionSize,x:f*this._sectionSize,y:p*this._sectionSize})),d.push(this._sections[h])}return d}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var n=this;return Object.keys(this._sections).map(function(t){return n._sections[t].toString()})}},{key:"registerCell",value:function(n){var t=n.cellMetadatum,i=n.index;this._cellMetadata[i]=t,this.getSections(t).forEach(function(o){return o.addCellIndex({index:i})})}}]),e}();function wv(e){for(var r=e.cellCount,n=e.cellSizeAndPositionGetter,t=e.sectionSize,i=[],o=new Sv(t),a=0,s=0,l=0;l<r;l++){var c=n({index:l});if(c.height==null||isNaN(c.height)||c.width==null||isNaN(c.width)||c.x==null||isNaN(c.x)||c.y==null||isNaN(c.y))throw Error("Invalid metadata returned for cell ".concat(l,`:
10
+ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(r.componentWillMount=tu,r.componentWillReceiveProps=ru),typeof r.getSnapshotBeforeUpdate=="function"){if(typeof r.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");r.componentWillUpdate=nu;var s=r.componentDidUpdate;r.componentDidUpdate=function(c,u,d){var f=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:d;s.call(this,c,u,f)}}return e}function iu(e){var r,n,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(n=iu(e[r]))&&(t&&(t+=" "),t+=n);else for(r in e)e[r]&&(t&&(t+=" "),t+=r);return t}function tt(){for(var e,r,n=0,t="";n<arguments.length;)(e=arguments[n++])&&(r=iu(e))&&(t&&(t+=" "),t+=r);return t}function gs(e){var r=e.cellCount,n=e.cellSize,t=e.computeMetadataCallback,i=e.computeMetadataCallbackProps,o=e.nextCellsCount,a=e.nextCellSize,s=e.nextScrollToIndex,l=e.scrollToIndex,c=e.updateScrollOffsetForScrollToIndex;(r!==o||(typeof n=="number"||typeof a=="number")&&n!==a)&&(t(i),l>=0&&l===s&&c())}function Zt(e,r){if(e==null)return{};var n,t,i=or(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)n=o[t],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Zg=function(){function e(r){var n=r.cellCount,t=r.cellSizeGetter,i=r.estimatedCellSize;Ie(this,e),A(this,"_cellSizeAndPositionData",{}),A(this,"_lastMeasuredIndex",-1),A(this,"_lastBatchedIndex",-1),A(this,"_cellCount",void 0),A(this,"_cellSizeGetter",void 0),A(this,"_estimatedCellSize",void 0),this._cellSizeGetter=t,this._cellCount=n,this._estimatedCellSize=i}return we(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(n){var t=n.cellCount,i=n.estimatedCellSize,o=n.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=i,this._cellSizeGetter=o}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(n){if(n<0||n>=this._cellCount)throw Error("Requested index ".concat(n," is outside of range 0..").concat(this._cellCount));if(n>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),i=t.offset+t.size,o=this._lastMeasuredIndex+1;o<=n;o++){var a=this._cellSizeGetter({index:o});if(a===void 0||isNaN(a))throw Error("Invalid size returned for cell ".concat(o," of value ").concat(a));a===null?(this._cellSizeAndPositionData[o]={offset:i,size:0},this._lastBatchedIndex=n):(this._cellSizeAndPositionData[o]={offset:i,size:a},i+=a,this._lastMeasuredIndex=n)}return this._cellSizeAndPositionData[n]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var n=this.getSizeAndPositionOfLastMeasuredCell(),t=n.offset+n.size,i=this._cellCount-this._lastMeasuredIndex-1,o=i*this._estimatedCellSize;return t+o}},{key:"getUpdatedOffsetForIndex",value:function(n){var t=n.align,i=t===void 0?"auto":t,o=n.containerSize,a=n.currentOffset,s=n.targetIndex;if(o<=0)return 0;var l=this.getSizeAndPositionOfCell(s),c=l.offset,u=c-o+l.size,d;switch(i){case"start":d=c;break;case"end":d=u;break;case"center":d=c-(o-l.size)/2;break;default:d=Math.max(u,Math.min(c,a));break}var f=this.getTotalSize();return Math.max(0,Math.min(f-o,d))}},{key:"getVisibleCellRange",value:function(n){var t=n.containerSize,i=n.offset,o=this.getTotalSize();if(o===0)return{};var a=i+t,s=this._findNearestCell(i),l=this.getSizeAndPositionOfCell(s);i=l.offset+l.size;for(var c=s;i<a&&c<this._cellCount-1;)c++,i+=this.getSizeAndPositionOfCell(c).size;return{start:s,stop:c}}},{key:"resetCell",value:function(n){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,n-1)}},{key:"_binarySearch",value:function(n,t,i){for(;t<=n;){var o=t+Math.floor((n-t)/2),a=this.getSizeAndPositionOfCell(o).offset;if(a===i)return o;a<i?t=o+1:a>i&&(n=o-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(n,t){for(var i=1;n<this._cellCount&&this.getSizeAndPositionOfCell(n).offset<t;)n+=i,i*=2;return this._binarySearch(Math.min(n,this._cellCount-1),Math.floor(n/2),t)}},{key:"_findNearestCell",value:function(n){if(isNaN(n))throw Error("Invalid offset ".concat(n," specified"));n=Math.max(0,n);var t=this.getSizeAndPositionOfLastMeasuredCell(),i=Math.max(0,this._lastMeasuredIndex);return t.offset>=n?this._binarySearch(i,0,n):this._exponentialSearch(i,n)}}]),e}(),ev=15e5,tv=16777100,rv=function(){return typeof window<"u"},nv=function(){return!!window.chrome},iv=function(){return rv()&&nv()?tv:ev},vs=function(){function e(r){var n=r.maxScrollSize,t=n===void 0?iv():n,i=Zt(r,["maxScrollSize"]);Ie(this,e),A(this,"_cellSizeAndPositionManager",void 0),A(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new Zg(i),this._maxScrollSize=t}return we(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(n){this._cellSizeAndPositionManager.configure(n)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(n){var t=n.containerSize,i=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize(),s=this._getOffsetPercentage({containerSize:t,offset:i,totalSize:a});return Math.round(s*(a-o))}},{key:"getSizeAndPositionOfCell",value:function(n){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(n)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(n){var t=n.align,i=t===void 0?"auto":t,o=n.containerSize,a=n.currentOffset,s=n.targetIndex;a=this._safeOffsetToOffset({containerSize:o,offset:a});var l=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:o,currentOffset:a,targetIndex:s});return this._offsetToSafeOffset({containerSize:o,offset:l})}},{key:"getVisibleCellRange",value:function(n){var t=n.containerSize,i=n.offset;return i=this._safeOffsetToOffset({containerSize:t,offset:i}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:i})}},{key:"resetCell",value:function(n){this._cellSizeAndPositionManager.resetCell(n)}},{key:"_getOffsetPercentage",value:function(n){var t=n.containerSize,i=n.offset,o=n.totalSize;return o<=t?0:i/(o-t)}},{key:"_offsetToSafeOffset",value:function(n){var t=n.containerSize,i=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize();if(o===a)return i;var s=this._getOffsetPercentage({containerSize:t,offset:i,totalSize:o});return Math.round(s*(a-t))}},{key:"_safeOffsetToOffset",value:function(n){var t=n.containerSize,i=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize();if(o===a)return i;var s=this._getOffsetPercentage({containerSize:t,offset:i,totalSize:a});return Math.round(s*(o-t))}}]),e}();function ar(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,r={};return function(n){var t=n.callback,i=n.indices,o=Object.keys(i),a=!e||o.every(function(l){var c=i[l];return Array.isArray(c)?c.length>0:c>=0}),s=o.length!==Object.keys(r).length||o.some(function(l){var c=r[l],u=i[l];return Array.isArray(u)?c.join(",")!==u.join(","):c!==u});r=i,a&&s&&t(i)}}var pn=-1,st=1;function ov(e){var r=e.cellCount,n=e.overscanCellsCount,t=e.scrollDirection,i=e.startIndex,o=e.stopIndex;return t===st?{overscanStartIndex:Math.max(0,i),overscanStopIndex:Math.min(r-1,o+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(r-1,o)}}function ms(e){var r=e.cellSize,n=e.cellSizeAndPositionManager,t=e.previousCellsCount,i=e.previousCellSize,o=e.previousScrollToAlignment,a=e.previousScrollToIndex,s=e.previousSize,l=e.scrollOffset,c=e.scrollToAlignment,u=e.scrollToIndex,d=e.size,f=e.sizeJustIncreasedFromZero,p=e.updateScrollIndexCallback,h=n.getCellCount(),v=u>=0&&u<h,m=d!==s||f||!i||typeof r=="number"&&r!==i;v&&(m||c!==o||u!==a)?p(u):!v&&h>0&&(d<s||h<t)&&l>n.getTotalSize()-d&&p(h-1)}function av(e){for(var r=e.cellCache,n=e.cellRenderer,t=e.columnSizeAndPositionManager,i=e.columnStartIndex,o=e.columnStopIndex,a=e.deferredMeasurementCache,s=e.horizontalOffsetAdjustment,l=e.isScrolling,c=e.isScrollingOptOut,u=e.parent,d=e.rowSizeAndPositionManager,f=e.rowStartIndex,p=e.rowStopIndex,h=e.styleCache,v=e.verticalOffsetAdjustment,m=e.visibleColumnIndices,y=e.visibleRowIndices,b=[],I=t.areOffsetsAdjusted()||d.areOffsetsAdjusted(),_=!l&&!I,P=f;P<=p;P++)for(var w=d.getSizeAndPositionOfCell(P),D=i;D<=o;D++){var S=t.getSizeAndPositionOfCell(D),T=D>=m.start&&D<=m.stop&&P>=y.start&&P<=y.stop,R="".concat(P,"-").concat(D),O=void 0;_&&h[R]?O=h[R]:a&&!a.has(P,D)?O={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(O={height:w.size,left:S.offset+s,position:"absolute",top:w.offset+v,width:S.size},h[R]=O);var L={columnIndex:D,isScrolling:l,isVisible:T,key:R,parent:u,rowIndex:P,style:O},M=void 0;(c||l)&&!s&&!v?(r[R]||(r[R]=n(L)),M=r[R]):M=n(L),!(M==null||M===!1)&&b.push(M)}return b}const sv=!!(typeof window<"u"&&window.document&&window.document.createElement);var hn;function oo(e){if((!hn&&hn!==0||e)&&sv){var r=document.createElement("div");r.style.position="absolute",r.style.top="-9999px",r.style.width="50px",r.style.height="50px",r.style.overflow="scroll",document.body.appendChild(r),hn=r.offsetWidth-r.clientWidth,document.body.removeChild(r)}return hn}var ze;typeof window<"u"?ze=window:typeof self<"u"?ze=self:ze={};var lv=ze.requestAnimationFrame||ze.webkitRequestAnimationFrame||ze.mozRequestAnimationFrame||ze.oRequestAnimationFrame||ze.msRequestAnimationFrame||function(e){return ze.setTimeout(e,1e3/60)},cv=ze.cancelAnimationFrame||ze.webkitCancelAnimationFrame||ze.mozCancelAnimationFrame||ze.oCancelAnimationFrame||ze.msCancelAnimationFrame||function(e){ze.clearTimeout(e)},bs=lv,uv=cv,sr=function(r){return uv(r.id)},Ho=function(r,n){var t;Promise.resolve().then(function(){t=Date.now()});var i=function a(){Date.now()-t>=n?r.call():o.id=bs(a)},o={id:bs(i)};return o},ys,xs;function Ss(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function Dt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ss(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ss(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var dv=150,wi={OBSERVED:"observed",REQUESTED:"requested"},fv=function(){return null},gt=(xs=ys=function(e){Ue(r,e);function r(n){var t;Ie(this,r),t=qe(this,Ve(r).call(this,n)),A(F(t),"_onGridRenderedMemoizer",ar()),A(F(t),"_onScrollMemoizer",ar(!1)),A(F(t),"_deferredInvalidateColumnIndex",null),A(F(t),"_deferredInvalidateRowIndex",null),A(F(t),"_recomputeScrollLeftFlag",!1),A(F(t),"_recomputeScrollTopFlag",!1),A(F(t),"_horizontalScrollBarSize",0),A(F(t),"_verticalScrollBarSize",0),A(F(t),"_scrollbarPresenceChanged",!1),A(F(t),"_scrollingContainer",void 0),A(F(t),"_childrenToDisplay",void 0),A(F(t),"_columnStartIndex",void 0),A(F(t),"_columnStopIndex",void 0),A(F(t),"_rowStartIndex",void 0),A(F(t),"_rowStopIndex",void 0),A(F(t),"_renderedColumnStartIndex",0),A(F(t),"_renderedColumnStopIndex",0),A(F(t),"_renderedRowStartIndex",0),A(F(t),"_renderedRowStopIndex",0),A(F(t),"_initialScrollTop",void 0),A(F(t),"_initialScrollLeft",void 0),A(F(t),"_disablePointerEventsTimeoutId",void 0),A(F(t),"_styleCache",{}),A(F(t),"_cellCache",{}),A(F(t),"_debounceScrollEndedCallback",function(){t._disablePointerEventsTimeoutId=null,t.setState({isScrolling:!1,needToResetStyleCache:!1})}),A(F(t),"_invokeOnGridRenderedHelper",function(){var a=t.props.onSectionRendered;t._onGridRenderedMemoizer({callback:a,indices:{columnOverscanStartIndex:t._columnStartIndex,columnOverscanStopIndex:t._columnStopIndex,columnStartIndex:t._renderedColumnStartIndex,columnStopIndex:t._renderedColumnStopIndex,rowOverscanStartIndex:t._rowStartIndex,rowOverscanStopIndex:t._rowStopIndex,rowStartIndex:t._renderedRowStartIndex,rowStopIndex:t._renderedRowStopIndex}})}),A(F(t),"_setScrollingContainerRef",function(a){t._scrollingContainer=a}),A(F(t),"_onScroll",function(a){a.target===t._scrollingContainer&&t.handleScrollEvent(a.target)});var i=new vs({cellCount:n.columnCount,cellSizeGetter:function(s){return r._wrapSizeGetter(n.columnWidth)(s)},estimatedCellSize:r._getEstimatedColumnSize(n)}),o=new vs({cellCount:n.rowCount,cellSizeGetter:function(s){return r._wrapSizeGetter(n.rowHeight)(s)},estimatedCellSize:r._getEstimatedRowSize(n)});return t.state={instanceProps:{columnSizeAndPositionManager:i,rowSizeAndPositionManager:o,prevColumnWidth:n.columnWidth,prevRowHeight:n.rowHeight,prevColumnCount:n.columnCount,prevRowCount:n.rowCount,prevIsScrolling:n.isScrolling===!0,prevScrollToColumn:n.scrollToColumn,prevScrollToRow:n.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:st,scrollDirectionVertical:st,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},n.scrollToRow>0&&(t._initialScrollTop=t._getCalculatedScrollTop(n,t.state)),n.scrollToColumn>0&&(t._initialScrollLeft=t._getCalculatedScrollLeft(n,t.state)),t}return we(r,[{key:"getOffsetForCell",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.alignment,o=i===void 0?this.props.scrollToAlignment:i,a=t.columnIndex,s=a===void 0?this.props.scrollToColumn:a,l=t.rowIndex,c=l===void 0?this.props.scrollToRow:l,u=Dt({},this.props,{scrollToAlignment:o,scrollToColumn:s,scrollToRow:c});return{scrollLeft:this._getCalculatedScrollLeft(u),scrollTop:this._getCalculatedScrollTop(u)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(t){var i=t.scrollLeft,o=i===void 0?0:i,a=t.scrollTop,s=a===void 0?0:a;if(!(s<0)){this._debounceScrollEnded();var l=this.props,c=l.autoHeight,u=l.autoWidth,d=l.height,f=l.width,p=this.state.instanceProps,h=p.scrollbarSize,v=p.rowSizeAndPositionManager.getTotalSize(),m=p.columnSizeAndPositionManager.getTotalSize(),y=Math.min(Math.max(0,m-f+h),o),b=Math.min(Math.max(0,v-d+h),s);if(this.state.scrollLeft!==y||this.state.scrollTop!==b){var I=y!==this.state.scrollLeft?y>this.state.scrollLeft?st:pn:this.state.scrollDirectionHorizontal,_=b!==this.state.scrollTop?b>this.state.scrollTop?st:pn:this.state.scrollDirectionVertical,P={isScrolling:!0,scrollDirectionHorizontal:I,scrollDirectionVertical:_,scrollPositionChangeReason:wi.OBSERVED};c||(P.scrollTop=b),u||(P.scrollLeft=y),P.needToResetStyleCache=!1,this.setState(P)}this._invokeOnScrollMemoizer({scrollLeft:y,scrollTop:b,totalColumnsWidth:m,totalRowsHeight:v})}}},{key:"invalidateCellSizeAfterRender",value:function(t){var i=t.columnIndex,o=t.rowIndex;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,i):i,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){var t=this.props,i=t.columnCount,o=t.rowCount,a=this.state.instanceProps;a.columnSizeAndPositionManager.getSizeAndPositionOfCell(i-1),a.rowSizeAndPositionManager.getSizeAndPositionOfCell(o-1)}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.columnIndex,o=i===void 0?0:i,a=t.rowIndex,s=a===void 0?0:a,l=this.props,c=l.scrollToColumn,u=l.scrollToRow,d=this.state.instanceProps;d.columnSizeAndPositionManager.resetCell(o),d.rowSizeAndPositionManager.resetCell(s),this._recomputeScrollLeftFlag=c>=0&&(this.state.scrollDirectionHorizontal===st?o<=c:o>=c),this._recomputeScrollTopFlag=u>=0&&(this.state.scrollDirectionVertical===st?s<=u:s>=u),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(t){var i=t.columnIndex,o=t.rowIndex,a=this.props.columnCount,s=this.props;a>1&&i!==void 0&&this._updateScrollLeftForScrollToColumn(Dt({},s,{scrollToColumn:i})),o!==void 0&&this._updateScrollTopForScrollToRow(Dt({},s,{scrollToRow:o}))}},{key:"componentDidMount",value:function(){var t=this.props,i=t.getScrollbarSize,o=t.height,a=t.scrollLeft,s=t.scrollToColumn,l=t.scrollTop,c=t.scrollToRow,u=t.width,d=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),d.scrollbarSizeMeasured||this.setState(function(h){var v=Dt({},h,{needToResetStyleCache:!1});return v.instanceProps.scrollbarSize=i(),v.instanceProps.scrollbarSizeMeasured=!0,v}),typeof a=="number"&&a>=0||typeof l=="number"&&l>=0){var f=r._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:a,scrollTop:l});f&&(f.needToResetStyleCache=!1,this.setState(f))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var p=o>0&&u>0;s>=0&&p&&this._updateScrollLeftForScrollToColumn(),c>=0&&p&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:a||0,scrollTop:l||0,totalColumnsWidth:d.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:d.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(t,i){var o=this,a=this.props,s=a.autoHeight,l=a.autoWidth,c=a.columnCount,u=a.height,d=a.rowCount,f=a.scrollToAlignment,p=a.scrollToColumn,h=a.scrollToRow,v=a.width,m=this.state,y=m.scrollLeft,b=m.scrollPositionChangeReason,I=m.scrollTop,_=m.instanceProps;this._handleInvalidatedGridSize();var P=c>0&&t.columnCount===0||d>0&&t.rowCount===0;b===wi.REQUESTED&&(!l&&y>=0&&(y!==this._scrollingContainer.scrollLeft||P)&&(this._scrollingContainer.scrollLeft=y),!s&&I>=0&&(I!==this._scrollingContainer.scrollTop||P)&&(this._scrollingContainer.scrollTop=I));var w=(t.width===0||t.height===0)&&u>0&&v>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):ms({cellSizeAndPositionManager:_.columnSizeAndPositionManager,previousCellsCount:t.columnCount,previousCellSize:t.columnWidth,previousScrollToAlignment:t.scrollToAlignment,previousScrollToIndex:t.scrollToColumn,previousSize:t.width,scrollOffset:y,scrollToAlignment:f,scrollToIndex:p,size:v,sizeJustIncreasedFromZero:w,updateScrollIndexCallback:function(){return o._updateScrollLeftForScrollToColumn(o.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):ms({cellSizeAndPositionManager:_.rowSizeAndPositionManager,previousCellsCount:t.rowCount,previousCellSize:t.rowHeight,previousScrollToAlignment:t.scrollToAlignment,previousScrollToIndex:t.scrollToRow,previousSize:t.height,scrollOffset:I,scrollToAlignment:f,scrollToIndex:h,size:u,sizeJustIncreasedFromZero:w,updateScrollIndexCallback:function(){return o._updateScrollTopForScrollToRow(o.props)}}),this._invokeOnGridRenderedHelper(),y!==i.scrollLeft||I!==i.scrollTop){var D=_.rowSizeAndPositionManager.getTotalSize(),S=_.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:y,scrollTop:I,totalColumnsWidth:S,totalRowsHeight:D})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&sr(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var t=this.props,i=t.autoContainerWidth,o=t.autoHeight,a=t.autoWidth,s=t.className,l=t.containerProps,c=t.containerRole,u=t.containerStyle,d=t.height,f=t.id,p=t.noContentRenderer,h=t.role,v=t.style,m=t.tabIndex,y=t.width,b=this.state,I=b.instanceProps,_=b.needToResetStyleCache,P=this._isScrolling(),w={boxSizing:"border-box",direction:"ltr",height:o?"auto":d,position:"relative",width:a?"auto":y,WebkitOverflowScrolling:"touch",willChange:"transform"};_&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var D=I.columnSizeAndPositionManager.getTotalSize(),S=I.rowSizeAndPositionManager.getTotalSize(),T=S>d?I.scrollbarSize:0,R=D>y?I.scrollbarSize:0;(R!==this._horizontalScrollBarSize||T!==this._verticalScrollBarSize)&&(this._horizontalScrollBarSize=R,this._verticalScrollBarSize=T,this._scrollbarPresenceChanged=!0),w.overflowX=D+T<=y?"hidden":"auto",w.overflowY=S+R<=d?"hidden":"auto";var O=this._childrenToDisplay,L=O.length===0&&d>0&&y>0;return C.createElement("div",K({ref:this._setScrollingContainerRef},l,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:tt("ReactVirtualized__Grid",s),id:f,onScroll:this._onScroll,role:h,style:Dt({},w,{},v),tabIndex:m}),O.length>0&&C.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:c,style:Dt({width:i?"auto":D,height:S,maxWidth:D,maxHeight:S,overflow:"hidden",pointerEvents:P?"none":"",position:"relative"},u)},O),L&&p())}},{key:"_calculateChildrenToRender",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=t.cellRenderer,a=t.cellRangeRenderer,s=t.columnCount,l=t.deferredMeasurementCache,c=t.height,u=t.overscanColumnCount,d=t.overscanIndicesGetter,f=t.overscanRowCount,p=t.rowCount,h=t.width,v=t.isScrollingOptOut,m=i.scrollDirectionHorizontal,y=i.scrollDirectionVertical,b=i.instanceProps,I=this._initialScrollTop>0?this._initialScrollTop:i.scrollTop,_=this._initialScrollLeft>0?this._initialScrollLeft:i.scrollLeft,P=this._isScrolling(t,i);if(this._childrenToDisplay=[],c>0&&h>0){var w=b.columnSizeAndPositionManager.getVisibleCellRange({containerSize:h,offset:_}),D=b.rowSizeAndPositionManager.getVisibleCellRange({containerSize:c,offset:I}),S=b.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:h,offset:_}),T=b.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:c,offset:I});this._renderedColumnStartIndex=w.start,this._renderedColumnStopIndex=w.stop,this._renderedRowStartIndex=D.start,this._renderedRowStopIndex=D.stop;var R=d({direction:"horizontal",cellCount:s,overscanCellsCount:u,scrollDirection:m,startIndex:typeof w.start=="number"?w.start:0,stopIndex:typeof w.stop=="number"?w.stop:-1}),O=d({direction:"vertical",cellCount:p,overscanCellsCount:f,scrollDirection:y,startIndex:typeof D.start=="number"?D.start:0,stopIndex:typeof D.stop=="number"?D.stop:-1}),L=R.overscanStartIndex,M=R.overscanStopIndex,H=O.overscanStartIndex,E=O.overscanStopIndex;if(l){if(!l.hasFixedHeight()){for(var B=H;B<=E;B++)if(!l.has(B,0)){L=0,M=s-1;break}}if(!l.hasFixedWidth()){for(var $=L;$<=M;$++)if(!l.has(0,$)){H=0,E=p-1;break}}}this._childrenToDisplay=a({cellCache:this._cellCache,cellRenderer:o,columnSizeAndPositionManager:b.columnSizeAndPositionManager,columnStartIndex:L,columnStopIndex:M,deferredMeasurementCache:l,horizontalOffsetAdjustment:S,isScrolling:P,isScrollingOptOut:v,parent:this,rowSizeAndPositionManager:b.rowSizeAndPositionManager,rowStartIndex:H,rowStopIndex:E,scrollLeft:_,scrollTop:I,styleCache:this._styleCache,verticalOffsetAdjustment:T,visibleColumnIndices:w,visibleRowIndices:D}),this._columnStartIndex=L,this._columnStopIndex=M,this._rowStartIndex=H,this._rowStopIndex=E}}},{key:"_debounceScrollEnded",value:function(){var t=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&sr(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=Ho(this._debounceScrollEndedCallback,t)}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"&&typeof this._deferredInvalidateRowIndex=="number"){var t=this._deferredInvalidateColumnIndex,i=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:t,rowIndex:i})}}},{key:"_invokeOnScrollMemoizer",value:function(t){var i=this,o=t.scrollLeft,a=t.scrollTop,s=t.totalColumnsWidth,l=t.totalRowsHeight;this._onScrollMemoizer({callback:function(u){var d=u.scrollLeft,f=u.scrollTop,p=i.props,h=p.height,v=p.onScroll,m=p.width;v({clientHeight:h,clientWidth:m,scrollHeight:l,scrollLeft:d,scrollTop:f,scrollWidth:s})},indices:{scrollLeft:o,scrollTop:a}})}},{key:"_isScrolling",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return Object.hasOwnProperty.call(t,"isScrolling")?!!t.isScrolling:!!i.isScrolling}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var t=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,t({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(t){var i=t.scrollLeft,o=t.scrollTop,a=r._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:i,scrollTop:o});a&&(a.needToResetStyleCache=!1,this.setState(a))}},{key:"_getCalculatedScrollLeft",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return r._getCalculatedScrollLeft(t,i)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=r._getScrollLeftForScrollToColumnStateUpdate(t,i);o&&(o.needToResetStyleCache=!1,this.setState(o))}},{key:"_getCalculatedScrollTop",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return r._getCalculatedScrollTop(t,i)}},{key:"_resetStyleCache",value:function(){var t=this._styleCache,i=this._cellCache,o=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var a=this._rowStartIndex;a<=this._rowStopIndex;a++)for(var s=this._columnStartIndex;s<=this._columnStopIndex;s++){var l="".concat(a,"-").concat(s);this._styleCache[l]=t[l],o&&(this._cellCache[l]=i[l])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=r._getScrollTopForScrollToRowStateUpdate(t,i);o&&(o.needToResetStyleCache=!1,this.setState(o))}}],[{key:"getDerivedStateFromProps",value:function(t,i){var o={};t.columnCount===0&&i.scrollLeft!==0||t.rowCount===0&&i.scrollTop!==0?(o.scrollLeft=0,o.scrollTop=0):(t.scrollLeft!==i.scrollLeft&&t.scrollToColumn<0||t.scrollTop!==i.scrollTop&&t.scrollToRow<0)&&Object.assign(o,r._getScrollToPositionStateUpdate({prevState:i,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}));var a=i.instanceProps;o.needToResetStyleCache=!1,(t.columnWidth!==a.prevColumnWidth||t.rowHeight!==a.prevRowHeight)&&(o.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:t.columnCount,estimatedCellSize:r._getEstimatedColumnSize(t),cellSizeGetter:r._wrapSizeGetter(t.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:t.rowCount,estimatedCellSize:r._getEstimatedRowSize(t),cellSizeGetter:r._wrapSizeGetter(t.rowHeight)}),(a.prevColumnCount===0||a.prevRowCount===0)&&(a.prevColumnCount=0,a.prevRowCount=0),t.autoHeight&&t.isScrolling===!1&&a.prevIsScrolling===!0&&Object.assign(o,{isScrolling:!1});var s,l;return gs({cellCount:a.prevColumnCount,cellSize:typeof a.prevColumnWidth=="number"?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:t,nextCellsCount:t.columnCount,nextCellSize:typeof t.columnWidth=="number"?t.columnWidth:null,nextScrollToIndex:t.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){s=r._getScrollLeftForScrollToColumnStateUpdate(t,i)}}),gs({cellCount:a.prevRowCount,cellSize:typeof a.prevRowHeight=="number"?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:t,nextCellsCount:t.rowCount,nextCellSize:typeof t.rowHeight=="number"?t.rowHeight:null,nextScrollToIndex:t.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){l=r._getScrollTopForScrollToRowStateUpdate(t,i)}}),a.prevColumnCount=t.columnCount,a.prevColumnWidth=t.columnWidth,a.prevIsScrolling=t.isScrolling===!0,a.prevRowCount=t.rowCount,a.prevRowHeight=t.rowHeight,a.prevScrollToColumn=t.scrollToColumn,a.prevScrollToRow=t.scrollToRow,a.scrollbarSize=t.getScrollbarSize(),a.scrollbarSize===void 0?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,o.instanceProps=a,Dt({},o,{},s,{},l)}},{key:"_getEstimatedColumnSize",value:function(t){return typeof t.columnWidth=="number"?t.columnWidth:t.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(t){return typeof t.rowHeight=="number"?t.rowHeight:t.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(t){var i=t.prevState,o=t.scrollLeft,a=t.scrollTop,s={scrollPositionChangeReason:wi.REQUESTED};return typeof o=="number"&&o>=0&&(s.scrollDirectionHorizontal=o>i.scrollLeft?st:pn,s.scrollLeft=o),typeof a=="number"&&a>=0&&(s.scrollDirectionVertical=a>i.scrollTop?st:pn,s.scrollTop=a),typeof o=="number"&&o>=0&&o!==i.scrollLeft||typeof a=="number"&&a>=0&&a!==i.scrollTop?s:{}}},{key:"_wrapSizeGetter",value:function(t){return typeof t=="function"?t:function(){return t}}},{key:"_getCalculatedScrollLeft",value:function(t,i){var o=t.columnCount,a=t.height,s=t.scrollToAlignment,l=t.scrollToColumn,c=t.width,u=i.scrollLeft,d=i.instanceProps;if(o>0){var f=o-1,p=l<0?f:Math.min(f,l),h=d.rowSizeAndPositionManager.getTotalSize(),v=d.scrollbarSizeMeasured&&h>a?d.scrollbarSize:0;return d.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:s,containerSize:c-v,currentOffset:u,targetIndex:p})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(t,i){var o=i.scrollLeft,a=r._getCalculatedScrollLeft(t,i);return typeof a=="number"&&a>=0&&o!==a?r._getScrollToPositionStateUpdate({prevState:i,scrollLeft:a,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(t,i){var o=t.height,a=t.rowCount,s=t.scrollToAlignment,l=t.scrollToRow,c=t.width,u=i.scrollTop,d=i.instanceProps;if(a>0){var f=a-1,p=l<0?f:Math.min(f,l),h=d.columnSizeAndPositionManager.getTotalSize(),v=d.scrollbarSizeMeasured&&h>c?d.scrollbarSize:0;return d.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:s,containerSize:o-v,currentOffset:u,targetIndex:p})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(t,i){var o=i.scrollTop,a=r._getCalculatedScrollTop(t,i);return typeof a=="number"&&a>=0&&o!==a?r._getScrollToPositionStateUpdate({prevState:i,scrollLeft:-1,scrollTop:a}):{}}}]),r}(C.PureComponent),A(ys,"propTypes",null),xs);A(gt,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:av,containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:oo,noContentRenderer:fv,onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:ov,overscanRowCount:10,role:"grid",scrollingResetTimeInterval:dv,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1});en(gt);var pv=1;function ou(e){var r=e.cellCount,n=e.overscanCellsCount,t=e.scrollDirection,i=e.startIndex,o=e.stopIndex;return n=Math.max(1,n),t===pv?{overscanStartIndex:Math.max(0,i-1),overscanStopIndex:Math.min(r-1,o+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(r-1,o+1)}}var ws,Cs;function Is(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function hv(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Is(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Is(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var au=(Cs=ws=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),A(F(t),"_columnStartIndex",0),A(F(t),"_columnStopIndex",0),A(F(t),"_rowStartIndex",0),A(F(t),"_rowStopIndex",0),A(F(t),"_onKeyDown",function(s){var l=t.props,c=l.columnCount,u=l.disabled,d=l.mode,f=l.rowCount;if(!u){var p=t._getScrollState(),h=p.scrollToColumn,v=p.scrollToRow,m=t._getScrollState(),y=m.scrollToColumn,b=m.scrollToRow;switch(s.key){case"ArrowDown":b=Math.min(d==="cells"?b+1:t._rowStopIndex+1,f-1);break;case"ArrowLeft":y=Math.max(d==="cells"?y-1:t._columnStartIndex-1,0);break;case"ArrowRight":y=Math.min(d==="cells"?y+1:t._columnStopIndex+1,c-1);break;case"ArrowUp":b=Math.max(d==="cells"?b-1:t._rowStartIndex-1,0);break}(y!==h||b!==v)&&(s.preventDefault(),t._updateScrollState({scrollToColumn:y,scrollToRow:b}))}}),A(F(t),"_onSectionRendered",function(s){var l=s.columnStartIndex,c=s.columnStopIndex,u=s.rowStartIndex,d=s.rowStopIndex;t._columnStartIndex=l,t._columnStopIndex=c,t._rowStartIndex=u,t._rowStopIndex=d}),t}return we(r,[{key:"setScrollIndexes",value:function(t){var i=t.scrollToColumn,o=t.scrollToRow;this.setState({scrollToRow:o,scrollToColumn:i})}},{key:"render",value:function(){var t=this.props,i=t.className,o=t.children,a=this._getScrollState(),s=a.scrollToColumn,l=a.scrollToRow;return C.createElement("div",{className:i,onKeyDown:this._onKeyDown},o({onSectionRendered:this._onSectionRendered,scrollToColumn:s,scrollToRow:l}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(t){var i=t.scrollToColumn,o=t.scrollToRow,a=this.props,s=a.isControlled,l=a.onScrollToChange;typeof l=="function"&&l({scrollToColumn:i,scrollToRow:o}),s||this.setState({scrollToColumn:i,scrollToRow:o})}}],[{key:"getDerivedStateFromProps",value:function(t,i){return t.isControlled?{}:t.scrollToColumn!==i.instanceProps.prevScrollToColumn||t.scrollToRow!==i.instanceProps.prevScrollToRow?hv({},i,{scrollToColumn:t.scrollToColumn,scrollToRow:t.scrollToRow,instanceProps:{prevScrollToColumn:t.scrollToColumn,prevScrollToRow:t.scrollToRow}}):{}}}]),r}(C.PureComponent),A(ws,"propTypes",null),Cs);A(au,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0});en(au);function su(e,r){var n;typeof r<"u"?n=r:typeof window<"u"?n=window:typeof self<"u"?n=self:n=Wp;var t=typeof n.document<"u"&&n.document.attachEvent;if(!t){var i=function(){var D=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(S){return n.setTimeout(S,20)};return function(S){return D(S)}}(),o=function(){var D=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.clearTimeout;return function(S){return D(S)}}(),a=function(S){var T=S.__resizeTriggers__,R=T.firstElementChild,O=T.lastElementChild,L=R.firstElementChild;O.scrollLeft=O.scrollWidth,O.scrollTop=O.scrollHeight,L.style.width=R.offsetWidth+1+"px",L.style.height=R.offsetHeight+1+"px",R.scrollLeft=R.scrollWidth,R.scrollTop=R.scrollHeight},s=function(S){return S.offsetWidth!=S.__resizeLast__.width||S.offsetHeight!=S.__resizeLast__.height},l=function(S){if(!(S.target.className&&typeof S.target.className.indexOf=="function"&&S.target.className.indexOf("contract-trigger")<0&&S.target.className.indexOf("expand-trigger")<0)){var T=this;a(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=i(function(){s(T)&&(T.__resizeLast__.width=T.offsetWidth,T.__resizeLast__.height=T.offsetHeight,T.__resizeListeners__.forEach(function(R){R.call(T,S)}))})}},c=!1,u="",d="animationstart",f="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h="";{var v=n.document.createElement("fakeelement");if(v.style.animationName!==void 0&&(c=!0),c===!1){for(var m=0;m<f.length;m++)if(v.style[f[m]+"AnimationName"]!==void 0){h=f[m],u="-"+h.toLowerCase()+"-",d=p[m],c=!0;break}}}var y="resizeanim",b="@"+u+"keyframes "+y+" { from { opacity: 0; } to { opacity: 0; } } ",I=u+"animation: 1ms "+y+"; "}var _=function(S){if(!S.getElementById("detectElementResize")){var T=(b||"")+".resize-triggers { "+(I||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',R=S.head||S.getElementsByTagName("head")[0],O=S.createElement("style");O.id="detectElementResize",O.type="text/css",e!=null&&O.setAttribute("nonce",e),O.styleSheet?O.styleSheet.cssText=T:O.appendChild(S.createTextNode(T)),R.appendChild(O)}},P=function(S,T){if(t)S.attachEvent("onresize",T);else{if(!S.__resizeTriggers__){var R=S.ownerDocument,O=n.getComputedStyle(S);O&&O.position=="static"&&(S.style.position="relative"),_(R),S.__resizeLast__={},S.__resizeListeners__=[],(S.__resizeTriggers__=R.createElement("div")).className="resize-triggers";var L='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var M=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return L}});S.__resizeTriggers__.innerHTML=M.createHTML("")}else S.__resizeTriggers__.innerHTML=L;S.appendChild(S.__resizeTriggers__),a(S),S.addEventListener("scroll",l,!0),d&&(S.__resizeTriggers__.__animationListener__=function(E){E.animationName==y&&a(S)},S.__resizeTriggers__.addEventListener(d,S.__resizeTriggers__.__animationListener__))}S.__resizeListeners__.push(T)}},w=function(S,T){if(t)S.detachEvent("onresize",T);else if(S.__resizeListeners__.splice(S.__resizeListeners__.indexOf(T),1),!S.__resizeListeners__.length){S.removeEventListener("scroll",l,!0),S.__resizeTriggers__.__animationListener__&&(S.__resizeTriggers__.removeEventListener(d,S.__resizeTriggers__.__animationListener__),S.__resizeTriggers__.__animationListener__=null);try{S.__resizeTriggers__=!S.removeChild(S.__resizeTriggers__)}catch{}}};return{addResizeListener:P,removeResizeListener:w}}var Rs,Ts;function _s(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function gv(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?_s(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_s(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var lu=(Ts=Rs=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"state",{height:t.props.defaultHeight||0,width:t.props.defaultWidth||0}),A(F(t),"_parentNode",void 0),A(F(t),"_autoSizer",void 0),A(F(t),"_window",void 0),A(F(t),"_detectElementResize",void 0),A(F(t),"_onResize",function(){var s=t.props,l=s.disableHeight,c=s.disableWidth,u=s.onResize;if(t._parentNode){var d=t._parentNode.offsetHeight||0,f=t._parentNode.offsetWidth||0,p=t._window||window,h=p.getComputedStyle(t._parentNode)||{},v=parseInt(h.paddingLeft,10)||0,m=parseInt(h.paddingRight,10)||0,y=parseInt(h.paddingTop,10)||0,b=parseInt(h.paddingBottom,10)||0,I=d-y-b,_=f-v-m;(!l&&t.state.height!==I||!c&&t.state.width!==_)&&(t.setState({height:d-y-b,width:f-v-m}),u({height:d,width:f}))}}),A(F(t),"_setRef",function(s){t._autoSizer=s}),t}return we(r,[{key:"componentDidMount",value:function(){var t=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=su(t,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var t=this.props,i=t.children,o=t.className,a=t.disableHeight,s=t.disableWidth,l=t.style,c=this.state,u=c.height,d=c.width,f={overflow:"visible"},p={};return a||(f.height=0,p.height=u),s||(f.width=0,p.width=d),C.createElement("div",{className:o,ref:this._setRef,style:gv({},f,{},l)},i(p))}}]),r}(C.Component),A(Rs,"propTypes",null),Ts);A(lu,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var Ds,Ps,vv=(Ps=Ds=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"_child",void 0),A(F(t),"_measure",function(){var s=t.props,l=s.cache,c=s.columnIndex,u=c===void 0?0:c,d=s.parent,f=s.rowIndex,p=f===void 0?t.props.index||0:f,h=t._getCellMeasurements(),v=h.height,m=h.width;(v!==l.getHeight(p,u)||m!==l.getWidth(p,u))&&(l.set(p,u,m,v),d&&typeof d.recomputeGridSize=="function"&&d.recomputeGridSize({columnIndex:u,rowIndex:p}))}),A(F(t),"_registerChild",function(s){s&&!(s instanceof Element)&&console.warn("CellMeasurer registerChild expects to be passed Element or null"),t._child=s,s&&t._maybeMeasureCell()}),t}return we(r,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var t=this.props.children;return typeof t=="function"?t({measure:this._measure,registerChild:this._registerChild}):t}},{key:"_getCellMeasurements",value:function(){var t=this.props.cache,i=this._child||Qr.findDOMNode(this);if(i&&i.ownerDocument&&i.ownerDocument.defaultView&&i instanceof i.ownerDocument.defaultView.HTMLElement){var o=i.style.width,a=i.style.height;t.hasFixedWidth()||(i.style.width="auto"),t.hasFixedHeight()||(i.style.height="auto");var s=Math.ceil(i.offsetHeight),l=Math.ceil(i.offsetWidth);return o&&(i.style.width=o),a&&(i.style.height=a),{height:s,width:l}}else return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var t=this.props,i=t.cache,o=t.columnIndex,a=o===void 0?0:o,s=t.parent,l=t.rowIndex,c=l===void 0?this.props.index||0:l;if(!i.has(c,a)){var u=this._getCellMeasurements(),d=u.height,f=u.width;i.set(c,a,f,d),s&&typeof s.invalidateCellSizeAfterRender=="function"&&s.invalidateCellSizeAfterRender({columnIndex:a,rowIndex:c})}}}]),r}(C.PureComponent),A(Ds,"propTypes",null),Ps);A(vv,"__internalCellMeasurerFlag",!1);function ks(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function mv(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?ks(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ks(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var bv=150,Ut={OBSERVED:"observed",REQUESTED:"requested"},ii=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),A(F(t),"_calculateSizeAndPositionDataOnNextUpdate",!1),A(F(t),"_onSectionRenderedMemoizer",ar()),A(F(t),"_onScrollMemoizer",ar(!1)),A(F(t),"_invokeOnSectionRenderedHelper",function(){var s=t.props,l=s.cellLayoutManager,c=s.onSectionRendered;t._onSectionRenderedMemoizer({callback:c,indices:{indices:l.getLastRenderedIndices()}})}),A(F(t),"_setScrollingContainerRef",function(s){t._scrollingContainer=s}),A(F(t),"_updateScrollPositionForScrollToCell",function(){var s=t.props,l=s.cellLayoutManager,c=s.height,u=s.scrollToAlignment,d=s.scrollToCell,f=s.width,p=t.state,h=p.scrollLeft,v=p.scrollTop;if(d>=0){var m=l.getScrollPositionForCell({align:u,cellIndex:d,height:c,scrollLeft:h,scrollTop:v,width:f});(m.scrollLeft!==h||m.scrollTop!==v)&&t._setScrollPosition(m)}}),A(F(t),"_onScroll",function(s){if(s.target===t._scrollingContainer){t._enablePointerEventsAfterDelay();var l=t.props,c=l.cellLayoutManager,u=l.height,d=l.isScrollingChange,f=l.width,p=t._scrollbarSize,h=c.getTotalSize(),v=h.height,m=h.width,y=Math.max(0,Math.min(m-f+p,s.target.scrollLeft)),b=Math.max(0,Math.min(v-u+p,s.target.scrollTop));if(t.state.scrollLeft!==y||t.state.scrollTop!==b){var I=s.cancelable?Ut.OBSERVED:Ut.REQUESTED;t.state.isScrolling||d(!0),t.setState({isScrolling:!0,scrollLeft:y,scrollPositionChangeReason:I,scrollTop:b})}t._invokeOnScrollMemoizer({scrollLeft:y,scrollTop:b,totalWidth:m,totalHeight:v})}}),t._scrollbarSize=oo(),t._scrollbarSize===void 0?(t._scrollbarSizeMeasured=!1,t._scrollbarSize=0):t._scrollbarSizeMeasured=!0,t}return we(r,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var t=this.props,i=t.cellLayoutManager,o=t.scrollLeft,a=t.scrollToCell,s=t.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=oo(),this._scrollbarSizeMeasured=!0,this.setState({})),a>=0?this._updateScrollPositionForScrollToCell():(o>=0||s>=0)&&this._setScrollPosition({scrollLeft:o,scrollTop:s}),this._invokeOnSectionRenderedHelper();var l=i.getTotalSize(),c=l.height,u=l.width;this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:s||0,totalHeight:c,totalWidth:u})}},{key:"componentDidUpdate",value:function(t,i){var o=this.props,a=o.height,s=o.scrollToAlignment,l=o.scrollToCell,c=o.width,u=this.state,d=u.scrollLeft,f=u.scrollPositionChangeReason,p=u.scrollTop;f===Ut.REQUESTED&&(d>=0&&d!==i.scrollLeft&&d!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=d),p>=0&&p!==i.scrollTop&&p!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=p)),(a!==t.height||s!==t.scrollToAlignment||l!==t.scrollToCell||c!==t.width)&&this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var t=this.props,i=t.autoHeight,o=t.cellCount,a=t.cellLayoutManager,s=t.className,l=t.height,c=t.horizontalOverscanSize,u=t.id,d=t.noContentRenderer,f=t.style,p=t.verticalOverscanSize,h=t.width,v=this.state,m=v.isScrolling,y=v.scrollLeft,b=v.scrollTop;(this._lastRenderedCellCount!==o||this._lastRenderedCellLayoutManager!==a||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=o,this._lastRenderedCellLayoutManager=a,this._calculateSizeAndPositionDataOnNextUpdate=!1,a.calculateSizeAndPositionData());var I=a.getTotalSize(),_=I.height,P=I.width,w=Math.max(0,y-c),D=Math.max(0,b-p),S=Math.min(P,y+h+c),T=Math.min(_,b+l+p),R=l>0&&h>0?a.cellRenderers({height:T-D,isScrolling:m,width:S-w,x:w,y:D}):[],O={boxSizing:"border-box",direction:"ltr",height:i?"auto":l,position:"relative",WebkitOverflowScrolling:"touch",width:h,willChange:"transform"},L=_>l?this._scrollbarSize:0,M=P>h?this._scrollbarSize:0;return O.overflowX=P+L<=h?"hidden":"auto",O.overflowY=_+M<=l?"hidden":"auto",C.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:tt("ReactVirtualized__Collection",s),id:u,onScroll:this._onScroll,role:"grid",style:mv({},O,{},f),tabIndex:0},o>0&&C.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:_,maxHeight:_,maxWidth:P,overflow:"hidden",pointerEvents:m?"none":"",width:P}},R),o===0&&d())}},{key:"_enablePointerEventsAfterDelay",value:function(){var t=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){var i=t.props.isScrollingChange;i(!1),t._disablePointerEventsTimeoutId=null,t.setState({isScrolling:!1})},bv)}},{key:"_invokeOnScrollMemoizer",value:function(t){var i=this,o=t.scrollLeft,a=t.scrollTop,s=t.totalHeight,l=t.totalWidth;this._onScrollMemoizer({callback:function(u){var d=u.scrollLeft,f=u.scrollTop,p=i.props,h=p.height,v=p.onScroll,m=p.width;v({clientHeight:h,clientWidth:m,scrollHeight:s,scrollLeft:d,scrollTop:f,scrollWidth:l})},indices:{scrollLeft:o,scrollTop:a}})}},{key:"_setScrollPosition",value:function(t){var i=t.scrollLeft,o=t.scrollTop,a={scrollPositionChangeReason:Ut.REQUESTED};i>=0&&(a.scrollLeft=i),o>=0&&(a.scrollTop=o),(i>=0&&i!==this.state.scrollLeft||o>=0&&o!==this.state.scrollTop)&&this.setState(a)}}],[{key:"getDerivedStateFromProps",value:function(t,i){return t.cellCount===0&&(i.scrollLeft!==0||i.scrollTop!==0)?{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:Ut.REQUESTED}:t.scrollLeft!==i.scrollLeft||t.scrollTop!==i.scrollTop?{scrollLeft:t.scrollLeft!=null?t.scrollLeft:i.scrollLeft,scrollTop:t.scrollTop!=null?t.scrollTop:i.scrollTop,scrollPositionChangeReason:Ut.REQUESTED}:null}}]),r}(C.PureComponent);A(ii,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0});ii.propTypes={};en(ii);var yv=function(){function e(r){var n=r.height,t=r.width,i=r.x,o=r.y;Ie(this,e),this.height=n,this.width=t,this.x=i,this.y=o,this._indexMap={},this._indices=[]}return we(e,[{key:"addCellIndex",value:function(n){var t=n.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),xv=100,Sv=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xv;Ie(this,e),this._sectionSize=r,this._cellMetadata=[],this._sections={}}return we(e,[{key:"getCellIndices",value:function(n){var t=n.height,i=n.width,o=n.x,a=n.y,s={};return this.getSections({height:t,width:i,x:o,y:a}).forEach(function(l){return l.getCellIndices().forEach(function(c){s[c]=c})}),Object.keys(s).map(function(l){return s[l]})}},{key:"getCellMetadata",value:function(n){var t=n.index;return this._cellMetadata[t]}},{key:"getSections",value:function(n){for(var t=n.height,i=n.width,o=n.x,a=n.y,s=Math.floor(o/this._sectionSize),l=Math.floor((o+i-1)/this._sectionSize),c=Math.floor(a/this._sectionSize),u=Math.floor((a+t-1)/this._sectionSize),d=[],f=s;f<=l;f++)for(var p=c;p<=u;p++){var h="".concat(f,".").concat(p);this._sections[h]||(this._sections[h]=new yv({height:this._sectionSize,width:this._sectionSize,x:f*this._sectionSize,y:p*this._sectionSize})),d.push(this._sections[h])}return d}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var n=this;return Object.keys(this._sections).map(function(t){return n._sections[t].toString()})}},{key:"registerCell",value:function(n){var t=n.cellMetadatum,i=n.index;this._cellMetadata[i]=t,this.getSections(t).forEach(function(o){return o.addCellIndex({index:i})})}}]),e}();function wv(e){for(var r=e.cellCount,n=e.cellSizeAndPositionGetter,t=e.sectionSize,i=[],o=new Sv(t),a=0,s=0,l=0;l<r;l++){var c=n({index:l});if(c.height==null||isNaN(c.height)||c.width==null||isNaN(c.width)||c.x==null||isNaN(c.x)||c.y==null||isNaN(c.y))throw Error("Invalid metadata returned for cell ".concat(l,`:
11
11
  x:`).concat(c.x,", y:").concat(c.y,", width:").concat(c.width,", height:").concat(c.height));a=Math.max(a,c.y+c.height),s=Math.max(s,c.x+c.width),i[l]=c,o.registerCell({cellMetadatum:c,index:l})}return{cellMetadata:i,height:a,sectionManager:o,width:s}}function Os(e){var r=e.align,n=r===void 0?"auto":r,t=e.cellOffset,i=e.cellSize,o=e.containerSize,a=e.currentOffset,s=t,l=s-o+i;switch(n){case"start":return s;case"end":return l;case"center":return s-(o-i)/2;default:return Math.max(l,Math.min(s,a))}}var cu=function(e){Ue(r,e);function r(n,t){var i;return Ie(this,r),i=qe(this,Ve(r).call(this,n,t)),i._cellMetadata=[],i._lastRenderedCellIndices=[],i._cellCache=[],i._isScrollingChange=i._isScrollingChange.bind(F(i)),i._setCollectionViewRef=i._setCollectionViewRef.bind(F(i)),i}return we(r,[{key:"forceUpdate",value:function(){this._collectionView!==void 0&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var t=K({},this.props);return C.createElement(ii,K({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},t))}},{key:"calculateSizeAndPositionData",value:function(){var t=this.props,i=t.cellCount,o=t.cellSizeAndPositionGetter,a=t.sectionSize,s=wv({cellCount:i,cellSizeAndPositionGetter:o,sectionSize:a});this._cellMetadata=s.cellMetadata,this._sectionManager=s.sectionManager,this._height=s.height,this._width=s.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(t){var i=t.align,o=t.cellIndex,a=t.height,s=t.scrollLeft,l=t.scrollTop,c=t.width,u=this.props.cellCount;if(o>=0&&o<u){var d=this._cellMetadata[o];s=Os({align:i,cellOffset:d.x,cellSize:d.width,containerSize:c,currentOffset:s}),l=Os({align:i,cellOffset:d.y,cellSize:d.height,containerSize:a,currentOffset:l})}return{scrollLeft:s,scrollTop:l}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(t){var i=this,o=t.height,a=t.isScrolling,s=t.width,l=t.x,c=t.y,u=this.props,d=u.cellGroupRenderer,f=u.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:o,width:s,x:l,y:c}),d({cellCache:this._cellCache,cellRenderer:f,cellSizeAndPositionGetter:function(h){var v=h.index;return i._sectionManager.getCellMetadata({index:v})},indices:this._lastRenderedCellIndices,isScrolling:a})}},{key:"_isScrollingChange",value:function(t){t||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(t){this._collectionView=t}}]),r}(C.PureComponent);A(cu,"defaultProps",{"aria-label":"grid",cellGroupRenderer:Cv});cu.propTypes={};function Cv(e){var r=e.cellCache,n=e.cellRenderer,t=e.cellSizeAndPositionGetter,i=e.indices,o=e.isScrolling;return i.map(function(a){var s=t({index:a}),l={index:a,isScrolling:o,key:a,style:{height:s.height,left:s.x,position:"absolute",top:s.y,width:s.width}};return o?(a in r||(r[a]=n(l)),r[a]):n(l)}).filter(function(a){return!!a})}function Iv(e){if(Array.isArray(e))return tg(e)}function Rv(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tv(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
12
12
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uu(e){return Iv(e)||Rv(e)||qc(e)||Tv()}var du=function(e){Ue(r,e);function r(n,t){var i;return Ie(this,r),i=qe(this,Ve(r).call(this,n,t)),i._loadMoreRowsMemoizer=ar(),i._onRowsRendered=i._onRowsRendered.bind(F(i)),i._registerChild=i._registerChild.bind(F(i)),i}return we(r,[{key:"resetLoadMoreRowsCache",value:function(t){this._loadMoreRowsMemoizer=ar(),t&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){var t=this.props.children;return t({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(t){var i=this,o=this.props.loadMoreRows;t.forEach(function(a){var s=o(a);s&&s.then(function(){_v({lastRenderedStartIndex:i._lastRenderedStartIndex,lastRenderedStopIndex:i._lastRenderedStopIndex,startIndex:a.startIndex,stopIndex:a.stopIndex})&&i._registeredChild&&Pv(i._registeredChild,i._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(t){var i=t.startIndex,o=t.stopIndex;this._lastRenderedStartIndex=i,this._lastRenderedStopIndex=o,this._doStuff(i,o)}},{key:"_doStuff",value:function(t,i){var o,a=this,s=this.props,l=s.isRowLoaded,c=s.minimumBatchSize,u=s.rowCount,d=s.threshold,f=Dv({isRowLoaded:l,minimumBatchSize:c,rowCount:u,startIndex:Math.max(0,t-d),stopIndex:Math.min(u-1,i+d)}),p=(o=[]).concat.apply(o,uu(f.map(function(h){var v=h.startIndex,m=h.stopIndex;return[v,m]})));this._loadMoreRowsMemoizer({callback:function(){a._loadUnloadedRanges(f)},indices:{squashedUnloadedRanges:p}})}},{key:"_registerChild",value:function(t){this._registeredChild=t}}]),r}(C.PureComponent);A(du,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15});du.propTypes={};function _v(e){var r=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,t=e.startIndex,i=e.stopIndex;return!(t>n||i<r)}function Dv(e){for(var r=e.isRowLoaded,n=e.minimumBatchSize,t=e.rowCount,i=e.startIndex,o=e.stopIndex,a=[],s=null,l=null,c=i;c<=o;c++){var u=r({index:c});u?l!==null&&(a.push({startIndex:s,stopIndex:l}),s=l=null):(l=c,s===null&&(s=c))}if(l!==null){for(var d=Math.min(Math.max(l,s+n-1),t-1),f=l+1;f<=d&&!r({index:f});f++)l=f;a.push({startIndex:s,stopIndex:l})}if(a.length)for(var p=a[0];p.stopIndex-p.startIndex+1<n&&p.startIndex>0;){var h=p.startIndex-1;if(!r({index:h}))p.startIndex=h;else break}return a}function Pv(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=typeof e.recomputeGridSize=="function"?e.recomputeGridSize:e.recomputeRowHeights;n?n.call(e,r):e.forceUpdate()}var Es,Ns,fu=(Ns=Es=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"Grid",void 0),A(F(t),"_cellRenderer",function(s){var l=s.parent,c=s.rowIndex,u=s.style,d=s.isScrolling,f=s.isVisible,p=s.key,h=t.props.rowRenderer,v=Object.getOwnPropertyDescriptor(u,"width");return v&&v.writable&&(u.width="100%"),h({index:c,style:u,isScrolling:d,isVisible:f,key:p,parent:l})}),A(F(t),"_setRef",function(s){t.Grid=s}),A(F(t),"_onScroll",function(s){var l=s.clientHeight,c=s.scrollHeight,u=s.scrollTop,d=t.props.onScroll;d({clientHeight:l,scrollHeight:c,scrollTop:u})}),A(F(t),"_onSectionRendered",function(s){var l=s.rowOverscanStartIndex,c=s.rowOverscanStopIndex,u=s.rowStartIndex,d=s.rowStopIndex,f=t.props.onRowsRendered;f({overscanStartIndex:l,overscanStopIndex:c,startIndex:u,stopIndex:d})}),t}return we(r,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(t){var i=t.alignment,o=t.index;if(this.Grid){var a=this.Grid.getOffsetForCell({alignment:i,rowIndex:o,columnIndex:0}),s=a.scrollTop;return s}return 0}},{key:"invalidateCellSizeAfterRender",value:function(t){var i=t.columnIndex,o=t.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:i})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.columnIndex,o=i===void 0?0:i,a=t.rowIndex,s=a===void 0?0:a;this.Grid&&this.Grid.recomputeGridSize({rowIndex:s,columnIndex:o})}},{key:"recomputeRowHeights",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:t,columnIndex:0})}},{key:"scrollToPosition",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:t})}},{key:"scrollToRow",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:t})}},{key:"render",value:function(){var t=this.props,i=t.className,o=t.noRowsRenderer,a=t.scrollToIndex,s=t.width,l=tt("ReactVirtualized__List",i);return C.createElement(gt,K({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:l,columnWidth:s,columnCount:1,noContentRenderer:o,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:a}))}}]),r}(C.PureComponent),A(Es,"propTypes",null),Ns);A(fu,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:ou,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});function kv(e){if(Array.isArray(e))return e}function Ov(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var t,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(l=(t=o.call(n)).done)&&(s.push(t.value),s.length!==r);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function Ev(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
13
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nv(e,r){return kv(e)||Ov(e,r)||qc(e,r)||Ev()}function Mv(e,r,n,t){for(var i=n+1;r<=n;){var o=r+n>>>1,a=e[o];a>=t?(i=o,n=o-1):r=o+1}return i}function Av(e,r,n,t,i){for(var o=n+1;r<=n;){var a=r+n>>>1,s=e[a];i(s,t)>=0?(o=a,n=a-1):r=a+1}return o}function Lv(e,r,n,t,i){return typeof n=="function"?Av(e,t===void 0?0:t|0,i===void 0?e.length-1:i|0,r,n):Mv(e,n===void 0?0:n|0,t===void 0?e.length-1:t|0,r)}function zv(e,r,n,t){for(var i=n+1;r<=n;){var o=r+n>>>1,a=e[o];a>t?(i=o,n=o-1):r=o+1}return i}function jv(e,r,n,t,i){for(var o=n+1;r<=n;){var a=r+n>>>1,s=e[a];i(s,t)>0?(o=a,n=a-1):r=a+1}return o}function Fv(e,r,n,t,i){return typeof n=="function"?jv(e,t===void 0?0:t|0,i===void 0?e.length-1:i|0,r,n):zv(e,n===void 0?0:n|0,t===void 0?e.length-1:t|0,r)}function Bv(e,r,n,t){for(var i=r-1;r<=n;){var o=r+n>>>1,a=e[o];a<t?(i=o,r=o+1):n=o-1}return i}function $v(e,r,n,t,i){for(var o=r-1;r<=n;){var a=r+n>>>1,s=e[a];i(s,t)<0?(o=a,r=a+1):n=a-1}return o}function Gv(e,r,n,t,i){return typeof n=="function"?$v(e,t===void 0?0:t|0,i===void 0?e.length-1:i|0,r,n):Bv(e,n===void 0?0:n|0,t===void 0?e.length-1:t|0,r)}function Wv(e,r,n,t){for(var i=r-1;r<=n;){var o=r+n>>>1,a=e[o];a<=t?(i=o,r=o+1):n=o-1}return i}function Hv(e,r,n,t,i){for(var o=r-1;r<=n;){var a=r+n>>>1,s=e[a];i(s,t)<=0?(o=a,r=a+1):n=a-1}return o}function Uv(e,r,n,t,i){return typeof n=="function"?Hv(e,t===void 0?0:t|0,i===void 0?e.length-1:i|0,r,n):Wv(e,n===void 0?0:n|0,t===void 0?e.length-1:t|0,r)}function qv(e,r,n,t){for(;r<=n;){var i=r+n>>>1,o=e[i];if(o===t)return i;o<=t?r=i+1:n=i-1}return-1}function Vv(e,r,n,t,i){for(;r<=n;){var o=r+n>>>1,a=e[o],s=i(a,t);if(s===0)return o;s<=0?r=o+1:n=o-1}return-1}function Kv(e,r,n,t,i){return typeof n=="function"?Vv(e,t===void 0?0:t|0,i===void 0?e.length-1:i|0,r,n):qv(e,n===void 0?0:n|0,t===void 0?e.length-1:t|0,r)}const Bn={ge:Lv,gt:Fv,lt:Gv,le:Uv,eq:Kv};var er=0,Ot=1,Tn=2;function Uo(e,r,n,t,i){this.mid=e,this.left=r,this.right=n,this.leftPoints=t,this.rightPoints=i,this.count=(r?r.count:0)+(n?n.count:0)+t.length}var tn=Uo.prototype;function Ci(e,r){e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function pu(e,r){var n=Wr(r);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function Ms(e,r){var n=e.intervals([]);n.push(r),pu(e,n)}function As(e,r){var n=e.intervals([]),t=n.indexOf(r);return t<0?er:(n.splice(t,1),pu(e,n),Ot)}tn.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e};tn.insert=function(e){var r=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(r+1)?Ms(this,e):this.left.insert(e):this.left=Wr([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(r+1)?Ms(this,e):this.right.insert(e):this.right=Wr([e]);else{var n=Bn.ge(this.leftPoints,e,qo),t=Bn.ge(this.rightPoints,e,Vo);this.leftPoints.splice(n,0,e),this.rightPoints.splice(t,0,e)}};tn.remove=function(e){var r=this.count-this.leftPoints;if(e[1]<this.mid){if(!this.left)return er;var n=this.right?this.right.count:0;if(4*n>3*(r-1))return As(this,e);var t=this.left.remove(e);return t===Tn?(this.left=null,this.count-=1,Ot):(t===Ot&&(this.count-=1),t)}else if(e[0]>this.mid){if(!this.right)return er;var i=this.left?this.left.count:0;if(4*i>3*(r-1))return As(this,e);var t=this.right.remove(e);return t===Tn?(this.right=null,this.count-=1,Ot):(t===Ot&&(this.count-=1),t)}else{if(this.count===1)return this.leftPoints[0]===e?Tn:er;if(this.leftPoints.length===1&&this.leftPoints[0]===e){if(this.left&&this.right){for(var o=this,a=this.left;a.right;)o=a,a=a.right;if(o===this)a.right=this.right;else{var s=this.left,t=this.right;o.count-=a.count,o.right=a.left,a.left=s,a.right=t}Ci(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?Ci(this,this.left):Ci(this,this.right);return Ot}for(var s=Bn.ge(this.leftPoints,e,qo);s<this.leftPoints.length&&this.leftPoints[s][0]===e[0];++s)if(this.leftPoints[s]===e){this.count-=1,this.leftPoints.splice(s,1);for(var t=Bn.ge(this.rightPoints,e,Vo);t<this.rightPoints.length&&this.rightPoints[t][1]===e[1];++t)if(this.rightPoints[t]===e)return this.rightPoints.splice(t,1),Ot}return er}};function hu(e,r,n){for(var t=0;t<e.length&&e[t][0]<=r;++t){var i=n(e[t]);if(i)return i}}function gu(e,r,n){for(var t=e.length-1;t>=0&&e[t][1]>=r;--t){var i=n(e[t]);if(i)return i}}function vu(e,r){for(var n=0;n<e.length;++n){var t=r(e[n]);if(t)return t}}tn.queryPoint=function(e,r){if(e<this.mid){if(this.left){var n=this.left.queryPoint(e,r);if(n)return n}return hu(this.leftPoints,e,r)}else if(e>this.mid){if(this.right){var n=this.right.queryPoint(e,r);if(n)return n}return gu(this.rightPoints,e,r)}else return vu(this.leftPoints,r)};tn.queryInterval=function(e,r,n){if(e<this.mid&&this.left){var t=this.left.queryInterval(e,r,n);if(t)return t}if(r>this.mid&&this.right){var t=this.right.queryInterval(e,r,n);if(t)return t}return r<this.mid?hu(this.leftPoints,r,n):e>this.mid?gu(this.rightPoints,e,n):vu(this.leftPoints,n)};function Yv(e,r){return e-r}function qo(e,r){var n=e[0]-r[0];return n||e[1]-r[1]}function Vo(e,r){var n=e[1]-r[1];return n||e[0]-r[0]}function Wr(e){if(e.length===0)return null;for(var r=[],n=0;n<e.length;++n)r.push(e[n][0],e[n][1]);r.sort(Yv);for(var t=r[r.length>>1],i=[],o=[],a=[],n=0;n<e.length;++n){var s=e[n];s[1]<t?i.push(s):t<s[0]?o.push(s):a.push(s)}var l=a,c=a.slice();return l.sort(qo),c.sort(Vo),new Uo(t,Wr(i),Wr(o),l,c)}function mu(e){this.root=e}var fr=mu.prototype;fr.insert=function(e){this.root?this.root.insert(e):this.root=new Uo(e[0],null,null,[e],[e])};fr.remove=function(e){if(this.root){var r=this.root.remove(e);return r===Tn&&(this.root=null),r!==er}return!1};fr.queryPoint=function(e,r){if(this.root)return this.root.queryPoint(e,r)};fr.queryInterval=function(e,r,n){if(e<=r&&this.root)return this.root.queryInterval(e,r,n)};Object.defineProperty(fr,"count",{get:function(){return this.root?this.root.count:0}});Object.defineProperty(fr,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function Jv(e){return new mu(null)}var Ii=function(){function e(){Ie(this,e),A(this,"_columnSizeMap",{}),A(this,"_intervalTree",Jv()),A(this,"_leftMap",{})}return we(e,[{key:"estimateTotalHeight",value:function(n,t,i){var o=n-this.count;return this.tallestColumnSize+Math.ceil(o/t)*i}},{key:"range",value:function(n,t,i){var o=this;this._intervalTree.queryInterval(n,n+t,function(a){var s=Nv(a,3),l=s[0];s[1];var c=s[2];return i(c,o._leftMap[c],l)})}},{key:"setPosition",value:function(n,t,i,o){this._intervalTree.insert([i,i+o,n]),this._leftMap[n]=t;var a=this._columnSizeMap,s=a[t];s===void 0?a[t]=i+o:a[t]=Math.max(s,i+o)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var n=this._columnSizeMap,t=0;for(var i in n){var o=n[i];t=t===0?o:Math.min(t,o)}return t}},{key:"tallestColumnSize",get:function(){var n=this._columnSizeMap,t=0;for(var i in n){var o=n[i];t=Math.max(t,o)}return t}}]),e}(),Ls,zs;function js(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function Xv(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?js(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):js(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Qv={},Zv=150,bu=(zs=Ls=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"state",{isScrolling:!1,scrollTop:0}),A(F(t),"_debounceResetIsScrollingId",void 0),A(F(t),"_invalidateOnUpdateStartIndex",null),A(F(t),"_invalidateOnUpdateStopIndex",null),A(F(t),"_positionCache",new Ii),A(F(t),"_startIndex",null),A(F(t),"_startIndexMemoized",null),A(F(t),"_stopIndex",null),A(F(t),"_stopIndexMemoized",null),A(F(t),"_debounceResetIsScrollingCallback",function(){t.setState({isScrolling:!1})}),A(F(t),"_setScrollingContainerRef",function(s){t._scrollingContainer=s}),A(F(t),"_onScroll",function(s){var l=t.props.height,c=s.currentTarget.scrollTop,u=Math.min(Math.max(0,t._getEstimatedTotalHeight()-l),c);c===u&&(t._debounceResetIsScrolling(),t.state.scrollTop!==u&&t.setState({isScrolling:!0,scrollTop:u}))}),t}return we(r,[{key:"clearCellPositions",value:function(){this._positionCache=new Ii,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(t){var i=t.rowIndex;this._invalidateOnUpdateStartIndex===null?(this._invalidateOnUpdateStartIndex=i,this._invalidateOnUpdateStopIndex=i):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,i),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,i))}},{key:"recomputeCellPositions",value:function(){var t=this._positionCache.count-1;this._positionCache=new Ii,this._populatePositionCache(0,t),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(t,i){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==t.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&sr(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var t=this,i=this.props,o=i.autoHeight,a=i.cellCount,s=i.cellMeasurerCache,l=i.cellRenderer,c=i.className,u=i.height,d=i.id,f=i.keyMapper,p=i.overscanByPixels,h=i.role,v=i.style,m=i.tabIndex,b=i.width,y=i.rowDirection,I=this.state,_=I.isScrolling,P=I.scrollTop,w=[],D=this._getEstimatedTotalHeight(),S=this._positionCache.shortestColumnSize,T=this._positionCache.count,R=0,O;if(this._positionCache.range(Math.max(0,P-p),u+p*2,function(H,E,B){var $;typeof O>"u"?(R=H,O=H):(R=Math.min(R,H),O=Math.max(O,H)),w.push(l({index:H,isScrolling:_,key:f(H),parent:t,style:($={height:s.getHeight(H)},A($,y==="ltr"?"left":"right",E),A($,"position","absolute"),A($,"top",B),A($,"width",s.getWidth(H)),$)}))}),S<P+u+p&&T<a)for(var L=Math.min(a-T,Math.ceil((P+u+p-S)/s.defaultHeight*b/s.defaultWidth)),M=T;M<T+L;M++)O=M,w.push(l({index:M,isScrolling:_,key:f(M),parent:this,style:{width:s.getWidth(M)}}));return this._startIndex=R,this._stopIndex=O,C.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:tt("ReactVirtualized__Masonry",c),id:d,onScroll:this._onScroll,role:h,style:Xv({boxSizing:"border-box",direction:"ltr",height:o?"auto":u,overflowX:"hidden",overflowY:D<u?"hidden":"auto",position:"relative",width:b,WebkitOverflowScrolling:"touch",willChange:"transform"},v),tabIndex:m},C.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:D,maxWidth:"100%",maxHeight:D,overflow:"hidden",pointerEvents:_?"none":"",position:"relative"}},w))}},{key:"_checkInvalidateOnUpdate",value:function(){if(typeof this._invalidateOnUpdateStartIndex=="number"){var t=this._invalidateOnUpdateStartIndex,i=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(t,i),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var t=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&sr(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=Ho(this._debounceResetIsScrollingCallback,t)}},{key:"_getEstimatedTotalHeight",value:function(){var t=this.props,i=t.cellCount,o=t.cellMeasurerCache,a=t.width,s=Math.max(1,Math.floor(a/o.defaultWidth));return this._positionCache.estimateTotalHeight(i,s,o.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var t=this.props,i=t.height,o=t.onScroll,a=this.state.scrollTop;this._onScrollMemoized!==a&&(o({clientHeight:i,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:a}),this._onScrollMemoized=a)}},{key:"_invokeOnCellsRenderedCallback",value:function(){if(this._startIndexMemoized!==this._startIndex||this._stopIndexMemoized!==this._stopIndex){var t=this.props.onCellsRendered;t({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex}}},{key:"_populatePositionCache",value:function(t,i){for(var o=this.props,a=o.cellMeasurerCache,s=o.cellPositioner,l=t;l<=i;l++){var c=s(l),u=c.left,d=c.top;this._positionCache.setPosition(l,u,d,a.getHeight(l))}}}],[{key:"getDerivedStateFromProps",value:function(t,i){return t.scrollTop!==void 0&&i.scrollTop!==t.scrollTop?{isScrolling:!0,scrollTop:t.scrollTop}:null}}]),r}(C.PureComponent),A(Ls,"propTypes",null),zs);A(bu,"defaultProps",{autoHeight:!1,keyMapper:em,onCellsRendered:Fs,onScroll:Fs,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:Zv,style:Qv,tabIndex:0,rowDirection:"ltr"});function em(e){return e}function Fs(){}en(bu);var Ri=function(){function e(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ie(this,e),A(this,"_cellMeasurerCache",void 0),A(this,"_columnIndexOffset",void 0),A(this,"_rowIndexOffset",void 0),A(this,"columnWidth",function(l){var c=l.index;r._cellMeasurerCache.columnWidth({index:c+r._columnIndexOffset})}),A(this,"rowHeight",function(l){var c=l.index;r._cellMeasurerCache.rowHeight({index:c+r._rowIndexOffset})});var t=n.cellMeasurerCache,i=n.columnIndexOffset,o=i===void 0?0:i,a=n.rowIndexOffset,s=a===void 0?0:a;this._cellMeasurerCache=t,this._columnIndexOffset=o,this._rowIndexOffset=s}return we(e,[{key:"clear",value:function(n,t){this._cellMeasurerCache.clear(n+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getHeight(n+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getWidth(n+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.has(n+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(n,t,i,o){this._cellMeasurerCache.set(n+this._rowIndexOffset,t+this._columnIndexOffset,i,o)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function Bs(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function Ne(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Bs(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bs(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var $s=20,Ko=function(e){Ue(r,e);function r(n,t){var i;Ie(this,r),i=qe(this,Ve(r).call(this,n,t)),A(F(i),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),A(F(i),"_deferredInvalidateColumnIndex",null),A(F(i),"_deferredInvalidateRowIndex",null),A(F(i),"_bottomLeftGridRef",function(l){i._bottomLeftGrid=l}),A(F(i),"_bottomRightGridRef",function(l){i._bottomRightGrid=l}),A(F(i),"_cellRendererBottomLeftGrid",function(l){var c=l.rowIndex,u=Zt(l,["rowIndex"]),d=i.props,f=d.cellRenderer,p=d.fixedRowCount,h=d.rowCount;return c===h-p?C.createElement("div",{key:u.key,style:Ne({},u.style,{height:$s})}):f(Ne({},u,{parent:F(i),rowIndex:c+p}))}),A(F(i),"_cellRendererBottomRightGrid",function(l){var c=l.columnIndex,u=l.rowIndex,d=Zt(l,["columnIndex","rowIndex"]),f=i.props,p=f.cellRenderer,h=f.fixedColumnCount,v=f.fixedRowCount;return p(Ne({},d,{columnIndex:c+h,parent:F(i),rowIndex:u+v}))}),A(F(i),"_cellRendererTopRightGrid",function(l){var c=l.columnIndex,u=Zt(l,["columnIndex"]),d=i.props,f=d.cellRenderer,p=d.columnCount,h=d.fixedColumnCount;return c===p-h?C.createElement("div",{key:u.key,style:Ne({},u.style,{width:$s})}):f(Ne({},u,{columnIndex:c+h,parent:F(i)}))}),A(F(i),"_columnWidthRightGrid",function(l){var c=l.index,u=i.props,d=u.columnCount,f=u.fixedColumnCount,p=u.columnWidth,h=i.state,v=h.scrollbarSize,m=h.showHorizontalScrollbar;return m&&c===d-f?v:typeof p=="function"?p({index:c+f}):p}),A(F(i),"_onScroll",function(l){var c=l.scrollLeft,u=l.scrollTop;i.setState({scrollLeft:c,scrollTop:u});var d=i.props.onScroll;d&&d(l)}),A(F(i),"_onScrollbarPresenceChange",function(l){var c=l.horizontal,u=l.size,d=l.vertical,f=i.state,p=f.showHorizontalScrollbar,h=f.showVerticalScrollbar;if(c!==p||d!==h){i.setState({scrollbarSize:u,showHorizontalScrollbar:c,showVerticalScrollbar:d});var v=i.props.onScrollbarPresenceChange;typeof v=="function"&&v({horizontal:c,size:u,vertical:d})}}),A(F(i),"_onScrollLeft",function(l){var c=l.scrollLeft;i._onScroll({scrollLeft:c,scrollTop:i.state.scrollTop})}),A(F(i),"_onScrollTop",function(l){var c=l.scrollTop;i._onScroll({scrollTop:c,scrollLeft:i.state.scrollLeft})}),A(F(i),"_rowHeightBottomGrid",function(l){var c=l.index,u=i.props,d=u.fixedRowCount,f=u.rowCount,p=u.rowHeight,h=i.state,v=h.scrollbarSize,m=h.showVerticalScrollbar;return m&&c===f-d?v:typeof p=="function"?p({index:c+d}):p}),A(F(i),"_topLeftGridRef",function(l){i._topLeftGrid=l}),A(F(i),"_topRightGridRef",function(l){i._topRightGrid=l});var o=n.deferredMeasurementCache,a=n.fixedColumnCount,s=n.fixedRowCount;return i._maybeCalculateCachedStyles(!0),o&&(i._deferredMeasurementCacheBottomLeftGrid=s>0?new Ri({cellMeasurerCache:o,columnIndexOffset:0,rowIndexOffset:s}):o,i._deferredMeasurementCacheBottomRightGrid=a>0||s>0?new Ri({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:s}):o,i._deferredMeasurementCacheTopRightGrid=a>0?new Ri({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:0}):o),i}return we(r,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.columnIndex,o=i===void 0?0:i,a=t.rowIndex,s=a===void 0?0:a;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,o):o,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,s):s}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.columnIndex,o=i===void 0?0:i,a=t.rowIndex,s=a===void 0?0:a,l=this.props,c=l.fixedColumnCount,u=l.fixedRowCount,d=Math.max(0,o-c),f=Math.max(0,s-u);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:f}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:d,rowIndex:f}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:s}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:d,rowIndex:s}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var t=this.props,i=t.scrollLeft,o=t.scrollTop;if(i>0||o>0){var a={};i>0&&(a.scrollLeft=i),o>0&&(a.scrollTop=o),this.setState(a)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var t=this.props,i=t.onScroll,o=t.onSectionRendered;t.onScrollbarPresenceChange,t.scrollLeft;var a=t.scrollToColumn;t.scrollTop;var s=t.scrollToRow,l=Zt(t,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),this.props.width===0||this.props.height===0)return null;var c=this.state,u=c.scrollLeft,d=c.scrollTop;return C.createElement("div",{style:this._containerOuterStyle},C.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(l),this._renderTopRightGrid(Ne({},l,{onScroll:i,scrollLeft:u}))),C.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(Ne({},l,{onScroll:i,scrollTop:d})),this._renderBottomRightGrid(Ne({},l,{onScroll:i,onSectionRendered:o,scrollLeft:u,scrollToColumn:a,scrollToRow:s,scrollTop:d}))))}},{key:"_getBottomGridHeight",value:function(t){var i=t.height,o=this._getTopGridHeight(t);return i-o}},{key:"_getLeftGridWidth",value:function(t){var i=t.fixedColumnCount,o=t.columnWidth;if(this._leftGridWidth==null)if(typeof o=="function"){for(var a=0,s=0;s<i;s++)a+=o({index:s});this._leftGridWidth=a}else this._leftGridWidth=o*i;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(t){var i=t.width,o=this._getLeftGridWidth(t);return i-o}},{key:"_getTopGridHeight",value:function(t){var i=t.fixedRowCount,o=t.rowHeight;if(this._topGridHeight==null)if(typeof o=="function"){for(var a=0,s=0;s<i;s++)a+=o({index:s});this._topGridHeight=a}else this._topGridHeight=o*i;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"){var t=this._deferredInvalidateColumnIndex,i=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:t,rowIndex:i}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(t){var i=this.props,o=i.columnWidth,a=i.enableFixedColumnScroll,s=i.enableFixedRowScroll,l=i.height,c=i.fixedColumnCount,u=i.fixedRowCount,d=i.rowHeight,f=i.style,p=i.styleBottomLeftGrid,h=i.styleBottomRightGrid,v=i.styleTopLeftGrid,m=i.styleTopRightGrid,b=i.width,y=t||l!==this._lastRenderedHeight||b!==this._lastRenderedWidth,I=t||o!==this._lastRenderedColumnWidth||c!==this._lastRenderedFixedColumnCount,_=t||u!==this._lastRenderedFixedRowCount||d!==this._lastRenderedRowHeight;(t||y||f!==this._lastRenderedStyle)&&(this._containerOuterStyle=Ne({height:l,overflow:"visible",width:b},f)),(t||y||_)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:b},this._containerBottomStyle={height:l-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:b}),(t||p!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=Ne({left:0,overflowX:"hidden",overflowY:a?"auto":"hidden",position:"absolute"},p)),(t||I||h!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=Ne({left:this._getLeftGridWidth(this.props),position:"absolute"},h)),(t||v!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=Ne({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},v)),(t||I||m!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=Ne({left:this._getLeftGridWidth(this.props),overflowX:s?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},m)),this._lastRenderedColumnWidth=o,this._lastRenderedFixedColumnCount=c,this._lastRenderedFixedRowCount=u,this._lastRenderedHeight=l,this._lastRenderedRowHeight=d,this._lastRenderedStyle=f,this._lastRenderedStyleBottomLeftGrid=p,this._lastRenderedStyleBottomRightGrid=h,this._lastRenderedStyleTopLeftGrid=v,this._lastRenderedStyleTopRightGrid=m,this._lastRenderedWidth=b}},{key:"_prepareForRender",value:function(){(this._lastRenderedColumnWidth!==this.props.columnWidth||this._lastRenderedFixedColumnCount!==this.props.fixedColumnCount)&&(this._leftGridWidth=null),(this._lastRenderedFixedRowCount!==this.props.fixedRowCount||this._lastRenderedRowHeight!==this.props.rowHeight)&&(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(t){var i=t.enableFixedColumnScroll,o=t.fixedColumnCount,a=t.fixedRowCount,s=t.rowCount,l=t.hideBottomLeftGridScrollbar,c=this.state.showVerticalScrollbar;if(!o)return null;var u=c?1:0,d=this._getBottomGridHeight(t),f=this._getLeftGridWidth(t),p=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,h=l?f+p:f,v=C.createElement(gt,K({},t,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:o,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:d,onScroll:i?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,s-a)+u,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:h}));return l?C.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:Ne({},this._bottomLeftGridStyle,{height:d,width:f,overflowY:"hidden"})},v):v}},{key:"_renderBottomRightGrid",value:function(t){var i=t.columnCount,o=t.fixedColumnCount,a=t.fixedRowCount,s=t.rowCount,l=t.scrollToColumn,c=t.scrollToRow;return C.createElement(gt,K({},t,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,i-o),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(t),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,s-a),rowHeight:this._rowHeightBottomGrid,scrollToColumn:l-o,scrollToRow:c-a,style:this._bottomRightGridStyle,width:this._getRightGridWidth(t)}))}},{key:"_renderTopLeftGrid",value:function(t){var i=t.fixedColumnCount,o=t.fixedRowCount;return!i||!o?null:C.createElement(gt,K({},t,{className:this.props.classNameTopLeftGrid,columnCount:i,height:this._getTopGridHeight(t),ref:this._topLeftGridRef,rowCount:o,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(t)}))}},{key:"_renderTopRightGrid",value:function(t){var i=t.columnCount,o=t.enableFixedRowScroll,a=t.fixedColumnCount,s=t.fixedRowCount,l=t.scrollLeft,c=t.hideTopRightGridScrollbar,u=this.state,d=u.showHorizontalScrollbar,f=u.scrollbarSize;if(!s)return null;var p=d?1:0,h=this._getTopGridHeight(t),v=this._getRightGridWidth(t),m=d?f:0,b=h,y=this._topRightGridStyle;c&&(b=h+m,y=Ne({},this._topRightGridStyle,{left:0}));var I=C.createElement(gt,K({},t,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,i-a)+p,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:b,onScroll:o?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:s,scrollLeft:l,style:y,tabIndex:null,width:v}));return c?C.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:Ne({},this._topRightGridStyle,{height:h,width:v,overflowX:"hidden"})},I):I}}],[{key:"getDerivedStateFromProps",value:function(t,i){return t.scrollLeft!==i.scrollLeft||t.scrollTop!==i.scrollTop?{scrollLeft:t.scrollLeft!=null&&t.scrollLeft>=0?t.scrollLeft:i.scrollLeft,scrollTop:t.scrollTop!=null&&t.scrollTop>=0?t.scrollTop:i.scrollTop}:null}}]),r}(C.PureComponent);A(Ko,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1});Ko.propTypes={};en(Ko);function tm(e){var r=e.dataKey,n=e.rowData;return typeof n.get=="function"?n.get(r):n[r]}function rm(e){var r=e.cellData;return r==null?"":String(r)}function yu(e){var r=e.className,n=e.columns,t=e.style;return C.createElement("div",{className:r,role:"row",style:t},n)}yu.propTypes=null;var vt={ASC:"ASC",DESC:"DESC"};function xu(e){var r=e.sortDirection,n=tt("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":r===vt.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":r===vt.DESC});return C.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},r===vt.ASC?C.createElement("path",{d:"M7 14l5-5 5 5z"}):C.createElement("path",{d:"M7 10l5 5 5-5z"}),C.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}xu.propTypes={};function Su(e){var r=e.dataKey,n=e.label,t=e.sortBy,i=e.sortDirection,o=t===r,a=[C.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:typeof n=="string"?n:null},n)];return o&&a.push(C.createElement(xu,{key:"SortIndicator",sortDirection:i})),a}Su.propTypes=null;function wu(e){var r=e.className,n=e.columns,t=e.index,i=e.key,o=e.onRowClick,a=e.onRowDoubleClick,s=e.onRowMouseOut,l=e.onRowMouseOver,c=e.onRowRightClick,u=e.rowData,d=e.style,f={"aria-rowindex":t+1};return(o||a||s||l||c)&&(f["aria-label"]="row",f.tabIndex=0,o&&(f.onClick=function(p){return o({event:p,index:t,rowData:u})}),a&&(f.onDoubleClick=function(p){return a({event:p,index:t,rowData:u})}),s&&(f.onMouseOut=function(p){return s({event:p,index:t,rowData:u})}),l&&(f.onMouseOver=function(p){return l({event:p,index:t,rowData:u})}),c&&(f.onContextMenu=function(p){return c({event:p,index:t,rowData:u})})),C.createElement("div",K({},f,{className:r,key:i,role:"row",style:d}),n)}wu.propTypes=null;var Cu=function(e){Ue(r,e);function r(){return Ie(this,r),qe(this,Ve(r).apply(this,arguments))}return r}(C.Component);A(Cu,"defaultProps",{cellDataGetter:tm,cellRenderer:rm,defaultSortDirection:vt.ASC,flexGrow:0,flexShrink:1,headerRenderer:Su,style:{}});Cu.propTypes={};function Gs(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function qt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Gs(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gs(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Iu=function(e){Ue(r,e);function r(n){var t;return Ie(this,r),t=qe(this,Ve(r).call(this,n)),t.state={scrollbarWidth:0},t._createColumn=t._createColumn.bind(F(t)),t._createRow=t._createRow.bind(F(t)),t._onScroll=t._onScroll.bind(F(t)),t._onSectionRendered=t._onSectionRendered.bind(F(t)),t._setRef=t._setRef.bind(F(t)),t}return we(r,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(t){var i=t.alignment,o=t.index;if(this.Grid){var a=this.Grid.getOffsetForCell({alignment:i,rowIndex:o}),s=a.scrollTop;return s}return 0}},{key:"invalidateCellSizeAfterRender",value:function(t){var i=t.columnIndex,o=t.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:i})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.columnIndex,o=i===void 0?0:i,a=t.rowIndex,s=a===void 0?0:a;this.Grid&&this.Grid.recomputeGridSize({rowIndex:s,columnIndex:o})}},{key:"recomputeRowHeights",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:t})}},{key:"scrollToPosition",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:t})}},{key:"scrollToRow",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:t})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var t=Qr.findDOMNode(this.Grid),i=t.clientWidth||0,o=t.offsetWidth||0;return o-i}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var t=this,i=this.props,o=i.children,a=i.className,s=i.disableHeader,l=i.gridClassName,c=i.gridStyle,u=i.headerHeight,d=i.headerRowRenderer,f=i.height,p=i.id,h=i.noRowsRenderer,v=i.rowClassName,m=i.rowStyle,b=i.scrollToIndex,y=i.style,I=i.width,_=this.state.scrollbarWidth,P=s?f:f-u,w=typeof v=="function"?v({index:-1}):v,D=typeof m=="function"?m({index:-1}):m;return this._cachedColumnStyles=[],C.Children.toArray(o).forEach(function(S,T){var R=t._getFlexStyleForColumn(S,S.props.style);t._cachedColumnStyles[T]=qt({overflow:"hidden"},R)}),C.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":C.Children.toArray(o).length,"aria-rowcount":this.props.rowCount,className:tt("ReactVirtualized__Table",a),id:p,role:"grid",style:y},!s&&d({className:tt("ReactVirtualized__Table__headerRow",w),columns:this._getHeaderColumns(),style:qt({height:u,overflow:"hidden",paddingRight:_,width:I},D)}),C.createElement(gt,K({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:tt("ReactVirtualized__Table__Grid",l),cellRenderer:this._createRow,columnWidth:I,columnCount:1,height:P,id:void 0,noContentRenderer:h,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:_,scrollToRow:b,style:qt({},c,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(t){var i=t.column,o=t.columnIndex,a=t.isScrolling,s=t.parent,l=t.rowData,c=t.rowIndex,u=this.props.onColumnClick,d=i.props,f=d.cellDataGetter,p=d.cellRenderer,h=d.className,v=d.columnData,m=d.dataKey,b=d.id,y=f({columnData:v,dataKey:m,rowData:l}),I=p({cellData:y,columnData:v,columnIndex:o,dataKey:m,isScrolling:a,parent:s,rowData:l,rowIndex:c}),_=function(S){u&&u({columnData:v,dataKey:m,event:S})},P=this._cachedColumnStyles[o],w=typeof I=="string"?I:null;return C.createElement("div",{"aria-colindex":o+1,"aria-describedby":b,className:tt("ReactVirtualized__Table__rowColumn",h),key:"Row"+c+"-Col"+o,onClick:_,role:"gridcell",style:P,title:w},I)}},{key:"_createHeader",value:function(t){var i=t.column,o=t.index,a=this.props,s=a.headerClassName,l=a.headerStyle,c=a.onHeaderClick,u=a.sort,d=a.sortBy,f=a.sortDirection,p=i.props,h=p.columnData,v=p.dataKey,m=p.defaultSortDirection,b=p.disableSort,y=p.headerRenderer,I=p.id,_=p.label,P=!b&&u,w=tt("ReactVirtualized__Table__headerColumn",s,i.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:P}),D=this._getFlexStyleForColumn(i,qt({},l,{},i.props.headerStyle)),S=y({columnData:h,dataKey:v,disableSort:b,label:_,sortBy:d,sortDirection:f}),T,R,O,L,M;if(P||c){var H=d!==v,E=H?m:f===vt.DESC?vt.ASC:vt.DESC,B=function(J){P&&u({defaultSortDirection:m,event:J,sortBy:v,sortDirection:E}),c&&c({columnData:h,dataKey:v,event:J})},$=function(J){(J.key==="Enter"||J.key===" ")&&B(J)};M=i.props["aria-label"]||_||v,L="none",O=0,T=B,R=$}return d===v&&(L=f===vt.ASC?"ascending":"descending"),C.createElement("div",{"aria-label":M,"aria-sort":L,className:w,id:I,key:"Header-Col"+o,onClick:T,onKeyDown:R,role:"columnheader",style:D,tabIndex:O},S)}},{key:"_createRow",value:function(t){var i=this,o=t.rowIndex,a=t.isScrolling,s=t.key,l=t.parent,c=t.style,u=this.props,d=u.children,f=u.onRowClick,p=u.onRowDoubleClick,h=u.onRowRightClick,v=u.onRowMouseOver,m=u.onRowMouseOut,b=u.rowClassName,y=u.rowGetter,I=u.rowRenderer,_=u.rowStyle,P=this.state.scrollbarWidth,w=typeof b=="function"?b({index:o}):b,D=typeof _=="function"?_({index:o}):_,S=y({index:o}),T=C.Children.toArray(d).map(function(L,M){return i._createColumn({column:L,columnIndex:M,isScrolling:a,parent:l,rowData:S,rowIndex:o,scrollbarWidth:P})}),R=tt("ReactVirtualized__Table__row",w),O=qt({},c,{height:this._getRowHeight(o),overflow:"hidden",paddingRight:P},D);return I({className:R,columns:T,index:o,isScrolling:a,key:s,onRowClick:f,onRowDoubleClick:p,onRowRightClick:h,onRowMouseOver:v,onRowMouseOut:m,rowData:S,style:O})}},{key:"_getFlexStyleForColumn",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o="".concat(t.props.flexGrow," ").concat(t.props.flexShrink," ").concat(t.props.width,"px"),a=qt({},i,{flex:o,msFlex:o,WebkitFlex:o});return t.props.maxWidth&&(a.maxWidth=t.props.maxWidth),t.props.minWidth&&(a.minWidth=t.props.minWidth),a}},{key:"_getHeaderColumns",value:function(){var t=this,i=this.props,o=i.children,a=i.disableHeader,s=a?[]:C.Children.toArray(o);return s.map(function(l,c){return t._createHeader({column:l,index:c})})}},{key:"_getRowHeight",value:function(t){var i=this.props.rowHeight;return typeof i=="function"?i({index:t}):i}},{key:"_onScroll",value:function(t){var i=t.clientHeight,o=t.scrollHeight,a=t.scrollTop,s=this.props.onScroll;s({clientHeight:i,scrollHeight:o,scrollTop:a})}},{key:"_onSectionRendered",value:function(t){var i=t.rowOverscanStartIndex,o=t.rowOverscanStopIndex,a=t.rowStartIndex,s=t.rowStopIndex,l=this.props.onRowsRendered;l({overscanStartIndex:i,overscanStopIndex:o,startIndex:a,stopIndex:s})}},{key:"_setRef",value:function(t){this.Grid=t}},{key:"_setScrollbarWidth",value:function(){var t=this.getScrollbarWidth();this.setState({scrollbarWidth:t})}}]),r}(C.PureComponent);A(Iu,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:ou,overscanRowCount:10,rowRenderer:wu,headerRowRenderer:yu,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}});Iu.propTypes={};var mt=[],Ar=null,Lt=null;function Ru(){Lt&&(Lt=null,document.body&&Ar!=null&&(document.body.style.pointerEvents=Ar),Ar=null)}function nm(){Ru(),mt.forEach(function(e){return e.__resetIsScrolling()})}function im(){Lt&&sr(Lt);var e=0;mt.forEach(function(r){e=Math.max(e,r.props.scrollingResetTimeInterval)}),Lt=Ho(nm,e)}function Tu(e){e.currentTarget===window&&Ar==null&&document.body&&(Ar=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),im(),mt.forEach(function(r){r.props.scrollElement===e.currentTarget&&r.__handleWindowScrollEvent()})}function Ws(e,r){mt.some(function(n){return n.props.scrollElement===r})||r.addEventListener("scroll",Tu),mt.push(e)}function Hs(e,r){mt=mt.filter(function(n){return n!==e}),mt.length||(r.removeEventListener("scroll",Tu),Lt&&(sr(Lt),Ru()))}var Yo=function(r){return r===window},Pr=function(r){return r.getBoundingClientRect()};function Us(e,r){if(e)if(Yo(e)){var n=window,t=n.innerHeight,i=n.innerWidth;return{height:typeof t=="number"?t:0,width:typeof i=="number"?i:0}}else return Pr(e);else return{height:r.serverHeight,width:r.serverWidth}}function om(e,r){if(Yo(r)&&document.documentElement){var n=document.documentElement,t=Pr(e),i=Pr(n);return{top:t.top-i.top,left:t.left-i.left}}else{var o=_u(r),a=Pr(e),s=Pr(r);return{top:a.top+o.top-s.top,left:a.left+o.left-s.left}}}function _u(e){return Yo(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}var qs,Vs;function Ks(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function am(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ks(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ks(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var sm=150,Du=function(){return typeof window<"u"?window:void 0},lm=(Vs=qs=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"_window",Du()),A(F(t),"_isMounted",!1),A(F(t),"_positionFromTop",0),A(F(t),"_positionFromLeft",0),A(F(t),"_detectElementResize",void 0),A(F(t),"_child",void 0),A(F(t),"state",am({},Us(t.props.scrollElement,t.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),A(F(t),"_registerChild",function(s){s&&!(s instanceof Element)&&console.warn("WindowScroller registerChild expects to be passed Element or null"),t._child=s,t.updatePosition()}),A(F(t),"_onChildScroll",function(s){var l=s.scrollTop;if(t.state.scrollTop!==l){var c=t.props.scrollElement;c&&(typeof c.scrollTo=="function"?c.scrollTo(0,l+t._positionFromTop):c.scrollTop=l+t._positionFromTop)}}),A(F(t),"_registerResizeListener",function(s){s===window?window.addEventListener("resize",t._onResize,!1):t._detectElementResize.addResizeListener(s,t._onResize)}),A(F(t),"_unregisterResizeListener",function(s){s===window?window.removeEventListener("resize",t._onResize,!1):s&&t._detectElementResize.removeResizeListener(s,t._onResize)}),A(F(t),"_onResize",function(){t.updatePosition()}),A(F(t),"__handleWindowScrollEvent",function(){if(t._isMounted){var s=t.props.onScroll,l=t.props.scrollElement;if(l){var c=_u(l),u=Math.max(0,c.left-t._positionFromLeft),d=Math.max(0,c.top-t._positionFromTop);t.setState({isScrolling:!0,scrollLeft:u,scrollTop:d}),s({scrollLeft:u,scrollTop:d})}}}),A(F(t),"__resetIsScrolling",function(){t.setState({isScrolling:!1})}),t}return we(r,[{key:"updatePosition",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollElement,i=this.props.onResize,o=this.state,a=o.height,s=o.width,l=this._child||Qr.findDOMNode(this);if(l instanceof Element&&t){var c=om(l,t);this._positionFromTop=c.top,this._positionFromLeft=c.left}var u=Us(t,this.props);(a!==u.height||s!==u.width)&&(this.setState({height:u.height,width:u.width}),i({height:u.height,width:u.width}))}},{key:"componentDidMount",value:function(){var t=this.props.scrollElement;this._detectElementResize=su(),this.updatePosition(t),t&&(Ws(this,t),this._registerResizeListener(t)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(t,i){var o=this.props.scrollElement,a=t.scrollElement;a!==o&&a!=null&&o!=null&&(this.updatePosition(o),Hs(this,a),Ws(this,o),this._unregisterResizeListener(a),this._registerResizeListener(o))}},{key:"componentWillUnmount",value:function(){var t=this.props.scrollElement;t&&(Hs(this,t),this._unregisterResizeListener(t)),this._isMounted=!1}},{key:"render",value:function(){var t=this.props.children,i=this.state,o=i.isScrolling,a=i.scrollTop,s=i.scrollLeft,l=i.height,c=i.width;return t({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:l,isScrolling:o,scrollLeft:s,scrollTop:a,width:c})}}]),r}(C.PureComponent),A(qs,"propTypes",null),Vs);A(lm,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:sm,scrollElement:Du(),serverHeight:0,serverWidth:0});function nr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nr=function(r){return typeof r}:nr=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},nr(e)}function rn(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ys(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function nn(e,r,n){return r&&Ys(e.prototype,r),n&&Ys(e,n),e}function cm(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function bt(){return bt=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},bt.apply(this,arguments)}function Js(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function ce(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Js(Object(n),!0).forEach(function(t){cm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Js(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oi(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&ao(e,r)}function it(e){return it=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},it(e)}function ao(e,r){return ao=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t},ao(e,r)}function um(e,r){if(e==null)return{};var n={},t=Object.keys(e),i,o;for(o=0;o<t.length;o++)i=t[o],!(r.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Jo(e,r){if(e==null)return{};var n=um(e,r),t,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)t=o[i],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function lt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ai(e,r){return r&&(typeof r=="object"||typeof r=="function")?r:lt(e)}function ve(e){return dm(e)||fm(e)||pm()}function dm(e){if(Array.isArray(e)){for(var r=0,n=new Array(e.length);r<e.length;r++)n[r]=e[r];return n}}function fm(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function pm(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Pu(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function ku(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Ou(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}Pu.__suppressDeprecationWarning=!0;ku.__suppressDeprecationWarning=!0;Ou.__suppressDeprecationWarning=!0;function hm(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
13
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nv(e,r){return kv(e)||Ov(e,r)||qc(e,r)||Ev()}function Mv(e,r,n,t){for(var i=n+1;r<=n;){var o=r+n>>>1,a=e[o];a>=t?(i=o,n=o-1):r=o+1}return i}function Av(e,r,n,t,i){for(var o=n+1;r<=n;){var a=r+n>>>1,s=e[a];i(s,t)>=0?(o=a,n=a-1):r=a+1}return o}function Lv(e,r,n,t,i){return typeof n=="function"?Av(e,t===void 0?0:t|0,i===void 0?e.length-1:i|0,r,n):Mv(e,n===void 0?0:n|0,t===void 0?e.length-1:t|0,r)}function zv(e,r,n,t){for(var i=n+1;r<=n;){var o=r+n>>>1,a=e[o];a>t?(i=o,n=o-1):r=o+1}return i}function jv(e,r,n,t,i){for(var o=n+1;r<=n;){var a=r+n>>>1,s=e[a];i(s,t)>0?(o=a,n=a-1):r=a+1}return o}function Fv(e,r,n,t,i){return typeof n=="function"?jv(e,t===void 0?0:t|0,i===void 0?e.length-1:i|0,r,n):zv(e,n===void 0?0:n|0,t===void 0?e.length-1:t|0,r)}function Bv(e,r,n,t){for(var i=r-1;r<=n;){var o=r+n>>>1,a=e[o];a<t?(i=o,r=o+1):n=o-1}return i}function $v(e,r,n,t,i){for(var o=r-1;r<=n;){var a=r+n>>>1,s=e[a];i(s,t)<0?(o=a,r=a+1):n=a-1}return o}function Gv(e,r,n,t,i){return typeof n=="function"?$v(e,t===void 0?0:t|0,i===void 0?e.length-1:i|0,r,n):Bv(e,n===void 0?0:n|0,t===void 0?e.length-1:t|0,r)}function Wv(e,r,n,t){for(var i=r-1;r<=n;){var o=r+n>>>1,a=e[o];a<=t?(i=o,r=o+1):n=o-1}return i}function Hv(e,r,n,t,i){for(var o=r-1;r<=n;){var a=r+n>>>1,s=e[a];i(s,t)<=0?(o=a,r=a+1):n=a-1}return o}function Uv(e,r,n,t,i){return typeof n=="function"?Hv(e,t===void 0?0:t|0,i===void 0?e.length-1:i|0,r,n):Wv(e,n===void 0?0:n|0,t===void 0?e.length-1:t|0,r)}function qv(e,r,n,t){for(;r<=n;){var i=r+n>>>1,o=e[i];if(o===t)return i;o<=t?r=i+1:n=i-1}return-1}function Vv(e,r,n,t,i){for(;r<=n;){var o=r+n>>>1,a=e[o],s=i(a,t);if(s===0)return o;s<=0?r=o+1:n=o-1}return-1}function Kv(e,r,n,t,i){return typeof n=="function"?Vv(e,t===void 0?0:t|0,i===void 0?e.length-1:i|0,r,n):qv(e,n===void 0?0:n|0,t===void 0?e.length-1:t|0,r)}const Bn={ge:Lv,gt:Fv,lt:Gv,le:Uv,eq:Kv};var er=0,Ot=1,Tn=2;function Uo(e,r,n,t,i){this.mid=e,this.left=r,this.right=n,this.leftPoints=t,this.rightPoints=i,this.count=(r?r.count:0)+(n?n.count:0)+t.length}var tn=Uo.prototype;function Ci(e,r){e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function pu(e,r){var n=Wr(r);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function Ms(e,r){var n=e.intervals([]);n.push(r),pu(e,n)}function As(e,r){var n=e.intervals([]),t=n.indexOf(r);return t<0?er:(n.splice(t,1),pu(e,n),Ot)}tn.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e};tn.insert=function(e){var r=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(r+1)?Ms(this,e):this.left.insert(e):this.left=Wr([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(r+1)?Ms(this,e):this.right.insert(e):this.right=Wr([e]);else{var n=Bn.ge(this.leftPoints,e,qo),t=Bn.ge(this.rightPoints,e,Vo);this.leftPoints.splice(n,0,e),this.rightPoints.splice(t,0,e)}};tn.remove=function(e){var r=this.count-this.leftPoints;if(e[1]<this.mid){if(!this.left)return er;var n=this.right?this.right.count:0;if(4*n>3*(r-1))return As(this,e);var t=this.left.remove(e);return t===Tn?(this.left=null,this.count-=1,Ot):(t===Ot&&(this.count-=1),t)}else if(e[0]>this.mid){if(!this.right)return er;var i=this.left?this.left.count:0;if(4*i>3*(r-1))return As(this,e);var t=this.right.remove(e);return t===Tn?(this.right=null,this.count-=1,Ot):(t===Ot&&(this.count-=1),t)}else{if(this.count===1)return this.leftPoints[0]===e?Tn:er;if(this.leftPoints.length===1&&this.leftPoints[0]===e){if(this.left&&this.right){for(var o=this,a=this.left;a.right;)o=a,a=a.right;if(o===this)a.right=this.right;else{var s=this.left,t=this.right;o.count-=a.count,o.right=a.left,a.left=s,a.right=t}Ci(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?Ci(this,this.left):Ci(this,this.right);return Ot}for(var s=Bn.ge(this.leftPoints,e,qo);s<this.leftPoints.length&&this.leftPoints[s][0]===e[0];++s)if(this.leftPoints[s]===e){this.count-=1,this.leftPoints.splice(s,1);for(var t=Bn.ge(this.rightPoints,e,Vo);t<this.rightPoints.length&&this.rightPoints[t][1]===e[1];++t)if(this.rightPoints[t]===e)return this.rightPoints.splice(t,1),Ot}return er}};function hu(e,r,n){for(var t=0;t<e.length&&e[t][0]<=r;++t){var i=n(e[t]);if(i)return i}}function gu(e,r,n){for(var t=e.length-1;t>=0&&e[t][1]>=r;--t){var i=n(e[t]);if(i)return i}}function vu(e,r){for(var n=0;n<e.length;++n){var t=r(e[n]);if(t)return t}}tn.queryPoint=function(e,r){if(e<this.mid){if(this.left){var n=this.left.queryPoint(e,r);if(n)return n}return hu(this.leftPoints,e,r)}else if(e>this.mid){if(this.right){var n=this.right.queryPoint(e,r);if(n)return n}return gu(this.rightPoints,e,r)}else return vu(this.leftPoints,r)};tn.queryInterval=function(e,r,n){if(e<this.mid&&this.left){var t=this.left.queryInterval(e,r,n);if(t)return t}if(r>this.mid&&this.right){var t=this.right.queryInterval(e,r,n);if(t)return t}return r<this.mid?hu(this.leftPoints,r,n):e>this.mid?gu(this.rightPoints,e,n):vu(this.leftPoints,n)};function Yv(e,r){return e-r}function qo(e,r){var n=e[0]-r[0];return n||e[1]-r[1]}function Vo(e,r){var n=e[1]-r[1];return n||e[0]-r[0]}function Wr(e){if(e.length===0)return null;for(var r=[],n=0;n<e.length;++n)r.push(e[n][0],e[n][1]);r.sort(Yv);for(var t=r[r.length>>1],i=[],o=[],a=[],n=0;n<e.length;++n){var s=e[n];s[1]<t?i.push(s):t<s[0]?o.push(s):a.push(s)}var l=a,c=a.slice();return l.sort(qo),c.sort(Vo),new Uo(t,Wr(i),Wr(o),l,c)}function mu(e){this.root=e}var fr=mu.prototype;fr.insert=function(e){this.root?this.root.insert(e):this.root=new Uo(e[0],null,null,[e],[e])};fr.remove=function(e){if(this.root){var r=this.root.remove(e);return r===Tn&&(this.root=null),r!==er}return!1};fr.queryPoint=function(e,r){if(this.root)return this.root.queryPoint(e,r)};fr.queryInterval=function(e,r,n){if(e<=r&&this.root)return this.root.queryInterval(e,r,n)};Object.defineProperty(fr,"count",{get:function(){return this.root?this.root.count:0}});Object.defineProperty(fr,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function Jv(e){return new mu(null)}var Ii=function(){function e(){Ie(this,e),A(this,"_columnSizeMap",{}),A(this,"_intervalTree",Jv()),A(this,"_leftMap",{})}return we(e,[{key:"estimateTotalHeight",value:function(n,t,i){var o=n-this.count;return this.tallestColumnSize+Math.ceil(o/t)*i}},{key:"range",value:function(n,t,i){var o=this;this._intervalTree.queryInterval(n,n+t,function(a){var s=Nv(a,3),l=s[0];s[1];var c=s[2];return i(c,o._leftMap[c],l)})}},{key:"setPosition",value:function(n,t,i,o){this._intervalTree.insert([i,i+o,n]),this._leftMap[n]=t;var a=this._columnSizeMap,s=a[t];s===void 0?a[t]=i+o:a[t]=Math.max(s,i+o)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var n=this._columnSizeMap,t=0;for(var i in n){var o=n[i];t=t===0?o:Math.min(t,o)}return t}},{key:"tallestColumnSize",get:function(){var n=this._columnSizeMap,t=0;for(var i in n){var o=n[i];t=Math.max(t,o)}return t}}]),e}(),Ls,zs;function js(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function Xv(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?js(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):js(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Qv={},Zv=150,bu=(zs=Ls=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"state",{isScrolling:!1,scrollTop:0}),A(F(t),"_debounceResetIsScrollingId",void 0),A(F(t),"_invalidateOnUpdateStartIndex",null),A(F(t),"_invalidateOnUpdateStopIndex",null),A(F(t),"_positionCache",new Ii),A(F(t),"_startIndex",null),A(F(t),"_startIndexMemoized",null),A(F(t),"_stopIndex",null),A(F(t),"_stopIndexMemoized",null),A(F(t),"_debounceResetIsScrollingCallback",function(){t.setState({isScrolling:!1})}),A(F(t),"_setScrollingContainerRef",function(s){t._scrollingContainer=s}),A(F(t),"_onScroll",function(s){var l=t.props.height,c=s.currentTarget.scrollTop,u=Math.min(Math.max(0,t._getEstimatedTotalHeight()-l),c);c===u&&(t._debounceResetIsScrolling(),t.state.scrollTop!==u&&t.setState({isScrolling:!0,scrollTop:u}))}),t}return we(r,[{key:"clearCellPositions",value:function(){this._positionCache=new Ii,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(t){var i=t.rowIndex;this._invalidateOnUpdateStartIndex===null?(this._invalidateOnUpdateStartIndex=i,this._invalidateOnUpdateStopIndex=i):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,i),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,i))}},{key:"recomputeCellPositions",value:function(){var t=this._positionCache.count-1;this._positionCache=new Ii,this._populatePositionCache(0,t),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(t,i){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==t.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&sr(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var t=this,i=this.props,o=i.autoHeight,a=i.cellCount,s=i.cellMeasurerCache,l=i.cellRenderer,c=i.className,u=i.height,d=i.id,f=i.keyMapper,p=i.overscanByPixels,h=i.role,v=i.style,m=i.tabIndex,y=i.width,b=i.rowDirection,I=this.state,_=I.isScrolling,P=I.scrollTop,w=[],D=this._getEstimatedTotalHeight(),S=this._positionCache.shortestColumnSize,T=this._positionCache.count,R=0,O;if(this._positionCache.range(Math.max(0,P-p),u+p*2,function(H,E,B){var $;typeof O>"u"?(R=H,O=H):(R=Math.min(R,H),O=Math.max(O,H)),w.push(l({index:H,isScrolling:_,key:f(H),parent:t,style:($={height:s.getHeight(H)},A($,b==="ltr"?"left":"right",E),A($,"position","absolute"),A($,"top",B),A($,"width",s.getWidth(H)),$)}))}),S<P+u+p&&T<a)for(var L=Math.min(a-T,Math.ceil((P+u+p-S)/s.defaultHeight*y/s.defaultWidth)),M=T;M<T+L;M++)O=M,w.push(l({index:M,isScrolling:_,key:f(M),parent:this,style:{width:s.getWidth(M)}}));return this._startIndex=R,this._stopIndex=O,C.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:tt("ReactVirtualized__Masonry",c),id:d,onScroll:this._onScroll,role:h,style:Xv({boxSizing:"border-box",direction:"ltr",height:o?"auto":u,overflowX:"hidden",overflowY:D<u?"hidden":"auto",position:"relative",width:y,WebkitOverflowScrolling:"touch",willChange:"transform"},v),tabIndex:m},C.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:D,maxWidth:"100%",maxHeight:D,overflow:"hidden",pointerEvents:_?"none":"",position:"relative"}},w))}},{key:"_checkInvalidateOnUpdate",value:function(){if(typeof this._invalidateOnUpdateStartIndex=="number"){var t=this._invalidateOnUpdateStartIndex,i=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(t,i),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var t=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&sr(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=Ho(this._debounceResetIsScrollingCallback,t)}},{key:"_getEstimatedTotalHeight",value:function(){var t=this.props,i=t.cellCount,o=t.cellMeasurerCache,a=t.width,s=Math.max(1,Math.floor(a/o.defaultWidth));return this._positionCache.estimateTotalHeight(i,s,o.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var t=this.props,i=t.height,o=t.onScroll,a=this.state.scrollTop;this._onScrollMemoized!==a&&(o({clientHeight:i,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:a}),this._onScrollMemoized=a)}},{key:"_invokeOnCellsRenderedCallback",value:function(){if(this._startIndexMemoized!==this._startIndex||this._stopIndexMemoized!==this._stopIndex){var t=this.props.onCellsRendered;t({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex}}},{key:"_populatePositionCache",value:function(t,i){for(var o=this.props,a=o.cellMeasurerCache,s=o.cellPositioner,l=t;l<=i;l++){var c=s(l),u=c.left,d=c.top;this._positionCache.setPosition(l,u,d,a.getHeight(l))}}}],[{key:"getDerivedStateFromProps",value:function(t,i){return t.scrollTop!==void 0&&i.scrollTop!==t.scrollTop?{isScrolling:!0,scrollTop:t.scrollTop}:null}}]),r}(C.PureComponent),A(Ls,"propTypes",null),zs);A(bu,"defaultProps",{autoHeight:!1,keyMapper:em,onCellsRendered:Fs,onScroll:Fs,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:Zv,style:Qv,tabIndex:0,rowDirection:"ltr"});function em(e){return e}function Fs(){}en(bu);var Ri=function(){function e(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ie(this,e),A(this,"_cellMeasurerCache",void 0),A(this,"_columnIndexOffset",void 0),A(this,"_rowIndexOffset",void 0),A(this,"columnWidth",function(l){var c=l.index;r._cellMeasurerCache.columnWidth({index:c+r._columnIndexOffset})}),A(this,"rowHeight",function(l){var c=l.index;r._cellMeasurerCache.rowHeight({index:c+r._rowIndexOffset})});var t=n.cellMeasurerCache,i=n.columnIndexOffset,o=i===void 0?0:i,a=n.rowIndexOffset,s=a===void 0?0:a;this._cellMeasurerCache=t,this._columnIndexOffset=o,this._rowIndexOffset=s}return we(e,[{key:"clear",value:function(n,t){this._cellMeasurerCache.clear(n+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getHeight(n+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getWidth(n+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.has(n+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(n,t,i,o){this._cellMeasurerCache.set(n+this._rowIndexOffset,t+this._columnIndexOffset,i,o)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function Bs(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function Ne(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Bs(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bs(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var $s=20,Ko=function(e){Ue(r,e);function r(n,t){var i;Ie(this,r),i=qe(this,Ve(r).call(this,n,t)),A(F(i),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),A(F(i),"_deferredInvalidateColumnIndex",null),A(F(i),"_deferredInvalidateRowIndex",null),A(F(i),"_bottomLeftGridRef",function(l){i._bottomLeftGrid=l}),A(F(i),"_bottomRightGridRef",function(l){i._bottomRightGrid=l}),A(F(i),"_cellRendererBottomLeftGrid",function(l){var c=l.rowIndex,u=Zt(l,["rowIndex"]),d=i.props,f=d.cellRenderer,p=d.fixedRowCount,h=d.rowCount;return c===h-p?C.createElement("div",{key:u.key,style:Ne({},u.style,{height:$s})}):f(Ne({},u,{parent:F(i),rowIndex:c+p}))}),A(F(i),"_cellRendererBottomRightGrid",function(l){var c=l.columnIndex,u=l.rowIndex,d=Zt(l,["columnIndex","rowIndex"]),f=i.props,p=f.cellRenderer,h=f.fixedColumnCount,v=f.fixedRowCount;return p(Ne({},d,{columnIndex:c+h,parent:F(i),rowIndex:u+v}))}),A(F(i),"_cellRendererTopRightGrid",function(l){var c=l.columnIndex,u=Zt(l,["columnIndex"]),d=i.props,f=d.cellRenderer,p=d.columnCount,h=d.fixedColumnCount;return c===p-h?C.createElement("div",{key:u.key,style:Ne({},u.style,{width:$s})}):f(Ne({},u,{columnIndex:c+h,parent:F(i)}))}),A(F(i),"_columnWidthRightGrid",function(l){var c=l.index,u=i.props,d=u.columnCount,f=u.fixedColumnCount,p=u.columnWidth,h=i.state,v=h.scrollbarSize,m=h.showHorizontalScrollbar;return m&&c===d-f?v:typeof p=="function"?p({index:c+f}):p}),A(F(i),"_onScroll",function(l){var c=l.scrollLeft,u=l.scrollTop;i.setState({scrollLeft:c,scrollTop:u});var d=i.props.onScroll;d&&d(l)}),A(F(i),"_onScrollbarPresenceChange",function(l){var c=l.horizontal,u=l.size,d=l.vertical,f=i.state,p=f.showHorizontalScrollbar,h=f.showVerticalScrollbar;if(c!==p||d!==h){i.setState({scrollbarSize:u,showHorizontalScrollbar:c,showVerticalScrollbar:d});var v=i.props.onScrollbarPresenceChange;typeof v=="function"&&v({horizontal:c,size:u,vertical:d})}}),A(F(i),"_onScrollLeft",function(l){var c=l.scrollLeft;i._onScroll({scrollLeft:c,scrollTop:i.state.scrollTop})}),A(F(i),"_onScrollTop",function(l){var c=l.scrollTop;i._onScroll({scrollTop:c,scrollLeft:i.state.scrollLeft})}),A(F(i),"_rowHeightBottomGrid",function(l){var c=l.index,u=i.props,d=u.fixedRowCount,f=u.rowCount,p=u.rowHeight,h=i.state,v=h.scrollbarSize,m=h.showVerticalScrollbar;return m&&c===f-d?v:typeof p=="function"?p({index:c+d}):p}),A(F(i),"_topLeftGridRef",function(l){i._topLeftGrid=l}),A(F(i),"_topRightGridRef",function(l){i._topRightGrid=l});var o=n.deferredMeasurementCache,a=n.fixedColumnCount,s=n.fixedRowCount;return i._maybeCalculateCachedStyles(!0),o&&(i._deferredMeasurementCacheBottomLeftGrid=s>0?new Ri({cellMeasurerCache:o,columnIndexOffset:0,rowIndexOffset:s}):o,i._deferredMeasurementCacheBottomRightGrid=a>0||s>0?new Ri({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:s}):o,i._deferredMeasurementCacheTopRightGrid=a>0?new Ri({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:0}):o),i}return we(r,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.columnIndex,o=i===void 0?0:i,a=t.rowIndex,s=a===void 0?0:a;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,o):o,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,s):s}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.columnIndex,o=i===void 0?0:i,a=t.rowIndex,s=a===void 0?0:a,l=this.props,c=l.fixedColumnCount,u=l.fixedRowCount,d=Math.max(0,o-c),f=Math.max(0,s-u);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:f}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:d,rowIndex:f}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:s}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:d,rowIndex:s}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var t=this.props,i=t.scrollLeft,o=t.scrollTop;if(i>0||o>0){var a={};i>0&&(a.scrollLeft=i),o>0&&(a.scrollTop=o),this.setState(a)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var t=this.props,i=t.onScroll,o=t.onSectionRendered;t.onScrollbarPresenceChange,t.scrollLeft;var a=t.scrollToColumn;t.scrollTop;var s=t.scrollToRow,l=Zt(t,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),this.props.width===0||this.props.height===0)return null;var c=this.state,u=c.scrollLeft,d=c.scrollTop;return C.createElement("div",{style:this._containerOuterStyle},C.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(l),this._renderTopRightGrid(Ne({},l,{onScroll:i,scrollLeft:u}))),C.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(Ne({},l,{onScroll:i,scrollTop:d})),this._renderBottomRightGrid(Ne({},l,{onScroll:i,onSectionRendered:o,scrollLeft:u,scrollToColumn:a,scrollToRow:s,scrollTop:d}))))}},{key:"_getBottomGridHeight",value:function(t){var i=t.height,o=this._getTopGridHeight(t);return i-o}},{key:"_getLeftGridWidth",value:function(t){var i=t.fixedColumnCount,o=t.columnWidth;if(this._leftGridWidth==null)if(typeof o=="function"){for(var a=0,s=0;s<i;s++)a+=o({index:s});this._leftGridWidth=a}else this._leftGridWidth=o*i;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(t){var i=t.width,o=this._getLeftGridWidth(t);return i-o}},{key:"_getTopGridHeight",value:function(t){var i=t.fixedRowCount,o=t.rowHeight;if(this._topGridHeight==null)if(typeof o=="function"){for(var a=0,s=0;s<i;s++)a+=o({index:s});this._topGridHeight=a}else this._topGridHeight=o*i;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"){var t=this._deferredInvalidateColumnIndex,i=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:t,rowIndex:i}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(t){var i=this.props,o=i.columnWidth,a=i.enableFixedColumnScroll,s=i.enableFixedRowScroll,l=i.height,c=i.fixedColumnCount,u=i.fixedRowCount,d=i.rowHeight,f=i.style,p=i.styleBottomLeftGrid,h=i.styleBottomRightGrid,v=i.styleTopLeftGrid,m=i.styleTopRightGrid,y=i.width,b=t||l!==this._lastRenderedHeight||y!==this._lastRenderedWidth,I=t||o!==this._lastRenderedColumnWidth||c!==this._lastRenderedFixedColumnCount,_=t||u!==this._lastRenderedFixedRowCount||d!==this._lastRenderedRowHeight;(t||b||f!==this._lastRenderedStyle)&&(this._containerOuterStyle=Ne({height:l,overflow:"visible",width:y},f)),(t||b||_)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:y},this._containerBottomStyle={height:l-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:y}),(t||p!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=Ne({left:0,overflowX:"hidden",overflowY:a?"auto":"hidden",position:"absolute"},p)),(t||I||h!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=Ne({left:this._getLeftGridWidth(this.props),position:"absolute"},h)),(t||v!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=Ne({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},v)),(t||I||m!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=Ne({left:this._getLeftGridWidth(this.props),overflowX:s?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},m)),this._lastRenderedColumnWidth=o,this._lastRenderedFixedColumnCount=c,this._lastRenderedFixedRowCount=u,this._lastRenderedHeight=l,this._lastRenderedRowHeight=d,this._lastRenderedStyle=f,this._lastRenderedStyleBottomLeftGrid=p,this._lastRenderedStyleBottomRightGrid=h,this._lastRenderedStyleTopLeftGrid=v,this._lastRenderedStyleTopRightGrid=m,this._lastRenderedWidth=y}},{key:"_prepareForRender",value:function(){(this._lastRenderedColumnWidth!==this.props.columnWidth||this._lastRenderedFixedColumnCount!==this.props.fixedColumnCount)&&(this._leftGridWidth=null),(this._lastRenderedFixedRowCount!==this.props.fixedRowCount||this._lastRenderedRowHeight!==this.props.rowHeight)&&(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(t){var i=t.enableFixedColumnScroll,o=t.fixedColumnCount,a=t.fixedRowCount,s=t.rowCount,l=t.hideBottomLeftGridScrollbar,c=this.state.showVerticalScrollbar;if(!o)return null;var u=c?1:0,d=this._getBottomGridHeight(t),f=this._getLeftGridWidth(t),p=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,h=l?f+p:f,v=C.createElement(gt,K({},t,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:o,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:d,onScroll:i?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,s-a)+u,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:h}));return l?C.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:Ne({},this._bottomLeftGridStyle,{height:d,width:f,overflowY:"hidden"})},v):v}},{key:"_renderBottomRightGrid",value:function(t){var i=t.columnCount,o=t.fixedColumnCount,a=t.fixedRowCount,s=t.rowCount,l=t.scrollToColumn,c=t.scrollToRow;return C.createElement(gt,K({},t,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,i-o),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(t),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,s-a),rowHeight:this._rowHeightBottomGrid,scrollToColumn:l-o,scrollToRow:c-a,style:this._bottomRightGridStyle,width:this._getRightGridWidth(t)}))}},{key:"_renderTopLeftGrid",value:function(t){var i=t.fixedColumnCount,o=t.fixedRowCount;return!i||!o?null:C.createElement(gt,K({},t,{className:this.props.classNameTopLeftGrid,columnCount:i,height:this._getTopGridHeight(t),ref:this._topLeftGridRef,rowCount:o,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(t)}))}},{key:"_renderTopRightGrid",value:function(t){var i=t.columnCount,o=t.enableFixedRowScroll,a=t.fixedColumnCount,s=t.fixedRowCount,l=t.scrollLeft,c=t.hideTopRightGridScrollbar,u=this.state,d=u.showHorizontalScrollbar,f=u.scrollbarSize;if(!s)return null;var p=d?1:0,h=this._getTopGridHeight(t),v=this._getRightGridWidth(t),m=d?f:0,y=h,b=this._topRightGridStyle;c&&(y=h+m,b=Ne({},this._topRightGridStyle,{left:0}));var I=C.createElement(gt,K({},t,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,i-a)+p,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:y,onScroll:o?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:s,scrollLeft:l,style:b,tabIndex:null,width:v}));return c?C.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:Ne({},this._topRightGridStyle,{height:h,width:v,overflowX:"hidden"})},I):I}}],[{key:"getDerivedStateFromProps",value:function(t,i){return t.scrollLeft!==i.scrollLeft||t.scrollTop!==i.scrollTop?{scrollLeft:t.scrollLeft!=null&&t.scrollLeft>=0?t.scrollLeft:i.scrollLeft,scrollTop:t.scrollTop!=null&&t.scrollTop>=0?t.scrollTop:i.scrollTop}:null}}]),r}(C.PureComponent);A(Ko,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1});Ko.propTypes={};en(Ko);function tm(e){var r=e.dataKey,n=e.rowData;return typeof n.get=="function"?n.get(r):n[r]}function rm(e){var r=e.cellData;return r==null?"":String(r)}function yu(e){var r=e.className,n=e.columns,t=e.style;return C.createElement("div",{className:r,role:"row",style:t},n)}yu.propTypes=null;var vt={ASC:"ASC",DESC:"DESC"};function xu(e){var r=e.sortDirection,n=tt("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":r===vt.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":r===vt.DESC});return C.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},r===vt.ASC?C.createElement("path",{d:"M7 14l5-5 5 5z"}):C.createElement("path",{d:"M7 10l5 5 5-5z"}),C.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}xu.propTypes={};function Su(e){var r=e.dataKey,n=e.label,t=e.sortBy,i=e.sortDirection,o=t===r,a=[C.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:typeof n=="string"?n:null},n)];return o&&a.push(C.createElement(xu,{key:"SortIndicator",sortDirection:i})),a}Su.propTypes=null;function wu(e){var r=e.className,n=e.columns,t=e.index,i=e.key,o=e.onRowClick,a=e.onRowDoubleClick,s=e.onRowMouseOut,l=e.onRowMouseOver,c=e.onRowRightClick,u=e.rowData,d=e.style,f={"aria-rowindex":t+1};return(o||a||s||l||c)&&(f["aria-label"]="row",f.tabIndex=0,o&&(f.onClick=function(p){return o({event:p,index:t,rowData:u})}),a&&(f.onDoubleClick=function(p){return a({event:p,index:t,rowData:u})}),s&&(f.onMouseOut=function(p){return s({event:p,index:t,rowData:u})}),l&&(f.onMouseOver=function(p){return l({event:p,index:t,rowData:u})}),c&&(f.onContextMenu=function(p){return c({event:p,index:t,rowData:u})})),C.createElement("div",K({},f,{className:r,key:i,role:"row",style:d}),n)}wu.propTypes=null;var Cu=function(e){Ue(r,e);function r(){return Ie(this,r),qe(this,Ve(r).apply(this,arguments))}return r}(C.Component);A(Cu,"defaultProps",{cellDataGetter:tm,cellRenderer:rm,defaultSortDirection:vt.ASC,flexGrow:0,flexShrink:1,headerRenderer:Su,style:{}});Cu.propTypes={};function Gs(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function qt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Gs(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gs(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Iu=function(e){Ue(r,e);function r(n){var t;return Ie(this,r),t=qe(this,Ve(r).call(this,n)),t.state={scrollbarWidth:0},t._createColumn=t._createColumn.bind(F(t)),t._createRow=t._createRow.bind(F(t)),t._onScroll=t._onScroll.bind(F(t)),t._onSectionRendered=t._onSectionRendered.bind(F(t)),t._setRef=t._setRef.bind(F(t)),t}return we(r,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(t){var i=t.alignment,o=t.index;if(this.Grid){var a=this.Grid.getOffsetForCell({alignment:i,rowIndex:o}),s=a.scrollTop;return s}return 0}},{key:"invalidateCellSizeAfterRender",value:function(t){var i=t.columnIndex,o=t.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:i})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.columnIndex,o=i===void 0?0:i,a=t.rowIndex,s=a===void 0?0:a;this.Grid&&this.Grid.recomputeGridSize({rowIndex:s,columnIndex:o})}},{key:"recomputeRowHeights",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:t})}},{key:"scrollToPosition",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:t})}},{key:"scrollToRow",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:t})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var t=Qr.findDOMNode(this.Grid),i=t.clientWidth||0,o=t.offsetWidth||0;return o-i}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var t=this,i=this.props,o=i.children,a=i.className,s=i.disableHeader,l=i.gridClassName,c=i.gridStyle,u=i.headerHeight,d=i.headerRowRenderer,f=i.height,p=i.id,h=i.noRowsRenderer,v=i.rowClassName,m=i.rowStyle,y=i.scrollToIndex,b=i.style,I=i.width,_=this.state.scrollbarWidth,P=s?f:f-u,w=typeof v=="function"?v({index:-1}):v,D=typeof m=="function"?m({index:-1}):m;return this._cachedColumnStyles=[],C.Children.toArray(o).forEach(function(S,T){var R=t._getFlexStyleForColumn(S,S.props.style);t._cachedColumnStyles[T]=qt({overflow:"hidden"},R)}),C.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":C.Children.toArray(o).length,"aria-rowcount":this.props.rowCount,className:tt("ReactVirtualized__Table",a),id:p,role:"grid",style:b},!s&&d({className:tt("ReactVirtualized__Table__headerRow",w),columns:this._getHeaderColumns(),style:qt({height:u,overflow:"hidden",paddingRight:_,width:I},D)}),C.createElement(gt,K({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:tt("ReactVirtualized__Table__Grid",l),cellRenderer:this._createRow,columnWidth:I,columnCount:1,height:P,id:void 0,noContentRenderer:h,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:_,scrollToRow:y,style:qt({},c,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(t){var i=t.column,o=t.columnIndex,a=t.isScrolling,s=t.parent,l=t.rowData,c=t.rowIndex,u=this.props.onColumnClick,d=i.props,f=d.cellDataGetter,p=d.cellRenderer,h=d.className,v=d.columnData,m=d.dataKey,y=d.id,b=f({columnData:v,dataKey:m,rowData:l}),I=p({cellData:b,columnData:v,columnIndex:o,dataKey:m,isScrolling:a,parent:s,rowData:l,rowIndex:c}),_=function(S){u&&u({columnData:v,dataKey:m,event:S})},P=this._cachedColumnStyles[o],w=typeof I=="string"?I:null;return C.createElement("div",{"aria-colindex":o+1,"aria-describedby":y,className:tt("ReactVirtualized__Table__rowColumn",h),key:"Row"+c+"-Col"+o,onClick:_,role:"gridcell",style:P,title:w},I)}},{key:"_createHeader",value:function(t){var i=t.column,o=t.index,a=this.props,s=a.headerClassName,l=a.headerStyle,c=a.onHeaderClick,u=a.sort,d=a.sortBy,f=a.sortDirection,p=i.props,h=p.columnData,v=p.dataKey,m=p.defaultSortDirection,y=p.disableSort,b=p.headerRenderer,I=p.id,_=p.label,P=!y&&u,w=tt("ReactVirtualized__Table__headerColumn",s,i.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:P}),D=this._getFlexStyleForColumn(i,qt({},l,{},i.props.headerStyle)),S=b({columnData:h,dataKey:v,disableSort:y,label:_,sortBy:d,sortDirection:f}),T,R,O,L,M;if(P||c){var H=d!==v,E=H?m:f===vt.DESC?vt.ASC:vt.DESC,B=function(J){P&&u({defaultSortDirection:m,event:J,sortBy:v,sortDirection:E}),c&&c({columnData:h,dataKey:v,event:J})},$=function(J){(J.key==="Enter"||J.key===" ")&&B(J)};M=i.props["aria-label"]||_||v,L="none",O=0,T=B,R=$}return d===v&&(L=f===vt.ASC?"ascending":"descending"),C.createElement("div",{"aria-label":M,"aria-sort":L,className:w,id:I,key:"Header-Col"+o,onClick:T,onKeyDown:R,role:"columnheader",style:D,tabIndex:O},S)}},{key:"_createRow",value:function(t){var i=this,o=t.rowIndex,a=t.isScrolling,s=t.key,l=t.parent,c=t.style,u=this.props,d=u.children,f=u.onRowClick,p=u.onRowDoubleClick,h=u.onRowRightClick,v=u.onRowMouseOver,m=u.onRowMouseOut,y=u.rowClassName,b=u.rowGetter,I=u.rowRenderer,_=u.rowStyle,P=this.state.scrollbarWidth,w=typeof y=="function"?y({index:o}):y,D=typeof _=="function"?_({index:o}):_,S=b({index:o}),T=C.Children.toArray(d).map(function(L,M){return i._createColumn({column:L,columnIndex:M,isScrolling:a,parent:l,rowData:S,rowIndex:o,scrollbarWidth:P})}),R=tt("ReactVirtualized__Table__row",w),O=qt({},c,{height:this._getRowHeight(o),overflow:"hidden",paddingRight:P},D);return I({className:R,columns:T,index:o,isScrolling:a,key:s,onRowClick:f,onRowDoubleClick:p,onRowRightClick:h,onRowMouseOver:v,onRowMouseOut:m,rowData:S,style:O})}},{key:"_getFlexStyleForColumn",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o="".concat(t.props.flexGrow," ").concat(t.props.flexShrink," ").concat(t.props.width,"px"),a=qt({},i,{flex:o,msFlex:o,WebkitFlex:o});return t.props.maxWidth&&(a.maxWidth=t.props.maxWidth),t.props.minWidth&&(a.minWidth=t.props.minWidth),a}},{key:"_getHeaderColumns",value:function(){var t=this,i=this.props,o=i.children,a=i.disableHeader,s=a?[]:C.Children.toArray(o);return s.map(function(l,c){return t._createHeader({column:l,index:c})})}},{key:"_getRowHeight",value:function(t){var i=this.props.rowHeight;return typeof i=="function"?i({index:t}):i}},{key:"_onScroll",value:function(t){var i=t.clientHeight,o=t.scrollHeight,a=t.scrollTop,s=this.props.onScroll;s({clientHeight:i,scrollHeight:o,scrollTop:a})}},{key:"_onSectionRendered",value:function(t){var i=t.rowOverscanStartIndex,o=t.rowOverscanStopIndex,a=t.rowStartIndex,s=t.rowStopIndex,l=this.props.onRowsRendered;l({overscanStartIndex:i,overscanStopIndex:o,startIndex:a,stopIndex:s})}},{key:"_setRef",value:function(t){this.Grid=t}},{key:"_setScrollbarWidth",value:function(){var t=this.getScrollbarWidth();this.setState({scrollbarWidth:t})}}]),r}(C.PureComponent);A(Iu,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:ou,overscanRowCount:10,rowRenderer:wu,headerRowRenderer:yu,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}});Iu.propTypes={};var mt=[],Ar=null,Lt=null;function Ru(){Lt&&(Lt=null,document.body&&Ar!=null&&(document.body.style.pointerEvents=Ar),Ar=null)}function nm(){Ru(),mt.forEach(function(e){return e.__resetIsScrolling()})}function im(){Lt&&sr(Lt);var e=0;mt.forEach(function(r){e=Math.max(e,r.props.scrollingResetTimeInterval)}),Lt=Ho(nm,e)}function Tu(e){e.currentTarget===window&&Ar==null&&document.body&&(Ar=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),im(),mt.forEach(function(r){r.props.scrollElement===e.currentTarget&&r.__handleWindowScrollEvent()})}function Ws(e,r){mt.some(function(n){return n.props.scrollElement===r})||r.addEventListener("scroll",Tu),mt.push(e)}function Hs(e,r){mt=mt.filter(function(n){return n!==e}),mt.length||(r.removeEventListener("scroll",Tu),Lt&&(sr(Lt),Ru()))}var Yo=function(r){return r===window},Dr=function(r){return r.getBoundingClientRect()};function Us(e,r){if(e)if(Yo(e)){var n=window,t=n.innerHeight,i=n.innerWidth;return{height:typeof t=="number"?t:0,width:typeof i=="number"?i:0}}else return Dr(e);else return{height:r.serverHeight,width:r.serverWidth}}function om(e,r){if(Yo(r)&&document.documentElement){var n=document.documentElement,t=Dr(e),i=Dr(n);return{top:t.top-i.top,left:t.left-i.left}}else{var o=_u(r),a=Dr(e),s=Dr(r);return{top:a.top+o.top-s.top,left:a.left+o.left-s.left}}}function _u(e){return Yo(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}var qs,Vs;function Ks(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function am(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Ks(n,!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ks(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var sm=150,Du=function(){return typeof window<"u"?window:void 0},lm=(Vs=qs=function(e){Ue(r,e);function r(){var n,t;Ie(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=qe(this,(n=Ve(r)).call.apply(n,[this].concat(o))),A(F(t),"_window",Du()),A(F(t),"_isMounted",!1),A(F(t),"_positionFromTop",0),A(F(t),"_positionFromLeft",0),A(F(t),"_detectElementResize",void 0),A(F(t),"_child",void 0),A(F(t),"state",am({},Us(t.props.scrollElement,t.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),A(F(t),"_registerChild",function(s){s&&!(s instanceof Element)&&console.warn("WindowScroller registerChild expects to be passed Element or null"),t._child=s,t.updatePosition()}),A(F(t),"_onChildScroll",function(s){var l=s.scrollTop;if(t.state.scrollTop!==l){var c=t.props.scrollElement;c&&(typeof c.scrollTo=="function"?c.scrollTo(0,l+t._positionFromTop):c.scrollTop=l+t._positionFromTop)}}),A(F(t),"_registerResizeListener",function(s){s===window?window.addEventListener("resize",t._onResize,!1):t._detectElementResize.addResizeListener(s,t._onResize)}),A(F(t),"_unregisterResizeListener",function(s){s===window?window.removeEventListener("resize",t._onResize,!1):s&&t._detectElementResize.removeResizeListener(s,t._onResize)}),A(F(t),"_onResize",function(){t.updatePosition()}),A(F(t),"__handleWindowScrollEvent",function(){if(t._isMounted){var s=t.props.onScroll,l=t.props.scrollElement;if(l){var c=_u(l),u=Math.max(0,c.left-t._positionFromLeft),d=Math.max(0,c.top-t._positionFromTop);t.setState({isScrolling:!0,scrollLeft:u,scrollTop:d}),s({scrollLeft:u,scrollTop:d})}}}),A(F(t),"__resetIsScrolling",function(){t.setState({isScrolling:!1})}),t}return we(r,[{key:"updatePosition",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollElement,i=this.props.onResize,o=this.state,a=o.height,s=o.width,l=this._child||Qr.findDOMNode(this);if(l instanceof Element&&t){var c=om(l,t);this._positionFromTop=c.top,this._positionFromLeft=c.left}var u=Us(t,this.props);(a!==u.height||s!==u.width)&&(this.setState({height:u.height,width:u.width}),i({height:u.height,width:u.width}))}},{key:"componentDidMount",value:function(){var t=this.props.scrollElement;this._detectElementResize=su(),this.updatePosition(t),t&&(Ws(this,t),this._registerResizeListener(t)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(t,i){var o=this.props.scrollElement,a=t.scrollElement;a!==o&&a!=null&&o!=null&&(this.updatePosition(o),Hs(this,a),Ws(this,o),this._unregisterResizeListener(a),this._registerResizeListener(o))}},{key:"componentWillUnmount",value:function(){var t=this.props.scrollElement;t&&(Hs(this,t),this._unregisterResizeListener(t)),this._isMounted=!1}},{key:"render",value:function(){var t=this.props.children,i=this.state,o=i.isScrolling,a=i.scrollTop,s=i.scrollLeft,l=i.height,c=i.width;return t({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:l,isScrolling:o,scrollLeft:s,scrollTop:a,width:c})}}]),r}(C.PureComponent),A(qs,"propTypes",null),Vs);A(lm,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:sm,scrollElement:Du(),serverHeight:0,serverWidth:0});function nr(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nr=function(r){return typeof r}:nr=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},nr(e)}function rn(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ys(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function nn(e,r,n){return r&&Ys(e.prototype,r),n&&Ys(e,n),e}function cm(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function bt(){return bt=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},bt.apply(this,arguments)}function Js(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function ce(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Js(Object(n),!0).forEach(function(t){cm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Js(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oi(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&ao(e,r)}function it(e){return it=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},it(e)}function ao(e,r){return ao=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t},ao(e,r)}function um(e,r){if(e==null)return{};var n={},t=Object.keys(e),i,o;for(o=0;o<t.length;o++)i=t[o],!(r.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Jo(e,r){if(e==null)return{};var n=um(e,r),t,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)t=o[i],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function lt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ai(e,r){return r&&(typeof r=="object"||typeof r=="function")?r:lt(e)}function ve(e){return dm(e)||fm(e)||pm()}function dm(e){if(Array.isArray(e)){for(var r=0,n=new Array(e.length);r<e.length;r++)n[r]=e[r];return n}}function fm(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function pm(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Pu(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function ku(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Ou(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}Pu.__suppressDeprecationWarning=!0;ku.__suppressDeprecationWarning=!0;Ou.__suppressDeprecationWarning=!0;function hm(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
14
14
 
15
15
  `+o+" uses "+a+" but also contains the following legacy lifecycles:"+(n!==null?`
16
16
  `+n:"")+(t!==null?`
@@ -18,8 +18,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
18
18
  `+i:"")+`
19
19
 
20
20
  The above lifecycles should be removed. Learn more about this warning here:
21
- https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(r.componentWillMount=Pu,r.componentWillReceiveProps=ku),typeof r.getSnapshotBeforeUpdate=="function"){if(typeof r.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");r.componentWillUpdate=Ou;var s=r.componentDidUpdate;r.componentDidUpdate=function(c,u,d){var f=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:d;s.call(this,c,u,f)}}return e}function Eu(e){var r=e.targetIndex,n=e.node,t=e.currentIndex,i=e.getNodeKey,o=e.path,a=o===void 0?[]:o,s=e.lowerSiblingCounts,l=s===void 0?[]:s,c=e.ignoreCollapsed,u=c===void 0?!0:c,d=e.isPseudoRoot,f=d===void 0?!1:d,p=f?[]:[].concat(ve(a),[i({node:n,treeIndex:t})]);if(t===r)return{node:n,lowerSiblingCounts:l,path:p};if(!n.children||u&&n.expanded!==!0)return{nextIndex:t+1};for(var h=t+1,v=n.children.length,m=0;m<v;m+=1){var b=Eu({ignoreCollapsed:u,getNodeKey:i,targetIndex:r,node:n.children[m],currentIndex:h,lowerSiblingCounts:[].concat(ve(l),[v-m-1]),path:p});if(b.node)return b;h=b.nextIndex}return{nextIndex:h}}function Xo(e){var r=e.node,n=e.ignoreCollapsed,t=n===void 0?!0:n;return Eu({getNodeKey:function(){},ignoreCollapsed:t,node:r,currentIndex:0,targetIndex:-1}).nextIndex-1}function Nu(e){var r=e.callback,n=e.getNodeKey,t=e.ignoreCollapsed,i=e.isPseudoRoot,o=i===void 0?!1:i,a=e.node,s=e.parentNode,l=s===void 0?null:s,c=e.currentIndex,u=e.path,d=u===void 0?[]:u,f=e.lowerSiblingCounts,p=f===void 0?[]:f,h=o?[]:[].concat(ve(d),[n({node:a,treeIndex:c})]),v=o?null:{node:a,parentNode:l,path:h,lowerSiblingCounts:p,treeIndex:c};if(!o){var m=r(v);if(m===!1)return!1}if(!a.children||a.expanded!==!0&&t&&!o)return c;var b=c,y=a.children.length;if(typeof a.children!="function"){for(var I=0;I<y;I+=1)if(b=Nu({callback:r,getNodeKey:n,ignoreCollapsed:t,node:a.children[I],parentNode:o?null:a,currentIndex:b+1,lowerSiblingCounts:[].concat(ve(p),[y-I-1]),path:h}),b===!1)return!1}return b}function Mu(e){var r=e.callback,n=e.getNodeKey,t=e.ignoreCollapsed,i=e.isPseudoRoot,o=i===void 0?!1:i,a=e.node,s=e.parentNode,l=s===void 0?null:s,c=e.currentIndex,u=e.path,d=u===void 0?[]:u,f=e.lowerSiblingCounts,p=f===void 0?[]:f,h=ce({},a),v=o?[]:[].concat(ve(d),[n({node:h,treeIndex:c})]),m={node:h,parentNode:l,path:v,lowerSiblingCounts:p,treeIndex:c};if(!h.children||h.expanded!==!0&&t&&!o)return{treeIndex:c,node:r(m)};var b=c,y=h.children.length;return typeof h.children!="function"&&(h.children=h.children.map(function(I,_){var P=Mu({callback:r,getNodeKey:n,ignoreCollapsed:t,node:I,parentNode:o?null:h,currentIndex:b+1,lowerSiblingCounts:[].concat(ve(p),[y-_-1]),path:v});return b=P.treeIndex,P.node})),{node:r(m),treeIndex:b}}function Au(e){var r=e.treeData,n=e.getNodeKey,t=e.callback,i=e.ignoreCollapsed,o=i===void 0?!0:i;!r||r.length<1||Nu({callback:t,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:r},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function gm(e){var r=e.treeData,n=e.getNodeKey,t=e.callback,i=e.ignoreCollapsed,o=i;return!r||r.length<1?[]:Mu({callback:t,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:r},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function vm(e){var r=e.treeData,n=e.expanded,t=n===void 0?!0:n;return gm({treeData:r,callback:function(o){var a=o.node;return ce(ce({},a),{},{expanded:t})},getNodeKey:function(o){var a=o.treeIndex;return a},ignoreCollapsed:!1})}function kr(e){var r=e.treeData,n=e.path,t=e.newNode,i=e.getNodeKey,o=e.ignoreCollapsed,a=o===void 0?!0:o,s="RESULT_MISS",l=function u(d){var f=d.isPseudoRoot,p=f===void 0?!1:f,h=d.node,v=d.currentTreeIndex,m=d.pathIndex;if(!p&&i({node:h,treeIndex:v})!==n[m])return s;if(m>=n.length-1)return typeof t=="function"?t({node:h,treeIndex:v}):t;if(!h.children)throw new Error("Path referenced children of node with no children.");for(var b=v+1,y=0;y<h.children.length;y+=1){var I=u({node:h.children[y],currentTreeIndex:b,pathIndex:m+1});if(I!==s)return I?ce(ce({},h),{},{children:[].concat(ve(h.children.slice(0,y)),[I],ve(h.children.slice(y+1)))}):ce(ce({},h),{},{children:[].concat(ve(h.children.slice(0,y)),ve(h.children.slice(y+1)))});b+=1+Xo({node:h.children[y],ignoreCollapsed:a})}return s},c=l({node:{children:r},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(c===s)throw new Error("No node found at the given path.");return c.children}function mm(e){var r=e.treeData,n=e.path,t=e.getNodeKey,i=e.ignoreCollapsed,o=i===void 0?!0:i,a=null,s=null,l=kr({treeData:r,path:n,getNodeKey:t,ignoreCollapsed:o,newNode:function(u){var d=u.node,f=u.treeIndex;return a=d,s=f,null}});return{treeData:l,node:a,treeIndex:s}}function Lu(e){var r=e.targetDepth,n=e.minimumTreeIndex,t=e.newNode,i=e.ignoreCollapsed,o=e.expandParent,a=e.isPseudoRoot,s=a===void 0?!1:a,l=e.isLastChild,c=e.node,u=e.currentIndex,d=e.currentDepth,f=e.getNodeKey,p=e.path,h=p===void 0?[]:p,v=function(E){return s?[]:[].concat(ve(h),[f({node:E,treeIndex:u})])};if(u>=n-1||l&&!(c.children&&c.children.length)){if(typeof c.children=="function")throw new Error("Cannot add to children defined by a function");var m=o?{expanded:!0}:{},b=ce(ce(ce({},c),m),{},{children:c.children?[t].concat(ve(c.children)):[t]});return{node:b,nextIndex:u+2,insertedTreeIndex:u+1,parentPath:v(b),parentNode:s?null:b}}if(d>=r-1){if(!c.children||typeof c.children=="function"||c.expanded!==!0&&i&&!s)return{node:c,nextIndex:u+1};for(var y=u+1,I=null,_=null,P=0;P<c.children.length;P+=1){if(y>=n){I=y,_=P;break}y+=1+Xo({node:c.children[P],ignoreCollapsed:i})}if(_===null){if(y<n&&!l)return{node:c,nextIndex:y};I=y,_=c.children.length}var w=ce(ce({},c),{},{children:[].concat(ve(c.children.slice(0,_)),[t],ve(c.children.slice(_)))});return{node:w,nextIndex:y,insertedTreeIndex:I,parentPath:v(w),parentNode:s?null:w}}if(!c.children||typeof c.children=="function"||c.expanded!==!0&&i&&!s)return{node:c,nextIndex:u+1};var D=null,S=null,T=null,R=u+1,O=c.children;typeof O!="function"&&(O=O.map(function(H,E){if(D!==null)return H;var B=Lu({targetDepth:r,minimumTreeIndex:n,newNode:t,ignoreCollapsed:i,expandParent:o,isLastChild:l&&E===O.length-1,node:H,currentIndex:R,currentDepth:d+1,getNodeKey:f,path:[]});return"insertedTreeIndex"in B&&(D=B.insertedTreeIndex,T=B.parentNode,S=B.parentPath),R=B.nextIndex,B.node}));var L=ce(ce({},c),{},{children:O}),M={node:L,nextIndex:R};return D!==null&&(M.insertedTreeIndex=D,M.parentPath=[].concat(ve(v(L)),ve(S)),M.parentNode=T),M}function zu(e){var r=e.treeData,n=e.depth,t=e.minimumTreeIndex,i=e.newNode,o=e.getNodeKey,a=o===void 0?function(){}:o,s=e.ignoreCollapsed,l=s===void 0?!0:s,c=e.expandParent,u=c===void 0?!1:c;if(!r&&n===0)return{treeData:[i],treeIndex:0,path:[a({node:i,treeIndex:0})],parentNode:null};var d=Lu({targetDepth:n,minimumTreeIndex:t,newNode:i,ignoreCollapsed:l,expandParent:u,getNodeKey:a,isPseudoRoot:!0,isLastChild:!0,node:{children:r},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in d))throw new Error("No suitable position found to insert.");var f=d.insertedTreeIndex;return{treeData:d.node.children,treeIndex:f,path:[].concat(ve(d.parentPath),[a({node:i,treeIndex:f})]),parentNode:d.parentNode}}function bm(e){var r=e.treeData,n=e.getNodeKey,t=e.ignoreCollapsed,i=t===void 0?!0:t;if(!r||r.length<1)return[];var o=[];return Au({treeData:r,getNodeKey:n,ignoreCollapsed:i,callback:function(s){o.push(s)}}),o}function ju(e,r){return!!e.children&&typeof e.children!="function"&&e.children.some(function(n){return n===r||ju(n,r)})}function Fu(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?typeof e.children=="function"?r+1:e.children.reduce(function(n,t){return Math.max(n,Fu(t,r+1))},r):r}function ym(e){var r=e.getNodeKey,n=e.treeData,t=e.searchQuery,i=e.searchMethod,o=e.searchFocusOffset,a=e.expandAllMatchPaths,s=a===void 0?!1:a,l=e.expandFocusMatchPaths,c=l===void 0?!0:l,u=0,d=function p(h){var v=h.isPseudoRoot,m=v===void 0?!1:v,b=h.node,y=h.currentIndex,I=h.path,_=I===void 0?[]:I,P=[],w=!1,D=!1,S=m?[]:[].concat(ve(_),[r({node:b,treeIndex:y})]),T=m?null:{path:S,treeIndex:y},R=b.children&&typeof b.children!="function"&&b.children.length>0;!m&&i(ce(ce({},T),{},{node:b,searchQuery:t}))&&(u===o&&(D=!0),u+=1,w=!0);var O=y,L=ce({},b);return R&&(L.children=L.children.map(function(M){var H=p({node:M,currentIndex:O+1,path:S});return H.node.expanded?O=H.treeIndex:O+=1,(H.matches.length>0||H.hasFocusMatch)&&(P=[].concat(ve(P),ve(H.matches)),H.hasFocusMatch&&(D=!0),(s&&H.matches.length>0||(s||c)&&H.hasFocusMatch)&&(L.expanded=!0)),H.node})),!m&&!L.expanded&&(P=P.map(function(M){return ce(ce({},M),{},{treeIndex:null})})),w&&(P=[ce(ce({},T),{},{node:L})].concat(ve(P))),{node:P.length>0?L:b,matches:P,hasFocusMatch:D,treeIndex:O}},f=d({node:{children:n},isPseudoRoot:!0,currentIndex:-1});return{matches:f.matches,treeData:f.node.children}}function Be(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.filter(Boolean).join(" ")}function xm(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=it(e),t;if(r()){var i=it(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return ai(this,t)}}var Qo=function(e){oi(n,e);var r=xm(n);function n(){return rn(this,n),r.apply(this,arguments)}return nn(n,[{key:"render",value:function(){var i=this.props,o=i.scaffoldBlockPxWidth,a=i.toggleChildrenVisibility,s=i.connectDragPreview,l=i.connectDragSource,c=i.isDragging,u=i.canDrop,d=i.canDrag,f=i.node,p=i.title,h=i.subtitle,v=i.draggedNode,m=i.path,b=i.treeIndex,y=i.isSearchMatch,I=i.isSearchFocus,_=i.buttons,P=i.className,w=i.style,D=i.didDrop;i.treeId,i.isOver,i.parentNode;var S=i.rowDirection,T=Jo(i,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]),R=p||f.title,O=h||f.subtitle,L=S==="rtl"?"rst__rtl":null,M;d&&(typeof f.children=="function"&&f.expanded?M=Q.createElement("div",{className:"rst__loadingHandle"},Q.createElement("div",{className:"rst__loadingCircle"},ve(new Array(12)).map(function($,U){return Q.createElement("div",{key:U,className:Be("rst__loadingCirclePoint",L)})}))):M=l(Q.createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));var H=v&&ju(v,f),E=!D&&c,B={left:-.5*o};return S==="rtl"&&(B={right:-.5*o}),Q.createElement("div",bt({style:{height:"100%"}},T),a&&f.children&&(f.children.length>0||typeof f.children=="function")&&Q.createElement("div",null,Q.createElement("button",{type:"button","aria-label":f.expanded?"Collapse":"Expand",className:Be(f.expanded?"rst__collapseButton":"rst__expandButton",L),style:B,onClick:function(){return a({node:f,path:m,treeIndex:b})}}),f.expanded&&!c&&Q.createElement("div",{style:{width:o},className:Be("rst__lineChildren",L)})),Q.createElement("div",{className:Be("rst__rowWrapper",L)},s(Q.createElement("div",{className:Be("rst__row",E&&"rst__rowLandingPad",E&&!u&&"rst__rowCancelPad",y&&"rst__rowSearchMatch",I&&"rst__rowSearchFocus",L,P),style:ce({opacity:H?.5:1},w)},M,Q.createElement("div",{className:Be("rst__rowContents",!d&&"rst__rowContentsDragDisabled",L)},Q.createElement("div",{className:Be("rst__rowLabel",L)},Q.createElement("span",{className:Be("rst__rowTitle",f.subtitle&&"rst__rowTitleWithSubtitle")},typeof R=="function"?R({node:f,path:m,treeIndex:b}):R),O&&Q.createElement("span",{className:"rst__rowSubtitle"},typeof O=="function"?O({node:f,path:m,treeIndex:b}):O)),Q.createElement("div",{className:"rst__rowToolbar"},_.map(function($,U){return Q.createElement("div",{key:U,className:"rst__toolbarButton"},$)})))))))}}]),n}(C.Component);Qo.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"};Qo.propTypes={node:x.shape({}).isRequired,title:x.oneOfType([x.func,x.node]),subtitle:x.oneOfType([x.func,x.node]),path:x.arrayOf(x.oneOfType([x.string,x.number])).isRequired,treeIndex:x.number.isRequired,treeId:x.string.isRequired,isSearchMatch:x.bool,isSearchFocus:x.bool,canDrag:x.bool,scaffoldBlockPxWidth:x.number.isRequired,toggleChildrenVisibility:x.func,buttons:x.arrayOf(x.node),className:x.string,style:x.shape({}),connectDragPreview:x.func.isRequired,connectDragSource:x.func.isRequired,parentNode:x.shape({}),isDragging:x.bool.isRequired,didDrop:x.bool.isRequired,draggedNode:x.shape({}),isOver:x.bool.isRequired,canDrop:x.bool,rowDirection:x.string};var Zo=function(r){var n=r.isOver,t=r.canDrop;return Q.createElement("div",{className:Be("rst__placeholder",t&&"rst__placeholderLandingPad",t&&!n&&"rst__placeholderCancelPad")})};Zo.defaultProps={isOver:!1,canDrop:!1};Zo.propTypes={isOver:x.bool,canDrop:x.bool};function Sm(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=it(e),t;if(r()){var i=it(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return ai(this,t)}}var ea=function(e){oi(n,e);var r=Sm(n);function n(){return rn(this,n),r.apply(this,arguments)}return nn(n,[{key:"render",value:function(){var i=this.props,o=i.children,a=i.listIndex,s=i.swapFrom,l=i.swapLength,c=i.swapDepth,u=i.scaffoldBlockPxWidth,d=i.lowerSiblingCounts,f=i.connectDropTarget,p=i.isOver,h=i.draggedNode,v=i.canDrop,m=i.treeIndex;i.treeId,i.getPrevRow,i.node,i.path;var b=i.rowDirection,y=Jo(i,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]),I=b==="rtl"?"rst__rtl":null,_=d.length,P=[];d.forEach(function(D,S){var T="";if(D>0?a===0?T="rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":S===_-1?T="rst__lineHalfHorizontalRight rst__lineFullVertical":T="rst__lineFullVertical":a===0?T="rst__lineHalfHorizontalRight":S===_-1&&(T="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),P.push(Q.createElement("div",{key:"pre_".concat(1+S),style:{width:u},className:Be("rst__lineBlock",T,I)})),m!==a&&S===c){var R="";a===s+l-1?R="rst__highlightBottomLeftCorner":m===s?R="rst__highlightTopLeftCorner":R="rst__highlightLineVertical";var O;b==="rtl"?O={width:u,right:u*S}:O={width:u,left:u*S},P.push(Q.createElement("div",{key:S,style:O,className:Be("rst__absoluteLineBlock",R,I)}))}});var w;return b==="rtl"?w={right:u*_}:w={left:u*_},f(Q.createElement("div",bt({},y,{className:Be("rst__node",I)}),P,Q.createElement("div",{className:"rst__nodeContent",style:w},C.Children.map(o,function(D){return C.cloneElement(D,{isOver:p,canDrop:v,draggedNode:h})}))))}}]),n}(C.Component);ea.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"};ea.propTypes={treeIndex:x.number.isRequired,treeId:x.string.isRequired,swapFrom:x.number,swapDepth:x.number,swapLength:x.number,scaffoldBlockPxWidth:x.number.isRequired,lowerSiblingCounts:x.arrayOf(x.number).isRequired,listIndex:x.number.isRequired,children:x.node.isRequired,connectDropTarget:x.func.isRequired,isOver:x.bool.isRequired,canDrop:x.bool,draggedNode:x.shape({}),getPrevRow:x.func.isRequired,node:x.shape({}).isRequired,path:x.arrayOf(x.oneOfType([x.string,x.number])).isRequired,rowDirection:x.string};function wm(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=it(e),t;if(r()){var i=it(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return ai(this,t)}}var ta=function(e){oi(n,e);var r=wm(n);function n(){return rn(this,n),r.apply(this,arguments)}return nn(n,[{key:"render",value:function(){var i=this.props,o=i.children,a=i.connectDropTarget;i.treeId,i.drop;var s=Jo(i,["children","connectDropTarget","treeId","drop"]);return a(Q.createElement("div",null,C.Children.map(o,function(l){return C.cloneElement(l,ce({},s))})))}}]),n}(C.Component);ta.defaultProps={canDrop:!1,draggedNode:null};ta.propTypes={children:x.node.isRequired,connectDropTarget:x.func.isRequired,isOver:x.bool.isRequired,canDrop:x.bool,draggedNode:x.shape({}),treeId:x.string.isRequired,drop:x.func.isRequired};function Cm(e){var r=e.treeIndex;return r}function Bu(e){return typeof e=="string"?e:e===null||nr(e)!=="object"||!e.props||!e.props.children||typeof e.props.children!="string"&&nr(e.props.children)!=="object"?"":typeof e.props.children=="string"?e.props.children:e.props.children.map(function(r){return Bu(r)}).join("")}function Xs(e,r,n,t,i){return typeof n[e]=="function"?String(n[e]({node:n,path:t,treeIndex:i})).indexOf(r)>-1:nr(n[e])==="object"?Bu(n[e]).indexOf(r)>-1:n[e]&&String(n[e]).indexOf(r)>-1}function Im(e){var r=e.node,n=e.path,t=e.treeIndex,i=e.searchQuery;return Xs("title",i,r,n,t)||Xs("subtitle",i,r,n,t)}var ra=function(r){var n=[],t=[],i=null;return function(o){var a=Object.keys(o).sort(),s=a.map(function(l){return o[l]});return(s.length!==n.length||s.some(function(l,c){return l!==n[c]})||a.some(function(l,c){return l!==t[c]}))&&(n=s,t=a,i=r(o)),i}},so=ra(zu),Rm=ra(bm),Tm=ra(Xo),_m=function(){function e(r){rn(this,e),this.treeRef=r}return nn(e,[{key:"getTargetDepth",value:function(n,t,i){var o=0,a=n.getPrevRow();if(a){var s=a.path,l=!this.treeRef.canNodeHaveChildren(a.node);l&&(s=s.slice(0,s.length-1)),o=Math.min(s.length,n.path.length)}var c,u=(t.getItem().path||[]).length;if(t.getItem().treeId!==this.treeId)if(u=0,i){var d=Qr.findDOMNode(i).getBoundingClientRect(),f=t.getSourceClientOffset().x-d.left;c=Math.round(f/n.scaffoldBlockPxWidth)}else c=n.path.length;else{var p=n.rowDirection==="rtl"?-1:1;c=Math.round(p*t.getDifferenceFromInitialOffset().x/n.scaffoldBlockPxWidth)}var h=Math.min(o,Math.max(0,u+c-1));if(typeof this.maxDepth<"u"&&this.maxDepth!==null){var v=t.getItem().node,m=Fu(v);h=Math.max(0,Math.min(h,this.maxDepth-m-1))}return h}},{key:"canDrop",value:function(n,t){if(!t.isOver())return!1;var i=n.getPrevRow(),o=i?i.path:[],a=i?i.node:{},s=this.getTargetDepth(n,t,null);if(s>=o.length&&typeof a.children=="function")return!1;if(typeof this.customCanDrop=="function"){var l=t.getItem(),c=l.node,u=so({treeData:this.treeData,newNode:c,depth:s,getNodeKey:this.getNodeKey,minimumTreeIndex:n.listIndex,expandParent:!0});return this.customCanDrop({node:c,prevPath:t.getItem().path,prevParent:t.getItem().parentNode,prevTreeIndex:t.getItem().treeIndex,nextPath:u.path,nextParent:u.parentNode,nextTreeIndex:u.treeIndex})}return!0}},{key:"wrapSource",value:function(n){var t=this,i={beginDrag:function(s){return t.startDrag(s),{node:s.node,parentNode:s.parentNode,path:s.path,treeIndex:s.treeIndex,treeId:s.treeId}},endDrag:function(s,l){t.endDrag(l.getDropResult())},isDragging:function(s,l){var c=l.getItem().node,u=s.node;return u===c}};function o(a,s){return{connectDragSource:a.dragSource(),connectDragPreview:a.dragPreview(),isDragging:s.isDragging(),didDrop:s.didDrop()}}return Qh(this.dndType,i,o)(n)}},{key:"wrapTarget",value:function(n){var t=this,i={drop:function(s,l,c){var u={node:l.getItem().node,path:l.getItem().path,treeIndex:l.getItem().treeIndex,treeId:t.treeId,minimumTreeIndex:s.treeIndex,depth:t.getTargetDepth(s,l,c)};return t.drop(u),u},hover:function(s,l,c){var u=t.getTargetDepth(s,l,c),d=l.getItem().node,f=s.node!==d||u!==s.path.length-1;f&&(cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.dragHover({node:d,path:l.getItem().path,minimumTreeIndex:s.listIndex,depth:u})}))},canDrop:this.canDrop.bind(this)};function o(a,s){var l=s.getItem();return{connectDropTarget:a.dropTarget(),isOver:s.isOver(),canDrop:s.canDrop(),draggedNode:l?l.node:null}}return Xa(this.dndType,i,o)(n)}},{key:"wrapPlaceholder",value:function(n){var t=this,i={drop:function(s,l){var c=l.getItem(),u=c.node,d=c.path,f=c.treeIndex,p={node:u,path:d,treeIndex:f,treeId:t.treeId,minimumTreeIndex:0,depth:0};return t.drop(p),p}};function o(a,s){var l=s.getItem();return{connectDropTarget:a.dropTarget(),isOver:s.isOver(),canDrop:s.canDrop(),draggedNode:l?l.node:null}}return Xa(this.dndType,i,o)(n)}},{key:"startDrag",get:function(){return this.treeRef.startDrag}},{key:"dragHover",get:function(){return this.treeRef.dragHover}},{key:"endDrag",get:function(){return this.treeRef.endDrag}},{key:"drop",get:function(){return this.treeRef.drop}},{key:"treeId",get:function(){return this.treeRef.treeId}},{key:"dndType",get:function(){return this.treeRef.dndType}},{key:"treeData",get:function(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}},{key:"getNodeKey",get:function(){return this.treeRef.props.getNodeKey}},{key:"customCanDrop",get:function(){return this.treeRef.props.canDrop}},{key:"maxDepth",get:function(){return this.treeRef.props.maxDepth}}]),e}();function Dm(e,r,n){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,i=[].concat(ve(e.slice(0,r)),ve(e.slice(r+t)));return[].concat(ve(i.slice(0,n)),ve(e.slice(r,r+t)),ve(i.slice(n)))}function Pm(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=it(e),t;if(r()){var i=it(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return ai(this,t)}}var Qs=1,Ti=function(r){var n=ce(ce({},r),{},{style:ce(ce({},r.theme.style),r.style),innerStyle:ce(ce({},r.theme.innerStyle),r.innerStyle),reactVirtualizedListProps:ce(ce({},r.theme.reactVirtualizedListProps),r.reactVirtualizedListProps)}),t={nodeContentRenderer:Qo,placeholderRenderer:Zo,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:ea};return Object.keys(t).forEach(function(i){r[i]===null&&(n[i]=typeof r.theme[i]<"u"?r.theme[i]:t[i])}),n},si=function(e){oi(n,e);var r=Pm(n);function n(t){var i;rn(this,n),i=r.call(this,t);var o=Ti(t),a=o.dndType,s=o.nodeContentRenderer,l=o.treeNodeRenderer,c=o.isVirtualized,u=o.slideRegionSize;return i.dndManager=new _m(lt(i)),i.treeId="rst__".concat(Qs),Qs+=1,i.dndType=a||i.treeId,i.nodeContentRenderer=i.dndManager.wrapSource(s),i.treePlaceholderRenderer=i.dndManager.wrapPlaceholder(ta),i.treeNodeRenderer=i.dndManager.wrapTarget(l),c&&(i.scrollZoneVirtualList=(Rn.createScrollingComponent||Xg)(fu),i.vStrength=Rn.createVerticalStrength(u),i.hStrength=Rn.createHorizontalStrength(u)),i.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,instanceProps:{treeData:[],ignoreOneTreeUpdate:!1,searchQuery:null,searchFocusOffset:null}},i.toggleChildrenVisibility=i.toggleChildrenVisibility.bind(lt(i)),i.moveNode=i.moveNode.bind(lt(i)),i.startDrag=i.startDrag.bind(lt(i)),i.dragHover=i.dragHover.bind(lt(i)),i.endDrag=i.endDrag.bind(lt(i)),i.drop=i.drop.bind(lt(i)),i.handleDndMonitorChange=i.handleDndMonitorChange.bind(lt(i)),i}return nn(n,[{key:"componentDidMount",value:function(){n.loadLazyChildren(this.props,this.state);var i=n.search(this.props,this.state,!0,!0,!1);this.setState(i),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}},{key:"componentDidUpdate",value:function(i,o){this.state.dragging!==o.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode})}},{key:"componentWillUnmount",value:function(){this.clearMonitorSubscription()}},{key:"getRows",value:function(i){return Rm({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:i})}},{key:"handleDndMonitorChange",value:function(){var i=this.props.dragDropManager.getMonitor();!i.isDragging()&&this.state.draggingTreeData&&this.endDrag()}},{key:"toggleChildrenVisibility",value:function(i){var o=i.node,a=i.path,s=this.state.instanceProps,l=kr({treeData:s.treeData,path:a,newNode:function(u){var d=u.node;return ce(ce({},d),{},{expanded:!d.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(l),this.props.onVisibilityToggle({treeData:l,node:o,expanded:!o.expanded,path:a})}},{key:"moveNode",value:function(i){var o=i.node,a=i.path,s=i.treeIndex,l=i.depth,c=i.minimumTreeIndex,u=zu({treeData:this.state.draggingTreeData,newNode:o,depth:l,minimumTreeIndex:c,expandParent:!0,getNodeKey:this.props.getNodeKey}),d=u.treeData,f=u.treeIndex,p=u.path,h=u.parentNode;this.props.onChange(d),this.props.onMoveNode({treeData:d,node:o,treeIndex:f,path:p,nextPath:p,nextTreeIndex:f,prevPath:a,prevTreeIndex:s,nextParentNode:h})}},{key:"startDrag",value:function(i){var o=this,a=i.path;this.setState(function(s){var l=mm({treeData:s.instanceProps.treeData,path:a,getNodeKey:o.props.getNodeKey}),c=l.treeData,u=l.node,d=l.treeIndex;return{draggingTreeData:c,draggedNode:u,draggedDepth:a.length-1,draggedMinimumTreeIndex:d,dragging:!0}})}},{key:"dragHover",value:function(i){var o=this,a=i.node,s=i.depth,l=i.minimumTreeIndex;this.state.draggedDepth===s&&this.state.draggedMinimumTreeIndex===l||this.setState(function(c){var u=c.draggingTreeData,d=c.instanceProps,f=u||d.treeData,p=so({treeData:f,newNode:a,depth:s,minimumTreeIndex:l,expandParent:!0,getNodeKey:o.props.getNodeKey}),h=o.getRows(p.treeData),v=h[p.treeIndex].path;return{draggedNode:a,draggedDepth:s,draggedMinimumTreeIndex:l,draggingTreeData:kr({treeData:f,path:v.slice(0,-1),newNode:function(b){var y=b.node;return ce(ce({},y),{},{expanded:!0})},getNodeKey:o.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0}})}},{key:"endDrag",value:function(i){var o=this,a=this.state.instanceProps,s=function(){return o.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})};if(!i)s();else if(i.treeId!==this.treeId){var l=i.node,c=i.path,u=i.treeIndex,d=this.props.shouldCopyOnOutsideDrop;typeof d=="function"&&(d=d({node:l,prevTreeIndex:u,prevPath:c}));var f=this.state.draggingTreeData||a.treeData;d&&(f=kr({treeData:a.treeData,path:c,newNode:function(h){var v=h.node;return ce({},v)},getNodeKey:this.props.getNodeKey})),this.props.onChange(f),this.props.onMoveNode({treeData:f,node:l,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:c,prevTreeIndex:u})}}},{key:"drop",value:function(i){this.moveNode(i)}},{key:"canNodeHaveChildren",value:function(i){var o=this.props.canNodeHaveChildren;return o?o(i):!0}},{key:"renderRow",value:function(i,o){var a=o.listIndex,s=o.style,l=o.getPrevRow,c=o.matchKeys,u=o.swapFrom,d=o.swapDepth,f=o.swapLength,p=i.node,h=i.parentNode,v=i.path,m=i.lowerSiblingCounts,b=i.treeIndex,y=Ti(this.props),I=y.canDrag,_=y.generateNodeProps,P=y.scaffoldBlockPxWidth,w=y.searchFocusOffset,D=y.rowDirection,S=this.treeNodeRenderer,T=this.nodeContentRenderer,R=v[v.length-1],O=R in c,L=O&&c[R]===w,M={node:p,parentNode:h,path:v,lowerSiblingCounts:m,treeIndex:b,isSearchMatch:O,isSearchFocus:L},H=_?_(M):{},E=typeof I!="function"?I:I(M),B={treeIndex:b,scaffoldBlockPxWidth:P,node:p,path:v,treeId:this.treeId,rowDirection:D};return Q.createElement(S,bt({style:s,key:R,listIndex:a,getPrevRow:l,lowerSiblingCounts:m,swapFrom:u,swapLength:f,swapDepth:d},B),Q.createElement(T,bt({parentNode:h,isSearchMatch:O,isSearchFocus:L,canDrag:E,toggleChildrenVisibility:this.toggleChildrenVisibility},B,H)))}},{key:"render",value:function(){var i=this,o=Ti(this.props),a=o.dragDropManager,s=o.style,l=o.className,c=o.innerStyle,u=o.rowHeight,d=o.isVirtualized,f=o.placeholderRenderer,p=o.reactVirtualizedListProps,h=o.getNodeKey,v=o.rowDirection,m=this.state,b=m.searchMatches,y=m.searchFocusTreeIndex,I=m.draggedNode,_=m.draggedDepth,P=m.draggedMinimumTreeIndex,w=m.instanceProps,D=this.state.draggingTreeData||w.treeData,S=v==="rtl"?"rst__rtl":null,T,R=null,O=null;if(I&&P!==null){var L=so({treeData:D,newNode:I,depth:_,minimumTreeIndex:P,expandParent:!0,getNodeKey:h}),M=P;R=L.treeIndex,O=1+Tm({node:I}),T=Dm(this.getRows(L.treeData),R,M,O)}else T=this.getRows(D);var H={};b.forEach(function(X,Z){var q=X.path;H[q[q.length-1]]=Z});var E=y!==null?{scrollToIndex:y}:{},B=s,$;if(T.length<1){var U=this.treePlaceholderRenderer,J=f;$=Q.createElement(U,{treeId:this.treeId,drop:this.drop},Q.createElement(J,null))}else if(d){B=ce({height:"100%"},B);var ee=this.scrollZoneVirtualList;$=Q.createElement(lu,null,function(X){var Z=X.height,q=X.width;return Q.createElement(ee,bt({},E,{dragDropManager:a,verticalStrength:i.vStrength,horizontalStrength:i.hStrength,speed:30,scrollToAlignment:"start",className:"rst__virtualScrollOverride",width:q,onScroll:function(ie){var ue=ie.scrollTop;i.scrollTop=ue},height:Z,style:c,rowCount:T.length,estimatedRowSize:typeof u!="function"?u:void 0,rowHeight:typeof u!="function"?u:function(ne){var ie=ne.index;return u({index:ie,treeIndex:ie,node:T[ie].node,path:T[ie].path})},rowRenderer:function(ie){var ue=ie.index,G=ie.style;return i.renderRow(T[ue],{listIndex:ue,style:G,getPrevRow:function(){return T[ue-1]||null},matchKeys:H,swapFrom:R,swapDepth:_,swapLength:O})}},p))})}else $=T.map(function(X,Z){return i.renderRow(X,{listIndex:Z,style:{height:typeof u!="function"?u:u({index:Z,treeIndex:Z,node:X.node,path:X.path})},getPrevRow:function(){return T[Z-1]||null},matchKeys:H,swapFrom:R,swapDepth:_,swapLength:O})});return Q.createElement("div",{className:Be("rst__tree",l,S),style:B},$)}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.instanceProps,s={},l=hs(a.treeData,i.treeData);return a.treeData=i.treeData,l?hs(a.searchQuery,i.searchQuery)?a.searchFocusOffset!==i.searchFocusOffset&&Object.assign(s,n.search(i,o,!0,!0,!0)):Object.assign(s,n.search(i,o,!0,!0,!1)):(a.ignoreOneTreeUpdate?a.ignoreOneTreeUpdate=!1:(s.searchFocusTreeIndex=null,n.loadLazyChildren(i,o),Object.assign(s,n.search(i,o,!1,!1,!1))),s.draggingTreeData=null,s.draggedNode=null,s.draggedMinimumTreeIndex=null,s.draggedDepth=null,s.dragging=!1),a.searchQuery=i.searchQuery,a.searchFocusOffset=i.searchFocusOffset,s.instanceProps=ce(ce({},a),s.instanceProps),s}},{key:"search",value:function(i,o,a,s,l){var c=i.onChange,u=i.getNodeKey,d=i.searchFinishCallback,f=i.searchQuery,p=i.searchMethod,h=i.searchFocusOffset,v=i.onlyExpandSearchedNodes,m=o.instanceProps;if(!f&&!p)return d&&d([]),{searchMatches:[]};var b={instanceProps:{}},y=ym({getNodeKey:u,treeData:v?vm({treeData:m.treeData,expanded:!1}):m.treeData,searchQuery:f,searchMethod:p||Im,searchFocusOffset:h,expandAllMatchPaths:s&&!l,expandFocusMatchPaths:!!s}),I=y.treeData,_=y.matches;s&&(b.instanceProps.ignoreOneTreeUpdate=!0,c(I)),d&&d(_);var P=null;return a&&h!==null&&h<_.length&&(P=_[h].treeIndex),b.searchMatches=_,b.searchFocusTreeIndex=P,b}},{key:"loadLazyChildren",value:function(i,o){var a=o.instanceProps;Au({treeData:a.treeData,getNodeKey:i.getNodeKey,callback:function(l){var c=l.node,u=l.path,d=l.lowerSiblingCounts,f=l.treeIndex;c.children&&typeof c.children=="function"&&(c.expanded||i.loadCollapsedLazyChildren)&&c.children({node:c,path:u,lowerSiblingCounts:d,treeIndex:f,done:function(h){return i.onChange(kr({treeData:a.treeData,path:u,newNode:function(m){var b=m.node;return b===c?ce(ce({},b),{},{children:h}):b},getNodeKey:i.getNodeKey}))}})}})}}]),n}(C.Component);si.propTypes={dragDropManager:x.shape({getMonitor:x.func}).isRequired,treeData:x.arrayOf(x.object).isRequired,style:x.shape({}),className:x.string,innerStyle:x.shape({}),rowHeight:x.oneOfType([x.number,x.func]),slideRegionSize:x.number,reactVirtualizedListProps:x.shape({}),scaffoldBlockPxWidth:x.number,maxDepth:x.number,searchMethod:x.func,searchQuery:x.any,searchFocusOffset:x.number,searchFinishCallback:x.func,generateNodeProps:x.func,isVirtualized:x.bool,treeNodeRenderer:x.func,nodeContentRenderer:x.func,placeholderRenderer:x.func,theme:x.shape({style:x.shape({}),innerStyle:x.shape({}),reactVirtualizedListProps:x.shape({}),scaffoldBlockPxWidth:x.number,slideRegionSize:x.number,rowHeight:x.oneOfType([x.number,x.func]),treeNodeRenderer:x.func,nodeContentRenderer:x.func,placeholderRenderer:x.func}),getNodeKey:x.func,onChange:x.func.isRequired,onMoveNode:x.func,canDrag:x.oneOfType([x.func,x.bool]),canDrop:x.func,canNodeHaveChildren:x.func,shouldCopyOnOutsideDrop:x.oneOfType([x.func,x.bool]),onVisibilityToggle:x.func,dndType:x.string,onDragStateChanged:x.func,onlyExpandSearchedNodes:x.bool,rowDirection:x.string};si.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:function(){return!0},className:"",dndType:null,generateNodeProps:null,getNodeKey:Cm,innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:function(){},onVisibilityToggle:function(){},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:function(){},onlyExpandSearchedNodes:!1,rowDirection:"ltr"};hm(si);var km=function(r){return Q.createElement(Xh.Consumer,null,function(n){var t=n.dragDropManager;return t===void 0?null:Q.createElement(si,bt({},r,{dragDropManager:t}))})},_n={exports:{}},Zs=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},on=(typeof window>"u"?"undefined":Zs(window))==="object"&&(typeof document>"u"?"undefined":Zs(document))==="object"&&document.nodeType===9,Om={}.constructor;function lo(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(lo);if(e.constructor!==Om)return e;var r={};for(var n in e)r[n]=lo(e[n]);return r}function na(e,r,n){e===void 0&&(e="unnamed");var t=n.jss,i=lo(r),o=t.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var el=function(r,n){for(var t="",i=0;i<r.length&&r[i]!=="!important";i++)t&&(t+=n),t+=r[i];return t},zt=function(r){if(!Array.isArray(r))return r;var n="";if(Array.isArray(r[0]))for(var t=0;t<r.length&&r[t]!=="!important";t++)n&&(n+=", "),n+=el(r[t]," ");else n=el(r,", ");return r[r.length-1]==="!important"&&(n+=" !important"),n};function pr(e){return e&&e.format===!1?{linebreak:"",space:""}:{linebreak:`
22
- `,space:" "}}function Sr(e,r){for(var n="",t=0;t<r;t++)n+=" ";return n+e}function Hr(e,r,n){n===void 0&&(n={});var t="";if(!r)return t;var i=n,o=i.indent,a=o===void 0?0:o,s=r.fallbacks;n.format===!1&&(a=-1/0);var l=pr(n),c=l.linebreak,u=l.space;if(e&&a++,s)if(Array.isArray(s))for(var d=0;d<s.length;d++){var f=s[d];for(var p in f){var h=f[p];h!=null&&(t&&(t+=c),t+=Sr(p+":"+u+zt(h)+";",a))}}else for(var v in s){var m=s[v];m!=null&&(t&&(t+=c),t+=Sr(v+":"+u+zt(m)+";",a))}for(var b in r){var y=r[b];y!=null&&b!=="fallbacks"&&(t&&(t+=c),t+=Sr(b+":"+u+zt(y)+";",a))}return!t&&!n.allowEmpty||!e?t:(a--,t&&(t=""+c+t+c),Sr(""+e+u+"{"+t,a)+Sr("}",a))}var Em=/([[\].#*$><+~=|^:(),"'`\s])/g,tl=typeof CSS<"u"&&CSS.escape,ia=function(e){return tl?tl(e):e.replace(Em,"\\$1")},$u=function(){function e(n,t,i){this.type="style",this.isProcessed=!1;var o=i.sheet,a=i.Renderer;this.key=n,this.options=i,this.style=t,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var r=e.prototype;return r.prop=function(t,i,o){if(i===void 0)return this.style[t];var a=o?o.force:!1;if(!a&&this.style[t]===i)return this;var s=i;(!o||o.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,t,this));var l=s==null||s===!1,c=t in this.style;if(l&&!c&&!a)return this;var u=l&&c;if(u?delete this.style[t]:this.style[t]=s,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,t):this.renderer.setProperty(this.renderable,t,s),this;var d=this.options.sheet;return d&&d.attached,this},e}(),co=function(e){ei(r,e);function r(t,i,o){var a;a=e.call(this,t,i,o)||this;var s=o.selector,l=o.scoped,c=o.sheet,u=o.generateId;return s?a.selectorText=s:l!==!1&&(a.id=u(F(F(a)),c),a.selectorText="."+ia(a.id)),a}var n=r.prototype;return n.applyTo=function(i){var o=this.renderer;if(o){var a=this.toJSON();for(var s in a)o.setProperty(i,s,a[s])}return this},n.toJSON=function(){var i={};for(var o in this.style){var a=this.style[o];typeof a!="object"?i[o]=a:Array.isArray(a)&&(i[o]=zt(a))}return i},n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?K({},i,{allowEmpty:!0}):i;return Hr(this.selectorText,this.style,s)},we(r,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var s=o.setSelector(a,i);s||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),r}($u),Nm={onCreateRule:function(r,n,t){return r[0]==="@"||t.parent&&t.parent.type==="keyframes"?null:new co(r,n,t)}},_i={indent:1,children:!0},Mm=/@([\w-]+)/,Am=function(){function e(n,t,i){this.type="conditional",this.isProcessed=!1,this.key=n;var o=n.match(Mm);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new li(K({},i,{parent:this}));for(var a in t)this.rules.add(a,t[a]);this.rules.process()}var r=e.prototype;return r.getRule=function(t){return this.rules.get(t)},r.indexOf=function(t){return this.rules.indexOf(t)},r.addRule=function(t,i,o){var a=this.rules.add(t,i,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},r.replaceRule=function(t,i,o){var a=this.rules.replace(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},r.toString=function(t){t===void 0&&(t=_i);var i=pr(t),o=i.linebreak;if(t.indent==null&&(t.indent=_i.indent),t.children==null&&(t.children=_i.children),t.children===!1)return this.query+" {}";var a=this.rules.toString(t);return a?this.query+" {"+o+a+o+"}":""},e}(),Lm=/@container|@media|@supports\s+/,zm={onCreateRule:function(r,n,t){return Lm.test(r)?new Am(r,n,t):null}},Di={indent:1,children:!0},jm=/@keyframes\s+([\w-]+)/,uo=function(){function e(n,t,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=n.match(jm);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var a=i.scoped,s=i.sheet,l=i.generateId;this.id=a===!1?this.name:ia(l(this,s)),this.rules=new li(K({},i,{parent:this}));for(var c in t)this.rules.add(c,t[c],K({},i,{parent:this}));this.rules.process()}var r=e.prototype;return r.toString=function(t){t===void 0&&(t=Di);var i=pr(t),o=i.linebreak;if(t.indent==null&&(t.indent=Di.indent),t.children==null&&(t.children=Di.children),t.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(t);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},e}(),Fm=/@keyframes\s+/,Bm=/\$([\w-]+)/g,fo=function(r,n){return typeof r=="string"?r.replace(Bm,function(t,i){return i in n?n[i]:t}):r},rl=function(r,n,t){var i=r[n],o=fo(i,t);o!==i&&(r[n]=o)},$m={onCreateRule:function(r,n,t){return typeof r=="string"&&Fm.test(r)?new uo(r,n,t):null},onProcessStyle:function(r,n,t){return n.type!=="style"||!t||("animation-name"in r&&rl(r,"animation-name",t.keyframes),"animation"in r&&rl(r,"animation",t.keyframes)),r},onChangeValue:function(r,n,t){var i=t.options.sheet;if(!i)return r;switch(n){case"animation":return fo(r,i.keyframes);case"animation-name":return fo(r,i.keyframes);default:return r}}},Gm=function(e){ei(r,e);function r(){return e.apply(this,arguments)||this}var n=r.prototype;return n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?K({},i,{allowEmpty:!0}):i;return Hr(this.key,this.style,s)},r}($u),Wm={onCreateRule:function(r,n,t){return t.parent&&t.parent.type==="keyframes"?new Gm(r,n,t):null}},Hm=function(){function e(n,t,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=t,this.options=i}var r=e.prototype;return r.toString=function(t){var i=pr(t),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s<this.style.length;s++)a+=Hr(this.at,this.style[s]),this.style[s+1]&&(a+=o);return a}return Hr(this.at,this.style,t)},e}(),Um=/@font-face/,qm={onCreateRule:function(r,n,t){return Um.test(r)?new Hm(r,n,t):null}},Vm=function(){function e(n,t,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=n,this.style=t,this.options=i}var r=e.prototype;return r.toString=function(t){return Hr(this.key,this.style,t)},e}(),Km={onCreateRule:function(r,n,t){return r==="@viewport"||r==="@-ms-viewport"?new Vm(r,n,t):null}},Ym=function(){function e(n,t,i){this.type="simple",this.isProcessed=!1,this.key=n,this.value=t,this.options=i}var r=e.prototype;return r.toString=function(t){if(Array.isArray(this.value)){for(var i="",o=0;o<this.value.length;o++)i+=this.key+" "+this.value[o]+";",this.value[o+1]&&(i+=`
21
+ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(r.componentWillMount=Pu,r.componentWillReceiveProps=ku),typeof r.getSnapshotBeforeUpdate=="function"){if(typeof r.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");r.componentWillUpdate=Ou;var s=r.componentDidUpdate;r.componentDidUpdate=function(c,u,d){var f=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:d;s.call(this,c,u,f)}}return e}function Eu(e){var r=e.targetIndex,n=e.node,t=e.currentIndex,i=e.getNodeKey,o=e.path,a=o===void 0?[]:o,s=e.lowerSiblingCounts,l=s===void 0?[]:s,c=e.ignoreCollapsed,u=c===void 0?!0:c,d=e.isPseudoRoot,f=d===void 0?!1:d,p=f?[]:[].concat(ve(a),[i({node:n,treeIndex:t})]);if(t===r)return{node:n,lowerSiblingCounts:l,path:p};if(!n.children||u&&n.expanded!==!0)return{nextIndex:t+1};for(var h=t+1,v=n.children.length,m=0;m<v;m+=1){var y=Eu({ignoreCollapsed:u,getNodeKey:i,targetIndex:r,node:n.children[m],currentIndex:h,lowerSiblingCounts:[].concat(ve(l),[v-m-1]),path:p});if(y.node)return y;h=y.nextIndex}return{nextIndex:h}}function Xo(e){var r=e.node,n=e.ignoreCollapsed,t=n===void 0?!0:n;return Eu({getNodeKey:function(){},ignoreCollapsed:t,node:r,currentIndex:0,targetIndex:-1}).nextIndex-1}function Nu(e){var r=e.callback,n=e.getNodeKey,t=e.ignoreCollapsed,i=e.isPseudoRoot,o=i===void 0?!1:i,a=e.node,s=e.parentNode,l=s===void 0?null:s,c=e.currentIndex,u=e.path,d=u===void 0?[]:u,f=e.lowerSiblingCounts,p=f===void 0?[]:f,h=o?[]:[].concat(ve(d),[n({node:a,treeIndex:c})]),v=o?null:{node:a,parentNode:l,path:h,lowerSiblingCounts:p,treeIndex:c};if(!o){var m=r(v);if(m===!1)return!1}if(!a.children||a.expanded!==!0&&t&&!o)return c;var y=c,b=a.children.length;if(typeof a.children!="function"){for(var I=0;I<b;I+=1)if(y=Nu({callback:r,getNodeKey:n,ignoreCollapsed:t,node:a.children[I],parentNode:o?null:a,currentIndex:y+1,lowerSiblingCounts:[].concat(ve(p),[b-I-1]),path:h}),y===!1)return!1}return y}function Mu(e){var r=e.callback,n=e.getNodeKey,t=e.ignoreCollapsed,i=e.isPseudoRoot,o=i===void 0?!1:i,a=e.node,s=e.parentNode,l=s===void 0?null:s,c=e.currentIndex,u=e.path,d=u===void 0?[]:u,f=e.lowerSiblingCounts,p=f===void 0?[]:f,h=ce({},a),v=o?[]:[].concat(ve(d),[n({node:h,treeIndex:c})]),m={node:h,parentNode:l,path:v,lowerSiblingCounts:p,treeIndex:c};if(!h.children||h.expanded!==!0&&t&&!o)return{treeIndex:c,node:r(m)};var y=c,b=h.children.length;return typeof h.children!="function"&&(h.children=h.children.map(function(I,_){var P=Mu({callback:r,getNodeKey:n,ignoreCollapsed:t,node:I,parentNode:o?null:h,currentIndex:y+1,lowerSiblingCounts:[].concat(ve(p),[b-_-1]),path:v});return y=P.treeIndex,P.node})),{node:r(m),treeIndex:y}}function Au(e){var r=e.treeData,n=e.getNodeKey,t=e.callback,i=e.ignoreCollapsed,o=i===void 0?!0:i;!r||r.length<1||Nu({callback:t,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:r},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function gm(e){var r=e.treeData,n=e.getNodeKey,t=e.callback,i=e.ignoreCollapsed,o=i;return!r||r.length<1?[]:Mu({callback:t,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:r},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function vm(e){var r=e.treeData,n=e.expanded,t=n===void 0?!0:n;return gm({treeData:r,callback:function(o){var a=o.node;return ce(ce({},a),{},{expanded:t})},getNodeKey:function(o){var a=o.treeIndex;return a},ignoreCollapsed:!1})}function Pr(e){var r=e.treeData,n=e.path,t=e.newNode,i=e.getNodeKey,o=e.ignoreCollapsed,a=o===void 0?!0:o,s="RESULT_MISS",l=function u(d){var f=d.isPseudoRoot,p=f===void 0?!1:f,h=d.node,v=d.currentTreeIndex,m=d.pathIndex;if(!p&&i({node:h,treeIndex:v})!==n[m])return s;if(m>=n.length-1)return typeof t=="function"?t({node:h,treeIndex:v}):t;if(!h.children)throw new Error("Path referenced children of node with no children.");for(var y=v+1,b=0;b<h.children.length;b+=1){var I=u({node:h.children[b],currentTreeIndex:y,pathIndex:m+1});if(I!==s)return I?ce(ce({},h),{},{children:[].concat(ve(h.children.slice(0,b)),[I],ve(h.children.slice(b+1)))}):ce(ce({},h),{},{children:[].concat(ve(h.children.slice(0,b)),ve(h.children.slice(b+1)))});y+=1+Xo({node:h.children[b],ignoreCollapsed:a})}return s},c=l({node:{children:r},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(c===s)throw new Error("No node found at the given path.");return c.children}function mm(e){var r=e.treeData,n=e.path,t=e.getNodeKey,i=e.ignoreCollapsed,o=i===void 0?!0:i,a=null,s=null,l=Pr({treeData:r,path:n,getNodeKey:t,ignoreCollapsed:o,newNode:function(u){var d=u.node,f=u.treeIndex;return a=d,s=f,null}});return{treeData:l,node:a,treeIndex:s}}function Lu(e){var r=e.targetDepth,n=e.minimumTreeIndex,t=e.newNode,i=e.ignoreCollapsed,o=e.expandParent,a=e.isPseudoRoot,s=a===void 0?!1:a,l=e.isLastChild,c=e.node,u=e.currentIndex,d=e.currentDepth,f=e.getNodeKey,p=e.path,h=p===void 0?[]:p,v=function(E){return s?[]:[].concat(ve(h),[f({node:E,treeIndex:u})])};if(u>=n-1||l&&!(c.children&&c.children.length)){if(typeof c.children=="function")throw new Error("Cannot add to children defined by a function");var m=o?{expanded:!0}:{},y=ce(ce(ce({},c),m),{},{children:c.children?[t].concat(ve(c.children)):[t]});return{node:y,nextIndex:u+2,insertedTreeIndex:u+1,parentPath:v(y),parentNode:s?null:y}}if(d>=r-1){if(!c.children||typeof c.children=="function"||c.expanded!==!0&&i&&!s)return{node:c,nextIndex:u+1};for(var b=u+1,I=null,_=null,P=0;P<c.children.length;P+=1){if(b>=n){I=b,_=P;break}b+=1+Xo({node:c.children[P],ignoreCollapsed:i})}if(_===null){if(b<n&&!l)return{node:c,nextIndex:b};I=b,_=c.children.length}var w=ce(ce({},c),{},{children:[].concat(ve(c.children.slice(0,_)),[t],ve(c.children.slice(_)))});return{node:w,nextIndex:b,insertedTreeIndex:I,parentPath:v(w),parentNode:s?null:w}}if(!c.children||typeof c.children=="function"||c.expanded!==!0&&i&&!s)return{node:c,nextIndex:u+1};var D=null,S=null,T=null,R=u+1,O=c.children;typeof O!="function"&&(O=O.map(function(H,E){if(D!==null)return H;var B=Lu({targetDepth:r,minimumTreeIndex:n,newNode:t,ignoreCollapsed:i,expandParent:o,isLastChild:l&&E===O.length-1,node:H,currentIndex:R,currentDepth:d+1,getNodeKey:f,path:[]});return"insertedTreeIndex"in B&&(D=B.insertedTreeIndex,T=B.parentNode,S=B.parentPath),R=B.nextIndex,B.node}));var L=ce(ce({},c),{},{children:O}),M={node:L,nextIndex:R};return D!==null&&(M.insertedTreeIndex=D,M.parentPath=[].concat(ve(v(L)),ve(S)),M.parentNode=T),M}function zu(e){var r=e.treeData,n=e.depth,t=e.minimumTreeIndex,i=e.newNode,o=e.getNodeKey,a=o===void 0?function(){}:o,s=e.ignoreCollapsed,l=s===void 0?!0:s,c=e.expandParent,u=c===void 0?!1:c;if(!r&&n===0)return{treeData:[i],treeIndex:0,path:[a({node:i,treeIndex:0})],parentNode:null};var d=Lu({targetDepth:n,minimumTreeIndex:t,newNode:i,ignoreCollapsed:l,expandParent:u,getNodeKey:a,isPseudoRoot:!0,isLastChild:!0,node:{children:r},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in d))throw new Error("No suitable position found to insert.");var f=d.insertedTreeIndex;return{treeData:d.node.children,treeIndex:f,path:[].concat(ve(d.parentPath),[a({node:i,treeIndex:f})]),parentNode:d.parentNode}}function bm(e){var r=e.treeData,n=e.getNodeKey,t=e.ignoreCollapsed,i=t===void 0?!0:t;if(!r||r.length<1)return[];var o=[];return Au({treeData:r,getNodeKey:n,ignoreCollapsed:i,callback:function(s){o.push(s)}}),o}function ju(e,r){return!!e.children&&typeof e.children!="function"&&e.children.some(function(n){return n===r||ju(n,r)})}function Fu(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?typeof e.children=="function"?r+1:e.children.reduce(function(n,t){return Math.max(n,Fu(t,r+1))},r):r}function ym(e){var r=e.getNodeKey,n=e.treeData,t=e.searchQuery,i=e.searchMethod,o=e.searchFocusOffset,a=e.expandAllMatchPaths,s=a===void 0?!1:a,l=e.expandFocusMatchPaths,c=l===void 0?!0:l,u=0,d=function p(h){var v=h.isPseudoRoot,m=v===void 0?!1:v,y=h.node,b=h.currentIndex,I=h.path,_=I===void 0?[]:I,P=[],w=!1,D=!1,S=m?[]:[].concat(ve(_),[r({node:y,treeIndex:b})]),T=m?null:{path:S,treeIndex:b},R=y.children&&typeof y.children!="function"&&y.children.length>0;!m&&i(ce(ce({},T),{},{node:y,searchQuery:t}))&&(u===o&&(D=!0),u+=1,w=!0);var O=b,L=ce({},y);return R&&(L.children=L.children.map(function(M){var H=p({node:M,currentIndex:O+1,path:S});return H.node.expanded?O=H.treeIndex:O+=1,(H.matches.length>0||H.hasFocusMatch)&&(P=[].concat(ve(P),ve(H.matches)),H.hasFocusMatch&&(D=!0),(s&&H.matches.length>0||(s||c)&&H.hasFocusMatch)&&(L.expanded=!0)),H.node})),!m&&!L.expanded&&(P=P.map(function(M){return ce(ce({},M),{},{treeIndex:null})})),w&&(P=[ce(ce({},T),{},{node:L})].concat(ve(P))),{node:P.length>0?L:y,matches:P,hasFocusMatch:D,treeIndex:O}},f=d({node:{children:n},isPseudoRoot:!0,currentIndex:-1});return{matches:f.matches,treeData:f.node.children}}function Be(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.filter(Boolean).join(" ")}function xm(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=it(e),t;if(r()){var i=it(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return ai(this,t)}}var Qo=function(e){oi(n,e);var r=xm(n);function n(){return rn(this,n),r.apply(this,arguments)}return nn(n,[{key:"render",value:function(){var i=this.props,o=i.scaffoldBlockPxWidth,a=i.toggleChildrenVisibility,s=i.connectDragPreview,l=i.connectDragSource,c=i.isDragging,u=i.canDrop,d=i.canDrag,f=i.node,p=i.title,h=i.subtitle,v=i.draggedNode,m=i.path,y=i.treeIndex,b=i.isSearchMatch,I=i.isSearchFocus,_=i.buttons,P=i.className,w=i.style,D=i.didDrop;i.treeId,i.isOver,i.parentNode;var S=i.rowDirection,T=Jo(i,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]),R=p||f.title,O=h||f.subtitle,L=S==="rtl"?"rst__rtl":null,M;d&&(typeof f.children=="function"&&f.expanded?M=Q.createElement("div",{className:"rst__loadingHandle"},Q.createElement("div",{className:"rst__loadingCircle"},ve(new Array(12)).map(function($,U){return Q.createElement("div",{key:U,className:Be("rst__loadingCirclePoint",L)})}))):M=l(Q.createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));var H=v&&ju(v,f),E=!D&&c,B={left:-.5*o};return S==="rtl"&&(B={right:-.5*o}),Q.createElement("div",bt({style:{height:"100%"}},T),a&&f.children&&(f.children.length>0||typeof f.children=="function")&&Q.createElement("div",null,Q.createElement("button",{type:"button","aria-label":f.expanded?"Collapse":"Expand",className:Be(f.expanded?"rst__collapseButton":"rst__expandButton",L),style:B,onClick:function(){return a({node:f,path:m,treeIndex:y})}}),f.expanded&&!c&&Q.createElement("div",{style:{width:o},className:Be("rst__lineChildren",L)})),Q.createElement("div",{className:Be("rst__rowWrapper",L)},s(Q.createElement("div",{className:Be("rst__row",E&&"rst__rowLandingPad",E&&!u&&"rst__rowCancelPad",b&&"rst__rowSearchMatch",I&&"rst__rowSearchFocus",L,P),style:ce({opacity:H?.5:1},w)},M,Q.createElement("div",{className:Be("rst__rowContents",!d&&"rst__rowContentsDragDisabled",L)},Q.createElement("div",{className:Be("rst__rowLabel",L)},Q.createElement("span",{className:Be("rst__rowTitle",f.subtitle&&"rst__rowTitleWithSubtitle")},typeof R=="function"?R({node:f,path:m,treeIndex:y}):R),O&&Q.createElement("span",{className:"rst__rowSubtitle"},typeof O=="function"?O({node:f,path:m,treeIndex:y}):O)),Q.createElement("div",{className:"rst__rowToolbar"},_.map(function($,U){return Q.createElement("div",{key:U,className:"rst__toolbarButton"},$)})))))))}}]),n}(C.Component);Qo.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"};Qo.propTypes={node:x.shape({}).isRequired,title:x.oneOfType([x.func,x.node]),subtitle:x.oneOfType([x.func,x.node]),path:x.arrayOf(x.oneOfType([x.string,x.number])).isRequired,treeIndex:x.number.isRequired,treeId:x.string.isRequired,isSearchMatch:x.bool,isSearchFocus:x.bool,canDrag:x.bool,scaffoldBlockPxWidth:x.number.isRequired,toggleChildrenVisibility:x.func,buttons:x.arrayOf(x.node),className:x.string,style:x.shape({}),connectDragPreview:x.func.isRequired,connectDragSource:x.func.isRequired,parentNode:x.shape({}),isDragging:x.bool.isRequired,didDrop:x.bool.isRequired,draggedNode:x.shape({}),isOver:x.bool.isRequired,canDrop:x.bool,rowDirection:x.string};var Zo=function(r){var n=r.isOver,t=r.canDrop;return Q.createElement("div",{className:Be("rst__placeholder",t&&"rst__placeholderLandingPad",t&&!n&&"rst__placeholderCancelPad")})};Zo.defaultProps={isOver:!1,canDrop:!1};Zo.propTypes={isOver:x.bool,canDrop:x.bool};function Sm(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=it(e),t;if(r()){var i=it(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return ai(this,t)}}var ea=function(e){oi(n,e);var r=Sm(n);function n(){return rn(this,n),r.apply(this,arguments)}return nn(n,[{key:"render",value:function(){var i=this.props,o=i.children,a=i.listIndex,s=i.swapFrom,l=i.swapLength,c=i.swapDepth,u=i.scaffoldBlockPxWidth,d=i.lowerSiblingCounts,f=i.connectDropTarget,p=i.isOver,h=i.draggedNode,v=i.canDrop,m=i.treeIndex;i.treeId,i.getPrevRow,i.node,i.path;var y=i.rowDirection,b=Jo(i,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]),I=y==="rtl"?"rst__rtl":null,_=d.length,P=[];d.forEach(function(D,S){var T="";if(D>0?a===0?T="rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":S===_-1?T="rst__lineHalfHorizontalRight rst__lineFullVertical":T="rst__lineFullVertical":a===0?T="rst__lineHalfHorizontalRight":S===_-1&&(T="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),P.push(Q.createElement("div",{key:"pre_".concat(1+S),style:{width:u},className:Be("rst__lineBlock",T,I)})),m!==a&&S===c){var R="";a===s+l-1?R="rst__highlightBottomLeftCorner":m===s?R="rst__highlightTopLeftCorner":R="rst__highlightLineVertical";var O;y==="rtl"?O={width:u,right:u*S}:O={width:u,left:u*S},P.push(Q.createElement("div",{key:S,style:O,className:Be("rst__absoluteLineBlock",R,I)}))}});var w;return y==="rtl"?w={right:u*_}:w={left:u*_},f(Q.createElement("div",bt({},b,{className:Be("rst__node",I)}),P,Q.createElement("div",{className:"rst__nodeContent",style:w},C.Children.map(o,function(D){return C.cloneElement(D,{isOver:p,canDrop:v,draggedNode:h})}))))}}]),n}(C.Component);ea.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"};ea.propTypes={treeIndex:x.number.isRequired,treeId:x.string.isRequired,swapFrom:x.number,swapDepth:x.number,swapLength:x.number,scaffoldBlockPxWidth:x.number.isRequired,lowerSiblingCounts:x.arrayOf(x.number).isRequired,listIndex:x.number.isRequired,children:x.node.isRequired,connectDropTarget:x.func.isRequired,isOver:x.bool.isRequired,canDrop:x.bool,draggedNode:x.shape({}),getPrevRow:x.func.isRequired,node:x.shape({}).isRequired,path:x.arrayOf(x.oneOfType([x.string,x.number])).isRequired,rowDirection:x.string};function wm(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=it(e),t;if(r()){var i=it(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return ai(this,t)}}var ta=function(e){oi(n,e);var r=wm(n);function n(){return rn(this,n),r.apply(this,arguments)}return nn(n,[{key:"render",value:function(){var i=this.props,o=i.children,a=i.connectDropTarget;i.treeId,i.drop;var s=Jo(i,["children","connectDropTarget","treeId","drop"]);return a(Q.createElement("div",null,C.Children.map(o,function(l){return C.cloneElement(l,ce({},s))})))}}]),n}(C.Component);ta.defaultProps={canDrop:!1,draggedNode:null};ta.propTypes={children:x.node.isRequired,connectDropTarget:x.func.isRequired,isOver:x.bool.isRequired,canDrop:x.bool,draggedNode:x.shape({}),treeId:x.string.isRequired,drop:x.func.isRequired};function Cm(e){var r=e.treeIndex;return r}function Bu(e){return typeof e=="string"?e:e===null||nr(e)!=="object"||!e.props||!e.props.children||typeof e.props.children!="string"&&nr(e.props.children)!=="object"?"":typeof e.props.children=="string"?e.props.children:e.props.children.map(function(r){return Bu(r)}).join("")}function Xs(e,r,n,t,i){return typeof n[e]=="function"?String(n[e]({node:n,path:t,treeIndex:i})).indexOf(r)>-1:nr(n[e])==="object"?Bu(n[e]).indexOf(r)>-1:n[e]&&String(n[e]).indexOf(r)>-1}function Im(e){var r=e.node,n=e.path,t=e.treeIndex,i=e.searchQuery;return Xs("title",i,r,n,t)||Xs("subtitle",i,r,n,t)}var ra=function(r){var n=[],t=[],i=null;return function(o){var a=Object.keys(o).sort(),s=a.map(function(l){return o[l]});return(s.length!==n.length||s.some(function(l,c){return l!==n[c]})||a.some(function(l,c){return l!==t[c]}))&&(n=s,t=a,i=r(o)),i}},so=ra(zu),Rm=ra(bm),Tm=ra(Xo),_m=function(){function e(r){rn(this,e),this.treeRef=r}return nn(e,[{key:"getTargetDepth",value:function(n,t,i){var o=0,a=n.getPrevRow();if(a){var s=a.path,l=!this.treeRef.canNodeHaveChildren(a.node);l&&(s=s.slice(0,s.length-1)),o=Math.min(s.length,n.path.length)}var c,u=(t.getItem().path||[]).length;if(t.getItem().treeId!==this.treeId)if(u=0,i){var d=Qr.findDOMNode(i).getBoundingClientRect(),f=t.getSourceClientOffset().x-d.left;c=Math.round(f/n.scaffoldBlockPxWidth)}else c=n.path.length;else{var p=n.rowDirection==="rtl"?-1:1;c=Math.round(p*t.getDifferenceFromInitialOffset().x/n.scaffoldBlockPxWidth)}var h=Math.min(o,Math.max(0,u+c-1));if(typeof this.maxDepth<"u"&&this.maxDepth!==null){var v=t.getItem().node,m=Fu(v);h=Math.max(0,Math.min(h,this.maxDepth-m-1))}return h}},{key:"canDrop",value:function(n,t){if(!t.isOver())return!1;var i=n.getPrevRow(),o=i?i.path:[],a=i?i.node:{},s=this.getTargetDepth(n,t,null);if(s>=o.length&&typeof a.children=="function")return!1;if(typeof this.customCanDrop=="function"){var l=t.getItem(),c=l.node,u=so({treeData:this.treeData,newNode:c,depth:s,getNodeKey:this.getNodeKey,minimumTreeIndex:n.listIndex,expandParent:!0});return this.customCanDrop({node:c,prevPath:t.getItem().path,prevParent:t.getItem().parentNode,prevTreeIndex:t.getItem().treeIndex,nextPath:u.path,nextParent:u.parentNode,nextTreeIndex:u.treeIndex})}return!0}},{key:"wrapSource",value:function(n){var t=this,i={beginDrag:function(s){return t.startDrag(s),{node:s.node,parentNode:s.parentNode,path:s.path,treeIndex:s.treeIndex,treeId:s.treeId}},endDrag:function(s,l){t.endDrag(l.getDropResult())},isDragging:function(s,l){var c=l.getItem().node,u=s.node;return u===c}};function o(a,s){return{connectDragSource:a.dragSource(),connectDragPreview:a.dragPreview(),isDragging:s.isDragging(),didDrop:s.didDrop()}}return Qh(this.dndType,i,o)(n)}},{key:"wrapTarget",value:function(n){var t=this,i={drop:function(s,l,c){var u={node:l.getItem().node,path:l.getItem().path,treeIndex:l.getItem().treeIndex,treeId:t.treeId,minimumTreeIndex:s.treeIndex,depth:t.getTargetDepth(s,l,c)};return t.drop(u),u},hover:function(s,l,c){var u=t.getTargetDepth(s,l,c),d=l.getItem().node,f=s.node!==d||u!==s.path.length-1;f&&(cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.dragHover({node:d,path:l.getItem().path,minimumTreeIndex:s.listIndex,depth:u})}))},canDrop:this.canDrop.bind(this)};function o(a,s){var l=s.getItem();return{connectDropTarget:a.dropTarget(),isOver:s.isOver(),canDrop:s.canDrop(),draggedNode:l?l.node:null}}return Xa(this.dndType,i,o)(n)}},{key:"wrapPlaceholder",value:function(n){var t=this,i={drop:function(s,l){var c=l.getItem(),u=c.node,d=c.path,f=c.treeIndex,p={node:u,path:d,treeIndex:f,treeId:t.treeId,minimumTreeIndex:0,depth:0};return t.drop(p),p}};function o(a,s){var l=s.getItem();return{connectDropTarget:a.dropTarget(),isOver:s.isOver(),canDrop:s.canDrop(),draggedNode:l?l.node:null}}return Xa(this.dndType,i,o)(n)}},{key:"startDrag",get:function(){return this.treeRef.startDrag}},{key:"dragHover",get:function(){return this.treeRef.dragHover}},{key:"endDrag",get:function(){return this.treeRef.endDrag}},{key:"drop",get:function(){return this.treeRef.drop}},{key:"treeId",get:function(){return this.treeRef.treeId}},{key:"dndType",get:function(){return this.treeRef.dndType}},{key:"treeData",get:function(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}},{key:"getNodeKey",get:function(){return this.treeRef.props.getNodeKey}},{key:"customCanDrop",get:function(){return this.treeRef.props.canDrop}},{key:"maxDepth",get:function(){return this.treeRef.props.maxDepth}}]),e}();function Dm(e,r,n){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,i=[].concat(ve(e.slice(0,r)),ve(e.slice(r+t)));return[].concat(ve(i.slice(0,n)),ve(e.slice(r,r+t)),ve(i.slice(n)))}function Pm(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=it(e),t;if(r()){var i=it(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return ai(this,t)}}var Qs=1,Ti=function(r){var n=ce(ce({},r),{},{style:ce(ce({},r.theme.style),r.style),innerStyle:ce(ce({},r.theme.innerStyle),r.innerStyle),reactVirtualizedListProps:ce(ce({},r.theme.reactVirtualizedListProps),r.reactVirtualizedListProps)}),t={nodeContentRenderer:Qo,placeholderRenderer:Zo,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:ea};return Object.keys(t).forEach(function(i){r[i]===null&&(n[i]=typeof r.theme[i]<"u"?r.theme[i]:t[i])}),n},si=function(e){oi(n,e);var r=Pm(n);function n(t){var i;rn(this,n),i=r.call(this,t);var o=Ti(t),a=o.dndType,s=o.nodeContentRenderer,l=o.treeNodeRenderer,c=o.isVirtualized,u=o.slideRegionSize;return i.dndManager=new _m(lt(i)),i.treeId="rst__".concat(Qs),Qs+=1,i.dndType=a||i.treeId,i.nodeContentRenderer=i.dndManager.wrapSource(s),i.treePlaceholderRenderer=i.dndManager.wrapPlaceholder(ta),i.treeNodeRenderer=i.dndManager.wrapTarget(l),c&&(i.scrollZoneVirtualList=(Rn.createScrollingComponent||Xg)(fu),i.vStrength=Rn.createVerticalStrength(u),i.hStrength=Rn.createHorizontalStrength(u)),i.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,instanceProps:{treeData:[],ignoreOneTreeUpdate:!1,searchQuery:null,searchFocusOffset:null}},i.toggleChildrenVisibility=i.toggleChildrenVisibility.bind(lt(i)),i.moveNode=i.moveNode.bind(lt(i)),i.startDrag=i.startDrag.bind(lt(i)),i.dragHover=i.dragHover.bind(lt(i)),i.endDrag=i.endDrag.bind(lt(i)),i.drop=i.drop.bind(lt(i)),i.handleDndMonitorChange=i.handleDndMonitorChange.bind(lt(i)),i}return nn(n,[{key:"componentDidMount",value:function(){n.loadLazyChildren(this.props,this.state);var i=n.search(this.props,this.state,!0,!0,!1);this.setState(i),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}},{key:"componentDidUpdate",value:function(i,o){this.state.dragging!==o.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode})}},{key:"componentWillUnmount",value:function(){this.clearMonitorSubscription()}},{key:"getRows",value:function(i){return Rm({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:i})}},{key:"handleDndMonitorChange",value:function(){var i=this.props.dragDropManager.getMonitor();!i.isDragging()&&this.state.draggingTreeData&&this.endDrag()}},{key:"toggleChildrenVisibility",value:function(i){var o=i.node,a=i.path,s=this.state.instanceProps,l=Pr({treeData:s.treeData,path:a,newNode:function(u){var d=u.node;return ce(ce({},d),{},{expanded:!d.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(l),this.props.onVisibilityToggle({treeData:l,node:o,expanded:!o.expanded,path:a})}},{key:"moveNode",value:function(i){var o=i.node,a=i.path,s=i.treeIndex,l=i.depth,c=i.minimumTreeIndex,u=zu({treeData:this.state.draggingTreeData,newNode:o,depth:l,minimumTreeIndex:c,expandParent:!0,getNodeKey:this.props.getNodeKey}),d=u.treeData,f=u.treeIndex,p=u.path,h=u.parentNode;this.props.onChange(d),this.props.onMoveNode({treeData:d,node:o,treeIndex:f,path:p,nextPath:p,nextTreeIndex:f,prevPath:a,prevTreeIndex:s,nextParentNode:h})}},{key:"startDrag",value:function(i){var o=this,a=i.path;this.setState(function(s){var l=mm({treeData:s.instanceProps.treeData,path:a,getNodeKey:o.props.getNodeKey}),c=l.treeData,u=l.node,d=l.treeIndex;return{draggingTreeData:c,draggedNode:u,draggedDepth:a.length-1,draggedMinimumTreeIndex:d,dragging:!0}})}},{key:"dragHover",value:function(i){var o=this,a=i.node,s=i.depth,l=i.minimumTreeIndex;this.state.draggedDepth===s&&this.state.draggedMinimumTreeIndex===l||this.setState(function(c){var u=c.draggingTreeData,d=c.instanceProps,f=u||d.treeData,p=so({treeData:f,newNode:a,depth:s,minimumTreeIndex:l,expandParent:!0,getNodeKey:o.props.getNodeKey}),h=o.getRows(p.treeData),v=h[p.treeIndex].path;return{draggedNode:a,draggedDepth:s,draggedMinimumTreeIndex:l,draggingTreeData:Pr({treeData:f,path:v.slice(0,-1),newNode:function(y){var b=y.node;return ce(ce({},b),{},{expanded:!0})},getNodeKey:o.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0}})}},{key:"endDrag",value:function(i){var o=this,a=this.state.instanceProps,s=function(){return o.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})};if(!i)s();else if(i.treeId!==this.treeId){var l=i.node,c=i.path,u=i.treeIndex,d=this.props.shouldCopyOnOutsideDrop;typeof d=="function"&&(d=d({node:l,prevTreeIndex:u,prevPath:c}));var f=this.state.draggingTreeData||a.treeData;d&&(f=Pr({treeData:a.treeData,path:c,newNode:function(h){var v=h.node;return ce({},v)},getNodeKey:this.props.getNodeKey})),this.props.onChange(f),this.props.onMoveNode({treeData:f,node:l,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:c,prevTreeIndex:u})}}},{key:"drop",value:function(i){this.moveNode(i)}},{key:"canNodeHaveChildren",value:function(i){var o=this.props.canNodeHaveChildren;return o?o(i):!0}},{key:"renderRow",value:function(i,o){var a=o.listIndex,s=o.style,l=o.getPrevRow,c=o.matchKeys,u=o.swapFrom,d=o.swapDepth,f=o.swapLength,p=i.node,h=i.parentNode,v=i.path,m=i.lowerSiblingCounts,y=i.treeIndex,b=Ti(this.props),I=b.canDrag,_=b.generateNodeProps,P=b.scaffoldBlockPxWidth,w=b.searchFocusOffset,D=b.rowDirection,S=this.treeNodeRenderer,T=this.nodeContentRenderer,R=v[v.length-1],O=R in c,L=O&&c[R]===w,M={node:p,parentNode:h,path:v,lowerSiblingCounts:m,treeIndex:y,isSearchMatch:O,isSearchFocus:L},H=_?_(M):{},E=typeof I!="function"?I:I(M),B={treeIndex:y,scaffoldBlockPxWidth:P,node:p,path:v,treeId:this.treeId,rowDirection:D};return Q.createElement(S,bt({style:s,key:R,listIndex:a,getPrevRow:l,lowerSiblingCounts:m,swapFrom:u,swapLength:f,swapDepth:d},B),Q.createElement(T,bt({parentNode:h,isSearchMatch:O,isSearchFocus:L,canDrag:E,toggleChildrenVisibility:this.toggleChildrenVisibility},B,H)))}},{key:"render",value:function(){var i=this,o=Ti(this.props),a=o.dragDropManager,s=o.style,l=o.className,c=o.innerStyle,u=o.rowHeight,d=o.isVirtualized,f=o.placeholderRenderer,p=o.reactVirtualizedListProps,h=o.getNodeKey,v=o.rowDirection,m=this.state,y=m.searchMatches,b=m.searchFocusTreeIndex,I=m.draggedNode,_=m.draggedDepth,P=m.draggedMinimumTreeIndex,w=m.instanceProps,D=this.state.draggingTreeData||w.treeData,S=v==="rtl"?"rst__rtl":null,T,R=null,O=null;if(I&&P!==null){var L=so({treeData:D,newNode:I,depth:_,minimumTreeIndex:P,expandParent:!0,getNodeKey:h}),M=P;R=L.treeIndex,O=1+Tm({node:I}),T=Dm(this.getRows(L.treeData),R,M,O)}else T=this.getRows(D);var H={};y.forEach(function(X,Z){var q=X.path;H[q[q.length-1]]=Z});var E=b!==null?{scrollToIndex:b}:{},B=s,$;if(T.length<1){var U=this.treePlaceholderRenderer,J=f;$=Q.createElement(U,{treeId:this.treeId,drop:this.drop},Q.createElement(J,null))}else if(d){B=ce({height:"100%"},B);var ee=this.scrollZoneVirtualList;$=Q.createElement(lu,null,function(X){var Z=X.height,q=X.width;return Q.createElement(ee,bt({},E,{dragDropManager:a,verticalStrength:i.vStrength,horizontalStrength:i.hStrength,speed:30,scrollToAlignment:"start",className:"rst__virtualScrollOverride",width:q,onScroll:function(ie){var ue=ie.scrollTop;i.scrollTop=ue},height:Z,style:c,rowCount:T.length,estimatedRowSize:typeof u!="function"?u:void 0,rowHeight:typeof u!="function"?u:function(ne){var ie=ne.index;return u({index:ie,treeIndex:ie,node:T[ie].node,path:T[ie].path})},rowRenderer:function(ie){var ue=ie.index,G=ie.style;return i.renderRow(T[ue],{listIndex:ue,style:G,getPrevRow:function(){return T[ue-1]||null},matchKeys:H,swapFrom:R,swapDepth:_,swapLength:O})}},p))})}else $=T.map(function(X,Z){return i.renderRow(X,{listIndex:Z,style:{height:typeof u!="function"?u:u({index:Z,treeIndex:Z,node:X.node,path:X.path})},getPrevRow:function(){return T[Z-1]||null},matchKeys:H,swapFrom:R,swapDepth:_,swapLength:O})});return Q.createElement("div",{className:Be("rst__tree",l,S),style:B},$)}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.instanceProps,s={},l=hs(a.treeData,i.treeData);return a.treeData=i.treeData,l?hs(a.searchQuery,i.searchQuery)?a.searchFocusOffset!==i.searchFocusOffset&&Object.assign(s,n.search(i,o,!0,!0,!0)):Object.assign(s,n.search(i,o,!0,!0,!1)):(a.ignoreOneTreeUpdate?a.ignoreOneTreeUpdate=!1:(s.searchFocusTreeIndex=null,n.loadLazyChildren(i,o),Object.assign(s,n.search(i,o,!1,!1,!1))),s.draggingTreeData=null,s.draggedNode=null,s.draggedMinimumTreeIndex=null,s.draggedDepth=null,s.dragging=!1),a.searchQuery=i.searchQuery,a.searchFocusOffset=i.searchFocusOffset,s.instanceProps=ce(ce({},a),s.instanceProps),s}},{key:"search",value:function(i,o,a,s,l){var c=i.onChange,u=i.getNodeKey,d=i.searchFinishCallback,f=i.searchQuery,p=i.searchMethod,h=i.searchFocusOffset,v=i.onlyExpandSearchedNodes,m=o.instanceProps;if(!f&&!p)return d&&d([]),{searchMatches:[]};var y={instanceProps:{}},b=ym({getNodeKey:u,treeData:v?vm({treeData:m.treeData,expanded:!1}):m.treeData,searchQuery:f,searchMethod:p||Im,searchFocusOffset:h,expandAllMatchPaths:s&&!l,expandFocusMatchPaths:!!s}),I=b.treeData,_=b.matches;s&&(y.instanceProps.ignoreOneTreeUpdate=!0,c(I)),d&&d(_);var P=null;return a&&h!==null&&h<_.length&&(P=_[h].treeIndex),y.searchMatches=_,y.searchFocusTreeIndex=P,y}},{key:"loadLazyChildren",value:function(i,o){var a=o.instanceProps;Au({treeData:a.treeData,getNodeKey:i.getNodeKey,callback:function(l){var c=l.node,u=l.path,d=l.lowerSiblingCounts,f=l.treeIndex;c.children&&typeof c.children=="function"&&(c.expanded||i.loadCollapsedLazyChildren)&&c.children({node:c,path:u,lowerSiblingCounts:d,treeIndex:f,done:function(h){return i.onChange(Pr({treeData:a.treeData,path:u,newNode:function(m){var y=m.node;return y===c?ce(ce({},y),{},{children:h}):y},getNodeKey:i.getNodeKey}))}})}})}}]),n}(C.Component);si.propTypes={dragDropManager:x.shape({getMonitor:x.func}).isRequired,treeData:x.arrayOf(x.object).isRequired,style:x.shape({}),className:x.string,innerStyle:x.shape({}),rowHeight:x.oneOfType([x.number,x.func]),slideRegionSize:x.number,reactVirtualizedListProps:x.shape({}),scaffoldBlockPxWidth:x.number,maxDepth:x.number,searchMethod:x.func,searchQuery:x.any,searchFocusOffset:x.number,searchFinishCallback:x.func,generateNodeProps:x.func,isVirtualized:x.bool,treeNodeRenderer:x.func,nodeContentRenderer:x.func,placeholderRenderer:x.func,theme:x.shape({style:x.shape({}),innerStyle:x.shape({}),reactVirtualizedListProps:x.shape({}),scaffoldBlockPxWidth:x.number,slideRegionSize:x.number,rowHeight:x.oneOfType([x.number,x.func]),treeNodeRenderer:x.func,nodeContentRenderer:x.func,placeholderRenderer:x.func}),getNodeKey:x.func,onChange:x.func.isRequired,onMoveNode:x.func,canDrag:x.oneOfType([x.func,x.bool]),canDrop:x.func,canNodeHaveChildren:x.func,shouldCopyOnOutsideDrop:x.oneOfType([x.func,x.bool]),onVisibilityToggle:x.func,dndType:x.string,onDragStateChanged:x.func,onlyExpandSearchedNodes:x.bool,rowDirection:x.string};si.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:function(){return!0},className:"",dndType:null,generateNodeProps:null,getNodeKey:Cm,innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:function(){},onVisibilityToggle:function(){},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:function(){},onlyExpandSearchedNodes:!1,rowDirection:"ltr"};hm(si);var km=function(r){return Q.createElement(Xh.Consumer,null,function(n){var t=n.dragDropManager;return t===void 0?null:Q.createElement(si,bt({},r,{dragDropManager:t}))})},_n={exports:{}},Zs=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},on=(typeof window>"u"?"undefined":Zs(window))==="object"&&(typeof document>"u"?"undefined":Zs(document))==="object"&&document.nodeType===9,Om={}.constructor;function lo(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(lo);if(e.constructor!==Om)return e;var r={};for(var n in e)r[n]=lo(e[n]);return r}function na(e,r,n){e===void 0&&(e="unnamed");var t=n.jss,i=lo(r),o=t.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var el=function(r,n){for(var t="",i=0;i<r.length&&r[i]!=="!important";i++)t&&(t+=n),t+=r[i];return t},zt=function(r){if(!Array.isArray(r))return r;var n="";if(Array.isArray(r[0]))for(var t=0;t<r.length&&r[t]!=="!important";t++)n&&(n+=", "),n+=el(r[t]," ");else n=el(r,", ");return r[r.length-1]==="!important"&&(n+=" !important"),n};function pr(e){return e&&e.format===!1?{linebreak:"",space:""}:{linebreak:`
22
+ `,space:" "}}function Sr(e,r){for(var n="",t=0;t<r;t++)n+=" ";return n+e}function Hr(e,r,n){n===void 0&&(n={});var t="";if(!r)return t;var i=n,o=i.indent,a=o===void 0?0:o,s=r.fallbacks;n.format===!1&&(a=-1/0);var l=pr(n),c=l.linebreak,u=l.space;if(e&&a++,s)if(Array.isArray(s))for(var d=0;d<s.length;d++){var f=s[d];for(var p in f){var h=f[p];h!=null&&(t&&(t+=c),t+=Sr(p+":"+u+zt(h)+";",a))}}else for(var v in s){var m=s[v];m!=null&&(t&&(t+=c),t+=Sr(v+":"+u+zt(m)+";",a))}for(var y in r){var b=r[y];b!=null&&y!=="fallbacks"&&(t&&(t+=c),t+=Sr(y+":"+u+zt(b)+";",a))}return!t&&!n.allowEmpty||!e?t:(a--,t&&(t=""+c+t+c),Sr(""+e+u+"{"+t,a)+Sr("}",a))}var Em=/([[\].#*$><+~=|^:(),"'`\s])/g,tl=typeof CSS<"u"&&CSS.escape,ia=function(e){return tl?tl(e):e.replace(Em,"\\$1")},$u=function(){function e(n,t,i){this.type="style",this.isProcessed=!1;var o=i.sheet,a=i.Renderer;this.key=n,this.options=i,this.style=t,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var r=e.prototype;return r.prop=function(t,i,o){if(i===void 0)return this.style[t];var a=o?o.force:!1;if(!a&&this.style[t]===i)return this;var s=i;(!o||o.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,t,this));var l=s==null||s===!1,c=t in this.style;if(l&&!c&&!a)return this;var u=l&&c;if(u?delete this.style[t]:this.style[t]=s,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,t):this.renderer.setProperty(this.renderable,t,s),this;var d=this.options.sheet;return d&&d.attached,this},e}(),co=function(e){ei(r,e);function r(t,i,o){var a;a=e.call(this,t,i,o)||this;var s=o.selector,l=o.scoped,c=o.sheet,u=o.generateId;return s?a.selectorText=s:l!==!1&&(a.id=u(F(F(a)),c),a.selectorText="."+ia(a.id)),a}var n=r.prototype;return n.applyTo=function(i){var o=this.renderer;if(o){var a=this.toJSON();for(var s in a)o.setProperty(i,s,a[s])}return this},n.toJSON=function(){var i={};for(var o in this.style){var a=this.style[o];typeof a!="object"?i[o]=a:Array.isArray(a)&&(i[o]=zt(a))}return i},n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?K({},i,{allowEmpty:!0}):i;return Hr(this.selectorText,this.style,s)},we(r,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var s=o.setSelector(a,i);s||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),r}($u),Nm={onCreateRule:function(r,n,t){return r[0]==="@"||t.parent&&t.parent.type==="keyframes"?null:new co(r,n,t)}},_i={indent:1,children:!0},Mm=/@([\w-]+)/,Am=function(){function e(n,t,i){this.type="conditional",this.isProcessed=!1,this.key=n;var o=n.match(Mm);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new li(K({},i,{parent:this}));for(var a in t)this.rules.add(a,t[a]);this.rules.process()}var r=e.prototype;return r.getRule=function(t){return this.rules.get(t)},r.indexOf=function(t){return this.rules.indexOf(t)},r.addRule=function(t,i,o){var a=this.rules.add(t,i,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},r.replaceRule=function(t,i,o){var a=this.rules.replace(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},r.toString=function(t){t===void 0&&(t=_i);var i=pr(t),o=i.linebreak;if(t.indent==null&&(t.indent=_i.indent),t.children==null&&(t.children=_i.children),t.children===!1)return this.query+" {}";var a=this.rules.toString(t);return a?this.query+" {"+o+a+o+"}":""},e}(),Lm=/@container|@media|@supports\s+/,zm={onCreateRule:function(r,n,t){return Lm.test(r)?new Am(r,n,t):null}},Di={indent:1,children:!0},jm=/@keyframes\s+([\w-]+)/,uo=function(){function e(n,t,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=n.match(jm);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var a=i.scoped,s=i.sheet,l=i.generateId;this.id=a===!1?this.name:ia(l(this,s)),this.rules=new li(K({},i,{parent:this}));for(var c in t)this.rules.add(c,t[c],K({},i,{parent:this}));this.rules.process()}var r=e.prototype;return r.toString=function(t){t===void 0&&(t=Di);var i=pr(t),o=i.linebreak;if(t.indent==null&&(t.indent=Di.indent),t.children==null&&(t.children=Di.children),t.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(t);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},e}(),Fm=/@keyframes\s+/,Bm=/\$([\w-]+)/g,fo=function(r,n){return typeof r=="string"?r.replace(Bm,function(t,i){return i in n?n[i]:t}):r},rl=function(r,n,t){var i=r[n],o=fo(i,t);o!==i&&(r[n]=o)},$m={onCreateRule:function(r,n,t){return typeof r=="string"&&Fm.test(r)?new uo(r,n,t):null},onProcessStyle:function(r,n,t){return n.type!=="style"||!t||("animation-name"in r&&rl(r,"animation-name",t.keyframes),"animation"in r&&rl(r,"animation",t.keyframes)),r},onChangeValue:function(r,n,t){var i=t.options.sheet;if(!i)return r;switch(n){case"animation":return fo(r,i.keyframes);case"animation-name":return fo(r,i.keyframes);default:return r}}},Gm=function(e){ei(r,e);function r(){return e.apply(this,arguments)||this}var n=r.prototype;return n.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?K({},i,{allowEmpty:!0}):i;return Hr(this.key,this.style,s)},r}($u),Wm={onCreateRule:function(r,n,t){return t.parent&&t.parent.type==="keyframes"?new Gm(r,n,t):null}},Hm=function(){function e(n,t,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=t,this.options=i}var r=e.prototype;return r.toString=function(t){var i=pr(t),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s<this.style.length;s++)a+=Hr(this.at,this.style[s]),this.style[s+1]&&(a+=o);return a}return Hr(this.at,this.style,t)},e}(),Um=/@font-face/,qm={onCreateRule:function(r,n,t){return Um.test(r)?new Hm(r,n,t):null}},Vm=function(){function e(n,t,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=n,this.style=t,this.options=i}var r=e.prototype;return r.toString=function(t){return Hr(this.key,this.style,t)},e}(),Km={onCreateRule:function(r,n,t){return r==="@viewport"||r==="@-ms-viewport"?new Vm(r,n,t):null}},Ym=function(){function e(n,t,i){this.type="simple",this.isProcessed=!1,this.key=n,this.value=t,this.options=i}var r=e.prototype;return r.toString=function(t){if(Array.isArray(this.value)){for(var i="",o=0;o<this.value.length;o++)i+=this.key+" "+this.value[o]+";",this.value[o+1]&&(i+=`
23
23
  `);return i}return this.key+" "+this.value+";"},e}(),Jm={"@charset":!0,"@import":!0,"@namespace":!0},Xm={onCreateRule:function(r,n,t){return r in Jm?new Ym(r,n,t):null}},nl=[Nm,zm,$m,Wm,qm,Km,Xm],Qm={process:!0},il={force:!0,process:!0},li=function(){function e(n){this.map={},this.raw={},this.index=[],this.counter=0,this.options=n,this.classes=n.classes,this.keyframes=n.keyframes}var r=e.prototype;return r.add=function(t,i,o){var a=this.options,s=a.parent,l=a.sheet,c=a.jss,u=a.Renderer,d=a.generateId,f=a.scoped,p=K({classes:this.classes,parent:s,sheet:l,jss:c,Renderer:u,generateId:d,scoped:f,name:t,keyframes:this.keyframes,selector:void 0},o),h=t;t in this.raw&&(h=t+"-d"+this.counter++),this.raw[h]=i,h in this.classes&&(p.selector="."+ia(this.classes[h]));var v=na(h,i,p);if(!v)return null;this.register(v);var m=p.index===void 0?this.index.length:p.index;return this.index.splice(m,0,v),v},r.replace=function(t,i,o){var a=this.get(t),s=this.index.indexOf(a);a&&this.remove(a);var l=o;return s!==-1&&(l=K({},o,{index:s})),this.add(t,i,l)},r.get=function(t){return this.map[t]},r.remove=function(t){this.unregister(t),delete this.raw[t.key],this.index.splice(this.index.indexOf(t),1)},r.indexOf=function(t){return this.index.indexOf(t)},r.process=function(){var t=this.options.jss.plugins;this.index.slice(0).forEach(t.onProcessRule,t)},r.register=function(t){this.map[t.key]=t,t instanceof co?(this.map[t.selector]=t,t.id&&(this.classes[t.key]=t.id)):t instanceof uo&&this.keyframes&&(this.keyframes[t.name]=t.id)},r.unregister=function(t){delete this.map[t.key],t instanceof co?(delete this.map[t.selector],delete this.classes[t.key]):t instanceof uo&&delete this.keyframes[t.name]},r.update=function(){var t,i,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(t=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],t=null),t)this.updateOne(this.get(t),i,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],i,o)},r.updateOne=function(t,i,o){o===void 0&&(o=Qm);var a=this.options,s=a.jss.plugins,l=a.sheet;if(t.rules instanceof e){t.rules.update(i,o);return}var c=t.style;if(s.onUpdate(i,t,l,o),o.process&&c&&c!==t.style){s.onProcessStyle(t.style,t,l);for(var u in t.style){var d=t.style[u],f=c[u];d!==f&&t.prop(u,d,il)}for(var p in c){var h=t.style[p],v=c[p];h==null&&h!==v&&t.prop(p,null,il)}}},r.toString=function(t){for(var i="",o=this.options.sheet,a=o?o.options.link:!1,s=pr(t),l=s.linebreak,c=0;c<this.index.length;c++){var u=this.index[c],d=u.toString(t);!d&&!a||(i&&(i+=l),i+=d)}return i},e}(),Gu=function(){function e(n,t){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=K({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new li(this.options);for(var i in n)this.rules.add(i,n[i]);this.rules.process()}var r=e.prototype;return r.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},r.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},r.addRule=function(t,i,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var s=this.rules.add(t,i,o);return s?(this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&(a?a.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),s):(this.deployed=!1,s)):null},r.replaceRule=function(t,i,o){var a=this.rules.get(t);if(!a)return this.addRule(t,i,o);var s=this.rules.replace(t,i,o);return s&&this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&this.renderer&&(s?a.renderable&&this.renderer.replaceRule(a.renderable,s):this.renderer.deleteRule(a)),s):(this.deployed=!1,s)},r.insertRule=function(t){this.renderer&&this.renderer.insertRule(t)},r.addRules=function(t,i){var o=[];for(var a in t){var s=this.addRule(a,t[a],i);s&&o.push(s)}return o},r.getRule=function(t){return this.rules.get(t)},r.deleteRule=function(t){var i=typeof t=="object"?t:this.rules.get(t);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},r.indexOf=function(t){return this.rules.indexOf(t)},r.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},r.update=function(){var t;return(t=this.rules).update.apply(t,arguments),this},r.updateOne=function(t,i,o){return this.rules.updateOne(t,i,o),this},r.toString=function(t){return this.rules.toString(t)},e}(),Zm=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var r=e.prototype;return r.onCreateRule=function(t,i,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var s=this.registry.onCreateRule[a](t,i,o);if(s)return s}return null},r.onProcessRule=function(t){if(!t.isProcessed){for(var i=t.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](t,i);t.style&&this.onProcessStyle(t.style,t,i),t.isProcessed=!0}},r.onProcessStyle=function(t,i,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)i.style=this.registry.onProcessStyle[a](i.style,i,o)},r.onProcessSheet=function(t){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](t)},r.onUpdate=function(t,i,o,a){for(var s=0;s<this.registry.onUpdate.length;s++)this.registry.onUpdate[s](t,i,o,a)},r.onChangeValue=function(t,i,o){for(var a=t,s=0;s<this.registry.onChangeValue.length;s++)a=this.registry.onChangeValue[s](a,i,o);return a},r.use=function(t,i){i===void 0&&(i={queue:"external"});var o=this.plugins[i.queue];o.indexOf(t)===-1&&(o.push(t),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,s){for(var l in s)l in a&&a[l].push(s[l]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),eb=function(){function e(){this.registry=[]}var r=e.prototype;return r.add=function(t){var i=this.registry,o=t.options.index;if(i.indexOf(t)===-1){if(i.length===0||o>=this.index){i.push(t);return}for(var a=0;a<i.length;a++)if(i[a].options.index>o){i.splice(a,0,t);return}}},r.reset=function(){this.registry=[]},r.remove=function(t){var i=this.registry.indexOf(t);this.registry.splice(i,1)},r.toString=function(t){for(var i=t===void 0?{}:t,o=i.attached,a=or(i,["attached"]),s=pr(a),l=s.linebreak,c="",u=0;u<this.registry.length;u++){var d=this.registry[u];o!=null&&d.attached!==o||(c&&(c+=l),c+=d.toString(a))}return c},we(e,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),e}(),Lr=new eb,po=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),ho="2f1acc6c3a606b082e5eef5e54414ffb";po[ho]==null&&(po[ho]=0);var ol=po[ho]++,al=function(r){r===void 0&&(r={});var n=0,t=function(o,a){n+=1;var s="",l="";return a&&(a.options.classNamePrefix&&(l=a.options.classNamePrefix),a.options.jss.id!=null&&(s=String(a.options.jss.id))),r.minify?""+(l||"c")+ol+s+n:l+o.key+"-"+ol+(s?"-"+s:"")+"-"+n};return t},Wu=function(r){var n;return function(){return n||(n=r()),n}},tb=function(r,n){try{return r.attributeStyleMap?r.attributeStyleMap.get(n):r.style.getPropertyValue(n)}catch{return""}},rb=function(r,n,t){try{var i=t;if(Array.isArray(t)&&(i=zt(t)),r.attributeStyleMap)r.attributeStyleMap.set(n,i);else{var o=i?i.indexOf("!important"):-1,a=o>-1?i.substr(0,o-1):i;r.style.setProperty(n,a,o>-1?"important":"")}}catch{return!1}return!0},nb=function(r,n){try{r.attributeStyleMap?r.attributeStyleMap.delete(n):r.style.removeProperty(n)}catch{}},ib=function(r,n){return r.selectorText=n,r.selectorText===n},Hu=Wu(function(){return document.querySelector("head")});function ob(e,r){for(var n=0;n<e.length;n++){var t=e[n];if(t.attached&&t.options.index>r.index&&t.options.insertionPoint===r.insertionPoint)return t}return null}function ab(e,r){for(var n=e.length-1;n>=0;n--){var t=e[n];if(t.attached&&t.options.insertionPoint===r.insertionPoint)return t}return null}function sb(e){for(var r=Hu(),n=0;n<r.childNodes.length;n++){var t=r.childNodes[n];if(t.nodeType===8&&t.nodeValue.trim()===e)return t}return null}function lb(e){var r=Lr.registry;if(r.length>0){var n=ob(r,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=ab(r,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var t=e.insertionPoint;if(t&&typeof t=="string"){var i=sb(t);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function cb(e,r){var n=r.insertionPoint,t=lb(r);if(t!==!1&&t.parent){t.parent.insertBefore(e,t.node);return}if(n&&typeof n.nodeType=="number"){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling);return}Hu().appendChild(e)}var ub=Wu(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),sl=function(r,n,t){try{"insertRule"in r?r.insertRule(n,t):"appendRule"in r&&r.appendRule(n)}catch{return!1}return r.cssRules[t]},ll=function(r,n){var t=r.cssRules.length;return n===void 0||n>t?t:n},db=function(){var r=document.createElement("style");return r.textContent=`
24
24
  `,r},fb=function(){function e(n){this.getPropertyValue=tb,this.setProperty=rb,this.removeProperty=nb,this.setSelector=ib,this.hasInsertedRules=!1,this.cssRules=[],n&&Lr.add(n),this.sheet=n;var t=this.sheet?this.sheet.options:{},i=t.media,o=t.meta,a=t.element;this.element=a||db(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),o&&this.element.setAttribute("data-meta",o);var s=ub();s&&this.element.setAttribute("nonce",s)}var r=e.prototype;return r.attach=function(){if(!(this.element.parentNode||!this.sheet)){cb(this.element,this.sheet.options);var t=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&t&&(this.hasInsertedRules=!1,this.deploy())}},r.detach=function(){if(this.sheet){var t=this.element.parentNode;t&&t.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
25
25
  `)}},r.deploy=function(){var t=this.sheet;if(t){if(t.options.link){this.insertRules(t.rules);return}this.element.textContent=`
@@ -30,7 +30,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
30
30
  * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
31
31
  * @website https://github.com/cssinjs/jss
32
32
  * @license MIT
33
- */Uu();function Pi(e){return e&&sg(e)==="object"&&e.constructor===Object}function Vu(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},t=n.clone?K({},e):e;return Pi(e)&&Pi(r)&&Object.keys(r).forEach(function(i){i!=="__proto__"&&(Pi(r[i])&&i in e?t[i]=Vu(e[i],r[i],n):t[i]=r[i])}),t}function Ku(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.baseClasses,n=e.newClasses;if(e.Component,!n)return r;var t=K({},r);return Object.keys(n).forEach(function(i){n[i]&&(t[i]="".concat(r[i]," ").concat(n[i]))}),t}var tr={set:function(r,n,t,i){var o=r.get(n);o||(o=new Map,r.set(n,o)),o.set(t,i)},get:function(r,n,t){var i=r.get(n);return i?i.get(t):void 0},delete:function(r,n,t){var i=r.get(n);i.delete(t)}},gb=Q.createContext(null);function vb(){var e=Q.useContext(gb);return e}var mb=typeof Symbol=="function"&&Symbol.for;const bb=mb?Symbol.for("mui.nested"):"__THEME_NESTED__";var yb=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function xb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.disableGlobal,n=r===void 0?!1:r,t=e.productionPrefix,i=t===void 0?"jss":t,o=e.seed,a=o===void 0?"":o,s=a===""?"":"".concat(a,"-"),l=0,c=function(){return l+=1,l};return function(u,d){var f=d.options.name;if(f&&f.indexOf("Mui")===0&&!d.options.link&&!n){if(yb.indexOf(u.key)!==-1)return"Mui-".concat(u.key);var p="".concat(s).concat(f,"-").concat(u.key);return!d.options.theme[bb]||a!==""?p:"".concat(p,"-").concat(c())}return"".concat(s).concat(i).concat(c())}}var Yu=Date.now(),ki="fnValues"+Yu,Oi="fnStyle"+ ++Yu,Sb=function(){return{onCreateRule:function(n,t,i){if(typeof t!="function")return null;var o=na(n,{},i);return o[Oi]=t,o},onProcessStyle:function(n,t){if(ki in t||Oi in t)return n;var i={};for(var o in n){var a=n[o];typeof a=="function"&&(delete n[o],i[o]=a)}return t[ki]=i,n},onUpdate:function(n,t,i,o){var a=t,s=a[Oi];s&&(a.style=s(n)||{});var l=a[ki];if(l)for(var c in l)a.prop(c,l[c](n),o)}}},yt="@global",go="@global ",wb=function(){function e(n,t,i){this.type="global",this.at=yt,this.isProcessed=!1,this.key=n,this.options=i,this.rules=new li(K({},i,{parent:this}));for(var o in t)this.rules.add(o,t[o]);this.rules.process()}var r=e.prototype;return r.getRule=function(t){return this.rules.get(t)},r.addRule=function(t,i,o){var a=this.rules.add(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},r.replaceRule=function(t,i,o){var a=this.rules.replace(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},r.indexOf=function(t){return this.rules.indexOf(t)},r.toString=function(t){return this.rules.toString(t)},e}(),Cb=function(){function e(n,t,i){this.type="global",this.at=yt,this.isProcessed=!1,this.key=n,this.options=i;var o=n.substr(go.length);this.rule=i.jss.createRule(o,t,K({},i,{parent:this}))}var r=e.prototype;return r.toString=function(t){return this.rule?this.rule.toString(t):""},e}(),Ib=/\s*,\s*/g;function Ju(e,r){for(var n=e.split(Ib),t="",i=0;i<n.length;i++)t+=r+" "+n[i].trim(),n[i+1]&&(t+=", ");return t}function Rb(e,r){var n=e.options,t=e.style,i=t?t[yt]:null;if(i){for(var o in i)r.addRule(o,i[o],K({},n,{selector:Ju(o,e.selector)}));delete t[yt]}}function Tb(e,r){var n=e.options,t=e.style;for(var i in t)if(!(i[0]!=="@"||i.substr(0,yt.length)!==yt)){var o=Ju(i.substr(yt.length),e.selector);r.addRule(o,t[i],K({},n,{selector:o})),delete t[i]}}function _b(){function e(n,t,i){if(!n)return null;if(n===yt)return new wb(n,t,i);if(n[0]==="@"&&n.substr(0,go.length)===go)return new Cb(n,t,i);var o=i.parent;return o&&(o.type==="global"||o.options.parent&&o.options.parent.type==="global")&&(i.scoped=!1),!i.selector&&i.scoped===!1&&(i.selector=n),null}function r(n,t){n.type!=="style"||!t||(Rb(n,t),Tb(n,t))}return{onCreateRule:e,onProcessRule:r}}var cl=/\s*,\s*/g,Db=/&/g,Pb=/\$([\w-]+)/g;function kb(){function e(i,o){return function(a,s){var l=i.getRule(s)||o&&o.getRule(s);return l?l.selector:s}}function r(i,o){for(var a=o.split(cl),s=i.split(cl),l="",c=0;c<a.length;c++)for(var u=a[c],d=0;d<s.length;d++){var f=s[d];l&&(l+=", "),l+=f.indexOf("&")!==-1?f.replace(Db,u):u+" "+f}return l}function n(i,o,a){if(a)return K({},a,{index:a.index+1});var s=i.options.nestingLevel;s=s===void 0?1:s+1;var l=K({},i.options,{nestingLevel:s,index:o.indexOf(i)+1});return delete l.name,l}function t(i,o,a){if(o.type!=="style")return i;var s=o,l=s.options.parent,c,u;for(var d in i){var f=d.indexOf("&")!==-1,p=d[0]==="@";if(!(!f&&!p)){if(c=n(s,l,c),f){var h=r(d,s.selector);u||(u=e(l,a)),h=h.replace(Pb,u);var v=s.key+"-"+d;"replaceRule"in l?l.replaceRule(v,i[d],K({},c,{selector:h})):l.addRule(v,i[d],K({},c,{selector:h}))}else p&&l.addRule(d,{},c).addRule(s.key,i[d],{selector:s.selector});delete i[d]}}return i}return{onProcessStyle:t}}var Ob=/[A-Z]/g,Eb=/^ms-/,Ei={};function Nb(e){return"-"+e.toLowerCase()}function Xu(e){if(Ei.hasOwnProperty(e))return Ei[e];var r=e.replace(Ob,Nb);return Ei[e]=Eb.test(r)?"-"+r:r}function $n(e){var r={};for(var n in e){var t=n.indexOf("--")===0?n:Xu(n);r[t]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?r.fallbacks=e.fallbacks.map($n):r.fallbacks=$n(e.fallbacks)),r}function Mb(){function e(n){if(Array.isArray(n)){for(var t=0;t<n.length;t++)n[t]=$n(n[t]);return n}return $n(n)}function r(n,t,i){if(t.indexOf("--")===0)return n;var o=Xu(t);return t===o?n:(i.prop(o,n),null)}return{onProcessStyle:e,onChangeValue:r}}var z=oa&&CSS?CSS.px:"px",gn=oa&&CSS?CSS.ms:"ms",Vt=oa&&CSS?CSS.percent:"%",Ab={"animation-delay":gn,"animation-duration":gn,"background-position":z,"background-position-x":z,"background-position-y":z,"background-size":z,border:z,"border-bottom":z,"border-bottom-left-radius":z,"border-bottom-right-radius":z,"border-bottom-width":z,"border-left":z,"border-left-width":z,"border-radius":z,"border-right":z,"border-right-width":z,"border-top":z,"border-top-left-radius":z,"border-top-right-radius":z,"border-top-width":z,"border-width":z,"border-block":z,"border-block-end":z,"border-block-end-width":z,"border-block-start":z,"border-block-start-width":z,"border-block-width":z,"border-inline":z,"border-inline-end":z,"border-inline-end-width":z,"border-inline-start":z,"border-inline-start-width":z,"border-inline-width":z,"border-start-start-radius":z,"border-start-end-radius":z,"border-end-start-radius":z,"border-end-end-radius":z,margin:z,"margin-bottom":z,"margin-left":z,"margin-right":z,"margin-top":z,"margin-block":z,"margin-block-end":z,"margin-block-start":z,"margin-inline":z,"margin-inline-end":z,"margin-inline-start":z,padding:z,"padding-bottom":z,"padding-left":z,"padding-right":z,"padding-top":z,"padding-block":z,"padding-block-end":z,"padding-block-start":z,"padding-inline":z,"padding-inline-end":z,"padding-inline-start":z,"mask-position-x":z,"mask-position-y":z,"mask-size":z,height:z,width:z,"min-height":z,"max-height":z,"min-width":z,"max-width":z,bottom:z,left:z,top:z,right:z,inset:z,"inset-block":z,"inset-block-end":z,"inset-block-start":z,"inset-inline":z,"inset-inline-end":z,"inset-inline-start":z,"box-shadow":z,"text-shadow":z,"column-gap":z,"column-rule":z,"column-rule-width":z,"column-width":z,"font-size":z,"font-size-delta":z,"letter-spacing":z,"text-decoration-thickness":z,"text-indent":z,"text-stroke":z,"text-stroke-width":z,"word-spacing":z,motion:z,"motion-offset":z,outline:z,"outline-offset":z,"outline-width":z,perspective:z,"perspective-origin-x":Vt,"perspective-origin-y":Vt,"transform-origin":Vt,"transform-origin-x":Vt,"transform-origin-y":Vt,"transform-origin-z":Vt,"transition-delay":gn,"transition-duration":gn,"vertical-align":z,"flex-basis":z,"shape-margin":z,size:z,gap:z,grid:z,"grid-gap":z,"row-gap":z,"grid-row-gap":z,"grid-column-gap":z,"grid-template-rows":z,"grid-template-columns":z,"grid-auto-rows":z,"grid-auto-columns":z,"box-shadow-x":z,"box-shadow-y":z,"box-shadow-blur":z,"box-shadow-spread":z,"font-line-height":z,"text-shadow-x":z,"text-shadow-y":z,"text-shadow-blur":z};function Qu(e){var r=/(-[a-z])/g,n=function(a){return a[1].toUpperCase()},t={};for(var i in e)t[i]=e[i],t[i.replace(r,n)]=e[i];return t}var Lb=Qu(Ab);function zr(e,r,n){if(r==null)return r;if(Array.isArray(r))for(var t=0;t<r.length;t++)r[t]=zr(e,r[t],n);else if(typeof r=="object")if(e==="fallbacks")for(var i in r)r[i]=zr(i,r[i],n);else for(var o in r)r[o]=zr(e+"-"+o,r[o],n);else if(typeof r=="number"&&isNaN(r)===!1){var a=n[e]||Lb[e];return a&&!(r===0&&a===z)?typeof a=="function"?a(r).toString():""+r+a:r.toString()}return r}function zb(e){e===void 0&&(e={});var r=Qu(e);function n(i,o){if(o.type!=="style")return i;for(var a in i)i[a]=zr(a,i[a],r);return i}function t(i,o){return zr(o,i,r)}return{onProcessStyle:n,onChangeValue:t}}var Or="",vo="",Zu="",ed="",jb=on&&"ontouchstart"in document.documentElement;if(on){var Ni={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Fb=document.createElement("p"),Mi=Fb.style,Bb="Transform";for(var Ai in Ni)if(Ai+Bb in Mi){Or=Ai,vo=Ni[Ai];break}Or==="Webkit"&&"msHyphens"in Mi&&(Or="ms",vo=Ni.ms,ed="edge"),Or==="Webkit"&&"-apple-trailing-word"in Mi&&(Zu="apple")}var le={js:Or,css:vo,vendor:Zu,browser:ed,isTouch:jb};function $b(e){return e[1]==="-"||le.js==="ms"?e:"@"+le.css+"keyframes"+e.substr(10)}var Gb={noPrefill:["appearance"],supportedProperty:function(r){return r!=="appearance"?!1:le.js==="ms"?"-webkit-"+r:le.css+r}},Wb={noPrefill:["color-adjust"],supportedProperty:function(r){return r!=="color-adjust"?!1:le.js==="Webkit"?le.css+"print-"+r:r}},Hb=/[-\s]+(.)?/g;function Ub(e,r){return r?r.toUpperCase():""}function aa(e){return e.replace(Hb,Ub)}function It(e){return aa("-"+e)}var qb={noPrefill:["mask"],supportedProperty:function(r,n){if(!/^mask/.test(r))return!1;if(le.js==="Webkit"){var t="mask-image";if(aa(t)in n)return r;if(le.js+It(t)in n)return le.css+r}return r}},Vb={noPrefill:["text-orientation"],supportedProperty:function(r){return r!=="text-orientation"?!1:le.vendor==="apple"&&!le.isTouch?le.css+r:r}},Kb={noPrefill:["transform"],supportedProperty:function(r,n,t){return r!=="transform"?!1:t.transform?r:le.css+r}},Yb={noPrefill:["transition"],supportedProperty:function(r,n,t){return r!=="transition"?!1:t.transition?r:le.css+r}},Jb={noPrefill:["writing-mode"],supportedProperty:function(r){return r!=="writing-mode"?!1:le.js==="Webkit"||le.js==="ms"&&le.browser!=="edge"?le.css+r:r}},Xb={noPrefill:["user-select"],supportedProperty:function(r){return r!=="user-select"?!1:le.js==="Moz"||le.js==="ms"||le.vendor==="apple"?le.css+r:r}},Qb={supportedProperty:function(r,n){if(!/^break-/.test(r))return!1;if(le.js==="Webkit"){var t="WebkitColumn"+It(r);return t in n?le.css+"column-"+r:!1}if(le.js==="Moz"){var i="page"+It(r);return i in n?"page-"+r:!1}return!1}},Zb={supportedProperty:function(r,n){if(!/^(border|margin|padding)-inline/.test(r))return!1;if(le.js==="Moz")return r;var t=r.replace("-inline","");return le.js+It(t)in n?le.css+t:!1}},ey={supportedProperty:function(r,n){return aa(r)in n?r:!1}},ty={supportedProperty:function(r,n){var t=It(r);return r[0]==="-"||r[0]==="-"&&r[1]==="-"?r:le.js+t in n?le.css+r:le.js!=="Webkit"&&"Webkit"+t in n?"-webkit-"+r:!1}},ry={supportedProperty:function(r){return r.substring(0,11)!=="scroll-snap"?!1:le.js==="ms"?""+le.css+r:r}},ny={supportedProperty:function(r){return r!=="overscroll-behavior"?!1:le.js==="ms"?le.css+"scroll-chaining":r}},iy={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},oy={supportedProperty:function(r,n){var t=iy[r];return t&&le.js+It(t)in n?le.css+t:!1}},td={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},ay=Object.keys(td),sy=function(r){return le.css+r},ly={supportedProperty:function(r,n,t){var i=t.multiple;if(ay.indexOf(r)>-1){var o=td[r];if(!Array.isArray(o))return le.js+It(o)in n?le.css+o:!1;if(!i)return!1;for(var a=0;a<o.length;a++)if(!(le.js+It(o[0])in n))return!1;return o.map(sy)}return!1}},rd=[Gb,Wb,qb,Vb,Kb,Yb,Jb,Xb,Qb,Zb,ey,ty,ry,ny,oy,ly],ul=rd.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),cy=rd.filter(function(e){return e.noPrefill}).reduce(function(e,r){return e.push.apply(e,uu(r.noPrefill)),e},[]),Er,Nt={};if(on){Er=document.createElement("p");var Li=window.getComputedStyle(document.documentElement,"");for(var zi in Li)isNaN(zi)||(Nt[Li[zi]]=Li[zi]);cy.forEach(function(e){return delete Nt[e]})}function mo(e,r){if(r===void 0&&(r={}),!Er)return e;if(Nt[e]!=null)return Nt[e];(e==="transition"||e==="transform")&&(r[e]=e in Er.style);for(var n=0;n<ul.length&&(Nt[e]=ul[n](e,Er.style,r),!Nt[e]);n++);try{Er.style[e]=""}catch{return!1}return Nt[e]}var Kt={},uy={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},dy=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,ht;function fy(e,r,n){if(r==="var")return"var";if(r==="all")return"all";if(n==="all")return", all";var t=r?mo(r):", "+mo(n);return t||r||n}on&&(ht=document.createElement("p"));function dl(e,r){var n=r;if(!ht||e==="content")return r;if(typeof n!="string"||!isNaN(parseInt(n,10)))return n;var t=e+n;if(Kt[t]!=null)return Kt[t];try{ht.style[e]=n}catch{return Kt[t]=!1,!1}if(uy[e])n=n.replace(dy,fy);else if(ht.style[e]===""&&(n=le.css+n,n==="-ms-flex"&&(ht.style[e]="-ms-flexbox"),ht.style[e]=n,ht.style[e]===""))return Kt[t]=!1,!1;return ht.style[e]="",Kt[t]=n,Kt[t]}function py(){function e(i){if(i.type==="keyframes"){var o=i;o.at=$b(o.at)}}function r(i){for(var o in i){var a=i[o];if(o==="fallbacks"&&Array.isArray(a)){i[o]=a.map(r);continue}var s=!1,l=mo(o);l&&l!==o&&(s=!0);var c=!1,u=dl(l,zt(a));u&&u!==a&&(c=!0),(s||c)&&(s&&delete i[o],i[l||o]=u||a)}return i}function n(i,o){return o.type!=="style"?i:r(i)}function t(i,o){return dl(o,zt(i))||i}return{onProcessRule:e,onProcessStyle:n,onChangeValue:t}}function hy(){var e=function(n,t){return n.length===t.length?n>t?1:-1:n.length-t.length};return{onProcessStyle:function(n,t){if(t.type!=="style")return n;for(var i={},o=Object.keys(n).sort(e),a=0;a<o.length;a++)i[o[a]]=n[o[a]];return i}}}function gy(){return{plugins:[Sb(),_b(),kb(),Mb(),zb(),typeof window>"u"?null:py(),hy()]}}var vy=Uu(gy()),my=xb(),by=new Map,yy={disableGeneration:!1,generateClassName:my,jss:vy,sheetsCache:null,sheetsManager:by,sheetsRegistry:null},xy=Q.createContext(yy),fl=-1e9;function Sy(){return fl+=1,fl}var wy={};function Cy(e){var r=typeof e=="function";return{create:function(t,i){var o;try{o=r?e(t):e}catch(l){throw l}if(!i||!t.overrides||!t.overrides[i])return o;var a=t.overrides[i],s=K({},o);return Object.keys(a).forEach(function(l){s[l]=Vu(s[l],a[l])}),s},options:{}}}function Iy(e,r,n){var t=e.state,i=e.stylesOptions;if(i.disableGeneration)return r||{};t.cacheClasses||(t.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return t.classes!==t.cacheClasses.lastJSS&&(t.cacheClasses.lastJSS=t.classes,o=!0),r!==t.cacheClasses.lastProp&&(t.cacheClasses.lastProp=r,o=!0),o&&(t.cacheClasses.value=Ku({baseClasses:t.cacheClasses.lastJSS,newClasses:r,Component:n})),t.cacheClasses.value}function Ry(e,r){var n=e.state,t=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var s=tr.get(i.sheetsManager,o,t);s||(s={refs:0,staticSheet:null,dynamicStyles:null},tr.set(i.sheetsManager,o,t,s));var l=K({},o.options,i,{theme:t,flip:typeof i.flip=="boolean"?i.flip:t.direction==="rtl"});l.generateId=l.serverGenerateClassName||l.generateClassName;var c=i.sheetsRegistry;if(s.refs===0){var u;i.sheetsCache&&(u=tr.get(i.sheetsCache,o,t));var d=o.create(t,a);u||(u=i.jss.createStyleSheet(d,K({link:!1},l)),u.attach(),i.sheetsCache&&tr.set(i.sheetsCache,o,t,u)),c&&c.add(u),s.staticSheet=u,s.dynamicStyles=qu(d)}if(s.dynamicStyles){var f=i.jss.createStyleSheet(s.dynamicStyles,K({link:!0},l));f.update(r),f.attach(),n.dynamicSheet=f,n.classes=Ku({baseClasses:s.staticSheet.classes,newClasses:f.classes}),c&&c.add(f)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Ty(e,r){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(r)}function _y(e){var r=e.state,n=e.theme,t=e.stylesOptions,i=e.stylesCreator;if(!t.disableGeneration){var o=tr.get(t.sheetsManager,i,n);o.refs-=1;var a=t.sheetsRegistry;o.refs===0&&(tr.delete(t.sheetsManager,i,n),t.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),r.dynamicSheet&&(t.jss.removeStyleSheet(r.dynamicSheet),a&&a.remove(r.dynamicSheet))}}function Dy(e,r){var n=Q.useRef([]),t,i=Q.useMemo(function(){return{}},r);n.current!==i&&(n.current=i,t=e()),Q.useEffect(function(){return function(){t&&t()}},[i])}function Py(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.name,t=r.classNamePrefix,i=r.Component,o=r.defaultTheme,a=o===void 0?wy:o,s=Zt(r,["name","classNamePrefix","Component","defaultTheme"]),l=Cy(e),c=n||t||"makeStyles";l.options={index:Sy(),name:n,meta:c,classNamePrefix:c};var u=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=vb()||a,h=K({},Q.useContext(xy),s),v=Q.useRef(),m=Q.useRef();Dy(function(){var y={name:n,state:{},stylesCreator:l,stylesOptions:h,theme:p};return Ry(y,f),m.current=!1,v.current=y,function(){_y(y)}},[p,l]),Q.useEffect(function(){m.current&&Ty(v.current,f),m.current=!0});var b=Iy(v.current,f.classes,i);return b};return u}const ky=Object.freeze(Object.defineProperty({__proto__:null,default:Py},Symbol.toStringTag,{value:"Module"})),Oy=Qn(ky);var Ey=_n.exports,pl;function Ny(){return pl||(pl=1,function(e,r){(function(n,t){e.exports=t()})(typeof self<"u"?self:Ey,function(){return function(n){function t(o){if(i[o])return i[o].exports;var a=i[o]={i:o,l:!1,exports:{}};return n[o].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var i={};return t.m=n,t.c=i,t.d=function(o,a,s){t.o(o,a)||Object.defineProperty(o,a,{configurable:!1,enumerable:!0,get:s})},t.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(a,"a",a),a},t.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},t.p="",t(t.s=3)}([function(n,t){n.exports=Ic()},function(n,t){n.exports=Rc()},function(n,t){n.exports=Oy},function(n,t,i){function o(u){return u&&u.__esModule?u:{default:u}}Object.defineProperty(t,"__esModule",{value:!0});var a=i(4),s=o(a),l=i(6),c=o(l);t.default={isVirtualized:!1,nodeContentRenderer:s.default,scaffoldBlockPxWidth:25,treeNodeRenderer:c.default}},function(n,t,i){function o(y){return y&&y.__esModule?y:{default:y}}function a(y,I){return!!y.children&&typeof y.children!="function"&&y.children.some(function(_){return _===I||a(_,I)})}function s(y){var I=y.scaffoldBlockPxWidth,_=y.connectDragPreview,P=y.connectDragSource,w=y.isDragging,D=y.canDrop,S=y.canDrag,T=y.node,R=y.title,O=y.draggedNode,L=y.path,M=y.treeIndex,H=y.isSearchMatch,E=y.isSearchFocus,B=y.icons,$=y.buttons,U=y.className,J=y.style,ee=y.didDrop,X=y.lowerSiblingCounts,Z=y.listIndex,q=y.swapFrom,ne=y.swapLength,ie=y.swapDepth,ue=y.onItemClick,G=b(),W=R||T.title,k=O&&a(O,T),N=!ee&&w,j=[];X.forEach(function(te,se){if(se>0&&(j.push(u.default.createElement("div",{className:G.lineBlock,key:"pre_"+(1+se),style:{width:I}})),M!==Z&&se===ie)){var pe="";pe=Z===q+ne-1?G.highlightBottomLeftCorner:M===q?G.highlightTopLeftCorner:G.highlightLineVertical,j.push(u.default.createElement("div",{className:G.absoluteLineBlock+" "+pe,key:"highlight_"+(1+se),style:{left:I*se,width:I}}))}});var V=u.default.createElement("div",{className:G.contentNode},_(u.default.createElement("div",{className:G.row+(T.active?" "+G.activeRow:"")+(N?" "+G.rowLandingPad:"")+(w?" "+G.rowLandingPadDisable:"")+(N&&!D?" "+G.rowCancelPad:"")+(H?" "+G.rowSearchMatch:"")+(E?" "+G.rowSearchFocus:"")+(S?"":" "+G.rowWrapperDragDisabled)+(U?" "+U:""),onClick:function(){return ue?ue(l({},T,{index:M})):null},style:l({opacity:k?.5:1},J)},T.type==="divider"?u.default.createElement("div",{className:G.divider}):u.default.createElement(c.Fragment,null,j,u.default.createElement("div",{className:G.rowIcon},B),u.default.createElement("div",{className:G.rowLabel},typeof W=="string"?u.default.createElement("span",{className:G.rowTitle},W):typeof W=="function"?W({node:T,path:L,treeIndex:M}):W),u.default.createElement("div",{className:G.rowToolbar},$)))));return S?P(V,{dropEffect:"copy"}):V}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(y){for(var I=1;I<arguments.length;I++){var _=arguments[I];for(var P in _)Object.prototype.hasOwnProperty.call(_,P)&&(y[P]=_[P])}return y},c=i(0),u=o(c),d=i(1),f=o(d),p=i(2),h=o(p),v=i(5),m=o(v),b=(0,h.default)(m.default,{name:"MuiNodeContent"});s.defaultProps={buttons:null,canDrag:!1,canDrop:!1,className:"",draggedNode:null,icons:null,isSearchFocus:!1,isSearchMatch:!1,parentNode:null,style:{},swapDepth:null,swapFrom:null,swapLength:null,title:null,toggleChildrenVisibility:null},s.propTypes={buttons:f.default.node,canDrag:f.default.bool,canDrop:f.default.bool,className:f.default.string,connectDragPreview:f.default.func.isRequired,connectDragSource:f.default.func.isRequired,didDrop:f.default.bool.isRequired,draggedNode:f.default.shape({}),icons:f.default.node,isDragging:f.default.bool.isRequired,isOver:f.default.bool.isRequired,isSearchFocus:f.default.bool,isSearchMatch:f.default.bool,listIndex:f.default.number.isRequired,lowerSiblingCounts:f.default.arrayOf(f.default.number).isRequired,node:f.default.shape({}).isRequired,parentNode:f.default.shape({}),path:f.default.arrayOf(f.default.oneOfType([f.default.string,f.default.number])).isRequired,rowDirection:f.default.string.isRequired,scaffoldBlockPxWidth:f.default.number.isRequired,style:f.default.shape({}),swapDepth:f.default.number,swapFrom:f.default.number,swapLength:f.default.number,title:f.default.oneOfType([f.default.func,f.default.node]),toggleChildrenVisibility:f.default.func,treeId:f.default.string.isRequired,treeIndex:f.default.number.isRequired},t.default=s},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{"@keyframes arrow-pulse":{"0%":{opacity:0,transform:"translate(0, 0)"},"100%":{opacity:0,transform:"translate(0, 1000%)"},"30%":{opacity:1,transform:"translate(0, 300%)"},"70%":{opacity:1,transform:"translate(0, 700%)"}},absoluteLineBlock:{position:"absolute",top:0},activeRow:{},collapseButton:{},contentNode:{width:"100%"},divider:{backgroundColor:"#D8D8D8",height:1,width:"100%"},expandButton:{},highlightBottomLeftCorner:{zIndex:3},highlightLineVertical:{zIndex:3},highlightTopLeftCorner:{},lineBlock:{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},lineChildren:{display:"inline-block",height:"100%"},nodeContent:{"& $collapseButton, & $expandButton":{"&::after":{border:"solid transparent 10px",borderLeftWidth:7,borderRightWidth:7,borderTopColor:"gray",content:'""',position:"absolute",transform:"translate3d(-50%, -20%, 0)",transformOrigin:"7px 4px"},"&:focus":{"&::after":{filter:"drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9)"},outline:"none"},"&:hover::after":{borderTopColor:"black"},appearance:"none",background:"transparent",border:"none",cursor:"pointer",height:30,padding:0,position:"absolute",top:"45%",transform:"translate3d(-50%, -50%, 0)",width:30,zIndex:2},"& $lineBlock, & $absoluteLineBlock":{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},"& $rowContents":{alignItems:"center",borderRadius:"3px",color:"#595959",display:"flex",height:"100%",justifyContent:"space-between",padding:10,position:"relative"}},row:{"& $rowIcon, & $rowLabel,& $rowToolbar":{alignItems:"center",display:"flex"},"& $rowLabel":{flex:1,overflow:"hidden",padding:"0px 6px"},"& $rowToolbar":{cursor:"pointer"},"&$activeRow":{backgroundColor:"#F3FBFF",color:"#1890FF"},"&$rowCancelPad":{"&::before":{backgroundColor:"#ffd2d6",border:"2px dotted #e6a8ad"}},"&$rowLandingPad":{"&::before":{backgroundColor:"#dddddd",border:"2px dotted #b5b5b5"}},"&$rowLandingPad, &$rowCancelPad":{"& *":{opacity:".6 !important"},"&::before":{bottom:0,content:'""',left:0,position:"absolute",right:0,top:0,zIndex:-1},backgroundColor:"transparent",border:"none",boxShadow:"none",outline:"none"},"&$rowLandingPadDisable":{"&:hover":{backgroundColor:"white"}},backgroundColor:"white",cursor:"grab",display:"flex",flex:1,padding:6,position:"relative"},rowCancelPad:{},rowContents:{},rowIcon:{color:"#D9D9D9"},rowLabel:{},rowLandingPad:{},rowLandingPadDisable:{},rowSearchFocus:{boxShadow:"inset 0 -7px 7px -3px #fc6421"},rowSearchMatch:{boxShadow:"inset 0 -7px 7px -3px #0080ff"},rowToolbar:{},rowWrapper:{"&:active":{backgroundColor:"transparent"},"&:hover":{backgroundColor:"#F3FBFF"},boxSizing:"border-box",cursor:"grab",display:"flex",height:"100%"},rowWrapperDragDisabled:{cursor:"default"}}}},function(n,t,i){function o(m){return m&&m.__esModule?m:{default:m}}function a(m){var b=m.children,y=m.listIndex,I=m.swapFrom,_=m.swapLength,P=m.swapDepth,w=m.lowerSiblingCounts,D=m.connectDropTarget,S=m.isOver,T=m.draggedNode,R=m.canDrop,O=v();return D(l.default.createElement("div",{className:O.node},s.Children.map(b,function(L){return(0,s.cloneElement)(L,{canDrop:R,draggedNode:T,isOver:S,listIndex:y,lowerSiblingCounts:w,swapDepth:P,swapFrom:I,swapLength:_})})))}Object.defineProperty(t,"__esModule",{value:!0});var s=i(0),l=o(s),c=i(1),u=o(c),d=i(2),f=o(d),p=i(7),h=o(p),v=(0,f.default)(h.default,{name:"MuiTreeNode"});a.defaultProps={canDrop:!1,draggedNode:null,swapDepth:null,swapFrom:null,swapLength:null},a.propTypes={canDrop:u.default.bool,children:u.default.node.isRequired,connectDropTarget:u.default.func.isRequired,draggedNode:u.default.shape({}),getPrevRow:u.default.func.isRequired,isOver:u.default.bool.isRequired,listIndex:u.default.number.isRequired,lowerSiblingCounts:u.default.arrayOf(u.default.number).isRequired,node:u.default.shape({}).isRequired,path:u.default.arrayOf(u.default.oneOfType([u.default.string,u.default.number])).isRequired,rowDirection:u.default.string.isRequired,scaffoldBlockPxWidth:u.default.number.isRequired,swapDepth:u.default.number,swapFrom:u.default.number,swapLength:u.default.number,treeId:u.default.string.isRequired,treeIndex:u.default.number.isRequired},t.default=a},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{node:{display:"flex"}}}}])})}(_n)),_n.exports}var My=Ny();const Ay=Zn(My);/**
33
+ */Uu();function Pi(e){return e&&sg(e)==="object"&&e.constructor===Object}function Vu(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},t=n.clone?K({},e):e;return Pi(e)&&Pi(r)&&Object.keys(r).forEach(function(i){i!=="__proto__"&&(Pi(r[i])&&i in e?t[i]=Vu(e[i],r[i],n):t[i]=r[i])}),t}function Ku(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.baseClasses,n=e.newClasses;if(e.Component,!n)return r;var t=K({},r);return Object.keys(n).forEach(function(i){n[i]&&(t[i]="".concat(r[i]," ").concat(n[i]))}),t}var tr={set:function(r,n,t,i){var o=r.get(n);o||(o=new Map,r.set(n,o)),o.set(t,i)},get:function(r,n,t){var i=r.get(n);return i?i.get(t):void 0},delete:function(r,n,t){var i=r.get(n);i.delete(t)}},gb=Q.createContext(null);function vb(){var e=Q.useContext(gb);return e}var mb=typeof Symbol=="function"&&Symbol.for;const bb=mb?Symbol.for("mui.nested"):"__THEME_NESTED__";var yb=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function xb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.disableGlobal,n=r===void 0?!1:r,t=e.productionPrefix,i=t===void 0?"jss":t,o=e.seed,a=o===void 0?"":o,s=a===""?"":"".concat(a,"-"),l=0,c=function(){return l+=1,l};return function(u,d){var f=d.options.name;if(f&&f.indexOf("Mui")===0&&!d.options.link&&!n){if(yb.indexOf(u.key)!==-1)return"Mui-".concat(u.key);var p="".concat(s).concat(f,"-").concat(u.key);return!d.options.theme[bb]||a!==""?p:"".concat(p,"-").concat(c())}return"".concat(s).concat(i).concat(c())}}var Yu=Date.now(),ki="fnValues"+Yu,Oi="fnStyle"+ ++Yu,Sb=function(){return{onCreateRule:function(n,t,i){if(typeof t!="function")return null;var o=na(n,{},i);return o[Oi]=t,o},onProcessStyle:function(n,t){if(ki in t||Oi in t)return n;var i={};for(var o in n){var a=n[o];typeof a=="function"&&(delete n[o],i[o]=a)}return t[ki]=i,n},onUpdate:function(n,t,i,o){var a=t,s=a[Oi];s&&(a.style=s(n)||{});var l=a[ki];if(l)for(var c in l)a.prop(c,l[c](n),o)}}},yt="@global",go="@global ",wb=function(){function e(n,t,i){this.type="global",this.at=yt,this.isProcessed=!1,this.key=n,this.options=i,this.rules=new li(K({},i,{parent:this}));for(var o in t)this.rules.add(o,t[o]);this.rules.process()}var r=e.prototype;return r.getRule=function(t){return this.rules.get(t)},r.addRule=function(t,i,o){var a=this.rules.add(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},r.replaceRule=function(t,i,o){var a=this.rules.replace(t,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},r.indexOf=function(t){return this.rules.indexOf(t)},r.toString=function(t){return this.rules.toString(t)},e}(),Cb=function(){function e(n,t,i){this.type="global",this.at=yt,this.isProcessed=!1,this.key=n,this.options=i;var o=n.substr(go.length);this.rule=i.jss.createRule(o,t,K({},i,{parent:this}))}var r=e.prototype;return r.toString=function(t){return this.rule?this.rule.toString(t):""},e}(),Ib=/\s*,\s*/g;function Ju(e,r){for(var n=e.split(Ib),t="",i=0;i<n.length;i++)t+=r+" "+n[i].trim(),n[i+1]&&(t+=", ");return t}function Rb(e,r){var n=e.options,t=e.style,i=t?t[yt]:null;if(i){for(var o in i)r.addRule(o,i[o],K({},n,{selector:Ju(o,e.selector)}));delete t[yt]}}function Tb(e,r){var n=e.options,t=e.style;for(var i in t)if(!(i[0]!=="@"||i.substr(0,yt.length)!==yt)){var o=Ju(i.substr(yt.length),e.selector);r.addRule(o,t[i],K({},n,{selector:o})),delete t[i]}}function _b(){function e(n,t,i){if(!n)return null;if(n===yt)return new wb(n,t,i);if(n[0]==="@"&&n.substr(0,go.length)===go)return new Cb(n,t,i);var o=i.parent;return o&&(o.type==="global"||o.options.parent&&o.options.parent.type==="global")&&(i.scoped=!1),!i.selector&&i.scoped===!1&&(i.selector=n),null}function r(n,t){n.type!=="style"||!t||(Rb(n,t),Tb(n,t))}return{onCreateRule:e,onProcessRule:r}}var cl=/\s*,\s*/g,Db=/&/g,Pb=/\$([\w-]+)/g;function kb(){function e(i,o){return function(a,s){var l=i.getRule(s)||o&&o.getRule(s);return l?l.selector:s}}function r(i,o){for(var a=o.split(cl),s=i.split(cl),l="",c=0;c<a.length;c++)for(var u=a[c],d=0;d<s.length;d++){var f=s[d];l&&(l+=", "),l+=f.indexOf("&")!==-1?f.replace(Db,u):u+" "+f}return l}function n(i,o,a){if(a)return K({},a,{index:a.index+1});var s=i.options.nestingLevel;s=s===void 0?1:s+1;var l=K({},i.options,{nestingLevel:s,index:o.indexOf(i)+1});return delete l.name,l}function t(i,o,a){if(o.type!=="style")return i;var s=o,l=s.options.parent,c,u;for(var d in i){var f=d.indexOf("&")!==-1,p=d[0]==="@";if(!(!f&&!p)){if(c=n(s,l,c),f){var h=r(d,s.selector);u||(u=e(l,a)),h=h.replace(Pb,u);var v=s.key+"-"+d;"replaceRule"in l?l.replaceRule(v,i[d],K({},c,{selector:h})):l.addRule(v,i[d],K({},c,{selector:h}))}else p&&l.addRule(d,{},c).addRule(s.key,i[d],{selector:s.selector});delete i[d]}}return i}return{onProcessStyle:t}}var Ob=/[A-Z]/g,Eb=/^ms-/,Ei={};function Nb(e){return"-"+e.toLowerCase()}function Xu(e){if(Ei.hasOwnProperty(e))return Ei[e];var r=e.replace(Ob,Nb);return Ei[e]=Eb.test(r)?"-"+r:r}function $n(e){var r={};for(var n in e){var t=n.indexOf("--")===0?n:Xu(n);r[t]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?r.fallbacks=e.fallbacks.map($n):r.fallbacks=$n(e.fallbacks)),r}function Mb(){function e(n){if(Array.isArray(n)){for(var t=0;t<n.length;t++)n[t]=$n(n[t]);return n}return $n(n)}function r(n,t,i){if(t.indexOf("--")===0)return n;var o=Xu(t);return t===o?n:(i.prop(o,n),null)}return{onProcessStyle:e,onChangeValue:r}}var z=oa&&CSS?CSS.px:"px",gn=oa&&CSS?CSS.ms:"ms",Vt=oa&&CSS?CSS.percent:"%",Ab={"animation-delay":gn,"animation-duration":gn,"background-position":z,"background-position-x":z,"background-position-y":z,"background-size":z,border:z,"border-bottom":z,"border-bottom-left-radius":z,"border-bottom-right-radius":z,"border-bottom-width":z,"border-left":z,"border-left-width":z,"border-radius":z,"border-right":z,"border-right-width":z,"border-top":z,"border-top-left-radius":z,"border-top-right-radius":z,"border-top-width":z,"border-width":z,"border-block":z,"border-block-end":z,"border-block-end-width":z,"border-block-start":z,"border-block-start-width":z,"border-block-width":z,"border-inline":z,"border-inline-end":z,"border-inline-end-width":z,"border-inline-start":z,"border-inline-start-width":z,"border-inline-width":z,"border-start-start-radius":z,"border-start-end-radius":z,"border-end-start-radius":z,"border-end-end-radius":z,margin:z,"margin-bottom":z,"margin-left":z,"margin-right":z,"margin-top":z,"margin-block":z,"margin-block-end":z,"margin-block-start":z,"margin-inline":z,"margin-inline-end":z,"margin-inline-start":z,padding:z,"padding-bottom":z,"padding-left":z,"padding-right":z,"padding-top":z,"padding-block":z,"padding-block-end":z,"padding-block-start":z,"padding-inline":z,"padding-inline-end":z,"padding-inline-start":z,"mask-position-x":z,"mask-position-y":z,"mask-size":z,height:z,width:z,"min-height":z,"max-height":z,"min-width":z,"max-width":z,bottom:z,left:z,top:z,right:z,inset:z,"inset-block":z,"inset-block-end":z,"inset-block-start":z,"inset-inline":z,"inset-inline-end":z,"inset-inline-start":z,"box-shadow":z,"text-shadow":z,"column-gap":z,"column-rule":z,"column-rule-width":z,"column-width":z,"font-size":z,"font-size-delta":z,"letter-spacing":z,"text-decoration-thickness":z,"text-indent":z,"text-stroke":z,"text-stroke-width":z,"word-spacing":z,motion:z,"motion-offset":z,outline:z,"outline-offset":z,"outline-width":z,perspective:z,"perspective-origin-x":Vt,"perspective-origin-y":Vt,"transform-origin":Vt,"transform-origin-x":Vt,"transform-origin-y":Vt,"transform-origin-z":Vt,"transition-delay":gn,"transition-duration":gn,"vertical-align":z,"flex-basis":z,"shape-margin":z,size:z,gap:z,grid:z,"grid-gap":z,"row-gap":z,"grid-row-gap":z,"grid-column-gap":z,"grid-template-rows":z,"grid-template-columns":z,"grid-auto-rows":z,"grid-auto-columns":z,"box-shadow-x":z,"box-shadow-y":z,"box-shadow-blur":z,"box-shadow-spread":z,"font-line-height":z,"text-shadow-x":z,"text-shadow-y":z,"text-shadow-blur":z};function Qu(e){var r=/(-[a-z])/g,n=function(a){return a[1].toUpperCase()},t={};for(var i in e)t[i]=e[i],t[i.replace(r,n)]=e[i];return t}var Lb=Qu(Ab);function zr(e,r,n){if(r==null)return r;if(Array.isArray(r))for(var t=0;t<r.length;t++)r[t]=zr(e,r[t],n);else if(typeof r=="object")if(e==="fallbacks")for(var i in r)r[i]=zr(i,r[i],n);else for(var o in r)r[o]=zr(e+"-"+o,r[o],n);else if(typeof r=="number"&&isNaN(r)===!1){var a=n[e]||Lb[e];return a&&!(r===0&&a===z)?typeof a=="function"?a(r).toString():""+r+a:r.toString()}return r}function zb(e){e===void 0&&(e={});var r=Qu(e);function n(i,o){if(o.type!=="style")return i;for(var a in i)i[a]=zr(a,i[a],r);return i}function t(i,o){return zr(o,i,r)}return{onProcessStyle:n,onChangeValue:t}}var kr="",vo="",Zu="",ed="",jb=on&&"ontouchstart"in document.documentElement;if(on){var Ni={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Fb=document.createElement("p"),Mi=Fb.style,Bb="Transform";for(var Ai in Ni)if(Ai+Bb in Mi){kr=Ai,vo=Ni[Ai];break}kr==="Webkit"&&"msHyphens"in Mi&&(kr="ms",vo=Ni.ms,ed="edge"),kr==="Webkit"&&"-apple-trailing-word"in Mi&&(Zu="apple")}var le={js:kr,css:vo,vendor:Zu,browser:ed,isTouch:jb};function $b(e){return e[1]==="-"||le.js==="ms"?e:"@"+le.css+"keyframes"+e.substr(10)}var Gb={noPrefill:["appearance"],supportedProperty:function(r){return r!=="appearance"?!1:le.js==="ms"?"-webkit-"+r:le.css+r}},Wb={noPrefill:["color-adjust"],supportedProperty:function(r){return r!=="color-adjust"?!1:le.js==="Webkit"?le.css+"print-"+r:r}},Hb=/[-\s]+(.)?/g;function Ub(e,r){return r?r.toUpperCase():""}function aa(e){return e.replace(Hb,Ub)}function It(e){return aa("-"+e)}var qb={noPrefill:["mask"],supportedProperty:function(r,n){if(!/^mask/.test(r))return!1;if(le.js==="Webkit"){var t="mask-image";if(aa(t)in n)return r;if(le.js+It(t)in n)return le.css+r}return r}},Vb={noPrefill:["text-orientation"],supportedProperty:function(r){return r!=="text-orientation"?!1:le.vendor==="apple"&&!le.isTouch?le.css+r:r}},Kb={noPrefill:["transform"],supportedProperty:function(r,n,t){return r!=="transform"?!1:t.transform?r:le.css+r}},Yb={noPrefill:["transition"],supportedProperty:function(r,n,t){return r!=="transition"?!1:t.transition?r:le.css+r}},Jb={noPrefill:["writing-mode"],supportedProperty:function(r){return r!=="writing-mode"?!1:le.js==="Webkit"||le.js==="ms"&&le.browser!=="edge"?le.css+r:r}},Xb={noPrefill:["user-select"],supportedProperty:function(r){return r!=="user-select"?!1:le.js==="Moz"||le.js==="ms"||le.vendor==="apple"?le.css+r:r}},Qb={supportedProperty:function(r,n){if(!/^break-/.test(r))return!1;if(le.js==="Webkit"){var t="WebkitColumn"+It(r);return t in n?le.css+"column-"+r:!1}if(le.js==="Moz"){var i="page"+It(r);return i in n?"page-"+r:!1}return!1}},Zb={supportedProperty:function(r,n){if(!/^(border|margin|padding)-inline/.test(r))return!1;if(le.js==="Moz")return r;var t=r.replace("-inline","");return le.js+It(t)in n?le.css+t:!1}},ey={supportedProperty:function(r,n){return aa(r)in n?r:!1}},ty={supportedProperty:function(r,n){var t=It(r);return r[0]==="-"||r[0]==="-"&&r[1]==="-"?r:le.js+t in n?le.css+r:le.js!=="Webkit"&&"Webkit"+t in n?"-webkit-"+r:!1}},ry={supportedProperty:function(r){return r.substring(0,11)!=="scroll-snap"?!1:le.js==="ms"?""+le.css+r:r}},ny={supportedProperty:function(r){return r!=="overscroll-behavior"?!1:le.js==="ms"?le.css+"scroll-chaining":r}},iy={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},oy={supportedProperty:function(r,n){var t=iy[r];return t&&le.js+It(t)in n?le.css+t:!1}},td={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},ay=Object.keys(td),sy=function(r){return le.css+r},ly={supportedProperty:function(r,n,t){var i=t.multiple;if(ay.indexOf(r)>-1){var o=td[r];if(!Array.isArray(o))return le.js+It(o)in n?le.css+o:!1;if(!i)return!1;for(var a=0;a<o.length;a++)if(!(le.js+It(o[0])in n))return!1;return o.map(sy)}return!1}},rd=[Gb,Wb,qb,Vb,Kb,Yb,Jb,Xb,Qb,Zb,ey,ty,ry,ny,oy,ly],ul=rd.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),cy=rd.filter(function(e){return e.noPrefill}).reduce(function(e,r){return e.push.apply(e,uu(r.noPrefill)),e},[]),Or,Nt={};if(on){Or=document.createElement("p");var Li=window.getComputedStyle(document.documentElement,"");for(var zi in Li)isNaN(zi)||(Nt[Li[zi]]=Li[zi]);cy.forEach(function(e){return delete Nt[e]})}function mo(e,r){if(r===void 0&&(r={}),!Or)return e;if(Nt[e]!=null)return Nt[e];(e==="transition"||e==="transform")&&(r[e]=e in Or.style);for(var n=0;n<ul.length&&(Nt[e]=ul[n](e,Or.style,r),!Nt[e]);n++);try{Or.style[e]=""}catch{return!1}return Nt[e]}var Kt={},uy={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},dy=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,ht;function fy(e,r,n){if(r==="var")return"var";if(r==="all")return"all";if(n==="all")return", all";var t=r?mo(r):", "+mo(n);return t||r||n}on&&(ht=document.createElement("p"));function dl(e,r){var n=r;if(!ht||e==="content")return r;if(typeof n!="string"||!isNaN(parseInt(n,10)))return n;var t=e+n;if(Kt[t]!=null)return Kt[t];try{ht.style[e]=n}catch{return Kt[t]=!1,!1}if(uy[e])n=n.replace(dy,fy);else if(ht.style[e]===""&&(n=le.css+n,n==="-ms-flex"&&(ht.style[e]="-ms-flexbox"),ht.style[e]=n,ht.style[e]===""))return Kt[t]=!1,!1;return ht.style[e]="",Kt[t]=n,Kt[t]}function py(){function e(i){if(i.type==="keyframes"){var o=i;o.at=$b(o.at)}}function r(i){for(var o in i){var a=i[o];if(o==="fallbacks"&&Array.isArray(a)){i[o]=a.map(r);continue}var s=!1,l=mo(o);l&&l!==o&&(s=!0);var c=!1,u=dl(l,zt(a));u&&u!==a&&(c=!0),(s||c)&&(s&&delete i[o],i[l||o]=u||a)}return i}function n(i,o){return o.type!=="style"?i:r(i)}function t(i,o){return dl(o,zt(i))||i}return{onProcessRule:e,onProcessStyle:n,onChangeValue:t}}function hy(){var e=function(n,t){return n.length===t.length?n>t?1:-1:n.length-t.length};return{onProcessStyle:function(n,t){if(t.type!=="style")return n;for(var i={},o=Object.keys(n).sort(e),a=0;a<o.length;a++)i[o[a]]=n[o[a]];return i}}}function gy(){return{plugins:[Sb(),_b(),kb(),Mb(),zb(),typeof window>"u"?null:py(),hy()]}}var vy=Uu(gy()),my=xb(),by=new Map,yy={disableGeneration:!1,generateClassName:my,jss:vy,sheetsCache:null,sheetsManager:by,sheetsRegistry:null},xy=Q.createContext(yy),fl=-1e9;function Sy(){return fl+=1,fl}var wy={};function Cy(e){var r=typeof e=="function";return{create:function(t,i){var o;try{o=r?e(t):e}catch(l){throw l}if(!i||!t.overrides||!t.overrides[i])return o;var a=t.overrides[i],s=K({},o);return Object.keys(a).forEach(function(l){s[l]=Vu(s[l],a[l])}),s},options:{}}}function Iy(e,r,n){var t=e.state,i=e.stylesOptions;if(i.disableGeneration)return r||{};t.cacheClasses||(t.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return t.classes!==t.cacheClasses.lastJSS&&(t.cacheClasses.lastJSS=t.classes,o=!0),r!==t.cacheClasses.lastProp&&(t.cacheClasses.lastProp=r,o=!0),o&&(t.cacheClasses.value=Ku({baseClasses:t.cacheClasses.lastJSS,newClasses:r,Component:n})),t.cacheClasses.value}function Ry(e,r){var n=e.state,t=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var s=tr.get(i.sheetsManager,o,t);s||(s={refs:0,staticSheet:null,dynamicStyles:null},tr.set(i.sheetsManager,o,t,s));var l=K({},o.options,i,{theme:t,flip:typeof i.flip=="boolean"?i.flip:t.direction==="rtl"});l.generateId=l.serverGenerateClassName||l.generateClassName;var c=i.sheetsRegistry;if(s.refs===0){var u;i.sheetsCache&&(u=tr.get(i.sheetsCache,o,t));var d=o.create(t,a);u||(u=i.jss.createStyleSheet(d,K({link:!1},l)),u.attach(),i.sheetsCache&&tr.set(i.sheetsCache,o,t,u)),c&&c.add(u),s.staticSheet=u,s.dynamicStyles=qu(d)}if(s.dynamicStyles){var f=i.jss.createStyleSheet(s.dynamicStyles,K({link:!0},l));f.update(r),f.attach(),n.dynamicSheet=f,n.classes=Ku({baseClasses:s.staticSheet.classes,newClasses:f.classes}),c&&c.add(f)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Ty(e,r){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(r)}function _y(e){var r=e.state,n=e.theme,t=e.stylesOptions,i=e.stylesCreator;if(!t.disableGeneration){var o=tr.get(t.sheetsManager,i,n);o.refs-=1;var a=t.sheetsRegistry;o.refs===0&&(tr.delete(t.sheetsManager,i,n),t.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),r.dynamicSheet&&(t.jss.removeStyleSheet(r.dynamicSheet),a&&a.remove(r.dynamicSheet))}}function Dy(e,r){var n=Q.useRef([]),t,i=Q.useMemo(function(){return{}},r);n.current!==i&&(n.current=i,t=e()),Q.useEffect(function(){return function(){t&&t()}},[i])}function Py(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.name,t=r.classNamePrefix,i=r.Component,o=r.defaultTheme,a=o===void 0?wy:o,s=Zt(r,["name","classNamePrefix","Component","defaultTheme"]),l=Cy(e),c=n||t||"makeStyles";l.options={index:Sy(),name:n,meta:c,classNamePrefix:c};var u=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=vb()||a,h=K({},Q.useContext(xy),s),v=Q.useRef(),m=Q.useRef();Dy(function(){var b={name:n,state:{},stylesCreator:l,stylesOptions:h,theme:p};return Ry(b,f),m.current=!1,v.current=b,function(){_y(b)}},[p,l]),Q.useEffect(function(){m.current&&Ty(v.current,f),m.current=!0});var y=Iy(v.current,f.classes,i);return y};return u}const ky=Object.freeze(Object.defineProperty({__proto__:null,default:Py},Symbol.toStringTag,{value:"Module"})),Oy=Qn(ky);var Ey=_n.exports,pl;function Ny(){return pl||(pl=1,function(e,r){(function(n,t){e.exports=t()})(typeof self<"u"?self:Ey,function(){return function(n){function t(o){if(i[o])return i[o].exports;var a=i[o]={i:o,l:!1,exports:{}};return n[o].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var i={};return t.m=n,t.c=i,t.d=function(o,a,s){t.o(o,a)||Object.defineProperty(o,a,{configurable:!1,enumerable:!0,get:s})},t.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(a,"a",a),a},t.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},t.p="",t(t.s=3)}([function(n,t){n.exports=Ic()},function(n,t){n.exports=Rc()},function(n,t){n.exports=Oy},function(n,t,i){function o(u){return u&&u.__esModule?u:{default:u}}Object.defineProperty(t,"__esModule",{value:!0});var a=i(4),s=o(a),l=i(6),c=o(l);t.default={isVirtualized:!1,nodeContentRenderer:s.default,scaffoldBlockPxWidth:25,treeNodeRenderer:c.default}},function(n,t,i){function o(b){return b&&b.__esModule?b:{default:b}}function a(b,I){return!!b.children&&typeof b.children!="function"&&b.children.some(function(_){return _===I||a(_,I)})}function s(b){var I=b.scaffoldBlockPxWidth,_=b.connectDragPreview,P=b.connectDragSource,w=b.isDragging,D=b.canDrop,S=b.canDrag,T=b.node,R=b.title,O=b.draggedNode,L=b.path,M=b.treeIndex,H=b.isSearchMatch,E=b.isSearchFocus,B=b.icons,$=b.buttons,U=b.className,J=b.style,ee=b.didDrop,X=b.lowerSiblingCounts,Z=b.listIndex,q=b.swapFrom,ne=b.swapLength,ie=b.swapDepth,ue=b.onItemClick,G=y(),W=R||T.title,k=O&&a(O,T),N=!ee&&w,j=[];X.forEach(function(te,se){if(se>0&&(j.push(u.default.createElement("div",{className:G.lineBlock,key:"pre_"+(1+se),style:{width:I}})),M!==Z&&se===ie)){var pe="";pe=Z===q+ne-1?G.highlightBottomLeftCorner:M===q?G.highlightTopLeftCorner:G.highlightLineVertical,j.push(u.default.createElement("div",{className:G.absoluteLineBlock+" "+pe,key:"highlight_"+(1+se),style:{left:I*se,width:I}}))}});var V=u.default.createElement("div",{className:G.contentNode},_(u.default.createElement("div",{className:G.row+(T.active?" "+G.activeRow:"")+(N?" "+G.rowLandingPad:"")+(w?" "+G.rowLandingPadDisable:"")+(N&&!D?" "+G.rowCancelPad:"")+(H?" "+G.rowSearchMatch:"")+(E?" "+G.rowSearchFocus:"")+(S?"":" "+G.rowWrapperDragDisabled)+(U?" "+U:""),onClick:function(){return ue?ue(l({},T,{index:M})):null},style:l({opacity:k?.5:1},J)},T.type==="divider"?u.default.createElement("div",{className:G.divider}):u.default.createElement(c.Fragment,null,j,u.default.createElement("div",{className:G.rowIcon},B),u.default.createElement("div",{className:G.rowLabel},typeof W=="string"?u.default.createElement("span",{className:G.rowTitle},W):typeof W=="function"?W({node:T,path:L,treeIndex:M}):W),u.default.createElement("div",{className:G.rowToolbar},$)))));return S?P(V,{dropEffect:"copy"}):V}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(b){for(var I=1;I<arguments.length;I++){var _=arguments[I];for(var P in _)Object.prototype.hasOwnProperty.call(_,P)&&(b[P]=_[P])}return b},c=i(0),u=o(c),d=i(1),f=o(d),p=i(2),h=o(p),v=i(5),m=o(v),y=(0,h.default)(m.default,{name:"MuiNodeContent"});s.defaultProps={buttons:null,canDrag:!1,canDrop:!1,className:"",draggedNode:null,icons:null,isSearchFocus:!1,isSearchMatch:!1,parentNode:null,style:{},swapDepth:null,swapFrom:null,swapLength:null,title:null,toggleChildrenVisibility:null},s.propTypes={buttons:f.default.node,canDrag:f.default.bool,canDrop:f.default.bool,className:f.default.string,connectDragPreview:f.default.func.isRequired,connectDragSource:f.default.func.isRequired,didDrop:f.default.bool.isRequired,draggedNode:f.default.shape({}),icons:f.default.node,isDragging:f.default.bool.isRequired,isOver:f.default.bool.isRequired,isSearchFocus:f.default.bool,isSearchMatch:f.default.bool,listIndex:f.default.number.isRequired,lowerSiblingCounts:f.default.arrayOf(f.default.number).isRequired,node:f.default.shape({}).isRequired,parentNode:f.default.shape({}),path:f.default.arrayOf(f.default.oneOfType([f.default.string,f.default.number])).isRequired,rowDirection:f.default.string.isRequired,scaffoldBlockPxWidth:f.default.number.isRequired,style:f.default.shape({}),swapDepth:f.default.number,swapFrom:f.default.number,swapLength:f.default.number,title:f.default.oneOfType([f.default.func,f.default.node]),toggleChildrenVisibility:f.default.func,treeId:f.default.string.isRequired,treeIndex:f.default.number.isRequired},t.default=s},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{"@keyframes arrow-pulse":{"0%":{opacity:0,transform:"translate(0, 0)"},"100%":{opacity:0,transform:"translate(0, 1000%)"},"30%":{opacity:1,transform:"translate(0, 300%)"},"70%":{opacity:1,transform:"translate(0, 700%)"}},absoluteLineBlock:{position:"absolute",top:0},activeRow:{},collapseButton:{},contentNode:{width:"100%"},divider:{backgroundColor:"#D8D8D8",height:1,width:"100%"},expandButton:{},highlightBottomLeftCorner:{zIndex:3},highlightLineVertical:{zIndex:3},highlightTopLeftCorner:{},lineBlock:{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},lineChildren:{display:"inline-block",height:"100%"},nodeContent:{"& $collapseButton, & $expandButton":{"&::after":{border:"solid transparent 10px",borderLeftWidth:7,borderRightWidth:7,borderTopColor:"gray",content:'""',position:"absolute",transform:"translate3d(-50%, -20%, 0)",transformOrigin:"7px 4px"},"&:focus":{"&::after":{filter:"drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9)"},outline:"none"},"&:hover::after":{borderTopColor:"black"},appearance:"none",background:"transparent",border:"none",cursor:"pointer",height:30,padding:0,position:"absolute",top:"45%",transform:"translate3d(-50%, -50%, 0)",width:30,zIndex:2},"& $lineBlock, & $absoluteLineBlock":{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},"& $rowContents":{alignItems:"center",borderRadius:"3px",color:"#595959",display:"flex",height:"100%",justifyContent:"space-between",padding:10,position:"relative"}},row:{"& $rowIcon, & $rowLabel,& $rowToolbar":{alignItems:"center",display:"flex"},"& $rowLabel":{flex:1,overflow:"hidden",padding:"0px 6px"},"& $rowToolbar":{cursor:"pointer"},"&$activeRow":{backgroundColor:"#F3FBFF",color:"#1890FF"},"&$rowCancelPad":{"&::before":{backgroundColor:"#ffd2d6",border:"2px dotted #e6a8ad"}},"&$rowLandingPad":{"&::before":{backgroundColor:"#dddddd",border:"2px dotted #b5b5b5"}},"&$rowLandingPad, &$rowCancelPad":{"& *":{opacity:".6 !important"},"&::before":{bottom:0,content:'""',left:0,position:"absolute",right:0,top:0,zIndex:-1},backgroundColor:"transparent",border:"none",boxShadow:"none",outline:"none"},"&$rowLandingPadDisable":{"&:hover":{backgroundColor:"white"}},backgroundColor:"white",cursor:"grab",display:"flex",flex:1,padding:6,position:"relative"},rowCancelPad:{},rowContents:{},rowIcon:{color:"#D9D9D9"},rowLabel:{},rowLandingPad:{},rowLandingPadDisable:{},rowSearchFocus:{boxShadow:"inset 0 -7px 7px -3px #fc6421"},rowSearchMatch:{boxShadow:"inset 0 -7px 7px -3px #0080ff"},rowToolbar:{},rowWrapper:{"&:active":{backgroundColor:"transparent"},"&:hover":{backgroundColor:"#F3FBFF"},boxSizing:"border-box",cursor:"grab",display:"flex",height:"100%"},rowWrapperDragDisabled:{cursor:"default"}}}},function(n,t,i){function o(m){return m&&m.__esModule?m:{default:m}}function a(m){var y=m.children,b=m.listIndex,I=m.swapFrom,_=m.swapLength,P=m.swapDepth,w=m.lowerSiblingCounts,D=m.connectDropTarget,S=m.isOver,T=m.draggedNode,R=m.canDrop,O=v();return D(l.default.createElement("div",{className:O.node},s.Children.map(y,function(L){return(0,s.cloneElement)(L,{canDrop:R,draggedNode:T,isOver:S,listIndex:b,lowerSiblingCounts:w,swapDepth:P,swapFrom:I,swapLength:_})})))}Object.defineProperty(t,"__esModule",{value:!0});var s=i(0),l=o(s),c=i(1),u=o(c),d=i(2),f=o(d),p=i(7),h=o(p),v=(0,f.default)(h.default,{name:"MuiTreeNode"});a.defaultProps={canDrop:!1,draggedNode:null,swapDepth:null,swapFrom:null,swapLength:null},a.propTypes={canDrop:u.default.bool,children:u.default.node.isRequired,connectDropTarget:u.default.func.isRequired,draggedNode:u.default.shape({}),getPrevRow:u.default.func.isRequired,isOver:u.default.bool.isRequired,listIndex:u.default.number.isRequired,lowerSiblingCounts:u.default.arrayOf(u.default.number).isRequired,node:u.default.shape({}).isRequired,path:u.default.arrayOf(u.default.oneOfType([u.default.string,u.default.number])).isRequired,rowDirection:u.default.string.isRequired,scaffoldBlockPxWidth:u.default.number.isRequired,swapDepth:u.default.number,swapFrom:u.default.number,swapLength:u.default.number,treeId:u.default.string.isRequired,treeIndex:u.default.number.isRequired},t.default=a},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{node:{display:"flex"}}}}])})}(_n)),_n.exports}var My=Ny();const Ay=Zn(My);/**
34
34
  * (c) Iconify
35
35
  *
36
36
  * For the full copyright and license information, please view the license.txt
@@ -40,7 +40,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
40
40
  *
41
41
  * @license MIT
42
42
  * @version 1.0.8
43
- */const nd=Object.freeze({left:0,top:0,width:16,height:16}),Gn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),an=Object.freeze({...nd,...Gn}),bo=Object.freeze({...an,body:"",hidden:!1}),Ly=Object.freeze({width:null,height:null}),id=Object.freeze({...Ly,...Gn});function zy(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function t(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:t(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?t(o):0)}}return r}const jy=/[\s,]+/;function Fy(e,r){r.split(jy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const od={...id,preserveAspectRatio:""};function hl(e){const r={...od},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=zy(n("rotate","")),Fy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function By(e,r){for(const n in od)if(e[n]!==r[n])return!0;return!1}const jr=/^[a-z0-9]+(-[a-z0-9]+)*$/,sn=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:t,prefix:l,name:s};return r&&!Dn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Dn(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!Dn(s,n)?null:s}return null},Dn=(e,r)=>e?!!((e.provider===""||e.provider.match(jr))&&(r&&e.prefix===""||e.prefix.match(jr))&&e.name.match(jr)):!1;function $y(e,r){const n={};!e.hFlip!=!r.hFlip&&(n.hFlip=!0),!e.vFlip!=!r.vFlip&&(n.vFlip=!0);const t=((e.rotate||0)+(r.rotate||0))%4;return t&&(n.rotate=t),n}function gl(e,r){const n=$y(e,r);for(const t in bo)t in Gn?t in e&&!(t in n)&&(n[t]=Gn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Gy(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=t[a]&&t[a].parent,l=s&&o(s);l&&(i[a]=[s].concat(l))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function Wy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=gl(t[s]||i[s],o)}return a(r),n.forEach(a),gl(e,o)}function ad(e,r){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{r(i,null),n.push(i)});const t=Gy(e);for(const i in t){const o=t[i];o&&(r(i,Wy(e,i,o)),n.push(i))}return n}const Hy={provider:"",aliases:{},not_found:{},...nd};function ji(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function sd(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!ji(e,Hy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(jr)||typeof o.body!="string"||!ji(o,bo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(jr)||typeof a!="string"||!n[a]&&!t[a]||!ji(o,bo))return null}return r}const Wn=Object.create(null);function Uy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function Rt(e,r){const n=Wn[e]||(Wn[e]=Object.create(null));return n[r]||(n[r]=Uy(e,r))}function sa(e,r){return sd(r)?ad(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function qy(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function Vy(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Wn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Wn[i]||{})).forEach(a=>{const s=Rt(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let Ur=!1;function ld(e){return typeof e=="boolean"&&(Ur=e),Ur}function qr(e){const r=typeof e=="string"?sn(e,!0,Ur):e;if(r){const n=Rt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function cd(e,r){const n=sn(e,!0,Ur);if(!n)return!1;const t=Rt(n.provider,n.prefix);return qy(t,n.name,r)}function vl(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Ur&&!r&&!e.prefix){let i=!1;return sd(e)&&(e.prefix="",ad(e,(o,a)=>{a&&cd(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Dn({provider:r,prefix:n,name:"a"}))return!1;const t=Rt(r,n);return!!sa(t,e)}function Ky(e){return!!qr(e)}function Yy(e){const r=qr(e);return r?{...an,...r}:null}function Jy(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,s=i.name,l=n[o]||(n[o]=Object.create(null)),c=l[a]||(l[a]=Rt(o,a));let u;s in c.icons?u=r.loaded:a===""||c.missing.has(s)?u=r.missing:u=r.pending;const d={provider:o,prefix:a,name:s};u.push(d)}),r}function ud(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Xy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const c=l.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==s&&(n||ud([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Qy=0;function Zy(e,r,n){const t=Qy++,i=ud.bind(null,n,t);if(!r.pending.length)return i;const o={id:t,icons:r,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}const yo=Object.create(null);function ml(e,r){yo[e]=r}function xo(e){return yo[e]||yo[""]}function ex(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?sn(i,r,n):i;o&&t.push(o)}),t}var tx={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function rx(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let w=e.resources.slice(0);for(a=[];w.length>1;){const D=Math.floor(Math.random()*w.length);a.push(w[D]),w=w.slice(0,D).concat(w.slice(D+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let l="pending",c=0,u,d=null,f=[],p=[];typeof t=="function"&&p.push(t);function h(){d&&(clearTimeout(d),d=null)}function v(){l==="pending"&&(l="aborted"),h(),f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function m(w,D){D&&(p=[]),typeof w=="function"&&p.push(w)}function b(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:f.length,subscribe:m,abort:v}}function y(){l="failed",p.forEach(w=>{w(void 0,u)})}function I(){f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function _(w,D,S){const T=D!=="success";switch(f=f.filter(R=>R!==w),l){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(D==="abort"){u=S,y();return}if(T){u=S,f.length||(a.length?P():y());return}if(h(),I(),!e.random){const R=e.resources.indexOf(w.resource);R!==-1&&R!==e.index&&(e.index=R)}l="completed",p.forEach(R=>{R(S)})}function P(){if(l!=="pending")return;h();const w=a.shift();if(w===void 0){if(f.length){d=setTimeout(()=>{h(),l==="pending"&&(I(),y())},e.timeout);return}y();return}const D={status:"pending",resource:w,callback:(S,T)=>{_(D,S,T)}};f.push(D),c++,d=setTimeout(P,e.rotate),n(w,r,D.callback)}return setTimeout(P),b}function dd(e){const r={...tx,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=rx(r,s,l,(d,f)=>{t(),c&&c(d,f)});return n.push(u),u}function o(s){return n.find(l=>s(l))||null}return{query:i,find:o,setIndex:s=>{r.index=s},getIndex:()=>r.index,cleanup:t}}function la(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ci=Object.create(null),wr=["https://api.simplesvg.com","https://api.unisvg.com"],Pn=[];for(;wr.length>0;)wr.length===1||Math.random()>.5?Pn.push(wr.shift()):Pn.push(wr.pop());ci[""]=la({resources:["https://api.iconify.design"].concat(Pn)});function bl(e,r){const n=la(r);return n===null?!1:(ci[e]=n,!0)}function ui(e){return ci[e]}function nx(){return Object.keys(ci)}function yl(){}const Fi=Object.create(null);function ix(e){if(!Fi[e]){const r=ui(e);if(!r)return;const n=dd(r),t={config:r,redundancy:n};Fi[e]=t}return Fi[e]}function fd(e,r,n){let t,i;if(typeof e=="string"){const o=xo(e);if(!o)return n(void 0,424),yl;i=o.send;const a=ix(e);a&&(t=a.redundancy)}else{const o=la(e);if(o){t=dd(o);const a=e.resources?e.resources[0]:"",s=xo(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),yl):t.query(r,i,n)().abort}const xl="iconify2",Vr="iconify",pd=Vr+"-count",Sl=Vr+"-version",hd=36e5,ox=168;function So(e,r){try{return e.getItem(r)}catch{}}function ca(e,r,n){try{return e.setItem(r,n),!0}catch{}}function wl(e,r){try{e.removeItem(r)}catch{}}function wo(e,r){return ca(e,pd,r.toString())}function Co(e){return parseInt(So(e,pd))||0}const jt={local:!0,session:!0},gd={local:new Set,session:new Set};let ua=!1;function ax(e){ua=e}let vn=typeof window>"u"?{}:window;function vd(e){const r=e+"Storage";try{if(vn&&vn[r]&&typeof vn[r].length=="number")return vn[r]}catch{}jt[e]=!1}function md(e,r){const n=vd(e);if(!n)return;const t=So(n,Sl);if(t!==xl){if(t){const s=Co(n);for(let l=0;l<s;l++)wl(n,Vr+l.toString())}ca(n,Sl,xl),wo(n,0);return}const i=Math.floor(Date.now()/hd)-ox,o=s=>{const l=Vr+s.toString(),c=So(n,l);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,s))return!0}catch{}wl(n,l)}};let a=Co(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,wo(n,a)):gd[e].add(s))}function bd(){if(!ua){ax(!0);for(const e in jt)md(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=Rt(t,i);if(!sa(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function sx(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in jt)md(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function lx(e,r){ua||bd();function n(t){let i;if(!jt[t]||!(i=vd(t)))return;const o=gd[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=Co(i),!wo(i,a+1))return;const s={cached:Math.floor(Date.now()/hd),provider:e.provider,data:r};return ca(i,Vr+a.toString(),JSON.stringify(s))}r.lastModified&&!sx(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function Cl(){}function cx(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Xy(e)}))}function ux(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=xo(n)))return;o.prepare(n,t,i).forEach(s=>{fd(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=sa(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(d=>{u.delete(d)}),lx(e,l)}catch(c){console.error(c)}cx(e)})})}))}const da=(e,r)=>{const n=ex(e,!0,ld()),t=Jy(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,Cl)}),()=>{l=!1}}const i=Object.create(null),o=[];let a,s;return t.pending.forEach(l=>{const{provider:c,prefix:u}=l;if(u===s&&c===a)return;a=c,s=u,o.push(Rt(c,u));const d=i[c]||(i[c]=Object.create(null));d[u]||(d[u]=[])}),t.pending.forEach(l=>{const{provider:c,prefix:u,name:d}=l,f=Rt(c,u),p=f.pendingIcons||(f.pendingIcons=new Set);p.has(d)||(p.add(d),i[c][u].push(d))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&ux(l,i[c][u])}),r?Zy(r,t,o):Cl},dx=e=>new Promise((r,n)=>{const t=typeof e=="string"?sn(e,!0):e;if(!t){n(e);return}da([t||e],i=>{if(i.length&&t){const o=qr(t);if(o){r({...an,...o});return}}n(e)})});function fx(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function px(e,r){const n=typeof e=="string"?sn(e,!0,!0):null;if(!n){const o=fx(e);return{value:e,data:o}}const t=qr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=da([n],()=>r(e,n,qr(n)));return{value:e,name:n,loading:i}}function Bi(e){return e.hasAttribute("inline")}let yd=!1;try{yd=navigator.vendor.indexOf("Apple")===0}catch{}function hx(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(yd||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const gx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,vx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Io(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const t=e.split(gx);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=vx.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const mx=e=>e==="unset"||e==="undefined"||e==="none";function xd(e,r){const n={...an,...e},t={...id,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,b=h.vFlip;let y=h.rotate;m?b?y+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):b&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let I;switch(y<0&&(y-=Math.floor(y/4)*4),y=y%4,y){case 1:I=i.height/2+i.top,v.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:I=i.width/2+i.left,v.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}y%2===1&&(i.left!==i.top&&(I=i.left,i.left=i.top,i.top=I),i.width!==i.height&&(I=i.width,i.width=i.height,i.height=I)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,s=t.height,l=i.width,c=i.height;let u,d;a===null?(d=s===null?"1em":s==="auto"?c:s,u=Io(d,l/c)):(u=a==="auto"?l:a,d=s===null?Io(u,c/l):s==="auto"?c:s);const f={},p=(h,v)=>{mx(v)||(f[h]=v.toString())};return p("width",u),p("height",d),f.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:f,body:o}}const bx=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Hn=bx();function yx(e){Hn=e}function xx(){return Hn}function Sx(e,r){const n=ui(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function wx(e){return e===404}const Cx=(e,r,n)=>{const t=[],i=Sx(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},s=0;return n.forEach((l,c)=>{s+=l.length+1,s>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},s=l.length),a.icons.push(l)}),t.push(a),t};function Ix(e){if(typeof e=="string"){const r=ui(e);if(r)return r.path}return"/"}const Rx=(e,r,n)=>{if(!Hn){n("abort",424);return}let t=Ix(r.provider);switch(r.type){case"icons":{const o=r.prefix,s=r.icons.join(","),l=new URLSearchParams({icons:s});t+=o+".json?"+l.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Hn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(wx(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Tx={prepare:Cx,send:Rx};function Il(e,r){switch(e){case"local":case"session":jt[e]=r;break;case"all":for(const n in jt)jt[n]=r;break}}const $i="data-style";let Sd="";function _x(e){Sd=e}function Rl(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute($i));n||(n=document.createElement("style"),n.setAttribute($i,$i),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+Sd}function wd(){ml("",Tx),ld(!0);let e;try{e=window}catch{}if(e){if(bd(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!vl(i))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const t in n){const i="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;bl(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>Il(n,!0),disableCache:n=>Il(n,!1),iconExists:Ky,getIcon:Yy,listIcons:Vy,addIcon:cd,addCollection:vl,calculateSize:Io,buildIcon:xd,loadIcons:da,loadIcon:dx,addAPIProvider:bl,appendCustomStyle:_x,_api:{getAPIConfig:ui,setAPIModule:ml,sendAPIQuery:fd,setFetch:yx,getFetch:xx,listAPIProviders:nx}}}function Cd(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Dx(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Px(e){return"data:image/svg+xml,"+Dx(e)}function kx(e){return'url("'+Px(e)+'")'}const Ro={"background-color":"currentColor"},Id={"background-color":"transparent"},Tl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},_l={"-webkit-mask":Ro,mask:Ro,background:Id};for(const e in _l){const r=_l[e];for(const n in Tl)r[e+"-"+n]=Tl[n]}function Dl(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Ox(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=Cd(i,{...o,width:r.width+"",height:r.height+""}),s=kx(a),l=t.style,c={"--svg":s,width:Dl(o.width),height:Dl(o.height),...n?Ro:Id};for(const u in c)l.setProperty(u,c[u]);return t}let Fr;function Ex(){try{Fr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Fr=null}}function Nx(e){return Fr===void 0&&Ex(),Fr?Fr.createHTML(e):e}function Mx(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=Cd(e.body,n);return r.innerHTML=Nx(i),r.firstChild}function Pl(e,r){const n=r.icon.data,t=r.customisations,i=xd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=Mx(i);break;default:a=Ox(i,{...an,...n},o==="mask")}const s=Array.from(e.childNodes).find(l=>{const c=l.tagName&&l.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});s?a.tagName==="SPAN"&&s.tagName===a.tagName?s.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,s):e.appendChild(a)}function kl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function Ax(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const s=this._shadowRoot=this.attachShadow({mode:"open"}),l=Bi(this);Rl(s,l),this._state=kl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Bi(this),c=this._state;l!==c.inline&&(c.inline=l,Rl(this._shadowRoot,l))}else this._queueCheck()}get icon(){const s=this.getAttribute("icon");if(s&&s.slice(0,1)==="{")try{return JSON.parse(s)}catch{}return s}set icon(s){typeof s=="object"&&(s=JSON.stringify(s)),this.setAttribute("icon",s)}get inline(){return Bi(this)}set inline(s){s?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const s=this._state;if(s.rendered){const l=this._shadowRoot;if(s.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Pl(l,s)}}get status(){const s=this._state;return s.rendered?"rendered":s.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const s=this._state,l=this.getAttribute("icon");if(l!==s.icon.value){this._iconChanged(l);return}if(!s.rendered)return;const c=this.getAttribute("mode"),u=hl(this);(s.attrMode!==c||By(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=px(s,(c,u,d)=>{const f=this._state;if(f.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:d};p.data?this._gotIconData(p):f.icon=p});l.data?this._gotIconData(l):this._state=kl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,hl(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=hx(s.data.body,c),d=this._state.inline;Pl(this._shadowRoot,this._state={rendered:!0,icon:s,inline:d,customisations:l,attrMode:c,renderedMode:u})}};i.forEach(s=>{s in o.prototype||Object.defineProperty(o.prototype,s,{get:function(){return this.getAttribute(s)},set:function(l){l!==null?this.setAttribute(s,l):this.removeAttribute(s)}})});const a=wd();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const Lx=Ax()||wd(),{enableCache:h_,disableCache:g_,iconExists:v_,getIcon:m_,listIcons:b_,addIcon:y_,addCollection:x_,calculateSize:S_,buildIcon:w_,loadIcons:C_,loadIcon:I_,addAPIProvider:R_,_api:T_}=Lx,Wt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Wt(t[n],r,n)}):r(t)),Rd=(e,r="children")=>{const n=[];return Wt(e,t=>n.push(t),r),n},fa=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=fa(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),Td=e=>/^https?:\/\//.test(e),_d=e=>/^mailto:/i.test(e.trim()),zx=e=>{if(!e||!e?.startsWith("/"))return!1;const r=i=>i.endsWith("/")?i:`${i}/`,n=r(window.location.pathname),t=r(new URL(e,window.location.origin).pathname);return n.startsWith(t)},Dd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>zx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},jx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.length,l=e.reduce((v,m)=>v+i+(m[a]?.length||0)*o,0),c=Math.ceil(l/n),u=[[]];let d=0,f=0;const p=c*.2,h=v=>f>c-p&&d<n-1&&f+v>c+p;return e.forEach(v=>{const m=i+(v[a]?.length||0)*o;t&&h(i)&&(d++,f=0,u[d]=[]),!t&&f>0&&(s<=n||h(m))&&(d++,f=0,u[d]=[]),u[d].push({...v,group:!0}),f+=i,v[a]&&v[a].forEach(b=>{t&&h(o)&&(d++,f=0,u[d]=[]),u[d].push({...b,group:!1}),f+=o})}),u};function nt({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=C.useState(!1),[s,l]=C.useState(!0);if(jo(async()=>{l(!0);try{await Fo(e),a(!0)}catch{a(!1)}l(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),Td(e))return g.jsx(rr,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return s?g.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(rr,{component:"span",...t,sx:i,children:g.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(rr,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function pa(e=["en","zh"]){const{blocklet:r}=$t();return C.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>$e.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=$e.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:$e.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const Fx=e=>e.from!=="team-tmpl";function Bx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Hp(e.slice(0,t-1),r.slice(0,i-1)))}function Pd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=$t(),{defaultLocale:t}=pa(),i=n.environments.find(s=>s.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=oe(s=>{if(s?.startsWith("/"))try{return new URL(s,i?.value).href}catch{console.error("Failed to parse url",{url:s,origin:i?.value})}return s});function a(){const{title:s,subtitle:l}=e;let c=s,u=l;return Xt(s)&&(c=s[r]||s[t]||s.en),!C.isValidElement(l)&&Xt(l)&&(u=l[r]||l[t]||l.en),g.jsxs(re,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(de,{variant:"subtitle1",sx:{fontSize:16},children:c}),l&&g.jsx(de,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(Bo(o(e.icon))?g.jsx(nt,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}Pd.propTypes={treeNode:x.object.isRequired};const $x=Xe(re)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function kd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx($x,{children:g.jsx(Zh,{backend:eg,...i,children:g.jsx(km,{generateNodeProps:o=>{const a=Fx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(ye,{icon:"ic:round-drag-indicator"}):g.jsx(re,{sx:{width:16,height:16}}),title:g.jsx(Pd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Bx,theme:Ay})})})}kd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var Gx=Cc();const Wx=Zn(Gx);function Od({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Ee(),c=C.useRef(),[u,d]=C.useState(null),f=Bt({localeList:[],inputLocale:"",localeError:""}),p=C.useMemo(()=>!!u,[u]),h=C.useMemo(()=>o.includes(i)?i:t,[o,i]),v=C.useMemo(()=>f.localeList.filter(S=>!!a[S]),[f.localeList,a]),m=C.useMemo(()=>Object.keys(At(a,[...f.localeList,t])).map(S=>({title:a[S],value:S})),[f.localeList]),b=C.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),y=oe(S=>S?S===t||f.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),I=oe((S="")=>{const T=S?.trim(),R=y(T);return R!==!0?f.localeError=R:f.localeError="",R}),_=oe(()=>{d(null),f.inputLocale="",f.localeError=""}),P=oe(()=>{const S=f.inputLocale?.trim();I(S)===!0&&(_(),f.localeList.push(S),r(S))}),w=oe((S,T)=>{S.preventDefault(),S.stopPropagation(),f.localeList=Qc(f.localeList,T),s(T)}),D=oe(S=>{const{value:T}=S.target;I(T),f.inputLocale=T});return C.useEffect(()=>{f.localeList=[...o]},[o,f]),Kh("enter",()=>{setTimeout(()=>{P()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(fg,{sx:e,value:h,onChange:(S,T)=>{n(T)},children:[g.jsx(Za,{label:b,value:t}),v.map(S=>g.jsx(Za,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(je,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{w(T,S)},children:g.jsx(ye,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(je,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{d(S.currentTarget)},children:g.jsx(ye,{icon:"mdi:plus"})})]}),g.jsx(eo,{open:p,anchorEl:u,onClose:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(re,{sx:{p:2,width:"270px"},children:[g.jsx(de,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(re,{sx:{mt:1},children:g.jsx(io,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:m,onChange:D,error:!!f.localeError,helperText:f.localeError||" "})}),g.jsx(re,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(Ct,{size:"small",variant:"contained",onClick:P,children:l("common.confirm")})})]})})]})}Od.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const ha=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function Ed(e,r,n=5e3){for(const t of ha){const i=Re(t,e);try{return await gg.get(i,{params:r,timeout:n})}catch(o){console.warn(`Failed to fetch from ${i}:`,o)}}throw new Error(`All icon API endpoints ${e} failed`)}async function Hx({keyword:e,limit:r=999,start:n=0,palette:t=!1}){let i="",o=e;e.includes(":")&&([i,o]=e.split(":"));const{data:a}=await Ed("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const mn=new Map;async function Ux(e){if(mn.has(e))return mn.get(e);const r=(async()=>{const{data:n}=await Ed("/collection",{prefix:e}),t=new Set;return n.uncategorized?.forEach(i=>t.add(`${e}:${i}`)),Object.values(n.categories??{}).forEach(i=>{i.forEach(o=>t.add(`${e}:${o}`))}),Array.from(t)})();mn.set(e,r);try{return await r}catch(n){throw mn.delete(e),n}}function qx(e){return Re(ha[0],`${e}.svg`)}function Vx(e){try{const r=new URL(e);for(const n of ha)if(r.origin===n)return Up(r.pathname).replace(".svg","");return""}catch{return""}}function Kx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Bo(e)&&(n=Vx(e))),{isIconId:r,iconId:n}}const Yx=C.lazy(()=>Yp(()=>import("./index-B1nZmgB5.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),Ol=Qe(nt)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function Nd({icon:e,...r}){const[n,t]=C.useState(!1);return jo(async()=>{t(!1),await Fo(e),t(!0)},[e]),e?n?g.jsx(ye,{icon:e,...r}):g.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}Nd.propTypes={icon:x.string.isRequired};function To({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=Tc(),{blocklet:u}=$t(),d=Zr(Z=>Z.breakpoints.down("md")),f=u.environments.find(Z=>Z.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=s(),h=C.useRef(null),v=C.useRef(null),m=C.useRef(null),{t:b,locale:y}=Ee(),{isIconId:I,iconId:_}=Kx(e),[P,w]=C.useState(null),{onChange:D,onBlur:S,sx:T,...R}=a,O=i.includes("upload"),L=i.includes("select"),M=Re(l,"/api/media/upload",u.appPid),H=Bt({showPopover:!1}),E=oe(Z=>{if(Z?.startsWith("/"))try{const q=c?window.location.origin:f?.value;return new URL(Z,q).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[f?.value,c]),B=oe(async Z=>await h.current.getUploader().uploadFile(Z)),$=oe(()=>{w(null)}),U=oe(()=>{L&&w(m.current)}),J=oe(async Z=>{try{if(o==="url"){const q=qx(Z),ne=await qp(q,{width:128,height:128}),ie=await Vp(ne,Z);await B(ie)}else D?.(Z)}catch(q){console.error("Failed to pick icon:",q)}$()}),ee=oe(Z=>{Z.stopPropagation(),v.current.open(),$()}),X=oe(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(ut,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:L?U:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Mn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(Ol,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Mn,{position:"end",children:[g.jsx(je,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),D("")},children:g.jsx(Jc,{style:{fontSize:18}})}),O&&g.jsx(Kp,{title:b("common.upload"),children:g.jsx(je,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(Nd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),L&&g.jsx(re,{component:hg,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),L&&g.jsx(eo,{open:!!P,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...d&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:$,children:g.jsx(Md,{label:n,placeholder:t,value:I?_:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:$})}),g.jsx(_o,{ref:h,locale:y,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(_o,{ref:v,locale:y,apiPath:M,headers:p,onUploadFinish:X}),g.jsx(eo,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(Ol,{size:120,icon:E(e),alt:"Error"})})]})}To.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function Md({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[s,l]=C.useState([]),[c,u]=C.useState(!0),[d,f]=C.useState(n),[p,h]=C.useState(!1),v=C.useRef(null),m=C.useRef([]),b=C.useRef(1),y=C.useRef(!0),{t:I}=Ee(),_=96,P=oe(()=>{!y.current||c||(u(!0),setTimeout(()=>{const S=b.current+1,T=(S-1)*_,R=S*_,O=m.current.slice(T,R);l(L=>[...L,...O]),b.current=S,y.current=R<m.current.length,u(!1)},300))}),w=oe(S=>{m.current=S,b.current=1,y.current=S.length>_;const T=S.slice(0,_);l(T),h(S.length===0),y.current&&P()}),{run:D}=_c(async S=>{if(S){u(!0);try{const{icons:T}=await Hx({keyword:S});w(T)}catch(T){console.error("Failed to search icons:",T),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return C.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:O,clientHeight:L}=v.current;(R+L>=O-150||O<=L)&&P()},T=v.current;return T&&(T.addEventListener("scroll",S),S()),()=>{T&&T.removeEventListener("scroll",S)}},[P,c]),jo(async()=>{if(d)D(d);else{u(!0);try{const S=await Ux("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[d,D,w]),g.jsxs(Jx,{ref:v,sx:t,...a,children:[g.jsxs(re,{className:"icon-picker-input",children:[g.jsx(ut,{label:I("navigation.form.searchIcons"),placeholder:I("navigation.form.searchIconsPlaceholder"),size:"small",value:d,sx:{flexGrow:1},autoFocus:!0,onChange:S=>f(S.target.value),slotProps:{input:{endAdornment:g.jsx(je,{sx:{visibility:d?"visible":"hidden"},onClick:()=>f(""),children:g.jsx(Jc,{style:{fontSize:18}})})}}}),g.jsx(Ct,{onClick:o,children:I("common.cancel")})]}),g.jsxs(re,{children:[s.length>0&&g.jsx(re,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:s.map(S=>g.jsx(Xx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(ye,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(re,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(re,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(re,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(Dc,{size:20})})]})]})}Md.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Jx=Qe(re)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),Xx=Qe(je,{shouldForwardProp:e=>e!=="$active"})(({$active:e,theme:r})=>({boxSizing:"content-box",backgroundColor:e?r.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:r.palette.action.hover}}));function _o({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return g.jsx(C.Suspense,{children:g.jsx(Yx,{locale:r,ref:e,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:i,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:t}})})}_o.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const El=24,Nl=48,Ml="add";x.string.isRequired;function ga({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Yc(),{t:s,locale:l}=Ee(),{localeMap:c,defaultLocale:u}=pa(),d=oe(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),f=oe(k=>Qc(Array.from(new Set(be.NAVIGATION_I18N_FIELDS.flatMap(N=>Xt(k[N])?Object.keys(k[N]):[]))),u)),p=C.useRef(()=>{}),h=Bt({isRoot:!0,type:Ml,linkDisabled:!1,locale:u,formState:d(),get localeList(){return f(h.formState)}}),{handleSubmit:v,control:m,reset:b,setValue:y,clearErrors:I,formState:{errors:_}}=ug({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});C.useEffect(()=>{be.NAVIGATION_I18N_FIELDS.forEach(k=>y(k,h.formState[k][h.locale]))},[y,h.locale]);const P=dg({control:m}),w=P.component,D=P.title,S=P.description,T=P.link,R=P.parent;C.useEffect(()=>{h.formState.title[h.locale]=D},[D]),C.useEffect(()=>{h.formState.description[h.locale]=S},[S]),C.useEffect(()=>{h.formState.link[h.locale]=T},[T]),C.useEffect(()=>{i?.(P)},[P,i]);const O=C.useMemo(()=>t.find(N=>w?n.find(V=>V.name===w).did===N.id:N.id===R),[n,t,w,R]),L=C.useMemo(()=>{if(O?.component){const k=n.find(te=>te.name===O.component),{link:N}=k||{},j=Xt(N)?N[h.locale]:N;if(w)return to(j);const V=Xt(O.link)?O.link[h.locale]:O.link;return to(Re(j,V||"/"))}return null},[n,h.locale,O,w]),M=C.useMemo(()=>{const{component:k}=O||{},N=n.find(te=>te.name===k),{navigation:j=[]}=N||{};return Ae.flattenNavigation(j,{transform(te,se){return se?.section&&(te.section=te.section||se.section),te}}).filter(te=>te.link).filter(te=>Ae.isMatchSection(te.section,r)).map(te=>({label:te.link,title:te.title[l]||te.title}))},[O,n,r,l]),H=oe(()=>{h.isRoot=!0,h.locale=u,h.type=Ml,h.linkDisabled=!1,h.formState=d(),b(),I(),p.current=()=>{}}),E=oe((k={})=>(h.localeList.length>0&&be.NAVIGATION_I18N_FIELDS.forEach(N=>{kg(h.formState[N]).length>1&&(k[N]=h.formState[N])}),$o(k.role)&&(k.role=void 0),k)),B=oe(({parent:k}={},N=()=>{})=>{h.type="add",h.isRoot=!k,y("parent",k?.id),p.current=j=>{N(j)}}),$=oe((k={},N=()=>{})=>{const{id:j,icon:V,parent:te,component:se,role:pe=[]}=k;y("id",j),y("icon",V),k.from==="team-tmpl"&&(h.linkDisabled=!0);const me=f(k),Ce=(Se,Pe)=>{Pc(Se)?h.formState[Pe]=me.reduce((Fe,ke)=>(Fe[ke]=Se,Fe),{[u]:Se}):Xt(Se)?h.formState[Pe]=rt(Se):h.formState[Pe]={}};be.NAVIGATION_I18N_FIELDS.forEach(Se=>Ce(k[Se],Se)),be.NAVIGATION_I18N_FIELDS.forEach(Se=>y(Se,h.formState[Se][h.locale])),y("component",se),y("parent",te),y("role",pe||[]),h.type="edit",h.isRoot=!te,p.current=Se=>{const Pe=Jp(Se,["id","title","description","icon","component","link","role"]);N(Pe)}}),U=oe(k=>{const N=k?.trim();if(r!=="bottomNavigation"){if(!N)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(N.length>El)return s("navigation.form.titleTooLong",{len:El})}return!0}),J=oe(k=>{const N=k?.trim();return N&&N.length>Nl?s("navigation.form.descriptionTooLong",{len:Nl}):!0}),ee=oe(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k),X=oe(async k=>{const N=k?.trim();if(N){if(Bo(ee(N)))return!0;try{await Fo(N)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=oe(k=>{const N=k?.trim();return N?X(N):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),q=oe(k=>{const N=k?.trim();return N?Ae.checkLink(N)?!0:s("navigation.form.invalidLink"):h.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),ne=oe(k=>{h.locale=k,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]||(h.formState[N][k]="")}),setTimeout(()=>{I()})}),ie=oe(()=>{const{title:k,link:N}=h.formState;if(r!=="bottomNavigation")for(const j of Object.keys(k)){const V=U(k[j]);if(V!==!0)return V}for(const j of Object.keys(N)){const V=q(N[j]);if(V!==!0)return V}return!0}),ue=oe(k=>{const N=ie();N===!0?p.current(E(k)):Mt.error(N)}),G=oe(k=>{h.locale=u,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N]=At(h.formState[N],k)}),i?.(P)}),W=oe(k=>{h.locale=k,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]=h.formState[N][u]}),i?.(P),setTimeout(()=>{I()})});return C.useImperativeHandle(e,()=>({add:B,edit:$,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v(ue)}),[B,H,$,v,ue]),g.jsxs(re,{...o,children:[g.jsx(Od,{sx:{mb:1},onAdd:W,onChange:ne,onRemoveLocale:G,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(pt,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!_?.title?.message,helperText:_?.title?.message||" ",...k})}),r==="bottomNavigation"?g.jsx(pt,{name:"icon",control:m,rules:{validate:Z},render:({field:k})=>g.jsx(To,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!_?.icon?.message,helperText:_?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...k})}):g.jsx(pt,{name:"icon",control:m,rules:{validate:X},render:({field:k})=>g.jsx(To,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!_?.icon?.message,helperText:_?.icon?.message,disabled:h.locale!==u,...k})}),h.isRoot&&g.jsx(pt,{name:"component",control:m,render:({field:k})=>g.jsx(io,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&k.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(N=>({title:N.title,value:N.name,description:N.link})),error:!!_?.component?.message,helperText:_?.component?.message||" ",...At(k,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(pt,{name:"description",control:m,rules:{validate:J},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:h.isEdit,error:!!_?.description?.message,helperText:_?.description?.message||" ",...k})}),g.jsx(pt,{name:"link",control:m,rules:{validate:q},render:({field:k})=>g.jsx(kc,{fullWidth:!0,margin:"dense",children:g.jsx(vg,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:N=>N.label,options:M,renderInput:N=>g.jsx(ut,{...N,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!_?.link?.message,helperText:_?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:L?g.jsx(Mn,{position:"start",sx:{textDecoration:Wx(T||"")?"line-through":""},children:L}):null}}}),renderOption:(N,j)=>g.jsxs(re,{component:"li",...N,children:[j.label,g.jsx(de,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:j.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(N,j)=>{k.onChange(j)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(pt,{name:"role",control:m,render:({field:k})=>g.jsx(io,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:a.map(N=>({title:N.title,value:N.name})),error:!!_?.role?.message,helperText:_?.role?.message||" ",...At(k,"ref")})}),r==="bottomNavigation"&&g.jsx(pt,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!_?.title?.message,helperText:_?.title?.message||" ",...k})})]})]})}ga.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function va({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:s}]=lg(),[l,c]=C.useState("add"),u=C.useRef(null),d=C.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[l];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,l]),f=C.useCallback(()=>{s(),u.current?.reset()},[s]),p=C.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,b=>m(f,b)),a()},[a,f]),h=C.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,b=>m(f,b)),a()},[a,f]);return C.useImperativeHandle(e,()=>({add:p,edit:h,close:f}),[p,h,f]),g.jsx(Oc,{open:o,title:d,keepMounted:!0,onClose:f,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(An,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(ga,{ref:u,section:r,components:n,rawNavigations:t})})}va.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function Ad({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Ee(),l=["yaml","team-tmpl"].includes(o.from),c=C.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const d=C.useCallback(v=>{u(v),r(o)},[r,o]),f=C.useCallback(v=>{u(v),n(o)},[n,o]),p=C.useCallback(v=>{u(v),t(o)},[t,o]),h=C.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:s(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(je,{size:"small",color:"success",onClick:d,disabled:c,children:g.jsx(ye,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:s(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(je,{size:"small",color:"primary",onClick:f,disabled:c||o.from==="team-tmpl",children:g.jsx(ye,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?s("navigation.action.noEdit"):o.visible?s("navigation.action.hide"):s("navigation.action.show"),children:g.jsx(je,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(ye,{icon:"mdi:eye-off-outline"}):g.jsx(ye,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:s(l&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(je,{disabled:l&&!c,size:"small",color:"error",onClick:h,children:g.jsx(ye,{icon:"mdi:delete"})})})]})}Ad.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const kn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Qx=e=>{const r={...e},n=e?.background;return typeof n=="string"?r.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(r.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),r},Zx=(e,r="en",n="en")=>{if(typeof e=="string"){if(Td(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(_d(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},ir=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Wt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:Ec(o.items?.length?o.link:Zx(o.link,r,n),t),_rawLink:o.link}),"items")},eS=e=>Wt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),tS=e=>{if(!e?.length)return null;const r=eS(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return r.forEach(t=>{t.section?Array.isArray(t.section)?t.section.forEach(i=>{n[i]?.push(t)}):typeof t.section=="string"&&n[t.section]?.push(t):n.header.push(t)}),n},ma=e=>{if(!e)return null;const r={...e};return r.theme=Qx(r.theme),r.navigation=tS(rS(r.navigation)),r},rS=(e=[])=>fa(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),Ld=(e,r)=>fa(e,(n,t)=>{const i=!n.role||r&&(n.role.includes(r)||n.role.includes("guest"));return t.isLeaf?i:i&&t.filteredChildren?.length},"items"),nS={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},iS={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function oS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),l=ot(),c=C.useRef(null),u=Bt({open:!1}),d=oe((p=!u.open)=>{u.open=p}),f=t==="hover"?{onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)}:{onClick:()=>d()};return s.length===0||!e?.user?null:g.jsxs(re,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...f,children:[g.jsx(je,{size:"medium",ref:c,children:g.jsx(ye,{icon:nS,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(Xp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Qp,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),d(!1)},children:g.jsx(Nc,{...p,timeout:350,children:g.jsxs(Mr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Zp,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:s.map(h=>g.jsx(eh,{disablePadding:!0,children:g.jsxs(mg,{href:Ga(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(re,{component:"img",src:`${Mc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:h.icon||iS,color:l.palette.text.secondary}),g.jsx(de,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Ga(h.title,r)})]})},h.id))}),g.jsx(th,{session:e,children:g.jsx(An,{variant:"outlined",fullWidth:!0,href:rh,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const zd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),jd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number}),aS=["admin","owner"],sS=e=>e.endsWith(".ip.abtnet.io"),lS=e=>e.endsWith(".did.abtnet.io"),cS={en:{guest:{title:"Notice: You are using a temporary domain",description:"You are accessing this site through a temporary domain. For a better experience, please contact the site administrator to configure a custom domain. Using a custom domain not only makes access more convenient but also ensures your access is more secure."},owner:{title:"Enhance Your Website Security",description:"Dear administrator, we recommend configuring your custom domain immediately, which will:",benefits1:"Automatically obtain HTTPS certificates to ensure secure data transmission",benefits2:"Create an exclusive brand image and increase website credibility",benefits3:"Get a shorter, more memorable access address",benefits4:"Provide visitors with a more professional experience",benefits5:"Domain configuration takes just minutes to complete, taking your website to the next level!"},skip:"Remind Me Later",bindDomain:"Configure Domain"},zh:{guest:{title:"温馨提示:当前使用的是临时域名",description:"您正在通过临时域名访问本站点。为了获得更好的访问体验,请联系站点管理员配置自定义域名。使用自定义域名不仅访问更便捷,还能确保您的访问更加安全。"},owner:{title:"提升网站安全性与专业度",description:"尊敬的管理员,我们建议您尽快配置自定义域名,这样可以:",benefits1:"自动获取 HTTPS 证书,确保数据传输安全",benefits2:"打造专属品牌形象,提升网站可信度",benefits3:"获得更简短、易记的访问地址",benefits4:"为访客提供更专业的访问体验",benefits5:"只需几分钟即可完成域名配置,全面提升您的网站品质!"},skip:"稍后提醒",bindDomain:"配置域名"}},uS=1e3*60*60*24*30,Al=".well-known/service/admin/domains";function Fd({locale:e="en",session:r={}}){const n=r?.user,t=Xc(),[i,o]=C.useState(()=>{const f=window.localStorage.getItem("domain-warning-skip");if(!f)return!0;const p=+new Date,h=+new Date(f);return p-h>uS}),a=oe((f,p={})=>ti(cS,f,e,"en",p)),s=C.useMemo(()=>{try{const{hostname:f}=new URL(window.location.href);return f}catch{return""}},[]),l=C.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=C.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=C.useCallback(()=>{const f=Re(window.location.origin,Al);f.startsWith("http")&&window.open(f,"_blank"),o(!1)},[]),d=n?.role&&aS.includes(n.role);return window.location.href.includes(Al)||t||!sS(s)&&!lS(s)?null:g.jsxs(nh,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(ih,{sx:{padding:"20px !important"},children:[g.jsx(de,{sx:{fontSize:"20px",fontWeight:"500"},children:a(d?"owner.title":"guest.title")}),g.jsx(de,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(d?"owner.description":"guest.description")}),d&&g.jsx(re,{component:"ul",children:l.map(f=>g.jsx(de,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:f},f))})]}),g.jsxs(oh,{sx:{px:"12px !important"},children:[g.jsx(Ct,{onClick:c,children:a("skip")}),d&&g.jsx(Ct,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Fd.propTypes={locale:x.string,session:x.object};const Me={};function dS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Re(r,Mc,e);return new lh.WsClient(n,{heartbeatIntervalMs:100*1e3})}function fS(e="admin"){return Me[e]||(Me[e]=dS(e)),Me[e]}const pS=(e="admin")=>{const r=C.use(ri),{session:n}=r??{},t=Te(()=>n.user?.did,[n.user]),i=ah(t);return sh(()=>{Object.keys(Me).forEach(o=>{Me[o]?.isConnected()&&Me[o]?.disconnect(),delete Me[o]})}),t?(i&&i!==t&&Object.keys(Me).forEach(o=>{Me[o]&&(Me[o].isConnected()&&Me[o].disconnect(),Me[o].connect())}),!Me[e]&&n.user&&(Me[e]=fS(e),Me[e].connect()),Me[e]):null},hS={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g>'},gS={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-3v4m0 3v.01"/>'},vS={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9a9 9 0 0 0-9 9a9 9 0 0 0 9 9zM9 8l6 8m0-8l-6 8"/>'};function mS(){const e=ot();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Zr(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const Nr=new ch,bS=e=>!$o(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,yS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},xS=async(e,r)=>{try{return await Nr.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},SS=async(e,r)=>{const{type:n,did:t}=e;return Ac.isSameAddr(n,"did")?await xS(t,r)||Ln.getLink(e):Ln.getLink(e)},wS=async(e,r,n=!0)=>{const t=Ln.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Ln.Link){if(n){const o=await SS(i,r),{type:a,chainId:s,did:l}=i;return Ac.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${s}" data-did="${l}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${s}" data-did="${l}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},CS=e=>uh.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),IS={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Jt({user:e,color:r=void 0}){const{palette:n}=ot(),t=ni(Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Lc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Jt.displayName="UserLink";function RS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=ot(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=Te(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(b=>{b?.did&&!m.has(b.did)&&m.set(b.did,b)}),m},[r]),d=Te(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),f=oe(()=>{if(!Array.isArray(d)||d.length===0)return null;if(d.length===1)return g.jsx(Jt,{user:d[0],color:c});const m=d.slice(0,-1),b=d[d.length-1];if(d.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Jt,{user:m[0],color:c})," and ",g.jsx(Jt,{user:b,color:c})]});const y=d.length>3,I=y?d.slice(0,2):m;return g.jsxs(g.Fragment,{children:[I.map((_,P)=>g.jsxs(Q.Fragment,{children:[g.jsx(Jt,{user:_,color:c}),P<I.length-1?", ":""]},_.did)),y?`, and ${d.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Jt,{user:b,color:c})]})]})}),p=oe(()=>{const m=a?IS[a]:null;return m?m(l,r.length):null}),h=Te(()=>{const m=f(),b=p();return!m||!b?null:g.jsxs(g.Fragment,{children:[m," ",b]})},[a,l,d,f,p]),v=Te(()=>{if(!e)return null;const m=yS(e);return m?.targetLink?Re(i,m.targetLink):null},[e,i]);return!a||$o(s)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Lc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const TS={normal:Wa,success:hS,info:Wa,warning:gS,error:vS},_S=dr(hh)`
43
+ */const nd=Object.freeze({left:0,top:0,width:16,height:16}),Gn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),an=Object.freeze({...nd,...Gn}),bo=Object.freeze({...an,body:"",hidden:!1}),Ly=Object.freeze({width:null,height:null}),id=Object.freeze({...Ly,...Gn});function zy(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function t(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:t(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?t(o):0)}}return r}const jy=/[\s,]+/;function Fy(e,r){r.split(jy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const od={...id,preserveAspectRatio:""};function hl(e){const r={...od},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=zy(n("rotate","")),Fy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function By(e,r){for(const n in od)if(e[n]!==r[n])return!0;return!1}const jr=/^[a-z0-9]+(-[a-z0-9]+)*$/,sn=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:t,prefix:l,name:s};return r&&!Dn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Dn(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!Dn(s,n)?null:s}return null},Dn=(e,r)=>e?!!((e.provider===""||e.provider.match(jr))&&(r&&e.prefix===""||e.prefix.match(jr))&&e.name.match(jr)):!1;function $y(e,r){const n={};!e.hFlip!=!r.hFlip&&(n.hFlip=!0),!e.vFlip!=!r.vFlip&&(n.vFlip=!0);const t=((e.rotate||0)+(r.rotate||0))%4;return t&&(n.rotate=t),n}function gl(e,r){const n=$y(e,r);for(const t in bo)t in Gn?t in e&&!(t in n)&&(n[t]=Gn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Gy(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=t[a]&&t[a].parent,l=s&&o(s);l&&(i[a]=[s].concat(l))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function Wy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=gl(t[s]||i[s],o)}return a(r),n.forEach(a),gl(e,o)}function ad(e,r){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{r(i,null),n.push(i)});const t=Gy(e);for(const i in t){const o=t[i];o&&(r(i,Wy(e,i,o)),n.push(i))}return n}const Hy={provider:"",aliases:{},not_found:{},...nd};function ji(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function sd(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!ji(e,Hy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(jr)||typeof o.body!="string"||!ji(o,bo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(jr)||typeof a!="string"||!n[a]&&!t[a]||!ji(o,bo))return null}return r}const Wn=Object.create(null);function Uy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function Rt(e,r){const n=Wn[e]||(Wn[e]=Object.create(null));return n[r]||(n[r]=Uy(e,r))}function sa(e,r){return sd(r)?ad(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function qy(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function Vy(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Wn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Wn[i]||{})).forEach(a=>{const s=Rt(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let Ur=!1;function ld(e){return typeof e=="boolean"&&(Ur=e),Ur}function qr(e){const r=typeof e=="string"?sn(e,!0,Ur):e;if(r){const n=Rt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function cd(e,r){const n=sn(e,!0,Ur);if(!n)return!1;const t=Rt(n.provider,n.prefix);return qy(t,n.name,r)}function vl(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Ur&&!r&&!e.prefix){let i=!1;return sd(e)&&(e.prefix="",ad(e,(o,a)=>{a&&cd(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Dn({provider:r,prefix:n,name:"a"}))return!1;const t=Rt(r,n);return!!sa(t,e)}function Ky(e){return!!qr(e)}function Yy(e){const r=qr(e);return r?{...an,...r}:null}function Jy(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,s=i.name,l=n[o]||(n[o]=Object.create(null)),c=l[a]||(l[a]=Rt(o,a));let u;s in c.icons?u=r.loaded:a===""||c.missing.has(s)?u=r.missing:u=r.pending;const d={provider:o,prefix:a,name:s};u.push(d)}),r}function ud(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Xy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const c=l.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==s&&(n||ud([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Qy=0;function Zy(e,r,n){const t=Qy++,i=ud.bind(null,n,t);if(!r.pending.length)return i;const o={id:t,icons:r,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}const yo=Object.create(null);function ml(e,r){yo[e]=r}function xo(e){return yo[e]||yo[""]}function ex(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?sn(i,r,n):i;o&&t.push(o)}),t}var tx={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function rx(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let w=e.resources.slice(0);for(a=[];w.length>1;){const D=Math.floor(Math.random()*w.length);a.push(w[D]),w=w.slice(0,D).concat(w.slice(D+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let l="pending",c=0,u,d=null,f=[],p=[];typeof t=="function"&&p.push(t);function h(){d&&(clearTimeout(d),d=null)}function v(){l==="pending"&&(l="aborted"),h(),f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function m(w,D){D&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:f.length,subscribe:m,abort:v}}function b(){l="failed",p.forEach(w=>{w(void 0,u)})}function I(){f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function _(w,D,S){const T=D!=="success";switch(f=f.filter(R=>R!==w),l){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(D==="abort"){u=S,b();return}if(T){u=S,f.length||(a.length?P():b());return}if(h(),I(),!e.random){const R=e.resources.indexOf(w.resource);R!==-1&&R!==e.index&&(e.index=R)}l="completed",p.forEach(R=>{R(S)})}function P(){if(l!=="pending")return;h();const w=a.shift();if(w===void 0){if(f.length){d=setTimeout(()=>{h(),l==="pending"&&(I(),b())},e.timeout);return}b();return}const D={status:"pending",resource:w,callback:(S,T)=>{_(D,S,T)}};f.push(D),c++,d=setTimeout(P,e.rotate),n(w,r,D.callback)}return setTimeout(P),y}function dd(e){const r={...tx,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=rx(r,s,l,(d,f)=>{t(),c&&c(d,f)});return n.push(u),u}function o(s){return n.find(l=>s(l))||null}return{query:i,find:o,setIndex:s=>{r.index=s},getIndex:()=>r.index,cleanup:t}}function la(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ci=Object.create(null),wr=["https://api.simplesvg.com","https://api.unisvg.com"],Pn=[];for(;wr.length>0;)wr.length===1||Math.random()>.5?Pn.push(wr.shift()):Pn.push(wr.pop());ci[""]=la({resources:["https://api.iconify.design"].concat(Pn)});function bl(e,r){const n=la(r);return n===null?!1:(ci[e]=n,!0)}function ui(e){return ci[e]}function nx(){return Object.keys(ci)}function yl(){}const Fi=Object.create(null);function ix(e){if(!Fi[e]){const r=ui(e);if(!r)return;const n=dd(r),t={config:r,redundancy:n};Fi[e]=t}return Fi[e]}function fd(e,r,n){let t,i;if(typeof e=="string"){const o=xo(e);if(!o)return n(void 0,424),yl;i=o.send;const a=ix(e);a&&(t=a.redundancy)}else{const o=la(e);if(o){t=dd(o);const a=e.resources?e.resources[0]:"",s=xo(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),yl):t.query(r,i,n)().abort}const xl="iconify2",Vr="iconify",pd=Vr+"-count",Sl=Vr+"-version",hd=36e5,ox=168;function So(e,r){try{return e.getItem(r)}catch{}}function ca(e,r,n){try{return e.setItem(r,n),!0}catch{}}function wl(e,r){try{e.removeItem(r)}catch{}}function wo(e,r){return ca(e,pd,r.toString())}function Co(e){return parseInt(So(e,pd))||0}const jt={local:!0,session:!0},gd={local:new Set,session:new Set};let ua=!1;function ax(e){ua=e}let vn=typeof window>"u"?{}:window;function vd(e){const r=e+"Storage";try{if(vn&&vn[r]&&typeof vn[r].length=="number")return vn[r]}catch{}jt[e]=!1}function md(e,r){const n=vd(e);if(!n)return;const t=So(n,Sl);if(t!==xl){if(t){const s=Co(n);for(let l=0;l<s;l++)wl(n,Vr+l.toString())}ca(n,Sl,xl),wo(n,0);return}const i=Math.floor(Date.now()/hd)-ox,o=s=>{const l=Vr+s.toString(),c=So(n,l);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,s))return!0}catch{}wl(n,l)}};let a=Co(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,wo(n,a)):gd[e].add(s))}function bd(){if(!ua){ax(!0);for(const e in jt)md(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=Rt(t,i);if(!sa(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function sx(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in jt)md(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function lx(e,r){ua||bd();function n(t){let i;if(!jt[t]||!(i=vd(t)))return;const o=gd[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=Co(i),!wo(i,a+1))return;const s={cached:Math.floor(Date.now()/hd),provider:e.provider,data:r};return ca(i,Vr+a.toString(),JSON.stringify(s))}r.lastModified&&!sx(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function Cl(){}function cx(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Xy(e)}))}function ux(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=xo(n)))return;o.prepare(n,t,i).forEach(s=>{fd(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=sa(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(d=>{u.delete(d)}),lx(e,l)}catch(c){console.error(c)}cx(e)})})}))}const da=(e,r)=>{const n=ex(e,!0,ld()),t=Jy(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,Cl)}),()=>{l=!1}}const i=Object.create(null),o=[];let a,s;return t.pending.forEach(l=>{const{provider:c,prefix:u}=l;if(u===s&&c===a)return;a=c,s=u,o.push(Rt(c,u));const d=i[c]||(i[c]=Object.create(null));d[u]||(d[u]=[])}),t.pending.forEach(l=>{const{provider:c,prefix:u,name:d}=l,f=Rt(c,u),p=f.pendingIcons||(f.pendingIcons=new Set);p.has(d)||(p.add(d),i[c][u].push(d))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&ux(l,i[c][u])}),r?Zy(r,t,o):Cl},dx=e=>new Promise((r,n)=>{const t=typeof e=="string"?sn(e,!0):e;if(!t){n(e);return}da([t||e],i=>{if(i.length&&t){const o=qr(t);if(o){r({...an,...o});return}}n(e)})});function fx(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function px(e,r){const n=typeof e=="string"?sn(e,!0,!0):null;if(!n){const o=fx(e);return{value:e,data:o}}const t=qr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=da([n],()=>r(e,n,qr(n)));return{value:e,name:n,loading:i}}function Bi(e){return e.hasAttribute("inline")}let yd=!1;try{yd=navigator.vendor.indexOf("Apple")===0}catch{}function hx(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(yd||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const gx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,vx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Io(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const t=e.split(gx);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=vx.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const mx=e=>e==="unset"||e==="undefined"||e==="none";function xd(e,r){const n={...an,...e},t={...id,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let I;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:I=i.height/2+i.top,v.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:I=i.width/2+i.left,v.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}b%2===1&&(i.left!==i.top&&(I=i.left,i.left=i.top,i.top=I),i.width!==i.height&&(I=i.width,i.width=i.height,i.height=I)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,s=t.height,l=i.width,c=i.height;let u,d;a===null?(d=s===null?"1em":s==="auto"?c:s,u=Io(d,l/c)):(u=a==="auto"?l:a,d=s===null?Io(u,c/l):s==="auto"?c:s);const f={},p=(h,v)=>{mx(v)||(f[h]=v.toString())};return p("width",u),p("height",d),f.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:f,body:o}}const bx=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Hn=bx();function yx(e){Hn=e}function xx(){return Hn}function Sx(e,r){const n=ui(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function wx(e){return e===404}const Cx=(e,r,n)=>{const t=[],i=Sx(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},s=0;return n.forEach((l,c)=>{s+=l.length+1,s>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},s=l.length),a.icons.push(l)}),t.push(a),t};function Ix(e){if(typeof e=="string"){const r=ui(e);if(r)return r.path}return"/"}const Rx=(e,r,n)=>{if(!Hn){n("abort",424);return}let t=Ix(r.provider);switch(r.type){case"icons":{const o=r.prefix,s=r.icons.join(","),l=new URLSearchParams({icons:s});t+=o+".json?"+l.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Hn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(wx(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Tx={prepare:Cx,send:Rx};function Il(e,r){switch(e){case"local":case"session":jt[e]=r;break;case"all":for(const n in jt)jt[n]=r;break}}const $i="data-style";let Sd="";function _x(e){Sd=e}function Rl(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute($i));n||(n=document.createElement("style"),n.setAttribute($i,$i),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+Sd}function wd(){ml("",Tx),ld(!0);let e;try{e=window}catch{}if(e){if(bd(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!vl(i))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const t in n){const i="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;bl(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>Il(n,!0),disableCache:n=>Il(n,!1),iconExists:Ky,getIcon:Yy,listIcons:Vy,addIcon:cd,addCollection:vl,calculateSize:Io,buildIcon:xd,loadIcons:da,loadIcon:dx,addAPIProvider:bl,appendCustomStyle:_x,_api:{getAPIConfig:ui,setAPIModule:ml,sendAPIQuery:fd,setFetch:yx,getFetch:xx,listAPIProviders:nx}}}function Cd(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Dx(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Px(e){return"data:image/svg+xml,"+Dx(e)}function kx(e){return'url("'+Px(e)+'")'}const Ro={"background-color":"currentColor"},Id={"background-color":"transparent"},Tl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},_l={"-webkit-mask":Ro,mask:Ro,background:Id};for(const e in _l){const r=_l[e];for(const n in Tl)r[e+"-"+n]=Tl[n]}function Dl(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Ox(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=Cd(i,{...o,width:r.width+"",height:r.height+""}),s=kx(a),l=t.style,c={"--svg":s,width:Dl(o.width),height:Dl(o.height),...n?Ro:Id};for(const u in c)l.setProperty(u,c[u]);return t}let Fr;function Ex(){try{Fr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Fr=null}}function Nx(e){return Fr===void 0&&Ex(),Fr?Fr.createHTML(e):e}function Mx(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=Cd(e.body,n);return r.innerHTML=Nx(i),r.firstChild}function Pl(e,r){const n=r.icon.data,t=r.customisations,i=xd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=Mx(i);break;default:a=Ox(i,{...an,...n},o==="mask")}const s=Array.from(e.childNodes).find(l=>{const c=l.tagName&&l.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});s?a.tagName==="SPAN"&&s.tagName===a.tagName?s.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,s):e.appendChild(a)}function kl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function Ax(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const s=this._shadowRoot=this.attachShadow({mode:"open"}),l=Bi(this);Rl(s,l),this._state=kl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Bi(this),c=this._state;l!==c.inline&&(c.inline=l,Rl(this._shadowRoot,l))}else this._queueCheck()}get icon(){const s=this.getAttribute("icon");if(s&&s.slice(0,1)==="{")try{return JSON.parse(s)}catch{}return s}set icon(s){typeof s=="object"&&(s=JSON.stringify(s)),this.setAttribute("icon",s)}get inline(){return Bi(this)}set inline(s){s?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const s=this._state;if(s.rendered){const l=this._shadowRoot;if(s.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Pl(l,s)}}get status(){const s=this._state;return s.rendered?"rendered":s.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const s=this._state,l=this.getAttribute("icon");if(l!==s.icon.value){this._iconChanged(l);return}if(!s.rendered)return;const c=this.getAttribute("mode"),u=hl(this);(s.attrMode!==c||By(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=px(s,(c,u,d)=>{const f=this._state;if(f.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:d};p.data?this._gotIconData(p):f.icon=p});l.data?this._gotIconData(l):this._state=kl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,hl(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=hx(s.data.body,c),d=this._state.inline;Pl(this._shadowRoot,this._state={rendered:!0,icon:s,inline:d,customisations:l,attrMode:c,renderedMode:u})}};i.forEach(s=>{s in o.prototype||Object.defineProperty(o.prototype,s,{get:function(){return this.getAttribute(s)},set:function(l){l!==null?this.setAttribute(s,l):this.removeAttribute(s)}})});const a=wd();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const Lx=Ax()||wd(),{enableCache:g_,disableCache:v_,iconExists:m_,getIcon:b_,listIcons:y_,addIcon:x_,addCollection:S_,calculateSize:w_,buildIcon:C_,loadIcons:I_,loadIcon:R_,addAPIProvider:T_,_api:__}=Lx,Wt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Wt(t[n],r,n)}):r(t)),Rd=(e,r="children")=>{const n=[];return Wt(e,t=>n.push(t),r),n},fa=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=fa(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),Td=e=>/^https?:\/\//.test(e),_d=e=>/^mailto:/i.test(e.trim()),zx=e=>{if(!e||!e?.startsWith("/"))return!1;const r=i=>i.endsWith("/")?i:`${i}/`,n=r(window.location.pathname),t=r(new URL(e,window.location.origin).pathname);return n.startsWith(t)},Dd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>zx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},jx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.length,l=e.reduce((v,m)=>v+i+(m[a]?.length||0)*o,0),c=Math.ceil(l/n),u=[[]];let d=0,f=0;const p=c*.2,h=v=>f>c-p&&d<n-1&&f+v>c+p;return e.forEach(v=>{const m=i+(v[a]?.length||0)*o;t&&h(i)&&(d++,f=0,u[d]=[]),!t&&f>0&&(s<=n||h(m))&&(d++,f=0,u[d]=[]),u[d].push({...v,group:!0}),f+=i,v[a]&&v[a].forEach(y=>{t&&h(o)&&(d++,f=0,u[d]=[]),u[d].push({...y,group:!1}),f+=o})}),u};function nt({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=C.useState(!1),[s,l]=C.useState(!0);if(jo(async()=>{l(!0);try{await Fo(e),a(!0)}catch{a(!1)}l(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),Td(e))return g.jsx(rr,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return s?g.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(rr,{component:"span",...t,sx:i,children:g.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(rr,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function pa(e=["en","zh"]){const{blocklet:r}=$t();return C.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>$e.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=$e.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:$e.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const Fx=e=>e.from!=="team-tmpl";function Bx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Hp(e.slice(0,t-1),r.slice(0,i-1)))}function Pd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=$t(),{defaultLocale:t}=pa(),i=n.environments.find(s=>s.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=oe(s=>{if(s?.startsWith("/"))try{return new URL(s,i?.value).href}catch{console.error("Failed to parse url",{url:s,origin:i?.value})}return s});function a(){const{title:s,subtitle:l}=e;let c=s,u=l;return Xt(s)&&(c=s[r]||s[t]||s.en),!C.isValidElement(l)&&Xt(l)&&(u=l[r]||l[t]||l.en),g.jsxs(re,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(de,{variant:"subtitle1",sx:{fontSize:16},children:c}),l&&g.jsx(de,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(Bo(o(e.icon))?g.jsx(nt,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}Pd.propTypes={treeNode:x.object.isRequired};const $x=Xe(re)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function kd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx($x,{children:g.jsx(Zh,{backend:eg,...i,children:g.jsx(km,{generateNodeProps:o=>{const a=Fx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(ye,{icon:"ic:round-drag-indicator"}):g.jsx(re,{sx:{width:16,height:16}}),title:g.jsx(Pd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Bx,theme:Ay})})})}kd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var Gx=Cc();const Wx=Zn(Gx);function Od({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Ee(),c=C.useRef(),[u,d]=C.useState(null),f=Bt({localeList:[],inputLocale:"",localeError:""}),p=C.useMemo(()=>!!u,[u]),h=C.useMemo(()=>o.includes(i)?i:t,[o,i]),v=C.useMemo(()=>f.localeList.filter(S=>!!a[S]),[f.localeList,a]),m=C.useMemo(()=>Object.keys(At(a,[...f.localeList,t])).map(S=>({title:a[S],value:S})),[f.localeList]),y=C.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=oe(S=>S?S===t||f.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),I=oe((S="")=>{const T=S?.trim(),R=b(T);return R!==!0?f.localeError=R:f.localeError="",R}),_=oe(()=>{d(null),f.inputLocale="",f.localeError=""}),P=oe(()=>{const S=f.inputLocale?.trim();I(S)===!0&&(_(),f.localeList.push(S),r(S))}),w=oe((S,T)=>{S.preventDefault(),S.stopPropagation(),f.localeList=Qc(f.localeList,T),s(T)}),D=oe(S=>{const{value:T}=S.target;I(T),f.inputLocale=T});return C.useEffect(()=>{f.localeList=[...o]},[o,f]),Kh("enter",()=>{setTimeout(()=>{P()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(fg,{sx:e,value:h,onChange:(S,T)=>{n(T)},children:[g.jsx(Za,{label:y,value:t}),v.map(S=>g.jsx(Za,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(je,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{w(T,S)},children:g.jsx(ye,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(je,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{d(S.currentTarget)},children:g.jsx(ye,{icon:"mdi:plus"})})]}),g.jsx(eo,{open:p,anchorEl:u,onClose:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(re,{sx:{p:2,width:"270px"},children:[g.jsx(de,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(re,{sx:{mt:1},children:g.jsx(io,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:m,onChange:D,error:!!f.localeError,helperText:f.localeError||" "})}),g.jsx(re,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(Ct,{size:"small",variant:"contained",onClick:P,children:l("common.confirm")})})]})})]})}Od.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const ha=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function Ed(e,r,n=5e3){for(const t of ha){const i=Re(t,e);try{return await gg.get(i,{params:r,timeout:n})}catch(o){console.warn(`Failed to fetch from ${i}:`,o)}}throw new Error(`All icon API endpoints ${e} failed`)}async function Hx({keyword:e,limit:r=999,start:n=0,palette:t=!1}){let i="",o=e;e.includes(":")&&([i,o]=e.split(":"));const{data:a}=await Ed("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const mn=new Map;async function Ux(e){if(mn.has(e))return mn.get(e);const r=(async()=>{const{data:n}=await Ed("/collection",{prefix:e}),t=new Set;return n.uncategorized?.forEach(i=>t.add(`${e}:${i}`)),Object.values(n.categories??{}).forEach(i=>{i.forEach(o=>t.add(`${e}:${o}`))}),Array.from(t)})();mn.set(e,r);try{return await r}catch(n){throw mn.delete(e),n}}function qx(e){return Re(ha[0],`${e}.svg`)}function Vx(e){try{const r=new URL(e);for(const n of ha)if(r.origin===n)return Up(r.pathname).replace(".svg","");return""}catch{return""}}function Kx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Bo(e)&&(n=Vx(e))),{isIconId:r,iconId:n}}const Yx=C.lazy(()=>Yp(()=>import("./index-gW2LRVpQ.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),Ol=Qe(nt)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function Nd({icon:e,...r}){const[n,t]=C.useState(!1);return jo(async()=>{t(!1),await Fo(e),t(!0)},[e]),e?n?g.jsx(ye,{icon:e,...r}):g.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}Nd.propTypes={icon:x.string.isRequired};function To({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=Tc(),{blocklet:u}=$t(),d=Zr(Z=>Z.breakpoints.down("md")),f=u.environments.find(Z=>Z.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=s(),h=C.useRef(null),v=C.useRef(null),m=C.useRef(null),{t:y,locale:b}=Ee(),{isIconId:I,iconId:_}=Kx(e),[P,w]=C.useState(null),{onChange:D,onBlur:S,sx:T,...R}=a,O=i.includes("upload"),L=i.includes("select"),M=Re(l,"/api/media/upload",u.appPid),H=Bt({showPopover:!1}),E=oe(Z=>{if(Z?.startsWith("/"))try{const q=c?window.location.origin:f?.value;return new URL(Z,q).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[f?.value,c]),B=oe(async Z=>await h.current.getUploader().uploadFile(Z)),$=oe(()=>{w(null)}),U=oe(()=>{L&&w(m.current)}),J=oe(async Z=>{try{if(o==="url"){const q=qx(Z),ne=await qp(q,{width:128,height:128}),ie=await Vp(ne,Z);await B(ie)}else D?.(Z)}catch(q){console.error("Failed to pick icon:",q)}$()}),ee=oe(Z=>{Z.stopPropagation(),v.current.open(),$()}),X=oe(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(ut,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:L?U:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Mn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(Ol,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Mn,{position:"end",children:[g.jsx(je,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),D("")},children:g.jsx(Jc,{style:{fontSize:18}})}),O&&g.jsx(Kp,{title:y("common.upload"),children:g.jsx(je,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(Nd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),L&&g.jsx(re,{component:hg,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),L&&g.jsx(eo,{open:!!P,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...d&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:$,children:g.jsx(Md,{label:n,placeholder:t,value:I?_:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:$})}),g.jsx(_o,{ref:h,locale:b,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(_o,{ref:v,locale:b,apiPath:M,headers:p,onUploadFinish:X}),g.jsx(eo,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(Ol,{size:120,icon:E(e),alt:"Error"})})]})}To.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function Md({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[s,l]=C.useState([]),[c,u]=C.useState(!0),[d,f]=C.useState(n),[p,h]=C.useState(!1),v=C.useRef(null),m=C.useRef([]),y=C.useRef(1),b=C.useRef(!0),{t:I}=Ee(),_=96,P=oe(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,T=(S-1)*_,R=S*_,O=m.current.slice(T,R);l(L=>[...L,...O]),y.current=S,b.current=R<m.current.length,u(!1)},300))}),w=oe(S=>{m.current=S,y.current=1,b.current=S.length>_;const T=S.slice(0,_);l(T),h(S.length===0),b.current&&P()}),{run:D}=_c(async S=>{if(S){u(!0);try{const{icons:T}=await Hx({keyword:S});w(T)}catch(T){console.error("Failed to search icons:",T),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return C.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:O,clientHeight:L}=v.current;(R+L>=O-150||O<=L)&&P()},T=v.current;return T&&(T.addEventListener("scroll",S),S()),()=>{T&&T.removeEventListener("scroll",S)}},[P,c]),jo(async()=>{if(d)D(d);else{u(!0);try{const S=await Ux("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[d,D,w]),g.jsxs(Jx,{ref:v,sx:t,...a,children:[g.jsxs(re,{className:"icon-picker-input",children:[g.jsx(ut,{label:I("navigation.form.searchIcons"),placeholder:I("navigation.form.searchIconsPlaceholder"),size:"small",value:d,sx:{flexGrow:1},autoFocus:!0,onChange:S=>f(S.target.value),slotProps:{input:{endAdornment:g.jsx(je,{sx:{visibility:d?"visible":"hidden"},onClick:()=>f(""),children:g.jsx(Jc,{style:{fontSize:18}})})}}}),g.jsx(Ct,{onClick:o,children:I("common.cancel")})]}),g.jsxs(re,{children:[s.length>0&&g.jsx(re,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:s.map(S=>g.jsx(Xx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(ye,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(re,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(re,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(re,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(Dc,{size:20})})]})]})}Md.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Jx=Qe(re)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),Xx=Qe(je,{shouldForwardProp:e=>e!=="$active"})(({$active:e,theme:r})=>({boxSizing:"content-box",backgroundColor:e?r.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:r.palette.action.hover}}));function _o({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return g.jsx(C.Suspense,{children:g.jsx(Yx,{locale:r,ref:e,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:i,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:t}})})}_o.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const El=24,Nl=48,Ml="add";x.string.isRequired;function ga({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Yc(),{t:s,locale:l}=Ee(),{localeMap:c,defaultLocale:u}=pa(),d=oe(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),f=oe(k=>Qc(Array.from(new Set(be.NAVIGATION_I18N_FIELDS.flatMap(N=>Xt(k[N])?Object.keys(k[N]):[]))),u)),p=C.useRef(()=>{}),h=Bt({isRoot:!0,type:Ml,linkDisabled:!1,locale:u,formState:d(),get localeList(){return f(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:I,formState:{errors:_}}=ug({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});C.useEffect(()=>{be.NAVIGATION_I18N_FIELDS.forEach(k=>b(k,h.formState[k][h.locale]))},[b,h.locale]);const P=dg({control:m}),w=P.component,D=P.title,S=P.description,T=P.link,R=P.parent;C.useEffect(()=>{h.formState.title[h.locale]=D},[D]),C.useEffect(()=>{h.formState.description[h.locale]=S},[S]),C.useEffect(()=>{h.formState.link[h.locale]=T},[T]),C.useEffect(()=>{i?.(P)},[P,i]);const O=C.useMemo(()=>t.find(N=>w?n.find(V=>V.name===w).did===N.id:N.id===R),[n,t,w,R]),L=C.useMemo(()=>{if(O?.component){const k=n.find(te=>te.name===O.component),{link:N}=k||{},j=Xt(N)?N[h.locale]:N;if(w)return to(j);const V=Xt(O.link)?O.link[h.locale]:O.link;return to(Re(j,V||"/"))}return null},[n,h.locale,O,w]),M=C.useMemo(()=>{const{component:k}=O||{},N=n.find(te=>te.name===k),{navigation:j=[]}=N||{};return Ae.flattenNavigation(j,{transform(te,se){return se?.section&&(te.section=te.section||se.section),te}}).filter(te=>te.link).filter(te=>Ae.isMatchSection(te.section,r)).map(te=>({label:te.link,title:te.title[l]||te.title}))},[O,n,r,l]),H=oe(()=>{h.isRoot=!0,h.locale=u,h.type=Ml,h.linkDisabled=!1,h.formState=d(),y(),I(),p.current=()=>{}}),E=oe((k={})=>(h.localeList.length>0&&be.NAVIGATION_I18N_FIELDS.forEach(N=>{kg(h.formState[N]).length>1&&(k[N]=h.formState[N])}),$o(k.role)&&(k.role=void 0),k)),B=oe(({parent:k}={},N=()=>{})=>{h.type="add",h.isRoot=!k,b("parent",k?.id),p.current=j=>{N(j)}}),$=oe((k={},N=()=>{})=>{const{id:j,icon:V,parent:te,component:se,role:pe=[]}=k;b("id",j),b("icon",V),k.from==="team-tmpl"&&(h.linkDisabled=!0);const me=f(k),Ce=(Se,Pe)=>{Pc(Se)?h.formState[Pe]=me.reduce((Fe,ke)=>(Fe[ke]=Se,Fe),{[u]:Se}):Xt(Se)?h.formState[Pe]=rt(Se):h.formState[Pe]={}};be.NAVIGATION_I18N_FIELDS.forEach(Se=>Ce(k[Se],Se)),be.NAVIGATION_I18N_FIELDS.forEach(Se=>b(Se,h.formState[Se][h.locale])),b("component",se),b("parent",te),b("role",pe||[]),h.type="edit",h.isRoot=!te,p.current=Se=>{const Pe=Jp(Se,["id","title","description","icon","component","link","role"]);N(Pe)}}),U=oe(k=>{const N=k?.trim();if(r!=="bottomNavigation"){if(!N)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(N.length>El)return s("navigation.form.titleTooLong",{len:El})}return!0}),J=oe(k=>{const N=k?.trim();return N&&N.length>Nl?s("navigation.form.descriptionTooLong",{len:Nl}):!0}),ee=oe(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k),X=oe(async k=>{const N=k?.trim();if(N){if(Bo(ee(N)))return!0;try{await Fo(N)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=oe(k=>{const N=k?.trim();return N?X(N):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),q=oe(k=>{const N=k?.trim();return N?Ae.checkLink(N)?!0:s("navigation.form.invalidLink"):h.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),ne=oe(k=>{h.locale=k,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]||(h.formState[N][k]="")}),setTimeout(()=>{I()})}),ie=oe(()=>{const{title:k,link:N}=h.formState;if(r!=="bottomNavigation")for(const j of Object.keys(k)){const V=U(k[j]);if(V!==!0)return V}for(const j of Object.keys(N)){const V=q(N[j]);if(V!==!0)return V}return!0}),ue=oe(k=>{const N=ie();N===!0?p.current(E(k)):Mt.error(N)}),G=oe(k=>{h.locale=u,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N]=At(h.formState[N],k)}),i?.(P)}),W=oe(k=>{h.locale=k,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]=h.formState[N][u]}),i?.(P),setTimeout(()=>{I()})});return C.useImperativeHandle(e,()=>({add:B,edit:$,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v(ue)}),[B,H,$,v,ue]),g.jsxs(re,{...o,children:[g.jsx(Od,{sx:{mb:1},onAdd:W,onChange:ne,onRemoveLocale:G,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(pt,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!_?.title?.message,helperText:_?.title?.message||" ",...k})}),r==="bottomNavigation"?g.jsx(pt,{name:"icon",control:m,rules:{validate:Z},render:({field:k})=>g.jsx(To,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!_?.icon?.message,helperText:_?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...k})}):g.jsx(pt,{name:"icon",control:m,rules:{validate:X},render:({field:k})=>g.jsx(To,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!_?.icon?.message,helperText:_?.icon?.message,disabled:h.locale!==u,...k})}),h.isRoot&&g.jsx(pt,{name:"component",control:m,render:({field:k})=>g.jsx(io,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&k.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(N=>({title:N.title,value:N.name,description:N.link})),error:!!_?.component?.message,helperText:_?.component?.message||" ",...At(k,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(pt,{name:"description",control:m,rules:{validate:J},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:h.isEdit,error:!!_?.description?.message,helperText:_?.description?.message||" ",...k})}),g.jsx(pt,{name:"link",control:m,rules:{validate:q},render:({field:k})=>g.jsx(kc,{fullWidth:!0,margin:"dense",children:g.jsx(vg,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:N=>N.label,options:M,renderInput:N=>g.jsx(ut,{...N,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!_?.link?.message,helperText:_?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:L?g.jsx(Mn,{position:"start",sx:{textDecoration:Wx(T||"")?"line-through":""},children:L}):null}}}),renderOption:(N,j)=>g.jsxs(re,{component:"li",...N,children:[j.label,g.jsx(de,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:j.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(N,j)=>{k.onChange(j)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(pt,{name:"role",control:m,render:({field:k})=>g.jsx(io,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:a.map(N=>({title:N.title,value:N.name})),error:!!_?.role?.message,helperText:_?.role?.message||" ",...At(k,"ref")})}),r==="bottomNavigation"&&g.jsx(pt,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!_?.title?.message,helperText:_?.title?.message||" ",...k})})]})]})}ga.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function va({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:s}]=lg(),[l,c]=C.useState("add"),u=C.useRef(null),d=C.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[l];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,l]),f=C.useCallback(()=>{s(),u.current?.reset()},[s]),p=C.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(f,y)),a()},[a,f]),h=C.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(f,y)),a()},[a,f]);return C.useImperativeHandle(e,()=>({add:p,edit:h,close:f}),[p,h,f]),g.jsx(Oc,{open:o,title:d,keepMounted:!0,onClose:f,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(An,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(ga,{ref:u,section:r,components:n,rawNavigations:t})})}va.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function Ad({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Ee(),l=["yaml","team-tmpl"].includes(o.from),c=C.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const d=C.useCallback(v=>{u(v),r(o)},[r,o]),f=C.useCallback(v=>{u(v),n(o)},[n,o]),p=C.useCallback(v=>{u(v),t(o)},[t,o]),h=C.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:s(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(je,{size:"small",color:"success",onClick:d,disabled:c,children:g.jsx(ye,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:s(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(je,{size:"small",color:"primary",onClick:f,disabled:c||o.from==="team-tmpl",children:g.jsx(ye,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?s("navigation.action.noEdit"):o.visible?s("navigation.action.hide"):s("navigation.action.show"),children:g.jsx(je,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(ye,{icon:"mdi:eye-off-outline"}):g.jsx(ye,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:s(l&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(je,{disabled:l&&!c,size:"small",color:"error",onClick:h,children:g.jsx(ye,{icon:"mdi:delete"})})})]})}Ad.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const kn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Qx=e=>{const r={...e},n=e?.background;return typeof n=="string"?r.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(r.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),r},Zx=(e,r="en",n="en")=>{if(typeof e=="string"){if(Td(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(_d(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},ir=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Wt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:Ec(o.items?.length?o.link:Zx(o.link,r,n),t),_rawLink:o.link}),"items")},eS=e=>Wt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),tS=e=>{if(!e?.length)return null;const r=eS(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return r.forEach(t=>{t.section?Array.isArray(t.section)?t.section.forEach(i=>{n[i]?.push(t)}):typeof t.section=="string"&&n[t.section]?.push(t):n.header.push(t)}),n},ma=e=>{if(!e)return null;const r={...e};return r.theme=Qx(r.theme),r.navigation=tS(rS(r.navigation)),r},rS=(e=[])=>fa(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),Ld=(e,r)=>fa(e,(n,t)=>{const i=!n.role||r&&(n.role.includes(r)||n.role.includes("guest"));return t.isLeaf?i:i&&t.filteredChildren?.length},"items"),nS={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},iS={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function oS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),l=ot(),c=C.useRef(null),u=Bt({open:!1}),d=oe((p=!u.open)=>{u.open=p}),f=t==="hover"?{onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)}:{onClick:()=>d()};return s.length===0||!e?.user?null:g.jsxs(re,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...f,children:[g.jsx(je,{size:"medium",ref:c,children:g.jsx(ye,{icon:nS,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(Xp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Qp,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),d(!1)},children:g.jsx(Nc,{...p,timeout:350,children:g.jsxs(Mr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Zp,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:s.map(h=>g.jsx(eh,{disablePadding:!0,children:g.jsxs(mg,{href:Ga(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(re,{component:"img",src:`${Mc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:h.icon||iS,color:l.palette.text.secondary}),g.jsx(de,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Ga(h.title,r)})]})},h.id))}),g.jsx(th,{session:e,children:g.jsx(An,{variant:"outlined",fullWidth:!0,href:rh,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const zd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),jd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number}),aS=["admin","owner"],sS=e=>e.endsWith(".ip.abtnet.io"),lS=e=>e.endsWith(".did.abtnet.io"),cS={en:{guest:{title:"Notice: You are using a temporary domain",description:"You are accessing this site through a temporary domain. For a better experience, please contact the site administrator to configure a custom domain. Using a custom domain not only makes access more convenient but also ensures your access is more secure."},owner:{title:"Enhance Your Website Security",description:"Dear administrator, we recommend configuring your custom domain immediately, which will:",benefits1:"Automatically obtain HTTPS certificates to ensure secure data transmission",benefits2:"Create an exclusive brand image and increase website credibility",benefits3:"Get a shorter, more memorable access address",benefits4:"Provide visitors with a more professional experience",benefits5:"Domain configuration takes just minutes to complete, taking your website to the next level!"},skip:"Remind Me Later",bindDomain:"Configure Domain"},zh:{guest:{title:"温馨提示:当前使用的是临时域名",description:"您正在通过临时域名访问本站点。为了获得更好的访问体验,请联系站点管理员配置自定义域名。使用自定义域名不仅访问更便捷,还能确保您的访问更加安全。"},owner:{title:"提升网站安全性与专业度",description:"尊敬的管理员,我们建议您尽快配置自定义域名,这样可以:",benefits1:"自动获取 HTTPS 证书,确保数据传输安全",benefits2:"打造专属品牌形象,提升网站可信度",benefits3:"获得更简短、易记的访问地址",benefits4:"为访客提供更专业的访问体验",benefits5:"只需几分钟即可完成域名配置,全面提升您的网站品质!"},skip:"稍后提醒",bindDomain:"配置域名"}},uS=1e3*60*60*24*30,Al=".well-known/service/admin/domains";function Fd({locale:e="en",session:r={}}){const n=r?.user,t=Xc(),[i,o]=C.useState(()=>{const f=window.localStorage.getItem("domain-warning-skip");if(!f)return!0;const p=+new Date,h=+new Date(f);return p-h>uS}),a=oe((f,p={})=>ti(cS,f,e,"en",p)),s=C.useMemo(()=>{try{const{hostname:f}=new URL(window.location.href);return f}catch{return""}},[]),l=C.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=C.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=C.useCallback(()=>{const f=Re(window.location.origin,Al);f.startsWith("http")&&window.open(f,"_blank"),o(!1)},[]),d=n?.role&&aS.includes(n.role);return window.location.href.includes(Al)||t||!sS(s)&&!lS(s)?null:g.jsxs(nh,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(ih,{sx:{padding:"20px !important"},children:[g.jsx(de,{sx:{fontSize:"20px",fontWeight:"500"},children:a(d?"owner.title":"guest.title")}),g.jsx(de,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(d?"owner.description":"guest.description")}),d&&g.jsx(re,{component:"ul",children:l.map(f=>g.jsx(de,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:f},f))})]}),g.jsxs(oh,{sx:{px:"12px !important"},children:[g.jsx(Ct,{onClick:c,children:a("skip")}),d&&g.jsx(Ct,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Fd.propTypes={locale:x.string,session:x.object};const Me={};function dS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Re(r,Mc,e);return new lh.WsClient(n,{heartbeatIntervalMs:100*1e3})}function fS(e="admin"){return Me[e]||(Me[e]=dS(e)),Me[e]}const pS=(e="admin")=>{const r=C.use(ri),{session:n}=r??{},t=Te(()=>n.user?.did,[n.user]),i=ah(t);return sh(()=>{Object.keys(Me).forEach(o=>{Me[o]?.isConnected()&&Me[o]?.disconnect(),delete Me[o]})}),t?(i&&i!==t&&Object.keys(Me).forEach(o=>{Me[o]&&(Me[o].isConnected()&&Me[o].disconnect(),Me[o].connect())}),!Me[e]&&n.user&&(Me[e]=fS(e),Me[e].connect()),Me[e]):null},hS={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g>'},gS={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-3v4m0 3v.01"/>'},vS={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9a9 9 0 0 0-9 9a9 9 0 0 0 9 9zM9 8l6 8m0-8l-6 8"/>'};function mS(){const e=ot();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Zr(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const Er=new ch,bS=e=>!$o(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,yS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},xS=async(e,r)=>{try{return await Er.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},SS=async(e,r)=>{const{type:n,did:t}=e;return Ac.isSameAddr(n,"did")?await xS(t,r)||Ln.getLink(e):Ln.getLink(e)},wS=async(e,r,n=!0)=>{const t=Ln.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Ln.Link){if(n){const o=await SS(i,r),{type:a,chainId:s,did:l}=i;return Ac.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${s}" data-did="${l}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${s}" data-did="${l}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},CS=e=>uh.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),IS={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Jt({user:e,color:r=void 0}){const{palette:n}=ot(),t=ni(Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Lc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Jt.displayName="UserLink";function RS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=ot(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=Te(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(y=>{y?.did&&!m.has(y.did)&&m.set(y.did,y)}),m},[r]),d=Te(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),f=oe(()=>{if(!Array.isArray(d)||d.length===0)return null;if(d.length===1)return g.jsx(Jt,{user:d[0],color:c});const m=d.slice(0,-1),y=d[d.length-1];if(d.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Jt,{user:m[0],color:c})," and ",g.jsx(Jt,{user:y,color:c})]});const b=d.length>3,I=b?d.slice(0,2):m;return g.jsxs(g.Fragment,{children:[I.map((_,P)=>g.jsxs(Q.Fragment,{children:[g.jsx(Jt,{user:_,color:c}),P<I.length-1?", ":""]},_.did)),b?`, and ${d.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Jt,{user:y,color:c})]})]})}),p=oe(()=>{const m=a?IS[a]:null;return m?m(l,r.length):null}),h=Te(()=>{const m=f(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,l,d,f,p]),v=Te(()=>{if(!e)return null;const m=yS(e);return m?.targetLink?Re(i,m.targetLink):null},[e,i]);return!a||$o(s)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Lc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const TS={normal:Wa,success:hS,info:Wa,warning:gS,error:vS},_S=dr(hh)`
44
44
  font-size: 20px;
45
45
  `,DS=dr.div`
46
46
  display: flex;
@@ -107,7 +107,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
107
107
  color: ${ro.white};
108
108
  }
109
109
  }
110
- `;function NS({ref:e=void 0,keyId:r,notification:n={},viewAllUrl:t,content:i=null}){const o=mS(),[a,s]=C.useState(n.description||""),l=TS[n.severity||""],{closeSnackbar:c}=zc(),u=()=>c(r);C.useEffect(()=>{wS(n.description||"","en").then(m=>{s(m)})},[n.description]);const d=m=>{m.stopPropagation(),c(r),m?.customPreventRedirect||window.open(t,"_blank")},f=Te(()=>bS(n),[n]),p=Te(()=>n?.activity,[n]),h=Te(()=>!p||p.type==="tips"?null:p?.meta,[p]),v=RS({activity:p,users:[n?.actorInfo],actors:[n?.activity?.actor],extra:{linkColor:ro.white}});return g.jsxs(OS,{ref:e,severity:n.severity,breakpoint:o,children:[g.jsxs(DS,{children:[l?g.jsx(ye,{icon:l,fontSize:24}):null,g.jsx(ES,{onClick:d,style:{width:"calc(100% - 30px)"},children:g.jsx(re,{children:f?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"title",children:v}),h?g.jsx(de,{variant:"subtitle2",component:"p",sx:{fontSize:16,display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:ro.white,lineHeight:1.2},children:h?.content}):null]}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"title",children:n.title}),i||g.jsx(de,{component:"span",className:"desc",dangerouslySetInnerHTML:{__html:CS(a)}})]})})})]}),g.jsx(PS,{children:g.jsx(je,{"aria-label":"close",color:"inherit",onClick:u,size:"large",children:g.jsx(_S,{})},"close")})]})}const Do=Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),MS=e=>ni(Do,{id:e.id,severity:e.severity||"all",componentDid:e.source==="system"?"system":e.componentDid||"all"});function Bd({session:e={}}){const{unReadCount:r,user:n,setUnReadCount:t}=e,i=Te(()=>n?.did,[n]),o=Te(()=>n?.role&&[be.ROLES.ADMIN,be.ROLES.OWNER].includes(n?.role),[n?.role]),{enqueueSnackbar:a}=zc(),s=jc(),l=C.useMemo(()=>!i||n?.isPreviewUser||i===window.blocklet.did,[i,n]),c=C.useMemo(()=>s.arcSphere||s.wallet,[s]),u=Te(()=>window.blocklet?.serverVersion,[]),d=pS("user"),f=Te(()=>`${window.blocklet.did}/${i}/${be.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,[i]),p=Te(()=>`${window.blocklet.did}/${i}/${be.EVENTS.NOTIFICATION_BLOCKLET_READ}`,[i]),h=C.useCallback(m=>{const{receivers:b,source:y}=m??{},{receiver:I}=b[0]??{};if(I===i&&(o||y!=="system")){t(P=>P+1);const _=gh(u,"1.16.42-beta-20250407");if(!c&&m.source==="component"&&_){const P=MS(m),{severity:w,description:D}=m||{},S=["error","warning"].includes(w)||m.sticky;a(D,{variant:w,autoHideDuration:S?null:5e3,anchorOrigin:{vertical:"top",horizontal:"center"},content:T=>g.jsx(NS,{viewAllUrl:P,keyId:T,notification:m})})}}},[i,t,a,u,c,o]),v=C.useCallback(m=>{const{receiver:b,readCount:y}=m??{};b===i&&t(I=>Math.max(I-y,0))},[i,t]);return C.useEffect(()=>(d&&!l&&(d.on(f,h),d.on(p,v)),()=>{d&&!l&&(d.off(f,h),d.off(p,v))}),[d,t,h,f,v,p,l]),!e.user||!Do?null:g.jsx(je,{size:"medium",variant:"outlined",href:ni(Do,{read:r<=0}),sx:{"&:hover":{borderRadius:"50%"}},children:g.jsx(vh,{badgeContent:r,color:"error",invisible:r===0,children:g.jsx(mh,{style:{width:"auto",height:24}})})})}Bd.propTypes={session:x.object};const $d=e=>{const{response:r}=e;return r?`Request failed: ${r.status} ${r.statusText}: ${JSON.stringify(r.data)}`:e.message};function Gd(e){const r=oe(async({search:o,page:a=1,pageSize:s=20})=>{try{return await Nr.user.getOrgs({search:o,page:a,pageSize:s})}catch(l){return console.error(l),{orgs:[],paging:{page:a,pageSize:s,total:0}}}}),n=oe(async({name:o,description:a})=>{try{return(await Nr.user.createOrg({name:o,description:a})).data}catch(s){return console.error(s),Mt.error($d(s)),null}}),t=oe(async o=>{try{return await Nr.user.getOrg(o)}catch(a){return e.logout(),console.error(a),null}}),i=oe(async o=>{try{const a=await Nr.user.getRole(o);return a.orgId?await t(a.orgId):null}catch(a){return console.error(a),null}});return{getOrgs:r,createOrg:n,getCurrentOrg:i}}const Wd={en:{search:"Search",orgs:"Organizations",loadingMore:"Loading more",myJoinedEmpty:"You have not joined any organizations yet",createNew:"Create New Organization",viewAll:"View All Organizations",nameEmpty:"Name cannot be empty",nameTooLong:"Name must be less than {length} characters",descriptionTooLong:"Description must be less than {length} characters",cancel:"Cancel",create:"Create",mutate:{title:"{mode} Organization",name:"Name",description:"Description"}},zh:{search:"搜索",orgs:"组织",loadingMore:"加载更多",myJoinedEmpty:"您还没有加入任何组织",createNew:"创建新组织",viewAll:"查看所有组织",nameEmpty:"名称不能为空",nameTooLong:"名称不能超过{length}个字符",descriptionTooLong:"描述不能超过{length}个字符",cancel:"取消",create:"创建",mutate:{title:"{mode}组织",name:"组织名称",description:"组织描述"}}};function Hd({onSuccess:e=et,onCancel:r=et,locale:n="en"}){const[t,i]=C.useState(!1),[o,a]=C.useState(""),{createOrg:s}=Gd(),l=oe((f,p={})=>ti(Wd,f,n,"en",p)),c=Bt({name:"",description:""}),u=async()=>{const f=c.name.trim();if(!f){a(l("nameEmpty"));return}if(f.length>25){a(l("nameTooLong",{length:25}));return}const p=c.description.trim();if(p.length>255){a(l("descriptionTooLong",{length:25}));return}a(""),i(!0);try{await s({name:f,description:p}),e()}catch(h){console.error(h);const v=$d(h);a(v),Mt.error(v)}finally{i(!1)}},d=g.jsxs("div",{children:[g.jsx(de,{component:"div",style:{marginTop:16},children:g.jsx(ut,{label:l("mutate.name"),autoComplete:"off",variant:"outlined",name:"name","data-cy":"mutate-org-input-name",fullWidth:!0,autoFocus:!0,value:c.name,onChange:f=>{a(""),c.name=f.target.value},disabled:t})}),g.jsx(de,{component:"div",style:{marginTop:16,marginBottom:16},children:g.jsx(ut,{label:l("mutate.description"),autoComplete:"off",variant:"outlined",name:"description","data-cy":"mutate-org-input-description",fullWidth:!0,value:c.description,onChange:f=>{a(""),c.description=f.target.value},disabled:t,multiline:!0,rows:3})})]});return g.jsxs(Oc,{title:l("mutate.title",{mode:l("create")}),fullWidth:!0,open:!0,onClose:r,showCloseButton:!1,actions:g.jsxs(g.Fragment,{children:[g.jsx(An,{onClick:r,color:"inherit",children:l("cancel")}),g.jsxs(An,{"data-cy":"mutate-org-confirm",onClick:u,color:"primary",disabled:t,variant:"contained",autoFocus:!0,children:[t&&g.jsx(Dc,{size:16}),l("create")]})]}),children:[g.jsx(bh,{component:"div",children:d}),!!o&&g.jsx(yh,{severity:"error",style:{width:"100%",margin:0},children:o})]})}Hd.propTypes={onSuccess:x.func,onCancel:x.func,locale:x.string};const Ll=20;function Ud({session:e,locale:r="en"}){const[n,t]=C.useState(null),[i,o]=C.useState(""),[a,s]=C.useState(!1),l=C.useRef(null),c=oe((E,B={})=>ti(Wd,E,r,"en",B)),{getOrgs:u,getCurrentOrg:d}=Gd(e),f=C.useMemo(()=>e?.user?.role||"",[e?.user?.role]),{data:p={}}=xh(()=>d(f),{ready:!!f,refreshDeps:[f],onError:E=>{console.error("Failed to get organization role",E)}}),h=C.useMemo(()=>p||{name:e?.user?.passports?.find(E=>E.name===f)?.title||f||"-"},[p,f,e?.user?.passports]),v=Sh(i,{wait:500}),{data:m,loadMore:b,loadingMore:y,reload:I}=bg(async E=>{const B={page:E?Math.ceil(E.list.length/Ll)+1:1,pageSize:Ll,search:i},$=await u(B),{orgs:U=[],paging:J}=$||{};return{list:U,total:J?.total||0}},{reloadDeps:[v],isNoMore:E=>E?.list.length?E.list.length>=E?.total:!0,onError:E=>{console.error("Failed to fetch organizations list",E)}}),{list:_=[],total:P=0}=m||{},w=_.length<P,D=oe(E=>{const B=E.target,{scrollTop:$,scrollHeight:U,clientHeight:J}=B;U-$-J<50&&!y&&w&&b()}),S=!!n;C.useEffect(()=>{S&&I()},[S,I]);const T=E=>{t(E.currentTarget)},R=()=>{t(null),s(!1),o("")},O=E=>{e.switchPassport(()=>{window.location.reload()},{orgId:E.id}),R()},L=()=>{s(!0)},M=()=>{const E=ni(Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user/orgs"),{locale:r});window.location.href=E,R()},H=E=>g.jsxs(zn,{onClick:()=>O(E),selected:E.id===h.id,sx:{py:1.5,px:2,"&.Mui-selected":{backgroundColor:"action.selected","&:hover":{backgroundColor:"action.hover"}}},children:[g.jsx(ts,{sx:{minWidth:40},children:g.jsx(rr,{sx:{width:28,height:28,fontSize:14,bgcolor:E.isOwner?"primary.main":"grey.400"},children:E.name?.[0]})}),g.jsxs(re,{sx:{display:"flex",alignItems:"center",flex:1},children:[g.jsx(Ua,{sx:{"& .MuiListItemText-primary":{mb:0},"& .MuiListItemText-secondary":{mt:"-2px"}},primary:g.jsx(de,{variant:"body2",sx:{fontWeight:500,lineHeight:1.2},children:E.name}),secondary:g.jsx(de,{variant:"caption",color:"text.secondary",sx:{lineHeight:1.1},children:E.passports?.[0]?.title})}),E.id===h.id&&g.jsx(re,{sx:{display:"flex",alignItems:"center",justifyContent:"center",ml:1},children:g.jsx(de,{variant:"caption",color:"primary",sx:{fontSize:10},children:"✓"})})]})]},E.id);return g.jsxs(re,{children:[g.jsxs(Ct,{ref:l,onClick:T,endIcon:g.jsx(yg,{}),sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:1,textTransform:"none",color:"text.primary","&:hover":{backgroundColor:"action.hover"}},"data-testid":"org-switch-button",children:[g.jsx(rr,{sx:{width:24,height:24,fontSize:12,bgcolor:"primary.main"},children:h.name?.[0]}),g.jsx(de,{variant:"body2",sx:{fontWeight:500},children:h.name})]}),g.jsxs(wh,{anchorEl:n,open:S,onClose:R,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{sx:{width:340,maxHeight:480,overflow:"visible",mt:.5,borderRadius:2,boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.08)",border:E=>`1px solid ${E.palette.divider}`}},MenuListProps:{sx:{py:0}},children:[g.jsx(re,{sx:{p:1.5,pb:1},children:g.jsx(ut,{fullWidth:!0,size:"small",placeholder:c("search"),value:i,onChange:E=>o(E.target.value),InputProps:{startAdornment:g.jsx(Mn,{position:"start",children:g.jsx(xg,{fontSize:"small",color:"action"})})},onClick:E=>E.stopPropagation(),onKeyDown:E=>E.stopPropagation(),sx:{"& .MuiOutlinedInput-root":{borderRadius:1}}})}),g.jsx(re,{sx:{px:2,pb:1},children:g.jsx(de,{variant:"subtitle2",color:"text.secondary",sx:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:.5},children:c("orgs")})}),g.jsx(re,{sx:{maxHeight:240,overflow:"auto"},onScroll:D,children:_.length>0?g.jsx(g.Fragment,{children:_.map((E,B)=>{const $=B===_.length-1;return g.jsxs(re,{children:[H(E),$&&w&&g.jsx(re,{sx:{display:"flex",justifyContent:"center",py:1,color:"text.secondary",fontSize:"0.875rem"},children:y?c("loadingMore"):""})]},E.id)})}):g.jsx(re,{sx:{px:2,py:3,textAlign:"center"},children:g.jsx(de,{variant:"body2",color:"text.secondary",children:c("myJoinedEmpty")})})}),g.jsx(Ha,{}),g.jsxs(zn,{onClick:L,sx:{py:1.5,px:2,"&:hover":{backgroundColor:"action.hover"}},children:[g.jsx(ts,{sx:{minWidth:40},children:g.jsx(rr,{sx:{width:28,height:28,bgcolor:"success.main",color:"success.contrastText"},children:g.jsx(Sg,{fontSize:"small"})})}),g.jsx(Ua,{primary:g.jsx(de,{variant:"body2",sx:{fontWeight:500},children:c("createNew")})})]}),g.jsx(Ha,{}),g.jsx(re,{sx:{p:1.5},children:g.jsx(Ct,{onClick:M,variant:"text",component:"a",size:"small",endIcon:g.jsx(wg,{fontSize:"small"}),sx:{color:"primary.main",fontWeight:500,p:0,fontSize:14,minWidth:"auto","&:hover":{backgroundColor:"transparent",textDecoration:"underline"}},children:c("viewAll")})})]}),a&&g.jsx(Hd,{onSuccess:M,onCancel:()=>s(!1),locale:r})]})}Ud.propTypes={session:x.object.isRequired,locale:x.string};const AS=()=>!!(window?.blocklet?.navigation??[]).find(e=>e.id==="/userCenter/notification"),LS=e=>{const{settings:r={}}=e??window?.blocklet??{};return r?.org?.enabled||!1},zS=()=>{const{pathname:e=""}=window.location||{};return e.startsWith(be.WELLKNOWN_BLOCKLET_ADMIN_PATH)};function ba({formattedBlocklet:e,addons:r=null,showDomainWarningDialog:n=!0,sessionManagerProps:t={showRole:!0}}){const i=C.use(ri),{locale:o,languages:a,defaultLocale:s}=Ee()||{},{enableConnect:l=!0,enableLocale:c=!0}=e,u=!!i?.session?.user;let d=ir({navigation:e?.navigation?.sessionManager,locale:o,defaultLocale:s})||[];d=Ld(d,i?.session?.user?.role);const f=(()=>{if(r&&typeof r!="function")return Array.isArray(r)?r:[r];let v=[];if(AS()&&v.push(g.jsx(Bd,{session:i.session},"notification-addon")),c&&o&&a.length>1&&v.push(g.jsx(Ch,{showText:!1},"locale-selector")),v.push(g.jsx(Ih,{},"theme-mode-toggle")),l&&i){const m=[];u&&(d?d.slice(0,5):[]).forEach(b=>{m.push({label:b.title,icon:b.icon?g.jsx("iconify-icon",{icon:b.icon,height:24,style:{marginRight:8}}):null,component:"a",href:b.link,key:b.link})}),v.push(g.jsx(oS,{session:i.session,locale:o},"session-blocklet")),v.push(g.jsx(Rh,{session:i.session,locale:o,menu:m,showRole:!0,...t},"session-user"))}return!zS()&&LS(e)&&i?.session?.user&&v.unshift(g.jsx(Ud,{session:i.session,locale:o},"orgs-switch")),typeof r=="function"&&(v=r(v)||[]),v})(),p=Array.isArray(f)?f:[f],h=[n?g.jsx(Fd,{session:i?.session,locale:o}):null,...p].filter(Boolean);return C.createElement(g.Fragment,null,...h)}ba.propTypes={formattedBlocklet:x.object.isRequired,addons:x.oneOfType([x.func,x.node]),sessionManagerProps:jd,showDomainWarningDialog:x.bool};const qd=()=>{const e=jc();C.useEffect(()=>{(e.wallet||e.arcSphere)&&Th.call("arcHideTopBar","{}")},[e])},jS="blocklet-ui-react-embed-mode";function Vd(e){const r=e.displayName||e.name||"Component";function n(t){const[i]=Dg(jS,{defaultValue:0,listenStorageChange:!0});return i===1?null:g.jsx(e,{...t})}return n.displayName=`withHideWhenEmbed(${r})`,n}const FS={en:{products:"Products"},zh:{products:"产品"},"zh-TW":{products:"產品"},ja:{products:"製品"}},BS=e=>{if(!e?.length)return{navItems:[],activeId:null};let r=1;const n=Wt(e,o=>{const a=o.icon?g.jsx(nt,{icon:o.icon}):null;if(o.items)return{id:`${r++}`,label:o.title,icon:a,children:o.items};let s={};return(o.link?.startsWith("http")||o.link?.startsWith("//"))&&(s={target:"_blank",rel:"noreferrer"}),{id:`${r++}`,label:g.jsx("a",{href:Ec(o.link,"header"),...s,children:o.title}),icon:a,description:o.description,link:o.link}},"items"),t=Rd(n),i=Dd(t.map(o=>o.link));return{navItems:n,activeId:i>=0?t[i].id:null}};function $S({meta:e={},addons:r=void 0,sessionManagerProps:n={showRole:!0},homeLink:t=kn,theme:i={},hideNavMenu:o=!1,showDomainWarningDialog:a=!0,...s}){qd();const l=ot(),{locale:c,defaultLocale:u}=Ee()||{},d=oe((P,w={})=>ti(FS,P,c,"en",w)),f=C.useMemo(()=>{const P=Object.assign({},window.blocklet,e);try{return ma(P)}catch(w){return console.error("Failed to format blocklet info",w,P),P}},[e]),p=C.useMemo(()=>$c(l,i),[l,i]),h=Go({meta:e,theme:i}),{productsOrder:v,productsType:m}=C.useMemo(()=>{let{USE_ARCBLOCK_THEME:P,USE_AIGNE_THEME:w}=f;return P=parseInt(P,10),w=parseInt(w,10),rs(w)?{productsOrder:w,productsType:"AIGNE"}:rs(P)?{productsOrder:P,productsType:"ARCBLOCK"}:{productsOrder:null,productsType:null}},[f]);if(!f.appName)return null;const b=ir({navigation:f?.navigation?.header,locale:c,defaultLocale:u}),y=BS(b),{navItems:I,activeId:_}=y;return m&&Number.isInteger(v)&&I.splice(v,0,{label:d("products"),children:()=>g.jsx(Dh,{type:m})}),g.jsx(Gc,{theme:p,children:g.jsx(GS,{homeLink:t,logo:g.jsx("img",{src:h,alt:"logo"}),addons:g.jsx(ba,{formattedBlocklet:f,addons:typeof r=="function"?P=>r(P,{navigation:y}):r,sessionManagerProps:n,showDomainWarningDialog:a}),...At(s,["bordered"]),$bordered:s?.bordered,$bgcolor:p.palette.background.default,className:ct("blocklet__header",s.className),children:o||!I?.length?null:({isMobile:P})=>g.jsx(Ph,{mode:P?"inline":"horizontal",activeId:_,items:I,className:"header-nav",bgColor:"transparent",textColor:p.palette.grey[500],activeTextColor:p.palette.text.primary})})})}const GS=Qe(_h)`
110
+ `;function NS({ref:e=void 0,keyId:r,notification:n={},viewAllUrl:t,content:i=null}){const o=mS(),[a,s]=C.useState(n.description||""),l=TS[n.severity||""],{closeSnackbar:c}=zc(),u=()=>c(r);C.useEffect(()=>{wS(n.description||"","en").then(m=>{s(m)})},[n.description]);const d=m=>{m.stopPropagation(),c(r),m?.customPreventRedirect||window.open(t,"_blank")},f=Te(()=>bS(n),[n]),p=Te(()=>n?.activity,[n]),h=Te(()=>!p||p.type==="tips"?null:p?.meta,[p]),v=RS({activity:p,users:[n?.actorInfo],actors:[n?.activity?.actor],extra:{linkColor:ro.white}});return g.jsxs(OS,{ref:e,severity:n.severity,breakpoint:o,children:[g.jsxs(DS,{children:[l?g.jsx(ye,{icon:l,fontSize:24}):null,g.jsx(ES,{onClick:d,style:{width:"calc(100% - 30px)"},children:g.jsx(re,{children:f?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"title",children:v}),h?g.jsx(de,{variant:"subtitle2",component:"p",sx:{fontSize:16,display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:ro.white,lineHeight:1.2},children:h?.content}):null]}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"title",children:n.title}),i||g.jsx(de,{component:"span",className:"desc",dangerouslySetInnerHTML:{__html:CS(a)}})]})})})]}),g.jsx(PS,{children:g.jsx(je,{"aria-label":"close",color:"inherit",onClick:u,size:"large",children:g.jsx(_S,{})},"close")})]})}const Do=Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),MS=e=>ni(Do,{id:e.id,severity:e.severity||"all",componentDid:e.source==="system"?"system":e.componentDid||"all"});function Bd({session:e={}}){const{unReadCount:r,user:n,setUnReadCount:t}=e,i=Te(()=>n?.did,[n]),o=Te(()=>n?.role&&[be.ROLES.ADMIN,be.ROLES.OWNER].includes(n?.role),[n?.role]),{enqueueSnackbar:a}=zc(),s=jc(),l=C.useMemo(()=>!i||n?.isPreviewUser||i===window.blocklet.did,[i,n]),c=C.useMemo(()=>s.arcSphere||s.wallet,[s]),u=Te(()=>window.blocklet?.serverVersion,[]),d=pS("user"),f=Te(()=>`${window.blocklet.did}/${i}/${be.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,[i]),p=Te(()=>`${window.blocklet.did}/${i}/${be.EVENTS.NOTIFICATION_BLOCKLET_READ}`,[i]),h=C.useCallback(m=>{const{receivers:y,source:b}=m??{},{receiver:I}=y[0]??{};if(I===i&&(o||b!=="system")){t(P=>P+1);const _=gh(u,"1.16.42-beta-20250407");if(!c&&m.source==="component"&&_){const P=MS(m),{severity:w,description:D}=m||{},S=["error","warning"].includes(w)||m.sticky;a(D,{variant:w,autoHideDuration:S?null:5e3,anchorOrigin:{vertical:"top",horizontal:"center"},content:T=>g.jsx(NS,{viewAllUrl:P,keyId:T,notification:m})})}}},[i,t,a,u,c,o]),v=C.useCallback(m=>{const{receiver:y,readCount:b}=m??{};y===i&&t(I=>Math.max(I-b,0))},[i,t]);return C.useEffect(()=>(d&&!l&&(d.on(f,h),d.on(p,v)),()=>{d&&!l&&(d.off(f,h),d.off(p,v))}),[d,t,h,f,v,p,l]),!e.user||!Do?null:g.jsx(je,{size:"medium",variant:"outlined",href:ni(Do,{read:r<=0}),sx:{"&:hover":{borderRadius:"50%"}},children:g.jsx(vh,{badgeContent:r,color:"error",invisible:r===0,children:g.jsx(mh,{style:{width:"auto",height:24}})})})}Bd.propTypes={session:x.object};const $d=e=>{const{response:r}=e;return r?`Request failed: ${r.status} ${r.statusText}: ${JSON.stringify(r.data)}`:e.message};function Gd(e){const r=oe(async({search:o,page:a=1,pageSize:s=20})=>{try{return await Er.user.getOrgs({search:o,page:a,pageSize:s})}catch(l){return console.error(l),{orgs:[],paging:{page:a,pageSize:s,total:0}}}}),n=oe(async({name:o,description:a})=>{try{return(await Er.user.createOrg({name:o,description:a})).data}catch(s){return console.error(s),Mt.error($d(s)),null}}),t=oe(async o=>{try{return await Er.user.getOrg(o)}catch(a){return e.logout(),console.error(a),null}}),i=oe(async o=>{try{const a=await Er.user.getRole(o);return a.orgId?await t(a.orgId):null}catch(a){return console.error(a),null}});return{getOrgs:r,createOrg:n,getCurrentOrg:i}}const Wd={en:{search:"Search",orgs:"Organizations",loadingMore:"Loading more",myJoinedEmpty:"You have not joined any organizations yet",createNew:"Create New Organization",viewAll:"View All Organizations",nameEmpty:"Name cannot be empty",nameTooLong:"Name must be less than {length} characters",descriptionTooLong:"Description must be less than {length} characters",cancel:"Cancel",create:"Create",mutate:{title:"{mode} Organization",name:"Name",description:"Description"}},zh:{search:"搜索",orgs:"组织",loadingMore:"加载更多",myJoinedEmpty:"您还没有加入任何组织",createNew:"创建新组织",viewAll:"查看所有组织",nameEmpty:"名称不能为空",nameTooLong:"名称不能超过{length}个字符",descriptionTooLong:"描述不能超过{length}个字符",cancel:"取消",create:"创建",mutate:{title:"{mode}组织",name:"组织名称",description:"组织描述"}}};function Hd({onSuccess:e=et,onCancel:r=et,locale:n="en"}){const[t,i]=C.useState(!1),[o,a]=C.useState(""),{createOrg:s}=Gd(),l=oe((f,p={})=>ti(Wd,f,n,"en",p)),c=Bt({name:"",description:""}),u=async()=>{const f=c.name.trim();if(!f){a(l("nameEmpty"));return}if(f.length>25){a(l("nameTooLong",{length:25}));return}const p=c.description.trim();if(p.length>255){a(l("descriptionTooLong",{length:25}));return}a(""),i(!0);try{await s({name:f,description:p}),e()}catch(h){console.error(h);const v=$d(h);a(v),Mt.error(v)}finally{i(!1)}},d=g.jsxs("div",{children:[g.jsx(de,{component:"div",style:{marginTop:16},children:g.jsx(ut,{label:l("mutate.name"),autoComplete:"off",variant:"outlined",name:"name","data-cy":"mutate-org-input-name",fullWidth:!0,autoFocus:!0,value:c.name,onChange:f=>{a(""),c.name=f.target.value},disabled:t})}),g.jsx(de,{component:"div",style:{marginTop:16,marginBottom:16},children:g.jsx(ut,{label:l("mutate.description"),autoComplete:"off",variant:"outlined",name:"description","data-cy":"mutate-org-input-description",fullWidth:!0,value:c.description,onChange:f=>{a(""),c.description=f.target.value},disabled:t,multiline:!0,rows:3})})]});return g.jsxs(Oc,{title:l("mutate.title",{mode:l("create")}),fullWidth:!0,open:!0,onClose:r,showCloseButton:!1,actions:g.jsxs(g.Fragment,{children:[g.jsx(An,{onClick:r,color:"inherit",children:l("cancel")}),g.jsxs(An,{"data-cy":"mutate-org-confirm",onClick:u,color:"primary",disabled:t,variant:"contained",autoFocus:!0,children:[t&&g.jsx(Dc,{size:16}),l("create")]})]}),children:[g.jsx(bh,{component:"div",children:d}),!!o&&g.jsx(yh,{severity:"error",style:{width:"100%",margin:0},children:o})]})}Hd.propTypes={onSuccess:x.func,onCancel:x.func,locale:x.string};const Ll=20;function Ud({session:e,locale:r="en"}){const[n,t]=C.useState(null),[i,o]=C.useState(""),[a,s]=C.useState(!1),l=C.useRef(null),c=oe((E,B={})=>ti(Wd,E,r,"en",B)),{getOrgs:u,getCurrentOrg:d}=Gd(e),f=C.useMemo(()=>e?.user?.role||"",[e?.user?.role]),{data:p={}}=xh(()=>d(f),{ready:!!f,refreshDeps:[f],onError:E=>{console.error("Failed to get organization role",E)}}),h=C.useMemo(()=>p||{name:e?.user?.passports?.find(E=>E.name===f)?.title||f||"-"},[p,f,e?.user?.passports]),v=Sh(i,{wait:500}),{data:m,loadMore:y,loadingMore:b,reload:I}=bg(async E=>{const B={page:E?Math.ceil(E.list.length/Ll)+1:1,pageSize:Ll,search:i},$=await u(B),{orgs:U=[],paging:J}=$||{};return{list:U,total:J?.total||0}},{reloadDeps:[v],isNoMore:E=>E?.list.length?E.list.length>=E?.total:!0,onError:E=>{console.error("Failed to fetch organizations list",E)}}),{list:_=[],total:P=0}=m||{},w=_.length<P,D=oe(E=>{const B=E.target,{scrollTop:$,scrollHeight:U,clientHeight:J}=B;U-$-J<50&&!b&&w&&y()}),S=!!n;C.useEffect(()=>{S&&I()},[S,I]);const T=E=>{t(E.currentTarget)},R=()=>{t(null),s(!1),o("")},O=E=>{e.switchPassport(()=>{window.location.reload()},{orgId:E.id}),R()},L=()=>{s(!0)},M=()=>{const E=ni(Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user/orgs"),{locale:r});window.location.href=E,R()},H=E=>g.jsxs(zn,{onClick:()=>O(E),selected:E.id===h.id,sx:{py:1.5,px:2,"&.Mui-selected":{backgroundColor:"action.selected","&:hover":{backgroundColor:"action.hover"}}},children:[g.jsx(ts,{sx:{minWidth:40},children:g.jsx(rr,{sx:{width:28,height:28,fontSize:14,bgcolor:E.isOwner?"primary.main":"grey.400"},children:E.name?.[0]})}),g.jsxs(re,{sx:{display:"flex",alignItems:"center",flex:1},children:[g.jsx(Ua,{sx:{"& .MuiListItemText-primary":{mb:0},"& .MuiListItemText-secondary":{mt:"-2px"}},primary:g.jsx(de,{variant:"body2",sx:{fontWeight:500,lineHeight:1.2},children:E.name}),secondary:g.jsx(de,{variant:"caption",color:"text.secondary",sx:{lineHeight:1.1},children:E.passports?.[0]?.title})}),E.id===h.id&&g.jsx(re,{sx:{display:"flex",alignItems:"center",justifyContent:"center",ml:1},children:g.jsx(de,{variant:"caption",color:"primary",sx:{fontSize:10},children:"✓"})})]})]},E.id);return g.jsxs(re,{children:[g.jsxs(Ct,{ref:l,onClick:T,endIcon:g.jsx(yg,{}),sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1,borderRadius:1,textTransform:"none",color:"text.primary","&:hover":{backgroundColor:"action.hover"}},"data-testid":"org-switch-button",children:[g.jsx(rr,{sx:{width:24,height:24,fontSize:12,bgcolor:"primary.main"},children:h.name?.[0]}),g.jsx(de,{variant:"body2",sx:{fontWeight:500},children:h.name})]}),g.jsxs(wh,{anchorEl:n,open:S,onClose:R,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{sx:{width:340,maxHeight:480,overflow:"visible",mt:.5,borderRadius:2,boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.08)",border:E=>`1px solid ${E.palette.divider}`}},MenuListProps:{sx:{py:0}},children:[g.jsx(re,{sx:{p:1.5,pb:1},children:g.jsx(ut,{fullWidth:!0,size:"small",placeholder:c("search"),value:i,onChange:E=>o(E.target.value),InputProps:{startAdornment:g.jsx(Mn,{position:"start",children:g.jsx(xg,{fontSize:"small",color:"action"})})},onClick:E=>E.stopPropagation(),onKeyDown:E=>E.stopPropagation(),sx:{"& .MuiOutlinedInput-root":{borderRadius:1}}})}),g.jsx(re,{sx:{px:2,pb:1},children:g.jsx(de,{variant:"subtitle2",color:"text.secondary",sx:{fontSize:11,fontWeight:600,textTransform:"uppercase",letterSpacing:.5},children:c("orgs")})}),g.jsx(re,{sx:{maxHeight:240,overflow:"auto"},onScroll:D,children:_.length>0?g.jsx(g.Fragment,{children:_.map((E,B)=>{const $=B===_.length-1;return g.jsxs(re,{children:[H(E),$&&w&&g.jsx(re,{sx:{display:"flex",justifyContent:"center",py:1,color:"text.secondary",fontSize:"0.875rem"},children:b?c("loadingMore"):""})]},E.id)})}):g.jsx(re,{sx:{px:2,py:3,textAlign:"center"},children:g.jsx(de,{variant:"body2",color:"text.secondary",children:c("myJoinedEmpty")})})}),g.jsx(Ha,{}),g.jsxs(zn,{onClick:L,sx:{py:1.5,px:2,"&:hover":{backgroundColor:"action.hover"}},children:[g.jsx(ts,{sx:{minWidth:40},children:g.jsx(rr,{sx:{width:28,height:28,bgcolor:"success.main",color:"success.contrastText"},children:g.jsx(Sg,{fontSize:"small"})})}),g.jsx(Ua,{primary:g.jsx(de,{variant:"body2",sx:{fontWeight:500},children:c("createNew")})})]}),g.jsx(Ha,{}),g.jsx(re,{sx:{p:1.5},children:g.jsx(Ct,{onClick:M,variant:"text",component:"a",size:"small",endIcon:g.jsx(wg,{fontSize:"small"}),sx:{color:"primary.main",fontWeight:500,p:0,fontSize:14,minWidth:"auto","&:hover":{backgroundColor:"transparent",textDecoration:"underline"}},children:c("viewAll")})})]}),a&&g.jsx(Hd,{onSuccess:M,onCancel:()=>s(!1),locale:r})]})}Ud.propTypes={session:x.object.isRequired,locale:x.string};const AS=()=>!!(window?.blocklet?.navigation??[]).find(e=>e.id==="/userCenter/notification"),LS=e=>{const{settings:r={}}=e??window?.blocklet??{};return r?.org?.enabled||!1},zS=()=>{const{pathname:e=""}=window.location||{};return e.startsWith(be.WELLKNOWN_BLOCKLET_ADMIN_PATH)};function ba({formattedBlocklet:e,addons:r=null,showDomainWarningDialog:n=!0,sessionManagerProps:t={showRole:!0}}){const i=C.use(ri),{locale:o,languages:a,defaultLocale:s}=Ee()||{},{enableConnect:l=!0,enableLocale:c=!0}=e,u=!!i?.session?.user;let d=ir({navigation:e?.navigation?.sessionManager,locale:o,defaultLocale:s})||[];d=Ld(d,i?.session?.user?.role);const f=(()=>{if(r&&typeof r!="function")return Array.isArray(r)?r:[r];let v=[];if(AS()&&v.push(g.jsx(Bd,{session:i.session},"notification-addon")),c&&o&&a.length>1&&v.push(g.jsx(Ch,{showText:!1},"locale-selector")),v.push(g.jsx(Ih,{},"theme-mode-toggle")),l&&i){const m=[];u&&(d?d.slice(0,5):[]).forEach(y=>{m.push({label:y.title,icon:y.icon?g.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),v.push(g.jsx(oS,{session:i.session,locale:o},"session-blocklet")),v.push(g.jsx(Rh,{session:i.session,locale:o,menu:m,showRole:!0,...t},"session-user"))}return!zS()&&LS(e)&&i?.session?.user&&v.unshift(g.jsx(Ud,{session:i.session,locale:o},"orgs-switch")),typeof r=="function"&&(v=r(v)||[]),v})(),p=Array.isArray(f)?f:[f],h=[n?g.jsx(Fd,{session:i?.session,locale:o}):null,...p].filter(Boolean);return C.createElement(g.Fragment,null,...h)}ba.propTypes={formattedBlocklet:x.object.isRequired,addons:x.oneOfType([x.func,x.node]),sessionManagerProps:jd,showDomainWarningDialog:x.bool};const qd=()=>{const e=jc();C.useEffect(()=>{(e.wallet||e.arcSphere)&&Th.call("arcHideTopBar","{}")},[e])},jS="blocklet-ui-react-embed-mode";function Vd(e){const r=e.displayName||e.name||"Component";function n(t){const[i]=Dg(jS,{defaultValue:0,listenStorageChange:!0});return i===1?null:g.jsx(e,{...t})}return n.displayName=`withHideWhenEmbed(${r})`,n}const FS={en:{products:"Products"},zh:{products:"产品"},"zh-TW":{products:"產品"},ja:{products:"製品"}},BS=e=>{if(!e?.length)return{navItems:[],activeId:null};let r=1;const n=Wt(e,o=>{const a=o.icon?g.jsx(nt,{icon:o.icon}):null;if(o.items)return{id:`${r++}`,label:o.title,icon:a,children:o.items};let s={};return(o.link?.startsWith("http")||o.link?.startsWith("//"))&&(s={target:"_blank",rel:"noreferrer"}),{id:`${r++}`,label:g.jsx("a",{href:Ec(o.link,"header"),...s,children:o.title}),icon:a,description:o.description,link:o.link}},"items"),t=Rd(n),i=Dd(t.map(o=>o.link));return{navItems:n,activeId:i>=0?t[i].id:null}};function $S({meta:e={},addons:r=void 0,sessionManagerProps:n={showRole:!0},homeLink:t=kn,theme:i={},hideNavMenu:o=!1,showDomainWarningDialog:a=!0,...s}){qd();const l=ot(),{locale:c,defaultLocale:u}=Ee()||{},d=oe((P,w={})=>ti(FS,P,c,"en",w)),f=C.useMemo(()=>{const P=Object.assign({},window.blocklet,e);try{return ma(P)}catch(w){return console.error("Failed to format blocklet info",w,P),P}},[e]),p=C.useMemo(()=>$c(l,i),[l,i]),h=Go({meta:e,theme:i}),{productsOrder:v,productsType:m}=C.useMemo(()=>{let{USE_ARCBLOCK_THEME:P,USE_AIGNE_THEME:w}=f;return P=parseInt(P,10),w=parseInt(w,10),rs(w)?{productsOrder:w,productsType:"AIGNE"}:rs(P)?{productsOrder:P,productsType:"ARCBLOCK"}:{productsOrder:null,productsType:null}},[f]);if(!f.appName)return null;const y=ir({navigation:f?.navigation?.header,locale:c,defaultLocale:u}),b=BS(y),{navItems:I,activeId:_}=b;return m&&Number.isInteger(v)&&I.splice(v,0,{label:d("products"),children:()=>g.jsx(Dh,{type:m})}),g.jsx(Gc,{theme:p,children:g.jsx(GS,{homeLink:t,logo:g.jsx("img",{src:h,alt:"logo"}),addons:g.jsx(ba,{formattedBlocklet:f,addons:typeof r=="function"?P=>r(P,{navigation:b}):r,sessionManagerProps:n,showDomainWarningDialog:a}),...At(s,["bordered"]),$bordered:s?.bordered,$bgcolor:p.palette.background.default,className:ct("blocklet__header",s.className),children:o||!I?.length?null:({isMobile:P})=>g.jsx(Ph,{mode:P?"inline":"horizontal",activeId:_,items:I,className:"header-nav",bgColor:"transparent",textColor:p.palette.grey[500],activeTextColor:p.palette.text.primary})})})}const GS=Qe(_h)`
111
111
  ${({$bgcolor:e})=>`background-color: ${e||"#fff"};`}
112
112
  .header-logo {
113
113
  min-width: 44px;
@@ -165,7 +165,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
165
165
  }
166
166
  }
167
167
  }
168
- `;function Po({links:e=[],flowLayout:r=!1,minColumns:n=1,maxColumns:t=4,...i}){const[o,a]=C.useState(-1),s=Xc({key:"md"}),l=e.some(p=>p.items?.length),c=!s&&l&&Eg(n)&&n>1&&t>=n,u=c?Math.min(Math.max(e.length,n),t):1,d=({label:p,link:h,icon:v,render:m,props:b})=>{let y=p;if(m)y=m({label:p,link:h,props:b});else if(h&&Pc(h)){const I=h.startsWith("http")||h.startsWith("//"),_=_d(h)?{}:{target:I?"_blank":"_self",rel:I?"noreferrer noopener":void 0};y=g.jsx("a",{href:h,"aria-label":`Footer link for ${p}`,..._,...b,children:p})}return g.jsxs(g.Fragment,{children:[v&&g.jsx(nt,{icon:v,size:20,sx:{mr:.5}}),y]})},f=Te(()=>e?.length?r?e.map((p,h)=>g.jsx("span",{className:"footer-links-item",children:d(p)},h)):c?jx(e,{columns:u}).map((p,h)=>g.jsx("div",{className:"footer-links-column",children:p.filter(v=>v.group).map((v,m)=>{const{items:b}=v;return g.jsxs("div",{className:"footer-links-group",children:[g.jsx("span",{className:"footer-links-item",children:d(v)}),!!b?.length&&g.jsx("div",{className:"footer-links-sub",children:b.map((y,I)=>g.jsx("span",{className:ct("footer-links-item",{"footer-links-item--new":y.isNew}),children:d(y)},I))})]},m)})},h)):e.map((p,h)=>{const{items:v}=p,m=h===o;return g.jsxs("div",{className:ct("footer-links-group",{"footer-links-group--active":m}),onClick:()=>a(o===h?-1:h),children:[g.jsxs("span",{className:"footer-links-item",children:[d(p),!!v?.length&&g.jsx("span",{className:"footer-links-group-expand-icon",children:g.jsx(kh,{style:{transform:`rotate(${m?180:0}deg)`}})})]}),!!v?.length&&g.jsx("div",{className:"footer-links-sub",children:v.map((b,y)=>g.jsx("span",{className:ct("footer-links-item",{"footer-links-item--new":b.isNew}),children:d(b)},y))})]},h)}):null,[e,r,c,o]);return e?.length?g.jsx(US,{columns:u,...i,className:ct(i.className,{"footer-links--grouped":l,"footer-links--flow":r,"footer-links--columns":c}),children:g.jsx("div",{className:"footer-links-inner",children:f})}):null}Po.propTypes={links:x.arrayOf(x.shape({label:x.string,link:x.string,render:x.func,props:x.object})),flowLayout:x.bool,minColumns:x.number,maxColumns:x.number};const US=Qe("div",{shouldForwardProp:e=>e!=="columns"})`
168
+ `;function Po({links:e=[],flowLayout:r=!1,minColumns:n=1,maxColumns:t=4,...i}){const[o,a]=C.useState(-1),s=Xc({key:"md"}),l=e.some(p=>p.items?.length),c=!s&&l&&Eg(n)&&n>1&&t>=n,u=c?Math.min(Math.max(e.length,n),t):1,d=({label:p,link:h,icon:v,render:m,props:y})=>{let b=p;if(m)b=m({label:p,link:h,props:y});else if(h&&Pc(h)){const I=h.startsWith("http")||h.startsWith("//"),_=_d(h)?{}:{target:I?"_blank":"_self",rel:I?"noreferrer noopener":void 0};b=g.jsx("a",{href:h,"aria-label":`Footer link for ${p}`,..._,...y,children:p})}return g.jsxs(g.Fragment,{children:[v&&g.jsx(nt,{icon:v,size:20,sx:{mr:.5}}),b]})},f=Te(()=>e?.length?r?e.map((p,h)=>g.jsx("span",{className:"footer-links-item",children:d(p)},h)):c?jx(e,{columns:u}).map((p,h)=>g.jsx("div",{className:"footer-links-column",children:p.filter(v=>v.group).map((v,m)=>{const{items:y}=v;return g.jsxs("div",{className:"footer-links-group",children:[g.jsx("span",{className:"footer-links-item",children:d(v)}),!!y?.length&&g.jsx("div",{className:"footer-links-sub",children:y.map((b,I)=>g.jsx("span",{className:ct("footer-links-item",{"footer-links-item--new":b.isNew}),children:d(b)},I))})]},m)})},h)):e.map((p,h)=>{const{items:v}=p,m=h===o;return g.jsxs("div",{className:ct("footer-links-group",{"footer-links-group--active":m}),onClick:()=>a(o===h?-1:h),children:[g.jsxs("span",{className:"footer-links-item",children:[d(p),!!v?.length&&g.jsx("span",{className:"footer-links-group-expand-icon",children:g.jsx(kh,{style:{transform:`rotate(${m?180:0}deg)`}})})]}),!!v?.length&&g.jsx("div",{className:"footer-links-sub",children:v.map((y,b)=>g.jsx("span",{className:ct("footer-links-item",{"footer-links-item--new":y.isNew}),children:d(y)},b))})]},h)}):null,[e,r,c,o]);return e?.length?g.jsx(US,{columns:u,...i,className:ct(i.className,{"footer-links--grouped":l,"footer-links--flow":r,"footer-links--columns":c}),children:g.jsx("div",{className:"footer-links-inner",children:f})}):null}Po.propTypes={links:x.arrayOf(x.shape({label:x.string,link:x.string,render:x.func,props:x.object})),flowLayout:x.bool,minColumns:x.number,maxColumns:x.number};const US=Qe("div",{shouldForwardProp:e=>e!=="columns"})`
169
169
  overflow: hidden;
170
170
  color: ${({theme:e})=>e.palette.text.secondary};
171
171
  .footer-links-inner {
@@ -383,29 +383,29 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
383
383
  flex-wrap: wrap;
384
384
  gap: 8px;
385
385
  }
386
- `,Zd=[{name:"plain",support:(e,r)=>!r.navigation?.length&&!r.socialMedia?.length,component:Qd},{name:"standard",support:()=>!0,component:Xd}],XS=Zd.reduce((e,r)=>({...e,[r.name]:r}),{});function ef({...e}){const{brand:r=null,navigation:n=null,socialMedia:t=null,copyright:i=null,links:o=null,layout:a="auto",...s}=e,l=()=>r?g.jsx(Kd,{...r}):null,c=()=>n?.length?g.jsx(Po,{links:n,minColumns:3}):null,u=()=>t?.length?g.jsx(Yd,{items:t}):null,d=()=>{const v=i?.owner||r?.name;return v?g.jsx(Jd,{owner:v,year:i?.year||void 0}):null},f=()=>o?.length?g.jsx(Po,{flowLayout:!0,links:o}):null,p={brand:l(),navigation:c(),socialMedia:u(),copyright:d(),links:f()};let h=null;if(a==="auto"?h=Zd.find(v=>v.support(p,e)).component:h=XS[a]?.component,!h)throw new Error(`layout ${a} is not supported.`);return g.jsxs(re,{...s,className:ct("blocklet__footer",s.className),sx:[{position:"relative"},...Array.isArray(s.sx)?s.sx:[s.sx]],children:[g.jsx(h,{elements:p,data:e}),g.jsx(re,{sx:{position:"absolute",right:16,bottom:0,fontSize:12,color:"transparent","::selection":{background:"#000",color:"#fff"}},children:window?.blocklet?.version})]})}ef.propTypes={brand:x.shape({name:x.node,description:x.string,logo:x.node}),navigation:x.arrayOf(x.shape({label:x.node,link:x.string})),socialMedia:x.arrayOf(x.shape({icon:x.node,link:x.string})),copyright:x.shape({owner:x.string,year:x.oneOfType([x.string,x.number])}),links:x.arrayOf(x.shape({label:x.node,link:x.string})),layout:x.oneOf(["auto","standard","plain"])};function tf({meta:e={},theme:r={},...n}){const{locale:t,defaultLocale:i}=Ee()||{},o=ot(),a=C.useMemo(()=>{const m=Object.assign({},window.blocklet,e);try{return ma(m)}catch(b){return console.error("Failed to format blocklet info",b,m),m}},[e]),s=C.useMemo(()=>$c(o,r),[o,r]),l=Go({key:"xs",meta:e,theme:r});if(!a.appName)return null;const{appName:c,appDescription:u,description:d,copyright:f}=a,p=s.palette.background.default,h={footerNav:ir({navigation:a?.navigation?.footer,locale:t,defaultLocale:i,section:"footer"})||[],socialMedia:ir({navigation:a?.navigation?.social,locale:t,defaultLocale:i,section:"footer"})||[],links:ir({navigation:a?.navigation?.bottom,locale:t,defaultLocale:i,section:"footer"})||[]},v={brand:{name:c,description:u||d,logo:l},navigation:Wt(h.footerNav,m=>({...m,label:m.title,link:m.link}),"items"),copyright:f,socialMedia:h.socialMedia,links:h.links.map(m=>({...m,label:m.title}))};return g.jsx(Gc,{theme:s,children:g.jsx(QS,{...v,...At(n,["bordered"]),$bordered:n?.bordered,$bgcolor:p})})}tf.propTypes={meta:zd,theme:x.object};const QS=Qe(ef)`
386
+ `,Zd=[{name:"plain",support:(e,r)=>!r.navigation?.length&&!r.socialMedia?.length,component:Qd},{name:"standard",support:()=>!0,component:Xd}],XS=Zd.reduce((e,r)=>({...e,[r.name]:r}),{});function ef({...e}){const{brand:r=null,navigation:n=null,socialMedia:t=null,copyright:i=null,links:o=null,layout:a="auto",...s}=e,l=()=>r?g.jsx(Kd,{...r}):null,c=()=>n?.length?g.jsx(Po,{links:n,minColumns:3}):null,u=()=>t?.length?g.jsx(Yd,{items:t}):null,d=()=>{const v=i?.owner||r?.name;return v?g.jsx(Jd,{owner:v,year:i?.year||void 0}):null},f=()=>o?.length?g.jsx(Po,{flowLayout:!0,links:o}):null,p={brand:l(),navigation:c(),socialMedia:u(),copyright:d(),links:f()};let h=null;if(a==="auto"?h=Zd.find(v=>v.support(p,e)).component:h=XS[a]?.component,!h)throw new Error(`layout ${a} is not supported.`);return g.jsxs(re,{...s,className:ct("blocklet__footer",s.className),sx:[{position:"relative"},...Array.isArray(s.sx)?s.sx:[s.sx]],children:[g.jsx(h,{elements:p,data:e}),g.jsx(re,{sx:{position:"absolute",right:16,bottom:0,fontSize:12,color:"transparent","::selection":{background:"#000",color:"#fff"}},children:window?.blocklet?.version})]})}ef.propTypes={brand:x.shape({name:x.node,description:x.string,logo:x.node}),navigation:x.arrayOf(x.shape({label:x.node,link:x.string})),socialMedia:x.arrayOf(x.shape({icon:x.node,link:x.string})),copyright:x.shape({owner:x.string,year:x.oneOfType([x.string,x.number])}),links:x.arrayOf(x.shape({label:x.node,link:x.string})),layout:x.oneOf(["auto","standard","plain"])};function tf({meta:e={},theme:r={},...n}){const{locale:t,defaultLocale:i}=Ee()||{},o=ot(),a=C.useMemo(()=>{const m=Object.assign({},window.blocklet,e);try{return ma(m)}catch(y){return console.error("Failed to format blocklet info",y,m),m}},[e]),s=C.useMemo(()=>$c(o,r),[o,r]),l=Go({key:"xs",meta:e,theme:r});if(!a.appName)return null;const{appName:c,appDescription:u,description:d,copyright:f}=a,p=s.palette.background.default,h={footerNav:ir({navigation:a?.navigation?.footer,locale:t,defaultLocale:i,section:"footer"})||[],socialMedia:ir({navigation:a?.navigation?.social,locale:t,defaultLocale:i,section:"footer"})||[],links:ir({navigation:a?.navigation?.bottom,locale:t,defaultLocale:i,section:"footer"})||[]},v={brand:{name:c,description:u||d,logo:l},navigation:Wt(h.footerNav,m=>({...m,label:m.title,link:m.link}),"items"),copyright:f,socialMedia:h.socialMedia,links:h.links.map(m=>({...m,label:m.title}))};return g.jsx(Gc,{theme:s,children:g.jsx(QS,{...v,...At(n,["bordered"]),$bordered:n?.bordered,$bgcolor:p})})}tf.propTypes={meta:zd,theme:x.object};const QS=Qe(ef)`
387
387
  ${({$bordered:e,theme:r})=>`border-top: 1px solid ${e&&r.palette.divider};`}
388
388
  color: ${({theme:e})=>e.palette.text.secondary};
389
389
  ${({$bgcolor:e})=>e&&`background-color: ${e};`}
390
- `,ZS=Fc(Vd(tf),{FallbackComponent:Bc});Oh();var On={exports:{}},ew=On.exports,zl;function tw(){return zl||(zl=1,function(e,r){(function(n,t){e.exports=t(Wc())})(ew,function(n){function t(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var i=t(n),o={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,s){return s==="W"?a+"週":a+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(a,s){var l=100*a+s;return l<600?"凌晨":l<900?"早上":l<1100?"上午":l<1300?"中午":l<1800?"下午":"晚上"}};return i.default.locale(o,null,!0),o})}(On)),On.exports}tw();var En={exports:{}},rw=En.exports,jl;function nw(){return jl||(jl=1,function(e,r){(function(n,t){e.exports=t(Wc())})(rw,function(n){function t(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var i=t(n),o={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a){return a+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(a){return a<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return i.default.locale(o,null,!0),o})}(En)),En.exports}nw();const iw=(e="")=>e.startsWith("http:")||e.startsWith("https:"),ow=e=>{try{return new URL(e).origin===window.location.origin}catch{return!1}};Xe("span")(({theme:e,color:r})=>({position:"relative",display:"inline-block",width:e.spacing(1),height:e.spacing(1),borderRadius:"50%",backgroundColor:r,marginRight:e.spacing(1)}));const bn=Xe(re)(({theme:e})=>({position:"relative",display:"inline-flex",alignItems:"center",height:e.spacing(3),paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5),border:"1px solid",borderColor:e.palette.divider,borderRadius:e.shape.borderRadius*.5,fontSize:12,overflow:"hidden","& .app-badge-label":{display:"inline-flex",gap:e.spacing(1),alignItems:"center",lineHeight:e.spacing(3),marginLeft:e.spacing(-1.5),paddingLeft:e.spacing(1.5),marginRight:e.spacing(1),fontSize:12,backgroundColor:e.palette.grey[100],color:e.palette.text.secondary,"&::after":{content:'""',height:e.spacing(3),borderRight:"1px solid",borderColor:e.palette.divider,backgroundColor:e.palette.grey[100]}},"& .app-badge-value":{color:e.palette.text.primary,fontSize:12}}));function ln({loading:e=!1,children:r=null,to:n="",...t}){const i=g.jsx(bn,{className:"app-badge",component:n?"a":"div",href:n,...t,children:r});if(e)return g.jsx(In,{variant:"rounded",children:i});if(n){if(iw(n)){const o=ow(n)?"_self":"_blank";return g.jsx(bn,{className:"app-badge",component:"a",href:n,target:o,rel:"noreferrer noopener",...t,children:r})}return g.jsx(bn,{className:"app-badge",component:Eh,to:n,...t,children:r})}return g.jsx(bn,{className:"app-badge",component:"div",...t,children:r})}function Gi({icon:e="",label:r="",value:n="",loading:t=!1,...i}){return g.jsxs(ln,{loading:t,...i,children:[r&&g.jsxs(de,{className:"app-badge-label",children:[e&&g.jsx(ye,{icon:e}),r]}),g.jsx(de,{className:"app-badge-value",children:n})]})}function aw({label:e="",value:r=void 0,trueValue:n=!0,falseValue:t=!1,loading:i=!1,onChange:o=void 0,...a}){const s=ot();let l=!1;const c=oe(()=>o?.(!l));return r===n?l=!0:r===t?l=!1:l=!!r,g.jsxs(ln,{loading:i,sx:{cursor:"pointer",backgroundColor:l?"primary.main":"grey.100",borderColor:l?"primary.main":"divider",transition:"background-color 0.3s ease"},onClick:c,...a,children:[g.jsx(de,{sx:{fontWeight:400,paddingLeft:l?0:s.spacing(2.5),paddingRight:l?s.spacing(2.5):0,color:l?"common.white":"text.secondary",transition:"color 0.3s ease"},children:e}),g.jsx(re,{sx:{width:s.spacing(2.5),height:s.spacing(2.5),borderRadius:`${s.shape.borderRadius*.5}px`,backgroundColor:"common.white",position:"absolute",top:"50%",left:l?`calc(100% - ${s.spacing(3)})`:s.spacing(.5),transform:"translateY(-50%)",transition:"left 0.3s ease",boxShadow:1}})]})}const Un={primary:e=>e.palette.primary,info:e=>e.palette.info,success:e=>e.palette.success,error:e=>e.palette.error,warning:e=>e.palette.warning},rf=(e,r)=>{if(Un[r]){const n=Un[r](e).main;return jn(n,.1)}return jn(r,.1)},ko=(e,r)=>Un[r]?Un[r](e).main:r;function sw({icon:e="",value:r="",color:n="info",loading:t=!1,...i}){const o=ot(),a=ko(o,n),s=rf(o,n);return g.jsxs(ln,{loading:t,sx:{borderColor:jn(a,.2),bgcolor:s},...i,children:[g.jsx(ye,{icon:e||"lucide:orbit",style:{marginRight:6}}),g.jsxs(de,{className:"app-badge-value",style:{color:a},children:["v ",r]})]})}const lw=Xe("span")(({theme:e,color:r})=>({position:"relative",display:"inline-block",width:e.spacing(1),height:e.spacing(1),borderRadius:"50%",backgroundColor:r,marginRight:e.spacing(1)}));function cw({value:e="",color:r="primary",loading:n=!1,...t}){const i=ot(),o=ko(i,r),a=rf(i,r);return g.jsxs(ln,{loading:n,sx:{borderColor:jn(o,.2),bgcolor:a},...t,children:[g.jsx(lw,{color:ko(i,r)}),g.jsx(de,{className:"app-badge-value",style:{color:o},children:e})]})}function uw({value:e="",loading:r=!1,...n}){const t=Te(()=>`DID:${Nh(e)?"ETH":"ABT"}`,[e]);return g.jsxs(ln,{loading:r,...n,children:[g.jsx(de,{className:"app-badge-label",children:t}),g.jsx(de,{className:"app-badge-value",children:g.jsx(Mh,{inline:!0,size:14,compact:!0,responsive:!1,children:e})})]})}Wo.extend(Ah);Wo.extend(Lh);const dw=(e,r=0)=>{if(typeof e!="number")return"";const n=Math.abs(e);let t,i="";return n>=1e12?(i="T",t=`${(e/1e12).toFixed(r)}`):n>=1e9?(i="B",t=`${(e/1e9).toFixed(r)}`):n>=1e6?(i="M",t=`${(e/1e6).toFixed(r)}`):n>=1e3?(i="K",t=`${(e/1e3).toFixed(r)}`):t=e.toString(),r>0&&(t=t.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")),`${t}${i}`},fw=(e,r="en")=>e?Wo(e).locale(r).fromNow():"",pw={switch:aw,version:sw,state:cw,did:uw};function hw(e){const{locale:r="en"}=Ee()||{};if(e.variant==="number"){const{value:n,round:t=0,...i}=e,o=dw(Number(n),t);return g.jsx(Gi,{value:o,...i})}if(e.variant==="time"){const{value:n,...t}=e,i=fw(n,r);return g.jsx(Gi,{value:i,...t})}if(e.variant){const n=pw[e.variant];if(n)return g.jsx(n,{...e})}return g.jsx(Gi,{...e})}const nf=C.createContext({currentTab:"",TabComponent:null,navItem:void 0,updateAppInfo:()=>{}}),Cr=(e,r,n="en")=>{const t=e?.[r];return Hc(t)?t[n]||t.en:t};function gw({path:e=window?.location?.pathname||"",currentTab:r="",meta:n=void 0,children:t=null}){const{locale:i="en"}=Ee()||{},o=to(e),a=o.startsWith(be.WELLKNOWN_BLOCKLET_ADMIN_PATH),s=Te(()=>Object.assign({},window.blocklet,n),[n]),l=Te(()=>{const p=s.navigation?.filter(b=>Array.isArray(b.section)?b.section.includes("dashboard"):b.section==="dashboard"),h=p?.flatMap(b=>b.items||[])?.find(b=>(Cr(b,"link",i)||"").startsWith(o));if(!h)return;const v=p.find(b=>b.id===h.parent);let m=Cr(h,"title",i)||"";return a||(m=`${Cr(v,"title",i)||""} - ${m}`),{id:h.id,parent:h.parent,title:m,link:Cr(h,"link",i)||"",description:Cr(h,"description",i)||""}},[e,a,i,s]),[c,u]=C.useState({}),d=oe(p=>{u(h=>({...h,...p}))}),f=C.useMemo(()=>{const{tabs:p=[]}=c,h=p.find(b=>b.value===r);let v=r,m=null;return!h&&p.length>0?(v=p[0].value,m=p[0].render||null):m=h?.render||null,{...c,navItem:l,currentTab:v,TabComponent:m,updateAppInfo:d}},[c,l,r,d]);return C.useEffect(()=>{a||d({name:l?.title||"",description:l?.description||""})},[l?.title,l?.description,a,d]),g.jsx(nf.Provider,{value:f,children:t})}function vw(){return C.useContext(nf)}function of(){return Zr(e=>e.breakpoints.down("md"))}function Fl({sx:e={}}){const r=of();return g.jsx(re,{sx:{mx:r?-2:-3,borderBottom:"1px solid",borderColor:"divider",mt:1.5,mb:1,...e}})}function mw({onTabChange:e=void 0}){const r=of(),{icon:n=void 0,name:t="",description:i=void 0,actions:o=void 0,badges:a=[],tabs:s=[],currentTab:l=""}=vw();return t?g.jsxs(re,{className:"app-header",sx:{mt:3,mb:3},children:[g.jsxs(re,{sx:{display:"flex",alignItems:"center",gap:1},children:[n&&g.jsx(re,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:n}),g.jsxs(zh,{sx:{flexGrow:1},children:[g.jsx(de,{variant:"h1",sx:{mb:.5},children:t}),i&&g.jsx(de,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.6,"& a":{color:"primary.main"},maxWidth:980},children:i})]}),!r&&o&&g.jsx(re,{sx:{ml:1},children:o})]}),a.length>0&&g.jsx(re,{sx:{display:"flex",flexWrap:"wrap",gap:1,alignItems:"center",mt:2},children:a.map((c,u)=>C.isValidElement(c)?c:g.jsx(hw,{...c},c.label||u))}),r&&o&&g.jsx(re,{sx:{mt:r?2:0},children:o}),s.length<=1&&g.jsx(Fl,{}),s.length>1&&g.jsxs(g.Fragment,{children:[g.jsx(pg,{tabs:s,current:l,onChange:e,scrollButtons:"auto",sx:{mt:2.5}}),g.jsx(Fl,{sx:{mt:0}})]})]}):null}function af({meta:e={},fallbackUrl:r=kn,invalidPathFallback:n=null,headerAddons:t=void 0,sessionManagerProps:i={showRole:!0,onLogout:()=>{window.location.href=kn}},links:o=[],showDomainWarningDialog:a=!0,appPath:s=void 0,appTab:l=void 0,onAppTabChange:c=void 0,children:u=void 0,...d}){qd();const f=C.use(ri)?.session?.user,p=f?.role,{locale:h,defaultLocale:v}=Ee()||{},m=C.useMemo(()=>{const D=Object.assign({},window.blocklet,e);try{return ma(D)}catch(S){return console.error("Failed to format blocklet info",S,D),D}},[e]),{localizedNav:b,flattened:y,matchedIndex:I}=C.useMemo(()=>{let D=ir({navigation:m?.navigation?.dashboard,locale:h,defaultLocale:v})||[];D=Ld(D,p),D=Wt(D,R=>{let O=null;return R.icon&&(R.icon.startsWith("http")||R.icon.startsWith("data:")?O=g.jsx(Fh,{src:R.icon}):O=g.jsx("iconify-icon",{height:"100%",width:"100%",icon:R.icon})),{id:R.id,title:R.title,url:R.link,icon:O,external:!0,children:R.items}},"items");const S=Rd(D).filter(R=>!!R.url),T=Dd(S.map(R=>R.url));return T!==-1&&(S[T].active=!0),{localizedNav:D,flattened:S,matchedIndex:T}},[m,h,v,p]),_=typeof o=="function"?o(b):[...b,...o],P=Go({meta:e});if(C.useLayoutEffect(()=>{f&&!y?.length&&r&&(window.location.href=r)},[r]),C.useLayoutEffect(()=>{f&&y?.length&&I===-1&&n&&n()},[n,y,I]),!m.appName)return null;const{appName:w}=m;return g.jsx(jh,{title:w,fullWidth:!0,sidebarWidth:128,legacy:!1,links:_,...d,headerProps:{homeLink:kn,logo:g.jsx("img",{src:P,alt:"logo"}),addons:g.jsx(ba,{formattedBlocklet:m,addons:t,sessionManagerProps:i,showDomainWarningDialog:a}),...d.headerProps},children:g.jsxs(gw,{path:s,currentTab:l,meta:e,children:[g.jsx(mw,{onTabChange:c}),u]})})}af.propTypes={meta:zd,fallbackUrl:x.string,invalidPathFallback:x.func,headerAddons:x.oneOfType([x.func,x.node]),sessionManagerProps:jd,links:x.oneOfType([x.array,x.func]),showDomainWarningDialog:x.bool,appPath:x.string,appTab:x.string,onAppTabChange:x.func,children:x.node};function sf(e,r){return e?r===e.nodeName?!0:sf(e.parentNode,r):!1}function bw({...e}){return g.jsx("div",{onClick:r=>{sf(r.target,"A")&&r.preventDefault()},...e})}function lf({className:e="",navigation:r=[]}){const{blocklet:n}=$t(),{locale:t}=Ee(),{languages:i}=pa(),o=Bh({blocklet:n,square:!0}),a=n?.environments?.find(u=>u.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER)?.value,s=n?.environments?.find(u=>u.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR)?.value,l=a||s?{owner:a,year:s}:void 0,c={appId:n.appDid,appLogo:o,appName:n.meta.title,enableConnect:!0,enableLocale:!1,navigation:r,copyright:l};return g.jsx($h,{translations:Cg,locale:t,languages:i,children:g.jsx(bw,{children:g.jsxs(re,{className:e,children:[g.jsx(WS,{meta:c,showDomainWarningDialog:!1,sx:{".header-container":{maxWidth:"none"}}}),g.jsx(re,{children:g.jsx(af,{meta:c,invalidPathFallback:()=>{},headerProps:{style:{display:"none"}},hideHtmlTitle:!0,showDomainWarningDialog:!1,children:g.jsx(qa,{container:!0,spacing:2,children:new Array(6).fill().map((u,d)=>g.jsxs(qa,{size:4,children:[g.jsx(In,{animation:!1,variant:"rectangular",width:"100%",height:120}),g.jsxs(re,{sx:{pt:.5},children:[g.jsx(In,{animation:!1}),g.jsx(In,{width:"60%",animation:!1})]})]},d))})})}),g.jsx(ZS,{meta:c,sx:{".MuiContainer-root":{maxWidth:"none"}}})]})})})}lf.propTypes={className:x.string,navigation:x.array};const yw=dr(lf)`
390
+ `,ZS=Fc(Vd(tf),{FallbackComponent:Bc});Oh();var On={exports:{}},ew=On.exports,zl;function tw(){return zl||(zl=1,function(e,r){(function(n,t){e.exports=t(Wc())})(ew,function(n){function t(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var i=t(n),o={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,s){return s==="W"?a+"週":a+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(a,s){var l=100*a+s;return l<600?"凌晨":l<900?"早上":l<1100?"上午":l<1300?"中午":l<1800?"下午":"晚上"}};return i.default.locale(o,null,!0),o})}(On)),On.exports}tw();var En={exports:{}},rw=En.exports,jl;function nw(){return jl||(jl=1,function(e,r){(function(n,t){e.exports=t(Wc())})(rw,function(n){function t(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var i=t(n),o={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a){return a+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(a){return a<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return i.default.locale(o,null,!0),o})}(En)),En.exports}nw();const iw=(e="")=>e.startsWith("http:")||e.startsWith("https:"),ow=e=>{try{return new URL(e).origin===window.location.origin}catch{return!1}};Xe("span")(({theme:e,color:r})=>({position:"relative",display:"inline-block",width:e.spacing(1),height:e.spacing(1),borderRadius:"50%",backgroundColor:r,marginRight:e.spacing(1)}));const bn=Xe(re)(({theme:e})=>({position:"relative",display:"inline-flex",alignItems:"center",height:e.spacing(3),paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5),border:"1px solid",borderColor:e.palette.divider,borderRadius:e.shape.borderRadius*.5,fontSize:12,overflow:"hidden","& .app-badge-label":{display:"inline-flex",gap:e.spacing(1),alignItems:"center",lineHeight:e.spacing(3),marginLeft:e.spacing(-1.5),paddingLeft:e.spacing(1.5),marginRight:e.spacing(1),fontSize:12,backgroundColor:e.palette.grey[100],color:e.palette.text.secondary,"&::after":{content:'""',height:e.spacing(3),borderRight:"1px solid",borderColor:e.palette.divider,backgroundColor:e.palette.grey[100]}},"& .app-badge-value":{color:e.palette.text.primary,fontSize:12}}));function ln({loading:e=!1,children:r=null,to:n="",...t}){const i=g.jsx(bn,{className:"app-badge",component:n?"a":"div",href:n,...t,children:r});if(e)return g.jsx(In,{variant:"rounded",children:i});if(n){if(iw(n)){const o=ow(n)?"_self":"_blank";return g.jsx(bn,{className:"app-badge",component:"a",href:n,target:o,rel:"noreferrer noopener",...t,children:r})}return g.jsx(bn,{className:"app-badge",component:Eh,to:n,...t,children:r})}return g.jsx(bn,{className:"app-badge",component:"div",...t,children:r})}function Gi({icon:e="",label:r="",value:n="",loading:t=!1,...i}){return g.jsxs(ln,{loading:t,...i,children:[r&&g.jsxs(de,{className:"app-badge-label",children:[e&&g.jsx(ye,{icon:e}),r]}),g.jsx(de,{className:"app-badge-value",children:n})]})}function aw({label:e="",value:r=void 0,trueValue:n=!0,falseValue:t=!1,loading:i=!1,onChange:o=void 0,...a}){const s=ot();let l=!1;const c=oe(()=>o?.(!l));return r===n?l=!0:r===t?l=!1:l=!!r,g.jsxs(ln,{loading:i,sx:{cursor:"pointer",backgroundColor:l?"primary.main":"grey.100",borderColor:l?"primary.main":"divider",transition:"background-color 0.3s ease"},onClick:c,...a,children:[g.jsx(de,{sx:{fontWeight:400,paddingLeft:l?0:s.spacing(2.5),paddingRight:l?s.spacing(2.5):0,color:l?"common.white":"text.secondary",transition:"color 0.3s ease"},children:e}),g.jsx(re,{sx:{width:s.spacing(2.5),height:s.spacing(2.5),borderRadius:`${s.shape.borderRadius*.5}px`,backgroundColor:"common.white",position:"absolute",top:"50%",left:l?`calc(100% - ${s.spacing(3)})`:s.spacing(.5),transform:"translateY(-50%)",transition:"left 0.3s ease",boxShadow:1}})]})}const Un={primary:e=>e.palette.primary,info:e=>e.palette.info,success:e=>e.palette.success,error:e=>e.palette.error,warning:e=>e.palette.warning},rf=(e,r)=>{if(Un[r]){const n=Un[r](e).main;return jn(n,.1)}return jn(r,.1)},ko=(e,r)=>Un[r]?Un[r](e).main:r;function sw({icon:e="",value:r="",color:n="info",loading:t=!1,...i}){const o=ot(),a=ko(o,n),s=rf(o,n);return g.jsxs(ln,{loading:t,sx:{borderColor:jn(a,.2),bgcolor:s},...i,children:[g.jsx(ye,{icon:e||"lucide:orbit",style:{marginRight:6}}),g.jsxs(de,{className:"app-badge-value",style:{color:a},children:["v ",r]})]})}const lw=Xe("span")(({theme:e,color:r})=>({position:"relative",display:"inline-block",width:e.spacing(1),height:e.spacing(1),borderRadius:"50%",backgroundColor:r,marginRight:e.spacing(1)}));function cw({value:e="",color:r="primary",loading:n=!1,...t}){const i=ot(),o=ko(i,r),a=rf(i,r);return g.jsxs(ln,{loading:n,sx:{borderColor:jn(o,.2),bgcolor:a},...t,children:[g.jsx(lw,{color:ko(i,r)}),g.jsx(de,{className:"app-badge-value",style:{color:o},children:e})]})}function uw({value:e="",loading:r=!1,...n}){const t=Te(()=>`DID:${Nh(e)?"ETH":"ABT"}`,[e]);return g.jsxs(ln,{loading:r,...n,children:[g.jsx(de,{className:"app-badge-label",children:t}),g.jsx(de,{className:"app-badge-value",children:g.jsx(Mh,{inline:!0,size:14,compact:!0,responsive:!1,children:e})})]})}Wo.extend(Ah);Wo.extend(Lh);const dw=(e,r=0)=>{if(typeof e!="number")return"";const n=Math.abs(e);let t,i="";return n>=1e12?(i="T",t=`${(e/1e12).toFixed(r)}`):n>=1e9?(i="B",t=`${(e/1e9).toFixed(r)}`):n>=1e6?(i="M",t=`${(e/1e6).toFixed(r)}`):n>=1e3?(i="K",t=`${(e/1e3).toFixed(r)}`):t=e.toString(),r>0&&(t=t.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")),`${t}${i}`},fw=(e,r="en")=>e?Wo(e).locale(r).fromNow():"",pw={switch:aw,version:sw,state:cw,did:uw};function hw(e){const{locale:r="en"}=Ee()||{};if(e.variant==="number"){const{value:n,round:t=0,...i}=e,o=dw(Number(n),t);return g.jsx(Gi,{value:o,...i})}if(e.variant==="time"){const{value:n,...t}=e,i=fw(n,r);return g.jsx(Gi,{value:i,...t})}if(e.variant){const n=pw[e.variant];if(n)return g.jsx(n,{...e})}return g.jsx(Gi,{...e})}const nf=C.createContext({inService:!1,currentTab:"",TabComponent:null,navItem:void 0,updateAppInfo:()=>{}}),Nr=(e,r,n="en")=>{const t=e?.[r];return Hc(t)?t[n]||t.en:t},gw=(e,r="",n="en")=>{const t=r==="/"?["/"]:r.split("/").filter(Boolean);let i=null,o=0;return e.forEach(a=>{const s=Nr(a,"link",n)||"",l=s==="/"?["/"]:s.split("/").filter(Boolean);if(l.length>t.length)return;let c=!0;for(let u=0;u<l.length;u++)if(l[u]!==t[u]){c=!1;break}c&&l.length>o&&(i=a,o=l.length)}),i};function vw({path:e=window?.location?.pathname||"",currentTab:r="",meta:n=void 0,children:t=null}){const{locale:i="en"}=Ee()||{},o=to(e),a=o.startsWith(be.WELLKNOWN_BLOCKLET_ADMIN_PATH),s=Te(()=>Object.assign({},window.blocklet,n),[n]),l=Te(()=>{const p=s.navigation?.filter(b=>Array.isArray(b.section)?b.section.includes("dashboard"):b.section==="dashboard"),h=p?.flatMap(b=>b.items||[]),v=gw(h,o,i);if(!v)return;const m=p.find(b=>b.id===v.parent);let y=Nr(v,"title",i)||"";return a||(y=`${Nr(m,"title",i)||""} - ${y}`),{id:v.id,parent:v.parent,title:y,link:Nr(v,"link",i)||"",description:Nr(v,"description",i)||""}},[e,a,i,s]),[c,u]=C.useState({}),d=oe(p=>{u(h=>({...h,...p}))}),f=C.useMemo(()=>{const{tabs:p=[]}=c,h=p.find(y=>y.value===r);let v=r,m=null;return!h&&p.length>0?(v=p[0].value,m=p[0].render||null):m=h?.render||null,{...c,inService:a,navItem:l,currentTab:v,TabComponent:m,updateAppInfo:d}},[c,l,a,r,d]);return g.jsx(nf.Provider,{value:f,children:t})}function mw(){return C.useContext(nf)}function of(){return Zr(e=>e.breakpoints.down("md"))}function Fl({sx:e={}}){const r=of();return g.jsx(re,{sx:{mx:r?-2:-3,borderBottom:"1px solid",borderColor:"divider",mt:1.5,mb:1,...e}})}function bw({onTabChange:e=void 0}){const r=of(),{inService:n,navItem:t,icon:i=void 0,name:o="",description:a=void 0,actions:s=void 0,badges:l=[],tabs:c=[],currentTab:u="",updateAppInfo:d}=mw();return C.useEffect(()=>{n||d({name:t?.title||"",description:t?.description||""})},[t?.title,t?.description,n,d]),o?g.jsxs(re,{className:"app-header",sx:{mt:3,mb:3},children:[g.jsxs(re,{sx:{display:"flex",alignItems:"center",gap:1},children:[i&&g.jsx(re,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:i}),g.jsxs(zh,{sx:{flexGrow:1},children:[g.jsx(de,{variant:"h1",sx:{mb:.5},children:o}),a&&g.jsx(de,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.6,"& a":{color:"primary.main"},maxWidth:980},children:a})]}),!r&&s&&g.jsx(re,{sx:{ml:1},children:s})]}),l.length>0&&g.jsx(re,{sx:{display:"flex",flexWrap:"wrap",gap:1,alignItems:"center",mt:2},children:l.map((f,p)=>C.isValidElement(f)?f:g.jsx(hw,{...f},f.label||p))}),r&&s&&g.jsx(re,{sx:{mt:r?2:0},children:s}),c.length<=1&&g.jsx(Fl,{}),c.length>1&&g.jsxs(g.Fragment,{children:[g.jsx(pg,{tabs:c,current:u,onChange:e,scrollButtons:"auto",sx:{mt:2.5}}),g.jsx(Fl,{sx:{mt:0}})]})]}):null}function af({meta:e=void 0,fallbackUrl:r=kn,invalidPathFallback:n=null,headerAddons:t=void 0,sessionManagerProps:i={showRole:!0,onLogout:()=>{window.location.href=kn}},links:o=[],showDomainWarningDialog:a=!0,appPath:s=void 0,appTab:l=void 0,onAppTabChange:c=void 0,children:u=void 0,...d}){qd();const f=C.use(ri)?.session?.user,p=f?.role,{locale:h,defaultLocale:v}=Ee()||{},m=C.useMemo(()=>{const D=Object.assign({},window.blocklet,e);try{return ma(D)}catch(S){return console.error("Failed to format blocklet info",S,D),D}},[e]),{localizedNav:y,flattened:b,matchedIndex:I}=C.useMemo(()=>{let D=ir({navigation:m?.navigation?.dashboard,locale:h,defaultLocale:v})||[];D=Ld(D,p),D=Wt(D,R=>{let O=null;return R.icon&&(R.icon.startsWith("http")||R.icon.startsWith("data:")?O=g.jsx(Fh,{src:R.icon}):O=g.jsx("iconify-icon",{height:"100%",width:"100%",icon:R.icon})),{id:R.id,title:R.title,url:R.link,icon:O,external:!0,children:R.items}},"items");const S=Rd(D).filter(R=>!!R.url),T=Dd(S.map(R=>R.url));return T!==-1&&(S[T].active=!0),{localizedNav:D,flattened:S,matchedIndex:T}},[m,h,v,p]),_=typeof o=="function"?o(y):[...y,...o],P=Go({meta:e});if(C.useLayoutEffect(()=>{f&&!b?.length&&r&&(window.location.href=r)},[r]),C.useLayoutEffect(()=>{f&&b?.length&&I===-1&&n&&n()},[n,b,I]),!m.appName)return null;const{appName:w}=m;return g.jsx(jh,{title:w,fullWidth:!0,sidebarWidth:128,legacy:!1,links:_,...d,headerProps:{homeLink:kn,logo:g.jsx("img",{src:P,alt:"logo"}),addons:g.jsx(ba,{formattedBlocklet:m,addons:t,sessionManagerProps:i,showDomainWarningDialog:a}),...d.headerProps},children:g.jsxs(vw,{path:s,currentTab:l,meta:e,children:[g.jsx(bw,{onTabChange:c}),u]})})}af.propTypes={meta:zd,fallbackUrl:x.string,invalidPathFallback:x.func,headerAddons:x.oneOfType([x.func,x.node]),sessionManagerProps:jd,links:x.oneOfType([x.array,x.func]),showDomainWarningDialog:x.bool,appPath:x.string,appTab:x.string,onAppTabChange:x.func,children:x.node};function sf(e,r){return e?r===e.nodeName?!0:sf(e.parentNode,r):!1}function yw({...e}){return g.jsx("div",{onClick:r=>{sf(r.target,"A")&&r.preventDefault()},...e})}function lf({className:e="",navigation:r=[]}){const{blocklet:n}=$t(),{locale:t}=Ee(),{languages:i}=pa(),o=Bh({blocklet:n,square:!0}),a=n?.environments?.find(u=>u.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER)?.value,s=n?.environments?.find(u=>u.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR)?.value,l=a||s?{owner:a,year:s}:void 0,c={appId:n.appDid,appLogo:o,appName:n.meta.title,enableConnect:!0,enableLocale:!1,navigation:r,copyright:l};return g.jsx($h,{translations:Cg,locale:t,languages:i,children:g.jsx(yw,{children:g.jsxs(re,{className:e,children:[g.jsx(WS,{meta:c,showDomainWarningDialog:!1,sx:{".header-container":{maxWidth:"none"}}}),g.jsx(re,{children:g.jsx(af,{meta:c,invalidPathFallback:()=>{},headerProps:{style:{display:"none"}},hideHtmlTitle:!0,showDomainWarningDialog:!1,children:g.jsx(qa,{container:!0,spacing:2,children:new Array(6).fill().map((u,d)=>g.jsxs(qa,{size:4,children:[g.jsx(In,{animation:!1,variant:"rectangular",width:"100%",height:120}),g.jsxs(re,{sx:{pt:.5},children:[g.jsx(In,{animation:!1}),g.jsx(In,{width:"60%",animation:!1})]})]},d))})})}),g.jsx(ZS,{meta:c,sx:{".MuiContainer-root":{maxWidth:"none"}}})]})})})}lf.propTypes={className:x.string,navigation:x.array};const xw=dr(lf)`
391
391
  .dashboard {
392
392
  height: auto !important;
393
393
  }
394
394
  .dashboard-content + div {
395
395
  display: none;
396
396
  }
397
- `;var cf=Q.createContext(null);function xw(e){e()}var uf=xw,Sw=function(r){return uf=r},ww=function(){return uf};function Cw(){var e=ww(),r=null,n=null;return{clear:function(){r=null,n=null},notify:function(){e(function(){for(var i=r;i;)i.callback(),i=i.next})},get:function(){for(var i=[],o=r;o;)i.push(o),o=o.next;return i},subscribe:function(i){var o=!0,a=n={callback:i,next:null,prev:n};return a.prev?a.prev.next=a:r=a,function(){!o||r===null||(o=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:r=a.next)}}}}var Bl={notify:function(){},get:function(){return[]}};function df(e,r){var n,t=Bl;function i(d){return l(),t.subscribe(d)}function o(){t.notify()}function a(){u.onStateChange&&u.onStateChange()}function s(){return!!n}function l(){n||(n=r?r.addNestedSub(a):e.subscribe(a),t=Cw())}function c(){n&&(n(),n=void 0,t.clear(),t=Bl)}var u={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:function(){return t}};return u}var ff=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect;function Iw(e){var r=e.store,n=e.context,t=e.children,i=C.useMemo(function(){var s=df(r);return{store:r,subscription:s}},[r]),o=C.useMemo(function(){return r.getState()},[r]);ff(function(){var s=i.subscription;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==r.getState()&&s.notifyNestedSubs(),function(){s.tryUnsubscribe(),s.onStateChange=null}},[i,o]);var a=n||cf;return Q.createElement(a.Provider,{value:i},t)}var Wi={exports:{}},ge={};/** @license React v17.0.2
397
+ `;var cf=Q.createContext(null);function Sw(e){e()}var uf=Sw,ww=function(r){return uf=r},Cw=function(){return uf};function Iw(){var e=Cw(),r=null,n=null;return{clear:function(){r=null,n=null},notify:function(){e(function(){for(var i=r;i;)i.callback(),i=i.next})},get:function(){for(var i=[],o=r;o;)i.push(o),o=o.next;return i},subscribe:function(i){var o=!0,a=n={callback:i,next:null,prev:n};return a.prev?a.prev.next=a:r=a,function(){!o||r===null||(o=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:r=a.next)}}}}var Bl={notify:function(){},get:function(){return[]}};function df(e,r){var n,t=Bl;function i(d){return l(),t.subscribe(d)}function o(){t.notify()}function a(){u.onStateChange&&u.onStateChange()}function s(){return!!n}function l(){n||(n=r?r.addNestedSub(a):e.subscribe(a),t=Iw())}function c(){n&&(n(),n=void 0,t.clear(),t=Bl)}var u={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:function(){return t}};return u}var ff=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect;function Rw(e){var r=e.store,n=e.context,t=e.children,i=C.useMemo(function(){var s=df(r);return{store:r,subscription:s}},[r]),o=C.useMemo(function(){return r.getState()},[r]);ff(function(){var s=i.subscription;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==r.getState()&&s.notifyNestedSubs(),function(){s.tryUnsubscribe(),s.onStateChange=null}},[i,o]);var a=n||cf;return Q.createElement(a.Provider,{value:i},t)}var Wi={exports:{}},ge={};/** @license React v17.0.2
398
398
  * react-is.production.min.js
399
399
  *
400
400
  * Copyright (c) Facebook, Inc. and its affiliates.
401
401
  *
402
402
  * This source code is licensed under the MIT license found in the
403
403
  * LICENSE file in the root directory of this source tree.
404
- */var $l;function Rw(){if($l)return ge;$l=1;var e=60103,r=60106,n=60107,t=60108,i=60114,o=60109,a=60110,s=60112,l=60113,c=60120,u=60115,d=60116,f=60121,p=60122,h=60117,v=60129,m=60131;if(typeof Symbol=="function"&&Symbol.for){var b=Symbol.for;e=b("react.element"),r=b("react.portal"),n=b("react.fragment"),t=b("react.strict_mode"),i=b("react.profiler"),o=b("react.provider"),a=b("react.context"),s=b("react.forward_ref"),l=b("react.suspense"),c=b("react.suspense_list"),u=b("react.memo"),d=b("react.lazy"),f=b("react.block"),p=b("react.server.block"),h=b("react.fundamental"),v=b("react.debug_trace_mode"),m=b("react.legacy_hidden")}function y(M){if(typeof M=="object"&&M!==null){var H=M.$$typeof;switch(H){case e:switch(M=M.type,M){case n:case i:case t:case l:case c:return M;default:switch(M=M&&M.$$typeof,M){case a:case s:case d:case u:case o:return M;default:return H}}case r:return H}}}var I=o,_=e,P=s,w=n,D=d,S=u,T=r,R=i,O=t,L=l;return ge.ContextConsumer=a,ge.ContextProvider=I,ge.Element=_,ge.ForwardRef=P,ge.Fragment=w,ge.Lazy=D,ge.Memo=S,ge.Portal=T,ge.Profiler=R,ge.StrictMode=O,ge.Suspense=L,ge.isAsyncMode=function(){return!1},ge.isConcurrentMode=function(){return!1},ge.isContextConsumer=function(M){return y(M)===a},ge.isContextProvider=function(M){return y(M)===o},ge.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===e},ge.isForwardRef=function(M){return y(M)===s},ge.isFragment=function(M){return y(M)===n},ge.isLazy=function(M){return y(M)===d},ge.isMemo=function(M){return y(M)===u},ge.isPortal=function(M){return y(M)===r},ge.isProfiler=function(M){return y(M)===i},ge.isStrictMode=function(M){return y(M)===t},ge.isSuspense=function(M){return y(M)===l},ge.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===n||M===i||M===v||M===t||M===l||M===c||M===m||typeof M=="object"&&M!==null&&(M.$$typeof===d||M.$$typeof===u||M.$$typeof===o||M.$$typeof===a||M.$$typeof===s||M.$$typeof===h||M.$$typeof===f||M[0]===p)},ge.typeOf=y,ge}var Gl;function Tw(){return Gl||(Gl=1,Wi.exports=Rw()),Wi.exports}var _w=Tw(),Dw=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Pw=["reactReduxForwardedRef"],kw=[],Ow=[null,null];function Ew(e,r){var n=e[1];return[r.payload,n+1]}function Wl(e,r,n){ff(function(){return e.apply(void 0,r)},n)}function Nw(e,r,n,t,i,o,a){e.current=t,r.current=i,n.current=!1,o.current&&(o.current=null,a())}function Mw(e,r,n,t,i,o,a,s,l,c){if(e){var u=!1,d=null,f=function(){if(!u){var v=r.getState(),m,b;try{m=t(v,i.current)}catch(y){b=y,d=y}b||(d=null),m===o.current?a.current||l():(o.current=m,s.current=m,a.current=!0,c({type:"STORE_UPDATED",payload:{error:b}}))}};n.onStateChange=f,n.trySubscribe(),f();var p=function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d};return p}}var Aw=function(){return[null,0]};function Lw(e,r){r===void 0&&(r={});var n=r,t=n.getDisplayName,i=t===void 0?function(I){return"ConnectAdvanced("+I+")"}:t,o=n.methodName,a=o===void 0?"connectAdvanced":o,s=n.renderCountProp,l=s===void 0?void 0:s,c=n.shouldHandleStateChanges,u=c===void 0?!0:c,d=n.storeKey,f=d===void 0?"store":d;n.withRef;var p=n.forwardRef,h=p===void 0?!1:p,v=n.context,m=v===void 0?cf:v,b=or(n,Dw),y=m;return function(_){var P=_.displayName||_.name||"Component",w=i(P),D=K({},b,{getDisplayName:i,methodName:a,renderCountProp:l,shouldHandleStateChanges:u,storeKey:f,displayName:w,wrappedComponentName:P,WrappedComponent:_}),S=b.pure;function T(H){return e(H.dispatch,D)}var R=S?C.useMemo:function(H){return H()};function O(H){var E=C.useMemo(function(){var Pe=H.reactReduxForwardedRef,Fe=or(H,Pw);return[H.context,Pe,Fe]},[H]),B=E[0],$=E[1],U=E[2],J=C.useMemo(function(){return B&&B.Consumer&&_w.isContextConsumer(Q.createElement(B.Consumer,null))?B:y},[B,y]),ee=C.useContext(J),X=!!H.store&&!!H.store.getState&&!!H.store.dispatch;ee&&ee.store;var Z=X?H.store:ee.store,q=C.useMemo(function(){return T(Z)},[Z]),ne=C.useMemo(function(){if(!u)return Ow;var Pe=df(Z,X?null:ee.subscription),Fe=Pe.notifyNestedSubs.bind(Pe);return[Pe,Fe]},[Z,X,ee]),ie=ne[0],ue=ne[1],G=C.useMemo(function(){return X?ee:K({},ee,{subscription:ie})},[X,ee,ie]),W=C.useReducer(Ew,kw,Aw),k=W[0],N=k[0],j=W[1];if(N&&N.error)throw N.error;var V=C.useRef(),te=C.useRef(U),se=C.useRef(),pe=C.useRef(!1),me=R(function(){return se.current&&U===te.current?se.current:q(Z.getState(),U)},[Z,N,U]);Wl(Nw,[te,V,pe,U,me,se,ue]),Wl(Mw,[u,Z,ie,q,te,V,pe,se,ue,j],[Z,ie,q]);var Ce=C.useMemo(function(){return Q.createElement(_,K({},me,{ref:$}))},[$,_,me]),Se=C.useMemo(function(){return u?Q.createElement(J.Provider,{value:G},Ce):Ce},[J,Ce,G]);return Se}var L=S?Q.memo(O):O;if(L.WrappedComponent=_,L.displayName=O.displayName=w,h){var M=Q.forwardRef(function(E,B){return Q.createElement(L,K({},E,{reactReduxForwardedRef:B}))});return M.displayName=w,M.WrappedComponent=_,Va(M,_)}return Va(L,_)}}function Hl(e,r){return e===r?e!==0||r!==0||1/e===1/r:e!==e&&r!==r}function Hi(e,r){if(Hl(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var n=Object.keys(e),t=Object.keys(r);if(n.length!==t.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(r,n[i])||!Hl(e[n[i]],r[n[i]]))return!1;return!0}function zw(e,r){var n={},t=function(a){var s=e[a];typeof s=="function"&&(n[a]=function(){return r(s.apply(void 0,arguments))})};for(var i in e)t(i);return n}function xa(e){return function(n,t){var i=e(n,t);function o(){return i}return o.dependsOnOwnProps=!1,o}}function Ul(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function pf(e,r){return function(t,i){i.displayName;var o=function(s,l){return o.dependsOnOwnProps?o.mapToProps(s,l):o.mapToProps(s)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,l){o.mapToProps=e,o.dependsOnOwnProps=Ul(e);var c=o(s,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=Ul(c),c=o(s,l)),c},o}}function jw(e){return typeof e=="function"?pf(e):void 0}function Fw(e){return e?void 0:xa(function(r){return{dispatch:r}})}function Bw(e){return e&&typeof e=="object"?xa(function(r){return zw(e,r)}):void 0}const $w=[jw,Fw,Bw];function Gw(e){return typeof e=="function"?pf(e):void 0}function Ww(e){return e?void 0:xa(function(){return{}})}const Hw=[Gw,Ww];function Uw(e,r,n){return K({},n,e,r)}function qw(e){return function(n,t){t.displayName;var i=t.pure,o=t.areMergedPropsEqual,a=!1,s;return function(c,u,d){var f=e(c,u,d);return a?(!i||!o(f,s))&&(s=f):(a=!0,s=f),s}}}function Vw(e){return typeof e=="function"?qw(e):void 0}function Kw(e){return e?void 0:function(){return Uw}}const Yw=[Vw,Kw];var Jw=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Xw(e,r,n,t){return function(o,a){return n(e(o,a),r(t,a),a)}}function Qw(e,r,n,t,i){var o=i.areStatesEqual,a=i.areOwnPropsEqual,s=i.areStatePropsEqual,l=!1,c,u,d,f,p;function h(I,_){return c=I,u=_,d=e(c,u),f=r(t,u),p=n(d,f,u),l=!0,p}function v(){return d=e(c,u),r.dependsOnOwnProps&&(f=r(t,u)),p=n(d,f,u),p}function m(){return e.dependsOnOwnProps&&(d=e(c,u)),r.dependsOnOwnProps&&(f=r(t,u)),p=n(d,f,u),p}function b(){var I=e(c,u),_=!s(I,d);return d=I,_&&(p=n(d,f,u)),p}function y(I,_){var P=!a(_,u),w=!o(I,c,_,u);return c=I,u=_,P&&w?v():P?m():w?b():p}return function(_,P){return l?y(_,P):h(_,P)}}function Zw(e,r){var n=r.initMapStateToProps,t=r.initMapDispatchToProps,i=r.initMergeProps,o=or(r,Jw),a=n(e,o),s=t(e,o),l=i(e,o),c=o.pure?Qw:Xw;return c(a,s,l,e,o)}var eC=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function Ui(e,r,n){for(var t=r.length-1;t>=0;t--){var i=r[t](e);if(i)return i}return function(o,a){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+a.wrappedComponentName+".")}}function tC(e,r){return e===r}function rC(e){var r=e===void 0?{}:e,n=r.connectHOC,t=n===void 0?Lw:n,i=r.mapStateToPropsFactories,o=i===void 0?Hw:i,a=r.mapDispatchToPropsFactories,s=a===void 0?$w:a,l=r.mergePropsFactories,c=l===void 0?Yw:l,u=r.selectorFactory,d=u===void 0?Zw:u;return function(p,h,v,m){m===void 0&&(m={});var b=m,y=b.pure,I=y===void 0?!0:y,_=b.areStatesEqual,P=_===void 0?tC:_,w=b.areOwnPropsEqual,D=w===void 0?Hi:w,S=b.areStatePropsEqual,T=S===void 0?Hi:S,R=b.areMergedPropsEqual,O=R===void 0?Hi:R,L=or(b,eC),M=Ui(p,o,"mapStateToProps"),H=Ui(h,s,"mapDispatchToProps"),E=Ui(v,c,"mergeProps");return t(d,K({methodName:"connect",getDisplayName:function($){return"Connect("+$+")"},shouldHandleStateChanges:!!p,initMapStateToProps:M,initMapDispatchToProps:H,initMergeProps:E,pure:I,areStatesEqual:P,areOwnPropsEqual:D,areStatePropsEqual:T,areMergedPropsEqual:O},L))}}const hf=rC();Sw(Qr.unstable_batchedUpdates);var ql=Number.isNaN||function(r){return typeof r=="number"&&r!==r};function nC(e,r){return!!(e===r||ql(e)&&ql(r))}function iC(e,r){if(e.length!==r.length)return!1;for(var n=0;n<e.length;n++)if(!nC(e[n],r[n]))return!1;return!0}function _e(e,r){r===void 0&&(r=iC);var n,t=[],i,o=!1;function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return o&&n===this&&r(s,t)||(i=e.apply(this,s),o=!0,n=this,t=s),i}return a}function gf(e,r){}gf.bind(null,"warn");gf.bind(null,"error");function xt(){}function oC(e,r){return K({},e,{},r)}function Ye(e,r,n){var t=r.map(function(i){var o=oC(n,i.options);return e.addEventListener(i.eventName,i.fn,o),function(){e.removeEventListener(i.eventName,i.fn,o)}});return function(){t.forEach(function(o){o()})}}var aC="Invariant failed";function qn(e){this.message=e}qn.prototype.toString=function(){return this.message};function Y(e,r){throw new qn(aC)}var sC=function(e){ei(r,e);function r(){for(var t,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=e.call.apply(e,[this].concat(o))||this,t.callbacks=null,t.unbind=xt,t.onWindowError=function(s){var l=t.getCallbacks();l.isDragging()&&l.tryAbort();var c=s.error;c instanceof qn&&s.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(s){t.callbacks=s},t}var n=r.prototype;return n.componentDidMount=function(){this.unbind=Ye(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof qn){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},r}(Q.Component),lC=`
404
+ */var $l;function Tw(){if($l)return ge;$l=1;var e=60103,r=60106,n=60107,t=60108,i=60114,o=60109,a=60110,s=60112,l=60113,c=60120,u=60115,d=60116,f=60121,p=60122,h=60117,v=60129,m=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),r=y("react.portal"),n=y("react.fragment"),t=y("react.strict_mode"),i=y("react.profiler"),o=y("react.provider"),a=y("react.context"),s=y("react.forward_ref"),l=y("react.suspense"),c=y("react.suspense_list"),u=y("react.memo"),d=y("react.lazy"),f=y("react.block"),p=y("react.server.block"),h=y("react.fundamental"),v=y("react.debug_trace_mode"),m=y("react.legacy_hidden")}function b(M){if(typeof M=="object"&&M!==null){var H=M.$$typeof;switch(H){case e:switch(M=M.type,M){case n:case i:case t:case l:case c:return M;default:switch(M=M&&M.$$typeof,M){case a:case s:case d:case u:case o:return M;default:return H}}case r:return H}}}var I=o,_=e,P=s,w=n,D=d,S=u,T=r,R=i,O=t,L=l;return ge.ContextConsumer=a,ge.ContextProvider=I,ge.Element=_,ge.ForwardRef=P,ge.Fragment=w,ge.Lazy=D,ge.Memo=S,ge.Portal=T,ge.Profiler=R,ge.StrictMode=O,ge.Suspense=L,ge.isAsyncMode=function(){return!1},ge.isConcurrentMode=function(){return!1},ge.isContextConsumer=function(M){return b(M)===a},ge.isContextProvider=function(M){return b(M)===o},ge.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===e},ge.isForwardRef=function(M){return b(M)===s},ge.isFragment=function(M){return b(M)===n},ge.isLazy=function(M){return b(M)===d},ge.isMemo=function(M){return b(M)===u},ge.isPortal=function(M){return b(M)===r},ge.isProfiler=function(M){return b(M)===i},ge.isStrictMode=function(M){return b(M)===t},ge.isSuspense=function(M){return b(M)===l},ge.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===n||M===i||M===v||M===t||M===l||M===c||M===m||typeof M=="object"&&M!==null&&(M.$$typeof===d||M.$$typeof===u||M.$$typeof===o||M.$$typeof===a||M.$$typeof===s||M.$$typeof===h||M.$$typeof===f||M[0]===p)},ge.typeOf=b,ge}var Gl;function _w(){return Gl||(Gl=1,Wi.exports=Tw()),Wi.exports}var Dw=_w(),Pw=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],kw=["reactReduxForwardedRef"],Ow=[],Ew=[null,null];function Nw(e,r){var n=e[1];return[r.payload,n+1]}function Wl(e,r,n){ff(function(){return e.apply(void 0,r)},n)}function Mw(e,r,n,t,i,o,a){e.current=t,r.current=i,n.current=!1,o.current&&(o.current=null,a())}function Aw(e,r,n,t,i,o,a,s,l,c){if(e){var u=!1,d=null,f=function(){if(!u){var v=r.getState(),m,y;try{m=t(v,i.current)}catch(b){y=b,d=b}y||(d=null),m===o.current?a.current||l():(o.current=m,s.current=m,a.current=!0,c({type:"STORE_UPDATED",payload:{error:y}}))}};n.onStateChange=f,n.trySubscribe(),f();var p=function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d};return p}}var Lw=function(){return[null,0]};function zw(e,r){r===void 0&&(r={});var n=r,t=n.getDisplayName,i=t===void 0?function(I){return"ConnectAdvanced("+I+")"}:t,o=n.methodName,a=o===void 0?"connectAdvanced":o,s=n.renderCountProp,l=s===void 0?void 0:s,c=n.shouldHandleStateChanges,u=c===void 0?!0:c,d=n.storeKey,f=d===void 0?"store":d;n.withRef;var p=n.forwardRef,h=p===void 0?!1:p,v=n.context,m=v===void 0?cf:v,y=or(n,Pw),b=m;return function(_){var P=_.displayName||_.name||"Component",w=i(P),D=K({},y,{getDisplayName:i,methodName:a,renderCountProp:l,shouldHandleStateChanges:u,storeKey:f,displayName:w,wrappedComponentName:P,WrappedComponent:_}),S=y.pure;function T(H){return e(H.dispatch,D)}var R=S?C.useMemo:function(H){return H()};function O(H){var E=C.useMemo(function(){var Pe=H.reactReduxForwardedRef,Fe=or(H,kw);return[H.context,Pe,Fe]},[H]),B=E[0],$=E[1],U=E[2],J=C.useMemo(function(){return B&&B.Consumer&&Dw.isContextConsumer(Q.createElement(B.Consumer,null))?B:b},[B,b]),ee=C.useContext(J),X=!!H.store&&!!H.store.getState&&!!H.store.dispatch;ee&&ee.store;var Z=X?H.store:ee.store,q=C.useMemo(function(){return T(Z)},[Z]),ne=C.useMemo(function(){if(!u)return Ew;var Pe=df(Z,X?null:ee.subscription),Fe=Pe.notifyNestedSubs.bind(Pe);return[Pe,Fe]},[Z,X,ee]),ie=ne[0],ue=ne[1],G=C.useMemo(function(){return X?ee:K({},ee,{subscription:ie})},[X,ee,ie]),W=C.useReducer(Nw,Ow,Lw),k=W[0],N=k[0],j=W[1];if(N&&N.error)throw N.error;var V=C.useRef(),te=C.useRef(U),se=C.useRef(),pe=C.useRef(!1),me=R(function(){return se.current&&U===te.current?se.current:q(Z.getState(),U)},[Z,N,U]);Wl(Mw,[te,V,pe,U,me,se,ue]),Wl(Aw,[u,Z,ie,q,te,V,pe,se,ue,j],[Z,ie,q]);var Ce=C.useMemo(function(){return Q.createElement(_,K({},me,{ref:$}))},[$,_,me]),Se=C.useMemo(function(){return u?Q.createElement(J.Provider,{value:G},Ce):Ce},[J,Ce,G]);return Se}var L=S?Q.memo(O):O;if(L.WrappedComponent=_,L.displayName=O.displayName=w,h){var M=Q.forwardRef(function(E,B){return Q.createElement(L,K({},E,{reactReduxForwardedRef:B}))});return M.displayName=w,M.WrappedComponent=_,Va(M,_)}return Va(L,_)}}function Hl(e,r){return e===r?e!==0||r!==0||1/e===1/r:e!==e&&r!==r}function Hi(e,r){if(Hl(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var n=Object.keys(e),t=Object.keys(r);if(n.length!==t.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(r,n[i])||!Hl(e[n[i]],r[n[i]]))return!1;return!0}function jw(e,r){var n={},t=function(a){var s=e[a];typeof s=="function"&&(n[a]=function(){return r(s.apply(void 0,arguments))})};for(var i in e)t(i);return n}function xa(e){return function(n,t){var i=e(n,t);function o(){return i}return o.dependsOnOwnProps=!1,o}}function Ul(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function pf(e,r){return function(t,i){i.displayName;var o=function(s,l){return o.dependsOnOwnProps?o.mapToProps(s,l):o.mapToProps(s)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,l){o.mapToProps=e,o.dependsOnOwnProps=Ul(e);var c=o(s,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=Ul(c),c=o(s,l)),c},o}}function Fw(e){return typeof e=="function"?pf(e):void 0}function Bw(e){return e?void 0:xa(function(r){return{dispatch:r}})}function $w(e){return e&&typeof e=="object"?xa(function(r){return jw(e,r)}):void 0}const Gw=[Fw,Bw,$w];function Ww(e){return typeof e=="function"?pf(e):void 0}function Hw(e){return e?void 0:xa(function(){return{}})}const Uw=[Ww,Hw];function qw(e,r,n){return K({},n,e,r)}function Vw(e){return function(n,t){t.displayName;var i=t.pure,o=t.areMergedPropsEqual,a=!1,s;return function(c,u,d){var f=e(c,u,d);return a?(!i||!o(f,s))&&(s=f):(a=!0,s=f),s}}}function Kw(e){return typeof e=="function"?Vw(e):void 0}function Yw(e){return e?void 0:function(){return qw}}const Jw=[Kw,Yw];var Xw=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Qw(e,r,n,t){return function(o,a){return n(e(o,a),r(t,a),a)}}function Zw(e,r,n,t,i){var o=i.areStatesEqual,a=i.areOwnPropsEqual,s=i.areStatePropsEqual,l=!1,c,u,d,f,p;function h(I,_){return c=I,u=_,d=e(c,u),f=r(t,u),p=n(d,f,u),l=!0,p}function v(){return d=e(c,u),r.dependsOnOwnProps&&(f=r(t,u)),p=n(d,f,u),p}function m(){return e.dependsOnOwnProps&&(d=e(c,u)),r.dependsOnOwnProps&&(f=r(t,u)),p=n(d,f,u),p}function y(){var I=e(c,u),_=!s(I,d);return d=I,_&&(p=n(d,f,u)),p}function b(I,_){var P=!a(_,u),w=!o(I,c,_,u);return c=I,u=_,P&&w?v():P?m():w?y():p}return function(_,P){return l?b(_,P):h(_,P)}}function eC(e,r){var n=r.initMapStateToProps,t=r.initMapDispatchToProps,i=r.initMergeProps,o=or(r,Xw),a=n(e,o),s=t(e,o),l=i(e,o),c=o.pure?Zw:Qw;return c(a,s,l,e,o)}var tC=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function Ui(e,r,n){for(var t=r.length-1;t>=0;t--){var i=r[t](e);if(i)return i}return function(o,a){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+a.wrappedComponentName+".")}}function rC(e,r){return e===r}function nC(e){var r=e===void 0?{}:e,n=r.connectHOC,t=n===void 0?zw:n,i=r.mapStateToPropsFactories,o=i===void 0?Uw:i,a=r.mapDispatchToPropsFactories,s=a===void 0?Gw:a,l=r.mergePropsFactories,c=l===void 0?Jw:l,u=r.selectorFactory,d=u===void 0?eC:u;return function(p,h,v,m){m===void 0&&(m={});var y=m,b=y.pure,I=b===void 0?!0:b,_=y.areStatesEqual,P=_===void 0?rC:_,w=y.areOwnPropsEqual,D=w===void 0?Hi:w,S=y.areStatePropsEqual,T=S===void 0?Hi:S,R=y.areMergedPropsEqual,O=R===void 0?Hi:R,L=or(y,tC),M=Ui(p,o,"mapStateToProps"),H=Ui(h,s,"mapDispatchToProps"),E=Ui(v,c,"mergeProps");return t(d,K({methodName:"connect",getDisplayName:function($){return"Connect("+$+")"},shouldHandleStateChanges:!!p,initMapStateToProps:M,initMapDispatchToProps:H,initMergeProps:E,pure:I,areStatesEqual:P,areOwnPropsEqual:D,areStatePropsEqual:T,areMergedPropsEqual:O},L))}}const hf=nC();ww(Qr.unstable_batchedUpdates);var ql=Number.isNaN||function(r){return typeof r=="number"&&r!==r};function iC(e,r){return!!(e===r||ql(e)&&ql(r))}function oC(e,r){if(e.length!==r.length)return!1;for(var n=0;n<e.length;n++)if(!iC(e[n],r[n]))return!1;return!0}function _e(e,r){r===void 0&&(r=oC);var n,t=[],i,o=!1;function a(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return o&&n===this&&r(s,t)||(i=e.apply(this,s),o=!0,n=this,t=s),i}return a}function gf(e,r){}gf.bind(null,"warn");gf.bind(null,"error");function xt(){}function aC(e,r){return K({},e,{},r)}function Ye(e,r,n){var t=r.map(function(i){var o=aC(n,i.options);return e.addEventListener(i.eventName,i.fn,o),function(){e.removeEventListener(i.eventName,i.fn,o)}});return function(){t.forEach(function(o){o()})}}var sC="Invariant failed";function qn(e){this.message=e}qn.prototype.toString=function(){return this.message};function Y(e,r){throw new qn(sC)}var lC=function(e){ei(r,e);function r(){for(var t,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=e.call.apply(e,[this].concat(o))||this,t.callbacks=null,t.unbind=xt,t.onWindowError=function(s){var l=t.getCallbacks();l.isDragging()&&l.tryAbort();var c=s.error;c instanceof qn&&s.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(s){t.callbacks=s},t}var n=r.prototype;return n.componentDidMount=function(){this.unbind=Ye(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof qn){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},r}(Q.Component),cC=`
405
405
  Press space bar to start a drag.
406
406
  When dragging you can use the arrow keys to move the item around and escape to cancel.
407
407
  Some screen readers may require you to be in focus mode or to use your pass through key
408
- `,Vn=function(r){return r+1},cC=function(r){return`
408
+ `,Vn=function(r){return r+1},uC=function(r){return`
409
409
  You have lifted an item in position `+Vn(r.source.index)+`
410
410
  `},vf=function(r,n){var t=r.droppableId===n.droppableId,i=Vn(r.index),o=Vn(n.index);return t?`
411
411
  You have moved the item from position `+i+`
@@ -422,10 +422,10 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
422
422
  in list `+n.droppableId+`
423
423
  has been combined with `+t.draggableId+`
424
424
  in list `+t.droppableId+`
425
- `},uC=function(r){var n=r.destination;if(n)return vf(r.source,n);var t=r.combine;return t?mf(r.draggableId,r.source,t):"You are over an area that cannot be dropped on"},Vl=function(r){return`
425
+ `},dC=function(r){var n=r.destination;if(n)return vf(r.source,n);var t=r.combine;return t?mf(r.draggableId,r.source,t):"You are over an area that cannot be dropped on"},Vl=function(r){return`
426
426
  The item has returned to its starting position
427
427
  of `+Vn(r.index)+`
428
- `},dC=function(r){if(r.reason==="CANCEL")return`
428
+ `},fC=function(r){if(r.reason==="CANCEL")return`
429
429
  Movement cancelled.
430
430
  `+Vl(r.source)+`
431
431
  `;var n=r.destination,t=r.combine;return n?`
@@ -437,16 +437,16 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
437
437
  `:`
438
438
  The item has been dropped while not over a drop area.
439
439
  `+Vl(r.source)+`
440
- `},Nn={dragHandleUsageInstructions:lC,onDragStart:cC,onDragUpdate:uC,onDragEnd:dC},De={x:0,y:0},Oe=function(r,n){return{x:r.x+n.x,y:r.y+n.y}},Ge=function(r,n){return{x:r.x-n.x,y:r.y-n.y}},St=function(r,n){return r.x===n.x&&r.y===n.y},hr=function(r){return{x:r.x!==0?-r.x:0,y:r.y!==0?-r.y:0}},Ft=function(r,n,t){var i;return t===void 0&&(t=0),i={},i[r]=n,i[r==="x"?"y":"x"]=t,i},Kr=function(r,n){return Math.sqrt(Math.pow(n.x-r.x,2)+Math.pow(n.y-r.y,2))},Kl=function(r,n){return Math.min.apply(Math,n.map(function(t){return Kr(r,t)}))},bf=function(r){return function(n){return{x:r(n.x),y:r(n.y)}}},fC=function(e,r){var n=Gt({top:Math.max(r.top,e.top),right:Math.min(r.right,e.right),bottom:Math.min(r.bottom,e.bottom),left:Math.max(r.left,e.left)});return n.width<=0||n.height<=0?null:n},cn=function(r,n){return{top:r.top+n.y,left:r.left+n.x,bottom:r.bottom+n.y,right:r.right+n.x}},Yl=function(r){return[{x:r.left,y:r.top},{x:r.right,y:r.top},{x:r.left,y:r.bottom},{x:r.right,y:r.bottom}]},pC={top:0,right:0,bottom:0,left:0},hC=function(r,n){return n?cn(r,n.scroll.diff.displacement):r},gC=function(r,n,t){if(t&&t.increasedBy){var i;return K({},r,(i={},i[n.end]=r[n.end]+t.increasedBy[n.line],i))}return r},vC=function(r,n){return n&&n.shouldClipSubject?fC(n.pageMarginBox,r):Gt(r)},lr=function(e){var r=e.page,n=e.withPlaceholder,t=e.axis,i=e.frame,o=hC(r.marginBox,i),a=gC(o,t,n),s=vC(a,i);return{page:r,withPlaceholder:n,active:s}},Sa=function(e,r){e.frame||Y();var n=e.frame,t=Ge(r,n.scroll.initial),i=hr(t),o=K({},n,{scroll:{initial:n.scroll.initial,current:r,diff:{value:t,displacement:i},max:n.scroll.max}}),a=lr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),s=K({},e,{frame:o,subject:a});return s};function Kn(e){return Object.values?Object.values(e):Object.keys(e).map(function(r){return e[r]})}function wa(e,r){if(e.findIndex)return e.findIndex(r);for(var n=0;n<e.length;n++)if(r(e[n]))return n;return-1}function _t(e,r){if(e.find)return e.find(r);var n=wa(e,r);if(n!==-1)return e[n]}function yf(e){return Array.prototype.slice.call(e)}var xf=_e(function(e){return e.reduce(function(r,n){return r[n.descriptor.id]=n,r},{})}),Sf=_e(function(e){return e.reduce(function(r,n){return r[n.descriptor.id]=n,r},{})}),di=_e(function(e){return Kn(e)}),mC=_e(function(e){return Kn(e)}),gr=_e(function(e,r){var n=mC(r).filter(function(t){return e===t.descriptor.droppableId}).sort(function(t,i){return t.descriptor.index-i.descriptor.index});return n});function Ca(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function fi(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var pi=_e(function(e,r){return r.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),bC=function(e){var r=e.isMovingForward,n=e.draggable,t=e.destination,i=e.insideDestination,o=e.previousImpact;if(!t.isCombineEnabled)return null;var a=Ca(o);if(!a)return null;function s(v){var m={type:"COMBINE",combine:{draggableId:v,droppableId:t.descriptor.id}};return K({},o,{at:m})}var l=o.displaced.all,c=l.length?l[0]:null;if(r)return c?s(c):null;var u=pi(n,i);if(!c){if(!u.length)return null;var d=u[u.length-1];return s(d.descriptor.id)}var f=wa(u,function(v){return v.descriptor.id===c});f===-1&&Y();var p=f-1;if(p<0)return null;var h=u[p];return s(h.descriptor.id)},vr=function(e,r){return e.descriptor.droppableId===r.descriptor.id},wf={point:De,value:0},Yr={invisible:{},visible:{},all:[]},yC={displaced:Yr,displacedBy:wf,at:null},Je=function(e,r){return function(n){return e<=n&&n<=r}},Cf=function(e){var r=Je(e.top,e.bottom),n=Je(e.left,e.right);return function(t){var i=r(t.top)&&r(t.bottom)&&n(t.left)&&n(t.right);if(i)return!0;var o=r(t.top)||r(t.bottom),a=n(t.left)||n(t.right),s=o&&a;if(s)return!0;var l=t.top<e.top&&t.bottom>e.bottom,c=t.left<e.left&&t.right>e.right,u=l&&c;if(u)return!0;var d=l&&a||c&&o;return d}},xC=function(e){var r=Je(e.top,e.bottom),n=Je(e.left,e.right);return function(t){var i=r(t.top)&&r(t.bottom)&&n(t.left)&&n(t.right);return i}},Ia={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},If={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},SC=function(e){return function(r){var n=Je(r.top,r.bottom),t=Je(r.left,r.right);return function(i){return e===Ia?n(i.top)&&n(i.bottom):t(i.left)&&t(i.right)}}},wC=function(r,n){var t=n.frame?n.frame.scroll.diff.displacement:De;return cn(r,t)},CC=function(r,n,t){return n.subject.active?t(n.subject.active)(r):!1},IC=function(r,n,t){return t(n)(r)},Ra=function(r){var n=r.target,t=r.destination,i=r.viewport,o=r.withDroppableDisplacement,a=r.isVisibleThroughFrameFn,s=o?wC(n,t):n;return CC(s,t,a)&&IC(s,i,a)},RC=function(r){return Ra(K({},r,{isVisibleThroughFrameFn:Cf}))},Rf=function(r){return Ra(K({},r,{isVisibleThroughFrameFn:xC}))},TC=function(r){return Ra(K({},r,{isVisibleThroughFrameFn:SC(r.destination.axis)}))},_C=function(r,n,t){if(typeof t=="boolean")return t;if(!n)return!0;var i=n.invisible,o=n.visible;if(i[r])return!1;var a=o[r];return a?a.shouldAnimate:!0};function DC(e,r){var n=e.page.marginBox,t={top:r.point.y,right:0,bottom:0,left:r.point.x};return Gt(Kc(n,t))}function Jr(e){var r=e.afterDragging,n=e.destination,t=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,a=e.last;return r.reduce(function(l,c){var u=DC(c,t),d=c.descriptor.id;l.all.push(d);var f=RC({target:u,destination:n,viewport:i,withDroppableDisplacement:!0});if(!f)return l.invisible[c.descriptor.id]=!0,l;var p=_C(d,a,o),h={draggableId:d,shouldAnimate:p};return l.visible[d]=h,l},{all:[],visible:{},invisible:{}})}function PC(e,r){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return r.inHomeList?n:n+1}function Jl(e){var r=e.insideDestination,n=e.inHomeList,t=e.displacedBy,i=e.destination,o=PC(r,{inHomeList:n});return{displaced:Yr,displacedBy:t,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Yn(e){var r=e.draggable,n=e.insideDestination,t=e.destination,i=e.viewport,o=e.displacedBy,a=e.last,s=e.index,l=e.forceShouldAnimate,c=vr(r,t);if(s==null)return Jl({insideDestination:n,inHomeList:c,displacedBy:o,destination:t});var u=_t(n,function(v){return v.descriptor.index===s});if(!u)return Jl({insideDestination:n,inHomeList:c,displacedBy:o,destination:t});var d=pi(r,n),f=n.indexOf(u),p=d.slice(f),h=Jr({afterDragging:p,destination:t,displacedBy:o,last:a,viewport:i.frame,forceShouldAnimate:l});return{displaced:h,displacedBy:o,at:{type:"REORDER",destination:{droppableId:t.descriptor.id,index:s}}}}function Tt(e,r){return!!r.effected[e]}var kC=function(e){var r=e.isMovingForward,n=e.destination,t=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var a=i.draggableId,s=t[a],l=s.descriptor.index,c=Tt(a,o);return c?r?l:l-1:r?l+1:l},OC=function(e){var r=e.isMovingForward,n=e.isInHomeList,t=e.insideDestination,i=e.location;if(!t.length)return null;var o=i.index,a=r?o+1:o-1,s=t[0].descriptor.index,l=t[t.length-1].descriptor.index,c=n?l:l+1;return a<s||a>c?null:a},EC=function(e){var r=e.isMovingForward,n=e.isInHomeList,t=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,s=e.previousImpact,l=e.viewport,c=e.afterCritical,u=s.at;if(u||Y(),u.type==="REORDER"){var d=OC({isMovingForward:r,isInHomeList:n,location:u.destination,insideDestination:a});return d==null?null:Yn({draggable:t,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:d})}var f=kC({isMovingForward:r,destination:o,displaced:s.displaced,draggables:i,combine:u.combine,afterCritical:c});return f==null?null:Yn({draggable:t,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:f})},NC=function(e){var r=e.displaced,n=e.afterCritical,t=e.combineWith,i=e.displacedBy,o=!!(r.visible[t]||r.invisible[t]);return Tt(t,n)?o?De:hr(i.point):o?i.point:De},MC=function(e){var r=e.afterCritical,n=e.impact,t=e.draggables,i=fi(n);i||Y();var o=i.draggableId,a=t[o].page.borderBox.center,s=NC({displaced:n.displaced,afterCritical:r,combineWith:o,displacedBy:n.displacedBy});return Oe(a,s)},Tf=function(r,n){return n.margin[r.start]+n.borderBox[r.size]/2},AC=function(r,n){return n.margin[r.end]+n.borderBox[r.size]/2},Ta=function(r,n,t){return n[r.crossAxisStart]+t.margin[r.crossAxisStart]+t.borderBox[r.crossAxisSize]/2},Xl=function(r){var n=r.axis,t=r.moveRelativeTo,i=r.isMoving;return Ft(n.line,t.marginBox[n.end]+Tf(n,i),Ta(n,t.marginBox,i))},Ql=function(r){var n=r.axis,t=r.moveRelativeTo,i=r.isMoving;return Ft(n.line,t.marginBox[n.start]-AC(n,i),Ta(n,t.marginBox,i))},LC=function(r){var n=r.axis,t=r.moveInto,i=r.isMoving;return Ft(n.line,t.contentBox[n.start]+Tf(n,i),Ta(n,t.contentBox,i))},zC=function(e){var r=e.impact,n=e.draggable,t=e.draggables,i=e.droppable,o=e.afterCritical,a=gr(i.descriptor.id,t),s=n.page,l=i.axis;if(!a.length)return LC({axis:l,moveInto:i.page,isMoving:s});var c=r.displaced,u=r.displacedBy,d=c.all[0];if(d){var f=t[d];if(Tt(d,o))return Ql({axis:l,moveRelativeTo:f.page,isMoving:s});var p=no(f.page,u.point);return Ql({axis:l,moveRelativeTo:p,isMoving:s})}var h=a[a.length-1];if(h.descriptor.id===n.descriptor.id)return s.borderBox.center;if(Tt(h.descriptor.id,o)){var v=no(h.page,hr(o.displacedBy.point));return Xl({axis:l,moveRelativeTo:v,isMoving:s})}return Xl({axis:l,moveRelativeTo:h.page,isMoving:s})},Oo=function(e,r){var n=e.frame;return n?Oe(r,n.scroll.diff.displacement):r},jC=function(r){var n=r.impact,t=r.draggable,i=r.droppable,o=r.draggables,a=r.afterCritical,s=t.page.borderBox.center,l=n.at;return!i||!l?s:l.type==="REORDER"?zC({impact:n,draggable:t,draggables:o,droppable:i,afterCritical:a}):MC({impact:n,draggables:o,afterCritical:a})},hi=function(e){var r=jC(e),n=e.droppable,t=n?Oo(n,r):r;return t},_f=function(e,r){var n=Ge(r,e.scroll.initial),t=hr(n),i=Gt({top:r.y,bottom:r.y+e.frame.height,left:r.x,right:r.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:r,diff:{value:n,displacement:t}}};return o};function Zl(e,r){return e.map(function(n){return r[n]})}function FC(e,r){for(var n=0;n<r.length;n++){var t=r[n].visible[e];if(t)return t}return null}var BC=function(e){var r=e.impact,n=e.viewport,t=e.destination,i=e.draggables,o=e.maxScrollChange,a=_f(n,Oe(n.scroll.current,o)),s=t.frame?Sa(t,Oe(t.frame.scroll.current,o)):t,l=r.displaced,c=Jr({afterDragging:Zl(l.all,i),destination:t,displacedBy:r.displacedBy,viewport:a.frame,last:l,forceShouldAnimate:!1}),u=Jr({afterDragging:Zl(l.all,i),destination:s,displacedBy:r.displacedBy,viewport:n.frame,last:l,forceShouldAnimate:!1}),d={},f={},p=[l,c,u];l.all.forEach(function(v){var m=FC(v,p);if(m){f[v]=m;return}d[v]=!0});var h=K({},r,{displaced:{all:l.all,invisible:d,visible:f}});return h},$C=function(e,r){return Oe(e.scroll.diff.displacement,r)},_a=function(e){var r=e.pageBorderBoxCenter,n=e.draggable,t=e.viewport,i=$C(t,r),o=Ge(i,n.page.borderBox.center);return Oe(n.client.borderBox.center,o)},Df=function(e){var r=e.draggable,n=e.destination,t=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,a=e.onlyOnMainAxis,s=a===void 0?!1:a,l=Ge(t,r.page.borderBox.center),c=cn(r.page.borderBox,l),u={target:c,destination:n,withDroppableDisplacement:o,viewport:i};return s?TC(u):Rf(u)},GC=function(e){var r=e.isMovingForward,n=e.draggable,t=e.destination,i=e.draggables,o=e.previousImpact,a=e.viewport,s=e.previousPageBorderBoxCenter,l=e.previousClientSelection,c=e.afterCritical;if(!t.isEnabled)return null;var u=gr(t.descriptor.id,i),d=vr(n,t),f=bC({isMovingForward:r,draggable:n,destination:t,insideDestination:u,previousImpact:o})||EC({isMovingForward:r,isInHomeList:d,draggable:n,draggables:i,destination:t,insideDestination:u,previousImpact:o,viewport:a,afterCritical:c});if(!f)return null;var p=hi({impact:f,draggable:n,droppable:t,draggables:i,afterCritical:c}),h=Df({draggable:n,destination:t,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(h){var v=_a({pageBorderBoxCenter:p,draggable:n,viewport:a});return{clientSelection:v,impact:f,scrollJumpRequest:null}}var m=Ge(p,s),b=BC({impact:f,viewport:a,destination:t,draggables:i,maxScrollChange:m});return{clientSelection:l,impact:b,scrollJumpRequest:m}},Le=function(r){var n=r.subject.active;return n||Y(),n},WC=function(e){var r=e.isMovingForward,n=e.pageBorderBoxCenter,t=e.source,i=e.droppables,o=e.viewport,a=t.subject.active;if(!a)return null;var s=t.axis,l=Je(a[s.start],a[s.end]),c=di(i).filter(function(d){return d!==t}).filter(function(d){return d.isEnabled}).filter(function(d){return!!d.subject.active}).filter(function(d){return Cf(o.frame)(Le(d))}).filter(function(d){var f=Le(d);return r?a[s.crossAxisEnd]<f[s.crossAxisEnd]:f[s.crossAxisStart]<a[s.crossAxisStart]}).filter(function(d){var f=Le(d),p=Je(f[s.start],f[s.end]);return l(f[s.start])||l(f[s.end])||p(a[s.start])||p(a[s.end])}).sort(function(d,f){var p=Le(d)[s.crossAxisStart],h=Le(f)[s.crossAxisStart];return r?p-h:h-p}).filter(function(d,f,p){return Le(d)[s.crossAxisStart]===Le(p[0])[s.crossAxisStart]});if(!c.length)return null;if(c.length===1)return c[0];var u=c.filter(function(d){var f=Je(Le(d)[s.start],Le(d)[s.end]);return f(n[s.line])});return u.length===1?u[0]:u.length>1?u.sort(function(d,f){return Le(d)[s.start]-Le(f)[s.start]})[0]:c.sort(function(d,f){var p=Kl(n,Yl(Le(d))),h=Kl(n,Yl(Le(f)));return p!==h?p-h:Le(d)[s.start]-Le(f)[s.start]})[0]},ec=function(r,n){var t=r.page.borderBox.center;return Tt(r.descriptor.id,n)?Ge(t,n.displacedBy.point):t},HC=function(r,n){var t=r.page.borderBox;return Tt(r.descriptor.id,n)?cn(t,hr(n.displacedBy.point)):t},UC=function(e){var r=e.pageBorderBoxCenter,n=e.viewport,t=e.destination,i=e.insideDestination,o=e.afterCritical,a=i.filter(function(s){return Rf({target:HC(s,o),destination:t,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(s,l){var c=Kr(r,Oo(t,ec(s,o))),u=Kr(r,Oo(t,ec(l,o)));return c<u?-1:u<c?1:s.descriptor.index-l.descriptor.index});return a[0]||null},un=_e(function(r,n){var t=n[r.line];return{value:t,point:Ft(r.line,t)}}),qC=function(r,n,t){var i=r.axis;if(r.descriptor.mode==="virtual")return Ft(i.line,n[i.line]);var o=r.subject.page.contentBox[i.size],a=gr(r.descriptor.id,t),s=a.reduce(function(u,d){return u+d.client.marginBox[i.size]},0),l=s+n[i.line],c=l-o;return c<=0?null:Ft(i.line,c)},Pf=function(r,n){return K({},r,{scroll:K({},r.scroll,{max:n})})},kf=function(r,n,t){var i=r.frame;vr(n,r)&&Y(),r.subject.withPlaceholder&&Y();var o=un(r.axis,n.displaceBy).point,a=qC(r,o,t),s={placeholderSize:o,increasedBy:a,oldFrameMaxScroll:r.frame?r.frame.scroll.max:null};if(!i){var l=lr({page:r.subject.page,withPlaceholder:s,axis:r.axis,frame:r.frame});return K({},r,{subject:l})}var c=a?Oe(i.scroll.max,a):i.scroll.max,u=Pf(i,c),d=lr({page:r.subject.page,withPlaceholder:s,axis:r.axis,frame:u});return K({},r,{subject:d,frame:u})},VC=function(r){var n=r.subject.withPlaceholder;n||Y();var t=r.frame;if(!t){var i=lr({page:r.subject.page,axis:r.axis,frame:null,withPlaceholder:null});return K({},r,{subject:i})}var o=n.oldFrameMaxScroll;o||Y();var a=Pf(t,o),s=lr({page:r.subject.page,axis:r.axis,frame:a,withPlaceholder:null});return K({},r,{subject:s,frame:a})},KC=function(e){var r=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,t=e.insideDestination,i=e.draggable,o=e.draggables,a=e.destination,s=e.viewport,l=e.afterCritical;if(!n){if(t.length)return null;var c={displaced:Yr,displacedBy:wf,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},u=hi({impact:c,draggable:i,droppable:a,draggables:o,afterCritical:l}),d=vr(i,a)?a:kf(a,i,o),f=Df({draggable:i,destination:d,newPageBorderBoxCenter:u,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return f?c:null}var p=r[a.axis.line]<=n.page.borderBox.center[a.axis.line],h=function(){var m=n.descriptor.index;return n.descriptor.id===i.descriptor.id||p?m:m+1}(),v=un(a.axis,i.displaceBy);return Yn({draggable:i,insideDestination:t,destination:a,viewport:s,displacedBy:v,last:Yr,index:h})},YC=function(e){var r=e.isMovingForward,n=e.previousPageBorderBoxCenter,t=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,s=e.viewport,l=e.afterCritical,c=WC({isMovingForward:r,pageBorderBoxCenter:n,source:i,droppables:a,viewport:s});if(!c)return null;var u=gr(c.descriptor.id,o),d=UC({pageBorderBoxCenter:n,viewport:s,destination:c,insideDestination:u,afterCritical:l}),f=KC({previousPageBorderBoxCenter:n,destination:c,draggable:t,draggables:o,moveRelativeTo:d,insideDestination:u,viewport:s,afterCritical:l});if(!f)return null;var p=hi({impact:f,draggable:t,droppable:c,draggables:o,afterCritical:l}),h=_a({pageBorderBoxCenter:p,draggable:t,viewport:s});return{clientSelection:h,impact:f,scrollJumpRequest:null}},We=function(e){var r=e.at;return r?r.type==="REORDER"?r.destination.droppableId:r.combine.droppableId:null},JC=function(r,n){var t=We(r);return t?n[t]:null},XC=function(e){var r=e.state,n=e.type,t=JC(r.impact,r.dimensions.droppables),i=!!t,o=r.dimensions.droppables[r.critical.droppable.id],a=t||o,s=a.axis.direction,l=s==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||s==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(l&&!i)return null;var c=n==="MOVE_DOWN"||n==="MOVE_RIGHT",u=r.dimensions.draggables[r.critical.draggable.id],d=r.current.page.borderBoxCenter,f=r.dimensions,p=f.draggables,h=f.droppables;return l?GC({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,destination:a,draggables:p,viewport:r.viewport,previousClientSelection:r.current.client.selection,previousImpact:r.impact,afterCritical:r.afterCritical}):YC({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,isOver:a,draggables:p,droppables:h,viewport:r.viewport,afterCritical:r.afterCritical})};function Et(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Of(e){var r=Je(e.top,e.bottom),n=Je(e.left,e.right);return function(i){return r(i.y)&&n(i.x)}}function QC(e,r){return e.left<r.right&&e.right>r.left&&e.top<r.bottom&&e.bottom>r.top}function ZC(e){var r=e.pageBorderBox,n=e.draggable,t=e.candidates,i=n.page.borderBox.center,o=t.map(function(a){var s=a.axis,l=Ft(a.axis.line,r.center[s.line],a.page.borderBox.center[s.crossAxisLine]);return{id:a.descriptor.id,distance:Kr(i,l)}}).sort(function(a,s){return s.distance-a.distance});return o[0]?o[0].id:null}function e0(e){var r=e.pageBorderBox,n=e.draggable,t=e.droppables,i=di(t).filter(function(o){if(!o.isEnabled)return!1;var a=o.subject.active;if(!a||!QC(r,a))return!1;if(Of(a)(r.center))return!0;var s=o.axis,l=a.center[s.crossAxisLine],c=r[s.crossAxisStart],u=r[s.crossAxisEnd],d=Je(a[s.crossAxisStart],a[s.crossAxisEnd]),f=d(c),p=d(u);return!f&&!p?!0:f?c<l:u>l});return i.length?i.length===1?i[0].descriptor.id:ZC({pageBorderBox:r,draggable:n,candidates:i}):null}var Ef=function(r,n){return Gt(cn(r,n))},t0=function(e,r){var n=e.frame;return n?Ef(r,n.scroll.diff.value):r};function Nf(e){var r=e.displaced,n=e.id;return!!(r.visible[n]||r.invisible[n])}function r0(e){var r=e.draggable,n=e.closest,t=e.inHomeList;return n?t&&n.descriptor.index>r.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var n0=function(e){var r=e.pageBorderBoxWithDroppableScroll,n=e.draggable,t=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,s=e.afterCritical,l=t.axis,c=un(t.axis,n.displaceBy),u=c.value,d=r[l.start],f=r[l.end],p=pi(n,i),h=_t(p,function(m){var b=m.descriptor.id,y=m.page.borderBox.center[l.line],I=Tt(b,s),_=Nf({displaced:o,id:b});return I?_?f<=y:d<y-u:_?f<=y+u:d<y}),v=r0({draggable:n,closest:h,inHomeList:vr(n,t)});return Yn({draggable:n,insideDestination:i,destination:t,viewport:a,last:o,displacedBy:c,index:v})},i0=4,o0=function(e){var r=e.draggable,n=e.pageBorderBoxWithDroppableScroll,t=e.previousImpact,i=e.destination,o=e.insideDestination,a=e.afterCritical;if(!i.isCombineEnabled)return null;var s=i.axis,l=un(i.axis,r.displaceBy),c=l.value,u=n[s.start],d=n[s.end],f=pi(r,o),p=_t(f,function(v){var m=v.descriptor.id,b=v.page.borderBox,y=b[s.size],I=y/i0,_=Tt(m,a),P=Nf({displaced:t.displaced,id:m});return _?P?d>b[s.start]+I&&d<b[s.end]-I:u>b[s.start]-c+I&&u<b[s.end]-c-I:P?d>b[s.start]+c+I&&d<b[s.end]+c-I:u>b[s.start]+I&&u<b[s.end]-I});if(!p)return null;var h={displacedBy:l,displaced:t.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:i.descriptor.id}}};return h},Mf=function(e){var r=e.pageOffset,n=e.draggable,t=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,s=e.afterCritical,l=Ef(n.page.borderBox,r),c=e0({pageBorderBox:l,draggable:n,droppables:i});if(!c)return yC;var u=i[c],d=gr(u.descriptor.id,t),f=t0(u,l);return o0({pageBorderBoxWithDroppableScroll:f,draggable:n,previousImpact:o,destination:u,insideDestination:d,afterCritical:s})||n0({pageBorderBoxWithDroppableScroll:f,draggable:n,destination:u,insideDestination:d,last:o.displaced,viewport:a,afterCritical:s})},Da=function(e,r){var n;return K({},e,(n={},n[r.descriptor.id]=r,n))},a0=function(r){var n=r.previousImpact,t=r.impact,i=r.droppables,o=We(n),a=We(t);if(!o||o===a)return i;var s=i[o];if(!s.subject.withPlaceholder)return i;var l=VC(s);return Da(i,l)},s0=function(e){var r=e.draggable,n=e.draggables,t=e.droppables,i=e.previousImpact,o=e.impact,a=a0({previousImpact:i,impact:o,droppables:t}),s=We(o);if(!s)return a;var l=t[s];if(vr(r,l)||l.subject.withPlaceholder)return a;var c=kf(l,r,n);return Da(a,c)},Br=function(e){var r=e.state,n=e.clientSelection,t=e.dimensions,i=e.viewport,o=e.impact,a=e.scrollJumpRequest,s=i||r.viewport,l=t||r.dimensions,c=n||r.current.client.selection,u=Ge(c,r.initial.client.selection),d={offset:u,selection:c,borderBoxCenter:Oe(r.initial.client.borderBoxCenter,u)},f={selection:Oe(d.selection,s.scroll.current),borderBoxCenter:Oe(d.borderBoxCenter,s.scroll.current),offset:Oe(d.offset,s.scroll.diff.value)},p={client:d,page:f};if(r.phase==="COLLECTING")return K({phase:"COLLECTING"},r,{dimensions:l,viewport:s,current:p});var h=l.draggables[r.critical.draggable.id],v=o||Mf({pageOffset:f.offset,draggable:h,draggables:l.draggables,droppables:l.droppables,previousImpact:r.impact,viewport:s,afterCritical:r.afterCritical}),m=s0({draggable:h,impact:v,previousImpact:r.impact,draggables:l.draggables,droppables:l.droppables}),b=K({},r,{current:p,dimensions:{draggables:l.draggables,droppables:m},impact:v,viewport:s,scrollJumpRequest:a||null,forceShouldAnimate:a?!1:null});return b};function l0(e,r){return e.map(function(n){return r[n]})}var Af=function(e){var r=e.impact,n=e.viewport,t=e.draggables,i=e.destination,o=e.forceShouldAnimate,a=r.displaced,s=l0(a.all,t),l=Jr({afterDragging:s,destination:i,displacedBy:r.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:a});return K({},r,{displaced:l})},Lf=function(e){var r=e.impact,n=e.draggable,t=e.droppable,i=e.draggables,o=e.viewport,a=e.afterCritical,s=hi({impact:r,draggable:n,draggables:i,droppable:t,afterCritical:a});return _a({pageBorderBoxCenter:s,draggable:n,viewport:o})},zf=function(e){var r=e.state,n=e.dimensions,t=e.viewport;r.movementMode!=="SNAP"&&Y();var i=r.impact,o=t||r.viewport,a=n||r.dimensions,s=a.draggables,l=a.droppables,c=s[r.critical.draggable.id],u=We(i);u||Y();var d=l[u],f=Af({impact:i,viewport:o,destination:d,draggables:s}),p=Lf({impact:f,draggable:c,droppable:d,draggables:s,viewport:o,afterCritical:r.afterCritical});return Br({impact:f,clientSelection:p,state:r,dimensions:a,viewport:o})},c0=function(e){return{index:e.index,droppableId:e.droppableId}},jf=function(e){var r=e.draggable,n=e.home,t=e.draggables,i=e.viewport,o=un(n.axis,r.displaceBy),a=gr(n.descriptor.id,t),s=a.indexOf(r);s===-1&&Y();var l=a.slice(s+1),c=l.reduce(function(p,h){return p[h.descriptor.id]=!0,p},{}),u={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:c},d=Jr({afterDragging:l,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),f={displaced:d,displacedBy:o,at:{type:"REORDER",destination:c0(r.descriptor)}};return{impact:f,afterCritical:u}},u0=function(e,r){return{draggables:e.draggables,droppables:Da(e.droppables,r)}},d0=function(e){var r=e.draggable,n=e.offset,t=e.initialWindowScroll,i=no(r.client,n),o=Fn(i,t),a=K({},r,{placeholder:K({},r.placeholder,{client:i}),client:i,page:o});return a},f0=function(e){var r=e.frame;return r||Y(),r},p0=function(e){var r=e.additions,n=e.updatedDroppables,t=e.viewport,i=t.scroll.diff.value;return r.map(function(o){var a=o.descriptor.droppableId,s=n[a],l=f0(s),c=l.scroll.diff.value,u=Oe(i,c),d=d0({draggable:o,offset:u,initialWindowScroll:t.scroll.initial});return d})},h0=function(e){var r=e.state,n=e.published,t=n.modified.map(function(I){var _=r.dimensions.droppables[I.droppableId],P=Sa(_,I.scroll);return P}),i=K({},r.dimensions.droppables,{},xf(t)),o=Sf(p0({additions:n.additions,updatedDroppables:i,viewport:r.viewport})),a=K({},r.dimensions.draggables,{},o);n.removals.forEach(function(I){delete a[I]});var s={droppables:i,draggables:a},l=We(r.impact),c=l?s.droppables[l]:null,u=s.draggables[r.critical.draggable.id],d=s.droppables[r.critical.droppable.id],f=jf({draggable:u,home:d,draggables:a,viewport:r.viewport}),p=f.impact,h=f.afterCritical,v=c&&c.isCombineEnabled?r.impact:p,m=Mf({pageOffset:r.current.page.offset,draggable:s.draggables[r.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:v,viewport:r.viewport,afterCritical:h}),b=K({phase:"DRAGGING"},r,{phase:"DRAGGING",impact:m,onLiftImpact:p,dimensions:s,afterCritical:h,forceShouldAnimate:!1});if(r.phase==="COLLECTING")return b;var y=K({phase:"DROP_PENDING"},b,{phase:"DROP_PENDING",reason:r.reason,isWaiting:!1});return y},Eo=function(r){return r.movementMode==="SNAP"},qi=function(r,n,t){var i=u0(r.dimensions,n);return!Eo(r)||t?Br({state:r,dimensions:i}):zf({state:r,dimensions:i})};function Vi(e){return e.isDragging&&e.movementMode==="SNAP"?K({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var tc={phase:"IDLE",completed:null,shouldFlush:!1},g0=function(e,r){if(e===void 0&&(e=tc),r.type==="FLUSH")return K({},tc,{shouldFlush:!0});if(r.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&Y();var n=r.payload,t=n.critical,i=n.clientSelection,o=n.viewport,a=n.dimensions,s=n.movementMode,l=a.draggables[t.draggable.id],c=a.droppables[t.droppable.id],u={selection:i,borderBoxCenter:l.client.borderBox.center,offset:De},d={client:u,page:{selection:Oe(u.selection,o.scroll.initial),borderBoxCenter:Oe(u.selection,o.scroll.initial),offset:Oe(u.selection,o.scroll.diff.value)}},f=di(a.droppables).every(function(j){return!j.isFixedOnPage}),p=jf({draggable:l,home:c,draggables:a.draggables,viewport:o}),h=p.impact,v=p.afterCritical,m={phase:"DRAGGING",isDragging:!0,critical:t,movementMode:s,dimensions:a,initial:d,current:d,isWindowScrollAllowed:f,impact:h,afterCritical:v,onLiftImpact:h,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return m}if(r.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Y();var b=K({phase:"COLLECTING"},e,{phase:"COLLECTING"});return b}if(r.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||Y(),h0({state:e,published:r.payload});if(r.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Et(e)||Y();var y=r.payload.client;return St(y,e.current.client.selection)?e:Br({state:e,clientSelection:y,impact:Eo(e)?e.impact:null})}if(r.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Vi(e);Et(e)||Y();var I=r.payload,_=I.id,P=I.newScroll,w=e.dimensions.droppables[_];if(!w)return e;var D=Sa(w,P);return qi(e,D,!1)}if(r.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Et(e)||Y();var S=r.payload,T=S.id,R=S.isEnabled,O=e.dimensions.droppables[T];O||Y(),O.isEnabled===R&&Y();var L=K({},O,{isEnabled:R});return qi(e,L,!0)}if(r.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Et(e)||Y();var M=r.payload,H=M.id,E=M.isCombineEnabled,B=e.dimensions.droppables[H];B||Y(),B.isCombineEnabled===E&&Y();var $=K({},B,{isCombineEnabled:E});return qi(e,$,!0)}if(r.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Et(e)||Y(),e.isWindowScrollAllowed||Y();var U=r.payload.newScroll;if(St(e.viewport.scroll.current,U))return Vi(e);var J=_f(e.viewport,U);return Eo(e)?zf({state:e,viewport:J}):Br({state:e,viewport:J})}if(r.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Et(e))return e;var ee=r.payload.maxScroll;if(St(ee,e.viewport.scroll.max))return e;var X=K({},e.viewport,{scroll:K({},e.viewport.scroll,{max:ee})});return K({phase:"DRAGGING"},e,{viewport:X})}if(r.type==="MOVE_UP"||r.type==="MOVE_DOWN"||r.type==="MOVE_LEFT"||r.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Y();var Z=XC({state:e,type:r.type});return Z?Br({state:e,impact:Z.impact,clientSelection:Z.clientSelection,scrollJumpRequest:Z.scrollJumpRequest}):e}if(r.type==="DROP_PENDING"){var q=r.payload.reason;e.phase!=="COLLECTING"&&Y();var ne=K({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:q});return ne}if(r.type==="DROP_ANIMATE"){var ie=r.payload,ue=ie.completed,G=ie.dropDuration,W=ie.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||Y();var k={phase:"DROP_ANIMATING",completed:ue,dropDuration:G,newHomeClientOffset:W,dimensions:e.dimensions};return k}if(r.type==="DROP_COMPLETE"){var N=r.payload.completed;return{phase:"IDLE",completed:N,shouldFlush:!1}}return e},v0=function(r){return{type:"BEFORE_INITIAL_CAPTURE",payload:r}},m0=function(r){return{type:"LIFT",payload:r}},b0=function(r){return{type:"INITIAL_PUBLISH",payload:r}},y0=function(r){return{type:"PUBLISH_WHILE_DRAGGING",payload:r}},x0=function(){return{type:"COLLECTION_STARTING",payload:null}},S0=function(r){return{type:"UPDATE_DROPPABLE_SCROLL",payload:r}},w0=function(r){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:r}},C0=function(r){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:r}},Ff=function(r){return{type:"MOVE",payload:r}},I0=function(r){return{type:"MOVE_BY_WINDOW_SCROLL",payload:r}},R0=function(r){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:r}},T0=function(){return{type:"MOVE_UP",payload:null}},_0=function(){return{type:"MOVE_DOWN",payload:null}},D0=function(){return{type:"MOVE_RIGHT",payload:null}},P0=function(){return{type:"MOVE_LEFT",payload:null}},Pa=function(){return{type:"FLUSH",payload:null}},k0=function(r){return{type:"DROP_ANIMATE",payload:r}},ka=function(r){return{type:"DROP_COMPLETE",payload:r}},Bf=function(r){return{type:"DROP",payload:r}},O0=function(r){return{type:"DROP_PENDING",payload:r}},$f=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},E0=function(e){return function(r){var n=r.getState,t=r.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var a=o.payload,s=a.id,l=a.clientSelection,c=a.movementMode,u=n();u.phase==="DROP_ANIMATING"&&t(ka({completed:u.completed})),n().phase!=="IDLE"&&Y(),t(Pa()),t(v0({draggableId:s,movementMode:c}));var d={shouldPublishImmediately:c==="SNAP"},f={draggableId:s,scrollOptions:d},p=e.startPublishing(f),h=p.critical,v=p.dimensions,m=p.viewport;t(b0({critical:h,dimensions:v,clientSelection:l,movementMode:c,viewport:m}))}}}},N0=function(e){return function(){return function(r){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),r(n)}}}},Oa={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Xr={opacity:{drop:0,combining:.7},scale:{drop:.75}},Ea={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Pt=Ea.outOfTheWay+"s "+Oa.outOfTheWay,$r={fluid:"opacity "+Pt,snap:"transform "+Pt+", opacity "+Pt,drop:function(r){var n=r+"s "+Oa.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Pt,placeholder:"height "+Pt+", width "+Pt+", margin "+Pt},rc=function(r){return St(r,De)?null:"translate("+r.x+"px, "+r.y+"px)"},No={moveTo:rc,drop:function(r,n){var t=rc(r);return t?n?t+" scale("+Xr.scale.drop+")":t:null}},Mo=Ea.minDropTime,Gf=Ea.maxDropTime,M0=Gf-Mo,nc=1500,A0=.6,L0=function(e){var r=e.current,n=e.destination,t=e.reason,i=Kr(r,n);if(i<=0)return Mo;if(i>=nc)return Gf;var o=i/nc,a=Mo+M0*o,s=t==="CANCEL"?a*A0:a;return Number(s.toFixed(2))},z0=function(e){var r=e.impact,n=e.draggable,t=e.dimensions,i=e.viewport,o=e.afterCritical,a=t.draggables,s=t.droppables,l=We(r),c=l?s[l]:null,u=s[n.descriptor.droppableId],d=Lf({impact:r,draggable:n,draggables:a,afterCritical:o,droppable:c||u,viewport:i}),f=Ge(d,n.client.borderBox.center);return f},j0=function(e){var r=e.draggables,n=e.reason,t=e.lastImpact,i=e.home,o=e.viewport,a=e.onLiftImpact;if(!t.at||n!=="DROP"){var s=Af({draggables:r,impact:a,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:s,didDropInsideDroppable:!1}}if(t.at.type==="REORDER")return{impact:t,didDropInsideDroppable:!0};var l=K({},t,{displaced:Yr});return{impact:l,didDropInsideDroppable:!0}},F0=function(e){var r=e.getState,n=e.dispatch;return function(t){return function(i){if(i.type!=="DROP"){t(i);return}var o=r(),a=i.payload.reason;if(o.phase==="COLLECTING"){n(O0({reason:a}));return}if(o.phase!=="IDLE"){var s=o.phase==="DROP_PENDING"&&o.isWaiting;s&&Y(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||Y();var l=o.critical,c=o.dimensions,u=c.draggables[o.critical.draggable.id],d=j0({reason:a,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),f=d.impact,p=d.didDropInsideDroppable,h=p?Ca(f):null,v=p?fi(f):null,m={index:l.draggable.index,droppableId:l.droppable.id},b={draggableId:u.descriptor.id,type:u.descriptor.type,source:m,reason:a,mode:o.movementMode,destination:h,combine:v},y=z0({impact:f,draggable:u,dimensions:c,viewport:o.viewport,afterCritical:o.afterCritical}),I={critical:o.critical,afterCritical:o.afterCritical,result:b,impact:f},_=!St(o.current.client.offset,y)||!!b.combine;if(!_){n(ka({completed:I}));return}var P=L0({current:o.current.client.offset,destination:y,reason:a}),w={newHomeClientOffset:y,dropDuration:P,completed:I};n(k0(w))}}}},Wf=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function B0(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function $0(e){var r=e.onWindowScroll;function n(){r(Wf())}var t=Gr(n),i=B0(t),o=xt;function a(){return o!==xt}function s(){a()&&Y(),o=Ye(window,[i])}function l(){a()||Y(),t.cancel(),o(),o=xt}return{start:s,stop:l,isActive:a}}var G0=function(r){return r.type==="DROP_COMPLETE"||r.type==="DROP_ANIMATE"||r.type==="FLUSH"},W0=function(e){var r=$0({onWindowScroll:function(t){e.dispatch(I0({newScroll:t}))}});return function(n){return function(t){!r.isActive()&&t.type==="INITIAL_PUBLISH"&&r.start(),r.isActive()&&G0(t)&&r.stop(),n(t)}}},H0=function(e){var r=!1,n=!1,t=setTimeout(function(){n=!0}),i=function(a){r||n||(r=!0,e(a),clearTimeout(t))};return i.wasCalled=function(){return r},i},U0=function(){var e=[],r=function(o){var a=wa(e,function(c){return c.timerId===o});a===-1&&Y();var s=e.splice(a,1),l=s[0];l.callback()},n=function(o){var a=setTimeout(function(){return r(a)}),s={timerId:a,callback:o};e.push(s)},t=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(a){clearTimeout(a.timerId),a.callback()})}};return{add:n,flush:t}},q0=function(r,n){return r==null&&n==null?!0:r==null||n==null?!1:r.droppableId===n.droppableId&&r.index===n.index},V0=function(r,n){return r==null&&n==null?!0:r==null||n==null?!1:r.draggableId===n.draggableId&&r.droppableId===n.droppableId},K0=function(r,n){if(r===n)return!0;var t=r.draggable.id===n.draggable.id&&r.draggable.droppableId===n.draggable.droppableId&&r.draggable.type===n.draggable.type&&r.draggable.index===n.draggable.index,i=r.droppable.id===n.droppable.id&&r.droppable.type===n.droppable.type;return t&&i},Ir=function(r,n){n()},yn=function(r,n){return{draggableId:r.draggable.id,type:r.droppable.type,source:{droppableId:r.droppable.id,index:r.draggable.index},mode:n}},Ki=function(r,n,t,i){if(!r){t(i(n));return}var o=H0(t),a={announce:o};r(n,a),o.wasCalled()||t(i(n))},Y0=function(e,r){var n=U0(),t=null,i=function(f,p){t&&Y(),Ir("onBeforeCapture",function(){var h=e().onBeforeCapture;if(h){var v={draggableId:f,mode:p};h(v)}})},o=function(f,p){t&&Y(),Ir("onBeforeDragStart",function(){var h=e().onBeforeDragStart;h&&h(yn(f,p))})},a=function(f,p){t&&Y();var h=yn(f,p);t={mode:p,lastCritical:f,lastLocation:h.source,lastCombine:null},n.add(function(){Ir("onDragStart",function(){return Ki(e().onDragStart,h,r,Nn.onDragStart)})})},s=function(f,p){var h=Ca(p),v=fi(p);t||Y();var m=!K0(f,t.lastCritical);m&&(t.lastCritical=f);var b=!q0(t.lastLocation,h);b&&(t.lastLocation=h);var y=!V0(t.lastCombine,v);if(y&&(t.lastCombine=v),!(!m&&!b&&!y)){var I=K({},yn(f,t.mode),{combine:v,destination:h});n.add(function(){Ir("onDragUpdate",function(){return Ki(e().onDragUpdate,I,r,Nn.onDragUpdate)})})}},l=function(){t||Y(),n.flush()},c=function(f){t||Y(),t=null,Ir("onDragEnd",function(){return Ki(e().onDragEnd,f,r,Nn.onDragEnd)})},u=function(){if(t){var f=K({},yn(t.lastCritical,t.mode),{combine:null,destination:null,reason:"CANCEL"});c(f)}};return{beforeCapture:i,beforeStart:o,start:a,update:s,flush:l,drop:c,abort:u}},J0=function(e,r){var n=Y0(e,r);return function(t){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var a=o.payload.critical;n.beforeStart(a,o.payload.movementMode),i(o),n.start(a,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var s=o.payload.completed.result;n.flush(),i(o),n.drop(s);return}if(i(o),o.type==="FLUSH"){n.abort();return}var l=t.getState();l.phase==="DRAGGING"&&n.update(l.critical,l.impact)}}}},X0=function(e){return function(r){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){r(n);return}var t=e.getState();t.phase!=="DROP_ANIMATING"&&Y(),e.dispatch(ka({completed:t.completed}))}}},Q0=function(e){var r=null,n=null;function t(){n&&(cancelAnimationFrame(n),n=null),r&&(r(),r=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&t(),i(o),o.type==="DROP_ANIMATE"){var a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var l=e.getState();l.phase==="DROP_ANIMATING"&&e.dispatch($f())}};n=requestAnimationFrame(function(){n=null,r=Ye(window,[a])})}}}},Z0=function(e){return function(){return function(r){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),r(n)}}}},eI=function(e){var r=!1;return function(){return function(n){return function(t){if(t.type==="INITIAL_PUBLISH"){r=!0,e.tryRecordFocus(t.payload.critical.draggable.id),n(t),e.tryRestoreFocusRecorded();return}if(n(t),!!r){if(t.type==="FLUSH"){r=!1,e.tryRestoreFocusRecorded();return}if(t.type==="DROP_COMPLETE"){r=!1;var i=t.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},tI=function(r){return r.type==="DROP_COMPLETE"||r.type==="DROP_ANIMATE"||r.type==="FLUSH"},rI=function(e){return function(r){return function(n){return function(t){if(tI(t)){e.stop(),n(t);return}if(t.type==="INITIAL_PUBLISH"){n(t);var i=r.getState();i.phase!=="DRAGGING"&&Y(),e.start(i);return}n(t),e.scroll(r.getState())}}}},nI=function(e){return function(r){return function(n){if(r(n),n.type==="PUBLISH_WHILE_DRAGGING"){var t=e.getState();t.phase==="DROP_PENDING"&&(t.isWaiting||e.dispatch(Bf({reason:t.reason})))}}}},iI=og,oI=function(e){var r=e.dimensionMarshal,n=e.focusMarshal,t=e.styleMarshal,i=e.getResponders,o=e.announce,a=e.autoScroller;return ig(g0,iI(ag(N0(t),Z0(r),E0(r),F0,X0,Q0,nI,rI(a),W0,eI(n),J0(i,o))))},Yi=function(){return{additions:{},removals:{},modified:{}}};function aI(e){var r=e.registry,n=e.callbacks,t=Yi(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var u=t,d=u.additions,f=u.removals,p=u.modified,h=Object.keys(d).map(function(b){return r.draggable.getById(b).getDimension(De)}).sort(function(b,y){return b.descriptor.index-y.descriptor.index}),v=Object.keys(p).map(function(b){var y=r.droppable.getById(b),I=y.callbacks.getScrollWhileDragging();return{droppableId:b,scroll:I}}),m={additions:h,removals:Object.keys(f),modified:v};t=Yi(),n.publish(m)}))},a=function(u){var d=u.descriptor.id;t.additions[d]=u,t.modified[u.descriptor.droppableId]=!0,t.removals[d]&&delete t.removals[d],o()},s=function(u){var d=u.descriptor;t.removals[d.id]=!0,t.modified[d.droppableId]=!0,t.additions[d.id]&&delete t.additions[d.id],o()},l=function(){i&&(cancelAnimationFrame(i),i=null,t=Yi())};return{add:a,remove:s,stop:l}}var Hf=function(e){var r=e.scrollHeight,n=e.scrollWidth,t=e.height,i=e.width,o=Ge({x:n,y:r},{x:i,y:t}),a={x:Math.max(0,o.x),y:Math.max(0,o.y)};return a},Uf=function(){var e=document.documentElement;return e||Y(),e},qf=function(){var e=Uf(),r=Hf({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return r},sI=function(){var e=Wf(),r=qf(),n=e.y,t=e.x,i=Uf(),o=i.clientWidth,a=i.clientHeight,s=t+o,l=n+a,c=Gt({top:n,left:t,right:s,bottom:l}),u={frame:c,scroll:{initial:e,current:e,max:r,diff:{value:De,displacement:De}}};return u},lI=function(e){var r=e.critical,n=e.scrollOptions,t=e.registry,i=sI(),o=i.scroll.current,a=r.droppable,s=t.droppable.getAllByType(a.type).map(function(d){return d.callbacks.getDimensionAndWatchScroll(o,n)}),l=t.draggable.getAllByType(r.draggable.type).map(function(d){return d.getDimension(o)}),c={draggables:Sf(l),droppables:xf(s)},u={dimensions:c,critical:r,viewport:i};return u};function ic(e,r,n){if(n.descriptor.id===r.id||n.descriptor.type!==r.type)return!1;var t=e.droppable.getById(n.descriptor.droppableId);return t.descriptor.mode==="virtual"}var cI=function(e,r){var n=null,t=aI({callbacks:{publish:r.publishWhileDragging,collectionStarting:r.collectionStarting},registry:e}),i=function(p,h){e.droppable.exists(p)||Y(),n&&r.updateDroppableIsEnabled({id:p,isEnabled:h})},o=function(p,h){n&&(e.droppable.exists(p)||Y(),r.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:h}))},a=function(p,h){n&&(e.droppable.exists(p)||Y(),r.updateDroppableScroll({id:p,newScroll:h}))},s=function(p,h){n&&e.droppable.getById(p).callbacks.scroll(h)},l=function(){if(n){t.stop();var p=n.critical.droppable;e.droppable.getAllByType(p.type).forEach(function(h){return h.callbacks.dragStopped()}),n.unsubscribe(),n=null}},c=function(p){n||Y();var h=n.critical.draggable;p.type==="ADDITION"&&ic(e,h,p.value)&&t.add(p.value),p.type==="REMOVAL"&&ic(e,h,p.value)&&t.remove(p.value)},u=function(p){n&&Y();var h=e.draggable.getById(p.draggableId),v=e.droppable.getById(h.descriptor.droppableId),m={draggable:h.descriptor,droppable:v.descriptor},b=e.subscribe(c);return n={critical:m,unsubscribe:b},lI({critical:m,registry:e,scrollOptions:p.scrollOptions})},d={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:s,updateDroppableScroll:a,startPublishing:u,stopPublishing:l};return d},Vf=function(e,r){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===r?!1:e.completed.result.reason==="DROP"},uI=function(e){window.scrollBy(e.x,e.y)},dI=_e(function(e){return di(e).filter(function(r){return!(!r.isEnabled||!r.frame)})}),fI=function(r,n){var t=_t(dI(n),function(i){return i.frame||Y(),Of(i.frame.pageMarginBox)(r)});return t},pI=function(e){var r=e.center,n=e.destination,t=e.droppables;if(n){var i=t[n];return i.frame?i:null}var o=fI(r,t);return o},wt={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(r){return Math.pow(r,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},hI=function(e,r){var n=e[r.size]*wt.startFromPercentage,t=e[r.size]*wt.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:t};return i},Kf=function(e){var r=e.startOfRange,n=e.endOfRange,t=e.current,i=n-r;if(i===0)return 0;var o=t-r,a=o/i;return a},Na=1,gI=function(e,r){if(e>r.startScrollingFrom)return 0;if(e<=r.maxScrollValueAt)return wt.maxPixelScroll;if(e===r.startScrollingFrom)return Na;var n=Kf({startOfRange:r.maxScrollValueAt,endOfRange:r.startScrollingFrom,current:e}),t=1-n,i=wt.maxPixelScroll*wt.ease(t);return Math.ceil(i)},oc=wt.durationDampening.accelerateAt,ac=wt.durationDampening.stopDampeningAt,vI=function(e,r){var n=r,t=ac,i=Date.now(),o=i-n;if(o>=ac)return e;if(o<oc)return Na;var a=Kf({startOfRange:oc,endOfRange:t,current:o}),s=e*wt.ease(a);return Math.ceil(s)},sc=function(e){var r=e.distanceToEdge,n=e.thresholds,t=e.dragStartTime,i=e.shouldUseTimeDampening,o=gI(r,n);return o===0?0:i?Math.max(vI(o,t),Na):o},lc=function(e){var r=e.container,n=e.distanceToEdges,t=e.dragStartTime,i=e.axis,o=e.shouldUseTimeDampening,a=hI(r,i),s=n[i.end]<n[i.start];return s?sc({distanceToEdge:n[i.end],thresholds:a,dragStartTime:t,shouldUseTimeDampening:o}):-1*sc({distanceToEdge:n[i.start],thresholds:a,dragStartTime:t,shouldUseTimeDampening:o})},mI=function(e){var r=e.container,n=e.subject,t=e.proposedScroll,i=n.height>r.height,o=n.width>r.width;return!o&&!i?t:o&&i?null:{x:o?0:t.x,y:i?0:t.y}},bI=bf(function(e){return e===0?0:e}),Yf=function(e){var r=e.dragStartTime,n=e.container,t=e.subject,i=e.center,o=e.shouldUseTimeDampening,a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},s=lc({container:n,distanceToEdges:a,dragStartTime:r,axis:Ia,shouldUseTimeDampening:o}),l=lc({container:n,distanceToEdges:a,dragStartTime:r,axis:If,shouldUseTimeDampening:o}),c=bI({x:l,y:s});if(St(c,De))return null;var u=mI({container:n,subject:t,proposedScroll:c});return u?St(u,De)?null:u:null},yI=bf(function(e){return e===0?0:e>0?1:-1}),Ma=function(){var e=function(n,t){return n<0?n:n>t?n-t:0};return function(r){var n=r.current,t=r.max,i=r.change,o=Oe(n,i),a={x:e(o.x,t.x),y:e(o.y,t.y)};return St(a,De)?null:a}}(),Jf=function(r){var n=r.max,t=r.current,i=r.change,o={x:Math.max(t.x,n.x),y:Math.max(t.y,n.y)},a=yI(i),s=Ma({max:o,current:t,change:a});return!s||a.x!==0&&s.x===0||a.y!==0&&s.y===0},Aa=function(r,n){return Jf({current:r.scroll.current,max:r.scroll.max,change:n})},xI=function(r,n){if(!Aa(r,n))return null;var t=r.scroll.max,i=r.scroll.current;return Ma({current:i,max:t,change:n})},La=function(r,n){var t=r.frame;return t?Jf({current:t.scroll.current,max:t.scroll.max,change:n}):!1},SI=function(r,n){var t=r.frame;return!t||!La(r,n)?null:Ma({current:t.scroll.current,max:t.scroll.max,change:n})},wI=function(e){var r=e.viewport,n=e.subject,t=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=Yf({dragStartTime:i,container:r.frame,subject:n,center:t,shouldUseTimeDampening:o});return a&&Aa(r,a)?a:null},CI=function(e){var r=e.droppable,n=e.subject,t=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=r.frame;if(!a)return null;var s=Yf({dragStartTime:i,container:a.pageMarginBox,subject:n,center:t,shouldUseTimeDampening:o});return s&&La(r,s)?s:null},cc=function(e){var r=e.state,n=e.dragStartTime,t=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,a=r.current.page.borderBoxCenter,s=r.dimensions.draggables[r.critical.draggable.id],l=s.page.marginBox;if(r.isWindowScrollAllowed){var c=r.viewport,u=wI({dragStartTime:n,viewport:c,subject:l,center:a,shouldUseTimeDampening:t});if(u){i(u);return}}var d=pI({center:a,destination:We(r.impact),droppables:r.dimensions.droppables});if(d){var f=CI({dragStartTime:n,droppable:d,subject:l,center:a,shouldUseTimeDampening:t});f&&o(d.descriptor.id,f)}},II=function(e){var r=e.scrollWindow,n=e.scrollDroppable,t=Gr(r),i=Gr(n),o=null,a=function(u){o||Y();var d=o,f=d.shouldUseTimeDampening,p=d.dragStartTime;cc({state:u,scrollWindow:t,scrollDroppable:i,dragStartTime:p,shouldUseTimeDampening:f})},s=function(u){o&&Y();var d=Date.now(),f=!1,p=function(){f=!0};cc({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p}),o={dragStartTime:d,shouldUseTimeDampening:f},f&&a(u)},l=function(){o&&(t.cancel(),i.cancel(),o=null)};return{start:s,stop:l,scroll:a}},RI=function(e){var r=e.move,n=e.scrollDroppable,t=e.scrollWindow,i=function(c,u){var d=Oe(c.current.client.selection,u);r({client:d})},o=function(c,u){if(!La(c,u))return u;var d=SI(c,u);if(!d)return n(c.descriptor.id,u),null;var f=Ge(u,d);n(c.descriptor.id,f);var p=Ge(u,f);return p},a=function(c,u,d){if(!c||!Aa(u,d))return d;var f=xI(u,d);if(!f)return t(d),null;var p=Ge(d,f);t(p);var h=Ge(d,p);return h},s=function(c){var u=c.scrollJumpRequest;if(u){var d=We(c.impact);d||Y();var f=o(c.dimensions.droppables[d],u);if(f){var p=c.viewport,h=a(c.isWindowScrollAllowed,p,f);h&&i(c,h)}}};return s},TI=function(e){var r=e.scrollDroppable,n=e.scrollWindow,t=e.move,i=II({scrollWindow:n,scrollDroppable:r}),o=RI({move:t,scrollWindow:n,scrollDroppable:r}),a=function(c){if(c.phase==="DRAGGING"){if(c.movementMode==="FLUID"){i.scroll(c);return}c.scrollJumpRequest&&o(c)}},s={scroll:a,start:i.start,stop:i.stop};return s},cr="data-rbd",ur=function(){var e=cr+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Ao=function(){var e=cr+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),_I=function(){var e=cr+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),uc={contextId:cr+"-scroll-container-context-id"},DI=function(r){return function(n){return"["+n+'="'+r+'"]'}},Rr=function(r,n){return r.map(function(t){var i=t.styles[n];return i?t.selector+" { "+i+" }":""}).join(" ")},PI="pointer-events: none;",kI=function(e){var r=DI(e),n=function(){var s=`
440
+ `},Nn={dragHandleUsageInstructions:cC,onDragStart:uC,onDragUpdate:dC,onDragEnd:fC},De={x:0,y:0},Oe=function(r,n){return{x:r.x+n.x,y:r.y+n.y}},Ge=function(r,n){return{x:r.x-n.x,y:r.y-n.y}},St=function(r,n){return r.x===n.x&&r.y===n.y},hr=function(r){return{x:r.x!==0?-r.x:0,y:r.y!==0?-r.y:0}},Ft=function(r,n,t){var i;return t===void 0&&(t=0),i={},i[r]=n,i[r==="x"?"y":"x"]=t,i},Kr=function(r,n){return Math.sqrt(Math.pow(n.x-r.x,2)+Math.pow(n.y-r.y,2))},Kl=function(r,n){return Math.min.apply(Math,n.map(function(t){return Kr(r,t)}))},bf=function(r){return function(n){return{x:r(n.x),y:r(n.y)}}},pC=function(e,r){var n=Gt({top:Math.max(r.top,e.top),right:Math.min(r.right,e.right),bottom:Math.min(r.bottom,e.bottom),left:Math.max(r.left,e.left)});return n.width<=0||n.height<=0?null:n},cn=function(r,n){return{top:r.top+n.y,left:r.left+n.x,bottom:r.bottom+n.y,right:r.right+n.x}},Yl=function(r){return[{x:r.left,y:r.top},{x:r.right,y:r.top},{x:r.left,y:r.bottom},{x:r.right,y:r.bottom}]},hC={top:0,right:0,bottom:0,left:0},gC=function(r,n){return n?cn(r,n.scroll.diff.displacement):r},vC=function(r,n,t){if(t&&t.increasedBy){var i;return K({},r,(i={},i[n.end]=r[n.end]+t.increasedBy[n.line],i))}return r},mC=function(r,n){return n&&n.shouldClipSubject?pC(n.pageMarginBox,r):Gt(r)},lr=function(e){var r=e.page,n=e.withPlaceholder,t=e.axis,i=e.frame,o=gC(r.marginBox,i),a=vC(o,t,n),s=mC(a,i);return{page:r,withPlaceholder:n,active:s}},Sa=function(e,r){e.frame||Y();var n=e.frame,t=Ge(r,n.scroll.initial),i=hr(t),o=K({},n,{scroll:{initial:n.scroll.initial,current:r,diff:{value:t,displacement:i},max:n.scroll.max}}),a=lr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),s=K({},e,{frame:o,subject:a});return s};function Kn(e){return Object.values?Object.values(e):Object.keys(e).map(function(r){return e[r]})}function wa(e,r){if(e.findIndex)return e.findIndex(r);for(var n=0;n<e.length;n++)if(r(e[n]))return n;return-1}function _t(e,r){if(e.find)return e.find(r);var n=wa(e,r);if(n!==-1)return e[n]}function yf(e){return Array.prototype.slice.call(e)}var xf=_e(function(e){return e.reduce(function(r,n){return r[n.descriptor.id]=n,r},{})}),Sf=_e(function(e){return e.reduce(function(r,n){return r[n.descriptor.id]=n,r},{})}),di=_e(function(e){return Kn(e)}),bC=_e(function(e){return Kn(e)}),gr=_e(function(e,r){var n=bC(r).filter(function(t){return e===t.descriptor.droppableId}).sort(function(t,i){return t.descriptor.index-i.descriptor.index});return n});function Ca(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function fi(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var pi=_e(function(e,r){return r.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),yC=function(e){var r=e.isMovingForward,n=e.draggable,t=e.destination,i=e.insideDestination,o=e.previousImpact;if(!t.isCombineEnabled)return null;var a=Ca(o);if(!a)return null;function s(v){var m={type:"COMBINE",combine:{draggableId:v,droppableId:t.descriptor.id}};return K({},o,{at:m})}var l=o.displaced.all,c=l.length?l[0]:null;if(r)return c?s(c):null;var u=pi(n,i);if(!c){if(!u.length)return null;var d=u[u.length-1];return s(d.descriptor.id)}var f=wa(u,function(v){return v.descriptor.id===c});f===-1&&Y();var p=f-1;if(p<0)return null;var h=u[p];return s(h.descriptor.id)},vr=function(e,r){return e.descriptor.droppableId===r.descriptor.id},wf={point:De,value:0},Yr={invisible:{},visible:{},all:[]},xC={displaced:Yr,displacedBy:wf,at:null},Je=function(e,r){return function(n){return e<=n&&n<=r}},Cf=function(e){var r=Je(e.top,e.bottom),n=Je(e.left,e.right);return function(t){var i=r(t.top)&&r(t.bottom)&&n(t.left)&&n(t.right);if(i)return!0;var o=r(t.top)||r(t.bottom),a=n(t.left)||n(t.right),s=o&&a;if(s)return!0;var l=t.top<e.top&&t.bottom>e.bottom,c=t.left<e.left&&t.right>e.right,u=l&&c;if(u)return!0;var d=l&&a||c&&o;return d}},SC=function(e){var r=Je(e.top,e.bottom),n=Je(e.left,e.right);return function(t){var i=r(t.top)&&r(t.bottom)&&n(t.left)&&n(t.right);return i}},Ia={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},If={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},wC=function(e){return function(r){var n=Je(r.top,r.bottom),t=Je(r.left,r.right);return function(i){return e===Ia?n(i.top)&&n(i.bottom):t(i.left)&&t(i.right)}}},CC=function(r,n){var t=n.frame?n.frame.scroll.diff.displacement:De;return cn(r,t)},IC=function(r,n,t){return n.subject.active?t(n.subject.active)(r):!1},RC=function(r,n,t){return t(n)(r)},Ra=function(r){var n=r.target,t=r.destination,i=r.viewport,o=r.withDroppableDisplacement,a=r.isVisibleThroughFrameFn,s=o?CC(n,t):n;return IC(s,t,a)&&RC(s,i,a)},TC=function(r){return Ra(K({},r,{isVisibleThroughFrameFn:Cf}))},Rf=function(r){return Ra(K({},r,{isVisibleThroughFrameFn:SC}))},_C=function(r){return Ra(K({},r,{isVisibleThroughFrameFn:wC(r.destination.axis)}))},DC=function(r,n,t){if(typeof t=="boolean")return t;if(!n)return!0;var i=n.invisible,o=n.visible;if(i[r])return!1;var a=o[r];return a?a.shouldAnimate:!0};function PC(e,r){var n=e.page.marginBox,t={top:r.point.y,right:0,bottom:0,left:r.point.x};return Gt(Kc(n,t))}function Jr(e){var r=e.afterDragging,n=e.destination,t=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,a=e.last;return r.reduce(function(l,c){var u=PC(c,t),d=c.descriptor.id;l.all.push(d);var f=TC({target:u,destination:n,viewport:i,withDroppableDisplacement:!0});if(!f)return l.invisible[c.descriptor.id]=!0,l;var p=DC(d,a,o),h={draggableId:d,shouldAnimate:p};return l.visible[d]=h,l},{all:[],visible:{},invisible:{}})}function kC(e,r){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return r.inHomeList?n:n+1}function Jl(e){var r=e.insideDestination,n=e.inHomeList,t=e.displacedBy,i=e.destination,o=kC(r,{inHomeList:n});return{displaced:Yr,displacedBy:t,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Yn(e){var r=e.draggable,n=e.insideDestination,t=e.destination,i=e.viewport,o=e.displacedBy,a=e.last,s=e.index,l=e.forceShouldAnimate,c=vr(r,t);if(s==null)return Jl({insideDestination:n,inHomeList:c,displacedBy:o,destination:t});var u=_t(n,function(v){return v.descriptor.index===s});if(!u)return Jl({insideDestination:n,inHomeList:c,displacedBy:o,destination:t});var d=pi(r,n),f=n.indexOf(u),p=d.slice(f),h=Jr({afterDragging:p,destination:t,displacedBy:o,last:a,viewport:i.frame,forceShouldAnimate:l});return{displaced:h,displacedBy:o,at:{type:"REORDER",destination:{droppableId:t.descriptor.id,index:s}}}}function Tt(e,r){return!!r.effected[e]}var OC=function(e){var r=e.isMovingForward,n=e.destination,t=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var a=i.draggableId,s=t[a],l=s.descriptor.index,c=Tt(a,o);return c?r?l:l-1:r?l+1:l},EC=function(e){var r=e.isMovingForward,n=e.isInHomeList,t=e.insideDestination,i=e.location;if(!t.length)return null;var o=i.index,a=r?o+1:o-1,s=t[0].descriptor.index,l=t[t.length-1].descriptor.index,c=n?l:l+1;return a<s||a>c?null:a},NC=function(e){var r=e.isMovingForward,n=e.isInHomeList,t=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,s=e.previousImpact,l=e.viewport,c=e.afterCritical,u=s.at;if(u||Y(),u.type==="REORDER"){var d=EC({isMovingForward:r,isInHomeList:n,location:u.destination,insideDestination:a});return d==null?null:Yn({draggable:t,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:d})}var f=OC({isMovingForward:r,destination:o,displaced:s.displaced,draggables:i,combine:u.combine,afterCritical:c});return f==null?null:Yn({draggable:t,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:f})},MC=function(e){var r=e.displaced,n=e.afterCritical,t=e.combineWith,i=e.displacedBy,o=!!(r.visible[t]||r.invisible[t]);return Tt(t,n)?o?De:hr(i.point):o?i.point:De},AC=function(e){var r=e.afterCritical,n=e.impact,t=e.draggables,i=fi(n);i||Y();var o=i.draggableId,a=t[o].page.borderBox.center,s=MC({displaced:n.displaced,afterCritical:r,combineWith:o,displacedBy:n.displacedBy});return Oe(a,s)},Tf=function(r,n){return n.margin[r.start]+n.borderBox[r.size]/2},LC=function(r,n){return n.margin[r.end]+n.borderBox[r.size]/2},Ta=function(r,n,t){return n[r.crossAxisStart]+t.margin[r.crossAxisStart]+t.borderBox[r.crossAxisSize]/2},Xl=function(r){var n=r.axis,t=r.moveRelativeTo,i=r.isMoving;return Ft(n.line,t.marginBox[n.end]+Tf(n,i),Ta(n,t.marginBox,i))},Ql=function(r){var n=r.axis,t=r.moveRelativeTo,i=r.isMoving;return Ft(n.line,t.marginBox[n.start]-LC(n,i),Ta(n,t.marginBox,i))},zC=function(r){var n=r.axis,t=r.moveInto,i=r.isMoving;return Ft(n.line,t.contentBox[n.start]+Tf(n,i),Ta(n,t.contentBox,i))},jC=function(e){var r=e.impact,n=e.draggable,t=e.draggables,i=e.droppable,o=e.afterCritical,a=gr(i.descriptor.id,t),s=n.page,l=i.axis;if(!a.length)return zC({axis:l,moveInto:i.page,isMoving:s});var c=r.displaced,u=r.displacedBy,d=c.all[0];if(d){var f=t[d];if(Tt(d,o))return Ql({axis:l,moveRelativeTo:f.page,isMoving:s});var p=no(f.page,u.point);return Ql({axis:l,moveRelativeTo:p,isMoving:s})}var h=a[a.length-1];if(h.descriptor.id===n.descriptor.id)return s.borderBox.center;if(Tt(h.descriptor.id,o)){var v=no(h.page,hr(o.displacedBy.point));return Xl({axis:l,moveRelativeTo:v,isMoving:s})}return Xl({axis:l,moveRelativeTo:h.page,isMoving:s})},Oo=function(e,r){var n=e.frame;return n?Oe(r,n.scroll.diff.displacement):r},FC=function(r){var n=r.impact,t=r.draggable,i=r.droppable,o=r.draggables,a=r.afterCritical,s=t.page.borderBox.center,l=n.at;return!i||!l?s:l.type==="REORDER"?jC({impact:n,draggable:t,draggables:o,droppable:i,afterCritical:a}):AC({impact:n,draggables:o,afterCritical:a})},hi=function(e){var r=FC(e),n=e.droppable,t=n?Oo(n,r):r;return t},_f=function(e,r){var n=Ge(r,e.scroll.initial),t=hr(n),i=Gt({top:r.y,bottom:r.y+e.frame.height,left:r.x,right:r.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:r,diff:{value:n,displacement:t}}};return o};function Zl(e,r){return e.map(function(n){return r[n]})}function BC(e,r){for(var n=0;n<r.length;n++){var t=r[n].visible[e];if(t)return t}return null}var $C=function(e){var r=e.impact,n=e.viewport,t=e.destination,i=e.draggables,o=e.maxScrollChange,a=_f(n,Oe(n.scroll.current,o)),s=t.frame?Sa(t,Oe(t.frame.scroll.current,o)):t,l=r.displaced,c=Jr({afterDragging:Zl(l.all,i),destination:t,displacedBy:r.displacedBy,viewport:a.frame,last:l,forceShouldAnimate:!1}),u=Jr({afterDragging:Zl(l.all,i),destination:s,displacedBy:r.displacedBy,viewport:n.frame,last:l,forceShouldAnimate:!1}),d={},f={},p=[l,c,u];l.all.forEach(function(v){var m=BC(v,p);if(m){f[v]=m;return}d[v]=!0});var h=K({},r,{displaced:{all:l.all,invisible:d,visible:f}});return h},GC=function(e,r){return Oe(e.scroll.diff.displacement,r)},_a=function(e){var r=e.pageBorderBoxCenter,n=e.draggable,t=e.viewport,i=GC(t,r),o=Ge(i,n.page.borderBox.center);return Oe(n.client.borderBox.center,o)},Df=function(e){var r=e.draggable,n=e.destination,t=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,a=e.onlyOnMainAxis,s=a===void 0?!1:a,l=Ge(t,r.page.borderBox.center),c=cn(r.page.borderBox,l),u={target:c,destination:n,withDroppableDisplacement:o,viewport:i};return s?_C(u):Rf(u)},WC=function(e){var r=e.isMovingForward,n=e.draggable,t=e.destination,i=e.draggables,o=e.previousImpact,a=e.viewport,s=e.previousPageBorderBoxCenter,l=e.previousClientSelection,c=e.afterCritical;if(!t.isEnabled)return null;var u=gr(t.descriptor.id,i),d=vr(n,t),f=yC({isMovingForward:r,draggable:n,destination:t,insideDestination:u,previousImpact:o})||NC({isMovingForward:r,isInHomeList:d,draggable:n,draggables:i,destination:t,insideDestination:u,previousImpact:o,viewport:a,afterCritical:c});if(!f)return null;var p=hi({impact:f,draggable:n,droppable:t,draggables:i,afterCritical:c}),h=Df({draggable:n,destination:t,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(h){var v=_a({pageBorderBoxCenter:p,draggable:n,viewport:a});return{clientSelection:v,impact:f,scrollJumpRequest:null}}var m=Ge(p,s),y=$C({impact:f,viewport:a,destination:t,draggables:i,maxScrollChange:m});return{clientSelection:l,impact:y,scrollJumpRequest:m}},Le=function(r){var n=r.subject.active;return n||Y(),n},HC=function(e){var r=e.isMovingForward,n=e.pageBorderBoxCenter,t=e.source,i=e.droppables,o=e.viewport,a=t.subject.active;if(!a)return null;var s=t.axis,l=Je(a[s.start],a[s.end]),c=di(i).filter(function(d){return d!==t}).filter(function(d){return d.isEnabled}).filter(function(d){return!!d.subject.active}).filter(function(d){return Cf(o.frame)(Le(d))}).filter(function(d){var f=Le(d);return r?a[s.crossAxisEnd]<f[s.crossAxisEnd]:f[s.crossAxisStart]<a[s.crossAxisStart]}).filter(function(d){var f=Le(d),p=Je(f[s.start],f[s.end]);return l(f[s.start])||l(f[s.end])||p(a[s.start])||p(a[s.end])}).sort(function(d,f){var p=Le(d)[s.crossAxisStart],h=Le(f)[s.crossAxisStart];return r?p-h:h-p}).filter(function(d,f,p){return Le(d)[s.crossAxisStart]===Le(p[0])[s.crossAxisStart]});if(!c.length)return null;if(c.length===1)return c[0];var u=c.filter(function(d){var f=Je(Le(d)[s.start],Le(d)[s.end]);return f(n[s.line])});return u.length===1?u[0]:u.length>1?u.sort(function(d,f){return Le(d)[s.start]-Le(f)[s.start]})[0]:c.sort(function(d,f){var p=Kl(n,Yl(Le(d))),h=Kl(n,Yl(Le(f)));return p!==h?p-h:Le(d)[s.start]-Le(f)[s.start]})[0]},ec=function(r,n){var t=r.page.borderBox.center;return Tt(r.descriptor.id,n)?Ge(t,n.displacedBy.point):t},UC=function(r,n){var t=r.page.borderBox;return Tt(r.descriptor.id,n)?cn(t,hr(n.displacedBy.point)):t},qC=function(e){var r=e.pageBorderBoxCenter,n=e.viewport,t=e.destination,i=e.insideDestination,o=e.afterCritical,a=i.filter(function(s){return Rf({target:UC(s,o),destination:t,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(s,l){var c=Kr(r,Oo(t,ec(s,o))),u=Kr(r,Oo(t,ec(l,o)));return c<u?-1:u<c?1:s.descriptor.index-l.descriptor.index});return a[0]||null},un=_e(function(r,n){var t=n[r.line];return{value:t,point:Ft(r.line,t)}}),VC=function(r,n,t){var i=r.axis;if(r.descriptor.mode==="virtual")return Ft(i.line,n[i.line]);var o=r.subject.page.contentBox[i.size],a=gr(r.descriptor.id,t),s=a.reduce(function(u,d){return u+d.client.marginBox[i.size]},0),l=s+n[i.line],c=l-o;return c<=0?null:Ft(i.line,c)},Pf=function(r,n){return K({},r,{scroll:K({},r.scroll,{max:n})})},kf=function(r,n,t){var i=r.frame;vr(n,r)&&Y(),r.subject.withPlaceholder&&Y();var o=un(r.axis,n.displaceBy).point,a=VC(r,o,t),s={placeholderSize:o,increasedBy:a,oldFrameMaxScroll:r.frame?r.frame.scroll.max:null};if(!i){var l=lr({page:r.subject.page,withPlaceholder:s,axis:r.axis,frame:r.frame});return K({},r,{subject:l})}var c=a?Oe(i.scroll.max,a):i.scroll.max,u=Pf(i,c),d=lr({page:r.subject.page,withPlaceholder:s,axis:r.axis,frame:u});return K({},r,{subject:d,frame:u})},KC=function(r){var n=r.subject.withPlaceholder;n||Y();var t=r.frame;if(!t){var i=lr({page:r.subject.page,axis:r.axis,frame:null,withPlaceholder:null});return K({},r,{subject:i})}var o=n.oldFrameMaxScroll;o||Y();var a=Pf(t,o),s=lr({page:r.subject.page,axis:r.axis,frame:a,withPlaceholder:null});return K({},r,{subject:s,frame:a})},YC=function(e){var r=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,t=e.insideDestination,i=e.draggable,o=e.draggables,a=e.destination,s=e.viewport,l=e.afterCritical;if(!n){if(t.length)return null;var c={displaced:Yr,displacedBy:wf,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},u=hi({impact:c,draggable:i,droppable:a,draggables:o,afterCritical:l}),d=vr(i,a)?a:kf(a,i,o),f=Df({draggable:i,destination:d,newPageBorderBoxCenter:u,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return f?c:null}var p=r[a.axis.line]<=n.page.borderBox.center[a.axis.line],h=function(){var m=n.descriptor.index;return n.descriptor.id===i.descriptor.id||p?m:m+1}(),v=un(a.axis,i.displaceBy);return Yn({draggable:i,insideDestination:t,destination:a,viewport:s,displacedBy:v,last:Yr,index:h})},JC=function(e){var r=e.isMovingForward,n=e.previousPageBorderBoxCenter,t=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,s=e.viewport,l=e.afterCritical,c=HC({isMovingForward:r,pageBorderBoxCenter:n,source:i,droppables:a,viewport:s});if(!c)return null;var u=gr(c.descriptor.id,o),d=qC({pageBorderBoxCenter:n,viewport:s,destination:c,insideDestination:u,afterCritical:l}),f=YC({previousPageBorderBoxCenter:n,destination:c,draggable:t,draggables:o,moveRelativeTo:d,insideDestination:u,viewport:s,afterCritical:l});if(!f)return null;var p=hi({impact:f,draggable:t,droppable:c,draggables:o,afterCritical:l}),h=_a({pageBorderBoxCenter:p,draggable:t,viewport:s});return{clientSelection:h,impact:f,scrollJumpRequest:null}},We=function(e){var r=e.at;return r?r.type==="REORDER"?r.destination.droppableId:r.combine.droppableId:null},XC=function(r,n){var t=We(r);return t?n[t]:null},QC=function(e){var r=e.state,n=e.type,t=XC(r.impact,r.dimensions.droppables),i=!!t,o=r.dimensions.droppables[r.critical.droppable.id],a=t||o,s=a.axis.direction,l=s==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||s==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(l&&!i)return null;var c=n==="MOVE_DOWN"||n==="MOVE_RIGHT",u=r.dimensions.draggables[r.critical.draggable.id],d=r.current.page.borderBoxCenter,f=r.dimensions,p=f.draggables,h=f.droppables;return l?WC({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,destination:a,draggables:p,viewport:r.viewport,previousClientSelection:r.current.client.selection,previousImpact:r.impact,afterCritical:r.afterCritical}):JC({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,isOver:a,draggables:p,droppables:h,viewport:r.viewport,afterCritical:r.afterCritical})};function Et(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Of(e){var r=Je(e.top,e.bottom),n=Je(e.left,e.right);return function(i){return r(i.y)&&n(i.x)}}function ZC(e,r){return e.left<r.right&&e.right>r.left&&e.top<r.bottom&&e.bottom>r.top}function e0(e){var r=e.pageBorderBox,n=e.draggable,t=e.candidates,i=n.page.borderBox.center,o=t.map(function(a){var s=a.axis,l=Ft(a.axis.line,r.center[s.line],a.page.borderBox.center[s.crossAxisLine]);return{id:a.descriptor.id,distance:Kr(i,l)}}).sort(function(a,s){return s.distance-a.distance});return o[0]?o[0].id:null}function t0(e){var r=e.pageBorderBox,n=e.draggable,t=e.droppables,i=di(t).filter(function(o){if(!o.isEnabled)return!1;var a=o.subject.active;if(!a||!ZC(r,a))return!1;if(Of(a)(r.center))return!0;var s=o.axis,l=a.center[s.crossAxisLine],c=r[s.crossAxisStart],u=r[s.crossAxisEnd],d=Je(a[s.crossAxisStart],a[s.crossAxisEnd]),f=d(c),p=d(u);return!f&&!p?!0:f?c<l:u>l});return i.length?i.length===1?i[0].descriptor.id:e0({pageBorderBox:r,draggable:n,candidates:i}):null}var Ef=function(r,n){return Gt(cn(r,n))},r0=function(e,r){var n=e.frame;return n?Ef(r,n.scroll.diff.value):r};function Nf(e){var r=e.displaced,n=e.id;return!!(r.visible[n]||r.invisible[n])}function n0(e){var r=e.draggable,n=e.closest,t=e.inHomeList;return n?t&&n.descriptor.index>r.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var i0=function(e){var r=e.pageBorderBoxWithDroppableScroll,n=e.draggable,t=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,s=e.afterCritical,l=t.axis,c=un(t.axis,n.displaceBy),u=c.value,d=r[l.start],f=r[l.end],p=pi(n,i),h=_t(p,function(m){var y=m.descriptor.id,b=m.page.borderBox.center[l.line],I=Tt(y,s),_=Nf({displaced:o,id:y});return I?_?f<=b:d<b-u:_?f<=b+u:d<b}),v=n0({draggable:n,closest:h,inHomeList:vr(n,t)});return Yn({draggable:n,insideDestination:i,destination:t,viewport:a,last:o,displacedBy:c,index:v})},o0=4,a0=function(e){var r=e.draggable,n=e.pageBorderBoxWithDroppableScroll,t=e.previousImpact,i=e.destination,o=e.insideDestination,a=e.afterCritical;if(!i.isCombineEnabled)return null;var s=i.axis,l=un(i.axis,r.displaceBy),c=l.value,u=n[s.start],d=n[s.end],f=pi(r,o),p=_t(f,function(v){var m=v.descriptor.id,y=v.page.borderBox,b=y[s.size],I=b/o0,_=Tt(m,a),P=Nf({displaced:t.displaced,id:m});return _?P?d>y[s.start]+I&&d<y[s.end]-I:u>y[s.start]-c+I&&u<y[s.end]-c-I:P?d>y[s.start]+c+I&&d<y[s.end]+c-I:u>y[s.start]+I&&u<y[s.end]-I});if(!p)return null;var h={displacedBy:l,displaced:t.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:i.descriptor.id}}};return h},Mf=function(e){var r=e.pageOffset,n=e.draggable,t=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,s=e.afterCritical,l=Ef(n.page.borderBox,r),c=t0({pageBorderBox:l,draggable:n,droppables:i});if(!c)return xC;var u=i[c],d=gr(u.descriptor.id,t),f=r0(u,l);return a0({pageBorderBoxWithDroppableScroll:f,draggable:n,previousImpact:o,destination:u,insideDestination:d,afterCritical:s})||i0({pageBorderBoxWithDroppableScroll:f,draggable:n,destination:u,insideDestination:d,last:o.displaced,viewport:a,afterCritical:s})},Da=function(e,r){var n;return K({},e,(n={},n[r.descriptor.id]=r,n))},s0=function(r){var n=r.previousImpact,t=r.impact,i=r.droppables,o=We(n),a=We(t);if(!o||o===a)return i;var s=i[o];if(!s.subject.withPlaceholder)return i;var l=KC(s);return Da(i,l)},l0=function(e){var r=e.draggable,n=e.draggables,t=e.droppables,i=e.previousImpact,o=e.impact,a=s0({previousImpact:i,impact:o,droppables:t}),s=We(o);if(!s)return a;var l=t[s];if(vr(r,l)||l.subject.withPlaceholder)return a;var c=kf(l,r,n);return Da(a,c)},Br=function(e){var r=e.state,n=e.clientSelection,t=e.dimensions,i=e.viewport,o=e.impact,a=e.scrollJumpRequest,s=i||r.viewport,l=t||r.dimensions,c=n||r.current.client.selection,u=Ge(c,r.initial.client.selection),d={offset:u,selection:c,borderBoxCenter:Oe(r.initial.client.borderBoxCenter,u)},f={selection:Oe(d.selection,s.scroll.current),borderBoxCenter:Oe(d.borderBoxCenter,s.scroll.current),offset:Oe(d.offset,s.scroll.diff.value)},p={client:d,page:f};if(r.phase==="COLLECTING")return K({phase:"COLLECTING"},r,{dimensions:l,viewport:s,current:p});var h=l.draggables[r.critical.draggable.id],v=o||Mf({pageOffset:f.offset,draggable:h,draggables:l.draggables,droppables:l.droppables,previousImpact:r.impact,viewport:s,afterCritical:r.afterCritical}),m=l0({draggable:h,impact:v,previousImpact:r.impact,draggables:l.draggables,droppables:l.droppables}),y=K({},r,{current:p,dimensions:{draggables:l.draggables,droppables:m},impact:v,viewport:s,scrollJumpRequest:a||null,forceShouldAnimate:a?!1:null});return y};function c0(e,r){return e.map(function(n){return r[n]})}var Af=function(e){var r=e.impact,n=e.viewport,t=e.draggables,i=e.destination,o=e.forceShouldAnimate,a=r.displaced,s=c0(a.all,t),l=Jr({afterDragging:s,destination:i,displacedBy:r.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:a});return K({},r,{displaced:l})},Lf=function(e){var r=e.impact,n=e.draggable,t=e.droppable,i=e.draggables,o=e.viewport,a=e.afterCritical,s=hi({impact:r,draggable:n,draggables:i,droppable:t,afterCritical:a});return _a({pageBorderBoxCenter:s,draggable:n,viewport:o})},zf=function(e){var r=e.state,n=e.dimensions,t=e.viewport;r.movementMode!=="SNAP"&&Y();var i=r.impact,o=t||r.viewport,a=n||r.dimensions,s=a.draggables,l=a.droppables,c=s[r.critical.draggable.id],u=We(i);u||Y();var d=l[u],f=Af({impact:i,viewport:o,destination:d,draggables:s}),p=Lf({impact:f,draggable:c,droppable:d,draggables:s,viewport:o,afterCritical:r.afterCritical});return Br({impact:f,clientSelection:p,state:r,dimensions:a,viewport:o})},u0=function(e){return{index:e.index,droppableId:e.droppableId}},jf=function(e){var r=e.draggable,n=e.home,t=e.draggables,i=e.viewport,o=un(n.axis,r.displaceBy),a=gr(n.descriptor.id,t),s=a.indexOf(r);s===-1&&Y();var l=a.slice(s+1),c=l.reduce(function(p,h){return p[h.descriptor.id]=!0,p},{}),u={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:c},d=Jr({afterDragging:l,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),f={displaced:d,displacedBy:o,at:{type:"REORDER",destination:u0(r.descriptor)}};return{impact:f,afterCritical:u}},d0=function(e,r){return{draggables:e.draggables,droppables:Da(e.droppables,r)}},f0=function(e){var r=e.draggable,n=e.offset,t=e.initialWindowScroll,i=no(r.client,n),o=Fn(i,t),a=K({},r,{placeholder:K({},r.placeholder,{client:i}),client:i,page:o});return a},p0=function(e){var r=e.frame;return r||Y(),r},h0=function(e){var r=e.additions,n=e.updatedDroppables,t=e.viewport,i=t.scroll.diff.value;return r.map(function(o){var a=o.descriptor.droppableId,s=n[a],l=p0(s),c=l.scroll.diff.value,u=Oe(i,c),d=f0({draggable:o,offset:u,initialWindowScroll:t.scroll.initial});return d})},g0=function(e){var r=e.state,n=e.published,t=n.modified.map(function(I){var _=r.dimensions.droppables[I.droppableId],P=Sa(_,I.scroll);return P}),i=K({},r.dimensions.droppables,{},xf(t)),o=Sf(h0({additions:n.additions,updatedDroppables:i,viewport:r.viewport})),a=K({},r.dimensions.draggables,{},o);n.removals.forEach(function(I){delete a[I]});var s={droppables:i,draggables:a},l=We(r.impact),c=l?s.droppables[l]:null,u=s.draggables[r.critical.draggable.id],d=s.droppables[r.critical.droppable.id],f=jf({draggable:u,home:d,draggables:a,viewport:r.viewport}),p=f.impact,h=f.afterCritical,v=c&&c.isCombineEnabled?r.impact:p,m=Mf({pageOffset:r.current.page.offset,draggable:s.draggables[r.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:v,viewport:r.viewport,afterCritical:h}),y=K({phase:"DRAGGING"},r,{phase:"DRAGGING",impact:m,onLiftImpact:p,dimensions:s,afterCritical:h,forceShouldAnimate:!1});if(r.phase==="COLLECTING")return y;var b=K({phase:"DROP_PENDING"},y,{phase:"DROP_PENDING",reason:r.reason,isWaiting:!1});return b},Eo=function(r){return r.movementMode==="SNAP"},qi=function(r,n,t){var i=d0(r.dimensions,n);return!Eo(r)||t?Br({state:r,dimensions:i}):zf({state:r,dimensions:i})};function Vi(e){return e.isDragging&&e.movementMode==="SNAP"?K({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var tc={phase:"IDLE",completed:null,shouldFlush:!1},v0=function(e,r){if(e===void 0&&(e=tc),r.type==="FLUSH")return K({},tc,{shouldFlush:!0});if(r.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&Y();var n=r.payload,t=n.critical,i=n.clientSelection,o=n.viewport,a=n.dimensions,s=n.movementMode,l=a.draggables[t.draggable.id],c=a.droppables[t.droppable.id],u={selection:i,borderBoxCenter:l.client.borderBox.center,offset:De},d={client:u,page:{selection:Oe(u.selection,o.scroll.initial),borderBoxCenter:Oe(u.selection,o.scroll.initial),offset:Oe(u.selection,o.scroll.diff.value)}},f=di(a.droppables).every(function(j){return!j.isFixedOnPage}),p=jf({draggable:l,home:c,draggables:a.draggables,viewport:o}),h=p.impact,v=p.afterCritical,m={phase:"DRAGGING",isDragging:!0,critical:t,movementMode:s,dimensions:a,initial:d,current:d,isWindowScrollAllowed:f,impact:h,afterCritical:v,onLiftImpact:h,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return m}if(r.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Y();var y=K({phase:"COLLECTING"},e,{phase:"COLLECTING"});return y}if(r.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||Y(),g0({state:e,published:r.payload});if(r.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Et(e)||Y();var b=r.payload.client;return St(b,e.current.client.selection)?e:Br({state:e,clientSelection:b,impact:Eo(e)?e.impact:null})}if(r.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Vi(e);Et(e)||Y();var I=r.payload,_=I.id,P=I.newScroll,w=e.dimensions.droppables[_];if(!w)return e;var D=Sa(w,P);return qi(e,D,!1)}if(r.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Et(e)||Y();var S=r.payload,T=S.id,R=S.isEnabled,O=e.dimensions.droppables[T];O||Y(),O.isEnabled===R&&Y();var L=K({},O,{isEnabled:R});return qi(e,L,!0)}if(r.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Et(e)||Y();var M=r.payload,H=M.id,E=M.isCombineEnabled,B=e.dimensions.droppables[H];B||Y(),B.isCombineEnabled===E&&Y();var $=K({},B,{isCombineEnabled:E});return qi(e,$,!0)}if(r.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Et(e)||Y(),e.isWindowScrollAllowed||Y();var U=r.payload.newScroll;if(St(e.viewport.scroll.current,U))return Vi(e);var J=_f(e.viewport,U);return Eo(e)?zf({state:e,viewport:J}):Br({state:e,viewport:J})}if(r.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Et(e))return e;var ee=r.payload.maxScroll;if(St(ee,e.viewport.scroll.max))return e;var X=K({},e.viewport,{scroll:K({},e.viewport.scroll,{max:ee})});return K({phase:"DRAGGING"},e,{viewport:X})}if(r.type==="MOVE_UP"||r.type==="MOVE_DOWN"||r.type==="MOVE_LEFT"||r.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Y();var Z=QC({state:e,type:r.type});return Z?Br({state:e,impact:Z.impact,clientSelection:Z.clientSelection,scrollJumpRequest:Z.scrollJumpRequest}):e}if(r.type==="DROP_PENDING"){var q=r.payload.reason;e.phase!=="COLLECTING"&&Y();var ne=K({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:q});return ne}if(r.type==="DROP_ANIMATE"){var ie=r.payload,ue=ie.completed,G=ie.dropDuration,W=ie.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||Y();var k={phase:"DROP_ANIMATING",completed:ue,dropDuration:G,newHomeClientOffset:W,dimensions:e.dimensions};return k}if(r.type==="DROP_COMPLETE"){var N=r.payload.completed;return{phase:"IDLE",completed:N,shouldFlush:!1}}return e},m0=function(r){return{type:"BEFORE_INITIAL_CAPTURE",payload:r}},b0=function(r){return{type:"LIFT",payload:r}},y0=function(r){return{type:"INITIAL_PUBLISH",payload:r}},x0=function(r){return{type:"PUBLISH_WHILE_DRAGGING",payload:r}},S0=function(){return{type:"COLLECTION_STARTING",payload:null}},w0=function(r){return{type:"UPDATE_DROPPABLE_SCROLL",payload:r}},C0=function(r){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:r}},I0=function(r){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:r}},Ff=function(r){return{type:"MOVE",payload:r}},R0=function(r){return{type:"MOVE_BY_WINDOW_SCROLL",payload:r}},T0=function(r){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:r}},_0=function(){return{type:"MOVE_UP",payload:null}},D0=function(){return{type:"MOVE_DOWN",payload:null}},P0=function(){return{type:"MOVE_RIGHT",payload:null}},k0=function(){return{type:"MOVE_LEFT",payload:null}},Pa=function(){return{type:"FLUSH",payload:null}},O0=function(r){return{type:"DROP_ANIMATE",payload:r}},ka=function(r){return{type:"DROP_COMPLETE",payload:r}},Bf=function(r){return{type:"DROP",payload:r}},E0=function(r){return{type:"DROP_PENDING",payload:r}},$f=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},N0=function(e){return function(r){var n=r.getState,t=r.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var a=o.payload,s=a.id,l=a.clientSelection,c=a.movementMode,u=n();u.phase==="DROP_ANIMATING"&&t(ka({completed:u.completed})),n().phase!=="IDLE"&&Y(),t(Pa()),t(m0({draggableId:s,movementMode:c}));var d={shouldPublishImmediately:c==="SNAP"},f={draggableId:s,scrollOptions:d},p=e.startPublishing(f),h=p.critical,v=p.dimensions,m=p.viewport;t(y0({critical:h,dimensions:v,clientSelection:l,movementMode:c,viewport:m}))}}}},M0=function(e){return function(){return function(r){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),r(n)}}}},Oa={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Xr={opacity:{drop:0,combining:.7},scale:{drop:.75}},Ea={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Pt=Ea.outOfTheWay+"s "+Oa.outOfTheWay,$r={fluid:"opacity "+Pt,snap:"transform "+Pt+", opacity "+Pt,drop:function(r){var n=r+"s "+Oa.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Pt,placeholder:"height "+Pt+", width "+Pt+", margin "+Pt},rc=function(r){return St(r,De)?null:"translate("+r.x+"px, "+r.y+"px)"},No={moveTo:rc,drop:function(r,n){var t=rc(r);return t?n?t+" scale("+Xr.scale.drop+")":t:null}},Mo=Ea.minDropTime,Gf=Ea.maxDropTime,A0=Gf-Mo,nc=1500,L0=.6,z0=function(e){var r=e.current,n=e.destination,t=e.reason,i=Kr(r,n);if(i<=0)return Mo;if(i>=nc)return Gf;var o=i/nc,a=Mo+A0*o,s=t==="CANCEL"?a*L0:a;return Number(s.toFixed(2))},j0=function(e){var r=e.impact,n=e.draggable,t=e.dimensions,i=e.viewport,o=e.afterCritical,a=t.draggables,s=t.droppables,l=We(r),c=l?s[l]:null,u=s[n.descriptor.droppableId],d=Lf({impact:r,draggable:n,draggables:a,afterCritical:o,droppable:c||u,viewport:i}),f=Ge(d,n.client.borderBox.center);return f},F0=function(e){var r=e.draggables,n=e.reason,t=e.lastImpact,i=e.home,o=e.viewport,a=e.onLiftImpact;if(!t.at||n!=="DROP"){var s=Af({draggables:r,impact:a,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:s,didDropInsideDroppable:!1}}if(t.at.type==="REORDER")return{impact:t,didDropInsideDroppable:!0};var l=K({},t,{displaced:Yr});return{impact:l,didDropInsideDroppable:!0}},B0=function(e){var r=e.getState,n=e.dispatch;return function(t){return function(i){if(i.type!=="DROP"){t(i);return}var o=r(),a=i.payload.reason;if(o.phase==="COLLECTING"){n(E0({reason:a}));return}if(o.phase!=="IDLE"){var s=o.phase==="DROP_PENDING"&&o.isWaiting;s&&Y(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||Y();var l=o.critical,c=o.dimensions,u=c.draggables[o.critical.draggable.id],d=F0({reason:a,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),f=d.impact,p=d.didDropInsideDroppable,h=p?Ca(f):null,v=p?fi(f):null,m={index:l.draggable.index,droppableId:l.droppable.id},y={draggableId:u.descriptor.id,type:u.descriptor.type,source:m,reason:a,mode:o.movementMode,destination:h,combine:v},b=j0({impact:f,draggable:u,dimensions:c,viewport:o.viewport,afterCritical:o.afterCritical}),I={critical:o.critical,afterCritical:o.afterCritical,result:y,impact:f},_=!St(o.current.client.offset,b)||!!y.combine;if(!_){n(ka({completed:I}));return}var P=z0({current:o.current.client.offset,destination:b,reason:a}),w={newHomeClientOffset:b,dropDuration:P,completed:I};n(O0(w))}}}},Wf=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function $0(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function G0(e){var r=e.onWindowScroll;function n(){r(Wf())}var t=Gr(n),i=$0(t),o=xt;function a(){return o!==xt}function s(){a()&&Y(),o=Ye(window,[i])}function l(){a()||Y(),t.cancel(),o(),o=xt}return{start:s,stop:l,isActive:a}}var W0=function(r){return r.type==="DROP_COMPLETE"||r.type==="DROP_ANIMATE"||r.type==="FLUSH"},H0=function(e){var r=G0({onWindowScroll:function(t){e.dispatch(R0({newScroll:t}))}});return function(n){return function(t){!r.isActive()&&t.type==="INITIAL_PUBLISH"&&r.start(),r.isActive()&&W0(t)&&r.stop(),n(t)}}},U0=function(e){var r=!1,n=!1,t=setTimeout(function(){n=!0}),i=function(a){r||n||(r=!0,e(a),clearTimeout(t))};return i.wasCalled=function(){return r},i},q0=function(){var e=[],r=function(o){var a=wa(e,function(c){return c.timerId===o});a===-1&&Y();var s=e.splice(a,1),l=s[0];l.callback()},n=function(o){var a=setTimeout(function(){return r(a)}),s={timerId:a,callback:o};e.push(s)},t=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(a){clearTimeout(a.timerId),a.callback()})}};return{add:n,flush:t}},V0=function(r,n){return r==null&&n==null?!0:r==null||n==null?!1:r.droppableId===n.droppableId&&r.index===n.index},K0=function(r,n){return r==null&&n==null?!0:r==null||n==null?!1:r.draggableId===n.draggableId&&r.droppableId===n.droppableId},Y0=function(r,n){if(r===n)return!0;var t=r.draggable.id===n.draggable.id&&r.draggable.droppableId===n.draggable.droppableId&&r.draggable.type===n.draggable.type&&r.draggable.index===n.draggable.index,i=r.droppable.id===n.droppable.id&&r.droppable.type===n.droppable.type;return t&&i},Cr=function(r,n){n()},yn=function(r,n){return{draggableId:r.draggable.id,type:r.droppable.type,source:{droppableId:r.droppable.id,index:r.draggable.index},mode:n}},Ki=function(r,n,t,i){if(!r){t(i(n));return}var o=U0(t),a={announce:o};r(n,a),o.wasCalled()||t(i(n))},J0=function(e,r){var n=q0(),t=null,i=function(f,p){t&&Y(),Cr("onBeforeCapture",function(){var h=e().onBeforeCapture;if(h){var v={draggableId:f,mode:p};h(v)}})},o=function(f,p){t&&Y(),Cr("onBeforeDragStart",function(){var h=e().onBeforeDragStart;h&&h(yn(f,p))})},a=function(f,p){t&&Y();var h=yn(f,p);t={mode:p,lastCritical:f,lastLocation:h.source,lastCombine:null},n.add(function(){Cr("onDragStart",function(){return Ki(e().onDragStart,h,r,Nn.onDragStart)})})},s=function(f,p){var h=Ca(p),v=fi(p);t||Y();var m=!Y0(f,t.lastCritical);m&&(t.lastCritical=f);var y=!V0(t.lastLocation,h);y&&(t.lastLocation=h);var b=!K0(t.lastCombine,v);if(b&&(t.lastCombine=v),!(!m&&!y&&!b)){var I=K({},yn(f,t.mode),{combine:v,destination:h});n.add(function(){Cr("onDragUpdate",function(){return Ki(e().onDragUpdate,I,r,Nn.onDragUpdate)})})}},l=function(){t||Y(),n.flush()},c=function(f){t||Y(),t=null,Cr("onDragEnd",function(){return Ki(e().onDragEnd,f,r,Nn.onDragEnd)})},u=function(){if(t){var f=K({},yn(t.lastCritical,t.mode),{combine:null,destination:null,reason:"CANCEL"});c(f)}};return{beforeCapture:i,beforeStart:o,start:a,update:s,flush:l,drop:c,abort:u}},X0=function(e,r){var n=J0(e,r);return function(t){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var a=o.payload.critical;n.beforeStart(a,o.payload.movementMode),i(o),n.start(a,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var s=o.payload.completed.result;n.flush(),i(o),n.drop(s);return}if(i(o),o.type==="FLUSH"){n.abort();return}var l=t.getState();l.phase==="DRAGGING"&&n.update(l.critical,l.impact)}}}},Q0=function(e){return function(r){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){r(n);return}var t=e.getState();t.phase!=="DROP_ANIMATING"&&Y(),e.dispatch(ka({completed:t.completed}))}}},Z0=function(e){var r=null,n=null;function t(){n&&(cancelAnimationFrame(n),n=null),r&&(r(),r=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&t(),i(o),o.type==="DROP_ANIMATE"){var a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var l=e.getState();l.phase==="DROP_ANIMATING"&&e.dispatch($f())}};n=requestAnimationFrame(function(){n=null,r=Ye(window,[a])})}}}},eI=function(e){return function(){return function(r){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),r(n)}}}},tI=function(e){var r=!1;return function(){return function(n){return function(t){if(t.type==="INITIAL_PUBLISH"){r=!0,e.tryRecordFocus(t.payload.critical.draggable.id),n(t),e.tryRestoreFocusRecorded();return}if(n(t),!!r){if(t.type==="FLUSH"){r=!1,e.tryRestoreFocusRecorded();return}if(t.type==="DROP_COMPLETE"){r=!1;var i=t.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},rI=function(r){return r.type==="DROP_COMPLETE"||r.type==="DROP_ANIMATE"||r.type==="FLUSH"},nI=function(e){return function(r){return function(n){return function(t){if(rI(t)){e.stop(),n(t);return}if(t.type==="INITIAL_PUBLISH"){n(t);var i=r.getState();i.phase!=="DRAGGING"&&Y(),e.start(i);return}n(t),e.scroll(r.getState())}}}},iI=function(e){return function(r){return function(n){if(r(n),n.type==="PUBLISH_WHILE_DRAGGING"){var t=e.getState();t.phase==="DROP_PENDING"&&(t.isWaiting||e.dispatch(Bf({reason:t.reason})))}}}},oI=og,aI=function(e){var r=e.dimensionMarshal,n=e.focusMarshal,t=e.styleMarshal,i=e.getResponders,o=e.announce,a=e.autoScroller;return ig(v0,oI(ag(M0(t),eI(r),N0(r),B0,Q0,Z0,iI,nI(a),H0,tI(n),X0(i,o))))},Yi=function(){return{additions:{},removals:{},modified:{}}};function sI(e){var r=e.registry,n=e.callbacks,t=Yi(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var u=t,d=u.additions,f=u.removals,p=u.modified,h=Object.keys(d).map(function(y){return r.draggable.getById(y).getDimension(De)}).sort(function(y,b){return y.descriptor.index-b.descriptor.index}),v=Object.keys(p).map(function(y){var b=r.droppable.getById(y),I=b.callbacks.getScrollWhileDragging();return{droppableId:y,scroll:I}}),m={additions:h,removals:Object.keys(f),modified:v};t=Yi(),n.publish(m)}))},a=function(u){var d=u.descriptor.id;t.additions[d]=u,t.modified[u.descriptor.droppableId]=!0,t.removals[d]&&delete t.removals[d],o()},s=function(u){var d=u.descriptor;t.removals[d.id]=!0,t.modified[d.droppableId]=!0,t.additions[d.id]&&delete t.additions[d.id],o()},l=function(){i&&(cancelAnimationFrame(i),i=null,t=Yi())};return{add:a,remove:s,stop:l}}var Hf=function(e){var r=e.scrollHeight,n=e.scrollWidth,t=e.height,i=e.width,o=Ge({x:n,y:r},{x:i,y:t}),a={x:Math.max(0,o.x),y:Math.max(0,o.y)};return a},Uf=function(){var e=document.documentElement;return e||Y(),e},qf=function(){var e=Uf(),r=Hf({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return r},lI=function(){var e=Wf(),r=qf(),n=e.y,t=e.x,i=Uf(),o=i.clientWidth,a=i.clientHeight,s=t+o,l=n+a,c=Gt({top:n,left:t,right:s,bottom:l}),u={frame:c,scroll:{initial:e,current:e,max:r,diff:{value:De,displacement:De}}};return u},cI=function(e){var r=e.critical,n=e.scrollOptions,t=e.registry,i=lI(),o=i.scroll.current,a=r.droppable,s=t.droppable.getAllByType(a.type).map(function(d){return d.callbacks.getDimensionAndWatchScroll(o,n)}),l=t.draggable.getAllByType(r.draggable.type).map(function(d){return d.getDimension(o)}),c={draggables:Sf(l),droppables:xf(s)},u={dimensions:c,critical:r,viewport:i};return u};function ic(e,r,n){if(n.descriptor.id===r.id||n.descriptor.type!==r.type)return!1;var t=e.droppable.getById(n.descriptor.droppableId);return t.descriptor.mode==="virtual"}var uI=function(e,r){var n=null,t=sI({callbacks:{publish:r.publishWhileDragging,collectionStarting:r.collectionStarting},registry:e}),i=function(p,h){e.droppable.exists(p)||Y(),n&&r.updateDroppableIsEnabled({id:p,isEnabled:h})},o=function(p,h){n&&(e.droppable.exists(p)||Y(),r.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:h}))},a=function(p,h){n&&(e.droppable.exists(p)||Y(),r.updateDroppableScroll({id:p,newScroll:h}))},s=function(p,h){n&&e.droppable.getById(p).callbacks.scroll(h)},l=function(){if(n){t.stop();var p=n.critical.droppable;e.droppable.getAllByType(p.type).forEach(function(h){return h.callbacks.dragStopped()}),n.unsubscribe(),n=null}},c=function(p){n||Y();var h=n.critical.draggable;p.type==="ADDITION"&&ic(e,h,p.value)&&t.add(p.value),p.type==="REMOVAL"&&ic(e,h,p.value)&&t.remove(p.value)},u=function(p){n&&Y();var h=e.draggable.getById(p.draggableId),v=e.droppable.getById(h.descriptor.droppableId),m={draggable:h.descriptor,droppable:v.descriptor},y=e.subscribe(c);return n={critical:m,unsubscribe:y},cI({critical:m,registry:e,scrollOptions:p.scrollOptions})},d={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:s,updateDroppableScroll:a,startPublishing:u,stopPublishing:l};return d},Vf=function(e,r){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===r?!1:e.completed.result.reason==="DROP"},dI=function(e){window.scrollBy(e.x,e.y)},fI=_e(function(e){return di(e).filter(function(r){return!(!r.isEnabled||!r.frame)})}),pI=function(r,n){var t=_t(fI(n),function(i){return i.frame||Y(),Of(i.frame.pageMarginBox)(r)});return t},hI=function(e){var r=e.center,n=e.destination,t=e.droppables;if(n){var i=t[n];return i.frame?i:null}var o=pI(r,t);return o},wt={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(r){return Math.pow(r,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},gI=function(e,r){var n=e[r.size]*wt.startFromPercentage,t=e[r.size]*wt.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:t};return i},Kf=function(e){var r=e.startOfRange,n=e.endOfRange,t=e.current,i=n-r;if(i===0)return 0;var o=t-r,a=o/i;return a},Na=1,vI=function(e,r){if(e>r.startScrollingFrom)return 0;if(e<=r.maxScrollValueAt)return wt.maxPixelScroll;if(e===r.startScrollingFrom)return Na;var n=Kf({startOfRange:r.maxScrollValueAt,endOfRange:r.startScrollingFrom,current:e}),t=1-n,i=wt.maxPixelScroll*wt.ease(t);return Math.ceil(i)},oc=wt.durationDampening.accelerateAt,ac=wt.durationDampening.stopDampeningAt,mI=function(e,r){var n=r,t=ac,i=Date.now(),o=i-n;if(o>=ac)return e;if(o<oc)return Na;var a=Kf({startOfRange:oc,endOfRange:t,current:o}),s=e*wt.ease(a);return Math.ceil(s)},sc=function(e){var r=e.distanceToEdge,n=e.thresholds,t=e.dragStartTime,i=e.shouldUseTimeDampening,o=vI(r,n);return o===0?0:i?Math.max(mI(o,t),Na):o},lc=function(e){var r=e.container,n=e.distanceToEdges,t=e.dragStartTime,i=e.axis,o=e.shouldUseTimeDampening,a=gI(r,i),s=n[i.end]<n[i.start];return s?sc({distanceToEdge:n[i.end],thresholds:a,dragStartTime:t,shouldUseTimeDampening:o}):-1*sc({distanceToEdge:n[i.start],thresholds:a,dragStartTime:t,shouldUseTimeDampening:o})},bI=function(e){var r=e.container,n=e.subject,t=e.proposedScroll,i=n.height>r.height,o=n.width>r.width;return!o&&!i?t:o&&i?null:{x:o?0:t.x,y:i?0:t.y}},yI=bf(function(e){return e===0?0:e}),Yf=function(e){var r=e.dragStartTime,n=e.container,t=e.subject,i=e.center,o=e.shouldUseTimeDampening,a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},s=lc({container:n,distanceToEdges:a,dragStartTime:r,axis:Ia,shouldUseTimeDampening:o}),l=lc({container:n,distanceToEdges:a,dragStartTime:r,axis:If,shouldUseTimeDampening:o}),c=yI({x:l,y:s});if(St(c,De))return null;var u=bI({container:n,subject:t,proposedScroll:c});return u?St(u,De)?null:u:null},xI=bf(function(e){return e===0?0:e>0?1:-1}),Ma=function(){var e=function(n,t){return n<0?n:n>t?n-t:0};return function(r){var n=r.current,t=r.max,i=r.change,o=Oe(n,i),a={x:e(o.x,t.x),y:e(o.y,t.y)};return St(a,De)?null:a}}(),Jf=function(r){var n=r.max,t=r.current,i=r.change,o={x:Math.max(t.x,n.x),y:Math.max(t.y,n.y)},a=xI(i),s=Ma({max:o,current:t,change:a});return!s||a.x!==0&&s.x===0||a.y!==0&&s.y===0},Aa=function(r,n){return Jf({current:r.scroll.current,max:r.scroll.max,change:n})},SI=function(r,n){if(!Aa(r,n))return null;var t=r.scroll.max,i=r.scroll.current;return Ma({current:i,max:t,change:n})},La=function(r,n){var t=r.frame;return t?Jf({current:t.scroll.current,max:t.scroll.max,change:n}):!1},wI=function(r,n){var t=r.frame;return!t||!La(r,n)?null:Ma({current:t.scroll.current,max:t.scroll.max,change:n})},CI=function(e){var r=e.viewport,n=e.subject,t=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=Yf({dragStartTime:i,container:r.frame,subject:n,center:t,shouldUseTimeDampening:o});return a&&Aa(r,a)?a:null},II=function(e){var r=e.droppable,n=e.subject,t=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=r.frame;if(!a)return null;var s=Yf({dragStartTime:i,container:a.pageMarginBox,subject:n,center:t,shouldUseTimeDampening:o});return s&&La(r,s)?s:null},cc=function(e){var r=e.state,n=e.dragStartTime,t=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,a=r.current.page.borderBoxCenter,s=r.dimensions.draggables[r.critical.draggable.id],l=s.page.marginBox;if(r.isWindowScrollAllowed){var c=r.viewport,u=CI({dragStartTime:n,viewport:c,subject:l,center:a,shouldUseTimeDampening:t});if(u){i(u);return}}var d=hI({center:a,destination:We(r.impact),droppables:r.dimensions.droppables});if(d){var f=II({dragStartTime:n,droppable:d,subject:l,center:a,shouldUseTimeDampening:t});f&&o(d.descriptor.id,f)}},RI=function(e){var r=e.scrollWindow,n=e.scrollDroppable,t=Gr(r),i=Gr(n),o=null,a=function(u){o||Y();var d=o,f=d.shouldUseTimeDampening,p=d.dragStartTime;cc({state:u,scrollWindow:t,scrollDroppable:i,dragStartTime:p,shouldUseTimeDampening:f})},s=function(u){o&&Y();var d=Date.now(),f=!1,p=function(){f=!0};cc({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p}),o={dragStartTime:d,shouldUseTimeDampening:f},f&&a(u)},l=function(){o&&(t.cancel(),i.cancel(),o=null)};return{start:s,stop:l,scroll:a}},TI=function(e){var r=e.move,n=e.scrollDroppable,t=e.scrollWindow,i=function(c,u){var d=Oe(c.current.client.selection,u);r({client:d})},o=function(c,u){if(!La(c,u))return u;var d=wI(c,u);if(!d)return n(c.descriptor.id,u),null;var f=Ge(u,d);n(c.descriptor.id,f);var p=Ge(u,f);return p},a=function(c,u,d){if(!c||!Aa(u,d))return d;var f=SI(u,d);if(!f)return t(d),null;var p=Ge(d,f);t(p);var h=Ge(d,p);return h},s=function(c){var u=c.scrollJumpRequest;if(u){var d=We(c.impact);d||Y();var f=o(c.dimensions.droppables[d],u);if(f){var p=c.viewport,h=a(c.isWindowScrollAllowed,p,f);h&&i(c,h)}}};return s},_I=function(e){var r=e.scrollDroppable,n=e.scrollWindow,t=e.move,i=RI({scrollWindow:n,scrollDroppable:r}),o=TI({move:t,scrollWindow:n,scrollDroppable:r}),a=function(c){if(c.phase==="DRAGGING"){if(c.movementMode==="FLUID"){i.scroll(c);return}c.scrollJumpRequest&&o(c)}},s={scroll:a,start:i.start,stop:i.stop};return s},cr="data-rbd",ur=function(){var e=cr+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Ao=function(){var e=cr+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),DI=function(){var e=cr+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),uc={contextId:cr+"-scroll-container-context-id"},PI=function(r){return function(n){return"["+n+'="'+r+'"]'}},Ir=function(r,n){return r.map(function(t){var i=t.styles[n];return i?t.selector+" { "+i+" }":""}).join(" ")},kI="pointer-events: none;",OI=function(e){var r=PI(e),n=function(){var s=`
441
441
  cursor: -webkit-grab;
442
442
  cursor: grab;
443
443
  `;return{selector:r(ur.contextId),styles:{always:`
444
444
  -webkit-touch-callout: none;
445
445
  -webkit-tap-highlight-color: rgba(0,0,0,0);
446
446
  touch-action: manipulation;
447
- `,resting:s,dragging:PI,dropAnimating:s}}}(),t=function(){var s=`
447
+ `,resting:s,dragging:kI,dropAnimating:s}}}(),t=function(){var s=`
448
448
  transition: `+$r.outOfTheWay+`;
449
- `;return{selector:r(Ao.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}}(),i={selector:r(_I.contextId),styles:{always:"overflow-anchor: none;"}},o={selector:"body",styles:{dragging:`
449
+ `;return{selector:r(Ao.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}}(),i={selector:r(DI.contextId),styles:{always:"overflow-anchor: none;"}},o={selector:"body",styles:{dragging:`
450
450
  cursor: grabbing;
451
451
  cursor: -webkit-grabbing;
452
452
  user-select: none;
@@ -454,4 +454,4 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
454
454
  -moz-user-select: none;
455
455
  -ms-user-select: none;
456
456
  overflow-anchor: none;
457
- `}},a=[t,n,i,o];return{always:Rr(a,"always"),resting:Rr(a,"resting"),dragging:Rr(a,"dragging"),dropAnimating:Rr(a,"dropAnimating"),userCancel:Rr(a,"userCancel")}},He=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect,Ji=function(){var r=document.querySelector("head");return r||Y(),r},dc=function(r){var n=document.createElement("style");return r&&n.setAttribute("nonce",r),n.type="text/css",n};function OI(e,r){var n=fe(function(){return kI(e)},[e]),t=C.useRef(null),i=C.useRef(null),o=ae(_e(function(d){var f=i.current;f||Y(),f.textContent=d}),[]),a=ae(function(d){var f=t.current;f||Y(),f.textContent=d},[]);He(function(){!t.current&&!i.current||Y();var d=dc(r),f=dc(r);return t.current=d,i.current=f,d.setAttribute(cr+"-always",e),f.setAttribute(cr+"-dynamic",e),Ji().appendChild(d),Ji().appendChild(f),a(n.always),o(n.resting),function(){var p=function(v){var m=v.current;m||Y(),Ji().removeChild(m),v.current=null};p(t),p(i)}},[r,a,o,n.always,n.resting,e]);var s=ae(function(){return o(n.dragging)},[o,n.dragging]),l=ae(function(d){if(d==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),c=ae(function(){i.current&&o(n.resting)},[o,n.resting]),u=fe(function(){return{dragging:s,dropping:l,resting:c}},[s,l,c]);return u}var Xf=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function gi(e){return e instanceof Xf(e).HTMLElement}function EI(e,r){var n="["+ur.contextId+'="'+e+'"]',t=yf(document.querySelectorAll(n));if(!t.length)return null;var i=_t(t,function(o){return o.getAttribute(ur.draggableId)===r});return!i||!gi(i)?null:i}function NI(e){var r=C.useRef({}),n=C.useRef(null),t=C.useRef(null),i=C.useRef(!1),o=ae(function(f,p){var h={id:f,focus:p};return r.current[f]=h,function(){var m=r.current,b=m[f];b!==h&&delete m[f]}},[]),a=ae(function(f){var p=EI(e,f);p&&p!==document.activeElement&&p.focus()},[e]),s=ae(function(f,p){n.current===f&&(n.current=p)},[]),l=ae(function(){t.current||i.current&&(t.current=requestAnimationFrame(function(){t.current=null;var f=n.current;f&&a(f)}))},[a]),c=ae(function(f){n.current=null;var p=document.activeElement;p&&p.getAttribute(ur.draggableId)===f&&(n.current=f)},[]);He(function(){return i.current=!0,function(){i.current=!1;var f=t.current;f&&cancelAnimationFrame(f)}},[]);var u=fe(function(){return{register:o,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}},[o,c,l,s]);return u}function MI(){var e={draggables:{},droppables:{}},r=[];function n(d){return r.push(d),function(){var p=r.indexOf(d);p!==-1&&r.splice(p,1)}}function t(d){r.length&&r.forEach(function(f){return f(d)})}function i(d){return e.draggables[d]||null}function o(d){var f=i(d);return f||Y(),f}var a={register:function(f){e.draggables[f.descriptor.id]=f,t({type:"ADDITION",value:f})},update:function(f,p){var h=e.draggables[p.descriptor.id];h&&h.uniqueId===f.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[f.descriptor.id]=f)},unregister:function(f){var p=f.descriptor.id,h=i(p);h&&f.uniqueId===h.uniqueId&&(delete e.draggables[p],t({type:"REMOVAL",value:f}))},getById:o,findById:i,exists:function(f){return!!i(f)},getAllByType:function(f){return Kn(e.draggables).filter(function(p){return p.descriptor.type===f})}};function s(d){return e.droppables[d]||null}function l(d){var f=s(d);return f||Y(),f}var c={register:function(f){e.droppables[f.descriptor.id]=f},unregister:function(f){var p=s(f.descriptor.id);p&&f.uniqueId===p.uniqueId&&delete e.droppables[f.descriptor.id]},getById:l,findById:s,exists:function(f){return!!s(f)},getAllByType:function(f){return Kn(e.droppables).filter(function(p){return p.descriptor.type===f})}};function u(){e.draggables={},e.droppables={},r.length=0}return{draggable:a,droppable:c,subscribe:n,clean:u}}function AI(){var e=fe(MI,[]);return C.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var za=Q.createContext(null),Jn=function(){var e=document.body;return e||Y(),e},LI={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},zI=function(r){return"rbd-announcement-"+r};function jI(e){var r=fe(function(){return zI(e)},[e]),n=C.useRef(null);C.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=r,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),K(o.style,LI),Jn().appendChild(o),function(){setTimeout(function(){var l=Jn();l.contains(o)&&l.removeChild(o),o===n.current&&(n.current=null)})}},[r]);var t=ae(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return t}var FI=0,BI={separator:"::"};function ja(e,r){return r===void 0&&(r=BI),fe(function(){return""+e+r.separator+FI++},[r.separator,e])}function $I(e){var r=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+r+"-"+n}function GI(e){var r=e.contextId,n=e.text,t=ja("hidden-text",{separator:"-"}),i=fe(function(){return $I({contextId:r,uniqueId:t})},[t,r]);return C.useEffect(function(){var a=document.createElement("div");return a.id=i,a.textContent=n,a.style.display="none",Jn().appendChild(a),function(){var l=Jn();l.contains(a)&&l.removeChild(a)}},[i,n]),i}var vi=Q.createContext(null);function Qf(e){var r=C.useRef(e);return C.useEffect(function(){r.current=e}),r}function WI(){var e=null;function r(){return!!e}function n(a){return a===e}function t(a){e&&Y();var s={abandon:a};return e=s,s}function i(){e||Y(),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:r,isActive:n,claim:t,release:i,tryAbandon:o}}var HI=9,UI=13,Fa=27,Zf=32,qI=33,VI=34,KI=35,YI=36,JI=37,XI=38,QI=39,ZI=40,xn,eR=(xn={},xn[UI]=!0,xn[HI]=!0,xn),ep=function(e){eR[e.keyCode]&&e.preventDefault()},mi=function(){var e="visibilitychange";if(typeof document>"u")return e;var r=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=_t(r,function(t){return"on"+t in document});return n||e}(),tp=0,fc=5;function tR(e,r){return Math.abs(r.x-e.x)>=fc||Math.abs(r.y-e.y)>=fc}var pc={type:"IDLE"};function rR(e){var r=e.cancel,n=e.completed,t=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(a){var s=a.button,l=a.clientX,c=a.clientY;if(s===tp){var u={x:l,y:c},d=t();if(d.type==="DRAGGING"){a.preventDefault(),d.actions.move(u);return}d.type!=="PENDING"&&Y();var f=d.point;if(tR(f,u)){a.preventDefault();var p=d.actions.fluidLift(u);i({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(a){var s=t();if(s.type!=="DRAGGING"){r();return}a.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(a){t().type==="DRAGGING"&&a.preventDefault(),r()}},{eventName:"keydown",fn:function(a){var s=t();if(s.type==="PENDING"){r();return}if(a.keyCode===Fa){a.preventDefault(),r();return}ep(a)}},{eventName:"resize",fn:r},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){t().type==="PENDING"&&r()}},{eventName:"webkitmouseforcedown",fn:function(a){var s=t();if(s.type==="IDLE"&&Y(),s.actions.shouldRespectForcePress()){r();return}a.preventDefault()}},{eventName:mi,fn:r}]}function nR(e){var r=C.useRef(pc),n=C.useRef(xt),t=fe(function(){return{eventName:"mousedown",fn:function(d){if(!d.defaultPrevented&&d.button===tp&&!(d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)){var f=e.findClosestDraggableId(d);if(f){var p=e.tryGetLock(f,a,{sourceEvent:d});if(p){d.preventDefault();var h={x:d.clientX,y:d.clientY};n.current(),c(p,h)}}}}}},[e]),i=fe(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(d){if(!d.defaultPrevented){var f=e.findClosestDraggableId(d);if(f){var p=e.findOptionsForDraggable(f);p&&(p.shouldRespectForcePress||e.canGetLock(f)&&d.preventDefault())}}}}},[e]),o=ae(function(){var d={passive:!1,capture:!0};n.current=Ye(window,[i,t],d)},[i,t]),a=ae(function(){var u=r.current;u.type!=="IDLE"&&(r.current=pc,n.current(),o())},[o]),s=ae(function(){var u=r.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),l=ae(function(){var d={capture:!0,passive:!1},f=rR({cancel:s,completed:a,getPhase:function(){return r.current},setPhase:function(h){r.current=h}});n.current=Ye(window,f,d)},[s,a]),c=ae(function(d,f){r.current.type!=="IDLE"&&Y(),r.current={type:"PENDING",point:f,actions:d},l()},[l]);He(function(){return o(),function(){n.current()}},[o])}var Yt;function iR(){}var oR=(Yt={},Yt[VI]=!0,Yt[qI]=!0,Yt[YI]=!0,Yt[KI]=!0,Yt);function aR(e,r){function n(){r(),e.cancel()}function t(){r(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===Fa){o.preventDefault(),n();return}if(o.keyCode===Zf){o.preventDefault(),t();return}if(o.keyCode===ZI){o.preventDefault(),e.moveDown();return}if(o.keyCode===XI){o.preventDefault(),e.moveUp();return}if(o.keyCode===QI){o.preventDefault(),e.moveRight();return}if(o.keyCode===JI){o.preventDefault(),e.moveLeft();return}if(oR[o.keyCode]){o.preventDefault();return}ep(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:mi,fn:n}]}function sR(e){var r=C.useRef(iR),n=fe(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==Zf)return;var a=e.findClosestDraggableId(o);if(!a)return;var s=e.tryGetLock(a,u,{sourceEvent:o});if(!s)return;o.preventDefault();var l=!0,c=s.snapLift();r.current();function u(){l||Y(),l=!1,r.current(),t()}r.current=Ye(window,aR(c,u),{capture:!0,passive:!1})}}},[e]),t=ae(function(){var o={passive:!1,capture:!0};r.current=Ye(window,[n],o)},[n]);He(function(){return t(),function(){r.current()}},[t])}var Xi={type:"IDLE"},lR=120,cR=.15;function uR(e){var r=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:r},{eventName:"resize",fn:r},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){r();return}i.keyCode===Fa&&i.preventDefault(),r()}},{eventName:mi,fn:r}]}function dR(e){var r=e.cancel,n=e.completed,t=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var a=t();if(a.type!=="DRAGGING"){r();return}a.hasMoved=!0;var s=o.touches[0],l=s.clientX,c=s.clientY,u={x:l,y:c};o.preventDefault(),a.actions.move(u)}},{eventName:"touchend",fn:function(o){var a=t();if(a.type!=="DRAGGING"){r();return}o.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(t().type!=="DRAGGING"){r();return}o.preventDefault(),r()}},{eventName:"touchforcechange",fn:function(o){var a=t();a.type==="IDLE"&&Y();var s=o.touches[0];if(s){var l=s.force>=cR;if(l){var c=a.actions.shouldRespectForcePress();if(a.type==="PENDING"){c&&r();return}if(c){if(a.hasMoved){o.preventDefault();return}r();return}o.preventDefault()}}}},{eventName:mi,fn:r}]}function fR(e){var r=C.useRef(Xi),n=C.useRef(xt),t=ae(function(){return r.current},[]),i=ae(function(p){r.current=p},[]),o=fe(function(){return{eventName:"touchstart",fn:function(p){if(!p.defaultPrevented){var h=e.findClosestDraggableId(p);if(h){var v=e.tryGetLock(h,s,{sourceEvent:p});if(v){var m=p.touches[0],b=m.clientX,y=m.clientY,I={x:b,y};n.current(),d(v,I)}}}}}},[e]),a=ae(function(){var p={capture:!0,passive:!1};n.current=Ye(window,[o],p)},[o]),s=ae(function(){var f=r.current;f.type!=="IDLE"&&(f.type==="PENDING"&&clearTimeout(f.longPressTimerId),i(Xi),n.current(),a())},[a,i]),l=ae(function(){var f=r.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=ae(function(){var p={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:t},v=Ye(window,dR(h),p),m=Ye(window,uR(h),p);n.current=function(){v(),m()}},[l,t,s]),u=ae(function(){var p=t();p.type!=="PENDING"&&Y();var h=p.actions.fluidLift(p.point);i({type:"DRAGGING",actions:h,hasMoved:!1})},[t,i]),d=ae(function(p,h){t().type!=="IDLE"&&Y();var v=setTimeout(u,lR);i({type:"PENDING",point:h,actions:p,longPressTimerId:v}),c()},[c,t,i,u]);He(function(){return a(),function(){n.current();var h=t();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),i(Xi))}},[t,a,i]),He(function(){var p=Ye(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return p},[])}var pR={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function rp(e,r){if(r==null)return!1;var n=!!pR[r.tagName.toLowerCase()];if(n)return!0;var t=r.getAttribute("contenteditable");return t==="true"||t===""?!0:r===e?!1:rp(e,r.parentElement)}function hR(e,r){var n=r.target;return gi(n)?rp(e,n):!1}var gR=function(e){return Gt(e.getBoundingClientRect()).center};function vR(e){return e instanceof Xf(e).Element}var mR=function(){var e="matches";if(typeof document>"u")return e;var r=[e,"msMatchesSelector","webkitMatchesSelector"],n=_t(r,function(t){return t in Element.prototype});return n||e}();function np(e,r){return e==null?null:e[mR](r)?e:np(e.parentElement,r)}function bR(e,r){return e.closest?e.closest(r):np(e,r)}function yR(e){return"["+ur.contextId+'="'+e+'"]'}function xR(e,r){var n=r.target;if(!vR(n))return null;var t=yR(e),i=bR(n,t);return!i||!gi(i)?null:i}function SR(e,r){var n=xR(e,r);return n?n.getAttribute(ur.draggableId):null}function wR(e,r){var n="["+Ao.contextId+'="'+e+'"]',t=yf(document.querySelectorAll(n)),i=_t(t,function(o){return o.getAttribute(Ao.id)===r});return!i||!gi(i)?null:i}function CR(e){e.preventDefault()}function Sn(e){var r=e.expected,n=e.phase,t=e.isLockActive;return e.shouldWarn,!(!t()||r!==n)}function ip(e){var r=e.lockAPI,n=e.store,t=e.registry,i=e.draggableId;if(r.isClaimed())return!1;var o=t.draggable.findById(i);return!(!o||!o.options.isEnabled||!Vf(n.getState(),i))}function IR(e){var r=e.lockAPI,n=e.contextId,t=e.store,i=e.registry,o=e.draggableId,a=e.forceSensorStop,s=e.sourceEvent,l=ip({lockAPI:r,store:t,registry:i,draggableId:o});if(!l)return null;var c=i.draggable.getById(o),u=wR(n,c.descriptor.id);if(!u||s&&!c.options.canDragInteractiveElements&&hR(u,s))return null;var d=r.claim(a||xt),f="PRE_DRAG";function p(){return c.options.shouldRespectForcePress}function h(){return r.isActive(d)}function v(w,D){Sn({expected:w,phase:f,isLockActive:h,shouldWarn:!0})&&t.dispatch(D())}var m=v.bind(null,"DRAGGING");function b(w){function D(){r.release(),f="COMPLETED"}f!=="PRE_DRAG"&&(D(),f!=="PRE_DRAG"&&Y()),t.dispatch(m0(w.liftActionArgs)),f="DRAGGING";function S(T,R){if(R===void 0&&(R={shouldBlockNextClick:!1}),w.cleanup(),R.shouldBlockNextClick){var O=Ye(window,[{eventName:"click",fn:CR,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(O)}D(),t.dispatch(Bf({reason:T}))}return K({isActive:function(){return Sn({expected:"DRAGGING",phase:f,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(R){return S("DROP",R)},cancel:function(R){return S("CANCEL",R)}},w.actions)}function y(w){var D=Gr(function(T){m(function(){return Ff({client:T})})}),S=b({liftActionArgs:{id:o,clientSelection:w,movementMode:"FLUID"},cleanup:function(){return D.cancel()},actions:{move:D}});return K({},S,{move:D})}function I(){var w={moveUp:function(){return m(T0)},moveRight:function(){return m(D0)},moveDown:function(){return m(_0)},moveLeft:function(){return m(P0)}};return b({liftActionArgs:{id:o,clientSelection:gR(u),movementMode:"SNAP"},cleanup:xt,actions:w})}function _(){var w=Sn({expected:"PRE_DRAG",phase:f,isLockActive:h,shouldWarn:!0});w&&r.release()}var P={isActive:function(){return Sn({expected:"PRE_DRAG",phase:f,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:y,snapLift:I,abort:_};return P}var RR=[nR,sR,fR];function TR(e){var r=e.contextId,n=e.store,t=e.registry,i=e.customSensors,o=e.enableDefaultSensors,a=[].concat(o?RR:[],i||[]),s=C.useState(function(){return WI()})[0],l=ae(function(y,I){y.isDragging&&!I.isDragging&&s.tryAbandon()},[s]);He(function(){var y=n.getState(),I=n.subscribe(function(){var _=n.getState();l(y,_),y=_});return I},[s,n,l]),He(function(){return s.tryAbandon},[s.tryAbandon]);for(var c=ae(function(b){return ip({lockAPI:s,registry:t,store:n,draggableId:b})},[s,t,n]),u=ae(function(b,y,I){return IR({lockAPI:s,registry:t,contextId:r,store:n,draggableId:b,forceSensorStop:y,sourceEvent:I&&I.sourceEvent?I.sourceEvent:null})},[r,s,t,n]),d=ae(function(b){return SR(r,b)},[r]),f=ae(function(b){var y=t.draggable.findById(b);return y?y.options:null},[t.draggable]),p=ae(function(){s.isClaimed()&&(s.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Pa()))},[s,n]),h=ae(s.isClaimed,[s]),v=fe(function(){return{canGetLock:c,tryGetLock:u,findClosestDraggableId:d,findOptionsForDraggable:f,tryReleaseLock:p,isLockClaimed:h}},[c,u,d,f,p,h]),m=0;m<a.length;m++)a[m](v)}var _R=function(r){return{onBeforeCapture:r.onBeforeCapture,onBeforeDragStart:r.onBeforeDragStart,onDragStart:r.onDragStart,onDragEnd:r.onDragEnd,onDragUpdate:r.onDragUpdate}};function Tr(e){return e.current||Y(),e.current}function DR(e){var r=e.contextId,n=e.setCallbacks,t=e.sensors,i=e.nonce,o=e.dragHandleUsageInstructions,a=C.useRef(null),s=Qf(e),l=ae(function(){return _R(s.current)},[s]),c=jI(r),u=GI({contextId:r,text:o}),d=OI(r,i),f=ae(function(T){Tr(a).dispatch(T)},[]),p=fe(function(){return Qa({publishWhileDragging:y0,updateDroppableScroll:S0,updateDroppableIsEnabled:w0,updateDroppableIsCombineEnabled:C0,collectionStarting:x0},f)},[f]),h=AI(),v=fe(function(){return cI(h,p)},[h,p]),m=fe(function(){return TI(K({scrollWindow:uI,scrollDroppable:v.scrollDroppable},Qa({move:Ff},f)))},[v.scrollDroppable,f]),b=NI(r),y=fe(function(){return oI({announce:c,autoScroller:m,dimensionMarshal:v,focusMarshal:b,getResponders:l,styleMarshal:d})},[c,m,v,b,l,d]);a.current=y;var I=ae(function(){var T=Tr(a),R=T.getState();R.phase!=="IDLE"&&T.dispatch(Pa())},[]),_=ae(function(){var T=Tr(a).getState();return T.isDragging||T.phase==="DROP_ANIMATING"},[]),P=fe(function(){return{isDragging:_,tryAbort:I}},[_,I]);n(P);var w=ae(function(T){return Vf(Tr(a).getState(),T)},[]),D=ae(function(){return Et(Tr(a).getState())},[]),S=fe(function(){return{marshal:v,focus:b,contextId:r,canLift:w,isMovementAllowed:D,dragHandleUsageInstructionsId:u,registry:h}},[r,v,u,b,w,D,h]);return TR({contextId:r,store:y,registry:h,customSensors:t,enableDefaultSensors:e.enableDefaultSensors!==!1}),C.useEffect(function(){return I},[I]),Q.createElement(vi.Provider,{value:S},Q.createElement(Iw,{context:za,store:y},e.children))}var PR=0;function kR(){return fe(function(){return""+PR++},[])}function OR(e){var r=kR(),n=e.dragHandleUsageInstructions||Nn.dragHandleUsageInstructions;return Q.createElement(sC,null,function(t){return Q.createElement(DR,{nonce:e.nonce,contextId:r,setCallbacks:t,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var op=function(r){return function(n){return r===n}},ER=op("scroll"),NR=op("auto"),hc=function(r,n){return n(r.overflowX)||n(r.overflowY)},MR=function(r){var n=window.getComputedStyle(r),t={overflowX:n.overflowX,overflowY:n.overflowY};return hc(t,ER)||hc(t,NR)},AR=function(){return!1},LR=function e(r){return r==null?null:r===document.body?AR()?r:null:r===document.documentElement?null:MR(r)?r:e(r.parentElement)},Lo=function(e){return{x:e.scrollLeft,y:e.scrollTop}},zR=function e(r){if(!r)return!1;var n=window.getComputedStyle(r);return n.position==="fixed"?!0:e(r.parentElement)},jR=function(e){var r=LR(e),n=zR(e);return{closestScrollable:r,isFixedOnPage:n}},FR=function(e){var r=e.descriptor,n=e.isEnabled,t=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,a=e.client,s=e.page,l=e.closest,c=function(){if(!l)return null;var p=l.scrollSize,h=l.client,v=Hf({scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,height:h.paddingBox.height,width:h.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:h,scrollSize:p,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:v,diff:{value:De,displacement:De}}}}(),u=o==="vertical"?Ia:If,d=lr({page:s,withPlaceholder:null,axis:u,frame:c}),f={descriptor:r,isCombineEnabled:t,isFixedOnPage:i,axis:u,isEnabled:n,client:a,page:s,frame:c,subject:d};return f},BR=function(r,n){var t=Vc(r);if(!n||r!==n)return t;var i=t.paddingBox.top-n.scrollTop,o=t.paddingBox.left-n.scrollLeft,a=i+n.scrollHeight,s=o+n.scrollWidth,l={top:i,right:s,bottom:a,left:o},c=Kc(l,t.border),u=rg({borderBox:c,margin:t.margin,border:t.border,padding:t.padding});return u},$R=function(e){var r=e.ref,n=e.descriptor,t=e.env,i=e.windowScroll,o=e.direction,a=e.isDropDisabled,s=e.isCombineEnabled,l=e.shouldClipSubject,c=t.closestScrollable,u=BR(r,c),d=Fn(u,i),f=function(){if(!c)return null;var h=Vc(c),v={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:h,page:Fn(h,i),scroll:Lo(c),scrollSize:v,shouldClipSubject:l}}(),p=FR({descriptor:n,isEnabled:!a,isCombineEnabled:s,isFixedOnPage:t.isFixedOnPage,direction:o,client:u,page:d,closest:f});return p},GR={passive:!1},WR={passive:!0},gc=function(e){return e.shouldPublishImmediately?GR:WR};function Xn(e){var r=C.useContext(e);return r||Y(),r}var wn=function(r){return r&&r.env.closestScrollable||null};function HR(e){var r=C.useRef(null),n=Xn(vi),t=ja("droppable"),i=n.registry,o=n.marshal,a=Qf(e),s=fe(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),l=C.useRef(s),c=fe(function(){return _e(function(_,P){r.current||Y();var w={x:_,y:P};o.updateDroppableScroll(s.id,w)})},[s.id,o]),u=ae(function(){var _=r.current;return!_||!_.env.closestScrollable?De:Lo(_.env.closestScrollable)},[]),d=ae(function(){var _=u();c(_.x,_.y)},[u,c]),f=fe(function(){return Gr(d)},[d]),p=ae(function(){var _=r.current,P=wn(_);_&&P||Y();var w=_.scrollOptions;if(w.shouldPublishImmediately){d();return}f()},[f,d]),h=ae(function(_,P){r.current&&Y();var w=a.current,D=w.getDroppableRef();D||Y();var S=jR(D),T={ref:D,descriptor:s,env:S,scrollOptions:P};r.current=T;var R=$R({ref:D,descriptor:s,env:S,windowScroll:_,direction:w.direction,isDropDisabled:w.isDropDisabled,isCombineEnabled:w.isCombineEnabled,shouldClipSubject:!w.ignoreContainerClipping}),O=S.closestScrollable;return O&&(O.setAttribute(uc.contextId,n.contextId),O.addEventListener("scroll",p,gc(T.scrollOptions))),R},[n.contextId,s,p,a]),v=ae(function(){var _=r.current,P=wn(_);return _&&P||Y(),Lo(P)},[]),m=ae(function(){var _=r.current;_||Y();var P=wn(_);r.current=null,P&&(f.cancel(),P.removeAttribute(uc.contextId),P.removeEventListener("scroll",p,gc(_.scrollOptions)))},[p,f]),b=ae(function(_){var P=r.current;P||Y();var w=wn(P);w||Y(),w.scrollTop+=_.y,w.scrollLeft+=_.x},[]),y=fe(function(){return{getDimensionAndWatchScroll:h,getScrollWhileDragging:v,dragStopped:m,scroll:b}},[m,h,v,b]),I=fe(function(){return{uniqueId:t,descriptor:s,callbacks:y}},[y,s,t]);He(function(){return l.current=I.descriptor,i.droppable.register(I),function(){r.current&&m(),i.droppable.unregister(I)}},[y,s,m,I,o,i.droppable]),He(function(){r.current&&o.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),He(function(){r.current&&o.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}function Qi(){}var vc={width:0,height:0,margin:pC},UR=function(r){var n=r.isAnimatingOpenOnMount,t=r.placeholder,i=r.animate;return n||i==="close"?vc:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin}},qR=function(r){var n=r.isAnimatingOpenOnMount,t=r.placeholder,i=r.animate,o=UR({isAnimatingOpenOnMount:n,placeholder:t,animate:i});return{display:t.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:i!=="none"?$r.placeholder:null}};function VR(e){var r=C.useRef(null),n=ae(function(){r.current&&(clearTimeout(r.current),r.current=null)},[]),t=e.animate,i=e.onTransitionEnd,o=e.onClose,a=e.contextId,s=C.useState(e.animate==="open"),l=s[0],c=s[1];C.useEffect(function(){return l?t!=="open"?(n(),c(!1),Qi):r.current?Qi:(r.current=setTimeout(function(){r.current=null,c(!1)}),n):Qi},[t,l,n]);var u=ae(function(f){f.propertyName==="height"&&(i(),t==="close"&&o())},[t,o,i]),d=qR({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return Q.createElement(e.placeholder.tagName,{style:d,"data-rbd-placeholder-context-id":a,onTransitionEnd:u,ref:e.innerRef})}var KR=Q.memo(VR),Ba=Q.createContext(null),YR=function(e){ei(r,e);function r(){for(var t,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=e.call.apply(e,[this].concat(o))||this,t.state={isVisible:!!t.props.on,data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){t.state.animate==="close"&&t.setState({isVisible:!1})},t}r.getDerivedStateFromProps=function(i,o){return i.shouldAnimate?i.on?{isVisible:!0,data:i.on,animate:"open"}:o.isVisible?{isVisible:!0,data:o.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!i.on,data:i.on,animate:"none"}};var n=r.prototype;return n.render=function(){if(!this.state.isVisible)return null;var i={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(i)},r}(Q.PureComponent),mc={dragging:5e3,dropAnimating:4500},JR=function(r,n){return n?$r.drop(n.duration):r?$r.snap:$r.fluid},XR=function(r,n){return r?n?Xr.opacity.drop:Xr.opacity.combining:null},QR=function(r){return r.forceShouldAnimate!=null?r.forceShouldAnimate:r.mode==="SNAP"};function ZR(e){var r=e.dimension,n=r.client,t=e.offset,i=e.combineWith,o=e.dropping,a=!!i,s=QR(e),l=!!o,c=l?No.drop(t,a):No.moveTo(t),u={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:JR(s,o),transform:c,opacity:XR(a,l),zIndex:l?mc.dropAnimating:mc.dragging,pointerEvents:"none"};return u}function eT(e){return{transform:No.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function tT(e){return e.type==="DRAGGING"?ZR(e):eT(e)}function rT(e,r,n){n===void 0&&(n=De);var t=window.getComputedStyle(r),i=r.getBoundingClientRect(),o=ng(i,t),a=Fn(o,n),s={client:o,tagName:r.tagName.toLowerCase(),display:t.display},l={x:o.marginBox.width,y:o.marginBox.height},c={descriptor:e,placeholder:s,displaceBy:l,client:o,page:a};return c}function nT(e){var r=ja("draggable"),n=e.descriptor,t=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,a=e.shouldRespectForcePress,s=e.isEnabled,l=fe(function(){return{canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:s}},[o,s,a]),c=ae(function(p){var h=i();return h||Y(),rT(n,h,p)},[n,i]),u=fe(function(){return{uniqueId:r,descriptor:n,options:l,getDimension:c}},[n,c,l,r]),d=C.useRef(u),f=C.useRef(!0);He(function(){return t.draggable.register(d.current),function(){return t.draggable.unregister(d.current)}},[t.draggable]),He(function(){if(f.current){f.current=!1;return}var p=d.current;d.current=u,t.draggable.update(u,p)},[u,t.draggable])}function iT(e){e.preventDefault()}function oT(e){var r=C.useRef(null),n=ae(function(T){r.current=T},[]),t=ae(function(){return r.current},[]),i=Xn(vi),o=i.contextId,a=i.dragHandleUsageInstructionsId,s=i.registry,l=Xn(Ba),c=l.type,u=l.droppableId,d=fe(function(){return{id:e.draggableId,index:e.index,type:c,droppableId:u}},[e.draggableId,e.index,c,u]),f=e.children,p=e.draggableId,h=e.isEnabled,v=e.shouldRespectForcePress,m=e.canDragInteractiveElements,b=e.isClone,y=e.mapped,I=e.dropAnimationFinished;if(!b){var _=fe(function(){return{descriptor:d,registry:s,getDraggableRef:t,canDragInteractiveElements:m,shouldRespectForcePress:v,isEnabled:h}},[d,s,t,m,v,h]);nT(_)}var P=fe(function(){return h?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":p,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:iT}:null},[o,a,p,h]),w=ae(function(T){y.type==="DRAGGING"&&y.dropping&&T.propertyName==="transform"&&I()},[I,y]),D=fe(function(){var T=tT(y),R=y.type==="DRAGGING"&&y.dropping?w:null,O={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":p,style:T,onTransitionEnd:R},dragHandleProps:P};return O},[o,P,p,y,w,n]),S=fe(function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}},[d.droppableId,d.id,d.index,d.type]);return f(D,y.snapshot,S)}var ap=function(e,r){return e===r},sp=function(e){var r=e.combine,n=e.destination;return n?n.droppableId:r?r.droppableId:null},aT=function(r){return r.combine?r.combine.draggableId:null},sT=function(r){return r.at&&r.at.type==="COMBINE"?r.at.combine.draggableId:null};function lT(){var e=_e(function(i,o){return{x:i,y:o}}),r=_e(function(i,o,a,s,l){return{isDragging:!0,isClone:o,isDropAnimating:!!l,dropAnimation:l,mode:i,draggingOver:a,combineWith:s,combineTargetFor:null}}),n=_e(function(i,o,a,s,l,c,u){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:c,mode:o,offset:i,dimension:a,forceShouldAnimate:u,snapshot:r(o,s,l,c,null)}}}),t=function(o,a){if(o.isDragging){if(o.critical.draggable.id!==a.draggableId)return null;var s=o.current.client.offset,l=o.dimensions.draggables[a.draggableId],c=We(o.impact),u=sT(o.impact),d=o.forceShouldAnimate;return n(e(s.x,s.y),o.movementMode,l,a.isClone,c,u,d)}if(o.phase==="DROP_ANIMATING"){var f=o.completed;if(f.result.draggableId!==a.draggableId)return null;var p=a.isClone,h=o.dimensions.draggables[a.draggableId],v=f.result,m=v.mode,b=sp(v),y=aT(v),I=o.dropDuration,_={duration:I,curve:Oa.drop,moveTo:o.newHomeClientOffset,opacity:y?Xr.opacity.drop:null,scale:y?Xr.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:h,dropping:_,draggingOver:b,combineWith:y,mode:m,forceShouldAnimate:null,snapshot:r(m,p,b,y,_)}}}return null};return t}function lp(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var cT={mapped:{type:"SECONDARY",offset:De,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:lp(null)}};function uT(){var e=_e(function(a,s){return{x:a,y:s}}),r=_e(lp),n=_e(function(a,s,l){return s===void 0&&(s=null),{mapped:{type:"SECONDARY",offset:a,combineTargetFor:s,shouldAnimateDisplacement:l,snapshot:r(s)}}}),t=function(s){return s?n(De,s,!0):null},i=function(s,l,c,u){var d=c.displaced.visible[s],f=!!(u.inVirtualList&&u.effected[s]),p=fi(c),h=p&&p.draggableId===s?l:null;if(!d){if(!f)return t(h);if(c.displaced.invisible[s])return null;var v=hr(u.displacedBy.point),m=e(v.x,v.y);return n(m,h,!0)}if(f)return t(h);var b=c.displacedBy.point,y=e(b.x,b.y);return n(y,h,d.shouldAnimate)},o=function(s,l){if(s.isDragging)return s.critical.draggable.id===l.draggableId?null:i(l.draggableId,s.critical.draggable.id,s.impact,s.afterCritical);if(s.phase==="DROP_ANIMATING"){var c=s.completed;return c.result.draggableId===l.draggableId?null:i(l.draggableId,c.result.draggableId,c.impact,c.afterCritical)}return null};return o}var dT=function(){var r=lT(),n=uT(),t=function(o,a){return r(o,a)||n(o,a)||cT};return t},fT={dropAnimationFinished:$f},pT=hf(dT,fT,null,{context:za,pure:!0,areStatePropsEqual:ap})(oT);function cp(e){var r=Xn(Ba),n=r.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:Q.createElement(pT,e)}function hT(e){var r=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,t=!!e.shouldRespectForcePress;return Q.createElement(cp,K({},e,{isClone:!1,isEnabled:r,canDragInteractiveElements:n,shouldRespectForcePress:t}))}function gT(e){var r=C.useContext(vi);r||Y();var n=r.contextId,t=r.isMovementAllowed,i=C.useRef(null),o=C.useRef(null),a=e.children,s=e.droppableId,l=e.type,c=e.mode,u=e.direction,d=e.ignoreContainerClipping,f=e.isDropDisabled,p=e.isCombineEnabled,h=e.snapshot,v=e.useClone,m=e.updateViewportMaxScroll,b=e.getContainerForClone,y=ae(function(){return i.current},[]),I=ae(function(O){i.current=O},[]);ae(function(){return o.current},[]);var _=ae(function(O){o.current=O},[]),P=ae(function(){t()&&m({maxScroll:qf()})},[t,m]);HR({droppableId:s,type:l,mode:c,direction:u,isDropDisabled:f,isCombineEnabled:p,ignoreContainerClipping:d,getDroppableRef:y});var w=Q.createElement(YR,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(O){var L=O.onClose,M=O.data,H=O.animate;return Q.createElement(KR,{placeholder:M,onClose:L,innerRef:_,animate:H,contextId:n,onTransitionEnd:P})}),D=fe(function(){return{innerRef:I,placeholder:w,droppableProps:{"data-rbd-droppable-id":s,"data-rbd-droppable-context-id":n}}},[n,s,w,I]),S=v?v.dragging.draggableId:null,T=fe(function(){return{droppableId:s,type:l,isUsingCloneFor:S}},[s,S,l]);function R(){if(!v)return null;var O=v.dragging,L=v.render,M=Q.createElement(cp,{draggableId:O.draggableId,index:O.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(H,E){return L(H,E,O)});return Gh.createPortal(M,b())}return Q.createElement(Ba.Provider,{value:T},a(D,h),R())}var Zi=function(r,n){return r===n.droppable.type},bc=function(r,n){return n.draggables[r.draggable.id]},vT=function(){var r={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=K({},r,{shouldAnimatePlaceholder:!1}),t=_e(function(a){return{draggableId:a.id,type:a.type,source:{index:a.index,droppableId:a.droppableId}}}),i=_e(function(a,s,l,c,u,d){var f=u.descriptor.id,p=u.descriptor.droppableId===a;if(p){var h=d?{render:d,dragging:t(u.descriptor)}:null,v={isDraggingOver:l,draggingOverWith:l?f:null,draggingFromThisWith:f,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!1,snapshot:v,useClone:h}}if(!s)return n;if(!c)return r;var m={isDraggingOver:l,draggingOverWith:f,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!0,snapshot:m,useClone:null}}),o=function(s,l){var c=l.droppableId,u=l.type,d=!l.isDropDisabled,f=l.renderClone;if(s.isDragging){var p=s.critical;if(!Zi(u,p))return n;var h=bc(p,s.dimensions),v=We(s.impact)===c;return i(c,d,v,v,h,f)}if(s.phase==="DROP_ANIMATING"){var m=s.completed;if(!Zi(u,m.critical))return n;var b=bc(m.critical,s.dimensions);return i(c,d,sp(m.result)===c,We(m.impact)===c,b,f)}if(s.phase==="IDLE"&&s.completed&&!s.shouldFlush){var y=s.completed;if(!Zi(u,y.critical))return n;var I=We(y.impact)===c,_=!!(y.impact.at&&y.impact.at.type==="COMBINE"),P=y.critical.droppable.id===c;return I?_?r:n:P?r:n}return n};return o},mT={updateViewportMaxScroll:R0};function bT(){return document.body||Y(),document.body}var yT={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:bT},up=hf(vT,mT,null,{context:za,pure:!0,areStatePropsEqual:ap})(gT);up.defaultProps=yT;const xT=e=>{const r=e.replace("#","");if(!/^([A-Fa-f0-9]{3}){1,2}$/.test(r))return{r:0,g:0,b:0};const n=r.length===3?r.split("").map(t=>t+t).join(""):r;return{r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16)}};function ST({src:e,color:r,size:n=24,...t}){const[i,o]=C.useState("");return C.useEffect(()=>{const a=new Image;return a.crossOrigin="anonymous",a.onload=()=>{const s=document.createElement("canvas");s.width=a.width,s.height=a.height;const l=s.getContext("2d");l.drawImage(a,0,0);const c=l.getImageData(0,0,s.width,s.height),{data:u}=c,d=xT(r);for(let f=0;f<u.length;f+=4)if(u[f+3]>0){const p=u[f+3]/255;u[f]=d.r*p,u[f+1]=d.g*p,u[f+2]=d.b*p}l.putImageData(c,0,0),o(s.toDataURL("image/png"))},a.src=e,()=>{a.onload=null}},[e,r]),g.jsx(re,{component:"img",src:i||e,sx:{width:n,height:n,display:"block",opacity:i?1:.5,transition:"opacity 0.2s"},...t})}const zo=375,dp=667,$a=56,wT=Xe(Mr)(({theme:e})=>({width:zo,height:dp,display:"flex",flexDirection:"column",overflow:"hidden",border:`1px solid ${e.palette.divider}`,borderRadius:32,position:"relative"})),yc=Xe(re)(({theme:e})=>({height:$a,borderTop:`1px solid ${e.palette.divider}`,display:"flex",backgroundColor:e.palette.background.paper})),xc=Xe(re)(({theme:e,active:r})=>({flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",position:"relative",color:r?e.palette.primary.main:e.palette.text.secondary,"&:hover":{backgroundColor:e.palette.action.hover}})),CT=Xe(re)(({theme:e,left:r})=>({position:"absolute",bottom:-$a,left:r,transform:"translateX(-50%)",display:"flex",alignItems:"center",backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadius,padding:`${e.spacing(.5)} ${e.spacing(1)}`,boxShadow:e.shadows[2],zIndex:1})),Cn=Xe(je)(({theme:e})=>({padding:e.spacing(.5),"&:not(:last-child)":{marginRight:e.spacing(.5)}})),IT=Xe(re)({flexGrow:1,height:"100%",position:"relative",overflow:"hidden"}),RT=Xe(re)(({theme:e})=>({width:400,paddingLeft:e.spacing(3),backgroundColor:e.palette.background.default,height:dp,overflowY:"auto"}));function TT(){const{t:e,locale:r}=Ee(),{blocklet:n}=$t(),t=ot(),i=Zr(t.breakpoints.down("md")),{state:o,getNavigation:a,updateNavigationItem:s,addNavigationItem:l,delNavigationItem:c,updateNavigationTree:u}=eu(),{inService:d}=Tc(),f=C.useRef(null),p=C.useRef(null),h=C.useRef(null),v=n.environments.find(q=>q.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),m=n?.settings?.theme?.light?.palette?.primary?.main,[b,y]=C.useState(0),[I,_]=C.useState(!1),P=C.useRef(0),w=C.useRef(null),D=a("bottomNavigation"),S=D.length>0,T=D.length<5,[R,O]=C.useState(D.length>0?D[0]:null),L=D.findIndex(q=>q.id===R?.id),M=oe((q,ne)=>{const ie=q?.[ne];return Hc(ie)?ie[r]||ie.en:ie}),H=oe(q=>{q.id!==R?.id&&O(q)}),E=oe(q=>{w.current=q,h.current?.add({},(ne,ie)=>{const ue=l(ie,w.current);O(ue),ne()})}),B=oe(()=>{_(!0)}),$=oe(()=>{h.current?.edit(R,(q,ne)=>{s(ne),q()})}),{run:U}=_c(()=>{p.current?.submit()},{wait:300}),J=oe(U),ee=oe(q=>{if(q?.startsWith("/"))try{const ne=d?window.location.origin:v?.value;return new URL(q,ne).href}catch{console.error("Failed to resolve url: ",q)}return q},[v?.value,d]),X=oe(q=>{if(!q.destination)return;const ne=Array.from(D),[ie]=ne.splice(q.source.index,1);ne.splice(q.destination.index,0,ie),u(ne)}),Z=oe(()=>{const q=D.find(ie=>ie.id===R?.id);if(!q)return"";let ne=M(q,"link")||"/";if(ne.startsWith("/"))try{ne=ee(Re(q.__base||"/",ne))}catch(ie){return console.error("Failed to get active tab link",ie),""}return ne});return C.useEffect(()=>{R&&!i&&(p.current?.resetImmediate(),p.current?.edit(R,q=>{s(q)}))},[R,s,i]),C.useEffect(()=>{const q=D.findIndex(N=>N.id===R?.id);if(q===-1||!f.current)return y(P.current);const ie=zo/D.length*(q+.5),ue=f.current.getBoundingClientRect().width,G=ue/2+16,W=zo-(ue/2+16),k=Math.min(Math.max(ie,G),W);return P.current=k,y(k)},[R,D,P]),C.useEffect(()=>{D.length>0&&!R&&O(D[0])},[D,R]),g.jsx(re,{sx:{display:"flex",justifyContent:"center"},children:g.jsxs(re,{sx:{position:"relative",display:"inline-flex",alignItems:"flex-start",margin:"4px auto 0"},children:[g.jsxs(wT,{elevation:2,children:[g.jsx(IT,{children:S&&g.jsx(Ig,{url:Z(),width:"100%",height:"100%",id:"tabbar-preview",className:"tabbar-preview-iframe",display:"block",position:"relative",styles:{border:"none",background:"#fff"}})}),g.jsxs(re,{sx:{height:$a,overflowY:"auto",flexShrink:0},children:[S&&g.jsx(OR,{onDragEnd:X,children:g.jsx(up,{droppableId:"tabbar",direction:"horizontal",children:q=>g.jsxs(yc,{ref:q.innerRef,...q.droppableProps,children:[D.map((ne,ie)=>g.jsx(hT,{draggableId:ne.id,index:ie,children:(ue,G)=>g.jsxs(xc,{className:"tab-item",ref:ue.innerRef,...ue.draggableProps,...ue.dragHandleProps,active:ne.id===R?.id,onClick:W=>H(ne,W),sx:{color:ne.id===R?.id?m:"text.secondary",opacity:G.isDragging?.5:1},children:[g.jsx(ST,{src:ee(ne.icon),color:ne.id===R?.id?m:t.palette.text.secondary,size:24}),g.jsx(de,{variant:"caption",children:M(ne,"title")})]})},ne.id)),q.placeholder]})})}),!S&&g.jsx(yc,{children:g.jsx(xc,{className:"tab-item",onClick:()=>E(0),children:g.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})})})]})]}),!i&&S&&g.jsx(RT,{children:R&&g.jsx(ga,{ref:p,sx:{p:0},section:"bottomNavigation",components:o.components,rawNavigations:o.rawNavigation,onChange:J})}),g.jsx(Nc,{in:R!==null,children:g.jsxs(CT,{ref:f,left:b,children:[g.jsx(Cn,{size:"small",disabled:!T,onClick:()=>E(L),children:g.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})}),i&&g.jsx(Cn,{size:"small",onClick:()=>$(),children:g.jsx(nt,{icon:"mdi:edit-box-outline",size:28})}),g.jsx(Cn,{size:"small",onClick:()=>B(),children:g.jsx(nt,{icon:"mdi:delete-outline",size:28})}),g.jsx(Cn,{size:"small",disabled:!T,onClick:()=>E(L+1),children:g.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})})]})}),g.jsx(va,{ref:h,section:"bottomNavigation",components:o.components,rawNavigations:o.rawNavigation}),g.jsx(Uc,{confirmButton:{text:e("common.confirm"),props:{variant:"contained",color:"error"}},cancelButton:{text:e("common.cancel"),props:{color:"primary"}},open:I,title:e("navigation.action.delTabBarTitle"),onConfirm:()=>{_(!1),c(R.id),D.length>1?L>0?O(D[L-1]):O(D[L+1]):O(null)},onCancel:()=>{_(!1)},children:g.jsx("p",{children:e("navigation.action.delTabBarDesc")})})]})})}const _T={login:et,logout:et,switch:et,switchDid:et,switchProfile:et,switchPassport:et,useDid:()=>({walletDid:"abcdefghijklmnopqrstuvwxyz"}),useOAuth:()=>({logoutOAuth:et,bindOAuth:et,configs:{},switchOAuthPassport:et})},_r={header:"Header",footer:"Footer",bottom:"Footer Link",social:"Footer Social",dashboard:"Dashboard",sessionManager:"Session Blocklet",userCenter:"User Center",bottomNavigation:"Tab Bar"};function DT(){const{t:e}=Ee(),{blocklet:r}=$t(),n=C.useRef(null),{roles:t}=Yc(),i=Zr(R=>R.breakpoints.down("md")),o=Bt({saveLoading:!1,resetLoading:!1,showResetConfirm:!1,mockRole:"owner"}),{state:a,navigation:s,getNavigation:l,saveNavigationList:c,resetNavigation:u,updateActiveSection:d,updateNavigationTree:f,updateNavigationItem:p,delNavigationItem:h,addNavigationItem:v}=eu(),m=a.activeSection==="bottomNavigation",b=C.useCallback(R=>{n.current.add({parent:R},(O,L)=>{v(L),O()})},[v]),y=C.useCallback((R,O={})=>{switch(R){case"edit":n.current.edit(O,(L,M)=>{p(M),L()});break;case"toggle":p({id:O.id,visible:!O.visible});break;case"del":h(O.id);break}},[h,p]),I=C.useCallback(async()=>{try{o.saveLoading=!0,await c(a.rawNavigation),Mt.success(e("common.succeeded"))}catch(R){Mt.error(g.jsxs(re,{children:[g.jsx(de,{variant:"subtitle2",children:e("navigation.actionFailed")}),g.jsx(de,{variant:"body1",children:Ka(R)||R.error})]}))}finally{o.saveLoading=!1}},[a.rawNavigation,o,c,e]),_=C.useCallback(async()=>{try{o.resetLoading=!0,await u(a.activeSection),Mt.success(e("navigation.action.resetSuccessful"),{variant:"success"})}catch(R){Mt.error(g.jsxs(re,{children:[g.jsx(de,{variant:"subtitle2",children:e("navigation.actionFailed")}),g.jsx(de,{variant:"body1",children:Ka(R)||R.error})]}))}finally{o.resetLoading=!1}},[o,u,a.activeSection,e]),P=C.useMemo(()=>({session:{..._T,user:{did:r.appDid,fullName:"Preview User",role:o.mockRole,isPreviewUser:!0}}}),[r.appDid,o.mockRole]),w=l(a.activeSection),D=Te(()=>a.activeSection!=="bottomNavigation"?!1:w.length>=5,[a.activeSection,w.length]),S=g.jsxs(g.Fragment,{children:[g.jsx(Mr,{variant:"outlined",sx:{display:"flex",height:660,overflow:"hidden",bgcolor:"background.default"},children:g.jsx(Mr,{elevation:0,sx:{flex:1,overflow:"auto",bgcolor:"background.default"},children:g.jsx(kd,{treeData:w,setTreeData:f,renderActions:({data:R,className:O})=>g.jsx(Ad,{data:R,className:O,section:a.activeSection,add:(...L)=>b(...L),del:(...L)=>y("del",...L),edit:(...L)=>y("edit",...L),toggle:(...L)=>y("toggle",...L)})})})}),g.jsxs(Ya,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:3},children:[g.jsx(de,{variant:"h6",component:"div",sx:{flexGrow:1},children:e("common.preview")}),g.jsxs(kc,{sx:{m:1,minWidth:120},size:"small",children:[g.jsx(Wh,{children:e("common.role")}),g.jsx(Ja,{value:o.mockRole,label:"Role",onChange:R=>{o.mockRole=R.target.value},children:t.map(R=>g.jsx(zn,{value:R.name,children:R.title},R.name))})]})]}),g.jsx(Mr,{variant:"outlined",children:g.jsx(ri.Provider,{value:P,children:g.jsx(yw,{navigation:s})})})]}),T=g.jsx(TT,{});return g.jsxs(g.Fragment,{children:[i&&g.jsx(Ja,{fullWidth:!0,size:"small",value:a.activeSection,onChange:R=>d(R.target.value),children:Object.keys(_r).map(R=>g.jsxs(zn,{value:R,children:[_r[R],` (${l(R).length})`]}))}),!i&&g.jsx(yi,{variant:"outlined",children:Object.keys(_r).map(R=>g.jsxs(Ct,{variant:a.activeSection===R?"contained":void 0,onClick:()=>d(R),children:[_r[R],` (${l(R).length})`]},R))}),g.jsxs(Ya,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:2},children:[g.jsx(de,{variant:"h6",component:"div",sx:{flexGrow:1},children:e("common.config")}),g.jsx(yi,{variant:"outlined",children:g.jsx(es,{size:"small",variant:"outlined",color:"error",startIcon:g.jsx(ye,{icon:"system-uicons:reset"}),sx:{mr:2},loading:o.resetLoading,loadingPosition:"start",onClick:()=>{o.showResetConfirm=!0},children:e("navigation.action.reset")})}),g.jsxs(yi,{variant:"outlined",children:[a.activeSection!=="bottomNavigation"&&g.jsx(Ct,{size:"small",variant:"outlined",disabled:D,startIcon:g.jsx(ye,{icon:"mdi:plus"}),onClick:()=>b(),children:e("navigation.action.new")}),g.jsx(es,{size:"small",variant:"contained",startIcon:g.jsx(ye,{icon:"mdi:content-save"}),loading:o.saveLoading,loadingPosition:"start",onClick:I,children:e("common.save")})]})]}),m?T:S,g.jsx(va,{ref:n,section:a.activeSection,components:a.components,rawNavigations:a.rawNavigation}),g.jsx(Uc,{confirmButton:{text:e("common.confirm"),props:{variant:"contained",color:"error"}},cancelButton:{text:e("common.cancel"),props:{color:"primary"}},open:o.showResetConfirm,title:e("navigation.action.restConfirmTitle",{section:_r[a.activeSection]}),onConfirm:async()=>{await _(),o.showResetConfirm=!1},onCancel:()=>{o.showResetConfirm=!1},children:g.jsx("p",{children:e("navigation.action.restConfirmDesc")})})]})}function __(){return g.jsx(Wg,{children:g.jsx(DT,{})})}export{__ as default};
457
+ `}},a=[t,n,i,o];return{always:Ir(a,"always"),resting:Ir(a,"resting"),dragging:Ir(a,"dragging"),dropAnimating:Ir(a,"dropAnimating"),userCancel:Ir(a,"userCancel")}},He=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect,Ji=function(){var r=document.querySelector("head");return r||Y(),r},dc=function(r){var n=document.createElement("style");return r&&n.setAttribute("nonce",r),n.type="text/css",n};function EI(e,r){var n=fe(function(){return OI(e)},[e]),t=C.useRef(null),i=C.useRef(null),o=ae(_e(function(d){var f=i.current;f||Y(),f.textContent=d}),[]),a=ae(function(d){var f=t.current;f||Y(),f.textContent=d},[]);He(function(){!t.current&&!i.current||Y();var d=dc(r),f=dc(r);return t.current=d,i.current=f,d.setAttribute(cr+"-always",e),f.setAttribute(cr+"-dynamic",e),Ji().appendChild(d),Ji().appendChild(f),a(n.always),o(n.resting),function(){var p=function(v){var m=v.current;m||Y(),Ji().removeChild(m),v.current=null};p(t),p(i)}},[r,a,o,n.always,n.resting,e]);var s=ae(function(){return o(n.dragging)},[o,n.dragging]),l=ae(function(d){if(d==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),c=ae(function(){i.current&&o(n.resting)},[o,n.resting]),u=fe(function(){return{dragging:s,dropping:l,resting:c}},[s,l,c]);return u}var Xf=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function gi(e){return e instanceof Xf(e).HTMLElement}function NI(e,r){var n="["+ur.contextId+'="'+e+'"]',t=yf(document.querySelectorAll(n));if(!t.length)return null;var i=_t(t,function(o){return o.getAttribute(ur.draggableId)===r});return!i||!gi(i)?null:i}function MI(e){var r=C.useRef({}),n=C.useRef(null),t=C.useRef(null),i=C.useRef(!1),o=ae(function(f,p){var h={id:f,focus:p};return r.current[f]=h,function(){var m=r.current,y=m[f];y!==h&&delete m[f]}},[]),a=ae(function(f){var p=NI(e,f);p&&p!==document.activeElement&&p.focus()},[e]),s=ae(function(f,p){n.current===f&&(n.current=p)},[]),l=ae(function(){t.current||i.current&&(t.current=requestAnimationFrame(function(){t.current=null;var f=n.current;f&&a(f)}))},[a]),c=ae(function(f){n.current=null;var p=document.activeElement;p&&p.getAttribute(ur.draggableId)===f&&(n.current=f)},[]);He(function(){return i.current=!0,function(){i.current=!1;var f=t.current;f&&cancelAnimationFrame(f)}},[]);var u=fe(function(){return{register:o,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}},[o,c,l,s]);return u}function AI(){var e={draggables:{},droppables:{}},r=[];function n(d){return r.push(d),function(){var p=r.indexOf(d);p!==-1&&r.splice(p,1)}}function t(d){r.length&&r.forEach(function(f){return f(d)})}function i(d){return e.draggables[d]||null}function o(d){var f=i(d);return f||Y(),f}var a={register:function(f){e.draggables[f.descriptor.id]=f,t({type:"ADDITION",value:f})},update:function(f,p){var h=e.draggables[p.descriptor.id];h&&h.uniqueId===f.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[f.descriptor.id]=f)},unregister:function(f){var p=f.descriptor.id,h=i(p);h&&f.uniqueId===h.uniqueId&&(delete e.draggables[p],t({type:"REMOVAL",value:f}))},getById:o,findById:i,exists:function(f){return!!i(f)},getAllByType:function(f){return Kn(e.draggables).filter(function(p){return p.descriptor.type===f})}};function s(d){return e.droppables[d]||null}function l(d){var f=s(d);return f||Y(),f}var c={register:function(f){e.droppables[f.descriptor.id]=f},unregister:function(f){var p=s(f.descriptor.id);p&&f.uniqueId===p.uniqueId&&delete e.droppables[f.descriptor.id]},getById:l,findById:s,exists:function(f){return!!s(f)},getAllByType:function(f){return Kn(e.droppables).filter(function(p){return p.descriptor.type===f})}};function u(){e.draggables={},e.droppables={},r.length=0}return{draggable:a,droppable:c,subscribe:n,clean:u}}function LI(){var e=fe(AI,[]);return C.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var za=Q.createContext(null),Jn=function(){var e=document.body;return e||Y(),e},zI={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},jI=function(r){return"rbd-announcement-"+r};function FI(e){var r=fe(function(){return jI(e)},[e]),n=C.useRef(null);C.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=r,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),K(o.style,zI),Jn().appendChild(o),function(){setTimeout(function(){var l=Jn();l.contains(o)&&l.removeChild(o),o===n.current&&(n.current=null)})}},[r]);var t=ae(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return t}var BI=0,$I={separator:"::"};function ja(e,r){return r===void 0&&(r=$I),fe(function(){return""+e+r.separator+BI++},[r.separator,e])}function GI(e){var r=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+r+"-"+n}function WI(e){var r=e.contextId,n=e.text,t=ja("hidden-text",{separator:"-"}),i=fe(function(){return GI({contextId:r,uniqueId:t})},[t,r]);return C.useEffect(function(){var a=document.createElement("div");return a.id=i,a.textContent=n,a.style.display="none",Jn().appendChild(a),function(){var l=Jn();l.contains(a)&&l.removeChild(a)}},[i,n]),i}var vi=Q.createContext(null);function Qf(e){var r=C.useRef(e);return C.useEffect(function(){r.current=e}),r}function HI(){var e=null;function r(){return!!e}function n(a){return a===e}function t(a){e&&Y();var s={abandon:a};return e=s,s}function i(){e||Y(),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:r,isActive:n,claim:t,release:i,tryAbandon:o}}var UI=9,qI=13,Fa=27,Zf=32,VI=33,KI=34,YI=35,JI=36,XI=37,QI=38,ZI=39,eR=40,xn,tR=(xn={},xn[qI]=!0,xn[UI]=!0,xn),ep=function(e){tR[e.keyCode]&&e.preventDefault()},mi=function(){var e="visibilitychange";if(typeof document>"u")return e;var r=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=_t(r,function(t){return"on"+t in document});return n||e}(),tp=0,fc=5;function rR(e,r){return Math.abs(r.x-e.x)>=fc||Math.abs(r.y-e.y)>=fc}var pc={type:"IDLE"};function nR(e){var r=e.cancel,n=e.completed,t=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(a){var s=a.button,l=a.clientX,c=a.clientY;if(s===tp){var u={x:l,y:c},d=t();if(d.type==="DRAGGING"){a.preventDefault(),d.actions.move(u);return}d.type!=="PENDING"&&Y();var f=d.point;if(rR(f,u)){a.preventDefault();var p=d.actions.fluidLift(u);i({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(a){var s=t();if(s.type!=="DRAGGING"){r();return}a.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(a){t().type==="DRAGGING"&&a.preventDefault(),r()}},{eventName:"keydown",fn:function(a){var s=t();if(s.type==="PENDING"){r();return}if(a.keyCode===Fa){a.preventDefault(),r();return}ep(a)}},{eventName:"resize",fn:r},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){t().type==="PENDING"&&r()}},{eventName:"webkitmouseforcedown",fn:function(a){var s=t();if(s.type==="IDLE"&&Y(),s.actions.shouldRespectForcePress()){r();return}a.preventDefault()}},{eventName:mi,fn:r}]}function iR(e){var r=C.useRef(pc),n=C.useRef(xt),t=fe(function(){return{eventName:"mousedown",fn:function(d){if(!d.defaultPrevented&&d.button===tp&&!(d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)){var f=e.findClosestDraggableId(d);if(f){var p=e.tryGetLock(f,a,{sourceEvent:d});if(p){d.preventDefault();var h={x:d.clientX,y:d.clientY};n.current(),c(p,h)}}}}}},[e]),i=fe(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(d){if(!d.defaultPrevented){var f=e.findClosestDraggableId(d);if(f){var p=e.findOptionsForDraggable(f);p&&(p.shouldRespectForcePress||e.canGetLock(f)&&d.preventDefault())}}}}},[e]),o=ae(function(){var d={passive:!1,capture:!0};n.current=Ye(window,[i,t],d)},[i,t]),a=ae(function(){var u=r.current;u.type!=="IDLE"&&(r.current=pc,n.current(),o())},[o]),s=ae(function(){var u=r.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),l=ae(function(){var d={capture:!0,passive:!1},f=nR({cancel:s,completed:a,getPhase:function(){return r.current},setPhase:function(h){r.current=h}});n.current=Ye(window,f,d)},[s,a]),c=ae(function(d,f){r.current.type!=="IDLE"&&Y(),r.current={type:"PENDING",point:f,actions:d},l()},[l]);He(function(){return o(),function(){n.current()}},[o])}var Yt;function oR(){}var aR=(Yt={},Yt[KI]=!0,Yt[VI]=!0,Yt[JI]=!0,Yt[YI]=!0,Yt);function sR(e,r){function n(){r(),e.cancel()}function t(){r(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===Fa){o.preventDefault(),n();return}if(o.keyCode===Zf){o.preventDefault(),t();return}if(o.keyCode===eR){o.preventDefault(),e.moveDown();return}if(o.keyCode===QI){o.preventDefault(),e.moveUp();return}if(o.keyCode===ZI){o.preventDefault(),e.moveRight();return}if(o.keyCode===XI){o.preventDefault(),e.moveLeft();return}if(aR[o.keyCode]){o.preventDefault();return}ep(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:mi,fn:n}]}function lR(e){var r=C.useRef(oR),n=fe(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==Zf)return;var a=e.findClosestDraggableId(o);if(!a)return;var s=e.tryGetLock(a,u,{sourceEvent:o});if(!s)return;o.preventDefault();var l=!0,c=s.snapLift();r.current();function u(){l||Y(),l=!1,r.current(),t()}r.current=Ye(window,sR(c,u),{capture:!0,passive:!1})}}},[e]),t=ae(function(){var o={passive:!1,capture:!0};r.current=Ye(window,[n],o)},[n]);He(function(){return t(),function(){r.current()}},[t])}var Xi={type:"IDLE"},cR=120,uR=.15;function dR(e){var r=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:r},{eventName:"resize",fn:r},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){r();return}i.keyCode===Fa&&i.preventDefault(),r()}},{eventName:mi,fn:r}]}function fR(e){var r=e.cancel,n=e.completed,t=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var a=t();if(a.type!=="DRAGGING"){r();return}a.hasMoved=!0;var s=o.touches[0],l=s.clientX,c=s.clientY,u={x:l,y:c};o.preventDefault(),a.actions.move(u)}},{eventName:"touchend",fn:function(o){var a=t();if(a.type!=="DRAGGING"){r();return}o.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(t().type!=="DRAGGING"){r();return}o.preventDefault(),r()}},{eventName:"touchforcechange",fn:function(o){var a=t();a.type==="IDLE"&&Y();var s=o.touches[0];if(s){var l=s.force>=uR;if(l){var c=a.actions.shouldRespectForcePress();if(a.type==="PENDING"){c&&r();return}if(c){if(a.hasMoved){o.preventDefault();return}r();return}o.preventDefault()}}}},{eventName:mi,fn:r}]}function pR(e){var r=C.useRef(Xi),n=C.useRef(xt),t=ae(function(){return r.current},[]),i=ae(function(p){r.current=p},[]),o=fe(function(){return{eventName:"touchstart",fn:function(p){if(!p.defaultPrevented){var h=e.findClosestDraggableId(p);if(h){var v=e.tryGetLock(h,s,{sourceEvent:p});if(v){var m=p.touches[0],y=m.clientX,b=m.clientY,I={x:y,y:b};n.current(),d(v,I)}}}}}},[e]),a=ae(function(){var p={capture:!0,passive:!1};n.current=Ye(window,[o],p)},[o]),s=ae(function(){var f=r.current;f.type!=="IDLE"&&(f.type==="PENDING"&&clearTimeout(f.longPressTimerId),i(Xi),n.current(),a())},[a,i]),l=ae(function(){var f=r.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=ae(function(){var p={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:t},v=Ye(window,fR(h),p),m=Ye(window,dR(h),p);n.current=function(){v(),m()}},[l,t,s]),u=ae(function(){var p=t();p.type!=="PENDING"&&Y();var h=p.actions.fluidLift(p.point);i({type:"DRAGGING",actions:h,hasMoved:!1})},[t,i]),d=ae(function(p,h){t().type!=="IDLE"&&Y();var v=setTimeout(u,cR);i({type:"PENDING",point:h,actions:p,longPressTimerId:v}),c()},[c,t,i,u]);He(function(){return a(),function(){n.current();var h=t();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),i(Xi))}},[t,a,i]),He(function(){var p=Ye(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return p},[])}var hR={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function rp(e,r){if(r==null)return!1;var n=!!hR[r.tagName.toLowerCase()];if(n)return!0;var t=r.getAttribute("contenteditable");return t==="true"||t===""?!0:r===e?!1:rp(e,r.parentElement)}function gR(e,r){var n=r.target;return gi(n)?rp(e,n):!1}var vR=function(e){return Gt(e.getBoundingClientRect()).center};function mR(e){return e instanceof Xf(e).Element}var bR=function(){var e="matches";if(typeof document>"u")return e;var r=[e,"msMatchesSelector","webkitMatchesSelector"],n=_t(r,function(t){return t in Element.prototype});return n||e}();function np(e,r){return e==null?null:e[bR](r)?e:np(e.parentElement,r)}function yR(e,r){return e.closest?e.closest(r):np(e,r)}function xR(e){return"["+ur.contextId+'="'+e+'"]'}function SR(e,r){var n=r.target;if(!mR(n))return null;var t=xR(e),i=yR(n,t);return!i||!gi(i)?null:i}function wR(e,r){var n=SR(e,r);return n?n.getAttribute(ur.draggableId):null}function CR(e,r){var n="["+Ao.contextId+'="'+e+'"]',t=yf(document.querySelectorAll(n)),i=_t(t,function(o){return o.getAttribute(Ao.id)===r});return!i||!gi(i)?null:i}function IR(e){e.preventDefault()}function Sn(e){var r=e.expected,n=e.phase,t=e.isLockActive;return e.shouldWarn,!(!t()||r!==n)}function ip(e){var r=e.lockAPI,n=e.store,t=e.registry,i=e.draggableId;if(r.isClaimed())return!1;var o=t.draggable.findById(i);return!(!o||!o.options.isEnabled||!Vf(n.getState(),i))}function RR(e){var r=e.lockAPI,n=e.contextId,t=e.store,i=e.registry,o=e.draggableId,a=e.forceSensorStop,s=e.sourceEvent,l=ip({lockAPI:r,store:t,registry:i,draggableId:o});if(!l)return null;var c=i.draggable.getById(o),u=CR(n,c.descriptor.id);if(!u||s&&!c.options.canDragInteractiveElements&&gR(u,s))return null;var d=r.claim(a||xt),f="PRE_DRAG";function p(){return c.options.shouldRespectForcePress}function h(){return r.isActive(d)}function v(w,D){Sn({expected:w,phase:f,isLockActive:h,shouldWarn:!0})&&t.dispatch(D())}var m=v.bind(null,"DRAGGING");function y(w){function D(){r.release(),f="COMPLETED"}f!=="PRE_DRAG"&&(D(),f!=="PRE_DRAG"&&Y()),t.dispatch(b0(w.liftActionArgs)),f="DRAGGING";function S(T,R){if(R===void 0&&(R={shouldBlockNextClick:!1}),w.cleanup(),R.shouldBlockNextClick){var O=Ye(window,[{eventName:"click",fn:IR,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(O)}D(),t.dispatch(Bf({reason:T}))}return K({isActive:function(){return Sn({expected:"DRAGGING",phase:f,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(R){return S("DROP",R)},cancel:function(R){return S("CANCEL",R)}},w.actions)}function b(w){var D=Gr(function(T){m(function(){return Ff({client:T})})}),S=y({liftActionArgs:{id:o,clientSelection:w,movementMode:"FLUID"},cleanup:function(){return D.cancel()},actions:{move:D}});return K({},S,{move:D})}function I(){var w={moveUp:function(){return m(_0)},moveRight:function(){return m(P0)},moveDown:function(){return m(D0)},moveLeft:function(){return m(k0)}};return y({liftActionArgs:{id:o,clientSelection:vR(u),movementMode:"SNAP"},cleanup:xt,actions:w})}function _(){var w=Sn({expected:"PRE_DRAG",phase:f,isLockActive:h,shouldWarn:!0});w&&r.release()}var P={isActive:function(){return Sn({expected:"PRE_DRAG",phase:f,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:b,snapLift:I,abort:_};return P}var TR=[iR,lR,pR];function _R(e){var r=e.contextId,n=e.store,t=e.registry,i=e.customSensors,o=e.enableDefaultSensors,a=[].concat(o?TR:[],i||[]),s=C.useState(function(){return HI()})[0],l=ae(function(b,I){b.isDragging&&!I.isDragging&&s.tryAbandon()},[s]);He(function(){var b=n.getState(),I=n.subscribe(function(){var _=n.getState();l(b,_),b=_});return I},[s,n,l]),He(function(){return s.tryAbandon},[s.tryAbandon]);for(var c=ae(function(y){return ip({lockAPI:s,registry:t,store:n,draggableId:y})},[s,t,n]),u=ae(function(y,b,I){return RR({lockAPI:s,registry:t,contextId:r,store:n,draggableId:y,forceSensorStop:b,sourceEvent:I&&I.sourceEvent?I.sourceEvent:null})},[r,s,t,n]),d=ae(function(y){return wR(r,y)},[r]),f=ae(function(y){var b=t.draggable.findById(y);return b?b.options:null},[t.draggable]),p=ae(function(){s.isClaimed()&&(s.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Pa()))},[s,n]),h=ae(s.isClaimed,[s]),v=fe(function(){return{canGetLock:c,tryGetLock:u,findClosestDraggableId:d,findOptionsForDraggable:f,tryReleaseLock:p,isLockClaimed:h}},[c,u,d,f,p,h]),m=0;m<a.length;m++)a[m](v)}var DR=function(r){return{onBeforeCapture:r.onBeforeCapture,onBeforeDragStart:r.onBeforeDragStart,onDragStart:r.onDragStart,onDragEnd:r.onDragEnd,onDragUpdate:r.onDragUpdate}};function Rr(e){return e.current||Y(),e.current}function PR(e){var r=e.contextId,n=e.setCallbacks,t=e.sensors,i=e.nonce,o=e.dragHandleUsageInstructions,a=C.useRef(null),s=Qf(e),l=ae(function(){return DR(s.current)},[s]),c=FI(r),u=WI({contextId:r,text:o}),d=EI(r,i),f=ae(function(T){Rr(a).dispatch(T)},[]),p=fe(function(){return Qa({publishWhileDragging:x0,updateDroppableScroll:w0,updateDroppableIsEnabled:C0,updateDroppableIsCombineEnabled:I0,collectionStarting:S0},f)},[f]),h=LI(),v=fe(function(){return uI(h,p)},[h,p]),m=fe(function(){return _I(K({scrollWindow:dI,scrollDroppable:v.scrollDroppable},Qa({move:Ff},f)))},[v.scrollDroppable,f]),y=MI(r),b=fe(function(){return aI({announce:c,autoScroller:m,dimensionMarshal:v,focusMarshal:y,getResponders:l,styleMarshal:d})},[c,m,v,y,l,d]);a.current=b;var I=ae(function(){var T=Rr(a),R=T.getState();R.phase!=="IDLE"&&T.dispatch(Pa())},[]),_=ae(function(){var T=Rr(a).getState();return T.isDragging||T.phase==="DROP_ANIMATING"},[]),P=fe(function(){return{isDragging:_,tryAbort:I}},[_,I]);n(P);var w=ae(function(T){return Vf(Rr(a).getState(),T)},[]),D=ae(function(){return Et(Rr(a).getState())},[]),S=fe(function(){return{marshal:v,focus:y,contextId:r,canLift:w,isMovementAllowed:D,dragHandleUsageInstructionsId:u,registry:h}},[r,v,u,y,w,D,h]);return _R({contextId:r,store:b,registry:h,customSensors:t,enableDefaultSensors:e.enableDefaultSensors!==!1}),C.useEffect(function(){return I},[I]),Q.createElement(vi.Provider,{value:S},Q.createElement(Rw,{context:za,store:b},e.children))}var kR=0;function OR(){return fe(function(){return""+kR++},[])}function ER(e){var r=OR(),n=e.dragHandleUsageInstructions||Nn.dragHandleUsageInstructions;return Q.createElement(lC,null,function(t){return Q.createElement(PR,{nonce:e.nonce,contextId:r,setCallbacks:t,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var op=function(r){return function(n){return r===n}},NR=op("scroll"),MR=op("auto"),hc=function(r,n){return n(r.overflowX)||n(r.overflowY)},AR=function(r){var n=window.getComputedStyle(r),t={overflowX:n.overflowX,overflowY:n.overflowY};return hc(t,NR)||hc(t,MR)},LR=function(){return!1},zR=function e(r){return r==null?null:r===document.body?LR()?r:null:r===document.documentElement?null:AR(r)?r:e(r.parentElement)},Lo=function(e){return{x:e.scrollLeft,y:e.scrollTop}},jR=function e(r){if(!r)return!1;var n=window.getComputedStyle(r);return n.position==="fixed"?!0:e(r.parentElement)},FR=function(e){var r=zR(e),n=jR(e);return{closestScrollable:r,isFixedOnPage:n}},BR=function(e){var r=e.descriptor,n=e.isEnabled,t=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,a=e.client,s=e.page,l=e.closest,c=function(){if(!l)return null;var p=l.scrollSize,h=l.client,v=Hf({scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,height:h.paddingBox.height,width:h.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:h,scrollSize:p,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:v,diff:{value:De,displacement:De}}}}(),u=o==="vertical"?Ia:If,d=lr({page:s,withPlaceholder:null,axis:u,frame:c}),f={descriptor:r,isCombineEnabled:t,isFixedOnPage:i,axis:u,isEnabled:n,client:a,page:s,frame:c,subject:d};return f},$R=function(r,n){var t=Vc(r);if(!n||r!==n)return t;var i=t.paddingBox.top-n.scrollTop,o=t.paddingBox.left-n.scrollLeft,a=i+n.scrollHeight,s=o+n.scrollWidth,l={top:i,right:s,bottom:a,left:o},c=Kc(l,t.border),u=rg({borderBox:c,margin:t.margin,border:t.border,padding:t.padding});return u},GR=function(e){var r=e.ref,n=e.descriptor,t=e.env,i=e.windowScroll,o=e.direction,a=e.isDropDisabled,s=e.isCombineEnabled,l=e.shouldClipSubject,c=t.closestScrollable,u=$R(r,c),d=Fn(u,i),f=function(){if(!c)return null;var h=Vc(c),v={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:h,page:Fn(h,i),scroll:Lo(c),scrollSize:v,shouldClipSubject:l}}(),p=BR({descriptor:n,isEnabled:!a,isCombineEnabled:s,isFixedOnPage:t.isFixedOnPage,direction:o,client:u,page:d,closest:f});return p},WR={passive:!1},HR={passive:!0},gc=function(e){return e.shouldPublishImmediately?WR:HR};function Xn(e){var r=C.useContext(e);return r||Y(),r}var wn=function(r){return r&&r.env.closestScrollable||null};function UR(e){var r=C.useRef(null),n=Xn(vi),t=ja("droppable"),i=n.registry,o=n.marshal,a=Qf(e),s=fe(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),l=C.useRef(s),c=fe(function(){return _e(function(_,P){r.current||Y();var w={x:_,y:P};o.updateDroppableScroll(s.id,w)})},[s.id,o]),u=ae(function(){var _=r.current;return!_||!_.env.closestScrollable?De:Lo(_.env.closestScrollable)},[]),d=ae(function(){var _=u();c(_.x,_.y)},[u,c]),f=fe(function(){return Gr(d)},[d]),p=ae(function(){var _=r.current,P=wn(_);_&&P||Y();var w=_.scrollOptions;if(w.shouldPublishImmediately){d();return}f()},[f,d]),h=ae(function(_,P){r.current&&Y();var w=a.current,D=w.getDroppableRef();D||Y();var S=FR(D),T={ref:D,descriptor:s,env:S,scrollOptions:P};r.current=T;var R=GR({ref:D,descriptor:s,env:S,windowScroll:_,direction:w.direction,isDropDisabled:w.isDropDisabled,isCombineEnabled:w.isCombineEnabled,shouldClipSubject:!w.ignoreContainerClipping}),O=S.closestScrollable;return O&&(O.setAttribute(uc.contextId,n.contextId),O.addEventListener("scroll",p,gc(T.scrollOptions))),R},[n.contextId,s,p,a]),v=ae(function(){var _=r.current,P=wn(_);return _&&P||Y(),Lo(P)},[]),m=ae(function(){var _=r.current;_||Y();var P=wn(_);r.current=null,P&&(f.cancel(),P.removeAttribute(uc.contextId),P.removeEventListener("scroll",p,gc(_.scrollOptions)))},[p,f]),y=ae(function(_){var P=r.current;P||Y();var w=wn(P);w||Y(),w.scrollTop+=_.y,w.scrollLeft+=_.x},[]),b=fe(function(){return{getDimensionAndWatchScroll:h,getScrollWhileDragging:v,dragStopped:m,scroll:y}},[m,h,v,y]),I=fe(function(){return{uniqueId:t,descriptor:s,callbacks:b}},[b,s,t]);He(function(){return l.current=I.descriptor,i.droppable.register(I),function(){r.current&&m(),i.droppable.unregister(I)}},[b,s,m,I,o,i.droppable]),He(function(){r.current&&o.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),He(function(){r.current&&o.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}function Qi(){}var vc={width:0,height:0,margin:hC},qR=function(r){var n=r.isAnimatingOpenOnMount,t=r.placeholder,i=r.animate;return n||i==="close"?vc:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin}},VR=function(r){var n=r.isAnimatingOpenOnMount,t=r.placeholder,i=r.animate,o=qR({isAnimatingOpenOnMount:n,placeholder:t,animate:i});return{display:t.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:i!=="none"?$r.placeholder:null}};function KR(e){var r=C.useRef(null),n=ae(function(){r.current&&(clearTimeout(r.current),r.current=null)},[]),t=e.animate,i=e.onTransitionEnd,o=e.onClose,a=e.contextId,s=C.useState(e.animate==="open"),l=s[0],c=s[1];C.useEffect(function(){return l?t!=="open"?(n(),c(!1),Qi):r.current?Qi:(r.current=setTimeout(function(){r.current=null,c(!1)}),n):Qi},[t,l,n]);var u=ae(function(f){f.propertyName==="height"&&(i(),t==="close"&&o())},[t,o,i]),d=VR({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return Q.createElement(e.placeholder.tagName,{style:d,"data-rbd-placeholder-context-id":a,onTransitionEnd:u,ref:e.innerRef})}var YR=Q.memo(KR),Ba=Q.createContext(null),JR=function(e){ei(r,e);function r(){for(var t,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=e.call.apply(e,[this].concat(o))||this,t.state={isVisible:!!t.props.on,data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){t.state.animate==="close"&&t.setState({isVisible:!1})},t}r.getDerivedStateFromProps=function(i,o){return i.shouldAnimate?i.on?{isVisible:!0,data:i.on,animate:"open"}:o.isVisible?{isVisible:!0,data:o.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!i.on,data:i.on,animate:"none"}};var n=r.prototype;return n.render=function(){if(!this.state.isVisible)return null;var i={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(i)},r}(Q.PureComponent),mc={dragging:5e3,dropAnimating:4500},XR=function(r,n){return n?$r.drop(n.duration):r?$r.snap:$r.fluid},QR=function(r,n){return r?n?Xr.opacity.drop:Xr.opacity.combining:null},ZR=function(r){return r.forceShouldAnimate!=null?r.forceShouldAnimate:r.mode==="SNAP"};function eT(e){var r=e.dimension,n=r.client,t=e.offset,i=e.combineWith,o=e.dropping,a=!!i,s=ZR(e),l=!!o,c=l?No.drop(t,a):No.moveTo(t),u={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:XR(s,o),transform:c,opacity:QR(a,l),zIndex:l?mc.dropAnimating:mc.dragging,pointerEvents:"none"};return u}function tT(e){return{transform:No.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function rT(e){return e.type==="DRAGGING"?eT(e):tT(e)}function nT(e,r,n){n===void 0&&(n=De);var t=window.getComputedStyle(r),i=r.getBoundingClientRect(),o=ng(i,t),a=Fn(o,n),s={client:o,tagName:r.tagName.toLowerCase(),display:t.display},l={x:o.marginBox.width,y:o.marginBox.height},c={descriptor:e,placeholder:s,displaceBy:l,client:o,page:a};return c}function iT(e){var r=ja("draggable"),n=e.descriptor,t=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,a=e.shouldRespectForcePress,s=e.isEnabled,l=fe(function(){return{canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:s}},[o,s,a]),c=ae(function(p){var h=i();return h||Y(),nT(n,h,p)},[n,i]),u=fe(function(){return{uniqueId:r,descriptor:n,options:l,getDimension:c}},[n,c,l,r]),d=C.useRef(u),f=C.useRef(!0);He(function(){return t.draggable.register(d.current),function(){return t.draggable.unregister(d.current)}},[t.draggable]),He(function(){if(f.current){f.current=!1;return}var p=d.current;d.current=u,t.draggable.update(u,p)},[u,t.draggable])}function oT(e){e.preventDefault()}function aT(e){var r=C.useRef(null),n=ae(function(T){r.current=T},[]),t=ae(function(){return r.current},[]),i=Xn(vi),o=i.contextId,a=i.dragHandleUsageInstructionsId,s=i.registry,l=Xn(Ba),c=l.type,u=l.droppableId,d=fe(function(){return{id:e.draggableId,index:e.index,type:c,droppableId:u}},[e.draggableId,e.index,c,u]),f=e.children,p=e.draggableId,h=e.isEnabled,v=e.shouldRespectForcePress,m=e.canDragInteractiveElements,y=e.isClone,b=e.mapped,I=e.dropAnimationFinished;if(!y){var _=fe(function(){return{descriptor:d,registry:s,getDraggableRef:t,canDragInteractiveElements:m,shouldRespectForcePress:v,isEnabled:h}},[d,s,t,m,v,h]);iT(_)}var P=fe(function(){return h?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":p,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:oT}:null},[o,a,p,h]),w=ae(function(T){b.type==="DRAGGING"&&b.dropping&&T.propertyName==="transform"&&I()},[I,b]),D=fe(function(){var T=rT(b),R=b.type==="DRAGGING"&&b.dropping?w:null,O={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":p,style:T,onTransitionEnd:R},dragHandleProps:P};return O},[o,P,p,b,w,n]),S=fe(function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}},[d.droppableId,d.id,d.index,d.type]);return f(D,b.snapshot,S)}var ap=function(e,r){return e===r},sp=function(e){var r=e.combine,n=e.destination;return n?n.droppableId:r?r.droppableId:null},sT=function(r){return r.combine?r.combine.draggableId:null},lT=function(r){return r.at&&r.at.type==="COMBINE"?r.at.combine.draggableId:null};function cT(){var e=_e(function(i,o){return{x:i,y:o}}),r=_e(function(i,o,a,s,l){return{isDragging:!0,isClone:o,isDropAnimating:!!l,dropAnimation:l,mode:i,draggingOver:a,combineWith:s,combineTargetFor:null}}),n=_e(function(i,o,a,s,l,c,u){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:c,mode:o,offset:i,dimension:a,forceShouldAnimate:u,snapshot:r(o,s,l,c,null)}}}),t=function(o,a){if(o.isDragging){if(o.critical.draggable.id!==a.draggableId)return null;var s=o.current.client.offset,l=o.dimensions.draggables[a.draggableId],c=We(o.impact),u=lT(o.impact),d=o.forceShouldAnimate;return n(e(s.x,s.y),o.movementMode,l,a.isClone,c,u,d)}if(o.phase==="DROP_ANIMATING"){var f=o.completed;if(f.result.draggableId!==a.draggableId)return null;var p=a.isClone,h=o.dimensions.draggables[a.draggableId],v=f.result,m=v.mode,y=sp(v),b=sT(v),I=o.dropDuration,_={duration:I,curve:Oa.drop,moveTo:o.newHomeClientOffset,opacity:b?Xr.opacity.drop:null,scale:b?Xr.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:h,dropping:_,draggingOver:y,combineWith:b,mode:m,forceShouldAnimate:null,snapshot:r(m,p,y,b,_)}}}return null};return t}function lp(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var uT={mapped:{type:"SECONDARY",offset:De,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:lp(null)}};function dT(){var e=_e(function(a,s){return{x:a,y:s}}),r=_e(lp),n=_e(function(a,s,l){return s===void 0&&(s=null),{mapped:{type:"SECONDARY",offset:a,combineTargetFor:s,shouldAnimateDisplacement:l,snapshot:r(s)}}}),t=function(s){return s?n(De,s,!0):null},i=function(s,l,c,u){var d=c.displaced.visible[s],f=!!(u.inVirtualList&&u.effected[s]),p=fi(c),h=p&&p.draggableId===s?l:null;if(!d){if(!f)return t(h);if(c.displaced.invisible[s])return null;var v=hr(u.displacedBy.point),m=e(v.x,v.y);return n(m,h,!0)}if(f)return t(h);var y=c.displacedBy.point,b=e(y.x,y.y);return n(b,h,d.shouldAnimate)},o=function(s,l){if(s.isDragging)return s.critical.draggable.id===l.draggableId?null:i(l.draggableId,s.critical.draggable.id,s.impact,s.afterCritical);if(s.phase==="DROP_ANIMATING"){var c=s.completed;return c.result.draggableId===l.draggableId?null:i(l.draggableId,c.result.draggableId,c.impact,c.afterCritical)}return null};return o}var fT=function(){var r=cT(),n=dT(),t=function(o,a){return r(o,a)||n(o,a)||uT};return t},pT={dropAnimationFinished:$f},hT=hf(fT,pT,null,{context:za,pure:!0,areStatePropsEqual:ap})(aT);function cp(e){var r=Xn(Ba),n=r.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:Q.createElement(hT,e)}function gT(e){var r=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,t=!!e.shouldRespectForcePress;return Q.createElement(cp,K({},e,{isClone:!1,isEnabled:r,canDragInteractiveElements:n,shouldRespectForcePress:t}))}function vT(e){var r=C.useContext(vi);r||Y();var n=r.contextId,t=r.isMovementAllowed,i=C.useRef(null),o=C.useRef(null),a=e.children,s=e.droppableId,l=e.type,c=e.mode,u=e.direction,d=e.ignoreContainerClipping,f=e.isDropDisabled,p=e.isCombineEnabled,h=e.snapshot,v=e.useClone,m=e.updateViewportMaxScroll,y=e.getContainerForClone,b=ae(function(){return i.current},[]),I=ae(function(O){i.current=O},[]);ae(function(){return o.current},[]);var _=ae(function(O){o.current=O},[]),P=ae(function(){t()&&m({maxScroll:qf()})},[t,m]);UR({droppableId:s,type:l,mode:c,direction:u,isDropDisabled:f,isCombineEnabled:p,ignoreContainerClipping:d,getDroppableRef:b});var w=Q.createElement(JR,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(O){var L=O.onClose,M=O.data,H=O.animate;return Q.createElement(YR,{placeholder:M,onClose:L,innerRef:_,animate:H,contextId:n,onTransitionEnd:P})}),D=fe(function(){return{innerRef:I,placeholder:w,droppableProps:{"data-rbd-droppable-id":s,"data-rbd-droppable-context-id":n}}},[n,s,w,I]),S=v?v.dragging.draggableId:null,T=fe(function(){return{droppableId:s,type:l,isUsingCloneFor:S}},[s,S,l]);function R(){if(!v)return null;var O=v.dragging,L=v.render,M=Q.createElement(cp,{draggableId:O.draggableId,index:O.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(H,E){return L(H,E,O)});return Gh.createPortal(M,y())}return Q.createElement(Ba.Provider,{value:T},a(D,h),R())}var Zi=function(r,n){return r===n.droppable.type},bc=function(r,n){return n.draggables[r.draggable.id]},mT=function(){var r={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=K({},r,{shouldAnimatePlaceholder:!1}),t=_e(function(a){return{draggableId:a.id,type:a.type,source:{index:a.index,droppableId:a.droppableId}}}),i=_e(function(a,s,l,c,u,d){var f=u.descriptor.id,p=u.descriptor.droppableId===a;if(p){var h=d?{render:d,dragging:t(u.descriptor)}:null,v={isDraggingOver:l,draggingOverWith:l?f:null,draggingFromThisWith:f,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!1,snapshot:v,useClone:h}}if(!s)return n;if(!c)return r;var m={isDraggingOver:l,draggingOverWith:f,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!0,snapshot:m,useClone:null}}),o=function(s,l){var c=l.droppableId,u=l.type,d=!l.isDropDisabled,f=l.renderClone;if(s.isDragging){var p=s.critical;if(!Zi(u,p))return n;var h=bc(p,s.dimensions),v=We(s.impact)===c;return i(c,d,v,v,h,f)}if(s.phase==="DROP_ANIMATING"){var m=s.completed;if(!Zi(u,m.critical))return n;var y=bc(m.critical,s.dimensions);return i(c,d,sp(m.result)===c,We(m.impact)===c,y,f)}if(s.phase==="IDLE"&&s.completed&&!s.shouldFlush){var b=s.completed;if(!Zi(u,b.critical))return n;var I=We(b.impact)===c,_=!!(b.impact.at&&b.impact.at.type==="COMBINE"),P=b.critical.droppable.id===c;return I?_?r:n:P?r:n}return n};return o},bT={updateViewportMaxScroll:T0};function yT(){return document.body||Y(),document.body}var xT={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:yT},up=hf(mT,bT,null,{context:za,pure:!0,areStatePropsEqual:ap})(vT);up.defaultProps=xT;const ST=e=>{const r=e.replace("#","");if(!/^([A-Fa-f0-9]{3}){1,2}$/.test(r))return{r:0,g:0,b:0};const n=r.length===3?r.split("").map(t=>t+t).join(""):r;return{r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16)}};function wT({src:e,color:r,size:n=24,...t}){const[i,o]=C.useState("");return C.useEffect(()=>{const a=new Image;return a.crossOrigin="anonymous",a.onload=()=>{const s=document.createElement("canvas");s.width=a.width,s.height=a.height;const l=s.getContext("2d");l.drawImage(a,0,0);const c=l.getImageData(0,0,s.width,s.height),{data:u}=c,d=ST(r);for(let f=0;f<u.length;f+=4)if(u[f+3]>0){const p=u[f+3]/255;u[f]=d.r*p,u[f+1]=d.g*p,u[f+2]=d.b*p}l.putImageData(c,0,0),o(s.toDataURL("image/png"))},a.src=e,()=>{a.onload=null}},[e,r]),g.jsx(re,{component:"img",src:i||e,sx:{width:n,height:n,display:"block",opacity:i?1:.5,transition:"opacity 0.2s"},...t})}const zo=375,dp=667,$a=56,CT=Xe(Mr)(({theme:e})=>({width:zo,height:dp,display:"flex",flexDirection:"column",overflow:"hidden",border:`1px solid ${e.palette.divider}`,borderRadius:32,position:"relative"})),yc=Xe(re)(({theme:e})=>({height:$a,borderTop:`1px solid ${e.palette.divider}`,display:"flex",backgroundColor:e.palette.background.paper})),xc=Xe(re)(({theme:e,active:r})=>({flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",position:"relative",color:r?e.palette.primary.main:e.palette.text.secondary,"&:hover":{backgroundColor:e.palette.action.hover}})),IT=Xe(re)(({theme:e,left:r})=>({position:"absolute",bottom:-$a,left:r,transform:"translateX(-50%)",display:"flex",alignItems:"center",backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadius,padding:`${e.spacing(.5)} ${e.spacing(1)}`,boxShadow:e.shadows[2],zIndex:1})),Cn=Xe(je)(({theme:e})=>({padding:e.spacing(.5),"&:not(:last-child)":{marginRight:e.spacing(.5)}})),RT=Xe(re)({flexGrow:1,height:"100%",position:"relative",overflow:"hidden"}),TT=Xe(re)(({theme:e})=>({width:400,paddingLeft:e.spacing(3),backgroundColor:e.palette.background.default,height:dp,overflowY:"auto"}));function _T(){const{t:e,locale:r}=Ee(),{blocklet:n}=$t(),t=ot(),i=Zr(t.breakpoints.down("md")),{state:o,getNavigation:a,updateNavigationItem:s,addNavigationItem:l,delNavigationItem:c,updateNavigationTree:u}=eu(),{inService:d}=Tc(),f=C.useRef(null),p=C.useRef(null),h=C.useRef(null),v=n.environments.find(q=>q.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),m=n?.settings?.theme?.light?.palette?.primary?.main,[y,b]=C.useState(0),[I,_]=C.useState(!1),P=C.useRef(0),w=C.useRef(null),D=a("bottomNavigation"),S=D.length>0,T=D.length<5,[R,O]=C.useState(D.length>0?D[0]:null),L=D.findIndex(q=>q.id===R?.id),M=oe((q,ne)=>{const ie=q?.[ne];return Hc(ie)?ie[r]||ie.en:ie}),H=oe(q=>{q.id!==R?.id&&O(q)}),E=oe(q=>{w.current=q,h.current?.add({},(ne,ie)=>{const ue=l(ie,w.current);O(ue),ne()})}),B=oe(()=>{_(!0)}),$=oe(()=>{h.current?.edit(R,(q,ne)=>{s(ne),q()})}),{run:U}=_c(()=>{p.current?.submit()},{wait:300}),J=oe(U),ee=oe(q=>{if(q?.startsWith("/"))try{const ne=d?window.location.origin:v?.value;return new URL(q,ne).href}catch{console.error("Failed to resolve url: ",q)}return q},[v?.value,d]),X=oe(q=>{if(!q.destination)return;const ne=Array.from(D),[ie]=ne.splice(q.source.index,1);ne.splice(q.destination.index,0,ie),u(ne)}),Z=oe(()=>{const q=D.find(ie=>ie.id===R?.id);if(!q)return"";let ne=M(q,"link")||"/";if(ne.startsWith("/"))try{ne=ee(Re(q.__base||"/",ne))}catch(ie){return console.error("Failed to get active tab link",ie),""}return ne});return C.useEffect(()=>{R&&!i&&(p.current?.resetImmediate(),p.current?.edit(R,q=>{s(q)}))},[R,s,i]),C.useEffect(()=>{const q=D.findIndex(N=>N.id===R?.id);if(q===-1||!f.current)return b(P.current);const ie=zo/D.length*(q+.5),ue=f.current.getBoundingClientRect().width,G=ue/2+16,W=zo-(ue/2+16),k=Math.min(Math.max(ie,G),W);return P.current=k,b(k)},[R,D,P]),C.useEffect(()=>{D.length>0&&!R&&O(D[0])},[D,R]),g.jsx(re,{sx:{display:"flex",justifyContent:"center"},children:g.jsxs(re,{sx:{position:"relative",display:"inline-flex",alignItems:"flex-start",margin:"4px auto 0"},children:[g.jsxs(CT,{elevation:2,children:[g.jsx(RT,{children:S&&g.jsx(Ig,{url:Z(),width:"100%",height:"100%",id:"tabbar-preview",className:"tabbar-preview-iframe",display:"block",position:"relative",styles:{border:"none",background:"#fff"}})}),g.jsxs(re,{sx:{height:$a,overflowY:"auto",flexShrink:0},children:[S&&g.jsx(ER,{onDragEnd:X,children:g.jsx(up,{droppableId:"tabbar",direction:"horizontal",children:q=>g.jsxs(yc,{ref:q.innerRef,...q.droppableProps,children:[D.map((ne,ie)=>g.jsx(gT,{draggableId:ne.id,index:ie,children:(ue,G)=>g.jsxs(xc,{className:"tab-item",ref:ue.innerRef,...ue.draggableProps,...ue.dragHandleProps,active:ne.id===R?.id,onClick:W=>H(ne,W),sx:{color:ne.id===R?.id?m:"text.secondary",opacity:G.isDragging?.5:1},children:[g.jsx(wT,{src:ee(ne.icon),color:ne.id===R?.id?m:t.palette.text.secondary,size:24}),g.jsx(de,{variant:"caption",children:M(ne,"title")})]})},ne.id)),q.placeholder]})})}),!S&&g.jsx(yc,{children:g.jsx(xc,{className:"tab-item",onClick:()=>E(0),children:g.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})})})]})]}),!i&&S&&g.jsx(TT,{children:R&&g.jsx(ga,{ref:p,sx:{p:0},section:"bottomNavigation",components:o.components,rawNavigations:o.rawNavigation,onChange:J})}),g.jsx(Nc,{in:R!==null,children:g.jsxs(IT,{ref:f,left:y,children:[g.jsx(Cn,{size:"small",disabled:!T,onClick:()=>E(L),children:g.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})}),i&&g.jsx(Cn,{size:"small",onClick:()=>$(),children:g.jsx(nt,{icon:"mdi:edit-box-outline",size:28})}),g.jsx(Cn,{size:"small",onClick:()=>B(),children:g.jsx(nt,{icon:"mdi:delete-outline",size:28})}),g.jsx(Cn,{size:"small",disabled:!T,onClick:()=>E(L+1),children:g.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})})]})}),g.jsx(va,{ref:h,section:"bottomNavigation",components:o.components,rawNavigations:o.rawNavigation}),g.jsx(Uc,{confirmButton:{text:e("common.confirm"),props:{variant:"contained",color:"error"}},cancelButton:{text:e("common.cancel"),props:{color:"primary"}},open:I,title:e("navigation.action.delTabBarTitle"),onConfirm:()=>{_(!1),c(R.id),D.length>1?L>0?O(D[L-1]):O(D[L+1]):O(null)},onCancel:()=>{_(!1)},children:g.jsx("p",{children:e("navigation.action.delTabBarDesc")})})]})})}const DT={login:et,logout:et,switch:et,switchDid:et,switchProfile:et,switchPassport:et,useDid:()=>({walletDid:"abcdefghijklmnopqrstuvwxyz"}),useOAuth:()=>({logoutOAuth:et,bindOAuth:et,configs:{},switchOAuthPassport:et})},Tr={header:"Header",footer:"Footer",bottom:"Footer Link",social:"Footer Social",dashboard:"Dashboard",sessionManager:"Session Blocklet",userCenter:"User Center",bottomNavigation:"Tab Bar"};function PT(){const{t:e}=Ee(),{blocklet:r}=$t(),n=C.useRef(null),{roles:t}=Yc(),i=Zr(R=>R.breakpoints.down("md")),o=Bt({saveLoading:!1,resetLoading:!1,showResetConfirm:!1,mockRole:"owner"}),{state:a,navigation:s,getNavigation:l,saveNavigationList:c,resetNavigation:u,updateActiveSection:d,updateNavigationTree:f,updateNavigationItem:p,delNavigationItem:h,addNavigationItem:v}=eu(),m=a.activeSection==="bottomNavigation",y=C.useCallback(R=>{n.current.add({parent:R},(O,L)=>{v(L),O()})},[v]),b=C.useCallback((R,O={})=>{switch(R){case"edit":n.current.edit(O,(L,M)=>{p(M),L()});break;case"toggle":p({id:O.id,visible:!O.visible});break;case"del":h(O.id);break}},[h,p]),I=C.useCallback(async()=>{try{o.saveLoading=!0,await c(a.rawNavigation),Mt.success(e("common.succeeded"))}catch(R){Mt.error(g.jsxs(re,{children:[g.jsx(de,{variant:"subtitle2",children:e("navigation.actionFailed")}),g.jsx(de,{variant:"body1",children:Ka(R)||R.error})]}))}finally{o.saveLoading=!1}},[a.rawNavigation,o,c,e]),_=C.useCallback(async()=>{try{o.resetLoading=!0,await u(a.activeSection),Mt.success(e("navigation.action.resetSuccessful"),{variant:"success"})}catch(R){Mt.error(g.jsxs(re,{children:[g.jsx(de,{variant:"subtitle2",children:e("navigation.actionFailed")}),g.jsx(de,{variant:"body1",children:Ka(R)||R.error})]}))}finally{o.resetLoading=!1}},[o,u,a.activeSection,e]),P=C.useMemo(()=>({session:{...DT,user:{did:r.appDid,fullName:"Preview User",role:o.mockRole,isPreviewUser:!0}}}),[r.appDid,o.mockRole]),w=l(a.activeSection),D=Te(()=>a.activeSection!=="bottomNavigation"?!1:w.length>=5,[a.activeSection,w.length]),S=g.jsxs(g.Fragment,{children:[g.jsx(Mr,{variant:"outlined",sx:{display:"flex",height:660,overflow:"hidden",bgcolor:"background.default"},children:g.jsx(Mr,{elevation:0,sx:{flex:1,overflow:"auto",bgcolor:"background.default"},children:g.jsx(kd,{treeData:w,setTreeData:f,renderActions:({data:R,className:O})=>g.jsx(Ad,{data:R,className:O,section:a.activeSection,add:(...L)=>y(...L),del:(...L)=>b("del",...L),edit:(...L)=>b("edit",...L),toggle:(...L)=>b("toggle",...L)})})})}),g.jsxs(Ya,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:3},children:[g.jsx(de,{variant:"h6",component:"div",sx:{flexGrow:1},children:e("common.preview")}),g.jsxs(kc,{sx:{m:1,minWidth:120},size:"small",children:[g.jsx(Wh,{children:e("common.role")}),g.jsx(Ja,{value:o.mockRole,label:"Role",onChange:R=>{o.mockRole=R.target.value},children:t.map(R=>g.jsx(zn,{value:R.name,children:R.title},R.name))})]})]}),g.jsx(Mr,{variant:"outlined",children:g.jsx(ri.Provider,{value:P,children:g.jsx(xw,{navigation:s})})})]}),T=g.jsx(_T,{});return g.jsxs(g.Fragment,{children:[i&&g.jsx(Ja,{fullWidth:!0,size:"small",value:a.activeSection,onChange:R=>d(R.target.value),children:Object.keys(Tr).map(R=>g.jsxs(zn,{value:R,children:[Tr[R],` (${l(R).length})`]}))}),!i&&g.jsx(yi,{variant:"outlined",children:Object.keys(Tr).map(R=>g.jsxs(Ct,{variant:a.activeSection===R?"contained":void 0,onClick:()=>d(R),children:[Tr[R],` (${l(R).length})`]},R))}),g.jsxs(Ya,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:2},children:[g.jsx(de,{variant:"h6",component:"div",sx:{flexGrow:1},children:e("common.config")}),g.jsx(yi,{variant:"outlined",children:g.jsx(es,{size:"small",variant:"outlined",color:"error",startIcon:g.jsx(ye,{icon:"system-uicons:reset"}),sx:{mr:2},loading:o.resetLoading,loadingPosition:"start",onClick:()=>{o.showResetConfirm=!0},children:e("navigation.action.reset")})}),g.jsxs(yi,{variant:"outlined",children:[a.activeSection!=="bottomNavigation"&&g.jsx(Ct,{size:"small",variant:"outlined",disabled:D,startIcon:g.jsx(ye,{icon:"mdi:plus"}),onClick:()=>y(),children:e("navigation.action.new")}),g.jsx(es,{size:"small",variant:"contained",startIcon:g.jsx(ye,{icon:"mdi:content-save"}),loading:o.saveLoading,loadingPosition:"start",onClick:I,children:e("common.save")})]})]}),m?T:S,g.jsx(va,{ref:n,section:a.activeSection,components:a.components,rawNavigations:a.rawNavigation}),g.jsx(Uc,{confirmButton:{text:e("common.confirm"),props:{variant:"contained",color:"error"}},cancelButton:{text:e("common.cancel"),props:{color:"primary"}},open:o.showResetConfirm,title:e("navigation.action.restConfirmTitle",{section:Tr[a.activeSection]}),onConfirm:async()=>{await _(),o.showResetConfirm=!1},onCancel:()=>{o.showResetConfirm=!1},children:g.jsx("p",{children:e("navigation.action.restConfirmDesc")})})]})}function D_(){return g.jsx(Wg,{children:g.jsx(PT,{})})}export{D_ as default};