admin-ui-starter-kit 0.6.1 → 0.6.4

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 (498) hide show
  1. package/.agents/skills/component-library-rules/references/components/services__hooks.md +6 -1
  2. package/dist/_shared/{auth-B_KVUjsB.cjs → auth-DdezEtKK.cjs} +2 -2
  3. package/dist/_shared/{auth-B_KVUjsB.cjs.map → auth-DdezEtKK.cjs.map} +1 -1
  4. package/dist/_shared/{auth-C_TgyzDl.js → auth-e7yab9pK.js} +2 -2
  5. package/dist/_shared/{auth-C_TgyzDl.js.map → auth-e7yab9pK.js.map} +1 -1
  6. package/dist/_shared/{buttons-C8jy-jMd.cjs → buttons-Bek9F7qK.cjs} +2 -2
  7. package/dist/_shared/{buttons-C8jy-jMd.cjs.map → buttons-Bek9F7qK.cjs.map} +1 -1
  8. package/dist/_shared/{buttons-MxvdokeK.js → buttons-DcynMPnE.js} +2 -2
  9. package/dist/_shared/{buttons-MxvdokeK.js.map → buttons-DcynMPnE.js.map} +1 -1
  10. package/dist/_shared/cards-CbbHly7W.cjs +2 -0
  11. package/dist/_shared/cards-CbbHly7W.cjs.map +1 -0
  12. package/dist/_shared/{cards-CtBoSZG9.js → cards-RZxRLx3f.js} +6 -6
  13. package/dist/_shared/cards-RZxRLx3f.js.map +1 -0
  14. package/dist/_shared/{comments-DGBxF9fD.js → comments-BJqgvSFY.js} +2 -2
  15. package/dist/_shared/{comments-DGBxF9fD.js.map → comments-BJqgvSFY.js.map} +1 -1
  16. package/dist/_shared/{comments-C8iXy9XO.cjs → comments-BjPciQfo.cjs} +2 -2
  17. package/dist/_shared/{comments-C8iXy9XO.cjs.map → comments-BjPciQfo.cjs.map} +1 -1
  18. package/dist/_shared/{data-display-C_44_V-W.cjs → data-display-C21skrV4.cjs} +2 -2
  19. package/dist/_shared/{data-display-C_44_V-W.cjs.map → data-display-C21skrV4.cjs.map} +1 -1
  20. package/dist/_shared/{data-display-CRFaMkxT.js → data-display-C5-1dZua.js} +71 -71
  21. package/dist/_shared/{data-display-CRFaMkxT.js.map → data-display-C5-1dZua.js.map} +1 -1
  22. package/dist/_shared/{forms-qnwoUqxf.js → forms-BoquZE2Y.js} +3 -3
  23. package/dist/_shared/{forms-qnwoUqxf.js.map → forms-BoquZE2Y.js.map} +1 -1
  24. package/dist/_shared/{forms-rmKcy5uO.cjs → forms-CzrEYejY.cjs} +2 -2
  25. package/dist/_shared/{forms-rmKcy5uO.cjs.map → forms-CzrEYejY.cjs.map} +1 -1
  26. package/dist/_shared/{overlays-CdtMAkKG.js → overlays-DW8OIK5R.js} +134 -47
  27. package/dist/_shared/overlays-DW8OIK5R.js.map +1 -0
  28. package/dist/_shared/overlays-Du65iCkx.cjs +2 -0
  29. package/dist/_shared/overlays-Du65iCkx.cjs.map +1 -0
  30. package/dist/_shared/{page-C6EzwvTz.cjs → page-D8UMXREv.cjs} +2 -2
  31. package/dist/_shared/{page-C6EzwvTz.cjs.map → page-D8UMXREv.cjs.map} +1 -1
  32. package/dist/_shared/{page-DCW1eWCJ.js → page-D9LNsHMN.js} +2 -2
  33. package/dist/_shared/{page-DCW1eWCJ.js.map → page-D9LNsHMN.js.map} +1 -1
  34. package/dist/_shared/{settings-QOBrbgdN.js → settings-BeZOIEJB.js} +2 -2
  35. package/dist/_shared/{settings-QOBrbgdN.js.map → settings-BeZOIEJB.js.map} +1 -1
  36. package/dist/_shared/{settings-DbAyxMrX.cjs → settings-DI-K34bW.cjs} +2 -2
  37. package/dist/_shared/{settings-DbAyxMrX.cjs.map → settings-DI-K34bW.cjs.map} +1 -1
  38. package/dist/_shared/{table-CUA_A-oO.js → table-B_pqCQxC.js} +3 -3
  39. package/dist/_shared/table-B_pqCQxC.js.map +1 -0
  40. package/dist/_shared/table-CGVOXtdv.cjs +2 -0
  41. package/dist/_shared/table-CGVOXtdv.cjs.map +1 -0
  42. package/dist/components/base/buttons/index.cjs +1 -1
  43. package/dist/components/base/buttons/index.js +1 -1
  44. package/dist/components/base/cards/index.cjs +1 -1
  45. package/dist/components/base/cards/index.js +1 -1
  46. package/dist/components/base/forms/index.cjs +1 -1
  47. package/dist/components/base/forms/index.js +1 -1
  48. package/dist/components/base/table/index.cjs +1 -1
  49. package/dist/components/base/table/index.js +1 -1
  50. package/dist/components/composed/admin/index.cjs +1 -1
  51. package/dist/components/composed/admin/index.js +2 -2
  52. package/dist/components/composed/ai/index.cjs +1 -1
  53. package/dist/components/composed/ai/index.js +2 -2
  54. package/dist/components/composed/analytics/index.cjs +1 -1
  55. package/dist/components/composed/analytics/index.js +1 -1
  56. package/dist/components/composed/cards/index.cjs +1 -1
  57. package/dist/components/composed/cards/index.js +2 -2
  58. package/dist/components/composed/commerce/index.cjs +1 -1
  59. package/dist/components/composed/commerce/index.js +2 -2
  60. package/dist/components/composed/dark-surfaces/index.cjs +1 -1
  61. package/dist/components/composed/dark-surfaces/index.js +1 -1
  62. package/dist/components/composed/data-display/index.cjs +1 -1
  63. package/dist/components/composed/data-display/index.js +1 -1
  64. package/dist/components/composed/data-display/metadata/metadata-list.d.ts.map +1 -1
  65. package/dist/components/composed/navigation/index.cjs +1 -1
  66. package/dist/components/composed/navigation/index.js +1 -1
  67. package/dist/components/composed/timelines/index.cjs +1 -1
  68. package/dist/components/composed/timelines/index.js +1 -1
  69. package/dist/components/features/activities/index.cjs +1 -1
  70. package/dist/components/features/activities/index.js +1 -1
  71. package/dist/components/features/card/index.cjs +1 -1
  72. package/dist/components/features/card/index.js +2 -2
  73. package/dist/components/features/comments/index.cjs +1 -1
  74. package/dist/components/features/comments/index.js +1 -1
  75. package/dist/components/features/event-log/index.cjs +1 -1
  76. package/dist/components/features/event-log/index.js +2 -2
  77. package/dist/components/features/media-library/index.cjs +1 -1
  78. package/dist/components/features/media-library/index.js +2 -2
  79. package/dist/components/features/overlays/hooks/index.d.ts +1 -0
  80. package/dist/components/features/overlays/hooks/index.d.ts.map +1 -1
  81. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +33 -0
  82. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts.map +1 -0
  83. package/dist/components/features/overlays/index.cjs +1 -1
  84. package/dist/components/features/overlays/index.d.ts +1 -1
  85. package/dist/components/features/overlays/index.d.ts.map +1 -1
  86. package/dist/components/features/overlays/index.js +2 -2
  87. package/dist/components/features/products/index.cjs +1 -1
  88. package/dist/components/features/products/index.js +4 -4
  89. package/dist/components/features/resource/index.cjs +1 -1
  90. package/dist/components/features/resource/index.js +2 -2
  91. package/dist/components/features/schema-form/index.cjs +1 -1
  92. package/dist/components/features/schema-form/index.js +2 -2
  93. package/dist/components/layout/auth/index.cjs +1 -1
  94. package/dist/components/layout/auth/index.js +1 -1
  95. package/dist/components/layout/index.cjs +1 -1
  96. package/dist/components/layout/index.js +3 -3
  97. package/dist/components/layout/page/index.cjs +1 -1
  98. package/dist/components/layout/page/index.js +1 -1
  99. package/dist/components/layout/settings/index.cjs +1 -1
  100. package/dist/components/layout/settings/index.js +1 -1
  101. package/dist/services/actions/index.cjs +1 -1
  102. package/dist/services/actions/index.js +1 -1
  103. package/dist/showcase/assets/{AreaChart-CGkuyNyy.js → AreaChart-Y0ZwblHU.js} +1 -1
  104. package/dist/showcase/assets/{CompositeItem-DAQ048AO.js → CompositeItem-BIY_Cp7P.js} +1 -1
  105. package/dist/showcase/assets/{CompositeRoot-8-OuCMMq.js → CompositeRoot-DSPvBRQr.js} +1 -1
  106. package/dist/showcase/assets/{DialogTrigger-1P-jwcoH.js → DialogTrigger-DHUp8vXe.js} +1 -1
  107. package/dist/showcase/assets/{LabelableContext-BDyZArAc.js → LabelableContext-CasUI4hR.js} +1 -1
  108. package/dist/showcase/assets/{PreviewLayout-wYGhlcJt.js → PreviewLayout-B_l930k0.js} +1 -1
  109. package/dist/showcase/assets/{RadioGroup-DuiI4W--.js → RadioGroup-BgZ-UH79.js} +1 -1
  110. package/dist/showcase/assets/{ScrollAreaCorner-Df5uTkWT.js → ScrollAreaCorner-BbwFElLA.js} +1 -1
  111. package/dist/showcase/assets/{Separator-BuTBo5a_.js → Separator-dQuencsA.js} +1 -1
  112. package/dist/showcase/assets/{ToolbarRootContext-B4S4Fn7d.js → ToolbarRootContext-BE0hbejq.js} +1 -1
  113. package/dist/showcase/assets/{accordion-D3beuJpC.js → accordion-D93ZNsLn.js} +1 -1
  114. package/dist/showcase/assets/{accordion-variants-BTMpfSPI.js → accordion-variants-Bl4bIQH4.js} +1 -1
  115. package/dist/showcase/assets/{action-menu-DsAr1OqF.js → action-menu--rEgMzDi.js} +1 -1
  116. package/dist/showcase/assets/{actions-BzyHAEZR.js → actions-3iedOWD9.js} +1 -1
  117. package/dist/showcase/assets/{activities-BgoelWKu.js → activities-CyrAWFlu.js} +1 -1
  118. package/dist/showcase/assets/{activities-feed-card-DI4MIm3-.js → activities-feed-card-bhIATc2O.js} +1 -1
  119. package/dist/showcase/assets/{admin-n-JemkNh.js → admin-CZzNsj2q.js} +1 -1
  120. package/dist/showcase/assets/{ai-BXyk1mT0.js → ai-CasHwkW4.js} +1 -1
  121. package/dist/showcase/assets/{ai-artifact-C8CmZ94f.js → ai-artifact-BgWvrLAb.js} +1 -1
  122. package/dist/showcase/assets/{ai-chat-CTQQ4e4X.js → ai-chat-seS9aW-1.js} +1 -1
  123. package/dist/showcase/assets/{ai-elements-DGnlBq8E.js → ai-elements-Tku5_ous.js} +1 -1
  124. package/dist/showcase/assets/{ai-tool-call-bHnWNBtN.js → ai-tool-call-BU6xbmXG.js} +1 -1
  125. package/dist/showcase/assets/{alert-bPnj3_cC.js → alert-6Emt6KX2.js} +1 -1
  126. package/dist/showcase/assets/{alert-CIHGXUul.js → alert-B6aLWiRW.js} +1 -1
  127. package/dist/showcase/assets/{alert-N79A6qIx.js → alert-CtoTQ0vN.js} +1 -1
  128. package/dist/showcase/assets/{api-key-list-Bf1KoRJq.js → api-key-list-C0glWR3z.js} +1 -1
  129. package/dist/showcase/assets/{api-key-list-DyZ_DaRx.js → api-key-list-DcWSbY3u.js} +1 -1
  130. package/dist/showcase/assets/{app-sidebar-Co0LUSvz.js → app-sidebar-D_eNP_jh.js} +1 -1
  131. package/dist/showcase/assets/arrow-down-qyKZ1H5j.js +1 -0
  132. package/dist/showcase/assets/arrow-left-C9I0h_su.js +1 -0
  133. package/dist/showcase/assets/arrow-right-DswaRsr6.js +1 -0
  134. package/dist/showcase/assets/arrow-up-5BijPOxK.js +1 -0
  135. package/dist/showcase/assets/arrow-up-right-CbVVNT6g.js +1 -0
  136. package/dist/showcase/assets/{avatar-DKLsNeBi.js → avatar-BYHVCvVW.js} +1 -1
  137. package/dist/showcase/assets/{avatar-D3kvVy00.js → avatar-BlLAVC87.js} +1 -1
  138. package/dist/showcase/assets/{avatar-CJaCYGWf.js → avatar-DQTXjcS4.js} +1 -1
  139. package/dist/showcase/assets/{avatar-CxwFyL4T.js → avatar-DveZy09C.js} +1 -1
  140. package/dist/showcase/assets/{badge-CSMmwDLr.js → badge-Bth3mRTh.js} +1 -1
  141. package/dist/showcase/assets/{badge-check-TQRmqI7C.js → badge-check-DocF8Ho3.js} +1 -1
  142. package/dist/showcase/assets/{bell-CwRy7zpP.js → bell-DXBoeAzi.js} +1 -1
  143. package/dist/showcase/assets/{bot-Bt02Uzhq.js → bot-Ch-Y1HK8.js} +1 -1
  144. package/dist/showcase/assets/{box-Bfv5RQBf.js → box-72m9QSDa.js} +1 -1
  145. package/dist/showcase/assets/{braces-CxUoAPd4.js → braces-CC17X3TE.js} +1 -1
  146. package/dist/showcase/assets/{brain-CNapE0CP.js → brain-Dvbla_5x.js} +1 -1
  147. package/dist/showcase/assets/{brand-CBq1YoS0.js → brand-D5ciAq8v.js} +1 -1
  148. package/dist/showcase/assets/{breadcrumb-DyXpErBT.js → breadcrumb-BBCaOVyz.js} +1 -1
  149. package/dist/showcase/assets/{breadcrumb-DRioiUd_.js → breadcrumb-Bt8yVTCj.js} +1 -1
  150. package/dist/showcase/assets/{breadcrumbs-BzHeoItO.js → breadcrumbs-CkVWfcAN.js} +1 -1
  151. package/dist/showcase/assets/{briefcase-N74Hu0O2.js → briefcase-8rQTJwpE.js} +1 -1
  152. package/dist/showcase/assets/{building-2-D81ygy-F.js → building-2-CV7gTtXz.js} +1 -1
  153. package/dist/showcase/assets/{button-Bgqg7AmN.js → button-HGjoBio3.js} +1 -1
  154. package/dist/showcase/assets/{button-group-DPV1XIW3.js → button-group-LWToSCrp.js} +1 -1
  155. package/dist/showcase/assets/{buttons-qpZWlILG.js → buttons-Bn_dX6Kk.js} +1 -1
  156. package/dist/showcase/assets/{calendar-DcYyOrNY.js → calendar-BTsffmY8.js} +1 -1
  157. package/dist/showcase/assets/{calendar-BXG5CwbY.js → calendar-Bhpyn4u0.js} +1 -1
  158. package/dist/showcase/assets/{calendar-D-CSqGtC.js → calendar-DjrUTKcD.js} +1 -1
  159. package/dist/showcase/assets/{calendar-days-CNNiyV9e.js → calendar-days-BKCkzWjV.js} +1 -1
  160. package/dist/showcase/assets/{camera-D0yVo0xC.js → camera-EjpDG3mc.js} +1 -1
  161. package/dist/showcase/assets/{card-CH7Ev3xS.js → card-Bp6iGuOF.js} +1 -1
  162. package/dist/showcase/assets/{card-Bl-y9-8y.js → card-CHc6AVFt.js} +1 -1
  163. package/dist/showcase/assets/card-primitives-Bv6XGPJd.js +1 -0
  164. package/dist/showcase/assets/{card-radio-group-DpeIWyiO.js → card-radio-group-Ce9FsiSv.js} +1 -1
  165. package/dist/showcase/assets/{cards-7xave3ub.js → cards-_CGG9zir.js} +1 -1
  166. package/dist/showcase/assets/{carousel--kHTFkC7.js → carousel-BVbsKH2W.js} +1 -1
  167. package/dist/showcase/assets/{cell-renderers-Cx8rAZln.js → cell-renderers-CosD6Gby.js} +1 -1
  168. package/dist/showcase/assets/{chart-DU8INHbt.js → chart-CwOp8Sf8.js} +1 -1
  169. package/dist/showcase/assets/{chart-column-Dbekq8cy.js → chart-column-sz871NdJ.js} +1 -1
  170. package/dist/showcase/assets/{checkbox-ClPnzko9.js → checkbox-BO38TYqr.js} +1 -1
  171. package/dist/showcase/assets/checkbox-W4MhlPlJ.js +1 -0
  172. package/dist/showcase/assets/chevron-down-BFh1Fz2P.js +1 -0
  173. package/dist/showcase/assets/chevron-left-C5_X5glO.js +1 -0
  174. package/dist/showcase/assets/chevron-up-DPH3boVS.js +1 -0
  175. package/dist/showcase/assets/chevrons-up-down-CM5mIDaw.js +1 -0
  176. package/dist/showcase/assets/circle-BFDzL1iF.js +1 -0
  177. package/dist/showcase/assets/{circle-alert-9j29FrsT.js → circle-alert-C6MbOB0m.js} +1 -1
  178. package/dist/showcase/assets/circle-check-C0X85t4j.js +1 -0
  179. package/dist/showcase/assets/circle-check-big-CBaodck_.js +1 -0
  180. package/dist/showcase/assets/circle-dot-DdRpIhnL.js +1 -0
  181. package/dist/showcase/assets/{circle-question-mark-BRiF5RV4.js → circle-question-mark-CKlcead7.js} +1 -1
  182. package/dist/showcase/assets/{circle-x-BF20gddw.js → circle-x-MO44aKHe.js} +1 -1
  183. package/dist/showcase/assets/clock-3-CXQJFcbh.js +1 -0
  184. package/dist/showcase/assets/clock-GhBJJ6n1.js +1 -0
  185. package/dist/showcase/assets/{code-xml-D2f-X63y.js → code-xml-BSX7Qyi5.js} +1 -1
  186. package/dist/showcase/assets/{collapsible-CF0oQTVS.js → collapsible-CZLTO5EH.js} +1 -1
  187. package/dist/showcase/assets/{collapsible-Ru5-bssh.js → collapsible-LrDO_sSQ.js} +1 -1
  188. package/dist/showcase/assets/{combobox-DpJTW_Rq.js → combobox-TmDBXkM-.js} +1 -1
  189. package/dist/showcase/assets/{command-Dno8Ogez.js → command-9-r1qrJt.js} +1 -1
  190. package/dist/showcase/assets/{command-LRFStKBy.js → command-DGne3l9s.js} +1 -1
  191. package/dist/showcase/assets/{comment-composer-Dht7nfbv.js → comment-composer-BI0qnvuY.js} +1 -1
  192. package/dist/showcase/assets/{comment-item-B6IgQsMr.js → comment-item-Cedds6Lm.js} +1 -1
  193. package/dist/showcase/assets/{comments-B3ksV3Mn.js → comments-De02NOns.js} +1 -1
  194. package/dist/showcase/assets/{commerce-B1_Offbz.js → commerce-DldtS83o.js} +1 -1
  195. package/dist/showcase/assets/{composite-BjQWIYF-.js → composite-BjZZlzzb.js} +1 -1
  196. package/dist/showcase/assets/{contact-card-Bss4YHZz.js → contact-card-muCZ3uXV.js} +1 -1
  197. package/dist/showcase/assets/{content-container-D4BM1Zro.js → content-container-BxSLICeL.js} +1 -1
  198. package/dist/showcase/assets/{copyable-Dst8oaw5.js → copyable-DYhhmTqM.js} +1 -1
  199. package/dist/showcase/assets/{copyable-C0J88R_R.js → copyable-MNU75-J9.js} +1 -1
  200. package/dist/showcase/assets/{course-card-BuqwjqtO.js → course-card-Dl1wsuJx.js} +1 -1
  201. package/dist/showcase/assets/{cpu-CFy0M0rN.js → cpu-CsWq4fcX.js} +1 -1
  202. package/dist/showcase/assets/{credit-card-CFq0S1Ma.js → credit-card-B0AUZiWw.js} +1 -1
  203. package/dist/showcase/assets/{css-variables-BAALjDwD.js → css-variables-Be7DzahT.js} +1 -1
  204. package/dist/showcase/assets/{currency-BZzZRv2_.js → currency-BtPM_Xtw.js} +1 -1
  205. package/dist/showcase/assets/{dark-surfaces-CVKt2Yww.js → dark-surfaces-DRFERSEv.js} +1 -1
  206. package/dist/showcase/assets/{data-view-Be0uoLqL.js → data-view-DmWd0h7G.js} +2 -2
  207. package/dist/showcase/assets/{data-view-D6_zyFwk.js → data-view-DnLH2o0i.js} +1 -1
  208. package/dist/showcase/assets/{database-DSC-ysYT.js → database-C0YqGaQ_.js} +1 -1
  209. package/dist/showcase/assets/{date-block-Bgu_LMxB.js → date-block-BQH25FLS.js} +1 -1
  210. package/dist/showcase/assets/{date-picker-ByYEZGMg.js → date-picker-BF-jevhh.js} +1 -1
  211. package/dist/showcase/assets/{date-pickers-DzSQrvWs.js → date-pickers-q2v3ajJm.js} +1 -1
  212. package/dist/showcase/assets/{dense-info-BhFkOQbt.js → dense-info-Cb-roqDU.js} +1 -1
  213. package/dist/showcase/assets/{design-system-consistency-D6iCJLcr.js → design-system-consistency-DMSJknaM.js} +1 -1
  214. package/dist/showcase/assets/{dialog-C1heXuxu.js → dialog-C0ALRmbP.js} +1 -1
  215. package/dist/showcase/assets/{dialog-DzrcsKvl.js → dialog-CbXon08k.js} +1 -1
  216. package/dist/showcase/assets/{display-utilities-eu-EVMrx.js → display-utilities-kBUVw7o3.js} +1 -1
  217. package/dist/showcase/assets/{dist-DV4Tv32d.js → dist-CTSkWj_M.js} +1 -1
  218. package/dist/showcase/assets/{dist-BlIID0_L.js → dist-W8bxVfew.js} +1 -1
  219. package/dist/showcase/assets/{dollar-sign-qp4G3P_K.js → dollar-sign-VNxVZleW.js} +1 -1
  220. package/dist/showcase/assets/{download-zlcHjSdS.js → download-Ds_6eIpx.js} +1 -1
  221. package/dist/showcase/assets/{dropdown-menu-DZ47rJaE.js → dropdown-menu-C1G_y9dv.js} +1 -1
  222. package/dist/showcase/assets/{dropzone-Dx4EqBHu.js → dropzone-CxOLmdkt.js} +1 -1
  223. package/dist/showcase/assets/{earth-BuXqXHh6.js → earth-HLyEI1oq.js} +1 -1
  224. package/dist/showcase/assets/{ellipsis-DgAjMZHc.js → ellipsis-BLyAd9A-.js} +1 -1
  225. package/dist/showcase/assets/{ellipsis-vertical-BA8_YMyV.js → ellipsis-vertical-TG4mYU2J.js} +1 -1
  226. package/dist/showcase/assets/{empty-DXjKmyNv.js → empty-B54k9xAG.js} +1 -1
  227. package/dist/showcase/assets/{empty-item-DIGWYsI0.js → empty-item-BmA4rmq7.js} +1 -1
  228. package/dist/showcase/assets/{empty-state-BSc0tQNC.js → empty-state-CH7gjjg7.js} +1 -1
  229. package/dist/showcase/assets/{empty-state-CkixFVN1.js → empty-state-hUKvmKa-.js} +1 -1
  230. package/dist/showcase/assets/{enhanced-activities-CKbHgR4f.js → enhanced-activities-BRDVL9RR.js} +1 -1
  231. package/dist/showcase/assets/{enhanced-combobox-DAKQyFUg.js → enhanced-combobox-2wbQJS6R.js} +1 -1
  232. package/dist/showcase/assets/{esm-C3PfkuOc.js → esm-CUTefMLr.js} +1 -1
  233. package/dist/showcase/assets/{event-calendar-rNju8jaT.js → event-calendar-Bf9xFZlt.js} +1 -1
  234. package/dist/showcase/assets/{event-log-BUK1blGb.js → event-log-CeRDSL-h.js} +1 -1
  235. package/dist/showcase/assets/{example-PsbgbESI.js → example-CJMJcnb4.js} +1 -1
  236. package/dist/showcase/assets/{external-link-CgB9zfWz.js → external-link-CvXhYrnd.js} +1 -1
  237. package/dist/showcase/assets/{eye-YnIHbdKe.js → eye-Cl_GfUKH.js} +1 -1
  238. package/dist/showcase/assets/{feature-announcement-CWwjAPI1.js → feature-announcement-Dw0SokLo.js} +1 -1
  239. package/dist/showcase/assets/{file-3Z2xkc-8.js → file-CJFWrwy1.js} +1 -1
  240. package/dist/showcase/assets/{file-text-BQeGXxPG.js → file-text-BTTFP8Jo.js} +1 -1
  241. package/dist/showcase/assets/{filter-layout-D7YskzbC.js → filter-layout-DUVqG5Ql.js} +1 -1
  242. package/dist/showcase/assets/{filters-2YY_wVwq.js → filters-BLcCaplV.js} +1 -1
  243. package/dist/showcase/assets/{flag-Bw3wwRgF.js → flag-BxI3EGPG.js} +1 -1
  244. package/dist/showcase/assets/{folder-open-CZ5Bq4lK.js → folder-open-4d8qsiAj.js} +1 -1
  245. package/dist/showcase/assets/{form-field-AWNJL9FM.js → form-field-Dhy0eM5B.js} +1 -1
  246. package/dist/showcase/assets/{format-DUU7-42g.js → format-zGqa9Olc.js} +1 -1
  247. package/dist/showcase/assets/{forms-CWJ3HBbk.js → forms-D99qG5Gb.js} +1 -1
  248. package/dist/showcase/assets/{funnel-vxNNph7w.js → funnel-Cg7SOShf.js} +1 -1
  249. package/dist/showcase/assets/{generic-DlyFJDj6.js → generic-CfrG943t.js} +1 -1
  250. package/dist/showcase/assets/{getPseudoElementBounds-CibNto5h.js → getPseudoElementBounds-lw5shsdM.js} +1 -1
  251. package/dist/showcase/assets/{gift-BjRHqTcQ.js → gift-BXtKbzvA.js} +1 -1
  252. package/dist/showcase/assets/{giftcard-cards-DcujCFff.js → giftcard-cards-CqYaN0jC.js} +1 -1
  253. package/dist/showcase/assets/{git-branch-B7XnpQE0.js → git-branch-BWAuIMOQ.js} +1 -1
  254. package/dist/showcase/assets/{global-search-CWvNfmpe.js → global-search-CHUva8pR.js} +1 -1
  255. package/dist/showcase/assets/{global-search-Ct7I1Xd2.js → global-search-Df7JovOG.js} +1 -1
  256. package/dist/showcase/assets/{globe-CHleXWd2.js → globe-CvIW_foU.js} +1 -1
  257. package/dist/showcase/assets/{gradient-card-Bw4oJljh.js → gradient-card-CdM2J1Hv.js} +1 -1
  258. package/dist/showcase/assets/{hash-BVGqnm6_.js → hash-wBs5gyr_.js} +1 -1
  259. package/dist/showcase/assets/{header-CgApizpk.js → header-DXPFmpUT.js} +1 -1
  260. package/dist/showcase/assets/{header-notifications-B2v1Mdri.js → header-notifications-FsnCJLpe.js} +1 -1
  261. package/dist/showcase/assets/{heart-BwvHCA-d.js → heart-B4fOMIr6.js} +1 -1
  262. package/dist/showcase/assets/{hooks-A_AQLIRZ.js → hooks-DtMOMalj.js} +6 -3
  263. package/dist/showcase/assets/{house-opqNxOmP.js → house-hebmAxEE.js} +1 -1
  264. package/dist/showcase/assets/{icon-badge-ognVhKWR.js → icon-badge-DrZ5qGpa.js} +1 -1
  265. package/dist/showcase/assets/{icon-badge-CsG95J1Z.js → icon-badge-JEug_P_U.js} +1 -1
  266. package/dist/showcase/assets/{image-apDSlTAx.js → image-CxNywgkb.js} +1 -1
  267. package/dist/showcase/assets/{inbox-WrbeTKEw.js → inbox-DqAmGdDd.js} +1 -1
  268. package/dist/showcase/assets/index-DujM0kEF.css +2 -0
  269. package/dist/showcase/assets/{index-QESvAJrb.js → index-jD-KSiHu.js} +2 -2
  270. package/dist/showcase/assets/inertValue-Dg9TwvOb.js +1 -0
  271. package/dist/showcase/assets/{info-C3G9KRCx.js → info-B5fZn_ZC.js} +1 -1
  272. package/dist/showcase/assets/{inline-stat-CO01t7SJ.js → inline-stat-CklKufoA.js} +1 -1
  273. package/dist/showcase/assets/{inline-stat-BnjUqzDM.js → inline-stat-Dep7oHIi.js} +1 -1
  274. package/dist/showcase/assets/{input-yYoqWQQ7.js → input-CkNgwwCs.js} +1 -1
  275. package/dist/showcase/assets/{input-CBJy1dMs.js → input-DAPMRlKO.js} +1 -1
  276. package/dist/showcase/assets/{input-group-CZyYSq4r.js → input-group-06D68uB6.js} +1 -1
  277. package/dist/showcase/assets/{input-group-Dfqufdp4.js → input-group-Bq9aXQPG.js} +1 -1
  278. package/dist/showcase/assets/{inputs-Bhw_FGDY.js → inputs-C8G3y-zR.js} +1 -1
  279. package/dist/showcase/assets/{installation-DnvS2ZUn.js → installation-BV5xOvoE.js} +1 -1
  280. package/dist/showcase/assets/{invoice-header-B9Ak8GXX.js → invoice-header-BcUxzT68.js} +1 -1
  281. package/dist/showcase/assets/{invoice-items-DY5zUZhE.js → invoice-items-B42Jfxl7.js} +1 -1
  282. package/dist/showcase/assets/{invoice-mini-BAryECEH.js → invoice-mini-RJGdlErg.js} +1 -1
  283. package/dist/showcase/assets/{invoice-table-BUvjee74.js → invoice-table--MdP6ysv.js} +1 -1
  284. package/dist/showcase/assets/isSameDay-srttAIjD.js +1 -0
  285. package/dist/showcase/assets/isToday-BPub5Zvi.js +1 -0
  286. package/dist/showcase/assets/{italic-CjQCLJci.js → italic-1BNA_XlU.js} +1 -1
  287. package/dist/showcase/assets/{item-DxPwk321.js → item-B9KyqUGa.js} +1 -1
  288. package/dist/showcase/assets/{item-D1Jxrpia.js → item-DoIlPm6J.js} +1 -1
  289. package/dist/showcase/assets/{item-BMSdEK3V.js → item-ffIfXEGd.js} +1 -1
  290. package/dist/showcase/assets/{kanban-DXWCGieQ.js → kanban-Cfad3edR.js} +1 -1
  291. package/dist/showcase/assets/{key-round-DpuhXiJQ.js → key-round-J11Zc216.js} +1 -1
  292. package/dist/showcase/assets/{label-D1wLK5nY.js → label-DqaB8ZB2.js} +1 -1
  293. package/dist/showcase/assets/{languages-CGYZVmbV.js → languages-D9UaP3QU.js} +1 -1
  294. package/dist/showcase/assets/{layers-DJZSVGAu.js → layers-QXZ9Jfej.js} +1 -1
  295. package/dist/showcase/assets/{layout-app-shell-UX63nzTO.js → layout-app-shell-CW1eRJmU.js} +1 -1
  296. package/dist/showcase/assets/{layout-auth-Bav5BBqp.js → layout-auth-j4K6lveg.js} +1 -1
  297. package/dist/showcase/assets/{layout-containers-DMHD2zdV.js → layout-containers-NclLtsV0.js} +1 -1
  298. package/dist/showcase/assets/{layout-header-CGesu_kM.js → layout-header-B8AOTiwL.js} +1 -1
  299. package/dist/showcase/assets/{layout-page-DHXu8SIv.js → layout-page-DM79QHyW.js} +1 -1
  300. package/dist/showcase/assets/{layout-primitives-CokzGwd2.js → layout-primitives-Dyop-WMt.js} +1 -1
  301. package/dist/showcase/assets/{layout-sidebar-CLUYajcu.js → layout-sidebar-uBNaHqjD.js} +1 -1
  302. package/dist/showcase/assets/{layout-users-DHUNAnFA.js → layout-users-BkhDiOOz.js} +1 -1
  303. package/dist/showcase/assets/{layout-workspace-y0v2FpDW.js → layout-workspace-C2hSimZW.js} +1 -1
  304. package/dist/showcase/assets/{lib-g_kR7X9Z.js → lib-CDssULuD.js} +1 -1
  305. package/dist/showcase/assets/{list-checks-CXt8visd.js → list-checks-DA2jqXdm.js} +1 -1
  306. package/dist/showcase/assets/{lock-CpZ5kLUd.js → lock-BDZLNQLR.js} +1 -1
  307. package/dist/showcase/assets/{lock-keyhole-Cy2raRO6.js → lock-keyhole-CWYENd9O.js} +1 -1
  308. package/dist/showcase/assets/{mail-Cj6uT4TA.js → mail-CCdaRmft.js} +1 -1
  309. package/dist/showcase/assets/{mail-check-Di70bdf6.js → mail-check-DZF1VbCX.js} +1 -1
  310. package/dist/showcase/assets/{map-DMXbG_04.js → map-CDFEmmZH.js} +3 -3
  311. package/dist/showcase/assets/{map-pin-EKhu7vEj.js → map-pin-CdV-R6nt.js} +1 -1
  312. package/dist/showcase/assets/{media-library-Dnp9S0oW.js → media-library-BJyn1s9d.js} +1 -1
  313. package/dist/showcase/assets/{mention-inline-suggestions-Bp-fVNYF.js → mention-inline-suggestions-DPO6FhXx.js} +1 -1
  314. package/dist/showcase/assets/{mentions-DNRk30XZ.js → mentions-DtWHbcS6.js} +1 -1
  315. package/dist/showcase/assets/{menus-DFURb5VL.js → menus-BmjngFE4.js} +1 -1
  316. package/dist/showcase/assets/{message-square-DG0qIsG_.js → message-square-bM29txT3.js} +1 -1
  317. package/dist/showcase/assets/{metadata-list-Cb1DQd4S.js → metadata-list-DvYTAJri.js} +1 -1
  318. package/dist/showcase/assets/metadata-list-xVUTVyy9.js +1 -0
  319. package/dist/showcase/assets/{metric-BkzIsP8H.js → metric-BPNCh4eA.js} +1 -1
  320. package/dist/showcase/assets/{metric-bar-CU73nx89.js → metric-bar-BX4sCMrM.js} +1 -1
  321. package/dist/showcase/assets/{metric-grid-BMLMbLjE.js → metric-grid-IyHP3nmU.js} +1 -1
  322. package/dist/showcase/assets/{metric-trend-chip-Dutl5uZo.js → metric-trend-chip-Dih8eR17.js} +1 -1
  323. package/dist/showcase/assets/{metrics-analytics-bar-AqG2oyIy.js → metrics-analytics-bar-DK16RNMs.js} +1 -1
  324. package/dist/showcase/assets/{metrics-analytics-cards-CrFHmR2f.js → metrics-analytics-cards-Byyl13YT.js} +1 -1
  325. package/dist/showcase/assets/{metrics-comparison-CY-DyLv7.js → metrics-comparison-DGHFMBL-.js} +1 -1
  326. package/dist/showcase/assets/{metrics-heatmap-BmX_CkiP.js → metrics-heatmap-Bl6C7i0j.js} +1 -1
  327. package/dist/showcase/assets/{metrics-inline-badge-C1IFjdJN.js → metrics-inline-badge-Bz79zbNK.js} +1 -1
  328. package/dist/showcase/assets/{metrics-kpi-row-8Kbn034e.js → metrics-kpi-row-DzZ9dRFY.js} +1 -1
  329. package/dist/showcase/assets/{metrics-micro-grid-CodO02yA.js → metrics-micro-grid-DyoQiuzr.js} +1 -1
  330. package/dist/showcase/assets/{metrics-overview-CdPqEAAG.js → metrics-overview-DoyHPEZw.js} +1 -1
  331. package/dist/showcase/assets/{metrics-stat-cards-Cw7UMWmb.js → metrics-stat-cards-B1b7NFqW.js} +1 -1
  332. package/dist/showcase/assets/minus-BE2L5hVc.js +1 -0
  333. package/dist/showcase/assets/{money-display-CFfUZLus.js → money-display-CXQ_8LfA.js} +1 -1
  334. package/dist/showcase/assets/{month-year-picker-ChVcYm9f.js → month-year-picker-ra8FEN8F.js} +1 -1
  335. package/dist/showcase/assets/{navigation-Boyt1q-1.js → navigation-CFfVZQJ1.js} +1 -1
  336. package/dist/showcase/assets/{navigation-CThYYxkL.js → navigation-Da0MVkqr.js} +1 -1
  337. package/dist/showcase/assets/{navigation-extras-CxLc-Mqx.js → navigation-extras-LpsdoXfx.js} +1 -1
  338. package/dist/showcase/assets/{onboarding-checklist-C15gqmFc.js → onboarding-checklist-DPNatNOk.js} +1 -1
  339. package/dist/showcase/assets/{overflow-tab-bar-B2Htn-Ft.js → overflow-tab-bar-C0vTzcEY.js} +1 -1
  340. package/dist/showcase/assets/{overlays-Cpj4akiw.js → overlays-Blmbun0J.js} +1 -1
  341. package/dist/showcase/assets/{overlays-CPZfp0nk.js → overlays-t0joc10Y.js} +1 -1
  342. package/dist/showcase/assets/{overview-BB-Xbkff.js → overview-Ckq8vbOR.js} +1 -1
  343. package/dist/showcase/assets/{package-DLn6nx-u.js → package-Cjod_a06.js} +1 -1
  344. package/dist/showcase/assets/{package-check-B0wyBUSU.js → package-check-JRHaNnkl.js} +1 -1
  345. package/dist/showcase/assets/{page-BPFNsNh7.js → page-9xr7xnuW.js} +1 -1
  346. package/dist/showcase/assets/page-action-button-BRXnfsEx.js +1 -0
  347. package/dist/showcase/assets/{page-header-BGqE9hzO.js → page-header-Bdlxfn_9.js} +1 -1
  348. package/dist/showcase/assets/{pagination-T4FmLNHn.js → pagination-CeaYhOvv.js} +1 -1
  349. package/dist/showcase/assets/{pagination-Be6ynLCp.js → pagination-DdZZHvNF.js} +1 -1
  350. package/dist/showcase/assets/{paperclip-B_kxXzSN.js → paperclip-BRM-yXTB.js} +1 -1
  351. package/dist/showcase/assets/{password-input-qfQ5eIU4.js → password-input-1FVEugoO.js} +1 -1
  352. package/dist/showcase/assets/{pencil-DlDLApli.js → pencil-DiG2dQ8F.js} +1 -1
  353. package/dist/showcase/assets/{phone-D8tvvbSQ.js → phone-BREyNZN-.js} +1 -1
  354. package/dist/showcase/assets/plus-CQcelTNc.js +1 -0
  355. package/dist/showcase/assets/{popover-Bu7aaPjE.js → popover-Czmwspmc.js} +1 -1
  356. package/dist/showcase/assets/{popover-menu-CD_JfEeq.js → popover-menu-beuCaiLt.js} +1 -1
  357. package/dist/showcase/assets/{popover-BsCx2XMI.js → popover-uqk7myG2.js} +1 -1
  358. package/dist/showcase/assets/{products-BzHX1ta0.js → products-DGNqIbLs.js} +1 -1
  359. package/dist/showcase/assets/{progress-jIJ_EIKE.js → progress-D76Df908.js} +1 -1
  360. package/dist/showcase/assets/{progress-CpW2ZGAy.js → progress-DjUprSDD.js} +1 -1
  361. package/dist/showcase/assets/{props-table-CCcohuyT.js → props-table-DoDq8Mvr.js} +1 -1
  362. package/dist/showcase/assets/{quote-Bc9eHVKi.js → quote-BvGGgyJ0.js} +1 -1
  363. package/dist/showcase/assets/{receipt-B77_VWtt.js → receipt-rgnlMgyi.js} +1 -1
  364. package/dist/showcase/assets/{receipt-text-BlL_TJsS.js → receipt-text-CBQrVlnU.js} +1 -1
  365. package/dist/showcase/assets/{refinement-guide-BpzOvT_R.js → refinement-guide-B_BpIMxm.js} +1 -1
  366. package/dist/showcase/assets/{refresh-cw-CELG4taF.js → refresh-cw-C-yHy6B7.js} +1 -1
  367. package/dist/showcase/assets/{resolveValueLabel-LRTUaJTb.js → resolveValueLabel-0bwEvIG-.js} +1 -1
  368. package/dist/showcase/assets/{resource-BT8_ck3n.js → resource-8f61BZ8t.js} +1 -1
  369. package/dist/showcase/assets/{resource-C7J3yZp6.js → resource-BEh6R0gu.js} +1 -1
  370. package/dist/showcase/assets/{resource-selector-card-Ay8ImvKg.js → resource-selector-card-DJwXY_Ms.js} +1 -1
  371. package/dist/showcase/assets/{rich-text-editor-CdGVvtsm.js → rich-text-editor-D433iv0N.js} +1 -1
  372. package/dist/showcase/assets/{rich-text-editor-DVtTVuZ6.js → rich-text-editor-vTRfWsOK.js} +1 -1
  373. package/dist/showcase/assets/rotate-ccw-JuE4H14F.js +1 -0
  374. package/dist/showcase/assets/{route-CgBh1oKF.js → route-eSu1bFNn.js} +1 -1
  375. package/dist/showcase/assets/{save-BFsAGR7O.js → save-Bpjj-rBP.js} +1 -1
  376. package/dist/showcase/assets/{schema-form-CaF-lBkN.js → schema-form-DmOpxd96.js} +1 -1
  377. package/dist/showcase/assets/{scroll-area-CpDi_6FP.js → scroll-area-B9OdCBy9.js} +1 -1
  378. package/dist/showcase/assets/{scroll-area-BkZULoZA.js → scroll-area-BH80l2As.js} +1 -1
  379. package/dist/showcase/assets/{section-D-N8Ze16.js → section-BPNIPavy.js} +1 -1
  380. package/dist/showcase/assets/{select-ReMZs8K6.js → select-BauiG1a3.js} +1 -1
  381. package/dist/showcase/assets/{select-C9Mfb_Gj.js → select-CPopSr5c.js} +1 -1
  382. package/dist/showcase/assets/{send-C6PbwpHN.js → send-DNCcBKXs.js} +1 -1
  383. package/dist/showcase/assets/{separator-CywPSoE0.js → separator-BK0beCOv.js} +1 -1
  384. package/dist/showcase/assets/{separator-Ha9YxI2x.js → separator-CKM9A-mm.js} +1 -1
  385. package/dist/showcase/assets/{settings-2-CVq5Uyv5.js → settings-2-B8fz7JZB.js} +1 -1
  386. package/dist/showcase/assets/{settings-DkTHc0Ob.js → settings-Cy2y3sQw.js} +1 -1
  387. package/dist/showcase/assets/{sheet-k-P0gWlk.js → sheet-C7VWkXE1.js} +1 -1
  388. package/dist/showcase/assets/{shield-Cme7_JJR.js → shield-ClPev4gS.js} +1 -1
  389. package/dist/showcase/assets/{shield-alert-CxV0S5w0.js → shield-alert-6XO5YZ5u.js} +1 -1
  390. package/dist/showcase/assets/{shield-check-BW_7p6Xf.js → shield-check-DSfGVZq0.js} +1 -1
  391. package/dist/showcase/assets/{shopping-bag-CoR8AMYU.js → shopping-bag-DzMrGvpF.js} +1 -1
  392. package/dist/showcase/assets/{showcase-m3FzbvoC.js → showcase-DuZaO6q9.js} +1 -1
  393. package/dist/showcase/assets/{sidebar-bz_FzvjM.js → sidebar-7y9EQYWf.js} +1 -1
  394. package/dist/showcase/assets/{sidebar.context-BWMPnGn6.js → sidebar.context-DUheJD8t.js} +1 -1
  395. package/dist/showcase/assets/{skeleton-BJMnQDgf.js → skeleton-Dgr8Vabr.js} +1 -1
  396. package/dist/showcase/assets/{skeleton-DoWW5XZD.js → skeleton-HSpErFqw.js} +1 -1
  397. package/dist/showcase/assets/{slider-BH1Gtp_p.js → slider-B7f81APg.js} +1 -1
  398. package/dist/showcase/assets/{smart-card-C6-idFYI.js → smart-card-p97LLZCW.js} +1 -1
  399. package/dist/showcase/assets/{sonner-CGZ3FC4U.js → sonner-CWazrN19.js} +1 -1
  400. package/dist/showcase/assets/{sortable.esm-CE0TA9V_.js → sortable.esm-uufol7Mz.js} +1 -1
  401. package/dist/showcase/assets/{sparkles-8yQFcmte.js → sparkles-Z4V23xKK.js} +1 -1
  402. package/dist/showcase/assets/{spinner-CNveVfOr.js → spinner-BUgjAjWE.js} +1 -1
  403. package/dist/showcase/assets/{spinner-CO8LjtjY.js → spinner-CXu7z8-j.js} +1 -1
  404. package/dist/showcase/assets/{spinner-BYUX0luk.js → spinner-DCwR0mnD.js} +1 -1
  405. package/dist/showcase/assets/{square-pen-CWylvezY.js → square-pen-jwp_OWMQ.js} +1 -1
  406. package/dist/showcase/assets/{stacked-avatars-DiNA5OJK.js → stacked-avatars-CHEpTotO.js} +1 -1
  407. package/dist/showcase/assets/{star-t53uwwyp.js → star-Ck8Lg5hm.js} +1 -1
  408. package/dist/showcase/assets/startOfDay-BzULZHy4.js +1 -0
  409. package/dist/showcase/assets/{styles-CwpnwrEQ.js → styles-CNYitflH.js} +1 -1
  410. package/dist/showcase/assets/{suggestions-CvxZxsmc.js → suggestions-CSF9MlKl.js} +1 -1
  411. package/dist/showcase/assets/{switch-CewkokYT.js → switch-BX9KSLIF.js} +1 -1
  412. package/dist/showcase/assets/{switch-D-7uqDR8.js → switch-Bn0WaWa9.js} +1 -1
  413. package/dist/showcase/assets/{sync-DnBSRAwH.js → sync-BuKBnqWW.js} +1 -1
  414. package/dist/showcase/assets/{table-3cUcSCBR.js → table-DNJcLaud.js} +42 -20
  415. package/dist/showcase/assets/{table-ds5oNU0h.js → table-NfpOWGsG.js} +1 -1
  416. package/dist/showcase/assets/{table-actions-CrujG5R-.js → table-actions-Ci9Yszp0.js} +1 -1
  417. package/dist/showcase/assets/{tabs-C-hJfSn5.js → tabs-CYNFQdIr.js} +1 -1
  418. package/dist/showcase/assets/{tabs-GG911oaV.js → tabs-Cm_p6znb.js} +1 -1
  419. package/dist/showcase/assets/{tags-input-DBeIaeVn.js → tags-input-DE4QZqS_.js} +1 -1
  420. package/dist/showcase/assets/{text-button-EZojp9Ye.js → text-button-D9llh4pU.js} +1 -1
  421. package/dist/showcase/assets/{text-link-DcKeYjEX.js → text-link-ZT6QGJOL.js} +1 -1
  422. package/dist/showcase/assets/{textarea-DgNgSl1g.js → textarea-CgcHuGVq.js} +1 -1
  423. package/dist/showcase/assets/{textarea-PXKZSiRa.js → textarea-D2uT_GJt.js} +1 -1
  424. package/dist/showcase/assets/{timelines-CaF_Ze8z.js → timelines-BEFO7tJ0.js} +1 -1
  425. package/dist/showcase/assets/{toggle-group-D_iuhL1G.js → toggle-group-oYpa59lN.js} +1 -1
  426. package/dist/showcase/assets/{toggles-BKaayRmE.js → toggles-BL93YmQo.js} +1 -1
  427. package/dist/showcase/assets/{toggles-group-DRAksOw2.js → toggles-group-BG-xiQCY.js} +1 -1
  428. package/dist/showcase/assets/{tooltip-B_LnC5D2.js → tooltip-BMI7zHwP.js} +1 -1
  429. package/dist/showcase/assets/{trash-2-DhUpICQq.js → trash-2-CtRtVsCy.js} +1 -1
  430. package/dist/showcase/assets/trending-up-2NQ-P8vB.js +1 -0
  431. package/dist/showcase/assets/{truck-D6SGLjv1.js → truck-Cl0nyN_j.js} +1 -1
  432. package/dist/showcase/assets/{typography-qEz6MMn9.js → typography-C7pCPhg7.js} +1 -1
  433. package/dist/showcase/assets/{ui-badge-BA334hdB.js → ui-badge-BvmuMzSq.js} +1 -1
  434. package/dist/showcase/assets/{ui-card-CjqUyGvB.js → ui-card-B7ziOMAn.js} +1 -1
  435. package/dist/showcase/assets/{ui-table-cDgI6WMk.js → ui-table-BEFHakBU.js} +1 -1
  436. package/dist/showcase/assets/{upload-tray-BcA-7pqW.js → upload-tray-CMKqTtEp.js} +1 -1
  437. package/dist/showcase/assets/{use-layout-link-DIUWH-oo.js → use-layout-link-nEU6ctSs.js} +1 -1
  438. package/dist/showcase/assets/{useAnchoredPopupScrollLock-BavpibMb.js → useAnchoredPopupScrollLock-B1xyKMh7.js} +1 -1
  439. package/dist/showcase/assets/{useAriaLabelledBy-HDEJjv0f.js → useAriaLabelledBy-BMlFgz-H.js} +1 -1
  440. package/dist/showcase/assets/{useCollapsiblePanel-CL0pCuxO.js → useCollapsiblePanel-BEzH6TC2.js} +1 -1
  441. package/dist/showcase/assets/{useCompositeItem-LkMSD9DW.js → useCompositeItem-CIuww7-p.js} +1 -1
  442. package/dist/showcase/assets/{useCompositeListItem-C_oLUvf8.js → useCompositeListItem-PrMTh4tz.js} +1 -1
  443. package/dist/showcase/assets/{useLabelableId-DDpjUdIO.js → useLabelableId-BBLkeLGr.js} +1 -1
  444. package/dist/showcase/assets/{useOpenInteractionType-DQOSh-Eu.js → useOpenInteractionType-CW0quo3l.js} +1 -1
  445. package/dist/showcase/assets/useRender-6NNMHJJU.js +1 -0
  446. package/dist/showcase/assets/{useTriggerFocusGuards-BPFrAxlp.js → useTriggerFocusGuards-DEza_iee.js} +1 -1
  447. package/dist/showcase/assets/{useValueChanged-lYlHqRM1.js → useValueChanged-BmWIb3SN.js} +1 -1
  448. package/dist/showcase/assets/user-BDIP5UPS.js +1 -0
  449. package/dist/showcase/assets/{user-plus-B1Pi7SNv.js → user-plus-BCqHFh2h.js} +1 -1
  450. package/dist/showcase/assets/{users-DAlxvktS.js → users-Bh7xGRX2.js} +1 -1
  451. package/dist/showcase/assets/{vendor-profile-ClJ6G6SO.js → vendor-profile-BlYcRbPI.js} +1 -1
  452. package/dist/showcase/assets/{video-DxooIkh-.js → video-BucshqNW.js} +1 -1
  453. package/dist/showcase/assets/{wrench-BiwmotMF.js → wrench-DQvhyTEb.js} +1 -1
  454. package/dist/showcase/assets/x-DyuS4YRT.js +1 -0
  455. package/dist/showcase/assets/{zap-a90eC6iO.js → zap-Dpn8_pnQ.js} +1 -1
  456. package/dist/showcase/index.html +2 -2
  457. package/dist/style.css +1 -1
  458. package/package.json +1 -1
  459. package/dist/_shared/cards-BKFwMTjM.cjs +0 -2
  460. package/dist/_shared/cards-BKFwMTjM.cjs.map +0 -1
  461. package/dist/_shared/cards-CtBoSZG9.js.map +0 -1
  462. package/dist/_shared/overlays-CdtMAkKG.js.map +0 -1
  463. package/dist/_shared/overlays-Diy_H0Au.cjs +0 -2
  464. package/dist/_shared/overlays-Diy_H0Au.cjs.map +0 -1
  465. package/dist/_shared/table-CUA_A-oO.js.map +0 -1
  466. package/dist/_shared/table-mPchjiRn.cjs +0 -2
  467. package/dist/_shared/table-mPchjiRn.cjs.map +0 -1
  468. package/dist/showcase/assets/arrow-down-BttnoDxP.js +0 -1
  469. package/dist/showcase/assets/arrow-left-B1kFGJ8v.js +0 -1
  470. package/dist/showcase/assets/arrow-right-Md96ra7v.js +0 -1
  471. package/dist/showcase/assets/arrow-up-B9e9cP-q.js +0 -1
  472. package/dist/showcase/assets/arrow-up-right-BOHJNdrp.js +0 -1
  473. package/dist/showcase/assets/card-primitives-CiU5lL3a.js +0 -1
  474. package/dist/showcase/assets/checkbox-Qhh92dbS.js +0 -1
  475. package/dist/showcase/assets/chevron-down-BqrI6QzQ.js +0 -1
  476. package/dist/showcase/assets/chevron-left-TJKYH3rG.js +0 -1
  477. package/dist/showcase/assets/chevron-up-CPuAmh-d.js +0 -1
  478. package/dist/showcase/assets/chevrons-up-down-DZB44PVY.js +0 -1
  479. package/dist/showcase/assets/circle-CY0DkTje.js +0 -1
  480. package/dist/showcase/assets/circle-check-BkFKejsY.js +0 -1
  481. package/dist/showcase/assets/circle-check-big-vu3Znqdx.js +0 -1
  482. package/dist/showcase/assets/circle-dot-CsBIkbEH.js +0 -1
  483. package/dist/showcase/assets/clock-3-mhWDhdka.js +0 -1
  484. package/dist/showcase/assets/clock-Dd-urPd2.js +0 -1
  485. package/dist/showcase/assets/index-CCxHwV7T.css +0 -2
  486. package/dist/showcase/assets/inertValue-DrANZiJk.js +0 -1
  487. package/dist/showcase/assets/isSameDay-DVP1ae2V.js +0 -1
  488. package/dist/showcase/assets/isToday-CNAQB-p9.js +0 -1
  489. package/dist/showcase/assets/metadata-list-BhlsEWYT.js +0 -1
  490. package/dist/showcase/assets/minus-B1es6KJX.js +0 -1
  491. package/dist/showcase/assets/page-action-button-DMS8Vcmz.js +0 -1
  492. package/dist/showcase/assets/plus-BkhJjfUv.js +0 -1
  493. package/dist/showcase/assets/rotate-ccw-MwEZ1b11.js +0 -1
  494. package/dist/showcase/assets/startOfDay-BKFJecZ3.js +0 -1
  495. package/dist/showcase/assets/trending-up-Kfm5l65O.js +0 -1
  496. package/dist/showcase/assets/useRender-CnmFaF3Y.js +0 -1
  497. package/dist/showcase/assets/user-DLuRcjl0.js +0 -1
  498. package/dist/showcase/assets/x-idpnOHil.js +0 -1
@@ -1,4 +1,4 @@
1
- import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{r,t as i}from"./activities-feed-card-DI4MIm3-.js";import{n as a,p as o,t as s}from"./section-D-N8Ze16.js";import{o as c,r as l,t as u}from"./comment-composer-Dht7nfbv.js";import{t as d}from"./bell-CwRy7zpP.js";import{t as f}from"./box-Bfv5RQBf.js";import{t as p}from"./example-PsbgbESI.js";import{t as m}from"./circle-check-BkFKejsY.js";import{t as h}from"./git-branch-B7XnpQE0.js";import{t as g}from"./message-square-DG0qIsG_.js";import{t as _}from"./receipt-B77_VWtt.js";import{t as v}from"./shield-alert-CxV0S5w0.js";import{t as y}from"./truck-D6SGLjv1.js";import{t as b}from"./user-DLuRcjl0.js";import{d as x}from"./index-QESvAJrb.js";import{t as S}from"./props-table-CCcohuyT.js";var C=e({APISurface:()=>H,ActivityTimelineComposer:()=>U,CompactDensity:()=>W}),w=t(n(),1),T=x(),E=[{id:`maria`,label:`Sarah Smitha`,description:`Head of Operations`,kind:`user`},{id:`ivana`,label:`Davida Todorova`,description:`Refunds Specialist`,kind:`user`},{id:`stefan`,label:`Daniel Kowalski`,description:`Customer`,kind:`user`},{id:`kris`,label:`Kris Dineva`,description:`Engineering`,kind:`user`}],D=[{id:`BKG-2026-0408`,label:`BKG-2026-0408`,description:`Daniel Kowalski · Apr 12 → Apr 14`,kind:`booking`},{id:`BKG-2026-0421`,label:`BKG-2026-0421`,description:`Sarah Smitha · Apr 19 → Apr 22`,kind:`booking`}],O=[{id:`INV-2026-0392`,label:`INV-2026-0392`,description:`€320.00 · Paid`,kind:`order`},{id:`INV-2026-0398`,label:`INV-2026-0398`,description:`€88.50 · Refund pending`,kind:`order`}],k=[{id:`AIR-BALLOON-01`,label:`Hot Air Balloon`,description:`Experience product`,kind:`product`}],A=[{id:`SHP-2026-77`,label:`SHP-2026-77`,description:`Carrier: BoxIt · ETA Apr 17`,kind:`shipment`}],j=[{id:`SPR-Q2-W3`,label:`Sprint Q2-W3`,description:`Refund flows`,kind:`sprint`}],M={user:{icon:b,label:`Person`,trigger:`@`,tone:`info`,buildHref:e=>`/people/${e.id}`},booking:{icon:c,label:`Booking`,trigger:`#`,tone:`success`,buildHref:e=>`/bookings/${e.id}`},order:{icon:_,label:`Order`,trigger:`$`,tone:`warning`,buildHref:e=>`/orders/${e.id}`},product:{icon:f,label:`Product`,tone:`primary`,buildHref:e=>`/products/${e.id}`},shipment:{icon:y,label:`Shipment`,tone:`info`,buildHref:e=>`/shipments/${e.id}`},sprint:{icon:h,label:`Sprint`,tone:`secondary`,buildHref:e=>`/sprints/${e.id}`}};function N(e,t){let n=t===`user`?E:t===`booking`?D:t===`order`?O:t===`product`?k:t===`shipment`?A:j,r=e.trim().toLowerCase();return r.length===0?n:n.filter(e=>e.label.toLowerCase().includes(r)||(e.description??``).toLowerCase().includes(r))}var P={"order:INV-2026-0392":{label:`INV-2026-0392`,href:`#/orders/INV-2026-0392`,icon:_,tone:`primary`,badge:{label:`Paid`,tone:`success`},tags:[`€320`]},"order:INV-2026-0398":{label:`INV-2026-0398`,href:`#/orders/INV-2026-0398`,icon:_,tone:`warning`,badge:{label:`Refund`,tone:`warning`}},"product:AIR-BALLOON-01":{label:`Hot Air Balloon`,href:`#/products/AIR-BALLOON-01`,icon:f,tone:`info`},"shipment:SHP-2026-77":{label:`SHP-2026-77`,href:`#/shipments/SHP-2026-77`,icon:y,tone:`info`,badge:{label:`In transit`,tone:`info`}},"user:stefan":{label:`Daniel Kowalski`,icon:b,tone:`info`},"user:maria":{label:`Sarah Smitha`,icon:b,tone:`info`}},F=Date.now(),I=e=>new Date(F-e).toISOString(),L=60*1e3,R=60*L;function z(e){return{id:e.id,event:`note`,source:`Comment`,actor:e.actor,createdAt:e.createdAt,iconOverride:g,toneOverride:`primary`,segments:[{type:`actor`,text:e.actor.name},{type:`text`,text:`commented`}],description:(0,T.jsx)(l,{html:e.contentHtml,mentions:e.mentions,resources:M}),data:{contentHtml:e.contentHtml,mentions:e.mentions}}}var B=(e,t,n)=>({id:`${e}:${t}`,kind:e,label:n,href:`/${e}s/${t}`}),V=[{id:`act-1`,event:`order_paid`,source:`Payments`,actor:{id:`system`,name:`System`},createdAt:I(48*R),iconOverride:m,toneOverride:`success`,segments:[{type:`actor`,text:`System`},{type:`text`,text:`captured`},{type:`value`,text:`€320.00`},{type:`text`,text:`for`},{type:`resource`,resource:{key:`order:INV-2026-0392`,type:`order`}}]},{id:`act-2`,event:`shipment_dispatched`,source:`Logistics`,createdAt:I(36*R),iconOverride:y,toneOverride:`info`,segments:[{type:`resource`,resource:{key:`shipment:SHP-2026-77`,type:`shipment`}},{type:`text`,text:`dispatched to`},{type:`resource`,resource:{key:`user:stefan`,type:`user`}}],metadata:[{label:`Carrier`,value:`BoxIt`},{label:`ETA`,value:`Apr 17`}]},z({id:`cmt-1`,actor:{id:`maria`,name:`Sarah Smitha`},createdAt:I(2*R),contentHtml:`Approving the refund for <span data-ref-id="user:stefan" data-ref-kind="user">@Daniel Kowalski</span> on <span data-ref-id="booking:BKG-2026-0408" data-ref-kind="booking">BKG-2026-0408</span> — please process before EOD so the payout window doesn't shift.`,mentions:[B(`user`,`stefan`,`Daniel Kowalski`),B(`booking`,`BKG-2026-0408`,`BKG-2026-0408`)]}),{id:`act-3`,event:`policy_overridden`,source:`Audit`,actor:{id:`maria`,name:`Sarah Smitha`},createdAt:I(90*L),iconOverride:v,toneOverride:`warning`,segments:[{type:`actor`,text:`Sarah Smitha`},{type:`text`,text:`overrode policy`},{type:`value`,text:`partial-refund`},{type:`text`,text:`on`},{type:`resource`,resource:{key:`order:INV-2026-0398`,type:`order`}}],metadata:[{label:`Reason`,value:`customer-double-booked`}]},z({id:`cmt-2`,actor:{id:`ivana`,name:`Davida Todorova`},createdAt:I(60*L),contentHtml:`Done — refund issued via the original Visa ending 4242 for <span data-ref-id="order:INV-2026-0398" data-ref-kind="order">INV-2026-0398</span>. ETA Apr 14 per the gateway.`,mentions:[B(`order`,`INV-2026-0398`,`INV-2026-0398`)]}),{id:`act-4`,event:`notification_sent`,source:`Notifications`,createdAt:I(30*L),iconOverride:d,toneOverride:`neutral`,segments:[{type:`text`,text:`Sent email to`},{type:`resource`,resource:{key:`user:stefan`,type:`user`}}]},{id:`act-5`,event:`tag_added`,source:`CRM`,actor:{id:`kris`,name:`Kris Dineva`},createdAt:I(15*L),iconOverride:r,toneOverride:`primary`,segments:[{type:`actor`,text:`Kris Dineva`},{type:`text`,text:`tagged`},{type:`resource`,resource:{key:`user:stefan`,type:`user`}},{type:`text`,text:`as`},{type:`value`,text:`VIP`}]}];function H(){return(0,T.jsxs)(o,{type:`secondary`,className:`max-w-2xl`,children:[`Pass `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`resources`}),` and`,` `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`onResourceSearch`}),` as props on`,` `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`<CommentComposer>`}),`; render`,` `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`<ActivityFeedCard activities={...} />`}),` `,`for the feed. Comments are activities with`,` `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`event="note"`}),` and a description ReactNode rendered via`,` `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`<MentionContent>`}),`.`]})}function U(){let[e,t]=(0,w.useState)(V),n=e=>{t(t=>[z({id:`cmt-${t.length+1}`,actor:{id:`me`,name:`You`},createdAt:new Date().toISOString(),contentHtml:e.content,mentions:(e.references??[]).map(e=>({...e}))}),...t])};return(0,T.jsxs)(`div`,{className:`w-full max-w-2xl space-y-space-lg`,children:[(0,T.jsx)(u,{context:{id:`INV-2026-0398`,type:`order`},canComment:!0,resources:M,onResourceSearch:N,onSubmit:e=>n(e),placeholder:"Add a note — try `@`, `#`, or `$`..."}),(0,T.jsx)(i,{title:`Activity`,activities:e,density:`rich`,resources:P})]})}function W(){let[e]=(0,w.useState)(V);return(0,T.jsx)(`div`,{className:`w-full max-w-2xl`,children:(0,T.jsx)(i,{title:`Recent`,activities:e.slice(0,4),density:`compact`,padding:`small`,resources:P})})}var G=`import {
1
+ import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{t as n}from"./react-sKtkuLrH.js";import{r,t as i}from"./activities-feed-card-bhIATc2O.js";import{n as a,p as o,t as s}from"./section-BPNIPavy.js";import{o as c,r as l,t as u}from"./comment-composer-BI0qnvuY.js";import{t as d}from"./bell-DXBoeAzi.js";import{t as f}from"./box-72m9QSDa.js";import{t as p}from"./example-CJMJcnb4.js";import{t as m}from"./circle-check-C0X85t4j.js";import{t as h}from"./git-branch-BWAuIMOQ.js";import{t as g}from"./message-square-bM29txT3.js";import{t as _}from"./receipt-rgnlMgyi.js";import{t as v}from"./shield-alert-6XO5YZ5u.js";import{t as y}from"./truck-Cl0nyN_j.js";import{t as b}from"./user-BDIP5UPS.js";import{d as x}from"./index-jD-KSiHu.js";import{t as S}from"./props-table-DoDq8Mvr.js";var C=e({APISurface:()=>H,ActivityTimelineComposer:()=>U,CompactDensity:()=>W}),w=t(n(),1),T=x(),E=[{id:`maria`,label:`Sarah Smitha`,description:`Head of Operations`,kind:`user`},{id:`ivana`,label:`Davida Todorova`,description:`Refunds Specialist`,kind:`user`},{id:`stefan`,label:`Daniel Kowalski`,description:`Customer`,kind:`user`},{id:`kris`,label:`Kris Dineva`,description:`Engineering`,kind:`user`}],D=[{id:`BKG-2026-0408`,label:`BKG-2026-0408`,description:`Daniel Kowalski · Apr 12 → Apr 14`,kind:`booking`},{id:`BKG-2026-0421`,label:`BKG-2026-0421`,description:`Sarah Smitha · Apr 19 → Apr 22`,kind:`booking`}],O=[{id:`INV-2026-0392`,label:`INV-2026-0392`,description:`€320.00 · Paid`,kind:`order`},{id:`INV-2026-0398`,label:`INV-2026-0398`,description:`€88.50 · Refund pending`,kind:`order`}],k=[{id:`AIR-BALLOON-01`,label:`Hot Air Balloon`,description:`Experience product`,kind:`product`}],A=[{id:`SHP-2026-77`,label:`SHP-2026-77`,description:`Carrier: BoxIt · ETA Apr 17`,kind:`shipment`}],j=[{id:`SPR-Q2-W3`,label:`Sprint Q2-W3`,description:`Refund flows`,kind:`sprint`}],M={user:{icon:b,label:`Person`,trigger:`@`,tone:`info`,buildHref:e=>`/people/${e.id}`},booking:{icon:c,label:`Booking`,trigger:`#`,tone:`success`,buildHref:e=>`/bookings/${e.id}`},order:{icon:_,label:`Order`,trigger:`$`,tone:`warning`,buildHref:e=>`/orders/${e.id}`},product:{icon:f,label:`Product`,tone:`primary`,buildHref:e=>`/products/${e.id}`},shipment:{icon:y,label:`Shipment`,tone:`info`,buildHref:e=>`/shipments/${e.id}`},sprint:{icon:h,label:`Sprint`,tone:`secondary`,buildHref:e=>`/sprints/${e.id}`}};function N(e,t){let n=t===`user`?E:t===`booking`?D:t===`order`?O:t===`product`?k:t===`shipment`?A:j,r=e.trim().toLowerCase();return r.length===0?n:n.filter(e=>e.label.toLowerCase().includes(r)||(e.description??``).toLowerCase().includes(r))}var P={"order:INV-2026-0392":{label:`INV-2026-0392`,href:`#/orders/INV-2026-0392`,icon:_,tone:`primary`,badge:{label:`Paid`,tone:`success`},tags:[`€320`]},"order:INV-2026-0398":{label:`INV-2026-0398`,href:`#/orders/INV-2026-0398`,icon:_,tone:`warning`,badge:{label:`Refund`,tone:`warning`}},"product:AIR-BALLOON-01":{label:`Hot Air Balloon`,href:`#/products/AIR-BALLOON-01`,icon:f,tone:`info`},"shipment:SHP-2026-77":{label:`SHP-2026-77`,href:`#/shipments/SHP-2026-77`,icon:y,tone:`info`,badge:{label:`In transit`,tone:`info`}},"user:stefan":{label:`Daniel Kowalski`,icon:b,tone:`info`},"user:maria":{label:`Sarah Smitha`,icon:b,tone:`info`}},F=Date.now(),I=e=>new Date(F-e).toISOString(),L=60*1e3,R=60*L;function z(e){return{id:e.id,event:`note`,source:`Comment`,actor:e.actor,createdAt:e.createdAt,iconOverride:g,toneOverride:`primary`,segments:[{type:`actor`,text:e.actor.name},{type:`text`,text:`commented`}],description:(0,T.jsx)(l,{html:e.contentHtml,mentions:e.mentions,resources:M}),data:{contentHtml:e.contentHtml,mentions:e.mentions}}}var B=(e,t,n)=>({id:`${e}:${t}`,kind:e,label:n,href:`/${e}s/${t}`}),V=[{id:`act-1`,event:`order_paid`,source:`Payments`,actor:{id:`system`,name:`System`},createdAt:I(48*R),iconOverride:m,toneOverride:`success`,segments:[{type:`actor`,text:`System`},{type:`text`,text:`captured`},{type:`value`,text:`€320.00`},{type:`text`,text:`for`},{type:`resource`,resource:{key:`order:INV-2026-0392`,type:`order`}}]},{id:`act-2`,event:`shipment_dispatched`,source:`Logistics`,createdAt:I(36*R),iconOverride:y,toneOverride:`info`,segments:[{type:`resource`,resource:{key:`shipment:SHP-2026-77`,type:`shipment`}},{type:`text`,text:`dispatched to`},{type:`resource`,resource:{key:`user:stefan`,type:`user`}}],metadata:[{label:`Carrier`,value:`BoxIt`},{label:`ETA`,value:`Apr 17`}]},z({id:`cmt-1`,actor:{id:`maria`,name:`Sarah Smitha`},createdAt:I(2*R),contentHtml:`Approving the refund for <span data-ref-id="user:stefan" data-ref-kind="user">@Daniel Kowalski</span> on <span data-ref-id="booking:BKG-2026-0408" data-ref-kind="booking">BKG-2026-0408</span> — please process before EOD so the payout window doesn't shift.`,mentions:[B(`user`,`stefan`,`Daniel Kowalski`),B(`booking`,`BKG-2026-0408`,`BKG-2026-0408`)]}),{id:`act-3`,event:`policy_overridden`,source:`Audit`,actor:{id:`maria`,name:`Sarah Smitha`},createdAt:I(90*L),iconOverride:v,toneOverride:`warning`,segments:[{type:`actor`,text:`Sarah Smitha`},{type:`text`,text:`overrode policy`},{type:`value`,text:`partial-refund`},{type:`text`,text:`on`},{type:`resource`,resource:{key:`order:INV-2026-0398`,type:`order`}}],metadata:[{label:`Reason`,value:`customer-double-booked`}]},z({id:`cmt-2`,actor:{id:`ivana`,name:`Davida Todorova`},createdAt:I(60*L),contentHtml:`Done — refund issued via the original Visa ending 4242 for <span data-ref-id="order:INV-2026-0398" data-ref-kind="order">INV-2026-0398</span>. ETA Apr 14 per the gateway.`,mentions:[B(`order`,`INV-2026-0398`,`INV-2026-0398`)]}),{id:`act-4`,event:`notification_sent`,source:`Notifications`,createdAt:I(30*L),iconOverride:d,toneOverride:`neutral`,segments:[{type:`text`,text:`Sent email to`},{type:`resource`,resource:{key:`user:stefan`,type:`user`}}]},{id:`act-5`,event:`tag_added`,source:`CRM`,actor:{id:`kris`,name:`Kris Dineva`},createdAt:I(15*L),iconOverride:r,toneOverride:`primary`,segments:[{type:`actor`,text:`Kris Dineva`},{type:`text`,text:`tagged`},{type:`resource`,resource:{key:`user:stefan`,type:`user`}},{type:`text`,text:`as`},{type:`value`,text:`VIP`}]}];function H(){return(0,T.jsxs)(o,{type:`secondary`,className:`max-w-2xl`,children:[`Pass `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`resources`}),` and`,` `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`onResourceSearch`}),` as props on`,` `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`<CommentComposer>`}),`; render`,` `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`<ActivityFeedCard activities={...} />`}),` `,`for the feed. Comments are activities with`,` `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`event="note"`}),` and a description ReactNode rendered via`,` `,(0,T.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xxs`,children:`<MentionContent>`}),`.`]})}function U(){let[e,t]=(0,w.useState)(V),n=e=>{t(t=>[z({id:`cmt-${t.length+1}`,actor:{id:`me`,name:`You`},createdAt:new Date().toISOString(),contentHtml:e.content,mentions:(e.references??[]).map(e=>({...e}))}),...t])};return(0,T.jsxs)(`div`,{className:`w-full max-w-2xl space-y-space-lg`,children:[(0,T.jsx)(u,{context:{id:`INV-2026-0398`,type:`order`},canComment:!0,resources:M,onResourceSearch:N,onSubmit:e=>n(e),placeholder:"Add a note — try `@`, `#`, or `$`..."}),(0,T.jsx)(i,{title:`Activity`,activities:e,density:`rich`,resources:P})]})}function W(){let[e]=(0,w.useState)(V);return(0,T.jsx)(`div`,{className:`w-full max-w-2xl`,children:(0,T.jsx)(i,{title:`Recent`,activities:e.slice(0,4),density:`compact`,padding:`small`,resources:P})})}var G=`import {
2
2
  Bell,
3
3
  Bookmark,
4
4
  Box,
@@ -1 +1 @@
1
- import{r as e}from"./chunk-QTnfLwEv.js";import{t}from"./react-sKtkuLrH.js";import{p as n,x as r}from"./section-D-N8Ze16.js";import{$ as i,$t as a,Dn as o,Er as s,Ft as c,Gn as l,Gt as u,K as d,Kn as f,Kt as p,Mn as m,Nn as h,O as g,Or as _,P as v,Qt as y,Un as b,Vn as x,Wt as S,X as C,Y as w,Yn as T,Yt as E,_t as D,ar as O,b as ee,cr as k,d as te,dn as A,et as j,f as M,fn as N,fr as P,g as ne,gn as re,gr as F,hr as I,ir as ie,it as ae,lr as oe,m as se,mr as L,mt as ce,nn as le,nr as R,on as ue,or as de,ot as z,pn as B,pr as fe,r as V,rn as pe,rt as H,tn as me,u as he,un as ge,v as _e,vn as ve,xr as U,y as ye,zt as be}from"./example-PsbgbESI.js";import{t as xe}from"./chevron-down-BqrI6QzQ.js";import{t as Se}from"./plus-BkhJjfUv.js";import{t as Ce}from"./x-idpnOHil.js";import{N as we,P as Te,d as Ee,n as W}from"./index-QESvAJrb.js";import{a as De,i as Oe,o as ke,t as Ae}from"./useOpenInteractionType-DQOSh-Eu.js";import{n as je,r as Me,t as Ne}from"./getPseudoElementBounds-CibNto5h.js";import{t as Pe}from"./inertValue-DrANZiJk.js";import{t as Fe}from"./useControlled-BHUji6Sp.js";import{n as Ie,r as Le,t as Re}from"./useCompositeListItem-C_oLUvf8.js";import{t as ze}from"./useAnchoredPopupScrollLock-BavpibMb.js";import{t as Be}from"./useValueChanged-lYlHqRM1.js";import{a as Ve,c as He,d as Ue,l as We,n as Ge,o as Ke,s as qe,t as Je,u as Ye}from"./resolveValueLabel-LRTUaJTb.js";import{a as Xe,c as Ze,i as Qe,n as $e,o as et,r as tt,s as nt,t as rt}from"./LabelableContext-BDyZArAc.js";import{t as it}from"./useLabelableId-DDpjUdIO.js";import{t as at}from"./stringifyLocale-CkHjdQTJ.js";import{n as ot,r as st}from"./resolveAriaLabelledBy-iFo8AzEr.js";import{a as ct,c as lt,l as ut}from"./form-sizing-C3UG5WKC.js";import{t as dt}from"./input-yYoqWQQ7.js";import{t as ft}from"./scroll-area-BkZULoZA.js";var G=e(t(),1);function pt(e,t,n,r,i,a,o,s,l,u=2){let d=c(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:u,disabledIndices:o,minIndex:s,maxIndex:l,prevIndex:t>l?s:t,stopEvent:!0});return be(n.current,d)?void 0:d}var mt=G.createContext(void 0),ht=G.createContext(void 0),gt=G.createContext(void 0),_t=G.createContext(!1),vt=G.createContext(``);function K(){let e=G.useContext(mt);if(!e)throw Error(P(22));return e}function yt(){let e=G.useContext(ht);if(!e)throw Error(P(23));return e}function q(){let e=G.useContext(gt);if(!e)throw Error(P(24));return e}function bt(){return G.useContext(vt)}function xt(){return G.useContext(_t)}var J={id:H(e=>e.id),labelId:H(e=>e.labelId),items:H(e=>e.items),selectedValue:H(e=>e.selectedValue),hasSelectionChips:H(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:H(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:H((e,t)=>t?Je(e.items):!1),open:H(e=>e.open),mounted:H(e=>e.mounted),forceMounted:H(e=>e.forceMounted),inline:H(e=>e.inline),activeIndex:H(e=>e.activeIndex),selectedIndex:H(e=>e.selectedIndex),isActive:H((e,t)=>e.activeIndex===t),isSelected:H((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>qe(t,e,n)):qe(t,r,n)}),transitionStatus:H(e=>e.transitionStatus),popupProps:H(e=>e.popupProps),inputProps:H(e=>e.inputProps),triggerProps:H(e=>e.triggerProps),itemProps:H(e=>e.itemProps),positionerElement:H(e=>e.positionerElement),listElement:H(e=>e.listElement),popupId:H(e=>e.popupId),triggerElement:H(e=>e.triggerElement),inputElement:H(e=>e.inputElement),inputGroupElement:H(e=>e.inputGroupElement),popupSide:H(e=>e.popupSide),openMethod:H(e=>e.openMethod),inputInsidePopup:H(e=>e.inputInsidePopup),inputOwnsFormValue:H(e=>e.inputOwnsFormValue),selectionMode:H(e=>e.selectionMode),name:H(e=>e.name),form:H(e=>e.form),disabled:H(e=>e.disabled),readOnly:H(e=>e.readOnly),required:H(e=>e.required),grid:H(e=>e.grid),virtualized:H(e=>e.virtualized),itemToStringLabel:H(e=>e.itemToStringLabel),isItemEqualToValue:H(e=>e.isItemEqualToValue),modal:H(e=>e.modal),autoHighlight:H(e=>e.autoHighlight),submitOnItemClick:H(e=>e.submitOnItemClick)};function St(e){return e==null?void 0:`${e}-popup`}function Ct(e,t){return(n,r)=>{if(n==null)return!1;let i=Ve(n,t);return e.contains(i,r)}}function wt(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;let a=Ve(r,t),o=n==null?``:Ve(n,t);return o&&e.contains(o,i)&&o.length===i.length?!0:e.contains(a,i)}}var Tt=new Map;function Et(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${at(e.locale)}|${JSON.stringify(t)}`,r=Tt.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=Ve(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=Ve(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=Ve(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return Tt.set(n,a),a}var Dt=Et,Ot=Symbol(`none`),kt={value:Ot,index:-1},Y=Ee();function At(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:s,defaultInputValue:c,inputValue:l,open:f,defaultOpen:p=!1,selectionMode:_=`none`,onItemHighlighted:b,name:x,form:w,disabled:T=!1,readOnly:D=!1,required:ee=!1,inputRef:te,grid:M=!1,items:P,filteredItems:ne,filter:re,openOnInputClick:oe=!0,autoHighlight:ce=!1,keepHighlight:le=!1,highlightItemOnHover:R=!0,loopFocus:ue=!0,itemToStringLabel:V,itemToStringValue:pe,isItemEqualToValue:H=He,virtualized:me=!1,inline:he=!1,fillInputOnItemPress:ge=!0,modal:_e=!1,limit:U=-1,autoComplete:ye=`list`,formAutoComplete:be,locale:xe,submitOnItemClick:Se=!1}=e,{clearErrors:Ce}=$e(),{setDirty:we,validityData:Te,setFilled:Ee,name:W,disabled:Oe,setTouched:ke,setFocused:je,validationMode:Ne,validation:Pe}=et(),Ie=se(),Le=it({id:t}),Re=Dt({locale:xe}),[ze,Je]=G.useState(!1),[Xe,Ze]=G.useState(null),Qe=G.useRef([]),nt=G.useRef([]),rt=G.useRef(null),at=G.useRef(null),ot=G.useRef(null),ct=G.useRef(null),lt=G.useRef(null),ut=G.useRef(!0),dt=G.useRef(!1),ft=G.useRef(null),K=G.useRef(null),yt=G.useRef(null),q=G.useRef(kt),bt=G.useRef(null),xt=G.useRef([]),St=G.useRef([]),Tt=Oe||T,Et=W??x,At=_===`multiple`,jt=_===`single`,Mt=l!==void 0||c!==void 0,Nt=P!==void 0,Pt=ne!==void 0,Ft;Ft=ce===`always`?`always`:ce?`input-change`:!1;let[X,It]=Fe({controlled:o,default:At?r??ie:r,name:`Combobox`,state:`selectedValue`}),Lt=G.useMemo(()=>re===null?()=>!0:re===void 0?jt&&!ze?wt(Re,V,X):Ct(Re,V):re,[re,jt,X,ze,Re,V]),Rt=F(()=>Mt?c??``:jt?Ve(X,V):``).current,[zt,Bt]=Fe({controlled:l,default:Rt,name:`Combobox`,state:`inputValue`}),[Z,Vt]=Fe({controlled:f,default:p,name:`Combobox`,state:`open`}),Ht=Ge(P),Q=Xe??(zt===``?``:String(zt).trim()),Ut=jt?Ve(X,V):``,Wt=jt&&!ze&&Q!==``&&Ut!==``&&Ut.length===Q.length&&Re.contains(Ut,Q),Gt=Wt?``:Q,Kt=Nt&&Pt&&Wt,qt=G.useMemo(()=>P?Ht?P.flatMap(e=>e.items):P:ie,[P,Ht]),Jt=G.useMemo(()=>{if(ne&&!Kt)return ne;if(!P)return ie;if(Ht){let e=P,t=[],n=0;for(let r of e){if(U>-1&&n>=U)break;let e=Gt===``?r.items:r.items.filter(e=>Lt(e,Gt,V));if(e.length===0)continue;let i=U>-1?U-n:1/0,a=e.slice(0,i);if(a.length>0){let e={...r,items:a};t.push(e),n+=a.length}}return t}if(Gt===``)return U>-1?qt.slice(0,U):qt;let e=[];for(let t of qt){if(U>-1&&e.length>=U)break;Lt(t,Gt,V)&&e.push(t)}return e},[ne,Kt,P,Ht,Gt,U,Lt,V,qt]),Yt=G.useMemo(()=>Ht?Jt.flatMap(e=>e.items):Jt,[Jt,Ht]),$=F(()=>new i({id:Le,labelId:void 0,selectedValue:X,open:Z,filter:Lt,query:Q,items:P,selectionMode:_,listRef:Qe,labelsRef:nt,popupRef:rt,emptyRef:lt,inputRef:at,startDismissRef:ot,endDismissRef:ct,keyboardActiveRef:ut,chipsContainerRef:ft,clearRef:K,valuesRef:xt,allValuesRef:St,selectionEventRef:yt,name:Et,form:w,disabled:Tt,readOnly:D,required:ee,grid:M,isGrouped:Ht,virtualized:me,openOnInputClick:oe,itemToStringLabel:V,isItemEqualToValue:H,modal:_e,autoHighlight:Ft,submitOnItemClick:Se,hasInputValue:Mt,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:he,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},itemProps:O,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:_===`none`,onOpenChangeComplete:n||de,setOpen:de,setInputValue:de,setSelectedValue:de,setIndices:de,onItemHighlighted:de,handleSelection:de,forceMount:de,requestSubmit:de})).current,Xt=_===`none`?zt:X,Zt=G.useMemo(()=>_===`none`?Xt:Array.isArray(X)?X.map(e=>Ke(e,pe)):Ke(X,pe),[Xt,pe,_,X]),Qt=I(b),$t=I(n),en=j($,J.activeIndex),tn=j($,J.selectedIndex),nn=j($,J.positionerElement),rn=j($,J.listElement),an=j($,J.triggerElement),on=j($,J.inputElement),sn=j($,J.inputGroupElement),cn=j($,J.inline),ln=j($,J.inputInsidePopup),un=j($,J.inputOwnsFormValue),dn=E(an),{mounted:fn,setMounted:pn,transitionStatus:mn}=C(Z),{openMethod:hn,triggerProps:gn}=Ae(Z),_n=I(()=>Zt);tt(ln?dn:at,Le,Xt,_n,!Tt,x);let vn=I(()=>{P?nt.current=Yt.map(e=>Ve(e,V)):$.set(`forceMounted`,!0)}),yn=G.useRef(X);L(()=>{X!==yn.current&&vn()},[vn,X]);let bn=I(e=>{$.update(e);let t=e.type||`none`;if(e.activeIndex!==void 0)if(e.activeIndex===null)q.current!==kt&&(q.current=kt,Qt(void 0,a(t,void 0,{index:-1})));else{let n=xt.current[e.activeIndex];q.current={value:n,index:e.activeIndex},Qt(n,a(t,void 0,{index:e.activeIndex}))}}),xn=I((t,n)=>{if(dt.current=n.reason===A,e.onInputValueChange?.(t,n),!n.isCanceled){if(n.reason===`input-change`){let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&Je(!0),bt.current={hasQuery:e},e&&Ft&&$.state.activeIndex==null&&$.set(`activeIndex`,0)}}Bt(t)}}),Sn=I((t,n)=>{if(Z!==t&&(n.reason===`escape-key`&&Nt&&Yt.length===0&&!$.state.emptyRef.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&At&&ln&&!cn&&Xe!==null&&(Je(!1),Ze(null),zt!==``&&xn(``,y(A,n.event))),!t&&ze&&(jt?(cn||Ze(Q),Q===``&&Je(!1)):At&&(cn||Ze(Q),ln&&bn({activeIndex:null}),(!ln||cn)&&xn(``,y(A,n.event)))),Vt(t),!t&&ln&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(ke(!0),je(!1),Ne===`onBlur`)))){let e=_===`none`?zt:X;Pe.commit(e)}}),Cn=I((e,t)=>{s?.(e,t),!t.isCanceled&&(It(e),(_===`none`&&rt.current&&ge||jt&&!$.state.inputInsidePopup)&&xn(Ve(e,V),y(t.reason,t.event)),jt&&e!=null&&t.reason!==`input-change`&&ze&&!cn&&Ze(Q))}),wn=I((e,t)=>{let n=t;if(n===void 0){if(en===null)return;n=xt.current[en]}let r=h(e),i=yt.current??e;yt.current=null;let a=y(B,i),o=r?.closest(`a`)?.getAttribute(`href`);if(o){o.startsWith(`#`)&&Sn(!1,a);return}if(At){let e=Array.isArray(X)?X:[];if(Cn(Ue(e,n,$.state.isItemEqualToValue)?Ye(e,n,$.state.isItemEqualToValue):[...e,n],a),a.isCanceled||!(at.current&&at.current.value.trim()!==``))return;$.state.inputInsidePopup?xn(``,y(A,a.event)):Sn(!1,a)}else{if(Cn(n,a),a.isCanceled)return;Sn(!1,a)}}),Tn=I(()=>{if(!$.state.submitOnItemClick)return;let e=Pe.inputRef.current?.form??$.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),En=I(()=>{if(pn(!1),$t?.(!1),Je(!1),Ze(null),bn(_===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),At&&at.current&&at.current.value!==``&&!dt.current&&xn(``,y(A)),jt)if($.state.inputInsidePopup)at.current&&at.current.value!==``&&xn(``,y(A));else{let e=Ve(X,V);at.current&&at.current.value!==e&&xn(e,y(e===``?A:ve))}}),Dn=G.useMemo(()=>cn&&nn?{current:nn.closest(`[role="dialog"]`)}:rt,[cn,nn]);d({enabled:!e.actionsRef,open:Z,ref:Dn,onComplete(){Z||En()}}),G.useImperativeHandle(e.actionsRef,()=>({unmount:En}),[En]),L(function(){if(Z||_===`none`)return;let e=P?qt:St.current;if(At){let t=Array.isArray(X)?X:[],n=t[t.length-1],r=We(e,n,H);bn({selectedIndex:r===-1?null:r})}else{let t=We(e,X,H);bn({selectedIndex:t===-1?null:t})}},[Z,X,P,_,qt,At,H,bn]),L(()=>{P&&(xt.current=Yt,Qe.current.length=Yt.length)},[P,Yt]),L(()=>{let e=bt.current;if(e&&(e.hasQuery?Ft&&$.set(`activeIndex`,0):Ft===`always`&&$.set(`activeIndex`,0),bt.current=null),!Z&&!cn)return;let t=Nt||Pt?Yt:xt.current,n=$.state.activeIndex;if(n==null){if(Ft===`always`&&t.length>0){$.set(`activeIndex`,0);return}q.current!==kt&&(q.current=kt,$.state.onItemHighlighted(void 0,a(ve,void 0,{index:-1})));return}if(n>=t.length){q.current!==kt&&(q.current=kt,$.state.onItemHighlighted(void 0,a(ve,void 0,{index:-1}))),$.set(`activeIndex`,null);return}let r=t[n],i=q.current.value,o=i!==Ot&&qe(r,i,$.state.isItemEqualToValue);(q.current.index!==n||!o)&&(q.current={value:r,index:n},$.state.onItemHighlighted(r,a(ve,void 0,{index:n})))},[en,Ft,Pt,Nt,Yt,cn,Z,$]),L(()=>{if(_===`none`){Ee(String(zt)!==``);return}Ee(At?Array.isArray(X)&&X.length>0:X!=null)},[Ee,_,zt,X,At]),G.useEffect(()=>{Nt&&Ft&&Yt.length===0&&bn({activeIndex:null})},[Nt,Ft,Yt.length,bn]);function On(e){let t=Te.initialValue;return Array.isArray(e)&&Array.isArray(t)?!st(e,t,(e,t)=>qe(e,t,H)):e!==t}Be(Q,()=>{!Z||Q===``||Q===String(Rt)||Je(!0)}),Be(X,()=>{if(_!==`none`&&(Ce(Et),we(On(X)),Pe.change(X),jt&&!Mt&&!ln)){let e=Ve(X,V);zt!==e&&xn(e,y(ve))}}),Be(zt,()=>{_===`none`&&(Ce(Et),we(zt!==Te.initialValue),Pe.change(zt))}),Be(P,()=>{if(!jt||Mt||ln||ze)return;let e=Ve(X,V);zt!==e&&xn(e,y(ve))});let kn=g({open:cn?!0:Z,onOpenChange:Sn,elements:{reference:ln?an:on,floating:nn}}),An,jn;cn||(An=M?`grid`:`listbox`,jn=Z?`true`:`false`);let Mn=G.useMemo(()=>{let e=on?.tagName===`INPUT`,t=on==null||e,n=t||Z,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=jn,r[`aria-haspopup`]=An,r[`aria-controls`]=Z?rn?.id:void 0,r[`aria-autocomplete`]=ye),{reference:r,floating:{role:`presentation`}}},[on,Z,jn,An,rn?.id,ye]),Nn=De(kn,{enabled:!D&&!Tt&&oe,event:`mousedown-only`,toggle:!1,touchOpenDelay:ln?0:100,reason:N}),Pn=z(kn,{enabled:!D&&!Tt&&!cn,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:cn?!0:void 0,outsidePress(e){let t=h(e);return!m(an,t)&&!m(K.current,t)&&!m(ft.current,t)&&!m(sn,t)}}),Fn=Me(kn,{enabled:!D&&!Tt,id:Le,listRef:Qe,activeIndex:en,selectedIndex:tn,virtual:!0,loopFocus:ue,allowEscape:ue&&!Ft,focusItemOnOpen:ze||_===`none`&&!Ft?!1:`auto`,focusItemOnHover:R,resetOnPointerLeave:!le,orientation:M?`horizontal`:void 0,rtl:Ie===`rtl`,disabledIndices:ie,grid:M?pt:void 0,onNavigate(e,t){!t&&!Z||mn===`ending`||bn(t?{activeIndex:e,type:ut.current?`keyboard`:`pointer`}:{activeIndex:e})}}),In=G.useMemo(()=>fe(Fn.reference,{onKeyDown(e){M&&$.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},Pn.reference,Nn.reference,Mn.reference),[Fn.reference,Pn.reference,Nn.reference,Mn.reference,M,$]),Ln=G.useMemo(()=>fe(v,Fn.floating,Pn.floating,Mn.floating),[Fn.floating,Pn.floating,Mn.floating]),Rn=G.useMemo(()=>{let e=Fn.item;return e?{...e,onFocus:void 0}:O},[Fn.item]);ae(()=>{$.update({inline:he,popupProps:Ln,inputProps:In,triggerProps:gn,itemProps:Rn,setOpen:Sn,setInputValue:xn,setSelectedValue:Cn,setIndices:bn,onItemHighlighted:Qt,handleSelection:wn,forceMount:vn,requestSubmit:Tn})}),L(()=>{$.update({id:Le,selectedValue:X,open:Z,mounted:fn,transitionStatus:mn,items:P,inline:he,popupProps:Ln,inputProps:In,triggerProps:gn,openMethod:hn,itemProps:Rn,selectionMode:_,name:Et,form:w,disabled:Tt,readOnly:D,required:ee,grid:M,isGrouped:Ht,virtualized:me,onOpenChangeComplete:$t,openOnInputClick:oe,itemToStringLabel:V,modal:_e,autoHighlight:Ft,isItemEqualToValue:H,submitOnItemClick:Se,hasInputValue:Mt,requestSubmit:Tn,inputOwnsFormValue:_===`none`&&(he||!$.state.inputInsidePopup)})},[$,Le,X,Z,fn,mn,P,Ln,In,Rn,hn,gn,_,Et,Tt,D,ee,Pe,M,Ht,me,$t,oe,V,_e,H,Se,Mt,he,Tn,Ft,w]);let zn=k(te,Pe.inputRef),Bn=G.useMemo(()=>({query:Q,hasItems:Nt,filteredItems:Jt,flatFilteredItems:Yt}),[Q,Nt,Jt,Yt]),Vn=G.useMemo(()=>Array.isArray(Xt)?``:Ke(Xt,pe),[Xt,pe]),Hn=At&&Array.isArray(X)&&X.length>0,Un=At||_===`none`&&un?void 0:Et,Wn=G.useMemo(()=>!At||!Array.isArray(X)||!Et?null:X.map(e=>{let t=Ke(e,pe);return(0,Y.jsx)(`input`,{type:`hidden`,form:w,name:Et,value:t,disabled:Tt},t)}),[At,X,w,Et,pe,Tt]),Gn=(0,Y.jsxs)(G.Fragment,{children:[e.children,(0,Y.jsx)(`input`,{...Pe.getValidationProps(Tt,{onFocus(){if(ln){an?.focus();return}(at.current||an)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||Tt||D)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=y(ve,e.nativeEvent),i=()=>xt.current.findIndex(e=>Ke(e,pe).toLowerCase()===n||Ve(e,V).toLowerCase()===n);function a(){if(At)return;if(_===`none`){xn(t,r);return}let e=i();e===-1&&(e=xt.current.findIndex((e,t)=>{let r=nt.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:xt.current[e];a!=null&&Cn?.(a,r)}jt&&(vn(),P&&i()===-1&&$.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:Le&&Un==null?`${Le}-hidden-input`:void 0,form:w,name:Un,autoComplete:be,disabled:Tt,required:ee&&!Hn,readOnly:D,value:Vn,ref:zn,style:Un?u:S,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Wn]});return(0,Y.jsx)(mt.Provider,{value:$,children:(0,Y.jsx)(ht.Provider,{value:kn,children:(0,Y.jsx)(_t.Provider,{value:Nt,children:(0,Y.jsx)(gt.Provider,{value:Bn,children:(0,Y.jsx)(vt.Provider,{value:zt,children:Gn})})})})})}function jt(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,Y.jsx)(At,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var Mt={...ye,...Ze,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":``}:null},Nt=G.createContext(void 0);function Pt(){return G.useContext(Nt)}var Ft=G.createContext(void 0);function X(e){let t=G.useContext(Ft);if(t===void 0&&!e)throw Error(P(21));return t}var It=G.forwardRef(function(e,t){let n=K(),{buttonRef:r,getButtonProps:i}=oe({native:!1}),a=k(t,r);function o(e){n.state.setOpen(!1,y(pe,e.nativeEvent,e.currentTarget))}return(0,Y.jsx)(`span`,{ref:a,...i({onClick:o}),"aria-label":`Dismiss`,tabIndex:void 0,style:u})}),Lt=G.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:u,setTouched:d,setFocused:f,validationMode:p,validation:m}=et(),{labelId:h}=rt(),g=Pt(),_=!!X(!0),v=K(),{filteredItems:S}=q(),C=bt(),w=se(),T=j(v,J.required),E=j(v,J.disabled),D=j(v,J.readOnly),O=j(v,J.name),ee=j(v,J.form),k=j(v,J.selectionMode),te=j(v,J.autoHighlight),M=j(v,J.inputProps),N=j(v,J.triggerProps),P=j(v,J.open),re=j(v,J.mounted),F=j(v,J.selectedValue),ie=j(v,J.popupSide),ae=j(v,J.positionerElement),oe=j(v,J.id),L=j(v,J.inline),ce=j(v,J.modal),le=!!te,de=re&&ae?ie:null,z=u||E||i,B=S.length===0,fe=_||L,V=!fe||ce,pe=ne(a??(fe?void 0:oe)),H=ot(h,void 0),me=_?nt:c,[he,_e]=G.useState(null),U=G.useRef(!1),ye=G.useRef(null),be=G.useRef(!1),xe=k===`none`&&!_,Se=I(e=>{let t=_||v.state.inline;t&&!v.state.hasInputValue&&v.state.setInputValue(``,y(ve)),v.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:xe})}),Ce=_||!m?s:m.getValidationProps(z,s),we={...me,open:P,disabled:z,readOnly:D,popupSide:de,listEmpty:B};function Te(e){if(!g)return;let t,{highlightedChipIndex:n}=g,r=g.chipsRef.current.length,i=w===`rtl`,a=i?`ArrowRight`:`ArrowLeft`,o=i?`ArrowLeft`:`ArrowRight`;if(n!==void 0){if(e.key===a)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===o)e.preventDefault(),t=n<r-1?n+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let r=n>=F.length-1?F.length-2:n;t=r>=0?r:void 0,v.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`})}return t}return e.key===a&&(e.currentTarget.selectionStart??0)===0&&F.length>0?(e.preventDefault(),t=r>0?r-1:void 0):e.key===`Backspace`&&e.currentTarget.value===``&&F.length>0&&(v.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),e.preventDefault()),t}let Ee=R(`input`,e,{state:we,ref:[t,v.state.inputRef,Se],props:[M,N,{type:`text`,value:e.value??he??C,"aria-readonly":D||void 0,"aria-required":T||void 0,"aria-labelledby":H,disabled:z,readOnly:D,required:k===`none`?T:void 0,form:ee,...xe&&O&&{name:O},id:pe,onFocus(){if(f(!0),!L||!be.current)return;be.current=!1;let e=ye.current;e==null||!Object.hasOwn(v.state.valuesRef.current,e)||v.state.setIndices({activeIndex:e})},onBlur(){d(!0),f(!1);let e=v.state.activeIndex;if(L&&e!==null&&te!==`always`&&(ye.current=e,be.current=!0,v.state.setIndices({activeIndex:null})),p===`onBlur`){let e=k===`none`?C:F;m.commit(e)}},onCompositionStart(e){l||(U.current=!0,_e(e.currentTarget.value))},onCompositionEnd(e){U.current=!1;let t=e.currentTarget.value;_e(null),v.state.setInputValue(t,y(ge,e.nativeEvent))},onChange(e){let t=e.nativeEvent.inputType,n=!t||t===`insertReplacementText`,r=U.current||!n;if(U.current){let t=e.currentTarget.value;_e(t),t===``&&!v.state.openOnInputClick&&!v.state.inputInsidePopup&&v.state.setOpen(!1,y(A,e.nativeEvent));let n=t.trim(),i=le&&n!==``;!D&&!z&&n&&r&&(v.state.setOpen(!0,y(ge,e.nativeEvent)),le||v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?`keyboard`:`pointer`})),P&&v.state.activeIndex!==null&&!i&&v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?`keyboard`:`pointer`});return}let i=y(ge,e.nativeEvent);if(v.state.setInputValue(e.currentTarget.value,i),i.isCanceled)return;let a=e.currentTarget.value===``,o=y(A,e.nativeEvent);a&&!v.state.inputInsidePopup&&(k===`single`&&v.state.setSelectedValue(null,o),v.state.openOnInputClick||v.state.setOpen(!1,o));let s=e.currentTarget.value.trim();!D&&!z&&s&&r&&(v.state.setOpen(!0,y(ge,e.nativeEvent)),le||v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?`keyboard`:`pointer`})),P&&v.state.activeIndex!==null&&!le&&v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?`keyboard`:`pointer`})},onKeyDown(e){if(z||D||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;v.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=w===`rtl`;if(e.key===`Home`){x(e);let n=b&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){x(e);let i=b&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!re&&e.key===`Escape`){let t=k===`multiple`&&Array.isArray(F)?F.length===0:F===null,n=y(ue,e.nativeEvent),r=k===`multiple`?[]:null;v.state.setInputValue(``,n),v.state.setSelectedValue(r,n),!t&&!v.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(g&&e.key===`Backspace`&&t.value===``&&g.highlightedChipIndex===void 0&&Array.isArray(F)&&F.length>0){let t=g.chipsRef.current.length,n=t>0?t-1:F.length-1,r=F.filter((e,t)=>t!==n);v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?`keyboard`:`pointer`}),v.state.setSelectedValue(r,y(ve,e.nativeEvent));return}let i=g?.highlightedChipIndex!==void 0,a=Te(e);if(g?.setHighlightedChipIndex(a),a===void 0?i&&v.state.inputRef.current?.focus():g?.chipsRef.current[a]?.focus(),e.which!==229&&e.key===`Enter`&&P){let t=v.state.activeIndex,n=e.nativeEvent;if(t===null){if(L)return;v.state.setOpen(!1,y(ve,n));return}x(e);let r=v.state.listRef.current[t];r&&(v.state.selectionEventRef.current=n,r.click(),v.state.selectionEventRef.current=null)}},onPointerMove(){v.state.keyboardActiveRef.current=!1},onPointerDown(){v.state.keyboardActiveRef.current=!1}},Ce],stateAttributesMapping:Mt}),W=_?(0,Y.jsx)(Xe.Provider,{value:Qe,children:Ee}):Ee;return(0,Y.jsxs)(G.Fragment,{children:[P&&V&&(0,Y.jsx)(It,{ref:v.state.startDismissRef}),W]})}),Rt=e(Te(),1);function zt(e,t,n,r,i){if(e.baseUIHandlerPrevented||r)return;let a=h(e.nativeEvent),s=U(a)?a:null;s!==e.currentTarget&&(i?.(s)||o(s))||(e.preventDefault(),!n&&(t.state.inputRef.current?.focus(),t.state.openOnInputClick&&t.state.setOpen(!0,y(N,e.nativeEvent))))}var Bt=2,Z=G.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:s,...c}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:g,validation:_}=et(),{labelId:v}=rt(),b=K(),{filteredItems:S}=q(),C=j(b,J.selectionMode),w=j(b,J.disabled),E=j(b,J.readOnly),D=j(b,J.required),O=j(b,J.mounted),ee=j(b,J.popupSide),k=j(b,J.positionerElement),te=j(b,J.listElement),A=j(b,J.popupId),M=j(b,J.triggerProps),N=j(b,J.triggerElement),P=j(b,J.inputInsidePopup),ne=j(b,J.id),F=j(b,J.labelId),ie=j(b,J.open),ae=j(b,J.selectedValue),se=j(b,J.activeIndex),L=j(b,J.selectedIndex),ce=j(b,J.hasSelectedValue),le=yt(),ue=bt(),de=T(),z=u||w||a,B=S.length===0,fe=O&&k?ee:null;it({id:P?o:void 0});let V=P?o??ne:o,pe=ot(v,F),H;ie&&P?H=A??St(ne):ie&&(H=te?.id);let me=G.useRef(``);function he(e){me.current=e.pointerType}let ge=le.useState(`domReferenceElement`);G.useEffect(()=>{P&&N&&N!==ge&&le.set(`domReferenceElement`,N)},[N,ge,le,P]);let{reference:_e}=je(le,{enabled:!ie&&!E&&!w&&C===`single`,listRef:b.state.labelsRef,activeIndex:se,selectedIndex:L,onMatch(e){let t=b.state.valuesRef.current[e];t!==void 0&&b.state.setSelectedValue(t,y(`none`))}}),{reference:ve}=De(le,{enabled:!E&&!w,event:`mousedown`}),{buttonRef:U,getButtonProps:ye}=oe({native:i,disabled:z}),be={...l,open:ie,disabled:z,popupSide:fe,listEmpty:B,placeholder:C===`none`?!1:!ce};return R(`button`,e,{ref:[t,U,I(e=>{b.set(`triggerElement`,e)})],state:be,props:[M,ve,_e,{id:V,tabIndex:P?0:-1,role:P?`combobox`:void 0,"aria-expanded":ie?`true`:`false`,"aria-haspopup":P?`dialog`:`listbox`,"aria-controls":H,"aria-required":P&&D||void 0,"aria-labelledby":pe,onPointerDown:he,onPointerEnter:he,onFocus(){f(!0),!(z||E)&&de.start(0,b.state.forceMount)},onBlur(e){if(!m(k,e.relatedTarget)&&(d(!0),f(!1),g===`onBlur`)){let e=C===`none`?ue:ae;_.commit(e)}},onMouseDown(e){if(z||E||(P||le.set(`domReferenceElement`,e.currentTarget),b.state.forceMount(),me.current!==`touch`&&(b.state.inputRef.current?.focus(),P||e.preventDefault()),ie))return;let t=p(e.currentTarget);function n(e){if(!N)return;let t=h(e),n=b.state.positionerElement,r=b.state.listElement;if(m(N,t)||m(n,t)||m(r,t)||t===N)return;let i=Ne(N),a=e.clientX>=i.left-Bt&&e.clientX<=i.right+Bt,o=e.clientY>=i.top-Bt&&e.clientY<=i.bottom+Bt;a&&o||b.state.setOpen(!1,y(`cancel-open`,e))}P&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){z||E||(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(x(e),b.state.setOpen(!0,y(re,e.nativeEvent)),b.state.inputRef.current?.focus())}},_?_.getValidationProps(z,c):c,ye],stateAttributesMapping:Mt})}),Vt=G.createContext(null);function Ht(){return G.useContext(Vt)}function Q(e){let{children:t,items:n}=e,r=G.useMemo(()=>({items:n}),[n]);return(0,Y.jsx)(Vt.Provider,{value:r,children:t})}function Ut(e){let{children:t}=e,{filteredItems:n}=q(),r=Ht(),i=r?r.items:n;return i?(0,Y.jsx)(G.Fragment,{children:i.map(t)}):null}var Wt=G.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=K(),l=yt(),u=!!X(!0),{filteredItems:d,hasItems:f}=q(),p=j(c,J.selectionMode),m=j(c,J.grid),h=j(c,J.popupProps),g=j(c,J.virtualized),_=j(c,J.forceMounted),v=p===`multiple`,y=d.length===0,b=I(e=>{c.set(`positionerElement`,e)}),S=I(e=>{c.set(`listElement`,e)}),C=G.useMemo(()=>typeof o==`function`?n||=(0,Y.jsx)(Ut,{children:o}):o,[o]),w={empty:y},T=l.useState(`floatingId`),E=R(`div`,e,{state:w,ref:[t,S,u?null:b],props:[h,{children:C,tabIndex:-1,id:T,role:m?`grid`:`listbox`,"aria-multiselectable":v?`true`:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;x(e);let n=e.nativeEvent,r=c.state.listRef.current[t];r&&(c.state.selectionEventRef.current=n,r.click(),c.state.selectionEventRef.current=null)}},onKeyDownCapture(){c.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.state.keyboardActiveRef.current=!1}},s]});if(g)return E;let D=f&&!_?void 0:c.state.labelsRef;return(0,Y.jsx)(Le,{elementsRef:c.state.listRef,labelsRef:D,children:E})}),Gt=`⁠`;function Kt(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function qt(){let e=T(),t=G.useRef(null);return G.useEffect(()=>{if(f)return;let n=t.current;if(n==null)return;let r=Kt(n);if(r==null)return;let i=r.nodeValue??``,a=`${i}${Gt}`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=i)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=i)}},[t,e]),t}var Jt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e;return R(`div`,e,{ref:[t,qt()],props:[{children:a,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),Yt=G.createContext(void 0);function $(){let e=G.useContext(Yt);if(e===void 0)throw Error(P(20));return e}var Xt=G.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=K(),a=j(i,J.mounted),o=j(i,J.forceMounted);return a||n||o?(0,Y.jsx)(Yt.Provider,{value:n,children:(0,Y.jsx)(ce,{ref:t,...r})}):null}),Zt=G.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=D,style:g,..._}=e,v=K(),{filteredItems:y}=q(),b=yt(),x=$(),S=j(v,J.modal),C=j(v,J.open),w=j(v,J.mounted),T=j(v,J.openMethod),E=j(v,J.positionerElement),O=j(v,J.triggerElement),ee=j(v,J.inputElement),k=j(v,J.inputGroupElement),te=j(v,J.inputInsidePopup),A=j(v,J.transitionStatus),N=y.length===0,P=M({anchor:i??(te?O:k??ee),floatingRootContext:b,positionMethod:a,mounted:w,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:x,collisionAvoidance:h,lazyFlip:!0});ze(C&&S,T===`touch`,E,O);let ne={open:C,side:P.side,align:P.align,anchorHidden:P.anchorHidden,empty:N};L(()=>{v.set(`popupSide`,P.side)},[v,P.side]);let re=I(e=>{v.set(`positionerElement`,e)}),F=he(e,ne,{styles:P.positionerStyles,transitionStatus:A,props:_,refs:[t,re],hidden:!w,inert:!C});return(0,Y.jsxs)(Ft.Provider,{value:P,children:[w&&S&&(0,Y.jsx)(Oe,{inert:Pe(!C),cutout:k??ee??O}),F]})}),Qt={..._e,...w},$t=G.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=K(),l=X(),u=yt(),{filteredItems:f}=q(),p=j(c,J.mounted),g=j(c,J.open),_=j(c,J.openMethod),v=j(c,J.transitionStatus),y=j(c,J.inputInsidePopup),b=j(c,J.inputElement),x=j(c,J.modal),S=j(c,J.id),C=f.length===0,w=s.id??(y?St(S):void 0);L(()=>(c.set(`popupId`,c.state.popupRef.current?.id||w),()=>{c.set(`popupId`,void 0)}),[c,w]),d({open:g,ref:c.state.popupRef,onComplete(){g&&c.state.onOpenChangeComplete(!0)}});let T=R(`div`,e,{state:{open:g,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:v,empty:C},ref:[t,c.state.popupRef],props:[{id:w,role:y?`dialog`:`presentation`,tabIndex:-1,onFocus(e){let t=h(e.nativeEvent);_!==`touch`&&(m(c.state.listElement,t)||t===e.currentTarget)&&c.state.inputRef.current?.focus()}},te(v),s],stateAttributesMapping:Qt}),E=a===void 0?y?e=>e===`touch`?c.state.popupRef.current:b:!1:a,D;D=o??(y?void 0:!1);let O=!y||x;return(0,Y.jsx)(ke,{context:u,disabled:!p,modal:O,openInteractionType:_,initialFocus:E,returnFocus:D,getInsideElements:()=>[c.state.startDismissRef.current,c.state.endDismissRef.current],children:(0,Y.jsxs)(G.Fragment,{children:[T,O&&(0,Y.jsx)(It,{ref:c.state.endDismissRef})]})})}),en=G.createContext(void 0);function tn(){let e=G.useContext(en);if(e===void 0)throw Error(P(18));return e}var nn=G.forwardRef(function(e,t){let{render:n,className:r,style:i,items:a,...o}=e,[s,c]=G.useState(),l=G.useMemo(()=>({labelId:s,setLabelId:c,items:a}),[s,c,a]),u=R(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":s},o]}),d=(0,Y.jsx)(en.Provider,{value:l,children:u});return a?(0,Y.jsx)(Q,{items:a,children:d}):d}),rn=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=tn(),c=ne(a);return L(()=>(s(c),()=>{s(void 0)}),[c,s]),R(`div`,e,{ref:t,props:[{id:c},o]})}),an=G.createContext(void 0);function on(){let e=G.useContext(an);if(!e)throw Error(P(19));return e}var sn=G.createContext(!1);function cn(){return G.useContext(sn)}function ln(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:d=!1,...f}=t,p=G.useRef(!1),m=G.useRef(null),h=Ie({index:l,textRef:m,indexGuessBehavior:Re.GuessFromOrder}),g=K(),_=cn(),v=xt(),y=j(g,J.open),b=j(g,J.selectionMode),x=j(g,J.readOnly),S=j(g,J.isItemEqualToValue),C=b!==`none`,w=l??(r?i??-1:h.index),T=h.index!==-1,E=j(g,J.id),D=j(g,J.isActive,w),O=j(g,J.isSelected,c),ee=j(g,J.itemProps),k=G.useRef(null),te=E!=null&&T?`${E}-${w}`:void 0,A=O&&C;L(()=>{if(!(T&&(r||l!=null)))return;let e=g.state.listRef.current;return e[w]=k.current,()=>{delete e[w]}},[T,r,w,l,g]),L(()=>{if(!T||v)return;let e=g.state.valuesRef.current;return e[w]=c,b!==`none`&&g.state.allValuesRef.current.push(c),()=>{delete e[w]}},[T,v,w,c,g,b]),L(()=>{if(!y){p.current=!1;return}if(!T||v)return;let e=g.state.selectedValue;qe(c,Array.isArray(e)?e[e.length-1]:e,S)&&g.set(`selectedIndex`,w)},[T,v,y,g,w,c,S]);let{getButtonProps:M,buttonRef:N}=oe({disabled:u,focusableWhenDisabled:!0,native:d,composite:!0}),P={disabled:u,selected:A,highlighted:D};function ne(e){function t(){g.state.handleSelection(e,c)}g.state.submitOnItemClick?(Rt.flushSync(t),g.state.requestSubmit()):t()}let re={id:te,role:_?`gridcell`:`option`,"aria-selected":C?A:void 0,tabIndex:void 0,onPointerDownCapture(e){p.current=!0,e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){u||x||ne(e.nativeEvent)},onMouseUp(e){let t=p.current;p.current=!1,!(u||x||e.button!==0||t||!D)&&ne(e.nativeEvent)}},F=R(`div`,t,{ref:[N,n,h.ref,k],state:P,props:[ee,re,f,M]}),I=G.useMemo(()=>({selected:A,textRef:m}),[A,m]);return(0,Y.jsx)(an.Provider,{value:I,children:F})}function un(e){let{componentProps:t,forwardedRef:n}=e,r=j(K(),J.isItemEqualToValue),{flatFilteredItems:i}=q();return(0,Y.jsx)(ln,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:We(i,t.value??null,r)})}var dn=G.memo(G.forwardRef(function(e,t){let n=j(K(),J.virtualized);return n&&e.index==null?(0,Y.jsx)(un,{componentProps:e,forwardedRef:t}):(0,Y.jsx)(ln,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),fn=G.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=on();return n||r?(0,Y.jsx)(pn,{...e,ref:t}):null}),pn=G.memo(G.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=on(),c=G.useRef(null),{transitionStatus:l,setMounted:u}=C(s),f=R(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:w});return d({open:s,ref:c,onComplete(){s||u(!1)}}),f})),mn=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=K(),s=j(o,J.open),c=j(o,J.hasSelectionChips),[l,u]=G.useState(void 0);s&&l!==void 0&&u(void 0);let d=G.useRef([]),f=R(`div`,e,{ref:[t,o.state.chipsContainerRef],props:[c?{role:`toolbar`}:O,{onMouseDown(e){zt(e,o,o.state.disabled,o.state.readOnly)}},a]}),p=G.useMemo(()=>({highlightedChipIndex:l,setHighlightedChipIndex:u,chipsRef:d}),[l,u,d]);return(0,Y.jsx)(Nt.Provider,{value:p,children:(0,Y.jsx)(Le,{elementsRef:d,children:f})})}),hn=G.createContext(void 0);function gn(){let e=G.useContext(hn);if(!e)throw Error(P(17));return e}var _n=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=K(),{setHighlightedChipIndex:s,chipsRef:c}=Pt(),l=se(),u=j(o,J.disabled),d=j(o,J.readOnly),f=j(o,J.selectedValue),{ref:p,index:m}=Ie();function h(e){let t=m,n=l===`rtl`,r=n?`ArrowRight`:`ArrowLeft`,i=n?`ArrowLeft`:`ArrowRight`;if(e.key===r)e.preventDefault(),t=m>0?m-1:void 0;else if(e.key===i)e.preventDefault(),t=m<c.current.length-1?m+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){let n=m>=f.length-1?f.length-2:m;t=n>=0?n:void 0,x(e),o.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),o.state.setSelectedValue(f.filter((e,t)=>t!==m),y(ve,e.nativeEvent))}else e.key===`Enter`||e.key===` `?(x(e),t=void 0):e.key===`ArrowDown`||e.key===`ArrowUp`?(x(e),o.state.setOpen(!0,y(re,e.nativeEvent)),t=void 0):e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&(t=void 0);return t}let g=R(`div`,e,{ref:[t,p],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":d||void 0,onKeyDown(e){if(u||d)return;let t=h(e);Rt.flushSync(()=>{s(t)}),t===void 0?o.state.inputRef.current?.focus():c.current[t]?.focus()}},a]}),_=G.useMemo(()=>({index:m}),[m]);return(0,Y.jsx)(hn.Provider,{value:_,children:g})}),vn=G.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,style:o,...s}=e,c=K(),{index:l}=gn(),u=j(c,J.disabled),d=j(c,J.readOnly),f=j(c,J.selectedValue),p=j(c,J.isItemEqualToValue),m=u||i,{buttonRef:h,getButtonProps:g}=oe({native:a,disabled:m||d,focusableWhenDisabled:!0}),_={disabled:m};function v(e){let t=c.state.activeIndex;if(t==null)return;let n=We(c.state.valuesRef.current,e,p);n!==-1&&t===n&&c.state.setIndices({activeIndex:null,type:c.state.keyboardActiveRef.current?`keyboard`:`pointer`})}function b(e){let t=y(me,e.nativeEvent),n=f[l];return v(n),c.state.setSelectedValue(f.filter((e,t)=>t!==l),t),c.state.inputRef.current?.focus(),t}return R(`button`,e,{ref:[t,h],state:_,props:[{tabIndex:-1,onMouseDown(e){e.preventDefault()},onClick(e){m||d||b(e).isPropagationAllowed||e.stopPropagation()},onKeyDown(e){m||d||(e.key===`Enter`||e.key===` `)&&(b(e).isPropagationAllowed||x(e))}},s,g]})}),yn=G.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=q(),c=K(),l=qt(),u=s.length===0?a:null;return R(`div`,e,{ref:[t,c.state.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),bn={...w,...ee},xn=G.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:s,...c}=e,{disabled:l}=et(),u=K(),f=j(u,J.selectionMode),p=j(u,J.disabled),m=j(u,J.readOnly),h=j(u,J.open),g=j(u,J.selectedValue),_=j(u,J.hasSelectionChips),v=bt(),b=!1;b=f===`none`?v!==``:f===`single`?g!=null:_;let x=l||p||i,{buttonRef:S,getButtonProps:w}=oe({native:a,disabled:x}),{mounted:T,transitionStatus:E,setMounted:D}=C(b),O={disabled:x,visible:b,open:h,transitionStatus:E};d({open:b,ref:u.state.clearRef,onComplete(){b||D(!1)}});let ee=R(`button`,e,{state:O,ref:[t,S,u.state.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(x||m)return;let t=u.state.keyboardActiveRef;u.state.setInputValue(``,y(le,e.nativeEvent)),f===`none`?u.state.setIndices({activeIndex:null,type:t.current?`keyboard`:`pointer`}):(u.state.setSelectedValue(Array.isArray(g)?[]:null,y(le,e.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:t.current?`keyboard`:`pointer`})),u.state.inputRef.current?.focus()}},c,w],stateAttributesMapping:bn});return o||T?ee:null}),Sn=jt,Cn=Xt;function wn({className:e,sideOffset:t=4,...n}){return(0,Y.jsx)(Zt,{"data-slot":`combobox-positioner`,sideOffset:t,className:W(`z-50 outline-none`,e),...n})}function Tn({className:e,...t}){return(0,Y.jsx)($t,{"data-slot":`combobox-popup`,className:W(`w-[var(--anchor-width)] min-w-[8rem] max-w-[var(--available-width)] max-h-[min(var(--available-height),24rem)]`,`overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md`,`origin-[var(--transform-origin)]`,`data-[starting-style]:opacity-0 data-[starting-style]:scale-95`,`data-[ending-style]:opacity-0 data-[ending-style]:scale-95`,`transition-[opacity,transform] duration-150`,e),...t})}function En({className:e,...t}){return(0,Y.jsx)(Wt,{"data-slot":`combobox-list`,className:W(`max-h-[min(24rem,var(--available-height))] overflow-y-auto overscroll-contain p-1`,`outline-none empty:hidden`,e),...t})}var Dn={sm:`py-1 px-2 text-xs gap-2`,md:`py-1.5 px-2.5 text-sm gap-2`,lg:`py-2 px-3 text-base gap-2.5`},On={sm:`size-3`,md:`size-4`,lg:`size-5`};function kn({className:e,children:t,size:n=`md`,...r}){return(0,Y.jsxs)(dn,{"data-slot":`combobox-item`,className:W(`flex w-full cursor-default select-none items-center justify-between rounded-sm outline-none`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground`,Dn[n],e),...r,children:[(0,Y.jsx)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2 truncate`,children:t}),(0,Y.jsx)(fn,{className:W(`flex shrink-0 items-center justify-center text-muted-foreground`,On[n]),children:(0,Y.jsx)(_,{className:On[n]})})]})}function An({className:e,children:t,...n}){return(0,Y.jsx)(yn,{"data-slot":`combobox-empty`,className:W(`py-6 text-center text-sm text-muted-foreground empty:hidden`,e),...n,children:t})}function jn({className:e,...t}){return(0,Y.jsx)(Jt,{"data-slot":`combobox-status`,className:W(`flex items-center gap-2 px-3 py-2 text-sm text-muted-foreground empty:hidden`,e),...t})}function Mn({className:e,...t}){return(0,Y.jsx)(nn,{"data-slot":`combobox-group`,className:W(`overflow-hidden p-1`,e),...t})}function Nn({className:e,...t}){return(0,Y.jsx)(rn,{"data-slot":`combobox-group-label`,className:W(`px-2 py-1.5 text-xs font-medium text-muted-foreground`,e),...t})}var Pn=Ut,Fn={sm:`min-h-8 gap-1 px-2 py-1 text-xs`,md:`min-h-10 gap-1.5 px-3 py-2 text-sm`,lg:`min-h-12 gap-2 px-4 py-2.5 text-base`};function In({className:e,size:t=`md`,error:n,...r}){return(0,Y.jsx)(mn,{"data-slot":`combobox-chips`,className:W(`flex flex-wrap items-center rounded-md border border-input bg-background ring-offset-background shadow-xs transition-[color,box-shadow] outline-none`,`focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]`,`aria-invalid:ring-destructive/20 aria-invalid:border-destructive aria-invalid:bg-destructive/15`,Fn[t],e),"aria-invalid":n||void 0,...r})}function Ln({className:e,children:t,...n}){return(0,Y.jsxs)(_n,{"data-slot":`combobox-chip`,className:W(`inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-1 text-xs font-medium text-secondary-foreground`,`data-[highlighted]:bg-primary data-[highlighted]:text-primary-foreground`,`focus-within:bg-primary focus-within:text-primary-foreground`,e),...n,children:[t,(0,Y.jsx)(vn,{className:`rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,children:(0,Y.jsx)(Ce,{className:`size-3`})})]})}function Rn({className:e,...t}){return(0,Y.jsx)(Lt,{"data-slot":`combobox-chips-input`,className:W(`min-w-[80px] flex-1 bg-transparent outline-none placeholder:text-muted-foreground`,e),...t})}var zn={placeholder:`Search...`,clear:`Clear selection`,toggle:`Open options`,searching:`Loading...`,noResults:`No results found.`,typeToSearch:`Type at least {min} characters to search...`,typeMore:`Type {remaining} more character{s} to search...`,createNew:`Create {value}`,loadingMore:`Loading...`,apply:`Apply`,cancel:`Cancel`},Bn=`default`,Vn=Symbol(`enhanced-combobox-create-option`);function Hn(e){return typeof e==`object`&&!!e&&Vn in e}function Un(e){if(!Hn(e))throw Error(`Item is not a create option`);return e[Vn]}function Wn(e){return{[Vn]:e}}function Gn({isLoading:e,text:t,className:n}){return e?(0,Y.jsxs)(`div`,{className:W(`loading-more--component`,`flex items-center justify-center gap-space-sm px-control py-space-xs text-xs text-muted-foreground`,n),role:`status`,"aria-live":`polite`,children:[(0,Y.jsx)(s,{className:`size-icon-sm animate-spin`,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{children:t})]}):null}Gn.displayName=`LoadingMore`;function Kn({isLoading:e,searchValue:t,minSearchLength:n,itemCount:r,strings:i}){let a=t.trim();if(e)return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(s,{className:`size-icon-sm animate-spin`}),i.searching]});if(a===``)return i.typeToSearch.includes(`{min}`)?i.typeToSearch.replace(`{min}`,String(n)):i.typeToSearch;if(a.length<n){let e=n-a.length;return i.typeMore.includes(`{remaining}`)||i.typeMore.includes(`{s}`)?i.typeMore.replace(`{remaining}`,String(e)).replace(`{s}`,e===1?``:`s`):i.typeMore}return null}Kn.displayName=`StatusContent`;var qn={small:`sm`,default:`md`},Jn={small:`min-h-control-sm gap-space-lg rounded-md px-row-x py-row-y text-xs leading-tight [&>span:first-child]:gap-space-lg [&>span:first-child]:text-xs`,default:`min-h-control gap-space-lg rounded-md px-row-x py-row-y text-sm leading-tight [&>span:first-child]:gap-space-lg [&>span:first-child]:text-sm`},Yn=`px-row-x py-row-y text-xxs font-medium uppercase tracking-wide text-muted-foreground`;function Xn({isLoading:e,showStatus:t,showEmpty:n,searchValue:r,minSearchLength:i,items:a,groupedItems:o,createOptionItem:s,renderItemContent:c,getItemReactKey:l,getItemDisabled:u,renderGroupLabel:d,isLoadingMore:f,strings:p,size:m=Bn,portalContainer:h,listRef:g,anchor:_,applyFooter:v}){let y=h==null?void 0:`z-[100]`,b=qn[m],x=(0,Y.jsx)(wn,{anchor:_,className:y,children:(0,Y.jsxs)(Tn,{"aria-busy":e||void 0,className:`combobox-dropdown--popup rounded-radius border-border/70 shadow-sm`,children:[!!t&&(0,Y.jsx)(jn,{className:`gap-space-sm px-control py-space-xs text-xs text-muted-foreground`,children:(0,Y.jsx)(Kn,{isLoading:e,searchValue:r,minSearchLength:i,itemCount:a.length,strings:p})}),!!n&&(0,Y.jsx)(An,{className:`px-control py-space-xs text-center text-xs text-muted-foreground`,children:p.noResults}),(0,Y.jsx)(ft,{viewportRef:g,className:`max-h-[min(20rem,var(--available-height))]`,children:(0,Y.jsx)(En,{className:`combobox-dropdown--list max-h-none overflow-visible p-space-sm`,children:o?(0,Y.jsxs)(Y.Fragment,{children:[Array.from(o.entries()).map(([e,t])=>(0,Y.jsxs)(Mn,{className:`combobox-dropdown--group p-0`,items:t,children:[(0,Y.jsx)(Nn,{className:Yn,children:typeof d==`function`?d(e):e}),(0,Y.jsx)(Pn,{children:e=>(0,Y.jsx)(kn,{value:e,size:b,className:Jn[m],disabled:u?.(e),children:c(e)},l(e))})]},e)),s!=null&&(0,Y.jsx)(kn,{value:s,size:b,className:Jn[m],children:c(s)},l(s))]}):(0,Y.jsx)(Pn,{children:e=>(0,Y.jsx)(kn,{value:e,size:b,className:Jn[m],disabled:u?.(e),children:c(e)},l(e))})})}),(0,Y.jsx)(Gn,{isLoading:!!f,text:p.loadingMore}),!!v&&(0,Y.jsxs)(`div`,{className:`flex items-center justify-end gap-space-md border-t border-border/60 px-control py-space-xs`,children:[(0,Y.jsx)(V,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,onClick:e=>{e.preventDefault(),e.stopPropagation(),v.onCancel()},children:v.cancelLabel}),(0,Y.jsx)(V,{type:`button`,variant:`primary`,onClick:e=>{e.preventDefault(),e.stopPropagation(),v.onApply()},children:v.applyLabel})]})]})});return h?(0,Y.jsx)(Cn,{container:h,children:x}):(0,Y.jsx)(Cn,{children:x})}Xn.displayName=`ComboboxDropdown`;var Zn={small:`text-xs mt-space-sm`,default:`text-sm mt-space-md`};function Qn({error:e,size:t,className:n}){return e?(0,Y.jsx)(`p`,{className:W(`error-message--component`,`text-destructive`,Zn[t],n),role:`alert`,"aria-live":`polite`,children:e}):null}Qn.displayName=`ErrorMessage`;function $n(e){return e.replace(/[$()*+.?[\\\]^{|}]/g,`\\$&`)}function er({text:e,highlight:t,highlightClassName:n=`rounded-sm bg-warning/20 px-0.5 text-warning-foreground dark:bg-warning/25`}){if(!t.trim())return e;let r=RegExp(`(${$n(t)})`,`gi`),i=e.split(r),a=0;return(0,Y.jsx)(Y.Fragment,{children:i.map((e,t)=>{let r=t%2==1,i=String(a);return a+=e.length,r?(0,Y.jsx)(`mark`,{className:n,children:e},i):(0,Y.jsx)(`span`,{children:e},i)})})}er.displayName=`HighlightedText`;function tr({searchValue:e,onSearch:t,debounceMs:n=300,minSearchLength:r=3}){let i=(0,G.useRef)(null),a=(0,G.useRef)(t);(0,G.useEffect)(()=>{a.current=t},[t]),(0,G.useEffect)(()=>{if(!a.current)return;i.current&&clearTimeout(i.current);let t=e.trim();return t.length>=r&&(i.current=setTimeout(()=>{a.current?.(t)},n)),()=>{i.current&&clearTimeout(i.current)}},[e,n,r])}function nr({items:e,getItemGroup:t}){return(0,G.useMemo)(()=>{if(!t)return null;let n=new Map;for(let r of e){let e=t(r),i=n.get(e);i?i.push(r):n.set(e,[r])}return n},[e,t])}function rr({hasMore:e,onLoadMore:t,isLoadingMore:n}){let r=(0,G.useRef)(!1),i=(0,G.useRef)(null),a=(0,G.useCallback)(a=>{if(!e||!t||n||r.current)return;let{scrollHeight:o,scrollTop:s,clientHeight:c}=a.target;(s+c)/o>=.8&&(i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=!0,t(),setTimeout(()=>{r.current=!1},500)},100))},[e,t,n]);return(0,G.useEffect)(()=>()=>{i.current&&clearTimeout(i.current)},[]),{handleScroll:a}}function ir(e){return we(zn,e)}function ar(e,t,n){let r=t.toLowerCase();return e.some(e=>n(e).toLowerCase()===r)}function or({items:e,searchValue:t,getItemLabel:r,getItemKey:i,isLoading:a=!1,minSearchLength:o=3,strings:s,renderItem:c,onSearch:l,debounceMs:u=300,creatable:d,onCreate:f,getItemGroup:p,hasMore:m,onLoadMore:h,isLoadingMore:g,highlightMatch:_,ensuredItems:v=[]}){let y=ir(s),b=i??r,x=(0,G.useRef)(null),S=t.trim();tr({searchValue:t,onSearch:l,debounceMs:u,minSearchLength:o});let{handleScroll:C}=rr({hasMore:m,onLoadMore:h,isLoadingMore:g});(0,G.useEffect)(()=>{let e=x.current;if(!(!e||!m||!h))return e.addEventListener(`scroll`,C),()=>e.removeEventListener(`scroll`,C)},[C,m,h]);let w=(0,G.useMemo)(()=>{if(v.length===0)return e;let t=[...v];return e.forEach(e=>{let n=b(e);v.some(e=>b(e)===n)||t.push(e)}),t},[e,v,b]),T=nr({items:w,getItemGroup:p}),E=(0,G.useMemo)(()=>!d||!f||S.length<o?!1:!ar(w,S,r),[d,f,S,o,w,r]),D=(0,G.useMemo)(()=>E?Wn(S):null,[E,S]);return{strings:y,getKey:b,trimmedSearch:S,listRef:x,baseItems:w,allItems:(0,G.useMemo)(()=>D?[...w,D]:w,[w,D]),groupedItems:T,createOptionItem:D,showStatus:a||S.length<o,showEmpty:!a&&S.length>=o&&e.length===0&&!E,showCreateOption:E,renderItemContent:(0,G.useCallback)(e=>{if(Hn(e)){let t=Un(e);return(0,Y.jsxs)(`span`,{className:W(`use-enhanced-combobox-core--component`,`flex items-center gap-space-sm text-xs`),children:[(0,Y.jsx)(Se,{className:`size-icon-sm`}),y.createNew.includes(`{value}`)?y.createNew.replace(`{value}`,t):(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-space-sm`,children:[(0,Y.jsx)(`span`,{children:y.createNew}),(0,Y.jsx)(n,{tag:`span`,size:`xs`,weight:`medium`,className:`text-xs`,children:t})]})]})}if(c)return c(e);let t=r(e);return _&&S?(0,Y.jsx)(er,{text:t,highlight:S}):t},[y.createNew,c,r,_,S]),itemToStringLabel:(0,G.useCallback)(e=>Hn(e)?Un(e):r(e),[r]),getItemReactKey:(0,G.useCallback)(e=>Hn(e)?`__create__:${Un(e)}`:String(b(e)),[b]),handleScroll:C}}var sr={small:`small`,default:`default`};function cr(e,t){return e??sr[t??`default`]??`default`}var lr={small:`small`,default:`default`},ur={small:`pe-control-actions-sm`,default:`pe-control-actions`},dr={small:`sm`,default:`md`};function fr(e){return lr[e]}function pr({placeholder:e,clearLabel:t,toggleLabel:n,size:r,error:i,required:a,disabled:o,clearable:s=!0,className:c,onBlur:l}){return(0,Y.jsxs)(`div`,{className:`relative`,children:[(0,Y.jsx)(Lt,{render:(0,Y.jsx)(dt,{size:r,invalid:i,className:W(ur[r],c)}),placeholder:e,"aria-invalid":i||void 0,"aria-required":a,disabled:o,onBlur:l}),(0,Y.jsxs)(`div`,{className:`absolute inset-y-0 end-1 flex items-center gap-1 text-muted-foreground`,children:[s?(0,Y.jsx)(xn,{render:(0,Y.jsx)(V,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,className:`size-control-clear text-muted-foreground hover:text-foreground`,"aria-label":t,children:(0,Y.jsx)(Ce,{className:ct[r],"aria-hidden":`true`})})}):null,(0,Y.jsx)(Z,{render:(0,Y.jsx)(V,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,className:`size-control-clear text-muted-foreground hover:text-foreground`,"aria-label":n,children:(0,Y.jsx)(xe,{className:ct[r],"aria-hidden":`true`})})})]})]})}function mr({items:e,selectedValue:t,onSelectedValueChange:n,searchValue:i,onSearchValueChange:a,getItemLabel:o,getItemKey:s,isLoading:c=!1,minSearchLength:l=3,strings:u,disabled:d=!1,className:f,clearable:p=!0,renderItem:m,portalContainer:h,name:g,invalid:_,error:v,required:y,onBlur:b,onSearch:x,debounceMs:S,creatable:C,onCreate:w,getItemGroup:T,renderGroupLabel:E,hasMore:D,onLoadMore:O,isLoadingMore:ee,getItemDisabled:k,highlightMatch:te,size:A,open:j,onOpenChange:M}){let{defaultControlSize:N}=r(),P=cr(A,N),ne=fr(P),re=_||!!v,F=or({items:e,searchValue:i,onSearchValueChange:a,getItemLabel:o,getItemKey:s,isLoading:c,minSearchLength:l,strings:u,renderItem:m,onSearch:x,debounceMs:S,creatable:C,onCreate:w,getItemGroup:T,hasMore:D,onLoadMore:O,isLoadingMore:ee,highlightMatch:te,size:P,ensuredItems:t?[t]:[]}),[I,ie]=(0,G.useState)(!1),ae=(0,G.useCallback)(e=>{ie(e),e||a(``),M?.(e)},[M,a]),oe=I?i:t?F.itemToStringLabel(t):``,se=(0,G.useCallback)(e=>{if(e&&Hn(e)){let t=Un(e);w?.(t);return}n(e)},[n,w]);return(0,Y.jsxs)(`div`,{className:`enhanced-combobox--component`,children:[(0,Y.jsxs)(Sn,{items:F.allItems,value:t,onValueChange:se,inputValue:oe,onInputValueChange:(e,{reason:t})=>{if(t===`item-press`){a(``);return}a(e)},itemToStringLabel:F.itemToStringLabel,disabled:d,filter:null,name:g,required:y,open:j,onOpenChange:ae,children:[(0,Y.jsx)(pr,{placeholder:F.strings.placeholder,clearLabel:F.strings.clear,toggleLabel:F.strings.toggle,className:f,size:ne,error:re,required:y,disabled:d,clearable:p,onBlur:b}),(0,Y.jsx)(Xn,{isLoading:c,showStatus:F.showStatus,showEmpty:F.showEmpty,searchValue:i,minSearchLength:l,items:e,groupedItems:F.groupedItems,createOptionItem:F.createOptionItem,renderItemContent:F.renderItemContent,getItemReactKey:F.getItemReactKey,getItemDisabled:k,renderGroupLabel:E,isLoadingMore:ee,strings:F.strings,size:P,portalContainer:h,listRef:F.listRef})]}),(0,Y.jsx)(Qn,{error:v,size:P})]})}function hr({items:e,selectedValues:t,onSelectedValuesChange:n,searchValue:i,onSearchValueChange:a,getItemLabel:o,getItemKey:s,isLoading:c=!1,minSearchLength:l=3,strings:u,disabled:d=!1,className:f,renderItem:p,portalContainer:m,name:h,invalid:g,error:_,required:v,onBlur:y,onSearch:b,debounceMs:x,creatable:S,onCreate:C,getItemGroup:w,renderGroupLabel:T,hasMore:E,onLoadMore:D,isLoadingMore:O,getItemDisabled:ee,highlightMatch:k,size:te,open:A,onOpenChange:j,closeOnSelect:M=!1,applyButton:N=!1,onApply:P,onCancel:ne}){let{defaultControlSize:re}=r(),F=cr(te,re),I=fr(F),ie=dr[F],ae=g||!!_,oe=(0,G.useRef)(null),se=s??o,[L,ce]=(0,G.useState)(t),[le,R]=(0,G.useState)(!1),ue=A!==void 0,de=ue?A:le;(0,G.useEffect)(()=>{N&&ce(t)},[N,t]);let z=(0,G.useCallback)(e=>{ue||R(e),j?.(e)},[ue,j]),B=or({items:e,searchValue:i,onSearchValueChange:a,getItemLabel:o,getItemKey:s,isLoading:c,minSearchLength:l,strings:u,renderItem:p,onSearch:b,debounceMs:x,creatable:S,onCreate:C,getItemGroup:w,hasMore:E,onLoadMore:D,isLoadingMore:O,highlightMatch:k,size:F,ensuredItems:t}),fe=(0,G.useCallback)(e=>{let t=[],r=null;for(let n of e)Hn(n)?r=Un(n):t.push(n);r&&C?.(r);let i=t.length!==e.length||!r?t:null;i&&(N?ce(i):n(i)),M&&z(!1)},[n,C,N,M,z]),V=(0,G.useCallback)(()=>{N&&n(L),P?.(),z(!1)},[N,L,P,n,z]),pe=(0,G.useCallback)(()=>{N&&ce(t),ne?.(),z(!1)},[N,t,ne,z]),H=N?L:t,me=H.length>0?void 0:B.strings.placeholder;return(0,Y.jsxs)(`div`,{className:`enhanced-combobox--component`,children:[(0,Y.jsxs)(Sn,{items:B.allItems,multiple:!0,value:H,onValueChange:fe,inputValue:i,onInputValueChange:(e,{reason:t})=>{if(t===`item-press`){a(``);return}a(e)},itemToStringLabel:B.itemToStringLabel,disabled:d,filter:null,name:h,required:v,open:de,onOpenChange:e=>{!e&&N&&ce(t),z(e)},children:[(0,Y.jsxs)(In,{ref:oe,className:W(lt[I],ut[I],I===`small`?`text-xs`:`text-sm`,`bg-transparent !shadow-none`,f),size:ie,error:ae,children:[H.map(e=>(0,Y.jsx)(Ln,{children:o(e)},se(e))),(0,Y.jsx)(Rn,{placeholder:me,"aria-invalid":ae||void 0,"aria-required":v,onBlur:y})]}),(0,Y.jsx)(Xn,{isLoading:c,showStatus:B.showStatus,showEmpty:B.showEmpty,searchValue:i,minSearchLength:l,items:e,groupedItems:B.groupedItems,createOptionItem:B.createOptionItem,renderItemContent:B.renderItemContent,getItemReactKey:B.getItemReactKey,getItemDisabled:ee,renderGroupLabel:T,isLoadingMore:O,strings:B.strings,size:F,portalContainer:m,listRef:B.listRef,anchor:oe,applyFooter:N?{applyLabel:B.strings.apply,cancelLabel:B.strings.cancel,onApply:V,onCancel:pe}:void 0})]}),(0,Y.jsx)(Qn,{error:_,size:F})]})}mr.displayName=`EnhancedCombobox`,hr.displayName=`EnhancedComboboxMultiple`;export{hr as n,zn as r,mr as t};
1
+ import{r as e}from"./chunk-QTnfLwEv.js";import{t}from"./react-sKtkuLrH.js";import{p as n,x as r}from"./section-BPNIPavy.js";import{$ as i,$t as a,Dn as o,Er as s,Ft as c,Gn as l,Gt as u,K as d,Kn as f,Kt as p,Mn as m,Nn as h,O as g,Or as _,P as v,Qt as y,Un as b,Vn as x,Wt as S,X as C,Y as w,Yn as T,Yt as E,_t as D,ar as O,b as ee,cr as k,d as te,dn as A,et as j,f as M,fn as N,fr as P,g as ne,gn as re,gr as F,hr as I,ir as ie,it as ae,lr as oe,m as se,mr as L,mt as ce,nn as le,nr as R,on as ue,or as de,ot as z,pn as B,pr as fe,r as V,rn as pe,rt as H,tn as me,u as he,un as ge,v as _e,vn as ve,xr as U,y as ye,zt as be}from"./example-CJMJcnb4.js";import{t as xe}from"./chevron-down-BFh1Fz2P.js";import{t as Se}from"./plus-CQcelTNc.js";import{t as Ce}from"./x-DyuS4YRT.js";import{N as we,P as Te,d as Ee,n as W}from"./index-jD-KSiHu.js";import{a as De,i as Oe,o as ke,t as Ae}from"./useOpenInteractionType-CW0quo3l.js";import{n as je,r as Me,t as Ne}from"./getPseudoElementBounds-lw5shsdM.js";import{t as Pe}from"./inertValue-Dg9TwvOb.js";import{t as Fe}from"./useControlled-BHUji6Sp.js";import{n as Ie,r as Le,t as Re}from"./useCompositeListItem-PrMTh4tz.js";import{t as ze}from"./useAnchoredPopupScrollLock-B1xyKMh7.js";import{t as Be}from"./useValueChanged-BmWIb3SN.js";import{a as Ve,c as He,d as Ue,l as We,n as Ge,o as Ke,s as qe,t as Je,u as Ye}from"./resolveValueLabel-0bwEvIG-.js";import{a as Xe,c as Ze,i as Qe,n as $e,o as et,r as tt,s as nt,t as rt}from"./LabelableContext-CasUI4hR.js";import{t as it}from"./useLabelableId-BBLkeLGr.js";import{t as at}from"./stringifyLocale-CkHjdQTJ.js";import{n as ot,r as st}from"./resolveAriaLabelledBy-iFo8AzEr.js";import{a as ct,c as lt,l as ut}from"./form-sizing-C3UG5WKC.js";import{t as dt}from"./input-CkNgwwCs.js";import{t as ft}from"./scroll-area-BH80l2As.js";var G=e(t(),1);function pt(e,t,n,r,i,a,o,s,l,u=2){let d=c(n.current,{event:e,orientation:r,loopFocus:i,rtl:a,cols:u,disabledIndices:o,minIndex:s,maxIndex:l,prevIndex:t>l?s:t,stopEvent:!0});return be(n.current,d)?void 0:d}var mt=G.createContext(void 0),ht=G.createContext(void 0),gt=G.createContext(void 0),_t=G.createContext(!1),vt=G.createContext(``);function K(){let e=G.useContext(mt);if(!e)throw Error(P(22));return e}function yt(){let e=G.useContext(ht);if(!e)throw Error(P(23));return e}function q(){let e=G.useContext(gt);if(!e)throw Error(P(24));return e}function bt(){return G.useContext(vt)}function xt(){return G.useContext(_t)}var J={id:H(e=>e.id),labelId:H(e=>e.labelId),items:H(e=>e.items),selectedValue:H(e=>e.selectedValue),hasSelectionChips:H(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:H(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:H((e,t)=>t?Je(e.items):!1),open:H(e=>e.open),mounted:H(e=>e.mounted),forceMounted:H(e=>e.forceMounted),inline:H(e=>e.inline),activeIndex:H(e=>e.activeIndex),selectedIndex:H(e=>e.selectedIndex),isActive:H((e,t)=>e.activeIndex===t),isSelected:H((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>qe(t,e,n)):qe(t,r,n)}),transitionStatus:H(e=>e.transitionStatus),popupProps:H(e=>e.popupProps),inputProps:H(e=>e.inputProps),triggerProps:H(e=>e.triggerProps),itemProps:H(e=>e.itemProps),positionerElement:H(e=>e.positionerElement),listElement:H(e=>e.listElement),popupId:H(e=>e.popupId),triggerElement:H(e=>e.triggerElement),inputElement:H(e=>e.inputElement),inputGroupElement:H(e=>e.inputGroupElement),popupSide:H(e=>e.popupSide),openMethod:H(e=>e.openMethod),inputInsidePopup:H(e=>e.inputInsidePopup),inputOwnsFormValue:H(e=>e.inputOwnsFormValue),selectionMode:H(e=>e.selectionMode),name:H(e=>e.name),form:H(e=>e.form),disabled:H(e=>e.disabled),readOnly:H(e=>e.readOnly),required:H(e=>e.required),grid:H(e=>e.grid),virtualized:H(e=>e.virtualized),itemToStringLabel:H(e=>e.itemToStringLabel),isItemEqualToValue:H(e=>e.isItemEqualToValue),modal:H(e=>e.modal),autoHighlight:H(e=>e.autoHighlight),submitOnItemClick:H(e=>e.submitOnItemClick)};function St(e){return e==null?void 0:`${e}-popup`}function Ct(e,t){return(n,r)=>{if(n==null)return!1;let i=Ve(n,t);return e.contains(i,r)}}function wt(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;let a=Ve(r,t),o=n==null?``:Ve(n,t);return o&&e.contains(o,i)&&o.length===i.length?!0:e.contains(a,i)}}var Tt=new Map;function Et(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${at(e.locale)}|${JSON.stringify(t)}`,r=Tt.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=Ve(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=Ve(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=Ve(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return Tt.set(n,a),a}var Dt=Et,Ot=Symbol(`none`),kt={value:Ot,index:-1},Y=Ee();function At(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:s,defaultInputValue:c,inputValue:l,open:f,defaultOpen:p=!1,selectionMode:_=`none`,onItemHighlighted:b,name:x,form:w,disabled:T=!1,readOnly:D=!1,required:ee=!1,inputRef:te,grid:M=!1,items:P,filteredItems:ne,filter:re,openOnInputClick:oe=!0,autoHighlight:ce=!1,keepHighlight:le=!1,highlightItemOnHover:R=!0,loopFocus:ue=!0,itemToStringLabel:V,itemToStringValue:pe,isItemEqualToValue:H=He,virtualized:me=!1,inline:he=!1,fillInputOnItemPress:ge=!0,modal:_e=!1,limit:U=-1,autoComplete:ye=`list`,formAutoComplete:be,locale:xe,submitOnItemClick:Se=!1}=e,{clearErrors:Ce}=$e(),{setDirty:we,validityData:Te,setFilled:Ee,name:W,disabled:Oe,setTouched:ke,setFocused:je,validationMode:Ne,validation:Pe}=et(),Ie=se(),Le=it({id:t}),Re=Dt({locale:xe}),[ze,Je]=G.useState(!1),[Xe,Ze]=G.useState(null),Qe=G.useRef([]),nt=G.useRef([]),rt=G.useRef(null),at=G.useRef(null),ot=G.useRef(null),ct=G.useRef(null),lt=G.useRef(null),ut=G.useRef(!0),dt=G.useRef(!1),ft=G.useRef(null),K=G.useRef(null),yt=G.useRef(null),q=G.useRef(kt),bt=G.useRef(null),xt=G.useRef([]),St=G.useRef([]),Tt=Oe||T,Et=W??x,At=_===`multiple`,jt=_===`single`,Mt=l!==void 0||c!==void 0,Nt=P!==void 0,Pt=ne!==void 0,Ft;Ft=ce===`always`?`always`:ce?`input-change`:!1;let[X,It]=Fe({controlled:o,default:At?r??ie:r,name:`Combobox`,state:`selectedValue`}),Lt=G.useMemo(()=>re===null?()=>!0:re===void 0?jt&&!ze?wt(Re,V,X):Ct(Re,V):re,[re,jt,X,ze,Re,V]),Rt=F(()=>Mt?c??``:jt?Ve(X,V):``).current,[zt,Bt]=Fe({controlled:l,default:Rt,name:`Combobox`,state:`inputValue`}),[Z,Vt]=Fe({controlled:f,default:p,name:`Combobox`,state:`open`}),Ht=Ge(P),Q=Xe??(zt===``?``:String(zt).trim()),Ut=jt?Ve(X,V):``,Wt=jt&&!ze&&Q!==``&&Ut!==``&&Ut.length===Q.length&&Re.contains(Ut,Q),Gt=Wt?``:Q,Kt=Nt&&Pt&&Wt,qt=G.useMemo(()=>P?Ht?P.flatMap(e=>e.items):P:ie,[P,Ht]),Jt=G.useMemo(()=>{if(ne&&!Kt)return ne;if(!P)return ie;if(Ht){let e=P,t=[],n=0;for(let r of e){if(U>-1&&n>=U)break;let e=Gt===``?r.items:r.items.filter(e=>Lt(e,Gt,V));if(e.length===0)continue;let i=U>-1?U-n:1/0,a=e.slice(0,i);if(a.length>0){let e={...r,items:a};t.push(e),n+=a.length}}return t}if(Gt===``)return U>-1?qt.slice(0,U):qt;let e=[];for(let t of qt){if(U>-1&&e.length>=U)break;Lt(t,Gt,V)&&e.push(t)}return e},[ne,Kt,P,Ht,Gt,U,Lt,V,qt]),Yt=G.useMemo(()=>Ht?Jt.flatMap(e=>e.items):Jt,[Jt,Ht]),$=F(()=>new i({id:Le,labelId:void 0,selectedValue:X,open:Z,filter:Lt,query:Q,items:P,selectionMode:_,listRef:Qe,labelsRef:nt,popupRef:rt,emptyRef:lt,inputRef:at,startDismissRef:ot,endDismissRef:ct,keyboardActiveRef:ut,chipsContainerRef:ft,clearRef:K,valuesRef:xt,allValuesRef:St,selectionEventRef:yt,name:Et,form:w,disabled:Tt,readOnly:D,required:ee,grid:M,isGrouped:Ht,virtualized:me,openOnInputClick:oe,itemToStringLabel:V,isItemEqualToValue:H,modal:_e,autoHighlight:Ft,submitOnItemClick:Se,hasInputValue:Mt,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:he,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},itemProps:O,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:_===`none`,onOpenChangeComplete:n||de,setOpen:de,setInputValue:de,setSelectedValue:de,setIndices:de,onItemHighlighted:de,handleSelection:de,forceMount:de,requestSubmit:de})).current,Xt=_===`none`?zt:X,Zt=G.useMemo(()=>_===`none`?Xt:Array.isArray(X)?X.map(e=>Ke(e,pe)):Ke(X,pe),[Xt,pe,_,X]),Qt=I(b),$t=I(n),en=j($,J.activeIndex),tn=j($,J.selectedIndex),nn=j($,J.positionerElement),rn=j($,J.listElement),an=j($,J.triggerElement),on=j($,J.inputElement),sn=j($,J.inputGroupElement),cn=j($,J.inline),ln=j($,J.inputInsidePopup),un=j($,J.inputOwnsFormValue),dn=E(an),{mounted:fn,setMounted:pn,transitionStatus:mn}=C(Z),{openMethod:hn,triggerProps:gn}=Ae(Z),_n=I(()=>Zt);tt(ln?dn:at,Le,Xt,_n,!Tt,x);let vn=I(()=>{P?nt.current=Yt.map(e=>Ve(e,V)):$.set(`forceMounted`,!0)}),yn=G.useRef(X);L(()=>{X!==yn.current&&vn()},[vn,X]);let bn=I(e=>{$.update(e);let t=e.type||`none`;if(e.activeIndex!==void 0)if(e.activeIndex===null)q.current!==kt&&(q.current=kt,Qt(void 0,a(t,void 0,{index:-1})));else{let n=xt.current[e.activeIndex];q.current={value:n,index:e.activeIndex},Qt(n,a(t,void 0,{index:e.activeIndex}))}}),xn=I((t,n)=>{if(dt.current=n.reason===A,e.onInputValueChange?.(t,n),!n.isCanceled){if(n.reason===`input-change`){let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&Je(!0),bt.current={hasQuery:e},e&&Ft&&$.state.activeIndex==null&&$.set(`activeIndex`,0)}}Bt(t)}}),Sn=I((t,n)=>{if(Z!==t&&(n.reason===`escape-key`&&Nt&&Yt.length===0&&!$.state.emptyRef.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&At&&ln&&!cn&&Xe!==null&&(Je(!1),Ze(null),zt!==``&&xn(``,y(A,n.event))),!t&&ze&&(jt?(cn||Ze(Q),Q===``&&Je(!1)):At&&(cn||Ze(Q),ln&&bn({activeIndex:null}),(!ln||cn)&&xn(``,y(A,n.event)))),Vt(t),!t&&ln&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(ke(!0),je(!1),Ne===`onBlur`)))){let e=_===`none`?zt:X;Pe.commit(e)}}),Cn=I((e,t)=>{s?.(e,t),!t.isCanceled&&(It(e),(_===`none`&&rt.current&&ge||jt&&!$.state.inputInsidePopup)&&xn(Ve(e,V),y(t.reason,t.event)),jt&&e!=null&&t.reason!==`input-change`&&ze&&!cn&&Ze(Q))}),wn=I((e,t)=>{let n=t;if(n===void 0){if(en===null)return;n=xt.current[en]}let r=h(e),i=yt.current??e;yt.current=null;let a=y(B,i),o=r?.closest(`a`)?.getAttribute(`href`);if(o){o.startsWith(`#`)&&Sn(!1,a);return}if(At){let e=Array.isArray(X)?X:[];if(Cn(Ue(e,n,$.state.isItemEqualToValue)?Ye(e,n,$.state.isItemEqualToValue):[...e,n],a),a.isCanceled||!(at.current&&at.current.value.trim()!==``))return;$.state.inputInsidePopup?xn(``,y(A,a.event)):Sn(!1,a)}else{if(Cn(n,a),a.isCanceled)return;Sn(!1,a)}}),Tn=I(()=>{if(!$.state.submitOnItemClick)return;let e=Pe.inputRef.current?.form??$.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),En=I(()=>{if(pn(!1),$t?.(!1),Je(!1),Ze(null),bn(_===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),At&&at.current&&at.current.value!==``&&!dt.current&&xn(``,y(A)),jt)if($.state.inputInsidePopup)at.current&&at.current.value!==``&&xn(``,y(A));else{let e=Ve(X,V);at.current&&at.current.value!==e&&xn(e,y(e===``?A:ve))}}),Dn=G.useMemo(()=>cn&&nn?{current:nn.closest(`[role="dialog"]`)}:rt,[cn,nn]);d({enabled:!e.actionsRef,open:Z,ref:Dn,onComplete(){Z||En()}}),G.useImperativeHandle(e.actionsRef,()=>({unmount:En}),[En]),L(function(){if(Z||_===`none`)return;let e=P?qt:St.current;if(At){let t=Array.isArray(X)?X:[],n=t[t.length-1],r=We(e,n,H);bn({selectedIndex:r===-1?null:r})}else{let t=We(e,X,H);bn({selectedIndex:t===-1?null:t})}},[Z,X,P,_,qt,At,H,bn]),L(()=>{P&&(xt.current=Yt,Qe.current.length=Yt.length)},[P,Yt]),L(()=>{let e=bt.current;if(e&&(e.hasQuery?Ft&&$.set(`activeIndex`,0):Ft===`always`&&$.set(`activeIndex`,0),bt.current=null),!Z&&!cn)return;let t=Nt||Pt?Yt:xt.current,n=$.state.activeIndex;if(n==null){if(Ft===`always`&&t.length>0){$.set(`activeIndex`,0);return}q.current!==kt&&(q.current=kt,$.state.onItemHighlighted(void 0,a(ve,void 0,{index:-1})));return}if(n>=t.length){q.current!==kt&&(q.current=kt,$.state.onItemHighlighted(void 0,a(ve,void 0,{index:-1}))),$.set(`activeIndex`,null);return}let r=t[n],i=q.current.value,o=i!==Ot&&qe(r,i,$.state.isItemEqualToValue);(q.current.index!==n||!o)&&(q.current={value:r,index:n},$.state.onItemHighlighted(r,a(ve,void 0,{index:n})))},[en,Ft,Pt,Nt,Yt,cn,Z,$]),L(()=>{if(_===`none`){Ee(String(zt)!==``);return}Ee(At?Array.isArray(X)&&X.length>0:X!=null)},[Ee,_,zt,X,At]),G.useEffect(()=>{Nt&&Ft&&Yt.length===0&&bn({activeIndex:null})},[Nt,Ft,Yt.length,bn]);function On(e){let t=Te.initialValue;return Array.isArray(e)&&Array.isArray(t)?!st(e,t,(e,t)=>qe(e,t,H)):e!==t}Be(Q,()=>{!Z||Q===``||Q===String(Rt)||Je(!0)}),Be(X,()=>{if(_!==`none`&&(Ce(Et),we(On(X)),Pe.change(X),jt&&!Mt&&!ln)){let e=Ve(X,V);zt!==e&&xn(e,y(ve))}}),Be(zt,()=>{_===`none`&&(Ce(Et),we(zt!==Te.initialValue),Pe.change(zt))}),Be(P,()=>{if(!jt||Mt||ln||ze)return;let e=Ve(X,V);zt!==e&&xn(e,y(ve))});let kn=g({open:cn?!0:Z,onOpenChange:Sn,elements:{reference:ln?an:on,floating:nn}}),An,jn;cn||(An=M?`grid`:`listbox`,jn=Z?`true`:`false`);let Mn=G.useMemo(()=>{let e=on?.tagName===`INPUT`,t=on==null||e,n=t||Z,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=jn,r[`aria-haspopup`]=An,r[`aria-controls`]=Z?rn?.id:void 0,r[`aria-autocomplete`]=ye),{reference:r,floating:{role:`presentation`}}},[on,Z,jn,An,rn?.id,ye]),Nn=De(kn,{enabled:!D&&!Tt&&oe,event:`mousedown-only`,toggle:!1,touchOpenDelay:ln?0:100,reason:N}),Pn=z(kn,{enabled:!D&&!Tt&&!cn,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:cn?!0:void 0,outsidePress(e){let t=h(e);return!m(an,t)&&!m(K.current,t)&&!m(ft.current,t)&&!m(sn,t)}}),Fn=Me(kn,{enabled:!D&&!Tt,id:Le,listRef:Qe,activeIndex:en,selectedIndex:tn,virtual:!0,loopFocus:ue,allowEscape:ue&&!Ft,focusItemOnOpen:ze||_===`none`&&!Ft?!1:`auto`,focusItemOnHover:R,resetOnPointerLeave:!le,orientation:M?`horizontal`:void 0,rtl:Ie===`rtl`,disabledIndices:ie,grid:M?pt:void 0,onNavigate(e,t){!t&&!Z||mn===`ending`||bn(t?{activeIndex:e,type:ut.current?`keyboard`:`pointer`}:{activeIndex:e})}}),In=G.useMemo(()=>fe(Fn.reference,{onKeyDown(e){M&&$.state.activeIndex==null&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&e.preventBaseUIHandler()}},Pn.reference,Nn.reference,Mn.reference),[Fn.reference,Pn.reference,Nn.reference,Mn.reference,M,$]),Ln=G.useMemo(()=>fe(v,Fn.floating,Pn.floating,Mn.floating),[Fn.floating,Pn.floating,Mn.floating]),Rn=G.useMemo(()=>{let e=Fn.item;return e?{...e,onFocus:void 0}:O},[Fn.item]);ae(()=>{$.update({inline:he,popupProps:Ln,inputProps:In,triggerProps:gn,itemProps:Rn,setOpen:Sn,setInputValue:xn,setSelectedValue:Cn,setIndices:bn,onItemHighlighted:Qt,handleSelection:wn,forceMount:vn,requestSubmit:Tn})}),L(()=>{$.update({id:Le,selectedValue:X,open:Z,mounted:fn,transitionStatus:mn,items:P,inline:he,popupProps:Ln,inputProps:In,triggerProps:gn,openMethod:hn,itemProps:Rn,selectionMode:_,name:Et,form:w,disabled:Tt,readOnly:D,required:ee,grid:M,isGrouped:Ht,virtualized:me,onOpenChangeComplete:$t,openOnInputClick:oe,itemToStringLabel:V,modal:_e,autoHighlight:Ft,isItemEqualToValue:H,submitOnItemClick:Se,hasInputValue:Mt,requestSubmit:Tn,inputOwnsFormValue:_===`none`&&(he||!$.state.inputInsidePopup)})},[$,Le,X,Z,fn,mn,P,Ln,In,Rn,hn,gn,_,Et,Tt,D,ee,Pe,M,Ht,me,$t,oe,V,_e,H,Se,Mt,he,Tn,Ft,w]);let zn=k(te,Pe.inputRef),Bn=G.useMemo(()=>({query:Q,hasItems:Nt,filteredItems:Jt,flatFilteredItems:Yt}),[Q,Nt,Jt,Yt]),Vn=G.useMemo(()=>Array.isArray(Xt)?``:Ke(Xt,pe),[Xt,pe]),Hn=At&&Array.isArray(X)&&X.length>0,Un=At||_===`none`&&un?void 0:Et,Wn=G.useMemo(()=>!At||!Array.isArray(X)||!Et?null:X.map(e=>{let t=Ke(e,pe);return(0,Y.jsx)(`input`,{type:`hidden`,form:w,name:Et,value:t,disabled:Tt},t)}),[At,X,w,Et,pe,Tt]),Gn=(0,Y.jsxs)(G.Fragment,{children:[e.children,(0,Y.jsx)(`input`,{...Pe.getValidationProps(Tt,{onFocus(){if(ln){an?.focus();return}(at.current||an)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||Tt||D)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=y(ve,e.nativeEvent),i=()=>xt.current.findIndex(e=>Ke(e,pe).toLowerCase()===n||Ve(e,V).toLowerCase()===n);function a(){if(At)return;if(_===`none`){xn(t,r);return}let e=i();e===-1&&(e=xt.current.findIndex((e,t)=>{let r=nt.current[t];return r!=null&&r.toLowerCase()===n}));let a=e===-1?void 0:xt.current[e];a!=null&&Cn?.(a,r)}jt&&(vn(),P&&i()===-1&&$.set(`forceMounted`,!0)),queueMicrotask(a)}}),id:Le&&Un==null?`${Le}-hidden-input`:void 0,form:w,name:Un,autoComplete:be,disabled:Tt,required:ee&&!Hn,readOnly:D,value:Vn,ref:zn,style:Un?u:S,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Wn]});return(0,Y.jsx)(mt.Provider,{value:$,children:(0,Y.jsx)(ht.Provider,{value:kn,children:(0,Y.jsx)(_t.Provider,{value:Nt,children:(0,Y.jsx)(gt.Provider,{value:Bn,children:(0,Y.jsx)(vt.Provider,{value:zt,children:Gn})})})})})}function jt(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,Y.jsx)(At,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var Mt={...ye,...Ze,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":``}:null},Nt=G.createContext(void 0);function Pt(){return G.useContext(Nt)}var Ft=G.createContext(void 0);function X(e){let t=G.useContext(Ft);if(t===void 0&&!e)throw Error(P(21));return t}var It=G.forwardRef(function(e,t){let n=K(),{buttonRef:r,getButtonProps:i}=oe({native:!1}),a=k(t,r);function o(e){n.state.setOpen(!1,y(pe,e.nativeEvent,e.currentTarget))}return(0,Y.jsx)(`span`,{ref:a,...i({onClick:o}),"aria-label":`Dismiss`,tabIndex:void 0,style:u})}),Lt=G.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:o,...s}=e,{state:c,disabled:u,setTouched:d,setFocused:f,validationMode:p,validation:m}=et(),{labelId:h}=rt(),g=Pt(),_=!!X(!0),v=K(),{filteredItems:S}=q(),C=bt(),w=se(),T=j(v,J.required),E=j(v,J.disabled),D=j(v,J.readOnly),O=j(v,J.name),ee=j(v,J.form),k=j(v,J.selectionMode),te=j(v,J.autoHighlight),M=j(v,J.inputProps),N=j(v,J.triggerProps),P=j(v,J.open),re=j(v,J.mounted),F=j(v,J.selectedValue),ie=j(v,J.popupSide),ae=j(v,J.positionerElement),oe=j(v,J.id),L=j(v,J.inline),ce=j(v,J.modal),le=!!te,de=re&&ae?ie:null,z=u||E||i,B=S.length===0,fe=_||L,V=!fe||ce,pe=ne(a??(fe?void 0:oe)),H=ot(h,void 0),me=_?nt:c,[he,_e]=G.useState(null),U=G.useRef(!1),ye=G.useRef(null),be=G.useRef(!1),xe=k===`none`&&!_,Se=I(e=>{let t=_||v.state.inline;t&&!v.state.hasInputValue&&v.state.setInputValue(``,y(ve)),v.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:xe})}),Ce=_||!m?s:m.getValidationProps(z,s),we={...me,open:P,disabled:z,readOnly:D,popupSide:de,listEmpty:B};function Te(e){if(!g)return;let t,{highlightedChipIndex:n}=g,r=g.chipsRef.current.length,i=w===`rtl`,a=i?`ArrowRight`:`ArrowLeft`,o=i?`ArrowLeft`:`ArrowRight`;if(n!==void 0){if(e.key===a)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===o)e.preventDefault(),t=n<r-1?n+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let r=n>=F.length-1?F.length-2:n;t=r>=0?r:void 0,v.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`})}return t}return e.key===a&&(e.currentTarget.selectionStart??0)===0&&F.length>0?(e.preventDefault(),t=r>0?r-1:void 0):e.key===`Backspace`&&e.currentTarget.value===``&&F.length>0&&(v.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),e.preventDefault()),t}let Ee=R(`input`,e,{state:we,ref:[t,v.state.inputRef,Se],props:[M,N,{type:`text`,value:e.value??he??C,"aria-readonly":D||void 0,"aria-required":T||void 0,"aria-labelledby":H,disabled:z,readOnly:D,required:k===`none`?T:void 0,form:ee,...xe&&O&&{name:O},id:pe,onFocus(){if(f(!0),!L||!be.current)return;be.current=!1;let e=ye.current;e==null||!Object.hasOwn(v.state.valuesRef.current,e)||v.state.setIndices({activeIndex:e})},onBlur(){d(!0),f(!1);let e=v.state.activeIndex;if(L&&e!==null&&te!==`always`&&(ye.current=e,be.current=!0,v.state.setIndices({activeIndex:null})),p===`onBlur`){let e=k===`none`?C:F;m.commit(e)}},onCompositionStart(e){l||(U.current=!0,_e(e.currentTarget.value))},onCompositionEnd(e){U.current=!1;let t=e.currentTarget.value;_e(null),v.state.setInputValue(t,y(ge,e.nativeEvent))},onChange(e){let t=e.nativeEvent.inputType,n=!t||t===`insertReplacementText`,r=U.current||!n;if(U.current){let t=e.currentTarget.value;_e(t),t===``&&!v.state.openOnInputClick&&!v.state.inputInsidePopup&&v.state.setOpen(!1,y(A,e.nativeEvent));let n=t.trim(),i=le&&n!==``;!D&&!z&&n&&r&&(v.state.setOpen(!0,y(ge,e.nativeEvent)),le||v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?`keyboard`:`pointer`})),P&&v.state.activeIndex!==null&&!i&&v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?`keyboard`:`pointer`});return}let i=y(ge,e.nativeEvent);if(v.state.setInputValue(e.currentTarget.value,i),i.isCanceled)return;let a=e.currentTarget.value===``,o=y(A,e.nativeEvent);a&&!v.state.inputInsidePopup&&(k===`single`&&v.state.setSelectedValue(null,o),v.state.openOnInputClick||v.state.setOpen(!1,o));let s=e.currentTarget.value.trim();!D&&!z&&s&&r&&(v.state.setOpen(!0,y(ge,e.nativeEvent)),le||v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?`keyboard`:`pointer`})),P&&v.state.activeIndex!==null&&!le&&v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?`keyboard`:`pointer`})},onKeyDown(e){if(z||D||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;v.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=w===`rtl`;if(e.key===`Home`){x(e);let n=b&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){x(e);let i=b&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!re&&e.key===`Escape`){let t=k===`multiple`&&Array.isArray(F)?F.length===0:F===null,n=y(ue,e.nativeEvent),r=k===`multiple`?[]:null;v.state.setInputValue(``,n),v.state.setSelectedValue(r,n),!t&&!v.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(g&&e.key===`Backspace`&&t.value===``&&g.highlightedChipIndex===void 0&&Array.isArray(F)&&F.length>0){let t=g.chipsRef.current.length,n=t>0?t-1:F.length-1,r=F.filter((e,t)=>t!==n);v.state.setIndices({activeIndex:null,selectedIndex:null,type:v.state.keyboardActiveRef.current?`keyboard`:`pointer`}),v.state.setSelectedValue(r,y(ve,e.nativeEvent));return}let i=g?.highlightedChipIndex!==void 0,a=Te(e);if(g?.setHighlightedChipIndex(a),a===void 0?i&&v.state.inputRef.current?.focus():g?.chipsRef.current[a]?.focus(),e.which!==229&&e.key===`Enter`&&P){let t=v.state.activeIndex,n=e.nativeEvent;if(t===null){if(L)return;v.state.setOpen(!1,y(ve,n));return}x(e);let r=v.state.listRef.current[t];r&&(v.state.selectionEventRef.current=n,r.click(),v.state.selectionEventRef.current=null)}},onPointerMove(){v.state.keyboardActiveRef.current=!1},onPointerDown(){v.state.keyboardActiveRef.current=!1}},Ce],stateAttributesMapping:Mt}),W=_?(0,Y.jsx)(Xe.Provider,{value:Qe,children:Ee}):Ee;return(0,Y.jsxs)(G.Fragment,{children:[P&&V&&(0,Y.jsx)(It,{ref:v.state.startDismissRef}),W]})}),Rt=e(Te(),1);function zt(e,t,n,r,i){if(e.baseUIHandlerPrevented||r)return;let a=h(e.nativeEvent),s=U(a)?a:null;s!==e.currentTarget&&(i?.(s)||o(s))||(e.preventDefault(),!n&&(t.state.inputRef.current?.focus(),t.state.openOnInputClick&&t.state.setOpen(!0,y(N,e.nativeEvent))))}var Bt=2,Z=G.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:s,...c}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:g,validation:_}=et(),{labelId:v}=rt(),b=K(),{filteredItems:S}=q(),C=j(b,J.selectionMode),w=j(b,J.disabled),E=j(b,J.readOnly),D=j(b,J.required),O=j(b,J.mounted),ee=j(b,J.popupSide),k=j(b,J.positionerElement),te=j(b,J.listElement),A=j(b,J.popupId),M=j(b,J.triggerProps),N=j(b,J.triggerElement),P=j(b,J.inputInsidePopup),ne=j(b,J.id),F=j(b,J.labelId),ie=j(b,J.open),ae=j(b,J.selectedValue),se=j(b,J.activeIndex),L=j(b,J.selectedIndex),ce=j(b,J.hasSelectedValue),le=yt(),ue=bt(),de=T(),z=u||w||a,B=S.length===0,fe=O&&k?ee:null;it({id:P?o:void 0});let V=P?o??ne:o,pe=ot(v,F),H;ie&&P?H=A??St(ne):ie&&(H=te?.id);let me=G.useRef(``);function he(e){me.current=e.pointerType}let ge=le.useState(`domReferenceElement`);G.useEffect(()=>{P&&N&&N!==ge&&le.set(`domReferenceElement`,N)},[N,ge,le,P]);let{reference:_e}=je(le,{enabled:!ie&&!E&&!w&&C===`single`,listRef:b.state.labelsRef,activeIndex:se,selectedIndex:L,onMatch(e){let t=b.state.valuesRef.current[e];t!==void 0&&b.state.setSelectedValue(t,y(`none`))}}),{reference:ve}=De(le,{enabled:!E&&!w,event:`mousedown`}),{buttonRef:U,getButtonProps:ye}=oe({native:i,disabled:z}),be={...l,open:ie,disabled:z,popupSide:fe,listEmpty:B,placeholder:C===`none`?!1:!ce};return R(`button`,e,{ref:[t,U,I(e=>{b.set(`triggerElement`,e)})],state:be,props:[M,ve,_e,{id:V,tabIndex:P?0:-1,role:P?`combobox`:void 0,"aria-expanded":ie?`true`:`false`,"aria-haspopup":P?`dialog`:`listbox`,"aria-controls":H,"aria-required":P&&D||void 0,"aria-labelledby":pe,onPointerDown:he,onPointerEnter:he,onFocus(){f(!0),!(z||E)&&de.start(0,b.state.forceMount)},onBlur(e){if(!m(k,e.relatedTarget)&&(d(!0),f(!1),g===`onBlur`)){let e=C===`none`?ue:ae;_.commit(e)}},onMouseDown(e){if(z||E||(P||le.set(`domReferenceElement`,e.currentTarget),b.state.forceMount(),me.current!==`touch`&&(b.state.inputRef.current?.focus(),P||e.preventDefault()),ie))return;let t=p(e.currentTarget);function n(e){if(!N)return;let t=h(e),n=b.state.positionerElement,r=b.state.listElement;if(m(N,t)||m(n,t)||m(r,t)||t===N)return;let i=Ne(N),a=e.clientX>=i.left-Bt&&e.clientX<=i.right+Bt,o=e.clientY>=i.top-Bt&&e.clientY<=i.bottom+Bt;a&&o||b.state.setOpen(!1,y(`cancel-open`,e))}P&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){z||E||(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(x(e),b.state.setOpen(!0,y(re,e.nativeEvent)),b.state.inputRef.current?.focus())}},_?_.getValidationProps(z,c):c,ye],stateAttributesMapping:Mt})}),Vt=G.createContext(null);function Ht(){return G.useContext(Vt)}function Q(e){let{children:t,items:n}=e,r=G.useMemo(()=>({items:n}),[n]);return(0,Y.jsx)(Vt.Provider,{value:r,children:t})}function Ut(e){let{children:t}=e,{filteredItems:n}=q(),r=Ht(),i=r?r.items:n;return i?(0,Y.jsx)(G.Fragment,{children:i.map(t)}):null}var Wt=G.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=K(),l=yt(),u=!!X(!0),{filteredItems:d,hasItems:f}=q(),p=j(c,J.selectionMode),m=j(c,J.grid),h=j(c,J.popupProps),g=j(c,J.virtualized),_=j(c,J.forceMounted),v=p===`multiple`,y=d.length===0,b=I(e=>{c.set(`positionerElement`,e)}),S=I(e=>{c.set(`listElement`,e)}),C=G.useMemo(()=>typeof o==`function`?n||=(0,Y.jsx)(Ut,{children:o}):o,[o]),w={empty:y},T=l.useState(`floatingId`),E=R(`div`,e,{state:w,ref:[t,S,u?null:b],props:[h,{children:C,tabIndex:-1,id:T,role:m?`grid`:`listbox`,"aria-multiselectable":v?`true`:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;x(e);let n=e.nativeEvent,r=c.state.listRef.current[t];r&&(c.state.selectionEventRef.current=n,r.click(),c.state.selectionEventRef.current=null)}},onKeyDownCapture(){c.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.state.keyboardActiveRef.current=!1}},s]});if(g)return E;let D=f&&!_?void 0:c.state.labelsRef;return(0,Y.jsx)(Le,{elementsRef:c.state.listRef,labelsRef:D,children:E})}),Gt=`⁠`;function Kt(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function qt(){let e=T(),t=G.useRef(null);return G.useEffect(()=>{if(f)return;let n=t.current;if(n==null)return;let r=Kt(n);if(r==null)return;let i=r.nodeValue??``,a=`${i}${Gt}`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=i)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=i)}},[t,e]),t}var Jt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e;return R(`div`,e,{ref:[t,qt()],props:[{children:a,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),Yt=G.createContext(void 0);function $(){let e=G.useContext(Yt);if(e===void 0)throw Error(P(20));return e}var Xt=G.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=K(),a=j(i,J.mounted),o=j(i,J.forceMounted);return a||n||o?(0,Y.jsx)(Yt.Provider,{value:n,children:(0,Y.jsx)(ce,{ref:t,...r})}):null}),Zt=G.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=D,style:g,..._}=e,v=K(),{filteredItems:y}=q(),b=yt(),x=$(),S=j(v,J.modal),C=j(v,J.open),w=j(v,J.mounted),T=j(v,J.openMethod),E=j(v,J.positionerElement),O=j(v,J.triggerElement),ee=j(v,J.inputElement),k=j(v,J.inputGroupElement),te=j(v,J.inputInsidePopup),A=j(v,J.transitionStatus),N=y.length===0,P=M({anchor:i??(te?O:k??ee),floatingRootContext:b,positionMethod:a,mounted:w,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:x,collisionAvoidance:h,lazyFlip:!0});ze(C&&S,T===`touch`,E,O);let ne={open:C,side:P.side,align:P.align,anchorHidden:P.anchorHidden,empty:N};L(()=>{v.set(`popupSide`,P.side)},[v,P.side]);let re=I(e=>{v.set(`positionerElement`,e)}),F=he(e,ne,{styles:P.positionerStyles,transitionStatus:A,props:_,refs:[t,re],hidden:!w,inert:!C});return(0,Y.jsxs)(Ft.Provider,{value:P,children:[w&&S&&(0,Y.jsx)(Oe,{inert:Pe(!C),cutout:k??ee??O}),F]})}),Qt={..._e,...w},$t=G.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=K(),l=X(),u=yt(),{filteredItems:f}=q(),p=j(c,J.mounted),g=j(c,J.open),_=j(c,J.openMethod),v=j(c,J.transitionStatus),y=j(c,J.inputInsidePopup),b=j(c,J.inputElement),x=j(c,J.modal),S=j(c,J.id),C=f.length===0,w=s.id??(y?St(S):void 0);L(()=>(c.set(`popupId`,c.state.popupRef.current?.id||w),()=>{c.set(`popupId`,void 0)}),[c,w]),d({open:g,ref:c.state.popupRef,onComplete(){g&&c.state.onOpenChangeComplete(!0)}});let T=R(`div`,e,{state:{open:g,side:l.side,align:l.align,anchorHidden:l.anchorHidden,transitionStatus:v,empty:C},ref:[t,c.state.popupRef],props:[{id:w,role:y?`dialog`:`presentation`,tabIndex:-1,onFocus(e){let t=h(e.nativeEvent);_!==`touch`&&(m(c.state.listElement,t)||t===e.currentTarget)&&c.state.inputRef.current?.focus()}},te(v),s],stateAttributesMapping:Qt}),E=a===void 0?y?e=>e===`touch`?c.state.popupRef.current:b:!1:a,D;D=o??(y?void 0:!1);let O=!y||x;return(0,Y.jsx)(ke,{context:u,disabled:!p,modal:O,openInteractionType:_,initialFocus:E,returnFocus:D,getInsideElements:()=>[c.state.startDismissRef.current,c.state.endDismissRef.current],children:(0,Y.jsxs)(G.Fragment,{children:[T,O&&(0,Y.jsx)(It,{ref:c.state.endDismissRef})]})})}),en=G.createContext(void 0);function tn(){let e=G.useContext(en);if(e===void 0)throw Error(P(18));return e}var nn=G.forwardRef(function(e,t){let{render:n,className:r,style:i,items:a,...o}=e,[s,c]=G.useState(),l=G.useMemo(()=>({labelId:s,setLabelId:c,items:a}),[s,c,a]),u=R(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":s},o]}),d=(0,Y.jsx)(en.Provider,{value:l,children:u});return a?(0,Y.jsx)(Q,{items:a,children:d}):d}),rn=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=tn(),c=ne(a);return L(()=>(s(c),()=>{s(void 0)}),[c,s]),R(`div`,e,{ref:t,props:[{id:c},o]})}),an=G.createContext(void 0);function on(){let e=G.useContext(an);if(!e)throw Error(P(19));return e}var sn=G.createContext(!1);function cn(){return G.useContext(sn)}function ln(e){let{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:i}=e,{render:a,className:o,style:s,value:c=null,index:l,disabled:u=!1,nativeButton:d=!1,...f}=t,p=G.useRef(!1),m=G.useRef(null),h=Ie({index:l,textRef:m,indexGuessBehavior:Re.GuessFromOrder}),g=K(),_=cn(),v=xt(),y=j(g,J.open),b=j(g,J.selectionMode),x=j(g,J.readOnly),S=j(g,J.isItemEqualToValue),C=b!==`none`,w=l??(r?i??-1:h.index),T=h.index!==-1,E=j(g,J.id),D=j(g,J.isActive,w),O=j(g,J.isSelected,c),ee=j(g,J.itemProps),k=G.useRef(null),te=E!=null&&T?`${E}-${w}`:void 0,A=O&&C;L(()=>{if(!(T&&(r||l!=null)))return;let e=g.state.listRef.current;return e[w]=k.current,()=>{delete e[w]}},[T,r,w,l,g]),L(()=>{if(!T||v)return;let e=g.state.valuesRef.current;return e[w]=c,b!==`none`&&g.state.allValuesRef.current.push(c),()=>{delete e[w]}},[T,v,w,c,g,b]),L(()=>{if(!y){p.current=!1;return}if(!T||v)return;let e=g.state.selectedValue;qe(c,Array.isArray(e)?e[e.length-1]:e,S)&&g.set(`selectedIndex`,w)},[T,v,y,g,w,c,S]);let{getButtonProps:M,buttonRef:N}=oe({disabled:u,focusableWhenDisabled:!0,native:d,composite:!0}),P={disabled:u,selected:A,highlighted:D};function ne(e){function t(){g.state.handleSelection(e,c)}g.state.submitOnItemClick?(Rt.flushSync(t),g.state.requestSubmit()):t()}let re={id:te,role:_?`gridcell`:`option`,"aria-selected":C?A:void 0,tabIndex:void 0,onPointerDownCapture(e){p.current=!0,e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){u||x||ne(e.nativeEvent)},onMouseUp(e){let t=p.current;p.current=!1,!(u||x||e.button!==0||t||!D)&&ne(e.nativeEvent)}},F=R(`div`,t,{ref:[N,n,h.ref,k],state:P,props:[ee,re,f,M]}),I=G.useMemo(()=>({selected:A,textRef:m}),[A,m]);return(0,Y.jsx)(an.Provider,{value:I,children:F})}function un(e){let{componentProps:t,forwardedRef:n}=e,r=j(K(),J.isItemEqualToValue),{flatFilteredItems:i}=q();return(0,Y.jsx)(ln,{componentProps:t,forwardedRef:n,virtualized:!0,indexFromFilter:We(i,t.value??null,r)})}var dn=G.memo(G.forwardRef(function(e,t){let n=j(K(),J.virtualized);return n&&e.index==null?(0,Y.jsx)(un,{componentProps:e,forwardedRef:t}):(0,Y.jsx)(ln,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})})),fn=G.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=on();return n||r?(0,Y.jsx)(pn,{...e,ref:t}):null}),pn=G.memo(G.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=on(),c=G.useRef(null),{transitionStatus:l,setMounted:u}=C(s),f=R(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:w});return d({open:s,ref:c,onComplete(){s||u(!1)}}),f})),mn=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=K(),s=j(o,J.open),c=j(o,J.hasSelectionChips),[l,u]=G.useState(void 0);s&&l!==void 0&&u(void 0);let d=G.useRef([]),f=R(`div`,e,{ref:[t,o.state.chipsContainerRef],props:[c?{role:`toolbar`}:O,{onMouseDown(e){zt(e,o,o.state.disabled,o.state.readOnly)}},a]}),p=G.useMemo(()=>({highlightedChipIndex:l,setHighlightedChipIndex:u,chipsRef:d}),[l,u,d]);return(0,Y.jsx)(Nt.Provider,{value:p,children:(0,Y.jsx)(Le,{elementsRef:d,children:f})})}),hn=G.createContext(void 0);function gn(){let e=G.useContext(hn);if(!e)throw Error(P(17));return e}var _n=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=K(),{setHighlightedChipIndex:s,chipsRef:c}=Pt(),l=se(),u=j(o,J.disabled),d=j(o,J.readOnly),f=j(o,J.selectedValue),{ref:p,index:m}=Ie();function h(e){let t=m,n=l===`rtl`,r=n?`ArrowRight`:`ArrowLeft`,i=n?`ArrowLeft`:`ArrowRight`;if(e.key===r)e.preventDefault(),t=m>0?m-1:void 0;else if(e.key===i)e.preventDefault(),t=m<c.current.length-1?m+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){let n=m>=f.length-1?f.length-2:m;t=n>=0?n:void 0,x(e),o.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),o.state.setSelectedValue(f.filter((e,t)=>t!==m),y(ve,e.nativeEvent))}else e.key===`Enter`||e.key===` `?(x(e),t=void 0):e.key===`ArrowDown`||e.key===`ArrowUp`?(x(e),o.state.setOpen(!0,y(re,e.nativeEvent)),t=void 0):e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&(t=void 0);return t}let g=R(`div`,e,{ref:[t,p],state:{disabled:u},props:[{tabIndex:-1,"aria-disabled":u||void 0,"aria-readonly":d||void 0,onKeyDown(e){if(u||d)return;let t=h(e);Rt.flushSync(()=>{s(t)}),t===void 0?o.state.inputRef.current?.focus():c.current[t]?.focus()}},a]}),_=G.useMemo(()=>({index:m}),[m]);return(0,Y.jsx)(hn.Provider,{value:_,children:g})}),vn=G.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,style:o,...s}=e,c=K(),{index:l}=gn(),u=j(c,J.disabled),d=j(c,J.readOnly),f=j(c,J.selectedValue),p=j(c,J.isItemEqualToValue),m=u||i,{buttonRef:h,getButtonProps:g}=oe({native:a,disabled:m||d,focusableWhenDisabled:!0}),_={disabled:m};function v(e){let t=c.state.activeIndex;if(t==null)return;let n=We(c.state.valuesRef.current,e,p);n!==-1&&t===n&&c.state.setIndices({activeIndex:null,type:c.state.keyboardActiveRef.current?`keyboard`:`pointer`})}function b(e){let t=y(me,e.nativeEvent),n=f[l];return v(n),c.state.setSelectedValue(f.filter((e,t)=>t!==l),t),c.state.inputRef.current?.focus(),t}return R(`button`,e,{ref:[t,h],state:_,props:[{tabIndex:-1,onMouseDown(e){e.preventDefault()},onClick(e){m||d||b(e).isPropagationAllowed||e.stopPropagation()},onKeyDown(e){m||d||(e.key===`Enter`||e.key===` `)&&(b(e).isPropagationAllowed||x(e))}},s,g]})}),yn=G.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=q(),c=K(),l=qt(),u=s.length===0?a:null;return R(`div`,e,{ref:[t,c.state.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),bn={...w,...ee},xn=G.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:s,...c}=e,{disabled:l}=et(),u=K(),f=j(u,J.selectionMode),p=j(u,J.disabled),m=j(u,J.readOnly),h=j(u,J.open),g=j(u,J.selectedValue),_=j(u,J.hasSelectionChips),v=bt(),b=!1;b=f===`none`?v!==``:f===`single`?g!=null:_;let x=l||p||i,{buttonRef:S,getButtonProps:w}=oe({native:a,disabled:x}),{mounted:T,transitionStatus:E,setMounted:D}=C(b),O={disabled:x,visible:b,open:h,transitionStatus:E};d({open:b,ref:u.state.clearRef,onComplete(){b||D(!1)}});let ee=R(`button`,e,{state:O,ref:[t,S,u.state.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(x||m)return;let t=u.state.keyboardActiveRef;u.state.setInputValue(``,y(le,e.nativeEvent)),f===`none`?u.state.setIndices({activeIndex:null,type:t.current?`keyboard`:`pointer`}):(u.state.setSelectedValue(Array.isArray(g)?[]:null,y(le,e.nativeEvent)),u.state.setIndices({activeIndex:null,selectedIndex:null,type:t.current?`keyboard`:`pointer`})),u.state.inputRef.current?.focus()}},c,w],stateAttributesMapping:bn});return o||T?ee:null}),Sn=jt,Cn=Xt;function wn({className:e,sideOffset:t=4,...n}){return(0,Y.jsx)(Zt,{"data-slot":`combobox-positioner`,sideOffset:t,className:W(`z-50 outline-none`,e),...n})}function Tn({className:e,...t}){return(0,Y.jsx)($t,{"data-slot":`combobox-popup`,className:W(`w-[var(--anchor-width)] min-w-[8rem] max-w-[var(--available-width)] max-h-[min(var(--available-height),24rem)]`,`overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md`,`origin-[var(--transform-origin)]`,`data-[starting-style]:opacity-0 data-[starting-style]:scale-95`,`data-[ending-style]:opacity-0 data-[ending-style]:scale-95`,`transition-[opacity,transform] duration-150`,e),...t})}function En({className:e,...t}){return(0,Y.jsx)(Wt,{"data-slot":`combobox-list`,className:W(`max-h-[min(24rem,var(--available-height))] overflow-y-auto overscroll-contain p-1`,`outline-none empty:hidden`,e),...t})}var Dn={sm:`py-1 px-2 text-xs gap-2`,md:`py-1.5 px-2.5 text-sm gap-2`,lg:`py-2 px-3 text-base gap-2.5`},On={sm:`size-3`,md:`size-4`,lg:`size-5`};function kn({className:e,children:t,size:n=`md`,...r}){return(0,Y.jsxs)(dn,{"data-slot":`combobox-item`,className:W(`flex w-full cursor-default select-none items-center justify-between rounded-sm outline-none`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground`,Dn[n],e),...r,children:[(0,Y.jsx)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2 truncate`,children:t}),(0,Y.jsx)(fn,{className:W(`flex shrink-0 items-center justify-center text-muted-foreground`,On[n]),children:(0,Y.jsx)(_,{className:On[n]})})]})}function An({className:e,children:t,...n}){return(0,Y.jsx)(yn,{"data-slot":`combobox-empty`,className:W(`py-6 text-center text-sm text-muted-foreground empty:hidden`,e),...n,children:t})}function jn({className:e,...t}){return(0,Y.jsx)(Jt,{"data-slot":`combobox-status`,className:W(`flex items-center gap-2 px-3 py-2 text-sm text-muted-foreground empty:hidden`,e),...t})}function Mn({className:e,...t}){return(0,Y.jsx)(nn,{"data-slot":`combobox-group`,className:W(`overflow-hidden p-1`,e),...t})}function Nn({className:e,...t}){return(0,Y.jsx)(rn,{"data-slot":`combobox-group-label`,className:W(`px-2 py-1.5 text-xs font-medium text-muted-foreground`,e),...t})}var Pn=Ut,Fn={sm:`min-h-8 gap-1 px-2 py-1 text-xs`,md:`min-h-10 gap-1.5 px-3 py-2 text-sm`,lg:`min-h-12 gap-2 px-4 py-2.5 text-base`};function In({className:e,size:t=`md`,error:n,...r}){return(0,Y.jsx)(mn,{"data-slot":`combobox-chips`,className:W(`flex flex-wrap items-center rounded-md border border-input bg-background ring-offset-background shadow-xs transition-[color,box-shadow] outline-none`,`focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]`,`aria-invalid:ring-destructive/20 aria-invalid:border-destructive aria-invalid:bg-destructive/15`,Fn[t],e),"aria-invalid":n||void 0,...r})}function Ln({className:e,children:t,...n}){return(0,Y.jsxs)(_n,{"data-slot":`combobox-chip`,className:W(`inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-1 text-xs font-medium text-secondary-foreground`,`data-[highlighted]:bg-primary data-[highlighted]:text-primary-foreground`,`focus-within:bg-primary focus-within:text-primary-foreground`,e),...n,children:[t,(0,Y.jsx)(vn,{className:`rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,children:(0,Y.jsx)(Ce,{className:`size-3`})})]})}function Rn({className:e,...t}){return(0,Y.jsx)(Lt,{"data-slot":`combobox-chips-input`,className:W(`min-w-[80px] flex-1 bg-transparent outline-none placeholder:text-muted-foreground`,e),...t})}var zn={placeholder:`Search...`,clear:`Clear selection`,toggle:`Open options`,searching:`Loading...`,noResults:`No results found.`,typeToSearch:`Type at least {min} characters to search...`,typeMore:`Type {remaining} more character{s} to search...`,createNew:`Create {value}`,loadingMore:`Loading...`,apply:`Apply`,cancel:`Cancel`},Bn=`default`,Vn=Symbol(`enhanced-combobox-create-option`);function Hn(e){return typeof e==`object`&&!!e&&Vn in e}function Un(e){if(!Hn(e))throw Error(`Item is not a create option`);return e[Vn]}function Wn(e){return{[Vn]:e}}function Gn({isLoading:e,text:t,className:n}){return e?(0,Y.jsxs)(`div`,{className:W(`loading-more--component`,`flex items-center justify-center gap-space-sm px-control py-space-xs text-xs text-muted-foreground`,n),role:`status`,"aria-live":`polite`,children:[(0,Y.jsx)(s,{className:`size-icon-sm animate-spin`,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{children:t})]}):null}Gn.displayName=`LoadingMore`;function Kn({isLoading:e,searchValue:t,minSearchLength:n,itemCount:r,strings:i}){let a=t.trim();if(e)return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(s,{className:`size-icon-sm animate-spin`}),i.searching]});if(a===``)return i.typeToSearch.includes(`{min}`)?i.typeToSearch.replace(`{min}`,String(n)):i.typeToSearch;if(a.length<n){let e=n-a.length;return i.typeMore.includes(`{remaining}`)||i.typeMore.includes(`{s}`)?i.typeMore.replace(`{remaining}`,String(e)).replace(`{s}`,e===1?``:`s`):i.typeMore}return null}Kn.displayName=`StatusContent`;var qn={small:`sm`,default:`md`},Jn={small:`min-h-control-sm gap-space-lg rounded-md px-row-x py-row-y text-xs leading-tight [&>span:first-child]:gap-space-lg [&>span:first-child]:text-xs`,default:`min-h-control gap-space-lg rounded-md px-row-x py-row-y text-sm leading-tight [&>span:first-child]:gap-space-lg [&>span:first-child]:text-sm`},Yn=`px-row-x py-row-y text-xxs font-medium uppercase tracking-wide text-muted-foreground`;function Xn({isLoading:e,showStatus:t,showEmpty:n,searchValue:r,minSearchLength:i,items:a,groupedItems:o,createOptionItem:s,renderItemContent:c,getItemReactKey:l,getItemDisabled:u,renderGroupLabel:d,isLoadingMore:f,strings:p,size:m=Bn,portalContainer:h,listRef:g,anchor:_,applyFooter:v}){let y=h==null?void 0:`z-[100]`,b=qn[m],x=(0,Y.jsx)(wn,{anchor:_,className:y,children:(0,Y.jsxs)(Tn,{"aria-busy":e||void 0,className:`combobox-dropdown--popup rounded-radius border-border/70 shadow-sm`,children:[!!t&&(0,Y.jsx)(jn,{className:`gap-space-sm px-control py-space-xs text-xs text-muted-foreground`,children:(0,Y.jsx)(Kn,{isLoading:e,searchValue:r,minSearchLength:i,itemCount:a.length,strings:p})}),!!n&&(0,Y.jsx)(An,{className:`px-control py-space-xs text-center text-xs text-muted-foreground`,children:p.noResults}),(0,Y.jsx)(ft,{viewportRef:g,className:`max-h-[min(20rem,var(--available-height))]`,children:(0,Y.jsx)(En,{className:`combobox-dropdown--list max-h-none overflow-visible p-space-sm`,children:o?(0,Y.jsxs)(Y.Fragment,{children:[Array.from(o.entries()).map(([e,t])=>(0,Y.jsxs)(Mn,{className:`combobox-dropdown--group p-0`,items:t,children:[(0,Y.jsx)(Nn,{className:Yn,children:typeof d==`function`?d(e):e}),(0,Y.jsx)(Pn,{children:e=>(0,Y.jsx)(kn,{value:e,size:b,className:Jn[m],disabled:u?.(e),children:c(e)},l(e))})]},e)),s!=null&&(0,Y.jsx)(kn,{value:s,size:b,className:Jn[m],children:c(s)},l(s))]}):(0,Y.jsx)(Pn,{children:e=>(0,Y.jsx)(kn,{value:e,size:b,className:Jn[m],disabled:u?.(e),children:c(e)},l(e))})})}),(0,Y.jsx)(Gn,{isLoading:!!f,text:p.loadingMore}),!!v&&(0,Y.jsxs)(`div`,{className:`flex items-center justify-end gap-space-md border-t border-border/60 px-control py-space-xs`,children:[(0,Y.jsx)(V,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,onClick:e=>{e.preventDefault(),e.stopPropagation(),v.onCancel()},children:v.cancelLabel}),(0,Y.jsx)(V,{type:`button`,variant:`primary`,onClick:e=>{e.preventDefault(),e.stopPropagation(),v.onApply()},children:v.applyLabel})]})]})});return h?(0,Y.jsx)(Cn,{container:h,children:x}):(0,Y.jsx)(Cn,{children:x})}Xn.displayName=`ComboboxDropdown`;var Zn={small:`text-xs mt-space-sm`,default:`text-sm mt-space-md`};function Qn({error:e,size:t,className:n}){return e?(0,Y.jsx)(`p`,{className:W(`error-message--component`,`text-destructive`,Zn[t],n),role:`alert`,"aria-live":`polite`,children:e}):null}Qn.displayName=`ErrorMessage`;function $n(e){return e.replace(/[$()*+.?[\\\]^{|}]/g,`\\$&`)}function er({text:e,highlight:t,highlightClassName:n=`rounded-sm bg-warning/20 px-0.5 text-warning-foreground dark:bg-warning/25`}){if(!t.trim())return e;let r=RegExp(`(${$n(t)})`,`gi`),i=e.split(r),a=0;return(0,Y.jsx)(Y.Fragment,{children:i.map((e,t)=>{let r=t%2==1,i=String(a);return a+=e.length,r?(0,Y.jsx)(`mark`,{className:n,children:e},i):(0,Y.jsx)(`span`,{children:e},i)})})}er.displayName=`HighlightedText`;function tr({searchValue:e,onSearch:t,debounceMs:n=300,minSearchLength:r=3}){let i=(0,G.useRef)(null),a=(0,G.useRef)(t);(0,G.useEffect)(()=>{a.current=t},[t]),(0,G.useEffect)(()=>{if(!a.current)return;i.current&&clearTimeout(i.current);let t=e.trim();return t.length>=r&&(i.current=setTimeout(()=>{a.current?.(t)},n)),()=>{i.current&&clearTimeout(i.current)}},[e,n,r])}function nr({items:e,getItemGroup:t}){return(0,G.useMemo)(()=>{if(!t)return null;let n=new Map;for(let r of e){let e=t(r),i=n.get(e);i?i.push(r):n.set(e,[r])}return n},[e,t])}function rr({hasMore:e,onLoadMore:t,isLoadingMore:n}){let r=(0,G.useRef)(!1),i=(0,G.useRef)(null),a=(0,G.useCallback)(a=>{if(!e||!t||n||r.current)return;let{scrollHeight:o,scrollTop:s,clientHeight:c}=a.target;(s+c)/o>=.8&&(i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=!0,t(),setTimeout(()=>{r.current=!1},500)},100))},[e,t,n]);return(0,G.useEffect)(()=>()=>{i.current&&clearTimeout(i.current)},[]),{handleScroll:a}}function ir(e){return we(zn,e)}function ar(e,t,n){let r=t.toLowerCase();return e.some(e=>n(e).toLowerCase()===r)}function or({items:e,searchValue:t,getItemLabel:r,getItemKey:i,isLoading:a=!1,minSearchLength:o=3,strings:s,renderItem:c,onSearch:l,debounceMs:u=300,creatable:d,onCreate:f,getItemGroup:p,hasMore:m,onLoadMore:h,isLoadingMore:g,highlightMatch:_,ensuredItems:v=[]}){let y=ir(s),b=i??r,x=(0,G.useRef)(null),S=t.trim();tr({searchValue:t,onSearch:l,debounceMs:u,minSearchLength:o});let{handleScroll:C}=rr({hasMore:m,onLoadMore:h,isLoadingMore:g});(0,G.useEffect)(()=>{let e=x.current;if(!(!e||!m||!h))return e.addEventListener(`scroll`,C),()=>e.removeEventListener(`scroll`,C)},[C,m,h]);let w=(0,G.useMemo)(()=>{if(v.length===0)return e;let t=[...v];return e.forEach(e=>{let n=b(e);v.some(e=>b(e)===n)||t.push(e)}),t},[e,v,b]),T=nr({items:w,getItemGroup:p}),E=(0,G.useMemo)(()=>!d||!f||S.length<o?!1:!ar(w,S,r),[d,f,S,o,w,r]),D=(0,G.useMemo)(()=>E?Wn(S):null,[E,S]);return{strings:y,getKey:b,trimmedSearch:S,listRef:x,baseItems:w,allItems:(0,G.useMemo)(()=>D?[...w,D]:w,[w,D]),groupedItems:T,createOptionItem:D,showStatus:a||S.length<o,showEmpty:!a&&S.length>=o&&e.length===0&&!E,showCreateOption:E,renderItemContent:(0,G.useCallback)(e=>{if(Hn(e)){let t=Un(e);return(0,Y.jsxs)(`span`,{className:W(`use-enhanced-combobox-core--component`,`flex items-center gap-space-sm text-xs`),children:[(0,Y.jsx)(Se,{className:`size-icon-sm`}),y.createNew.includes(`{value}`)?y.createNew.replace(`{value}`,t):(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-space-sm`,children:[(0,Y.jsx)(`span`,{children:y.createNew}),(0,Y.jsx)(n,{tag:`span`,size:`xs`,weight:`medium`,className:`text-xs`,children:t})]})]})}if(c)return c(e);let t=r(e);return _&&S?(0,Y.jsx)(er,{text:t,highlight:S}):t},[y.createNew,c,r,_,S]),itemToStringLabel:(0,G.useCallback)(e=>Hn(e)?Un(e):r(e),[r]),getItemReactKey:(0,G.useCallback)(e=>Hn(e)?`__create__:${Un(e)}`:String(b(e)),[b]),handleScroll:C}}var sr={small:`small`,default:`default`};function cr(e,t){return e??sr[t??`default`]??`default`}var lr={small:`small`,default:`default`},ur={small:`pe-control-actions-sm`,default:`pe-control-actions`},dr={small:`sm`,default:`md`};function fr(e){return lr[e]}function pr({placeholder:e,clearLabel:t,toggleLabel:n,size:r,error:i,required:a,disabled:o,clearable:s=!0,className:c,onBlur:l}){return(0,Y.jsxs)(`div`,{className:`relative`,children:[(0,Y.jsx)(Lt,{render:(0,Y.jsx)(dt,{size:r,invalid:i,className:W(ur[r],c)}),placeholder:e,"aria-invalid":i||void 0,"aria-required":a,disabled:o,onBlur:l}),(0,Y.jsxs)(`div`,{className:`absolute inset-y-0 end-1 flex items-center gap-1 text-muted-foreground`,children:[s?(0,Y.jsx)(xn,{render:(0,Y.jsx)(V,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,className:`size-control-clear text-muted-foreground hover:text-foreground`,"aria-label":t,children:(0,Y.jsx)(Ce,{className:ct[r],"aria-hidden":`true`})})}):null,(0,Y.jsx)(Z,{render:(0,Y.jsx)(V,{type:`button`,variant:`secondary`,buttonStyle:`ghost`,size:`icon-small`,className:`size-control-clear text-muted-foreground hover:text-foreground`,"aria-label":n,children:(0,Y.jsx)(xe,{className:ct[r],"aria-hidden":`true`})})})]})]})}function mr({items:e,selectedValue:t,onSelectedValueChange:n,searchValue:i,onSearchValueChange:a,getItemLabel:o,getItemKey:s,isLoading:c=!1,minSearchLength:l=3,strings:u,disabled:d=!1,className:f,clearable:p=!0,renderItem:m,portalContainer:h,name:g,invalid:_,error:v,required:y,onBlur:b,onSearch:x,debounceMs:S,creatable:C,onCreate:w,getItemGroup:T,renderGroupLabel:E,hasMore:D,onLoadMore:O,isLoadingMore:ee,getItemDisabled:k,highlightMatch:te,size:A,open:j,onOpenChange:M}){let{defaultControlSize:N}=r(),P=cr(A,N),ne=fr(P),re=_||!!v,F=or({items:e,searchValue:i,onSearchValueChange:a,getItemLabel:o,getItemKey:s,isLoading:c,minSearchLength:l,strings:u,renderItem:m,onSearch:x,debounceMs:S,creatable:C,onCreate:w,getItemGroup:T,hasMore:D,onLoadMore:O,isLoadingMore:ee,highlightMatch:te,size:P,ensuredItems:t?[t]:[]}),[I,ie]=(0,G.useState)(!1),ae=(0,G.useCallback)(e=>{ie(e),e||a(``),M?.(e)},[M,a]),oe=I?i:t?F.itemToStringLabel(t):``,se=(0,G.useCallback)(e=>{if(e&&Hn(e)){let t=Un(e);w?.(t);return}n(e)},[n,w]);return(0,Y.jsxs)(`div`,{className:`enhanced-combobox--component`,children:[(0,Y.jsxs)(Sn,{items:F.allItems,value:t,onValueChange:se,inputValue:oe,onInputValueChange:(e,{reason:t})=>{if(t===`item-press`){a(``);return}a(e)},itemToStringLabel:F.itemToStringLabel,disabled:d,filter:null,name:g,required:y,open:j,onOpenChange:ae,children:[(0,Y.jsx)(pr,{placeholder:F.strings.placeholder,clearLabel:F.strings.clear,toggleLabel:F.strings.toggle,className:f,size:ne,error:re,required:y,disabled:d,clearable:p,onBlur:b}),(0,Y.jsx)(Xn,{isLoading:c,showStatus:F.showStatus,showEmpty:F.showEmpty,searchValue:i,minSearchLength:l,items:e,groupedItems:F.groupedItems,createOptionItem:F.createOptionItem,renderItemContent:F.renderItemContent,getItemReactKey:F.getItemReactKey,getItemDisabled:k,renderGroupLabel:E,isLoadingMore:ee,strings:F.strings,size:P,portalContainer:h,listRef:F.listRef})]}),(0,Y.jsx)(Qn,{error:v,size:P})]})}function hr({items:e,selectedValues:t,onSelectedValuesChange:n,searchValue:i,onSearchValueChange:a,getItemLabel:o,getItemKey:s,isLoading:c=!1,minSearchLength:l=3,strings:u,disabled:d=!1,className:f,renderItem:p,portalContainer:m,name:h,invalid:g,error:_,required:v,onBlur:y,onSearch:b,debounceMs:x,creatable:S,onCreate:C,getItemGroup:w,renderGroupLabel:T,hasMore:E,onLoadMore:D,isLoadingMore:O,getItemDisabled:ee,highlightMatch:k,size:te,open:A,onOpenChange:j,closeOnSelect:M=!1,applyButton:N=!1,onApply:P,onCancel:ne}){let{defaultControlSize:re}=r(),F=cr(te,re),I=fr(F),ie=dr[F],ae=g||!!_,oe=(0,G.useRef)(null),se=s??o,[L,ce]=(0,G.useState)(t),[le,R]=(0,G.useState)(!1),ue=A!==void 0,de=ue?A:le;(0,G.useEffect)(()=>{N&&ce(t)},[N,t]);let z=(0,G.useCallback)(e=>{ue||R(e),j?.(e)},[ue,j]),B=or({items:e,searchValue:i,onSearchValueChange:a,getItemLabel:o,getItemKey:s,isLoading:c,minSearchLength:l,strings:u,renderItem:p,onSearch:b,debounceMs:x,creatable:S,onCreate:C,getItemGroup:w,hasMore:E,onLoadMore:D,isLoadingMore:O,highlightMatch:k,size:F,ensuredItems:t}),fe=(0,G.useCallback)(e=>{let t=[],r=null;for(let n of e)Hn(n)?r=Un(n):t.push(n);r&&C?.(r);let i=t.length!==e.length||!r?t:null;i&&(N?ce(i):n(i)),M&&z(!1)},[n,C,N,M,z]),V=(0,G.useCallback)(()=>{N&&n(L),P?.(),z(!1)},[N,L,P,n,z]),pe=(0,G.useCallback)(()=>{N&&ce(t),ne?.(),z(!1)},[N,t,ne,z]),H=N?L:t,me=H.length>0?void 0:B.strings.placeholder;return(0,Y.jsxs)(`div`,{className:`enhanced-combobox--component`,children:[(0,Y.jsxs)(Sn,{items:B.allItems,multiple:!0,value:H,onValueChange:fe,inputValue:i,onInputValueChange:(e,{reason:t})=>{if(t===`item-press`){a(``);return}a(e)},itemToStringLabel:B.itemToStringLabel,disabled:d,filter:null,name:h,required:v,open:de,onOpenChange:e=>{!e&&N&&ce(t),z(e)},children:[(0,Y.jsxs)(In,{ref:oe,className:W(lt[I],ut[I],I===`small`?`text-xs`:`text-sm`,`bg-transparent !shadow-none`,f),size:ie,error:ae,children:[H.map(e=>(0,Y.jsx)(Ln,{children:o(e)},se(e))),(0,Y.jsx)(Rn,{placeholder:me,"aria-invalid":ae||void 0,"aria-required":v,onBlur:y})]}),(0,Y.jsx)(Xn,{isLoading:c,showStatus:B.showStatus,showEmpty:B.showEmpty,searchValue:i,minSearchLength:l,items:e,groupedItems:B.groupedItems,createOptionItem:B.createOptionItem,renderItemContent:B.renderItemContent,getItemReactKey:B.getItemReactKey,getItemDisabled:ee,renderGroupLabel:T,isLoadingMore:O,strings:B.strings,size:F,portalContainer:m,listRef:B.listRef,anchor:oe,applyFooter:N?{applyLabel:B.strings.apply,cancelLabel:B.strings.cancel,onApply:V,onCancel:pe}:void 0})]}),(0,Y.jsx)(Qn,{error:_,size:F})]})}mr.displayName=`EnhancedCombobox`,hr.displayName=`EnhancedComboboxMultiple`;export{hr as n,zn as r,mr as t};
@@ -1,2 +1,2 @@
1
- import{r as e,t}from"./chunk-QTnfLwEv.js";import{t as n}from"./leaflet-src-S_KZeH2q.js";import{i as r}from"./generic-DlyFJDj6.js";var i=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n||=self,r((n.Leaflet=n.Leaflet||{},n.Leaflet.markercluster={})))})(e,function(e){var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:`#222`,opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup)return this.addLayers([e]);if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this.fire(`layeradd`,{layer:e}),this;if(!this._map)return this._needsClustering.push(e),this.fire(`layeradd`,{layer:e}),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this.fire(`layeradd`,{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=e,n=this._zoom;if(e.__parent)for(;t.__parent._zoom>=n;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):e.getLatLng?this._map?e.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire(`layerremove`,{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire(`layerremove`,{layer:e}),this):(this._nonPointGroup.removeLayer(e),this.fire(`layerremove`,{layer:e}),this)},addLayers:function(e,t){if(!L.Util.isArray(e))return this.addLayer(e);var n=this._featureGroup,r=this._nonPointGroup,i=this.options.chunkedLoading,a=this.options.chunkInterval,o=this.options.chunkProgress,s=e.length,c=0,l=!0,u;if(this._map){var d=new Date().getTime(),f=L.bind(function(){var p=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();c<s&&!(i&&c%200==0&&new Date().getTime()-p>a);c++){if(u=e[c],u instanceof L.LayerGroup){l&&=(e=e.slice(),!1),this._extractNonGroupLayers(u,e),s=e.length;continue}if(!u.getLatLng){r.addLayer(u),t||this.fire(`layeradd`,{layer:u});continue}if(!this.hasLayer(u)&&(this._addLayer(u,this._maxZoom),t||this.fire(`layeradd`,{layer:u}),u.__parent&&u.__parent.getChildCount()===2)){var m=u.__parent.getAllChildMarkers(),h=m[0]===u?m[1]:m[0];n.removeLayer(h)}}o&&o(c,s,new Date().getTime()-d),c===s?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(f,this.options.chunkDelay)},this);f()}else for(var p=this._needsClustering;c<s;c++){if(u=e[c],u instanceof L.LayerGroup){l&&=(e=e.slice(),!1),this._extractNonGroupLayers(u,e),s=e.length;continue}if(!u.getLatLng){r.addLayer(u);continue}this.hasLayer(u)||p.push(u)}return this},removeLayers:function(e){var t,n,r=e.length,i=this._featureGroup,a=this._nonPointGroup,o=!0;if(!this._map){for(t=0;t<r;t++){if(n=e[t],n instanceof L.LayerGroup){o&&=(e=e.slice(),!1),this._extractNonGroupLayers(n,e),r=e.length;continue}this._arraySplice(this._needsClustering,n),a.removeLayer(n),this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire(`layerremove`,{layer:n})}return this}if(this._unspiderfy){this._unspiderfy();var s=e.slice(),c=r;for(t=0;t<c;t++){if(n=s[t],n instanceof L.LayerGroup){this._extractNonGroupLayers(n,s),c=s.length;continue}this._unspiderfyLayer(n)}}for(t=0;t<r;t++){if(n=e[t],n instanceof L.LayerGroup){o&&=(e=e.slice(),!1),this._extractNonGroupLayers(n,e),r=e.length;continue}if(!n.__parent){a.removeLayer(n),this.fire(`layerremove`,{layer:n});continue}this._removeLayer(n,!0,!0),this.fire(`layerremove`,{layer:n}),i.hasLayer(n)&&(i.removeLayer(n),n.clusterShow&&n.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;t>=0;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var n=this._needsClustering.slice(),r=this._needsRemoving,i,a,o;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(n),a=n.length-1;a>=0;a--){for(i=!0,o=r.length-1;o>=0;o--)if(r[o].layer===n[a]){i=!1;break}i&&e.call(t,n[a])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var e=[];return this.eachLayer(function(t){e.push(t)}),e},getLayer:function(e){var t=null;return e=parseInt(e,10),this.eachLayer(function(n){L.stamp(n)===e&&(t=n)}),t},hasLayer:function(e){if(!e)return!1;var t,n=this._needsClustering;for(t=n.length-1;t>=0;t--)if(n[t]===e)return!0;for(n=this._needsRemoving,t=n.length-1;t>=0;t--)if(n[t].layer===e)return!1;return!!(e.__parent&&e.__parent._group===this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){var n=this._map;typeof t!=`function`&&(t=function(){});var r=function(){(n.hasLayer(e)||n.hasLayer(e.__parent))&&!this._inZoomAnimation&&(this._map.off(`moveend`,r,this),this.off(`animationend`,r,this),n.hasLayer(e)?t():e.__parent._icon&&(this.once(`spiderfied`,t,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?t():e.__parent._zoom<Math.round(this._map._zoom)?(this._map.on(`moveend`,r,this),this._map.panTo(e.getLatLng())):(this._map.on(`moveend`,r,this),this.on(`animationend`,r,this),e.__parent.zoomToBounds())},onAdd:function(e){this._map=e;var t,n,r;if(!isFinite(this._map.getMaxZoom()))throw`Map has no maxZoom specified`;for(this._featureGroup.addTo(e),this._nonPointGroup.addTo(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,n=this._needsRemoving.length;t<n;t++)r=this._needsRemoving[t],r.newlatlng=r.layer._latlng,r.layer._latlng=r.latlng;for(t=0,n=this._needsRemoving.length;t<n;t++)r=this._needsRemoving[t],this._removeLayer(r.layer,!0),r.layer._latlng=r.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on(`zoomend`,this._zoomEnd,this),this._map.on(`moveend`,this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),n=this._needsClustering,this._needsClustering=[],this.addLayers(n,!0)},onRemove:function(e){e.off(`zoomend`,this._zoomEnd,this),e.off(`moveend`,this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(` leaflet-cluster-anim`,``),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return e.splice(n,1),!0},_removeFromGridUnclustered:function(e,t){for(var n=this._map,r=this._gridUnclustered,i=Math.floor(this._map.getMinZoom());t>=i&&r[t].removeObject(e,n.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){if(!this._ignoreMove&&!e.target.__dragStart){var t=e.target._popup&&e.target._popup.isOpen();this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup()}},_moveChild:function(e,t,n){e._latlng=t,this.removeLayer(e),e._latlng=n,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,n){var r=this._gridClusters,i=this._gridUnclustered,a=this._featureGroup,o=this._map,s=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var c=e.__parent,l=c._markers,u;for(this._arraySplice(l,e);c&&(c._childCount--,c._boundsNeedUpdate=!0,!(c._zoom<s));)t&&c._childCount<=1?(u=c._markers[0]===e?c._markers[1]:c._markers[0],r[c._zoom].removeObject(c,o.project(c._cLatLng,c._zoom)),i[c._zoom].addObject(u,o.project(u.getLatLng(),c._zoom)),this._arraySplice(c.__parent._childClusters,c),c.__parent._markers.push(u),u.__parent=c.__parent,c._icon&&(a.removeLayer(c),n||a.addLayer(u))):c._iconNeedsUpdate=!0,c=c.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},fire:function(e,t,n){if(t&&t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;e=`cluster`+e}L.FeatureGroup.prototype.fire.call(this,e,t,n)},listens:function(e,t){return L.FeatureGroup.prototype.listens.call(this,e,t)||L.FeatureGroup.prototype.listens.call(this,`cluster`+e,t)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),n=` marker-cluster-`;return t<10?n+=`small`:t<100?n+=`medium`:n+=`large`,new L.DivIcon({html:`<div><span>`+t+`</span></div>`,className:`marker-cluster`+n,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,n=this.options.showCoverageOnHover,r=this.options.zoomToBoundsOnClick,i=this.options.spiderfyOnEveryZoom;(t||r||i)&&this.on(`clusterclick clusterkeypress`,this._zoomOrSpiderfy,this),n&&(this.on(`clustermouseover`,this._showCoverage,this),this.on(`clustermouseout`,this._hideCoverage,this),e.on(`zoomend`,this._hideCoverage,this))},_zoomOrSpiderfy:function(e){var t=e.layer,n=t;if(!(e.type===`clusterkeypress`&&e.originalEvent&&e.originalEvent.keyCode!==13)){for(;n._childClusters.length===1;)n=n._childClusters[0];n._zoom===this._maxZoom&&n._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),this.options.spiderfyOnEveryZoom&&t.spiderfy(),e.originalEvent&&e.originalEvent.keyCode===13&&this._map._container.focus()}},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),e.layer.getChildCount()>2&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&=(this._map.removeLayer(this._shownPolygon),null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,r=this.options.spiderfyOnEveryZoom,i=this._map;(e||n||r)&&this.off(`clusterclick clusterkeypress`,this._zoomOrSpiderfy,this),t&&(this.off(`clustermouseover`,this._showCoverage,this),this.off(`clustermouseout`,this._hideCoverage,this),i.off(`zoomend`,this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),n=this.options.maxClusterRadius,r=n;typeof n!=`function`&&(r=function(){return n}),this.options.disableClusteringAtZoom!==null&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var i=e;i>=t;i--)this._gridClusters[i]=new L.DistanceGrid(r(i)),this._gridUnclustered[i]=new L.DistanceGrid(r(i));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var n=this._gridClusters,r=this._gridUnclustered,i=Math.floor(this._map.getMinZoom()),a,o;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);t>=i;t--){a=this._map.project(e.getLatLng(),t);var s=n[t].getNearObject(a);if(s){s._addChild(e),e.__parent=s;return}if(s=r[t].getNearObject(a),s){var c=s.__parent;c&&this._removeLayer(s,!1);var l=new this._markerCluster(this,t,s,e);n[t].addObject(l,this._map.project(l._cLatLng,t)),s.__parent=l,e.__parent=l;var u=l;for(o=t-1;o>c._zoom;o--)u=new this._markerCluster(this,o,u),n[o].addObject(u,this._map.project(s.getLatLng(),o));c._addChild(u),this._removeFromGridUnclustered(s,t);return}r[t].addObject(e,a)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||=setTimeout(L.bind(this._processQueue,this),300)},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var e=Math.round(this._map._zoom);this._processQueue(),this._zoom<e&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,e)):this._zoom>e?(this._animationStart(),this._animationZoomOut(this._zoom,e)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return t!==void 0&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){if(t===e)this._featureGroup.addLayer(e);else if(t._childCount===2){t._addToMap();var n=t.getAllChildMarkers();this._featureGroup.removeLayer(n[0]),this._featureGroup.removeLayer(n[1])}else t._updateIcon()},_extractNonGroupLayers:function(e,t){var n=e.getLayers(),r=0,i;for(t||=[];r<n.length;r++){if(i=n[r],i instanceof L.LayerGroup){this._extractNonGroupLayers(i,t);continue}t.push(i)}return t},_overrideMarkerIcon:function(e){return e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire(`animationend`)},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire(`animationend`)},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=` leaflet-cluster-anim`,this._inZoomAnimation++},_animationZoomIn:function(e,t){var n=this._getExpandedVisibleBounds(),r=this._featureGroup,i=Math.floor(this._map.getMinZoom()),a;this._ignoreMove=!0,this._topClusterLevel._recursively(n,e,i,function(i){var o=i._latlng,s=i._markers,c;for(n.contains(o)||(o=null),i._isSingleParent()&&e+1===t?(r.removeLayer(i),i._recursivelyAddChildrenToMap(null,t,n)):(i.clusterHide(),i._recursivelyAddChildrenToMap(o,t,n)),a=s.length-1;a>=0;a--)c=s[a],n.contains(c._latlng)||r.removeLayer(c)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,t),r.eachLayer(function(e){!(e instanceof L.MarkerCluster)&&e._icon&&e.clusterShow()}),this._topClusterLevel._recursively(n,e,t,function(e){e._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,e,i,function(e){r.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var n=this,r=this._featureGroup;r.addLayer(e),t!==e&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){r.removeLayer(e),e.clusterShow(),n._animationEnd()})):(this._forceLayout(),n._animationStart(),n._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(e,t,n){var r=this._getExpandedVisibleBounds(),i=Math.floor(this._map.getMinZoom());e._recursivelyAnimateChildrenInAndAddSelfToMap(r,i,t+1,n);var a=this;this._forceLayout(),e._recursivelyBecomeVisible(r,n),this._enqueue(function(){if(e._childCount===1){var o=e._markers[0];this._ignoreMove=!0,o.setLatLng(o.getLatLng()),this._ignoreMove=!1,o.clusterShow&&o.clusterShow()}else e._recursively(r,n,i,function(e){e._recursivelyRemoveChildrenFromMap(r,i,t+1)});a._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(` leaflet-cluster-anim`,``)),this._inZoomAnimation--,this.fire(`animationend`)},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)};var n=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,n,r){L.Marker.prototype.initialize.call(this,n?n._cLatLng||n.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,n&&this._addChild(n),r&&this._addChild(r)},getAllChildMarkers:function(e,t){e||=[];for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n].getAllChildMarkers(e,t);for(var r=this._markers.length-1;r>=0;r--)t&&this._markers[r].__dragStart||e.push(this._markers[r]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),i=this._zoom+1,a=n.getZoom(),o;t.length>0&&r>i;){i++;var s=[];for(o=0;o<t.length;o++)s=s.concat(t[o]._childClusters);t=s}r>i?this._group._map.setView(this._latlng,i):r<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&=(this._iconObj=this._group.options.iconCreateFunction(this),!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||=e._cLatLng||e._latlng},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e=this._markers,t=this._childClusters,n=0,r=0,i=this._childCount,a,o,s,c;if(i!==0){for(this._resetBounds(),a=0;a<e.length;a++)s=e[a]._latlng,this._bounds.extend(s),n+=s.lat,r+=s.lng;for(a=0;a<t.length;a++)o=t[a],o._boundsNeedUpdate&&o._recalculateBounds(),this._bounds.extend(o._bounds),s=o._wLatLng,c=o._childCount,n+=s.lat*c,r+=s.lng*c;this._latlng=this._wLatLng=new L.LatLng(n/i,r/i),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,t,n){this._recursively(e,this._group._map.getMinZoom(),n-1,function(e){var n=e._markers,r,i;for(r=n.length-1;r>=0;r--)i=n[r],i._icon&&(i._setPos(t),i.clusterHide())},function(e){var n=e._childClusters,r,i;for(r=n.length-1;r>=0;r--)i=n[r],i._icon&&(i._setPos(t),i.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,t,n,r){this._recursively(e,r,t,function(i){i._recursivelyAnimateChildrenIn(e,i._group._map.latLngToLayerPoint(i.getLatLng()).round(),n),i._isSingleParent()&&n-1===r?(i.clusterShow(),i._recursivelyRemoveChildrenFromMap(e,t,n)):i.clusterHide(),i._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(e,t,n){this._recursively(n,this._group._map.getMinZoom()-1,t,function(r){if(t!==r._zoom)for(var i=r._markers.length-1;i>=0;i--){var a=r._markers[i];n.contains(a._latlng)&&(e&&(a._backupLatlng=a.getLatLng(),a.setLatLng(e),a.clusterHide&&a.clusterHide()),r._group._featureGroup.addLayer(a))}},function(t){t._addToMap(e)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;t>=0;t--){var n=this._markers[t];n._backupLatlng&&(n.setLatLng(n._backupLatlng),delete n._backupLatlng)}if(e-1===this._zoom)for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._restorePosition();else for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,n,r){var i,a;this._recursively(e,t-1,n-1,function(e){for(a=e._markers.length-1;a>=0;a--)i=e._markers[a],(!r||!r.contains(i._latlng))&&(e._group._featureGroup.removeLayer(i),i.clusterShow&&i.clusterShow())},function(e){for(a=e._childClusters.length-1;a>=0;a--)i=e._childClusters[a],(!r||!r.contains(i._latlng))&&(e._group._featureGroup.removeLayer(i),i.clusterShow&&i.clusterShow())})},_recursively:function(e,t,n,r,i){var a=this._childClusters,o=this._zoom,s,c;if(t<=o&&(r&&r(this),i&&o===n&&i(this)),o<t||o<n)for(s=a.length-1;s>=0;s--)c=a[s],c._boundsNeedUpdate&&c._recalculateBounds(),e.intersects(c._bounds)&&c._recursively(e,t,n,r,i)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var n=this._getCoord(t.x),r=this._getCoord(t.y),i=this._grid,a=i[r]=i[r]||{},o=a[n]=a[n]||[],s=L.Util.stamp(e);this._objectPoint[s]=t,o.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var n=this._getCoord(t.x),r=this._getCoord(t.y),i=this._grid,a=i[r]=i[r]||{},o=a[n]=a[n]||[],s,c;for(delete this._objectPoint[L.Util.stamp(e)],s=0,c=o.length;s<c;s++)if(o[s]===e)return o.splice(s,1),c===1&&delete a[n],!0},eachObject:function(e,t){var n,r,i,a,o,s,c,l=this._grid;for(n in l)for(r in o=l[n],o)for(s=o[r],i=0,a=s.length;i<a;i++)c=e.call(t,s[i]),c&&(i--,a--)},getNearObject:function(e){var t=this._getCoord(e.x),n=this._getCoord(e.y),r,i,a,o,s,c,l,u,d=this._objectPoint,f=this._sqCellSize,p=null;for(r=n-1;r<=n+1;r++)if(o=this._grid[r],o){for(i=t-1;i<=t+1;i++)if(s=o[i],s)for(a=0,c=s.length;a<c;a++)l=s[a],u=this._sqDist(d[L.Util.stamp(l)],e),(u<f||u<=f&&p===null)&&(f=u,p=l)}return p},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}},(function(){L.QuickHull={getDistant:function(e,t){var n=t[1].lat-t[0].lat;return(t[0].lng-t[1].lng)*(e.lat-t[0].lat)+n*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var n=0,r=null,i=[],a,o,s;for(a=t.length-1;a>=0;a--){if(o=t[a],s=this.getDistant(o,e),s>0)i.push(o);else continue;s>n&&(n=s,r=o)}return{maxPoint:r,newPoints:i}},buildConvexHull:function(e,t){var n=[],r=this.findMostDistantPointFromBaseLine(e,t);return r.maxPoint?(n=n.concat(this.buildConvexHull([e[0],r.maxPoint],r.newPoints)),n=n.concat(this.buildConvexHull([r.maxPoint,e[1]],r.newPoints)),n):[e[0]]},getConvexHull:function(e){var t=!1,n=!1,r=!1,i=!1,a=null,o=null,s=null,c=null,l=null,u=null,d;for(d=e.length-1;d>=0;d--){var f=e[d];(t===!1||f.lat>t)&&(a=f,t=f.lat),(n===!1||f.lat<n)&&(o=f,n=f.lat),(r===!1||f.lng>r)&&(s=f,r=f.lng),(i===!1||f.lng<i)&&(c=f,i=f.lng)}return n===t?(u=c,l=s):(u=o,l=a),[].concat(this.buildConvexHull([u,l],e),this.buildConvexHull([l,u],e))}}})(),L.MarkerCluster.include({getConvexHull:function(){var e=this.getAllChildMarkers(),t=[],n,r;for(r=e.length-1;r>=0;r--)n=e[r].getLatLng(),t.push(n);return L.QuickHull.getConvexHull(t)}}),L.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var e=this.getAllChildMarkers(null,!0),t=this._group._map.latLngToLayerPoint(this._latlng),n;this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?n=this._group.options.spiderfyShapePositions(e.length,t):e.length>=this._circleSpiralSwitchover?n=this._generatePointsSpiral(e.length,t):(t.y+=10,n=this._generatePointsCircle(e.length,t)),this._animationSpiderfy(e,n)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var n=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e)/this._2PI,r=this._2PI/e,i=[],a,o;for(n=Math.max(n,35),i.length=e,a=0;a<e;a++)o=this._circleStartAngle+a*r,i[a]=new L.Point(t.x+n*Math.cos(o),t.y+n*Math.sin(o))._round();return i},_generatePointsSpiral:function(e,t){var n=this._group.options.spiderfyDistanceMultiplier,r=n*this._spiralLengthStart,i=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,o=0,s=[],c;for(s.length=e,c=e;c>=0;c--)c<e&&(s[c]=new L.Point(t.x+r*Math.cos(o),t.y+r*Math.sin(o))._round()),o+=i/r+c*5e-4,r+=a/o;return s},_noanimationUnspiderfy:function(){var e=this._group,t=e._map,n=e._featureGroup,r=this.getAllChildMarkers(null,!0),i,a;for(e._ignoreMove=!0,this.setOpacity(1),a=r.length-1;a>=0;a--)i=r[a],n.removeLayer(i),i._preSpiderfyLatlng&&(i.setLatLng(i._preSpiderfyLatlng),delete i._preSpiderfyLatlng),i.setZIndexOffset&&i.setZIndexOffset(0),i._spiderLeg&&(t.removeLayer(i._spiderLeg),delete i._spiderLeg);e.fire(`unspiderfied`,{cluster:this,markers:r}),e._ignoreMove=!1,e._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var n=this._group,r=n._map,i=n._featureGroup,a=this._group.options.spiderLegPolylineOptions,o,s,c,l;for(n._ignoreMove=!0,o=0;o<e.length;o++)l=r.layerPointToLatLng(t[o]),s=e[o],c=new L.Polyline([this._latlng,l],a),r.addLayer(c),s._spiderLeg=c,s._preSpiderfyLatlng=s._latlng,s.setLatLng(l),s.setZIndexOffset&&s.setZIndexOffset(1e6),i.addLayer(s);this.setOpacity(.3),n._ignoreMove=!1,n.fire(`spiderfied`,{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var n=this,r=this._group,i=r._map,a=r._featureGroup,o=this._latlng,s=i.latLngToLayerPoint(o),c=L.Path.SVG,l=L.extend({},this._group.options.spiderLegPolylineOptions),u=l.opacity,d,f,p,m,h,g;for(u===void 0&&(u=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),c?(l.opacity=0,l.className=(l.className||``)+` leaflet-cluster-spider-leg`):l.opacity=u,r._ignoreMove=!0,d=0;d<e.length;d++)f=e[d],g=i.layerPointToLatLng(t[d]),p=new L.Polyline([o,g],l),i.addLayer(p),f._spiderLeg=p,c&&(m=p._path,h=m.getTotalLength()+.1,m.style.strokeDasharray=h,m.style.strokeDashoffset=h),f.setZIndexOffset&&f.setZIndexOffset(1e6),f.clusterHide&&f.clusterHide(),a.addLayer(f),f._setPos&&f._setPos(s);for(r._forceLayout(),r._animationStart(),d=e.length-1;d>=0;d--)g=i.layerPointToLatLng(t[d]),f=e[d],f._preSpiderfyLatlng=f._latlng,f.setLatLng(g),f.clusterShow&&f.clusterShow(),c&&(p=f._spiderLeg,m=p._path,m.style.strokeDashoffset=0,p.setStyle({opacity:u}));this.setOpacity(.3),r._ignoreMove=!1,setTimeout(function(){r._animationEnd(),r.fire(`spiderfied`,{cluster:n,markers:e})},200)},_animationUnspiderfy:function(e){var t=this,n=this._group,r=n._map,i=n._featureGroup,a=e?r._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):r.latLngToLayerPoint(this._latlng),o=this.getAllChildMarkers(null,!0),s=L.Path.SVG,c,l,u,d,f,p;for(n._ignoreMove=!0,n._animationStart(),this.setOpacity(1),l=o.length-1;l>=0;l--)c=o[l],c._preSpiderfyLatlng&&(c.closePopup(),c.setLatLng(c._preSpiderfyLatlng),delete c._preSpiderfyLatlng,p=!0,c._setPos&&(c._setPos(a),p=!1),c.clusterHide&&(c.clusterHide(),p=!1),p&&i.removeLayer(c),s&&(u=c._spiderLeg,d=u._path,f=d.getTotalLength()+.1,d.style.strokeDashoffset=f,u.setStyle({opacity:0})));n._ignoreMove=!1,setTimeout(function(){var e=0;for(l=o.length-1;l>=0;l--)c=o[l],c._spiderLeg&&e++;for(l=o.length-1;l>=0;l--)c=o[l],c._spiderLeg&&(c.clusterShow&&c.clusterShow(),c.setZIndexOffset&&c.setZIndexOffset(0),e>1&&i.removeLayer(c),r.removeLayer(c._spiderLeg),delete c._spiderLeg);n._animationEnd(),n.fire(`unspiderfied`,{cluster:t,markers:o})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on(`click`,this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on(`zoomstart`,this._unspiderfyZoomStart,this),this._map.on(`zoomend`,this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off(`click`,this._unspiderfyWrapper,this),this._map.off(`zoomstart`,this._unspiderfyZoomStart,this),this._map.off(`zoomanim`,this._unspiderfyZoomAnim,this),this._map.off(`zoomend`,this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on(`zoomanim`,this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,`leaflet-touching`)||(this._map.off(`zoomanim`,this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,n;for(t in e)for(n=e[t].__parent;n;)n._iconNeedsUpdate=!0,n=n.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,n;for(t in e)n=e[t],this.hasLayer(n)&&n.setIcon(this._overrideMarkerIcon(n))}}),L.Marker.include({refreshIconOptions:function(e,t){var n=this.options.icon;return L.setOptions(n,e),this.setIcon(n),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=n,Object.defineProperty(e,"__esModule",{value:!0})})})),a=e(n(),1);i();function o(e){"@babel/helpers - typeof";return o=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},o(e)}var s=[`children`];function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){var t=f(e,`string`);return o(t)==`symbol`?t:t+``}function f(e,t){if(o(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(o(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function p(e,t){return v(e)||_(e,t)||h(e,t)||m()}function m(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as e,t}from"./chunk-QTnfLwEv.js";import{t as n}from"./leaflet-src-S_KZeH2q.js";import{i as r}from"./generic-CfrG943t.js";var i=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n||=self,r((n.Leaflet=n.Leaflet||{},n.Leaflet.markercluster={})))})(e,function(e){var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:`#222`,opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup)return this.addLayers([e]);if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this.fire(`layeradd`,{layer:e}),this;if(!this._map)return this._needsClustering.push(e),this.fire(`layeradd`,{layer:e}),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this.fire(`layeradd`,{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=e,n=this._zoom;if(e.__parent)for(;t.__parent._zoom>=n;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):e.getLatLng?this._map?e.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire(`layerremove`,{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire(`layerremove`,{layer:e}),this):(this._nonPointGroup.removeLayer(e),this.fire(`layerremove`,{layer:e}),this)},addLayers:function(e,t){if(!L.Util.isArray(e))return this.addLayer(e);var n=this._featureGroup,r=this._nonPointGroup,i=this.options.chunkedLoading,a=this.options.chunkInterval,o=this.options.chunkProgress,s=e.length,c=0,l=!0,u;if(this._map){var d=new Date().getTime(),f=L.bind(function(){var p=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();c<s&&!(i&&c%200==0&&new Date().getTime()-p>a);c++){if(u=e[c],u instanceof L.LayerGroup){l&&=(e=e.slice(),!1),this._extractNonGroupLayers(u,e),s=e.length;continue}if(!u.getLatLng){r.addLayer(u),t||this.fire(`layeradd`,{layer:u});continue}if(!this.hasLayer(u)&&(this._addLayer(u,this._maxZoom),t||this.fire(`layeradd`,{layer:u}),u.__parent&&u.__parent.getChildCount()===2)){var m=u.__parent.getAllChildMarkers(),h=m[0]===u?m[1]:m[0];n.removeLayer(h)}}o&&o(c,s,new Date().getTime()-d),c===s?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(f,this.options.chunkDelay)},this);f()}else for(var p=this._needsClustering;c<s;c++){if(u=e[c],u instanceof L.LayerGroup){l&&=(e=e.slice(),!1),this._extractNonGroupLayers(u,e),s=e.length;continue}if(!u.getLatLng){r.addLayer(u);continue}this.hasLayer(u)||p.push(u)}return this},removeLayers:function(e){var t,n,r=e.length,i=this._featureGroup,a=this._nonPointGroup,o=!0;if(!this._map){for(t=0;t<r;t++){if(n=e[t],n instanceof L.LayerGroup){o&&=(e=e.slice(),!1),this._extractNonGroupLayers(n,e),r=e.length;continue}this._arraySplice(this._needsClustering,n),a.removeLayer(n),this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire(`layerremove`,{layer:n})}return this}if(this._unspiderfy){this._unspiderfy();var s=e.slice(),c=r;for(t=0;t<c;t++){if(n=s[t],n instanceof L.LayerGroup){this._extractNonGroupLayers(n,s),c=s.length;continue}this._unspiderfyLayer(n)}}for(t=0;t<r;t++){if(n=e[t],n instanceof L.LayerGroup){o&&=(e=e.slice(),!1),this._extractNonGroupLayers(n,e),r=e.length;continue}if(!n.__parent){a.removeLayer(n),this.fire(`layerremove`,{layer:n});continue}this._removeLayer(n,!0,!0),this.fire(`layerremove`,{layer:n}),i.hasLayer(n)&&(i.removeLayer(n),n.clusterShow&&n.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;t>=0;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var n=this._needsClustering.slice(),r=this._needsRemoving,i,a,o;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(n),a=n.length-1;a>=0;a--){for(i=!0,o=r.length-1;o>=0;o--)if(r[o].layer===n[a]){i=!1;break}i&&e.call(t,n[a])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var e=[];return this.eachLayer(function(t){e.push(t)}),e},getLayer:function(e){var t=null;return e=parseInt(e,10),this.eachLayer(function(n){L.stamp(n)===e&&(t=n)}),t},hasLayer:function(e){if(!e)return!1;var t,n=this._needsClustering;for(t=n.length-1;t>=0;t--)if(n[t]===e)return!0;for(n=this._needsRemoving,t=n.length-1;t>=0;t--)if(n[t].layer===e)return!1;return!!(e.__parent&&e.__parent._group===this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){var n=this._map;typeof t!=`function`&&(t=function(){});var r=function(){(n.hasLayer(e)||n.hasLayer(e.__parent))&&!this._inZoomAnimation&&(this._map.off(`moveend`,r,this),this.off(`animationend`,r,this),n.hasLayer(e)?t():e.__parent._icon&&(this.once(`spiderfied`,t,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?t():e.__parent._zoom<Math.round(this._map._zoom)?(this._map.on(`moveend`,r,this),this._map.panTo(e.getLatLng())):(this._map.on(`moveend`,r,this),this.on(`animationend`,r,this),e.__parent.zoomToBounds())},onAdd:function(e){this._map=e;var t,n,r;if(!isFinite(this._map.getMaxZoom()))throw`Map has no maxZoom specified`;for(this._featureGroup.addTo(e),this._nonPointGroup.addTo(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,n=this._needsRemoving.length;t<n;t++)r=this._needsRemoving[t],r.newlatlng=r.layer._latlng,r.layer._latlng=r.latlng;for(t=0,n=this._needsRemoving.length;t<n;t++)r=this._needsRemoving[t],this._removeLayer(r.layer,!0),r.layer._latlng=r.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on(`zoomend`,this._zoomEnd,this),this._map.on(`moveend`,this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),n=this._needsClustering,this._needsClustering=[],this.addLayers(n,!0)},onRemove:function(e){e.off(`zoomend`,this._zoomEnd,this),e.off(`moveend`,this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(` leaflet-cluster-anim`,``),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return e.splice(n,1),!0},_removeFromGridUnclustered:function(e,t){for(var n=this._map,r=this._gridUnclustered,i=Math.floor(this._map.getMinZoom());t>=i&&r[t].removeObject(e,n.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){if(!this._ignoreMove&&!e.target.__dragStart){var t=e.target._popup&&e.target._popup.isOpen();this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup()}},_moveChild:function(e,t,n){e._latlng=t,this.removeLayer(e),e._latlng=n,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,n){var r=this._gridClusters,i=this._gridUnclustered,a=this._featureGroup,o=this._map,s=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var c=e.__parent,l=c._markers,u;for(this._arraySplice(l,e);c&&(c._childCount--,c._boundsNeedUpdate=!0,!(c._zoom<s));)t&&c._childCount<=1?(u=c._markers[0]===e?c._markers[1]:c._markers[0],r[c._zoom].removeObject(c,o.project(c._cLatLng,c._zoom)),i[c._zoom].addObject(u,o.project(u.getLatLng(),c._zoom)),this._arraySplice(c.__parent._childClusters,c),c.__parent._markers.push(u),u.__parent=c.__parent,c._icon&&(a.removeLayer(c),n||a.addLayer(u))):c._iconNeedsUpdate=!0,c=c.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},fire:function(e,t,n){if(t&&t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;e=`cluster`+e}L.FeatureGroup.prototype.fire.call(this,e,t,n)},listens:function(e,t){return L.FeatureGroup.prototype.listens.call(this,e,t)||L.FeatureGroup.prototype.listens.call(this,`cluster`+e,t)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),n=` marker-cluster-`;return t<10?n+=`small`:t<100?n+=`medium`:n+=`large`,new L.DivIcon({html:`<div><span>`+t+`</span></div>`,className:`marker-cluster`+n,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,n=this.options.showCoverageOnHover,r=this.options.zoomToBoundsOnClick,i=this.options.spiderfyOnEveryZoom;(t||r||i)&&this.on(`clusterclick clusterkeypress`,this._zoomOrSpiderfy,this),n&&(this.on(`clustermouseover`,this._showCoverage,this),this.on(`clustermouseout`,this._hideCoverage,this),e.on(`zoomend`,this._hideCoverage,this))},_zoomOrSpiderfy:function(e){var t=e.layer,n=t;if(!(e.type===`clusterkeypress`&&e.originalEvent&&e.originalEvent.keyCode!==13)){for(;n._childClusters.length===1;)n=n._childClusters[0];n._zoom===this._maxZoom&&n._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),this.options.spiderfyOnEveryZoom&&t.spiderfy(),e.originalEvent&&e.originalEvent.keyCode===13&&this._map._container.focus()}},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),e.layer.getChildCount()>2&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&=(this._map.removeLayer(this._shownPolygon),null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,r=this.options.spiderfyOnEveryZoom,i=this._map;(e||n||r)&&this.off(`clusterclick clusterkeypress`,this._zoomOrSpiderfy,this),t&&(this.off(`clustermouseover`,this._showCoverage,this),this.off(`clustermouseout`,this._hideCoverage,this),i.off(`zoomend`,this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),n=this.options.maxClusterRadius,r=n;typeof n!=`function`&&(r=function(){return n}),this.options.disableClusteringAtZoom!==null&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var i=e;i>=t;i--)this._gridClusters[i]=new L.DistanceGrid(r(i)),this._gridUnclustered[i]=new L.DistanceGrid(r(i));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var n=this._gridClusters,r=this._gridUnclustered,i=Math.floor(this._map.getMinZoom()),a,o;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);t>=i;t--){a=this._map.project(e.getLatLng(),t);var s=n[t].getNearObject(a);if(s){s._addChild(e),e.__parent=s;return}if(s=r[t].getNearObject(a),s){var c=s.__parent;c&&this._removeLayer(s,!1);var l=new this._markerCluster(this,t,s,e);n[t].addObject(l,this._map.project(l._cLatLng,t)),s.__parent=l,e.__parent=l;var u=l;for(o=t-1;o>c._zoom;o--)u=new this._markerCluster(this,o,u),n[o].addObject(u,this._map.project(s.getLatLng(),o));c._addChild(u),this._removeFromGridUnclustered(s,t);return}r[t].addObject(e,a)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||=setTimeout(L.bind(this._processQueue,this),300)},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var e=Math.round(this._map._zoom);this._processQueue(),this._zoom<e&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,e)):this._zoom>e?(this._animationStart(),this._animationZoomOut(this._zoom,e)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(e){var t=this._maxLat;return t!==void 0&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){if(t===e)this._featureGroup.addLayer(e);else if(t._childCount===2){t._addToMap();var n=t.getAllChildMarkers();this._featureGroup.removeLayer(n[0]),this._featureGroup.removeLayer(n[1])}else t._updateIcon()},_extractNonGroupLayers:function(e,t){var n=e.getLayers(),r=0,i;for(t||=[];r<n.length;r++){if(i=n[r],i instanceof L.LayerGroup){this._extractNonGroupLayers(i,t);continue}t.push(i)}return t},_overrideMarkerIcon:function(e){return e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire(`animationend`)},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire(`animationend`)},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=` leaflet-cluster-anim`,this._inZoomAnimation++},_animationZoomIn:function(e,t){var n=this._getExpandedVisibleBounds(),r=this._featureGroup,i=Math.floor(this._map.getMinZoom()),a;this._ignoreMove=!0,this._topClusterLevel._recursively(n,e,i,function(i){var o=i._latlng,s=i._markers,c;for(n.contains(o)||(o=null),i._isSingleParent()&&e+1===t?(r.removeLayer(i),i._recursivelyAddChildrenToMap(null,t,n)):(i.clusterHide(),i._recursivelyAddChildrenToMap(o,t,n)),a=s.length-1;a>=0;a--)c=s[a],n.contains(c._latlng)||r.removeLayer(c)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,t),r.eachLayer(function(e){!(e instanceof L.MarkerCluster)&&e._icon&&e.clusterShow()}),this._topClusterLevel._recursively(n,e,t,function(e){e._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,e,i,function(e){r.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var n=this,r=this._featureGroup;r.addLayer(e),t!==e&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){r.removeLayer(e),e.clusterShow(),n._animationEnd()})):(this._forceLayout(),n._animationStart(),n._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(e,t,n){var r=this._getExpandedVisibleBounds(),i=Math.floor(this._map.getMinZoom());e._recursivelyAnimateChildrenInAndAddSelfToMap(r,i,t+1,n);var a=this;this._forceLayout(),e._recursivelyBecomeVisible(r,n),this._enqueue(function(){if(e._childCount===1){var o=e._markers[0];this._ignoreMove=!0,o.setLatLng(o.getLatLng()),this._ignoreMove=!1,o.clusterShow&&o.clusterShow()}else e._recursively(r,n,i,function(e){e._recursivelyRemoveChildrenFromMap(r,i,t+1)});a._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(` leaflet-cluster-anim`,``)),this._inZoomAnimation--,this.fire(`animationend`)},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)};var n=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,n,r){L.Marker.prototype.initialize.call(this,n?n._cLatLng||n.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,n&&this._addChild(n),r&&this._addChild(r)},getAllChildMarkers:function(e,t){e||=[];for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n].getAllChildMarkers(e,t);for(var r=this._markers.length-1;r>=0;r--)t&&this._markers[r].__dragStart||e.push(this._markers[r]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),i=this._zoom+1,a=n.getZoom(),o;t.length>0&&r>i;){i++;var s=[];for(o=0;o<t.length;o++)s=s.concat(t[o]._childClusters);t=s}r>i?this._group._map.setView(this._latlng,i):r<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&=(this._iconObj=this._group.options.iconCreateFunction(this),!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||=e._cLatLng||e._latlng},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e=this._markers,t=this._childClusters,n=0,r=0,i=this._childCount,a,o,s,c;if(i!==0){for(this._resetBounds(),a=0;a<e.length;a++)s=e[a]._latlng,this._bounds.extend(s),n+=s.lat,r+=s.lng;for(a=0;a<t.length;a++)o=t[a],o._boundsNeedUpdate&&o._recalculateBounds(),this._bounds.extend(o._bounds),s=o._wLatLng,c=o._childCount,n+=s.lat*c,r+=s.lng*c;this._latlng=this._wLatLng=new L.LatLng(n/i,r/i),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,t,n){this._recursively(e,this._group._map.getMinZoom(),n-1,function(e){var n=e._markers,r,i;for(r=n.length-1;r>=0;r--)i=n[r],i._icon&&(i._setPos(t),i.clusterHide())},function(e){var n=e._childClusters,r,i;for(r=n.length-1;r>=0;r--)i=n[r],i._icon&&(i._setPos(t),i.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,t,n,r){this._recursively(e,r,t,function(i){i._recursivelyAnimateChildrenIn(e,i._group._map.latLngToLayerPoint(i.getLatLng()).round(),n),i._isSingleParent()&&n-1===r?(i.clusterShow(),i._recursivelyRemoveChildrenFromMap(e,t,n)):i.clusterHide(),i._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(e,t,n){this._recursively(n,this._group._map.getMinZoom()-1,t,function(r){if(t!==r._zoom)for(var i=r._markers.length-1;i>=0;i--){var a=r._markers[i];n.contains(a._latlng)&&(e&&(a._backupLatlng=a.getLatLng(),a.setLatLng(e),a.clusterHide&&a.clusterHide()),r._group._featureGroup.addLayer(a))}},function(t){t._addToMap(e)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;t>=0;t--){var n=this._markers[t];n._backupLatlng&&(n.setLatLng(n._backupLatlng),delete n._backupLatlng)}if(e-1===this._zoom)for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._restorePosition();else for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,n,r){var i,a;this._recursively(e,t-1,n-1,function(e){for(a=e._markers.length-1;a>=0;a--)i=e._markers[a],(!r||!r.contains(i._latlng))&&(e._group._featureGroup.removeLayer(i),i.clusterShow&&i.clusterShow())},function(e){for(a=e._childClusters.length-1;a>=0;a--)i=e._childClusters[a],(!r||!r.contains(i._latlng))&&(e._group._featureGroup.removeLayer(i),i.clusterShow&&i.clusterShow())})},_recursively:function(e,t,n,r,i){var a=this._childClusters,o=this._zoom,s,c;if(t<=o&&(r&&r(this),i&&o===n&&i(this)),o<t||o<n)for(s=a.length-1;s>=0;s--)c=a[s],c._boundsNeedUpdate&&c._recalculateBounds(),e.intersects(c._bounds)&&c._recursively(e,t,n,r,i)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var n=this._getCoord(t.x),r=this._getCoord(t.y),i=this._grid,a=i[r]=i[r]||{},o=a[n]=a[n]||[],s=L.Util.stamp(e);this._objectPoint[s]=t,o.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var n=this._getCoord(t.x),r=this._getCoord(t.y),i=this._grid,a=i[r]=i[r]||{},o=a[n]=a[n]||[],s,c;for(delete this._objectPoint[L.Util.stamp(e)],s=0,c=o.length;s<c;s++)if(o[s]===e)return o.splice(s,1),c===1&&delete a[n],!0},eachObject:function(e,t){var n,r,i,a,o,s,c,l=this._grid;for(n in l)for(r in o=l[n],o)for(s=o[r],i=0,a=s.length;i<a;i++)c=e.call(t,s[i]),c&&(i--,a--)},getNearObject:function(e){var t=this._getCoord(e.x),n=this._getCoord(e.y),r,i,a,o,s,c,l,u,d=this._objectPoint,f=this._sqCellSize,p=null;for(r=n-1;r<=n+1;r++)if(o=this._grid[r],o){for(i=t-1;i<=t+1;i++)if(s=o[i],s)for(a=0,c=s.length;a<c;a++)l=s[a],u=this._sqDist(d[L.Util.stamp(l)],e),(u<f||u<=f&&p===null)&&(f=u,p=l)}return p},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}},(function(){L.QuickHull={getDistant:function(e,t){var n=t[1].lat-t[0].lat;return(t[0].lng-t[1].lng)*(e.lat-t[0].lat)+n*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var n=0,r=null,i=[],a,o,s;for(a=t.length-1;a>=0;a--){if(o=t[a],s=this.getDistant(o,e),s>0)i.push(o);else continue;s>n&&(n=s,r=o)}return{maxPoint:r,newPoints:i}},buildConvexHull:function(e,t){var n=[],r=this.findMostDistantPointFromBaseLine(e,t);return r.maxPoint?(n=n.concat(this.buildConvexHull([e[0],r.maxPoint],r.newPoints)),n=n.concat(this.buildConvexHull([r.maxPoint,e[1]],r.newPoints)),n):[e[0]]},getConvexHull:function(e){var t=!1,n=!1,r=!1,i=!1,a=null,o=null,s=null,c=null,l=null,u=null,d;for(d=e.length-1;d>=0;d--){var f=e[d];(t===!1||f.lat>t)&&(a=f,t=f.lat),(n===!1||f.lat<n)&&(o=f,n=f.lat),(r===!1||f.lng>r)&&(s=f,r=f.lng),(i===!1||f.lng<i)&&(c=f,i=f.lng)}return n===t?(u=c,l=s):(u=o,l=a),[].concat(this.buildConvexHull([u,l],e),this.buildConvexHull([l,u],e))}}})(),L.MarkerCluster.include({getConvexHull:function(){var e=this.getAllChildMarkers(),t=[],n,r;for(r=e.length-1;r>=0;r--)n=e[r].getLatLng(),t.push(n);return L.QuickHull.getConvexHull(t)}}),L.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var e=this.getAllChildMarkers(null,!0),t=this._group._map.latLngToLayerPoint(this._latlng),n;this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?n=this._group.options.spiderfyShapePositions(e.length,t):e.length>=this._circleSpiralSwitchover?n=this._generatePointsSpiral(e.length,t):(t.y+=10,n=this._generatePointsCircle(e.length,t)),this._animationSpiderfy(e,n)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var n=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e)/this._2PI,r=this._2PI/e,i=[],a,o;for(n=Math.max(n,35),i.length=e,a=0;a<e;a++)o=this._circleStartAngle+a*r,i[a]=new L.Point(t.x+n*Math.cos(o),t.y+n*Math.sin(o))._round();return i},_generatePointsSpiral:function(e,t){var n=this._group.options.spiderfyDistanceMultiplier,r=n*this._spiralLengthStart,i=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,o=0,s=[],c;for(s.length=e,c=e;c>=0;c--)c<e&&(s[c]=new L.Point(t.x+r*Math.cos(o),t.y+r*Math.sin(o))._round()),o+=i/r+c*5e-4,r+=a/o;return s},_noanimationUnspiderfy:function(){var e=this._group,t=e._map,n=e._featureGroup,r=this.getAllChildMarkers(null,!0),i,a;for(e._ignoreMove=!0,this.setOpacity(1),a=r.length-1;a>=0;a--)i=r[a],n.removeLayer(i),i._preSpiderfyLatlng&&(i.setLatLng(i._preSpiderfyLatlng),delete i._preSpiderfyLatlng),i.setZIndexOffset&&i.setZIndexOffset(0),i._spiderLeg&&(t.removeLayer(i._spiderLeg),delete i._spiderLeg);e.fire(`unspiderfied`,{cluster:this,markers:r}),e._ignoreMove=!1,e._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var n=this._group,r=n._map,i=n._featureGroup,a=this._group.options.spiderLegPolylineOptions,o,s,c,l;for(n._ignoreMove=!0,o=0;o<e.length;o++)l=r.layerPointToLatLng(t[o]),s=e[o],c=new L.Polyline([this._latlng,l],a),r.addLayer(c),s._spiderLeg=c,s._preSpiderfyLatlng=s._latlng,s.setLatLng(l),s.setZIndexOffset&&s.setZIndexOffset(1e6),i.addLayer(s);this.setOpacity(.3),n._ignoreMove=!1,n.fire(`spiderfied`,{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var n=this,r=this._group,i=r._map,a=r._featureGroup,o=this._latlng,s=i.latLngToLayerPoint(o),c=L.Path.SVG,l=L.extend({},this._group.options.spiderLegPolylineOptions),u=l.opacity,d,f,p,m,h,g;for(u===void 0&&(u=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),c?(l.opacity=0,l.className=(l.className||``)+` leaflet-cluster-spider-leg`):l.opacity=u,r._ignoreMove=!0,d=0;d<e.length;d++)f=e[d],g=i.layerPointToLatLng(t[d]),p=new L.Polyline([o,g],l),i.addLayer(p),f._spiderLeg=p,c&&(m=p._path,h=m.getTotalLength()+.1,m.style.strokeDasharray=h,m.style.strokeDashoffset=h),f.setZIndexOffset&&f.setZIndexOffset(1e6),f.clusterHide&&f.clusterHide(),a.addLayer(f),f._setPos&&f._setPos(s);for(r._forceLayout(),r._animationStart(),d=e.length-1;d>=0;d--)g=i.layerPointToLatLng(t[d]),f=e[d],f._preSpiderfyLatlng=f._latlng,f.setLatLng(g),f.clusterShow&&f.clusterShow(),c&&(p=f._spiderLeg,m=p._path,m.style.strokeDashoffset=0,p.setStyle({opacity:u}));this.setOpacity(.3),r._ignoreMove=!1,setTimeout(function(){r._animationEnd(),r.fire(`spiderfied`,{cluster:n,markers:e})},200)},_animationUnspiderfy:function(e){var t=this,n=this._group,r=n._map,i=n._featureGroup,a=e?r._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):r.latLngToLayerPoint(this._latlng),o=this.getAllChildMarkers(null,!0),s=L.Path.SVG,c,l,u,d,f,p;for(n._ignoreMove=!0,n._animationStart(),this.setOpacity(1),l=o.length-1;l>=0;l--)c=o[l],c._preSpiderfyLatlng&&(c.closePopup(),c.setLatLng(c._preSpiderfyLatlng),delete c._preSpiderfyLatlng,p=!0,c._setPos&&(c._setPos(a),p=!1),c.clusterHide&&(c.clusterHide(),p=!1),p&&i.removeLayer(c),s&&(u=c._spiderLeg,d=u._path,f=d.getTotalLength()+.1,d.style.strokeDashoffset=f,u.setStyle({opacity:0})));n._ignoreMove=!1,setTimeout(function(){var e=0;for(l=o.length-1;l>=0;l--)c=o[l],c._spiderLeg&&e++;for(l=o.length-1;l>=0;l--)c=o[l],c._spiderLeg&&(c.clusterShow&&c.clusterShow(),c.setZIndexOffset&&c.setZIndexOffset(0),e>1&&i.removeLayer(c),r.removeLayer(c._spiderLeg),delete c._spiderLeg);n._animationEnd(),n.fire(`unspiderfied`,{cluster:t,markers:o})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on(`click`,this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on(`zoomstart`,this._unspiderfyZoomStart,this),this._map.on(`zoomend`,this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off(`click`,this._unspiderfyWrapper,this),this._map.off(`zoomstart`,this._unspiderfyZoomStart,this),this._map.off(`zoomanim`,this._unspiderfyZoomAnim,this),this._map.off(`zoomend`,this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on(`zoomanim`,this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,`leaflet-touching`)||(this._map.off(`zoomanim`,this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,n;for(t in e)for(n=e[t].__parent;n;)n._iconNeedsUpdate=!0,n=n.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,n;for(t in e)n=e[t],this.hasLayer(n)&&n.setIcon(this._overrideMarkerIcon(n))}}),L.Marker.include({refreshIconOptions:function(e,t){var n=this.options.icon;return L.setOptions(n,e),this.setIcon(n),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=n,Object.defineProperty(e,"__esModule",{value:!0})})})),a=e(n(),1);i();function o(e){"@babel/helpers - typeof";return o=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},o(e)}var s=[`children`];function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){var t=f(e,`string`);return o(t)==`symbol`?t:t+``}function f(e,t){if(o(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(o(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function p(e,t){return v(e)||_(e,t)||h(e,t)||m()}function m(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(e,t){if(e){if(typeof e==`string`)return g(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function v(e){if(Array.isArray(e))return e}function y(e,t){if(e==null)return{};var n,r,i=b(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function b(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}a.default.MarkerClusterGroup.include({_flushLayerBuffer:function(){this.addLayers(this._layerBuffer),this._layerBuffer=[]},addLayer:function(e){this._layerBuffer.length===0&&setTimeout(this._flushLayerBuffer.bind(this),50),this._layerBuffer.push(e)}}),a.default.MarkerClusterGroup.addInitHook(function(){this._layerBuffer=[]});function x(e,t){e.children;var n=y(e,s),r={},i={};Object.entries(n).forEach(function(e){var t=p(e,2),n=t[0],a=t[1];return n.startsWith(`on`)?i[n]=a:r[n]=a});var o=new a.default.MarkerClusterGroup(r);return Object.entries(i).forEach(function(e){var t=p(e,2),n=t[0],r=t[1],i=`cluster${n.substring(2).toLowerCase()}`;o.on(i,r)}),{instance:o,context:l(l({},t),{},{layerContainer:o})}}var S=r(x);export{S as default};