obeyaka-ui 0.1.0

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 (255) hide show
  1. package/README.md +285 -0
  2. package/dist/index.es.js +9066 -0
  3. package/dist/index.js +733 -0
  4. package/dist/planning_leader.png +0 -0
  5. package/dist/progress_leader.png +0 -0
  6. package/dist/project_leader.png +0 -0
  7. package/dist/style.css +1 -0
  8. package/dist/team_leader.png +0 -0
  9. package/dist/team_member.png +0 -0
  10. package/dist/team_owner.png +0 -0
  11. package/dist/types/components/atoms/ActionButton/ActionButton.d.ts +18 -0
  12. package/dist/types/components/atoms/ActionButton/ActionButton.d.ts.map +1 -0
  13. package/dist/types/components/atoms/ActionButton/ActionButton.types.d.ts +49 -0
  14. package/dist/types/components/atoms/ActionButton/ActionButton.types.d.ts.map +1 -0
  15. package/dist/types/components/atoms/ActionButton/index.d.ts +3 -0
  16. package/dist/types/components/atoms/ActionButton/index.d.ts.map +1 -0
  17. package/dist/types/components/atoms/BoxAvatar/BoxAvatar.d.ts +32 -0
  18. package/dist/types/components/atoms/BoxAvatar/BoxAvatar.d.ts.map +1 -0
  19. package/dist/types/components/atoms/BoxAvatar/BoxAvatar.types.d.ts +31 -0
  20. package/dist/types/components/atoms/BoxAvatar/BoxAvatar.types.d.ts.map +1 -0
  21. package/dist/types/components/atoms/BoxAvatar/EmojiAvatar/EmojiAvatar.d.ts +16 -0
  22. package/dist/types/components/atoms/BoxAvatar/EmojiAvatar/EmojiAvatar.d.ts.map +1 -0
  23. package/dist/types/components/atoms/BoxAvatar/EmojiAvatar/index.d.ts +3 -0
  24. package/dist/types/components/atoms/BoxAvatar/EmojiAvatar/index.d.ts.map +1 -0
  25. package/dist/types/components/atoms/BoxAvatar/IconAvatar/IconAvatar.d.ts +16 -0
  26. package/dist/types/components/atoms/BoxAvatar/IconAvatar/IconAvatar.d.ts.map +1 -0
  27. package/dist/types/components/atoms/BoxAvatar/IconAvatar/index.d.ts +3 -0
  28. package/dist/types/components/atoms/BoxAvatar/IconAvatar/index.d.ts.map +1 -0
  29. package/dist/types/components/atoms/BoxAvatar/ImageAvatar/ImageAvatar.d.ts +20 -0
  30. package/dist/types/components/atoms/BoxAvatar/ImageAvatar/ImageAvatar.d.ts.map +1 -0
  31. package/dist/types/components/atoms/BoxAvatar/ImageAvatar/index.d.ts +3 -0
  32. package/dist/types/components/atoms/BoxAvatar/ImageAvatar/index.d.ts.map +1 -0
  33. package/dist/types/components/atoms/BoxAvatar/PlaceholderAvatar/PlaceholderAvatar.d.ts +18 -0
  34. package/dist/types/components/atoms/BoxAvatar/PlaceholderAvatar/PlaceholderAvatar.d.ts.map +1 -0
  35. package/dist/types/components/atoms/BoxAvatar/PlaceholderAvatar/index.d.ts +3 -0
  36. package/dist/types/components/atoms/BoxAvatar/PlaceholderAvatar/index.d.ts.map +1 -0
  37. package/dist/types/components/atoms/BoxAvatar/index.d.ts +4 -0
  38. package/dist/types/components/atoms/BoxAvatar/index.d.ts.map +1 -0
  39. package/dist/types/components/atoms/BoxAvatar/utils.d.ts +7 -0
  40. package/dist/types/components/atoms/BoxAvatar/utils.d.ts.map +1 -0
  41. package/dist/types/components/atoms/Logo/Logo.d.ts +30 -0
  42. package/dist/types/components/atoms/Logo/Logo.d.ts.map +1 -0
  43. package/dist/types/components/atoms/Logo/Logo.types.d.ts +15 -0
  44. package/dist/types/components/atoms/Logo/Logo.types.d.ts.map +1 -0
  45. package/dist/types/components/atoms/Logo/index.d.ts +3 -0
  46. package/dist/types/components/atoms/Logo/index.d.ts.map +1 -0
  47. package/dist/types/components/atoms/TextButton/TextButton.d.ts +27 -0
  48. package/dist/types/components/atoms/TextButton/TextButton.d.ts.map +1 -0
  49. package/dist/types/components/atoms/TextButton/TextButton.types.d.ts +6 -0
  50. package/dist/types/components/atoms/TextButton/TextButton.types.d.ts.map +1 -0
  51. package/dist/types/components/atoms/TextButton/index.d.ts +3 -0
  52. package/dist/types/components/atoms/TextButton/index.d.ts.map +1 -0
  53. package/dist/types/components/atoms/index.d.ts +17 -0
  54. package/dist/types/components/atoms/index.d.ts.map +1 -0
  55. package/dist/types/components/index.d.ts +5 -0
  56. package/dist/types/components/index.d.ts.map +1 -0
  57. package/dist/types/components/molecules/ExpandableSearch/ExpandableSearch.d.ts +30 -0
  58. package/dist/types/components/molecules/ExpandableSearch/ExpandableSearch.d.ts.map +1 -0
  59. package/dist/types/components/molecules/ExpandableSearch/ExpandableSearch.types.d.ts +21 -0
  60. package/dist/types/components/molecules/ExpandableSearch/ExpandableSearch.types.d.ts.map +1 -0
  61. package/dist/types/components/molecules/ExpandableSearch/index.d.ts +3 -0
  62. package/dist/types/components/molecules/ExpandableSearch/index.d.ts.map +1 -0
  63. package/dist/types/components/molecules/FilterDropdown/AddFilterButton.d.ts +4 -0
  64. package/dist/types/components/molecules/FilterDropdown/AddFilterButton.d.ts.map +1 -0
  65. package/dist/types/components/molecules/FilterDropdown/FilterDropdown.d.ts +7 -0
  66. package/dist/types/components/molecules/FilterDropdown/FilterDropdown.d.ts.map +1 -0
  67. package/dist/types/components/molecules/FilterDropdown/FilterDropdown.types.d.ts +50 -0
  68. package/dist/types/components/molecules/FilterDropdown/FilterDropdown.types.d.ts.map +1 -0
  69. package/dist/types/components/molecules/FilterDropdown/FilterDropdownButton.d.ts +4 -0
  70. package/dist/types/components/molecules/FilterDropdown/FilterDropdownButton.d.ts.map +1 -0
  71. package/dist/types/components/molecules/FilterDropdown/FilterDropdownFilters.d.ts +4 -0
  72. package/dist/types/components/molecules/FilterDropdown/FilterDropdownFilters.d.ts.map +1 -0
  73. package/dist/types/components/molecules/FilterDropdown/FilterTag.d.ts +4 -0
  74. package/dist/types/components/molecules/FilterDropdown/FilterTag.d.ts.map +1 -0
  75. package/dist/types/components/molecules/FilterDropdown/index.d.ts +7 -0
  76. package/dist/types/components/molecules/FilterDropdown/index.d.ts.map +1 -0
  77. package/dist/types/components/molecules/Menu/Menu.d.ts +28 -0
  78. package/dist/types/components/molecules/Menu/Menu.d.ts.map +1 -0
  79. package/dist/types/components/molecules/Menu/Menu.types.d.ts +10 -0
  80. package/dist/types/components/molecules/Menu/Menu.types.d.ts.map +1 -0
  81. package/dist/types/components/molecules/Menu/MenuItem.d.ts +9 -0
  82. package/dist/types/components/molecules/Menu/MenuItem.d.ts.map +1 -0
  83. package/dist/types/components/molecules/Menu/index.d.ts +5 -0
  84. package/dist/types/components/molecules/Menu/index.d.ts.map +1 -0
  85. package/dist/types/components/molecules/NavButton/NavButton.d.ts +30 -0
  86. package/dist/types/components/molecules/NavButton/NavButton.d.ts.map +1 -0
  87. package/dist/types/components/molecules/NavButton/NavButton.types.d.ts +13 -0
  88. package/dist/types/components/molecules/NavButton/NavButton.types.d.ts.map +1 -0
  89. package/dist/types/components/molecules/NavButton/index.d.ts +3 -0
  90. package/dist/types/components/molecules/NavButton/index.d.ts.map +1 -0
  91. package/dist/types/components/molecules/NavLink/NavLink.d.ts +4 -0
  92. package/dist/types/components/molecules/NavLink/NavLink.d.ts.map +1 -0
  93. package/dist/types/components/molecules/NavLink/NavLink.types.d.ts +27 -0
  94. package/dist/types/components/molecules/NavLink/NavLink.types.d.ts.map +1 -0
  95. package/dist/types/components/molecules/NavLink/index.d.ts +3 -0
  96. package/dist/types/components/molecules/NavLink/index.d.ts.map +1 -0
  97. package/dist/types/components/molecules/index.d.ts +11 -0
  98. package/dist/types/components/molecules/index.d.ts.map +1 -0
  99. package/dist/types/components/organisms/AvatarSelector/AvatarSelector.d.ts +3 -0
  100. package/dist/types/components/organisms/AvatarSelector/AvatarSelector.d.ts.map +1 -0
  101. package/dist/types/components/organisms/AvatarSelector/AvatarSelector.types.d.ts +83 -0
  102. package/dist/types/components/organisms/AvatarSelector/AvatarSelector.types.d.ts.map +1 -0
  103. package/dist/types/components/organisms/AvatarSelector/EmojiPicker/CustomEmojiPicker.d.ts +7 -0
  104. package/dist/types/components/organisms/AvatarSelector/EmojiPicker/CustomEmojiPicker.d.ts.map +1 -0
  105. package/dist/types/components/organisms/AvatarSelector/EmojiPicker/useEmojiAvatarSelector.d.ts +25 -0
  106. package/dist/types/components/organisms/AvatarSelector/EmojiPicker/useEmojiAvatarSelector.d.ts.map +1 -0
  107. package/dist/types/components/organisms/AvatarSelector/IconsPicker/CategoryTabs.d.ts +7 -0
  108. package/dist/types/components/organisms/AvatarSelector/IconsPicker/CategoryTabs.d.ts.map +1 -0
  109. package/dist/types/components/organisms/AvatarSelector/IconsPicker/IconComponents.d.ts +31 -0
  110. package/dist/types/components/organisms/AvatarSelector/IconsPicker/IconComponents.d.ts.map +1 -0
  111. package/dist/types/components/organisms/AvatarSelector/IconsPicker/IconGrid.d.ts +8 -0
  112. package/dist/types/components/organisms/AvatarSelector/IconsPicker/IconGrid.d.ts.map +1 -0
  113. package/dist/types/components/organisms/AvatarSelector/IconsPicker/avatarIcons.d.ts +50 -0
  114. package/dist/types/components/organisms/AvatarSelector/IconsPicker/avatarIcons.d.ts.map +1 -0
  115. package/dist/types/components/organisms/AvatarSelector/IconsPicker/index.d.ts +5 -0
  116. package/dist/types/components/organisms/AvatarSelector/IconsPicker/index.d.ts.map +1 -0
  117. package/dist/types/components/organisms/AvatarSelector/ImagePicker/ImageUploader.d.ts +14 -0
  118. package/dist/types/components/organisms/AvatarSelector/ImagePicker/ImageUploader.d.ts.map +1 -0
  119. package/dist/types/components/organisms/AvatarSelector/PopoverLoader.d.ts +2 -0
  120. package/dist/types/components/organisms/AvatarSelector/PopoverLoader.d.ts.map +1 -0
  121. package/dist/types/components/organisms/AvatarSelector/TabHeader.d.ts +13 -0
  122. package/dist/types/components/organisms/AvatarSelector/TabHeader.d.ts.map +1 -0
  123. package/dist/types/components/organisms/AvatarSelector/Tabs.d.ts +24 -0
  124. package/dist/types/components/organisms/AvatarSelector/Tabs.d.ts.map +1 -0
  125. package/dist/types/components/organisms/AvatarSelector/index.d.ts +10 -0
  126. package/dist/types/components/organisms/AvatarSelector/index.d.ts.map +1 -0
  127. package/dist/types/components/organisms/AvatarSelector/useExternalEvents.d.ts +14 -0
  128. package/dist/types/components/organisms/AvatarSelector/useExternalEvents.d.ts.map +1 -0
  129. package/dist/types/components/organisms/AvatarSelector/utils/index.d.ts +2 -0
  130. package/dist/types/components/organisms/AvatarSelector/utils/index.d.ts.map +1 -0
  131. package/dist/types/components/organisms/AvatarSelector/utils/initials.d.ts +7 -0
  132. package/dist/types/components/organisms/AvatarSelector/utils/initials.d.ts.map +1 -0
  133. package/dist/types/components/organisms/AvatarSelector/utils/preload.d.ts +10 -0
  134. package/dist/types/components/organisms/AvatarSelector/utils/preload.d.ts.map +1 -0
  135. package/dist/types/components/organisms/AvatarSelector/utils.d.ts +30 -0
  136. package/dist/types/components/organisms/AvatarSelector/utils.d.ts.map +1 -0
  137. package/dist/types/components/organisms/GenericTable/GenericTable.d.ts +38 -0
  138. package/dist/types/components/organisms/GenericTable/GenericTable.d.ts.map +1 -0
  139. package/dist/types/components/organisms/GenericTable/GenericTable.types.d.ts +71 -0
  140. package/dist/types/components/organisms/GenericTable/GenericTable.types.d.ts.map +1 -0
  141. package/dist/types/components/organisms/GenericTable/index.d.ts +5 -0
  142. package/dist/types/components/organisms/GenericTable/index.d.ts.map +1 -0
  143. package/dist/types/components/organisms/GenericTable/useGenericTablePagination.d.ts +4 -0
  144. package/dist/types/components/organisms/GenericTable/useGenericTablePagination.d.ts.map +1 -0
  145. package/dist/types/components/organisms/InvitedUserCard/InvitedUserCard.d.ts +4 -0
  146. package/dist/types/components/organisms/InvitedUserCard/InvitedUserCard.d.ts.map +1 -0
  147. package/dist/types/components/organisms/InvitedUserCard/InvitedUserCard.types.d.ts +27 -0
  148. package/dist/types/components/organisms/InvitedUserCard/InvitedUserCard.types.d.ts.map +1 -0
  149. package/dist/types/components/organisms/InvitedUserCard/index.d.ts +3 -0
  150. package/dist/types/components/organisms/InvitedUserCard/index.d.ts.map +1 -0
  151. package/dist/types/components/organisms/Navbar/Navbar.d.ts +4 -0
  152. package/dist/types/components/organisms/Navbar/Navbar.d.ts.map +1 -0
  153. package/dist/types/components/organisms/Navbar/Navbar.types.d.ts +20 -0
  154. package/dist/types/components/organisms/Navbar/Navbar.types.d.ts.map +1 -0
  155. package/dist/types/components/organisms/Navbar/NavbarProvider.d.ts +12 -0
  156. package/dist/types/components/organisms/Navbar/NavbarProvider.d.ts.map +1 -0
  157. package/dist/types/components/organisms/Navbar/index.d.ts +4 -0
  158. package/dist/types/components/organisms/Navbar/index.d.ts.map +1 -0
  159. package/dist/types/components/organisms/NotificationSidebar/NotificationCard.d.ts +4 -0
  160. package/dist/types/components/organisms/NotificationSidebar/NotificationCard.d.ts.map +1 -0
  161. package/dist/types/components/organisms/NotificationSidebar/NotificationSidebar.d.ts +35 -0
  162. package/dist/types/components/organisms/NotificationSidebar/NotificationSidebar.d.ts.map +1 -0
  163. package/dist/types/components/organisms/NotificationSidebar/NotificationSidebar.types.d.ts +40 -0
  164. package/dist/types/components/organisms/NotificationSidebar/NotificationSidebar.types.d.ts.map +1 -0
  165. package/dist/types/components/organisms/NotificationSidebar/index.d.ts +4 -0
  166. package/dist/types/components/organisms/NotificationSidebar/index.d.ts.map +1 -0
  167. package/dist/types/components/organisms/NotificationSidebar/useNotificationSidebar.d.ts +5 -0
  168. package/dist/types/components/organisms/NotificationSidebar/useNotificationSidebar.d.ts.map +1 -0
  169. package/dist/types/components/organisms/PopoverSelector/PopoverItem.d.ts +15 -0
  170. package/dist/types/components/organisms/PopoverSelector/PopoverItem.d.ts.map +1 -0
  171. package/dist/types/components/organisms/PopoverSelector/PopoverSelector.d.ts +35 -0
  172. package/dist/types/components/organisms/PopoverSelector/PopoverSelector.d.ts.map +1 -0
  173. package/dist/types/components/organisms/PopoverSelector/PopoverSelector.types.d.ts +62 -0
  174. package/dist/types/components/organisms/PopoverSelector/PopoverSelector.types.d.ts.map +1 -0
  175. package/dist/types/components/organisms/PopoverSelector/index.d.ts +4 -0
  176. package/dist/types/components/organisms/PopoverSelector/index.d.ts.map +1 -0
  177. package/dist/types/components/organisms/ShareMenu/InputTags.d.ts +6 -0
  178. package/dist/types/components/organisms/ShareMenu/InputTags.d.ts.map +1 -0
  179. package/dist/types/components/organisms/ShareMenu/InputTags.utils.d.ts +31 -0
  180. package/dist/types/components/organisms/ShareMenu/InputTags.utils.d.ts.map +1 -0
  181. package/dist/types/components/organisms/ShareMenu/ShareButton.d.ts +14 -0
  182. package/dist/types/components/organisms/ShareMenu/ShareButton.d.ts.map +1 -0
  183. package/dist/types/components/organisms/ShareMenu/ShareMenu.d.ts +35 -0
  184. package/dist/types/components/organisms/ShareMenu/ShareMenu.d.ts.map +1 -0
  185. package/dist/types/components/organisms/ShareMenu/ShareMenu.types.d.ts +46 -0
  186. package/dist/types/components/organisms/ShareMenu/ShareMenu.types.d.ts.map +1 -0
  187. package/dist/types/components/organisms/ShareMenu/hooks/index.d.ts +5 -0
  188. package/dist/types/components/organisms/ShareMenu/hooks/index.d.ts.map +1 -0
  189. package/dist/types/components/organisms/ShareMenu/hooks/useInputTags.d.ts +21 -0
  190. package/dist/types/components/organisms/ShareMenu/hooks/useInputTags.d.ts.map +1 -0
  191. package/dist/types/components/organisms/ShareMenu/hooks/useShareMenu.d.ts +38 -0
  192. package/dist/types/components/organisms/ShareMenu/hooks/useShareMenu.d.ts.map +1 -0
  193. package/dist/types/components/organisms/ShareMenu/index.d.ts +6 -0
  194. package/dist/types/components/organisms/ShareMenu/index.d.ts.map +1 -0
  195. package/dist/types/components/organisms/ShareMenu/validation.utils.d.ts +28 -0
  196. package/dist/types/components/organisms/ShareMenu/validation.utils.d.ts.map +1 -0
  197. package/dist/types/components/organisms/WorkspaceSelector/WorkspaceSelector.d.ts +34 -0
  198. package/dist/types/components/organisms/WorkspaceSelector/WorkspaceSelector.d.ts.map +1 -0
  199. package/dist/types/components/organisms/WorkspaceSelector/WorkspaceSelector.types.d.ts +35 -0
  200. package/dist/types/components/organisms/WorkspaceSelector/WorkspaceSelector.types.d.ts.map +1 -0
  201. package/dist/types/components/organisms/WorkspaceSelector/WorkspaceSelectorItem.d.ts +16 -0
  202. package/dist/types/components/organisms/WorkspaceSelector/WorkspaceSelectorItem.d.ts.map +1 -0
  203. package/dist/types/components/organisms/WorkspaceSelector/index.d.ts +5 -0
  204. package/dist/types/components/organisms/WorkspaceSelector/index.d.ts.map +1 -0
  205. package/dist/types/components/organisms/index.d.ts +22 -0
  206. package/dist/types/components/organisms/index.d.ts.map +1 -0
  207. package/dist/types/components/templates/CenterPeek/CenterPeek.d.ts +4 -0
  208. package/dist/types/components/templates/CenterPeek/CenterPeek.d.ts.map +1 -0
  209. package/dist/types/components/templates/CenterPeek/CenterPeek.types.d.ts +9 -0
  210. package/dist/types/components/templates/CenterPeek/CenterPeek.types.d.ts.map +1 -0
  211. package/dist/types/components/templates/CenterPeek/index.d.ts +3 -0
  212. package/dist/types/components/templates/CenterPeek/index.d.ts.map +1 -0
  213. package/dist/types/components/templates/FullPage/FullPage.d.ts +5 -0
  214. package/dist/types/components/templates/FullPage/FullPage.d.ts.map +1 -0
  215. package/dist/types/components/templates/FullPage/index.d.ts +2 -0
  216. package/dist/types/components/templates/FullPage/index.d.ts.map +1 -0
  217. package/dist/types/components/templates/SidePeek/SidePeek.d.ts +4 -0
  218. package/dist/types/components/templates/SidePeek/SidePeek.d.ts.map +1 -0
  219. package/dist/types/components/templates/SidePeek/SidePeek.types.d.ts +9 -0
  220. package/dist/types/components/templates/SidePeek/SidePeek.types.d.ts.map +1 -0
  221. package/dist/types/components/templates/SidePeek/index.d.ts +3 -0
  222. package/dist/types/components/templates/SidePeek/index.d.ts.map +1 -0
  223. package/dist/types/components/templates/index.d.ts +6 -0
  224. package/dist/types/components/templates/index.d.ts.map +1 -0
  225. package/dist/types/index.d.ts +4 -0
  226. package/dist/types/index.d.ts.map +1 -0
  227. package/dist/types/layouts/AppLayout/AppLayout.d.ts +4 -0
  228. package/dist/types/layouts/AppLayout/AppLayout.d.ts.map +1 -0
  229. package/dist/types/layouts/AppLayout/AppLayout.types.d.ts +8 -0
  230. package/dist/types/layouts/AppLayout/AppLayout.types.d.ts.map +1 -0
  231. package/dist/types/layouts/AppLayout/AppLayoutProvider.d.ts +24 -0
  232. package/dist/types/layouts/AppLayout/AppLayoutProvider.d.ts.map +1 -0
  233. package/dist/types/layouts/AppLayout/index.d.ts +4 -0
  234. package/dist/types/layouts/AppLayout/index.d.ts.map +1 -0
  235. package/dist/types/layouts/BaseLayout/BaseLayout.d.ts +4 -0
  236. package/dist/types/layouts/BaseLayout/BaseLayout.d.ts.map +1 -0
  237. package/dist/types/layouts/BaseLayout/BaseLayout.types.d.ts +7 -0
  238. package/dist/types/layouts/BaseLayout/BaseLayout.types.d.ts.map +1 -0
  239. package/dist/types/layouts/BaseLayout/index.d.ts +3 -0
  240. package/dist/types/layouts/BaseLayout/index.d.ts.map +1 -0
  241. package/dist/types/layouts/index.d.ts +3 -0
  242. package/dist/types/layouts/index.d.ts.map +1 -0
  243. package/dist/types/theme/ThemeProvider.d.ts +9 -0
  244. package/dist/types/theme/ThemeProvider.d.ts.map +1 -0
  245. package/dist/types/theme/index.d.ts +143 -0
  246. package/dist/types/theme/index.d.ts.map +1 -0
  247. package/dist/types/utils/date.d.ts +48 -0
  248. package/dist/types/utils/date.d.ts.map +1 -0
  249. package/dist/types/utils/images.d.ts +17 -0
  250. package/dist/types/utils/images.d.ts.map +1 -0
  251. package/dist/types/utils/imports.d.ts +29 -0
  252. package/dist/types/utils/imports.d.ts.map +1 -0
  253. package/dist/types/utils/index.d.ts +3 -0
  254. package/dist/types/utils/index.d.ts.map +1 -0
  255. package/package.json +102 -0
package/dist/index.js ADDED
@@ -0,0 +1,733 @@
1
+ "use strict";var kt=Object.create;var Ke=Object.defineProperty;var Ct=Object.getOwnPropertyDescriptor;var jt=Object.getOwnPropertyNames;var _t=Object.getPrototypeOf,St=Object.prototype.hasOwnProperty;var Mt=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of jt(n))!St.call(e,s)&&s!==t&&Ke(e,s,{get:()=>n[s],enumerable:!(r=Ct(n,s))||r.enumerable});return e};var Ee=(e,n,t)=>(t=e!=null?kt(_t(e)):{},Mt(n||!e||!e.__esModule?Ke(t,"default",{value:e,enumerable:!0}):t,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),p=require("react"),a=require("@mantine/core"),C=require("@tabler/icons-react"),je=require("@emoji-mart/data");require("@mantine/hooks");const $t=require("@mantine/notifications"),zt=require("@mantine/modals"),Ot=require("@mantine/dates"),W=p.memo(({onClick:e,icon:n,changeIconOnHover:t=!1,iconHovered:r,iconColor:s="var(--mantine-color-gray-7)",size:i="md",variant:c="transparent",bg:u,disabled:l=!1,loading:f=!1,tooltip:d,"aria-label":g,className:h,style:I,onMouseEnter:v,onMouseLeave:x,...m})=>{const[y,w]=p.useState(!1),S=p.useCallback(()=>{l||f||(e==null||e(),console.log("Clicked"))},[l,f,e]),_=p.useMemo(()=>({xs:14,sm:16,md:20,lg:24,xl:28})[i]||20,[i]),$=p.useMemo(()=>({xs:2,sm:2,md:2,lg:2,xl:2.5})[i]||2,[i]),D=p.useCallback(B=>{w(!0),v==null||v(B)},[v]),z=p.useCallback(B=>{w(!1),x==null||x(B)},[x]),k=p.useMemo(()=>{if(u)return u;if(c==="transparent")return y?"var(--mantine-color-gray-2)":"transparent"},[u,c,y]),R=p.useMemo(()=>t&&r&&y?r:n,[t,r,y,n]),L=p.useMemo(()=>o.jsx(R,{size:_,strokeWidth:$,color:s}),[R,_,$,s]),T=o.jsx(a.ActionIcon,{onClick:S,bg:k,color:s,radius:"md",variant:c==="transparent"?"transparent":c,size:i,disabled:l||f,loading:f,onMouseEnter:D,onMouseLeave:z,"aria-label":g||d,className:h,style:I,...m,children:L});return d&&!l&&!f?o.jsx(a.Tooltip,{label:d,position:"top",withArrow:!0,children:T}):T});W.displayName="ActionButton";const Dt=e=>{const n={xs:{width:28,height:28,fontSize:16},sm:{width:32,height:32,fontSize:24},md:{width:36,height:36,fontSize:32},lg:{width:40,height:40,fontSize:40},xl:{width:44,height:44,fontSize:48}};return typeof e=="number"?{width:e,height:e,fontSize:e-8}:n[e]},Cn=({emoji:e,size:n="lg",editable:t=!1,onClick:r,className:s,style:i})=>{const c=Dt(n),u=t&&r;return o.jsx(a.Box,{className:s,style:{...c,borderRadius:"var(--mantine-radius-md)",overflow:"hidden",cursor:u?"pointer":"default",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease",backgroundColor:"transparent",...i},onClick:u?r:void 0,onMouseEnter:l=>{u&&(l.currentTarget.style.backgroundColor="var(--mantine-color-gray-0)")},onMouseLeave:l=>{u&&(l.currentTarget.style.backgroundColor="transparent")},children:o.jsx(a.Box,{style:{fontSize:c.fontSize,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center"},children:e})})},ie=e=>{if(typeof e=="number")return e;switch(e){case"xs":return 24;case"sm":return 32;case"md":return 48;case"lg":return 64;case"xl":return 80;default:return 64}},J=new Map,Tt=["IconUser","IconHeart","IconStar","IconSmile","IconSun","IconMoon","IconCamera","IconMusic","IconCode","IconBriefcase","IconHome","IconSearch","IconSettings","IconMail","IconPhone","IconBell","IconBookmark","IconCalendar","IconClock","IconDownload","IconEdit","IconEye","IconFile","IconFolder","IconImage","IconLink","IconLock","IconMessage","IconPlus","IconShare","IconThumbUp","IconTrash"],Rt=async()=>{try{const e=await import("@tabler/icons-react");Tt.forEach(n=>{if(!J.has(n)){const t=e[n];t&&J.set(n,t)}})}catch(e){console.warn("Error preloading common icons:",e)}};Rt();const Et=async e=>{if(J.has(e))return J.get(e);try{const r=(await import("@tabler/icons-react"))[e]||C.IconQuestionMark;return J.set(e,r),r}catch{return J.set(e,C.IconQuestionMark),C.IconQuestionMark}},Bt=e=>e.replace(/^Icon/,"").replace(/([A-Z])/g," $1").trim().toLowerCase().replace(/^./,t=>t.toUpperCase()),jn=p.memo(({iconName:e,onClick:n,size:t=20})=>{const[r,s]=p.useState(null),[i,c]=p.useState(!0),u=p.useRef(null),l=p.useRef(!0);p.useEffect(()=>(l.current=!0,(async()=>{try{const h=(await import("@tabler/icons-react"))[e];l.current&&(s(h?()=>h:C.IconQuestionMark),c(!1))}catch{l.current&&(s(()=>C.IconQuestionMark),c(!1))}})(),()=>{l.current=!1}),[e]);const f=()=>{i||n()};return i?o.jsx(a.Box,{ref:u,style:{width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",border:"none",borderRadius:"var(--mantine-radius-sm)"},children:o.jsx(a.Skeleton,{width:t,height:t})}):o.jsx(a.Tooltip,{label:Bt(e),position:"top",withArrow:!0,openDelay:300,withinPortal:!0,zIndex:1e3,color:"dark",children:o.jsx(a.Box,{ref:u,onClick:f,style:{width:"40px",height:"40px",fontSize:`${t}px`,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",border:"none",transition:"all 0.2s ease",cursor:i?"not-allowed":"pointer",borderRadius:"var(--mantine-radius-md)"},onMouseEnter:d=>{i||(d.currentTarget.style.backgroundColor="var(--mantine-color-gray-1)",d.currentTarget.style.transform="scale(1.05)")},onMouseLeave:d=>{i||(d.currentTarget.style.backgroundColor="transparent",d.currentTarget.style.transform="scale(1)")},onMouseDown:d=>{i||(d.currentTarget.style.backgroundColor="var(--mantine-color-gray-2)",d.currentTarget.style.transform="scale(0.95)")},onMouseUp:d=>{i||(d.currentTarget.style.backgroundColor="var(--mantine-color-gray-1)",d.currentTarget.style.transform="scale(1.05)")},children:r&&o.jsx(r,{size:t,color:"var(--mantine-color-gray-7)"})})})});jn.displayName="IconButton";const _n=p.memo(({iconName:e,size:n="lg",style:t,withBorder:r=!1,radius:s="md",onClick:i,onMouseEnter:c,onMouseLeave:u})=>{const[l,f]=p.useState(!1),[d,g]=p.useState(()=>J.get(e)||null),h=ie(n),I=Math.round(h*.9);p.useEffect(()=>{if(J.has(e)){g(()=>J.get(e));return}let x=!0;return Et(e).then(m=>{x&&g(()=>m)}),()=>{x=!1}},[e]);const v=()=>typeof s=="number"?s:`var(--mantine-radius-${s})`;return d?o.jsx(a.Box,{style:{width:`${h}px !important`,height:`${h}px !important`,minWidth:`${h}px`,minHeight:`${h}px`,maxWidth:`${h}px`,maxHeight:`${h}px`,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:v(),cursor:i?"pointer":"default",border:r?"1px solid var(--mantine-color-gray-4)":"none",backgroundColor:l?"var(--mantine-color-gray-0)":"transparent",flexShrink:0,boxSizing:"border-box",transition:"background-color 0.2s ease",...t},onClick:i,onMouseEnter:x=>{f(!0),c==null||c(x)},onMouseLeave:x=>{f(!1),u==null||u(x)},children:o.jsx(d,{size:I,color:"var(--mantine-color-gray-8)"})}):o.jsx(a.Box,{style:{width:`${h}px !important`,height:`${h}px !important`,minWidth:`${h}px`,minHeight:`${h}px`,maxWidth:`${h}px`,maxHeight:`${h}px`,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:v(),cursor:i?"pointer":"default",border:r?"1px solid var(--mantine-color-gray-4)":"none",backgroundColor:l?"var(--mantine-color-gray-0)":"transparent",flexShrink:0,boxSizing:"border-box",transition:"background-color 0.2s ease",...t},onClick:i,onMouseEnter:x=>{f(!0),c==null||c(x)},onMouseLeave:x=>{f(!1),u==null||u(x)}})});_n.displayName="IconAvatar";const Pt=e=>{const n={xs:{width:28,height:28},sm:{width:32,height:32},md:{width:36,height:36},lg:{width:40,height:40},xl:{width:44,height:44}};return typeof e=="number"?{width:e,height:e}:n[e]},Sn=({iconName:e,size:n="lg",editable:t=!1,onClick:r,className:s,style:i})=>{const c=Pt(n),u=t&&r;return o.jsx(a.Box,{className:s,style:{...c,borderRadius:"var(--mantine-radius-md)",overflow:"hidden",cursor:u?"pointer":"default",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease",backgroundColor:"transparent",...i},onClick:u?r:void 0,onMouseEnter:l=>{u&&(l.currentTarget.style.backgroundColor="var(--mantine-color-gray-0)")},onMouseLeave:l=>{u&&(l.currentTarget.style.backgroundColor="transparent")},children:o.jsx(a.Box,{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:o.jsx(_n,{iconName:e,size:c.width,onClick:void 0})})})},Lt=e=>{const n={xs:{width:28,height:28},sm:{width:32,height:32},md:{width:36,height:36},lg:{width:40,height:40},xl:{width:44,height:44}};return typeof e=="number"?{width:e,height:e}:n[e]},Mn=({src:e,size:n="lg",editable:t=!1,onClick:r,className:s,style:i,loading:c=!1,alt:u="Avatar"})=>{const[l,f]=p.useState(!1),d=Lt(n),g=t&&r,h=()=>{f(!0)},I=()=>{f(!1)};return o.jsx(a.Box,{className:s,style:{...d,borderRadius:"var(--mantine-radius-md)",overflow:"hidden",cursor:g?"pointer":"default",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease",backgroundColor:"transparent",...i},onClick:g?r:void 0,onMouseEnter:v=>{g&&(v.currentTarget.style.backgroundColor="var(--mantine-color-gray-0)")},onMouseLeave:v=>{g&&(v.currentTarget.style.backgroundColor="transparent")},children:c?o.jsx(a.Loader,{size:"sm",color:"var(--mantine-color-gray-6)",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}):!l&&o.jsx("img",{src:e,alt:u,style:{width:"100%",height:"100%",objectFit:"cover"},onError:h,onLoad:I})})},At=e=>{const n={xs:{width:28,height:28,fontSize:14},sm:{width:32,height:32,fontSize:16},md:{width:36,height:36,fontSize:20},lg:{width:40,height:40,fontSize:24},xl:{width:44,height:44,fontSize:32}};return typeof e=="number"?{width:e,height:e,fontSize:e*.5}:n[e]},_e=({text:e="?",size:n="lg",editable:t=!1,onClick:r,className:s,style:i,loading:c=!1})=>{const u=At(n),l=t&&r;return o.jsx(a.Box,{className:s,style:{...u,borderRadius:"var(--mantine-radius-md)",overflow:"hidden",cursor:l?"pointer":"default",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease",backgroundColor:"var(--mantine-color-gray-2)",...i},onClick:l?r:void 0,onMouseEnter:f=>{l&&(f.currentTarget.style.backgroundColor="var(--mantine-color-gray-3)")},onMouseLeave:f=>{l&&(f.currentTarget.style.backgroundColor="var(--mantine-color-gray-2)")},children:c?o.jsx(a.Loader,{size:"sm",color:"var(--mantine-color-gray-6)",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}):o.jsx(a.Box,{style:{fontSize:u.fontSize,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,color:"var(--mantine-color-gray-7)"},children:e})})},$n=e=>{if(!e)return"";const n=["de","del","la","las","los","y","el","en","con"],r=e.trim().split(/\s+/).filter(s=>!n.includes(s.toLowerCase())).map(s=>{var i;return((i=s[0])==null?void 0:i.toUpperCase())||""}).filter(Boolean).slice(0,2).join("");return r.length===1?r+r:r.length===0?e.slice(0,2).toUpperCase():r},ae=({avatar:e,size:n="lg",loading:t=!1,onClick:r,className:s,style:i,showPlaceholder:c=!0,placeholder:u,editable:l=!1})=>{const f=()=>{if(e)switch(e.type){case"emoji":return o.jsx(Cn,{emoji:e.value,size:n,editable:l,onClick:r});case"icon":return o.jsx(Sn,{iconName:e.value,size:n,editable:l,onClick:r});case"image":return o.jsx(Mn,{src:e.value,size:n,editable:l,onClick:r})}if(c){const g=u?$n(u):"?";return o.jsx(_e,{text:g,size:n,editable:l,onClick:r})}return null};if(t)return o.jsx(_e,{size:n,loading:!0,className:s,style:i});const d=f();return d?o.jsx("div",{className:s,style:i,children:d}):null},zn=({label:e,onClick:n,isActive:t=!1})=>{const[r,s]=p.useState(!1);return o.jsx(a.Box,{onClick:n,bg:r||t?"var(--mantine-color-gray-0)":"transparent",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),h:28,style:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--mantine-radius-md)",padding:"0px 10px",cursor:"pointer"},children:o.jsx(a.Text,{fw:500,fz:"sm",truncate:"end",c:"var(--mantine-color-gray-9)",children:e})})},Ht=new URL("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTUiIGhlaWdodD0iNTYiIHZpZXdCb3g9IjAgMCA1NSA1NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAgMC43NUg1NVY1NS43NUgwVjAuNzVaIiBmaWxsPSIjRjZGNUY0Ii8+CjxwYXRoIGQ9Ik04LjgwMDI5IDM0LjYzQzguODAwMjkgMzQuMTQ0IDkuMTk0MjggMzMuNzUgOS42ODAyOSAzMy43NUgxOC45MjAzQzE5LjQwNjMgMzMuNzUgMTkuODAwMyAzNC4xNDQgMTkuODAwMyAzNC42M1Y0My44N0MxOS44MDAzIDQ0LjM1NiAxOS40MDYzIDQ0Ljc1IDE4LjkyMDMgNDQuNzVIOS42ODAyOUM5LjE5NDI4IDQ0Ljc1IDguODAwMjkgNDQuMzU2IDguODAwMjkgNDMuODdWMzQuNjNaIiBmaWxsPSIjRkZDQTAwIi8+CjxwYXRoIGQ9Ik0yMi4wMDAyIDIzLjYzQzIyLjAwMDIgMjMuMTQ0IDIyLjM5NDIgMjIuNzUgMjIuODgwMiAyMi43NUgzMi4xMjAyQzMyLjYwNjMgMjIuNzUgMzMuMDAwMiAyMy4xNDQgMzMuMDAwMiAyMy42M1Y0My44N0MzMy4wMDAyIDQ0LjM1NiAzMi42MDYzIDQ0Ljc1IDMyLjEyMDIgNDQuNzVIMjIuODgwMkMyMi4zOTQyIDQ0Ljc1IDIyLjAwMDIgNDQuMzU2IDIyLjAwMDIgNDMuODdWMjMuNjNaIiBmaWxsPSIjMzdDRTkxIi8+CjxwYXRoIGQ9Ik0zNS4yMDAyIDEyLjYzQzM1LjIwMDIgMTIuMTQ0IDM1LjU5NDIgMTEuNzUgMzYuMDgwMiAxMS43NUg0NS4zMjAyQzQ1LjgwNjIgMTEuNzUgNDYuMjAwMiAxMi4xNDQgNDYuMjAwMiAxMi42M1Y0My44N0M0Ni4yMDAyIDQ0LjM1NiA0NS44MDYyIDQ0Ljc1IDQ1LjMyMDIgNDQuNzVIMzYuMDgwMkMzNS41OTQyIDQ0Ljc1IDM1LjIwMDIgNDQuMzU2IDM1LjIwMDIgNDMuODdWMTIuNjNaIiBmaWxsPSIjRkIzNzU3Ii8+CjxwYXRoIGQ9Ik04LjgwMDA1IDE3LjI1QzguODAwMDUgMTQuMjEyNCAxMS4yNjI1IDExLjc1IDE0LjMgMTEuNzVDMTcuMzM3NiAxMS43NSAxOS44IDE0LjIxMjQgMTkuOCAxNy4yNUMxOS44IDIwLjI4NzYgMTcuMzM3NiAyMi43NSAxNC4zIDIyLjc1QzExLjI2MjUgMjIuNzUgOC44MDAwNSAyMC4yODc2IDguODAwMDUgMTcuMjVaIiBmaWxsPSIjMDA3MkZGIi8+Cjwvc3ZnPgo=",self.location).href,On=({appName:e="Obeyaka",size:n="md",showText:t=!0,color:r="var(--mantine-color-dark-6)",radius:s})=>{const i=()=>{switch(n){case"xs":return{icon:20,text:"xs"};case"sm":return{icon:28,text:"md"};case"md":return{icon:36,text:"lg"};case"lg":return{icon:44,text:"xl"};default:return{icon:36,text:"lg"}}},c=()=>{switch(s){case"full":return"9999px";case"xs":return"var(--mantine-radius-xs)";case"sm":return"var(--mantine-radius-sm)";case"md":return"var(--mantine-radius-md)";case"lg":return"var(--mantine-radius-lg)";case"xl":return"var(--mantine-radius-xl)";default:return 0}},{icon:u,text:l}=i(),f=()=>{const d=u*56/55;return o.jsx("img",{src:Ht,alt:`${e} Logo`,width:u,height:d,style:{display:"block",flexShrink:0,borderRadius:c()}})};return o.jsxs(a.Group,{gap:"xs",align:"center",wrap:"nowrap",children:[f(),t&&o.jsx(a.Text,{size:l,fw:700,c:r==="white"?"white":r,style:{fontFamily:"Inter, -apple-system, BlinkMacSystemFont, sans-serif"},children:e})]})},Dn=({expandDirection:e="right",placeholder:n="Type to search",value:t="",onChange:r,onSearch:s,onClear:i,size:c="md",disabled:u=!1,className:l})=>{const[f,d]=p.useState(!1),[g,h]=p.useState(!1),[I,v]=p.useState(t),x=p.useRef(null),m=p.useRef(null);p.useEffect(()=>{v(t)},[t]),p.useEffect(()=>{f&&x.current&&x.current.focus()},[f]),p.useEffect(()=>{const k=R=>{m.current&&!m.current.contains(R.target)&&y()};if(f)return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[f]);const y=()=>{h(!0),setTimeout(()=>{d(!1),h(!1)},200)},w=()=>{u||d(!0)},S=k=>{const R=k.target.value;v(R),r==null||r(R)},_=k=>{k.key==="Enter"&&(s==null||s(I)),k.key==="Escape"&&y()},$=()=>{v(""),r==null||r(""),i==null||i(),y()},z=(()=>{switch(c){case"sm":return{iconSize:20,inputHeight:32,fontSize:"var(--mantine-font-size-sm)"};case"lg":return{iconSize:20,inputHeight:32,fontSize:"var(--mantine-font-size-md)"};default:return{iconSize:20,inputHeight:32,fontSize:"var(--mantine-font-size-sm)"}}})();return o.jsxs(a.Box,{ref:m,className:l,style:{position:"relative",display:"inline-flex",alignItems:"center"},children:[o.jsxs(a.Group,{gap:0,style:{position:"relative",transition:"all 0.2s ease",borderRadius:"var(--mantine-radius-md)"},children:[o.jsx(a.Box,{onClick:w,style:{display:"flex",alignItems:"center",justifyContent:"center",width:z.inputHeight,height:z.inputHeight,cursor:u?"not-allowed":"pointer",borderRadius:"var(--mantine-radius-md)",transition:"background-color 0.2s ease",opacity:u?.5:1},onMouseEnter:k=>{u||(k.currentTarget.style.backgroundColor="var(--mantine-color-gray-0)")},onMouseLeave:k=>{k.currentTarget.style.backgroundColor="transparent"},children:o.jsx(C.IconSearch,{size:z.iconSize,color:"var(--mantine-color-gray-6)",strokeWidth:2.3})}),f&&o.jsx(a.TextInput,{ref:x,value:I,onChange:S,onKeyDown:_,placeholder:n,disabled:u,height:z.inputHeight,fw:500,styles:{root:{position:"relative",animation:g?`shrink${e==="right"?"Right":"Left"} 0.2s ease forwards`:`expand${e==="right"?"Right":"Left"} 0.2s ease forwards`},input:{border:"none",outline:"none",backgroundColor:"transparent",padding:"0 8px",height:z.inputHeight,minHeight:z.inputHeight,fontSize:z.fontSize,color:"var(--mantine-color-gray-8)",borderRadius:"var(--mantine-radius-md)",transition:"background-color 0.2s ease",display:"flex",alignItems:"center","&:hover":{backgroundColor:"var(--mantine-color-gray-1)"},"&:focus":{backgroundColor:"var(--mantine-color-gray-1)"},"&::placeholder":{color:"var(--mantine-color-gray-5)"}}},rightSection:I&&o.jsx(a.Box,{onClick:$,style:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:"4px",borderRadius:"var(--mantine-radius-xl)",transition:"background-color 0.2s ease"},onMouseEnter:k=>{k.currentTarget.style.backgroundColor="var(--mantine-color-gray-2)"},onMouseLeave:k=>{k.currentTarget.style.backgroundColor="transparent"},children:o.jsx(C.IconX,{size:14,color:"var(--mantine-color-gray-6)",strokeWidth:2.3})}),rightSectionWidth:I?24:0})]}),o.jsx("style",{children:`
2
+ @keyframes expandRight {
3
+ from { width: 0; opacity: 0; }
4
+ to { width: 200px; opacity: 1; }
5
+ }
6
+ @keyframes expandLeft {
7
+ from { width: 0; opacity: 0; }
8
+ to { width: 200px; opacity: 1; }
9
+ }
10
+ @keyframes shrinkRight {
11
+ from { width: 200px; opacity: 1; }
12
+ to { width: 0; opacity: 0; }
13
+ }
14
+ @keyframes shrinkLeft {
15
+ from { width: 200px; opacity: 1; }
16
+ to { width: 0; opacity: 0; }
17
+ }
18
+ `})]})},Qe=({activeFilters:e,onFiltersChange:n,availableFilters:t,size:r="md",filterButtonDropdownPosition:s="bottom-end"})=>{const i=a.useCombobox({onDropdownClose:()=>i.resetSelectedOption(),onDropdownOpen:()=>i.updateSelectedOptionIndex("active")}),[c,u]=p.useState(!1),l=e.length>0,f=x=>{if(x==="remove-filters")n([]);else{const m=t==null?void 0:t.find(y=>y.value===x);if(m){const y={id:`${m.value}-${Date.now()}`,filterOption:m};n([...e,y])}}i.closeDropdown()},d=(t||[]).filter(x=>!e.some(m=>m.filterOption.value===x.value)),g={borderRadius:"var(--mantine-radius-md)",fontSize:"var(--mantine-font-size-sm)",color:"var(--mantine-color-gray-7)",fontWeight:"500"},I=(()=>{switch(r){case"sm":return{height:"32px",width:"32px",iconSize:20};case"md":return{height:"32px",width:"32px",iconSize:20};default:return{height:"32px",width:"32px",iconSize:20}}})(),v=o.jsx(a.Box,{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",backgroundColor:l||c?"var(--mantine-color-gray-0)":"transparent",color:"var(--mantine-color-gray-6)",borderRadius:"var(--mantine-radius-md)",cursor:"pointer",transition:"all 0.2s ease",...I},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),onClick:()=>i.toggleDropdown(),children:o.jsx(C.IconFilter,{size:20,stroke:2.3})});return o.jsxs(a.Combobox,{store:i,onOptionSubmit:f,withinPortal:!1,offset:4,position:s,children:[o.jsx(a.Combobox.Target,{children:l?o.jsx(a.Indicator,{offset:2,position:"top-end",color:"var(--mantine-color-yellow-7)",children:v}):v}),o.jsx(a.Combobox.Dropdown,{styles:{dropdown:{borderRadius:"var(--mantine-radius-md)",border:"1px solid var(--mantine-color-gray-2)",boxShadow:"var(--mantine-shadow-md)",padding:"4px",width:"auto",minWidth:"160px"}},children:o.jsxs(a.Combobox.Options,{children:[d.map(x=>o.jsx(a.Combobox.Option,{value:x.value,style:{...g},children:o.jsxs(a.Box,{style:{display:"flex",alignItems:"center",gap:"8px"},children:[x.icon,x.label]})},x.value)),l&&o.jsx(a.Combobox.Option,{value:"remove-filters",style:{borderRadius:"var(--mantine-radius-md)",fontSize:"var(--mantine-font-size-sm)",fontWeight:"500",color:"var(--mantine-color-red-6)"},children:o.jsxs(a.Box,{style:{display:"flex",alignItems:"center",gap:"8px"},children:[o.jsx(C.IconFilterOff,{size:16,stroke:2}),"Remove filters"]})})]})})]})},Ft=({filterTag:e,onUpdate:n,onRemove:t,options:r=[],filterTagDropdownPosition:s="bottom-start"})=>{var h;const i=a.useCombobox({onDropdownClose:()=>i.resetSelectedOption(),onDropdownOpen:()=>i.updateSelectedOptionIndex("active")}),c=!!e.selectedOption,u=c?`${e.filterOption.label}: ${(h=e.selectedOption)==null?void 0:h.label}`:e.filterOption.label,l=r&&r.length>0?r:[{value:"option-a",label:"TagFilterOptionA"},{value:"option-b",label:"TagFilterOptionB"},{value:"option-c",label:"TagFilterOptionC"}],f=I=>{if(I==="remove")t();else{const v=l.find(x=>x.value===I);v&&n({...e,selectedOption:v})}i.closeDropdown()},d={borderRadius:"var(--mantine-radius-md)",fontSize:"var(--mantine-font-size-sm)",color:"var(--mantine-color-gray-7)",fontWeight:"500"},g={display:"inline-flex",alignItems:"center",gap:"4px",backgroundColor:c?"var(--mantine-color-blue-0)":"var(--mantine-color-gray-0)",color:c?"var(--mantine-color-blue-7)":"var(--mantine-color-gray-6)",borderRadius:"var(--mantine-radius-xl)",cursor:"pointer",transition:"all 0.2s ease",height:"32px",fontSize:"var(--mantine-font-size-sm)",padding:"0 12px"};return o.jsxs(a.Combobox,{store:i,onOptionSubmit:f,withinPortal:!1,offset:4,position:s,middlewares:{flip:!1,shift:!0},children:[o.jsx(a.Combobox.Target,{children:o.jsxs(a.Box,{style:{...g},onClick:()=>i.toggleDropdown(),fw:500,pl:"sm",children:[o.jsxs(a.Box,{style:{display:"flex",alignItems:"center",gap:"4px"},children:[e.filterOption.icon,u]}),o.jsx(C.IconChevronDown,{size:16,strokeWidth:2,color:"var(--mantine-color-gray-5)"})]})}),o.jsx(a.Combobox.Dropdown,{styles:{dropdown:{borderRadius:"var(--mantine-radius-md)",border:"1px solid var(--mantine-color-gray-2)",boxShadow:"var(--mantine-shadow-md)",padding:"4px",minWidth:"150px"}},children:o.jsxs(a.Combobox.Options,{children:[l.map(I=>{var v;return o.jsx(a.Combobox.Option,{value:I.value,active:((v=e.selectedOption)==null?void 0:v.value)===I.value,style:{...d},children:I.label},I.value)}),o.jsx(a.Combobox.Option,{value:"remove",style:{borderRadius:"var(--mantine-radius-md)",fontSize:"var(--mantine-font-size-sm)",fontWeight:"500",color:"var(--mantine-color-red-6)"},children:"Or remove filter"})]})})]})},Ut=({activeFilters:e,onFiltersChange:n,availableFilters:t,addFilterButtonDropdownPosition:r="bottom-start"})=>{const s=a.useCombobox({onDropdownClose:()=>s.resetSelectedOption(),onDropdownOpen:()=>s.updateSelectedOptionIndex("active")}),[i,c]=p.useState(!1),u=h=>{const I=t==null?void 0:t.find(v=>v.value===h);if(I){const v={id:`${I.value}-${Date.now()}`,filterOption:I};n([...e,v])}s.closeDropdown()},l=(t||[]).filter(h=>!e.some(I=>I.filterOption.value===h.value)),f={display:"inline-flex",alignItems:"center",backgroundColor:i?"var(--mantine-color-gray-0)":"transparent",borderRadius:"var(--mantine-radius-xl)",cursor:"pointer",transition:"all 0.2s ease",border:"1px solid transparent",height:"32px",fontSize:"var(--mantine-font-size-sm)",padding:"0 12px"},d={dropdown:{borderRadius:"var(--mantine-radius-md)",border:"1px solid var(--mantine-color-gray-2)",boxShadow:"var(--mantine-shadow-md)",padding:"4px",width:"auto",minWidth:"120px"}},g={borderRadius:"var(--mantine-radius-md)",fontSize:"var(--mantine-font-size-sm)",color:"var(--mantine-color-gray-7)",fontWeight:"500"};return o.jsxs(a.Combobox,{store:s,onOptionSubmit:u,withinPortal:!1,offset:4,position:r,children:[o.jsx(a.Combobox.Target,{children:o.jsx(a.Box,{style:{...f},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:()=>s.toggleDropdown(),children:o.jsx(a.Box,{style:{fontWeight:"500",color:"var(--mantine-color-blue-6)"},children:"Add filter"})})}),o.jsx(a.Combobox.Dropdown,{styles:{...d},children:o.jsx(a.Combobox.Options,{children:l.map(h=>o.jsx(a.Combobox.Option,{value:h.value,style:{...g},children:o.jsxs(a.Box,{style:{display:"flex",alignItems:"center",gap:"8px"},children:[h.icon,h.label]})},h.value))})})]})},Ze=({activeFilters:e,onFiltersChange:n,availableFilters:t,size:r="sm",getFilterOptions:s,filterTagDropdownPosition:i="bottom-start"})=>{const c=f=>{const d=(e||[]).map(g=>g.id===f.id?f:g);n(d)},u=f=>{const d=(e||[]).filter(g=>g.id!==f);n(d)},l=(t||[]).filter(f=>!e.some(d=>d.filterOption.value===f.value));return!e||e.length===0?null:o.jsx("div",{style:{width:"100%"},children:o.jsxs(a.Group,{gap:"sm",align:"center",wrap:"wrap",children:[(e||[]).map(f=>{const d=s?s(f.filterOption.value)||[]:[];return o.jsx(Ft,{filterTag:f,onUpdate:c,onRemove:()=>u(f.id),size:r,options:d,filterTagDropdownPosition:i},f.id)}),l.length>0&&o.jsx(Ut,{activeFilters:e,onFiltersChange:n,availableFilters:l,size:r})]})})},Nt=({activeFilters:e,onFiltersChange:n,availableFilters:t,size:r="md",getFilterOptions:s,filterTagDropdownPosition:i="bottom-start"})=>o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[o.jsx(Qe,{activeFilters:e,onFiltersChange:n,availableFilters:t,size:r}),o.jsx(Ze,{activeFilters:e,onFiltersChange:n,availableFilters:t,size:"sm",getFilterOptions:s,filterTagDropdownPosition:i})]}),Wt=Object.assign(Nt,{Button:Qe,Filters:Ze}),Gt=({children:e,danger:n,active:t,...r})=>o.jsx(a.MenuItem,{...r,style:{borderRadius:"8px",color:t?"var(--mantine-color-blue-7)":n?"var(--mantine-color-red-9)":"var(--mantine-color-gray-9)",backgroundColor:t?"var(--mantine-color-blue-0)":"transparent",...r.style},children:e}),me=({trigger:e,menuItems:n,children:t,...r})=>{const s=p.useRef(null),[i,c]=p.useState(0);return p.useEffect(()=>{s.current&&c(s.current.offsetWidth)},[e]),o.jsxs(a.Menu,{...r,children:[o.jsx(a.Menu.Target,{children:o.jsx("div",{ref:s,onClick:u=>u.stopPropagation(),style:{cursor:"pointer",outline:"none",boxShadow:"none",display:"flex",alignItems:"center"},children:e})}),o.jsxs(a.Menu.Dropdown,{styles:{dropdown:{cursor:"pointer",borderRadius:"8px",minWidth:`${i}px`}},children:[t,n==null?void 0:n.map((u,l)=>o.jsx(Gt,{...u},l))]})]})},Tn=({label:e,icon:n,onClick:t,color:r="gray",disabled:s=!1,"aria-label":i,indicator:c,fullWidth:u,isActive:l=!1,...f})=>{const[d,g]=p.useState(!1),h=()=>{s||t==null||t()};return o.jsx(a.Box,{style:{cursor:s?"not-allowed":"pointer",borderRadius:"var(--mantine-radius-md)"},variant:"transparent",justify:"flex-start",display:"flex",color:r,radius:"md",w:u?"100%":"auto",px:6,h:40,onMouseEnter:()=>!s&&g(!0),onMouseLeave:()=>g(!1),onClick:h,bg:d||l?"gray.1":"transparent","aria-label":i||`${e} navigation button`,...f,children:o.jsxs(a.Group,{w:"100%",wrap:"nowrap",gap:8,justify:"left",align:"center",children:[n,o.jsx(a.Text,{ta:"left",size:"sm",fw:500,c:d?"gray.8":"gray.7",truncate:!0,style:{flex:1,opacity:s?.5:1},children:e}),c&&o.jsx(a.Box,{style:{cursor:"pointer",backgroundColor:"var(--mantine-color-red-7)",color:"var(--mantine-color-white)",borderRadius:"var(--mantine-radius-lg)",padding:"0px 4px",fontSize:"12px",fontWeight:600,height:"20px",minWidth:"20px",display:"flex",alignItems:"center",justifyContent:"center"},children:c})]})})},Vt=({label:e,rightLabel:n,children:t,onAddChild:r,onMenuAction:s,menuItems:i,color:c="gray",defaultText:u="No items",level:l=0,disabled:f=!1,noChild:d=!1,isActive:g=!1,showAvatar:h=!1,avatar:I,placeholder:v,onClick:x,"aria-label":m,...y})=>{const[w,S]=p.useState(!1),[_,$]=p.useState(!1),[D,z]=p.useState(!1),k=p.Children.count(t)>0,R=D?C.IconChevronDown:C.IconChevronRight,L=!d&&k&&(h?_:!0),T=p.useCallback(F=>{f||(console.log("NavLink clicked",{hasChildren:k,noChild:d,isExpanded:w}),k&&!d&&(console.log("Toggling expansion"),S(!w)),x==null||x())},[x,f,k,d,w]),B=p.useCallback(F=>{F.stopPropagation(),!f&&(r==null||r())},[r,f]),H=p.useCallback(()=>{f||(k&&!d&&S(!w),x==null||x())},[f,k,d,w,x]),ee=p.useCallback(()=>{f||r==null||r()},[r,f]),ne=p.useCallback(F=>{f||s==null||s(F)},[s,f,e]),U=p.useCallback(()=>k?p.Children.map(t,F=>p.isValidElement(F)?p.cloneElement(F,{...F.props,level:l+1}):F):null,[t,k,l]),ce=(i==null?void 0:i.map(F=>({children:o.jsxs(a.Group,{gap:"xs",wrap:"nowrap",children:[F.icon&&o.jsx(F.icon,{size:16}),o.jsx(a.Text,{size:"sm",children:F.label})]}),onClick:()=>ne(F.action)})))||[],fe=[{children:o.jsxs(a.Group,{gap:"xs",wrap:"nowrap",children:[o.jsx(C.IconPlus,{size:16}),o.jsx(a.Text,{size:"sm",children:"Add child"})]}),onClick:B}],he=ce.length>0?ce:fe;return o.jsxs(a.Stack,{gap:0,children:[o.jsx(a.Box,{style:{cursor:f?"not-allowed":"pointer",borderRadius:"8px"},variant:"transparent",justify:"space-between",display:"flex",color:c,size:"md",radius:"md",w:"100%",px:6,h:40,onMouseEnter:()=>!f&&$(!0),onMouseLeave:()=>$(!1),onClick:T,bg:g||_?"var(--mantine-color-gray-1)":"transparent","aria-expanded":w,"aria-label":m||`${e} navigation link`,...y,children:o.jsxs(a.Group,{w:"100%",wrap:"nowrap",gap:8,onClick:T,style:{paddingLeft:d&&!L?`${(l+1)*16}px`:l>0?`${l*16}px`:"0px"},children:[L?o.jsx(W,{icon:R,size:"md",color:c,onClick:H,disabled:f,onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),"aria-label":k?`${w?"Collapse":"Expand"} ${e}`:void 0}):h?o.jsx(ae,{size:"xs",avatar:I,showPlaceholder:!0,placeholder:v}):null,o.jsx(a.Text,{size:"sm",fw:500,c:g?"black":_?"gray.9":"gray.8",truncate:!0,w:"100%",style:{opacity:f?.5:1},children:e}),o.jsxs(a.Group,{gap:"xs",align:"center",children:[n&&o.jsx(a.Text,{size:"xs",c:"dimmed",children:n}),_&&!f&&o.jsxs(a.Group,{gap:4,wrap:"nowrap",children:[r&&o.jsx(W,{icon:C.IconPlus,onClick:ee,"aria-label":`Add child to ${e}`}),(i&&i.length>0||r)&&o.jsx("div",{onClick:F=>F.stopPropagation(),children:o.jsx(me,{menuItems:he,trigger:o.jsx(W,{icon:C.IconDots,"aria-label":`More options for ${e}`,size:"md"}),position:"bottom-end",shadow:"md"})})]})]})]})}),w&&!d&&o.jsx(a.Stack,{gap:0,style:{width:"100%"},children:k?U():o.jsx(a.Box,{style:{marginLeft:l>0?`${l*16}px`:"0px"},children:o.jsx(a.Text,{size:"sm",c:"dimmed",ta:"left",p:"sm",fw:500,children:u})})})]})},qt="200px",Qt="4px 8px",Zt=40,Yt="var(--mantine-radius-md)",Xt=16,Rn=({item:e,withAvatars:n,disabled:t=!1,onClick:r,selected:s=!1})=>{const[i,c]=p.useState(!1);return o.jsx(a.Box,{onMouseEnter:()=>!t&&c(!0),onMouseLeave:()=>!t&&c(!1),onClick:u=>{u.preventDefault(),u.stopPropagation(),t||r==null||r(e.value)},onMouseDown:u=>{u.stopPropagation()},style:{minWidth:qt,backgroundColor:t?"transparent":i?"var(--mantine-color-gray-1)":"transparent",cursor:t?"default":"pointer",borderRadius:Yt,padding:Qt,transition:"background-color 0.2s ease",opacity:t?.5:1},children:o.jsxs(a.Group,{gap:"sm",wrap:"nowrap",align:"flex-start",style:{alignItems:"center"},h:Zt,children:[n&&e.avatar&&o.jsx("img",{src:e.avatar,alt:e.label,style:{width:"24px",height:"24px",borderRadius:"var(--mantine-radius-sm)",objectFit:"cover"}}),o.jsxs(a.Stack,{gap:0,style:{flex:1},children:[o.jsx(a.Text,{size:"sm",fw:500,lh:-1,c:t?"var(--mantine-color-gray-5)":"var(--mantine-color-gray-9)",children:e.label}),o.jsx(a.Text,{size:"xs",c:t?"var(--mantine-color-gray-4)":"dimmed",children:e.description})]}),s&&o.jsx(C.IconCheck,{size:Xt,color:"var(--mantine-color-gray-9)"})]})})},Kt="bottom-end",Jt=1e4,eo="24px",no="0 8px",to="6px",Je="var(--mantine-radius-md)",oo="46px",Te=({value:e,onChange:n,data:t,withRemove:r=!1,withAvatars:s=!1,onRemove:i,disabledOptions:c=[],disabled:u=!1,defaultOption:l,popoverStyles:f,dropdownStyles:d,triggerStyles:g,textStyles:h})=>{const[I,v]=p.useState(!1),x=(t||[]).find(k=>k.value===e)||l,[m,y]=p.useState(!1),[w,S]=p.useState(!1),[_,$]=p.useState(!1),D=r?o.jsx(a.Group,{p:"sm",onClick:k=>{k.stopPropagation(),i==null||i(e)},style:{cursor:"pointer",height:oo,display:"flex",alignItems:"center",borderRadius:Je,backgroundColor:w?"var(--mantine-color-red-0)":"transparent",transition:"background-color 0.2s ease"},onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),children:o.jsx(a.Text,{size:"sm",c:"var(--mantine-color-red-6)",fw:500,children:"Remove user"})}):null,z=o.jsxs(a.Box,{onMouseEnter:()=>!u&&y(!0),onMouseLeave:()=>!u&&y(!1),onClick:()=>{u||(v(!0),$(!0))},style:{height:eo,cursor:u?"not-allowed":"pointer",display:"inline-flex",alignItems:"center",borderRadius:Je,backgroundColor:u?"transparent":m||_?"var(--mantine-color-gray-1)":"transparent",transition:"background-color 0.2s ease",padding:no,gap:to,width:"auto",opacity:u?.6:1,...g},children:[o.jsx(a.Text,{size:"sm",fw:h!=null&&h.fontWeight?void 0:500,c:u?"var(--mantine-color-gray-4)":"var(--mantine-color-gray-6)",style:{color:u?"var(--mantine-color-gray-4)":"var(--mantine-color-gray-6)",lineHeight:"24px",whiteSpace:"nowrap",...h},children:(x==null?void 0:x.label)||"Select option"}),o.jsx(C.IconChevronDown,{size:16,style:{color:u?"var(--mantine-color-gray-3)":"var(--mantine-color-gray-6)"}})]});return o.jsxs(a.Popover,{opened:I,onChange:k=>{v(k),k||$(!1)},position:Kt,shadow:"md",withinPortal:!0,zIndex:Jt,styles:f,children:[o.jsx(a.Popover.Target,{children:z}),o.jsx(a.Popover.Dropdown,{onClick:k=>k.stopPropagation(),onMouseDown:k=>k.stopPropagation(),styles:{dropdown:{borderRadius:"var(--mantine-radius-md)",padding:"4px",...d}},children:o.jsxs(a.Stack,{gap:0,onClick:k=>k.stopPropagation(),onMouseDown:k=>k.stopPropagation(),children:[(t||[]).map(k=>{const R=c.includes(k.value),L=k.value===e;return o.jsx(Rn,{item:k,withAvatars:s,disabled:R,selected:L,onClick:T=>{n==null||n(T),v(!1),$(!1)}},k.value)}),D]})})]})},ro=(e,n,t,r)=>{const s=p.useRef(null),i=p.useRef(null),c=p.useCallback(l=>{l[0].isIntersecting&&t&&!r&&n&&n()},[t,r,n]),u=p.useCallback(()=>{if(!(!s.current||!e||!n)){i.current&&(i.current.disconnect(),i.current=null);try{const l=new IntersectionObserver(c,{threshold:.1,rootMargin:"50px"});l.observe(s.current),i.current=l}catch(l){console.error("Failed to setup intersection observer:",l)}}},[e,n,c]);return p.useEffect(()=>(u(),()=>{i.current&&(i.current.disconnect(),i.current=null)}),[u]),p.useEffect(()=>()=>{i.current&&(i.current.disconnect(),i.current=null)},[]),{loadMoreRef:s}},En=({tableName:e,data:n,columns:t,onAddItem:r,addItemComponent:s,addItemLabel:i="Add item",loading:c=!1,emptyMessage:u="No data found",searchPlaceholder:l="Search...",enableAutoFilters:f=!0,customFilters:d=[],onCustomFilter:g,onSort:h,sortColumn:I,sortDirection:v,onSearch:x,onRowClick:m,size:y="md",striped:w=!1,highlightOnHover:S=!0,enableInfiniteScroll:_=!1,isLoadingMore:$=!1,hasMore:D=!1,onLoadMore:z})=>{const[k,R]=p.useState(""),[L,T]=p.useState([]),{loadMoreRef:B}=ro(_,z||(()=>{}),D,$),H=p.useMemo(()=>[...f?t.filter(O=>O.type==="select"&&O.options).map(O=>({value:O.key,label:O.label})):[],...d],[t,f,d]),ee=p.useMemo(()=>{let j=n||[];if(k){const O=k.toLowerCase();j=j.filter(P=>t.some(A=>{if(!A.searchable)return!1;const Q=P[A.key];return Q==null?!1:String(Q).toLowerCase().includes(O)}))}return L.forEach(O=>{if(O.filterTag.selectedOption){const P=t.find(A=>A.key===O.filterTag.filterOption.value);P&&(j=j.filter(A=>{var re;const Q=A[P.key];return String(Q)===((re=O.filterTag.selectedOption)==null?void 0:re.value)}))}}),j},[n,k,L,t]),ne=j=>{R(j),x==null||x(j)},U=j=>{const O=t.find(A=>A.key===j);if(!(O!=null&&O.sortable))return;const P=I===j&&v==="asc"?"desc":"asc";h==null||h(j,P)},ce=j=>{const O=t.find(P=>P.key===j);return(O==null?void 0:O.type)==="select"&&O.options?O.options.map(P=>({value:P.value,label:P.label})):(O==null?void 0:O.type)==="badge"?[...new Set(n.map(A=>A[O.key]).filter(Boolean))].map(A=>({value:String(A),label:String(A).charAt(0).toUpperCase()+String(A).slice(1)})):O?[...new Set(n.map(A=>A[O.key]).filter(Boolean))].map(A=>({value:String(A),label:String(A).charAt(0).toUpperCase()+String(A).slice(1)})):[]},fe=(j,O)=>{var A,Q,re,xe,ve;const P=O[j.key];switch(j.type){case"text":return o.jsx(a.Text,{size:"sm",c:P?void 0:"dimmed",children:P||"—"});case"date":if(!P)return o.jsx(a.Text,{size:"sm",c:"dimmed",children:"—"});const q=new Date(P),bt=j.format?q.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}):q.toLocaleDateString();return o.jsx(a.Text,{size:"sm",c:"dimmed",children:bt});case"select":return j.options?o.jsx(Te,{value:P,data:j.options,placeholder:j.label,onChange:Y=>{var be;return(be=j.onSelectChange)==null?void 0:be.call(j,Y,O)},disabled:(A=j.disabled)==null?void 0:A.call(j,O)}):o.jsx(a.Text,{size:"sm",c:"dimmed",children:"—"});case"badge":const yt=((Q=j.badgeColors)==null?void 0:Q[P])||"gray";return o.jsx(a.Badge,{color:yt,variant:"light",size:"sm",radius:"md",fw:600,children:P||"Unknown"});case"avatar":const wt=((re=j.fallbackText)==null?void 0:re.call(j,O))||String(P).charAt(0).toUpperCase();return o.jsx(ae,{avatar:P,size:"xs",placeholder:wt,showPlaceholder:!0});case"custom":return((xe=j.render)==null?void 0:xe.call(j,P,O))||o.jsx(a.Text,{size:"sm",c:"dimmed",children:"—"});case"actions":return(ve=j.actions)!=null&&ve.length?o.jsxs(a.Menu,{shadow:"md",width:200,position:"bottom-end",styles:{dropdown:{borderRadius:"var(--mantine-radius-md)"}},children:[o.jsx(a.Menu.Target,{children:o.jsx(a.ActionIcon,{variant:"subtle",size:"md",color:"gray",radius:"md",children:o.jsx(C.IconDots,{size:16})})}),o.jsx(a.Menu.Dropdown,{children:j.actions.map((Y,be)=>{var Xe;return o.jsx(a.Menu.Item,{color:Y.color,leftSection:Y.icon,disabled:(Xe=Y.disabled)==null?void 0:Xe.call(Y,O),onClick:()=>Y.onClick(O),styles:{item:{borderRadius:"var(--mantine-radius-md)"}},children:Y.label},be)})})]}):null;default:return o.jsx(a.Text,{size:"sm",c:"dimmed",children:"—"})}},he=j=>{var O;return(O=t.find(P=>P.key===j))!=null&&O.sortable?I===j?v==="asc"?o.jsx(C.IconChevronUp,{size:14}):o.jsx(C.IconChevronDown,{size:14}):o.jsx(C.IconChevronUp,{size:14,style:{opacity:.3}}):null},le=(()=>{switch(y){case"sm":return{buttonSize:"xs",textSize:"sm"};case"lg":return{buttonSize:"md",textSize:"md"};default:return{buttonSize:"sm",textSize:"sm"}}})();return o.jsxs(a.Box,{pos:"relative",children:[o.jsx(a.LoadingOverlay,{visible:c}),o.jsxs(a.Stack,{gap:"sm",w:"100%",children:[o.jsxs(a.Group,{gap:"sm",wrap:"nowrap",justify:"space-between",children:[o.jsx(a.Text,{fw:600,c:"var(--mantine-color-gray-8)",children:e}),o.jsxs(a.Group,{gap:"xs",wrap:"nowrap",children:[o.jsxs(a.Group,{gap:4,wrap:"nowrap",children:[o.jsx(Dn,{placeholder:l,value:k,onChange:ne,onSearch:ne,expandDirection:"right",size:le.buttonSize}),H.length>0&&o.jsx(Qe,{activeFilters:L.map(j=>j.filterTag),onFiltersChange:j=>{T(j.map(O=>({filterTag:O,onUpdate:()=>{},onRemove:()=>{}}))),g==null||g(j)},availableFilters:H,size:le.buttonSize})]}),r&&o.jsx(a.Button,{size:"compact-md",h:32,style:{fontSize:`var(--mantine-font-size-${le.textSize})`,border:"none"},radius:"md",onClick:r,children:i})]})]}),H.length>0&&o.jsx(Ze,{activeFilters:L.map(j=>j.filterTag),onFiltersChange:j=>{T(j.map(O=>({filterTag:O,onUpdate:()=>{},onRemove:()=>{}}))),g==null||g(j)},availableFilters:H,size:"md",getFilterOptions:ce})]}),s,o.jsxs(a.Table,{striped:w,highlightOnHover:S,highlightOnHoverColor:"var(--mantine-color-gray-0)",mt:"xs",children:[o.jsx(a.Table.Thead,{children:o.jsx(a.Table.Tr,{children:t.map(j=>o.jsx(a.Table.Th,{c:"var(--mantine-color-gray-6)",style:{width:j.width,textAlign:j.align||"left",cursor:j.sortable?"pointer":"default"},onClick:()=>j.sortable&&U(j.key),children:o.jsxs(a.Group,{gap:"xs",wrap:"nowrap",children:[j.icon&&o.jsx(a.Box,{style:{display:"flex",alignItems:"center"},children:j.icon}),o.jsx(a.Text,{size:le.textSize,fw:500,children:j.label}),he(j.key)]})},String(j.key)))})}),o.jsx(a.Table.Tbody,{children:ee.length===0?o.jsx(a.Table.Tr,{children:o.jsx(a.Table.Td,{colSpan:t.length,ta:"center",py:"xl",children:o.jsx(a.Text,{c:"dimmed",children:u})})}):ee.map((j,O)=>o.jsx(a.Table.Tr,{style:{cursor:m?"pointer":"default"},onClick:()=>m==null?void 0:m(j),children:t.map(P=>o.jsx(a.Table.Td,{style:{textAlign:P.align||"left"},children:fe(P,j)},String(P.key)))},j.id||O))})]}),_&&o.jsx(a.Box,{ref:B,style:{padding:"16px",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60px"},children:$&&o.jsxs(a.Group,{display:"flex",ta:"center",gap:"xs",children:[o.jsx(a.Loader,{size:"sm",color:"gray.5"}),o.jsx(a.Text,{size:"sm",c:"dimmed",fw:500,children:"Loading more..."})]})})]})};Object.assign(En,{});const io=({onAvatarSelect:e,onEmojiSelect:n,onImageSelect:t,onIconSelect:r}={})=>{const[s,i]=p.useState("emoji"),[c,u]=p.useState(null),[l,f]=p.useState(null),[d,g]=p.useState(null),[h,I]=p.useState(null),[v,x]=p.useState(null),m=p.useCallback(k=>{i(k)},[]),y=p.useCallback(k=>{u(k)},[]),w=p.useCallback(k=>{x(k);const R=new FileReader;R.onload=L=>{var B;const T=(B=L.target)==null?void 0:B.result;f(T)},R.readAsDataURL(k)},[]),S=p.useCallback(k=>{g(k),f(null),x(null),I(null),e==null||e({type:"emoji",value:k}),n==null||n(k)},[e,n]),_=p.useCallback(k=>{I(k),f(null),x(null),g(null),e==null||e({type:"icon",value:k}),r==null||r(k)},[e,r]),$=p.useCallback(()=>{if(v&&l){const k=URL.createObjectURL(v);e==null||e({type:"image",value:k}),t==null||t(v)}},[v,l,e,t]),D=p.useCallback(()=>{f(null),x(null),g(null),I(null)},[]),z=p.useCallback(()=>{f(null),g(null),I(null),x(null),i("emoji"),u(null)},[]);return{selectedTab:s,tabHovered:c,previewImage:l,selectedEmoji:d,selectedIcon:h,selectedFile:v,handleTabChange:m,handleTabHover:y,handleImagePreview:w,handleImageAccept:$,handleEmojiSelect:S,handleIconSelect:_,clearImagePreview:D,resetState:z}},so=({opened:e,onClose:n,popoverRef:t})=>{const r=p.useCallback(i=>{e&&t.current&&!t.current.contains(i.target)&&(console.log("Click outside detected, closing popover"),n())},[e,n,t]),s=p.useCallback(i=>{i.key==="Escape"&&e&&(console.log("Escape key pressed, closing popover"),n())},[e,n]);return p.useEffect(()=>{if(e)return document.addEventListener("mousedown",r),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",s)}},[e,r,s]),{handleClickOutside:r,handleEscape:s}},ao=({selectedTab:e,tabHovered:n,onTabChange:t,onTabHover:r,onRemove:s,hasAvatar:i=!1,children:c})=>{const[u,l]=p.useState(!1);return o.jsxs(a.Tabs,{color:"black",value:e,styles:{tab:{backgroundColor:"transparent"}},children:[o.jsxs(a.Tabs.List,{px:"var(--mantine-spacing-sm)",pt:"xs",w:"100%",children:[o.jsx(a.Tabs.Tab,{value:"emoji",p:0,pb:"xs",onClick:()=>t("emoji"),onMouseEnter:()=>r("emoji"),onMouseLeave:()=>r(null),style:{backgroundColor:"transparent"},children:o.jsx(a.Box,{style:{borderRadius:"var(--mantine-radius-md)",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 8px",border:"none",backgroundColor:n==="emoji"?"var(--mantine-color-gray-1)":"transparent",color:e==="emoji"?"var(--mantine-color-gray-9)":"var(--mantine-color-gray-6)",cursor:"pointer"},fw:500,fz:"var(--mantine-font-size-sm)",children:o.jsx(a.Group,{gap:4,children:"Emoji"})})}),o.jsx(a.Tabs.Tab,{value:"icons",p:0,pb:"xs",onClick:()=>t("icons"),onMouseEnter:()=>r("icons"),onMouseLeave:()=>r(null),style:{backgroundColor:"transparent"},children:o.jsx(a.Box,{style:{height:"24px",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 8px",borderRadius:"var(--mantine-radius-md)",border:"none",backgroundColor:n==="icons"?"var(--mantine-color-gray-1)":"transparent",color:e==="icons"?"var(--mantine-color-gray-9)":"var(--mantine-color-gray-6)",cursor:"pointer"},fw:500,fz:"var(--mantine-font-size-sm)",children:o.jsx(a.Group,{gap:4,children:"Icons"})})}),o.jsx(a.Tabs.Tab,{value:"image",p:0,pb:"xs",onClick:()=>t("image"),onMouseEnter:()=>r("image"),onMouseLeave:()=>r(null),style:{backgroundColor:"transparent"},children:o.jsx(a.Box,{style:{height:"24px",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 8px",borderRadius:"var(--mantine-radius-md)",border:"none",backgroundColor:n==="image"?"var(--mantine-color-gray-1)":"transparent",color:e==="image"?"var(--mantine-color-gray-9)":"var(--mantine-color-gray-6)",cursor:"pointer"},fw:500,fz:"var(--mantine-font-size-sm)",children:o.jsx(a.Group,{gap:4,children:"Image"})})}),s&&i&&o.jsx(a.Group,{justify:"flex-end",display:"flex",flex:1,pb:"xs",children:o.jsx(a.Box,{style:{height:"24px",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 8px",borderRadius:"var(--mantine-radius-md)",border:"none",backgroundColor:u?"var(--mantine-color-red-0)":"transparent",color:u?"var(--mantine-color-red-6)":"var(--mantine-color-gray-6)",cursor:"pointer",transition:"all 0.1s ease"},fw:500,fz:"var(--mantine-font-size-sm)",onClick:s,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:"Remove"})})]}),o.jsx(a.Tabs.Panel,{value:"emoji",children:e==="emoji"?c:null}),o.jsx(a.Tabs.Panel,{value:"icons",children:e==="icons"?c:null}),o.jsx(a.Tabs.Panel,{value:"image",children:e==="image"?c:null})]})};function Bn(e){return e&&e.__esModule?e.default:e}function V(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Re,M,Pn,ge,Ln,en,Se={},An=[],co=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function te(e,n){for(var t in n)e[t]=n[t];return e}function Hn(e){var n=e.parentNode;n&&n.removeChild(e)}function Fe(e,n,t){var r,s,i,c={};for(i in n)i=="key"?r=n[i]:i=="ref"?s=n[i]:c[i]=n[i];if(arguments.length>2&&(c.children=arguments.length>3?Re.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)c[i]===void 0&&(c[i]=e.defaultProps[i]);return ke(e,c,r,s,null)}function ke(e,n,t,r,s){var i={type:e,props:n,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:s??++Pn};return s==null&&M.vnode!=null&&M.vnode(i),i}function X(){return{current:null}}function de(e){return e.children}function Z(e,n){this.props=e,this.context=n}function ue(e,n){if(n==null)return e.__?ue(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if((t=e.__k[n])!=null&&t.__e!=null)return t.__e;return typeof e.type=="function"?ue(e):null}function Fn(e){var n,t;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if((t=e.__k[n])!=null&&t.__e!=null){e.__e=e.__c.base=t.__e;break}return Fn(e)}}function nn(e){(!e.__d&&(e.__d=!0)&&ge.push(e)&&!Me.__r++||en!==M.debounceRendering)&&((en=M.debounceRendering)||Ln)(Me)}function Me(){for(var e;Me.__r=ge.length;)e=ge.sort(function(n,t){return n.__v.__b-t.__v.__b}),ge=[],e.some(function(n){var t,r,s,i,c,u;n.__d&&(c=(i=(t=n).__v).__e,(u=t.__P)&&(r=[],(s=te({},i)).__v=i.__v+1,Ye(u,i,s,t.__n,u.ownerSVGElement!==void 0,i.__h!=null?[c]:null,r,c??ue(i),i.__h),Gn(r,i),i.__e!=c&&Fn(i)))})}function Un(e,n,t,r,s,i,c,u,l,f){var d,g,h,I,v,x,m,y=r&&r.__k||An,w=y.length;for(t.__k=[],d=0;d<n.length;d++)if((I=t.__k[d]=(I=n[d])==null||typeof I=="boolean"?null:typeof I=="string"||typeof I=="number"||typeof I=="bigint"?ke(null,I,null,null,I):Array.isArray(I)?ke(de,{children:I},null,null,null):I.__b>0?ke(I.type,I.props,I.key,null,I.__v):I)!=null){if(I.__=t,I.__b=t.__b+1,(h=y[d])===null||h&&I.key==h.key&&I.type===h.type)y[d]=void 0;else for(g=0;g<w;g++){if((h=y[g])&&I.key==h.key&&I.type===h.type){y[g]=void 0;break}h=null}Ye(e,I,h=h||Se,s,i,c,u,l,f),v=I.__e,(g=I.ref)&&h.ref!=g&&(m||(m=[]),h.ref&&m.push(h.ref,null,I),m.push(g,I.__c||v,I)),v!=null?(x==null&&(x=v),typeof I.type=="function"&&I.__k===h.__k?I.__d=l=Nn(I,l,e):l=Wn(e,I,h,y,v,l),typeof t.type=="function"&&(t.__d=l)):l&&h.__e==l&&l.parentNode!=e&&(l=ue(h))}for(t.__e=x,d=w;d--;)y[d]!=null&&(typeof t.type=="function"&&y[d].__e!=null&&y[d].__e==t.__d&&(t.__d=ue(r,d+1)),qn(y[d],y[d]));if(m)for(d=0;d<m.length;d++)Vn(m[d],m[++d],m[++d])}function Nn(e,n,t){for(var r,s=e.__k,i=0;s&&i<s.length;i++)(r=s[i])&&(r.__=e,n=typeof r.type=="function"?Nn(r,n,t):Wn(t,r,r,s,r.__e,n));return n}function $e(e,n){return n=n||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(t){$e(t,n)}):n.push(e)),n}function Wn(e,n,t,r,s,i){var c,u,l;if(n.__d!==void 0)c=n.__d,n.__d=void 0;else if(t==null||s!=i||s.parentNode==null)e:if(i==null||i.parentNode!==e)e.appendChild(s),c=null;else{for(u=i,l=0;(u=u.nextSibling)&&l<r.length;l+=2)if(u==s)break e;e.insertBefore(s,i),c=i}return c!==void 0?c:s.nextSibling}function lo(e,n,t,r,s){var i;for(i in t)i==="children"||i==="key"||i in n||ze(e,i,null,t[i],r);for(i in n)s&&typeof n[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||t[i]===n[i]||ze(e,i,n[i],t[i],r)}function tn(e,n,t){n[0]==="-"?e.setProperty(n,t):e[n]=t==null?"":typeof t!="number"||co.test(n)?t:t+"px"}function ze(e,n,t,r,s){var i;e:if(n==="style")if(typeof t=="string")e.style.cssText=t;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(n in r)t&&n in t||tn(e.style,n,"");if(t)for(n in t)r&&t[n]===r[n]||tn(e.style,n,t[n])}else if(n[0]==="o"&&n[1]==="n")i=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?r||e.addEventListener(n,i?rn:on,i):e.removeEventListener(n,i?rn:on,i);else if(n!=="dangerouslySetInnerHTML"){if(s)n=n.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(n!=="href"&&n!=="list"&&n!=="form"&&n!=="tabIndex"&&n!=="download"&&n in e)try{e[n]=t??"";break e}catch{}typeof t=="function"||(t!=null&&(t!==!1||n[0]==="a"&&n[1]==="r")?e.setAttribute(n,t):e.removeAttribute(n))}}function on(e){this.l[e.type+!1](M.event?M.event(e):e)}function rn(e){this.l[e.type+!0](M.event?M.event(e):e)}function Ye(e,n,t,r,s,i,c,u,l){var f,d,g,h,I,v,x,m,y,w,S,_=n.type;if(n.constructor!==void 0)return null;t.__h!=null&&(l=t.__h,u=n.__e=t.__e,n.__h=null,i=[u]),(f=M.__b)&&f(n);try{e:if(typeof _=="function"){if(m=n.props,y=(f=_.contextType)&&r[f.__c],w=f?y?y.props.value:f.__:r,t.__c?x=(d=n.__c=t.__c).__=d.__E:("prototype"in _&&_.prototype.render?n.__c=d=new _(m,w):(n.__c=d=new Z(m,w),d.constructor=_,d.render=fo),y&&y.sub(d),d.props=m,d.state||(d.state={}),d.context=w,d.__n=r,g=d.__d=!0,d.__h=[]),d.__s==null&&(d.__s=d.state),_.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=te({},d.__s)),te(d.__s,_.getDerivedStateFromProps(m,d.__s))),h=d.props,I=d.state,g)_.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(_.getDerivedStateFromProps==null&&m!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(m,w),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(m,d.__s,w)===!1||n.__v===t.__v){d.props=m,d.state=d.__s,n.__v!==t.__v&&(d.__d=!1),d.__v=n,n.__e=t.__e,n.__k=t.__k,n.__k.forEach(function($){$&&($.__=n)}),d.__h.length&&c.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(m,d.__s,w),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,I,v)})}d.context=w,d.props=m,d.state=d.__s,(f=M.__r)&&f(n),d.__d=!1,d.__v=n,d.__P=e,f=d.render(d.props,d.state,d.context),d.state=d.__s,d.getChildContext!=null&&(r=te(te({},r),d.getChildContext())),g||d.getSnapshotBeforeUpdate==null||(v=d.getSnapshotBeforeUpdate(h,I)),S=f!=null&&f.type===de&&f.key==null?f.props.children:f,Un(e,Array.isArray(S)?S:[S],n,t,r,s,i,c,u,l),d.base=n.__e,n.__h=null,d.__h.length&&c.push(d),x&&(d.__E=d.__=null),d.__e=!1}else i==null&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=uo(t.__e,n,t,r,s,i,c,l);(f=M.diffed)&&f(n)}catch($){n.__v=null,(l||i!=null)&&(n.__e=u,n.__h=!!l,i[i.indexOf(u)]=null),M.__e($,n,t)}}function Gn(e,n){M.__c&&M.__c(n,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(r){r.call(t)})}catch(r){M.__e(r,t.__v)}})}function uo(e,n,t,r,s,i,c,u){var l,f,d,g=t.props,h=n.props,I=n.type,v=0;if(I==="svg"&&(s=!0),i!=null){for(;v<i.length;v++)if((l=i[v])&&"setAttribute"in l==!!I&&(I?l.localName===I:l.nodeType===3)){e=l,i[v]=null;break}}if(e==null){if(I===null)return document.createTextNode(h);e=s?document.createElementNS("http://www.w3.org/2000/svg",I):document.createElement(I,h.is&&h),i=null,u=!1}if(I===null)g===h||u&&e.data===h||(e.data=h);else{if(i=i&&Re.call(e.childNodes),f=(g=t.props||Se).dangerouslySetInnerHTML,d=h.dangerouslySetInnerHTML,!u){if(i!=null)for(g={},v=0;v<e.attributes.length;v++)g[e.attributes[v].name]=e.attributes[v].value;(d||f)&&(d&&(f&&d.__html==f.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(lo(e,h,g,s,u),d)n.__k=[];else if(v=n.props.children,Un(e,Array.isArray(v)?v:[v],n,t,r,s&&I!=="foreignObject",i,c,i?i[0]:t.__k&&ue(t,0),u),i!=null)for(v=i.length;v--;)i[v]!=null&&Hn(i[v]);u||("value"in h&&(v=h.value)!==void 0&&(v!==g.value||v!==e.value||I==="progress"&&!v)&&ze(e,"value",v,g.value,!1),"checked"in h&&(v=h.checked)!==void 0&&v!==e.checked&&ze(e,"checked",v,g.checked,!1))}return e}function Vn(e,n,t){try{typeof e=="function"?e(n):e.current=n}catch(r){M.__e(r,t)}}function qn(e,n,t){var r,s;if(M.unmount&&M.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Vn(r,null,n)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){M.__e(i,n)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&qn(r[s],n,typeof e.type!="function");t||e.__e==null||Hn(e.__e),e.__e=e.__d=void 0}function fo(e,n,t){return this.constructor(e,t)}function Qn(e,n,t){var r,s,i;M.__&&M.__(e,n),s=(r=typeof t=="function")?null:t&&t.__k||n.__k,i=[],Ye(n,e=(!r&&t||n).__k=Fe(de,null,[e]),s||Se,Se,n.ownerSVGElement!==void 0,!r&&t?[t]:s?null:n.firstChild?Re.call(n.childNodes):null,i,!r&&t?t:s?s.__e:n.firstChild,r),Gn(i,e)}Re=An.slice,M={__e:function(e,n){for(var t,r,s;n=n.__;)if((t=n.__c)&&!t.__)try{if((r=t.constructor)&&r.getDerivedStateFromError!=null&&(t.setState(r.getDerivedStateFromError(e)),s=t.__d),t.componentDidCatch!=null&&(t.componentDidCatch(e),s=t.__d),s)return t.__E=t}catch(i){e=i}throw e}},Pn=0,Z.prototype.setState=function(e,n){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=te({},this.state),typeof e=="function"&&(e=e(te({},t),this.props)),e&&te(t,e),e!=null&&this.__v&&(n&&this.__h.push(n),nn(this))},Z.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),nn(this))},Z.prototype.render=de,ge=[],Ln=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Me.__r=0;var ho=0;function b(e,n,t,r,s){var i,c,u={};for(c in n)c=="ref"?i=n[c]:u[c]=n[c];var l={type:e,props:u,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--ho,__source:r,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(c in i)u[c]===void 0&&(u[c]=i[c]);return M.vnode&&M.vnode(l),l}function po(e,n){try{window.localStorage[`emoji-mart.${e}`]=JSON.stringify(n)}catch{}}function go(e){try{const n=window.localStorage[`emoji-mart.${e}`];if(n)return JSON.parse(n)}catch{}}var oe={set:po,get:go};const Be=new Map,mo=[{v:15,emoji:"🫨"},{v:14,emoji:"🫠"},{v:13.1,emoji:"😶‍🌫️"},{v:13,emoji:"🥸"},{v:12.1,emoji:"🧑‍🦰"},{v:12,emoji:"🥱"},{v:11,emoji:"🥰"},{v:5,emoji:"🤩"},{v:4,emoji:"👱‍♀️"},{v:3,emoji:"🤣"},{v:2,emoji:"👋🏻"},{v:1,emoji:"🙃"}];function Io(){for(const{v:e,emoji:n}of mo)if(Zn(n))return e}function xo(){return!Zn("🇨🇦")}function Zn(e){if(Be.has(e))return Be.get(e);const n=vo(e);return Be.set(e,n),n}const vo=(()=>{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!e)return()=>!1;const n=25,t=20,r=Math.floor(n/2);return e.font=r+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=t*2,e.canvas.height=n,s=>{e.clearRect(0,0,t*2,n),e.fillStyle="#FF0000",e.fillText(s,0,22),e.fillStyle="#0000FF",e.fillText(s,t,22);const i=e.getImageData(0,0,t,n).data,c=i.length;let u=0;for(;u<c&&!i[u+3];u+=4);if(u>=c)return!1;const l=t+u/4%t,f=Math.floor(u/4/t),d=e.getImageData(l,f,1,1).data;return!(i[u]!==d[0]||i[u+2]!==d[2]||e.measureText(s).width>=t)}})();var sn={latestVersion:Io,noCountryFlags:xo};const Ue=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let N=null;function bo(e){N||(N=oe.get("frequently")||{});const n=e.id||e;n&&(N[n]||(N[n]=0),N[n]+=1,oe.set("last",n),oe.set("frequently",N))}function yo({maxFrequentRows:e,perLine:n}){if(!e)return[];N||(N=oe.get("frequently"));let t=[];if(!N){N={};for(let i in Ue.slice(0,n)){const c=Ue[i];N[c]=n-i,t.push(c)}return t}const r=e*n,s=oe.get("last");for(let i in N)t.push(i);if(t.sort((i,c)=>{const u=N[c],l=N[i];return u==l?i.localeCompare(c):u-l}),t.length>r){const i=t.slice(r);t=t.slice(0,r);for(let c of i)c!=s&&delete N[c];s&&t.indexOf(s)==-1&&(delete N[t[t.length-1]],t.splice(-1,1,s)),oe.set("frequently",N)}return t}var Yn={add:bo,get:yo,DEFAULTS:Ue},Xn={};Xn=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var K={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:15,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14,15]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","ko","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let G=null,E=null;const Pe={};async function an(e){if(Pe[e])return Pe[e];const t=await(await fetch(e)).json();return Pe[e]=t,t}let Le=null,Kn=null,Jn=!1;function Ie(e,{caller:n}={}){return Le||(Le=new Promise(t=>{Kn=t})),e?wo(e):n&&!Jn&&console.warn(`\`${n}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),Le}async function wo(e){Jn=!0;let{emojiVersion:n,set:t,locale:r}=e;if(n||(n=K.emojiVersion.value),t||(t=K.set.value),r||(r=K.locale.value),E)E.categories=E.categories.filter(l=>!l.name);else{E=(typeof e.data=="function"?await e.data():e.data)||await an(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${n}/${t}.json`),E.emoticons={},E.natives={},E.categories.unshift({id:"frequent",emojis:[]});for(const l in E.aliases){const f=E.aliases[l],d=E.emojis[f];d&&(d.aliases||(d.aliases=[]),d.aliases.push(l))}E.originalCategories=E.categories}if(G=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(r=="en"?Bn(Xn):await an(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${r}.json`)),e.custom)for(let l in e.custom){l=parseInt(l);const f=e.custom[l],d=e.custom[l-1];if(!(!f.emojis||!f.emojis.length)){f.id||(f.id=`custom_${l+1}`),f.name||(f.name=G.categories.custom),d&&!f.icon&&(f.target=d.target||d),E.categories.push(f);for(const g of f.emojis)E.emojis[g.id]=g}}e.categories&&(E.categories=E.originalCategories.filter(l=>e.categories.indexOf(l.id)!=-1).sort((l,f)=>{const d=e.categories.indexOf(l.id),g=e.categories.indexOf(f.id);return d-g}));let s=null,i=null;t=="native"&&(s=sn.latestVersion(),i=e.noCountryFlags||sn.noCountryFlags());let c=E.categories.length,u=!1;for(;c--;){const l=E.categories[c];if(l.id=="frequent"){let{maxFrequentRows:g,perLine:h}=e;g=g>=0?g:K.maxFrequentRows.value,h||(h=K.perLine.value),l.emojis=Yn.get({maxFrequentRows:g,perLine:h})}if(!l.emojis||!l.emojis.length){E.categories.splice(c,1);continue}const{categoryIcons:f}=e;if(f){const g=f[l.id];g&&!l.icon&&(l.icon=g)}let d=l.emojis.length;for(;d--;){const g=l.emojis[d],h=g.id?g:E.emojis[g],I=()=>{l.emojis.splice(d,1)};if(!h||e.exceptEmojis&&e.exceptEmojis.includes(h.id)){I();continue}if(s&&h.version>s){I();continue}if(i&&l.id=="flags"&&!So.includes(h.id)){I();continue}if(!h.search){if(u=!0,h.search=","+[[h.id,!1],[h.name,!0],[h.keywords,!1],[h.emoticons,!1]].map(([x,m])=>{if(x)return(Array.isArray(x)?x:[x]).map(y=>(m?y.split(/[-|_|\s]+/):[y]).map(w=>w.toLowerCase())).flat()}).flat().filter(x=>x&&x.trim()).join(","),h.emoticons)for(const x of h.emoticons)E.emoticons[x]||(E.emoticons[x]=h.id);let v=0;for(const x of h.skins){if(!x)continue;v++;const{native:m}=x;m&&(E.natives[m]=h.id,h.search+=`,${m}`);const y=v==1?"":`:skin-tone-${v}:`;x.shortcodes=`:${h.id}:${y}`}}}}u&&se.reset(),Kn()}function et(e,n,t){e||(e={});const r={};for(let s in n)r[s]=nt(s,e,n,t);return r}function nt(e,n,t,r){const s=t[e];let i=r&&r.getAttribute(e)||(n[e]!=null&&n[e]!=null?n[e]:null);return s&&(i!=null&&s.value&&typeof s.value!=typeof i&&(typeof s.value=="boolean"?i=i!="false":i=s.value.constructor(i)),s.transform&&i&&(i=s.transform(i)),(i==null||s.choices&&s.choices.indexOf(i)==-1)&&(i=s.value)),i}const ko=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let Ne=null;function Co(e){return e.id?e:E.emojis[e]||E.emojis[E.aliases[e]]||E.emojis[E.natives[e]]}function jo(){Ne=null}async function _o(e,{maxResults:n,caller:t}={}){if(!e||!e.trim().length)return null;n||(n=90),await Ie(null,{caller:t||"SearchIndex.search"});const r=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((u,l,f)=>u.trim()&&f.indexOf(u)==l);if(!r.length)return;let s=Ne||(Ne=Object.values(E.emojis)),i,c;for(const u of r){if(!s.length)break;i=[],c={};for(const l of s){if(!l.search)continue;const f=l.search.indexOf(`,${u}`);f!=-1&&(i.push(l),c[l.id]||(c[l.id]=0),c[l.id]+=l.id==u?0:f+1)}s=i}return i.length<2||(i.sort((u,l)=>{const f=c[u.id],d=c[l.id];return f==d?u.id.localeCompare(l.id):f-d}),i.length>n&&(i=i.slice(0,n))),i}var se={search:_o,get:Co,reset:jo,SHORTCODES_REGEX:ko};const So=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function Mo(e,n){return Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((t,r)=>t==n[r])}async function $o(e=1){for(let n in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function zo(e,{skinIndex:n=0}={}){const t=e.skins[n]||(()=>(n=0,e.skins[n]))(),r={id:e.id,name:e.name,native:t.native,unified:t.unified,keywords:e.keywords,shortcodes:t.shortcodes||e.shortcodes};return e.skins.length>1&&(r.skin=n+1),t.src&&(r.src=t.src),e.aliases&&e.aliases.length&&(r.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(r.emoticons=e.emoticons),r}const Oo={activity:{outline:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:b("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:b("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:b("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:b("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[b("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),b("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:b("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[b("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),b("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:b("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[b("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),b("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:b("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[b("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),b("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:b("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[b("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),b("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:b("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:b("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:b("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},Do={loupe:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:b("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:b("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})};var Oe={categories:Oo,search:Do};function We(e){let{id:n,skin:t,emoji:r}=e;if(e.shortcodes){const u=e.shortcodes.match(se.SHORTCODES_REGEX);u&&(n=u[1],u[2]&&(t=u[2]))}if(r||(r=se.get(n||e.native)),!r)return e.fallback;const s=r.skins[t-1]||r.skins[0],i=s.src||(e.set!="native"&&!e.spritesheet?typeof e.getImageURL=="function"?e.getImageURL(e.set,s.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/64/${s.unified}.png`:void 0),c=typeof e.getSpritesheetURL=="function"?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/sheets-256/64.png`;return b("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:i?b("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:s.native||s.shortcodes,src:i}):e.set=="native"?b("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:s.native}):b("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${c})`,backgroundSize:`${100*E.sheet.cols}% ${100*E.sheet.rows}%`,backgroundPosition:`${100/(E.sheet.cols-1)*s.x}% ${100/(E.sheet.rows-1)*s.y}%`}})})}const To=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class tt extends To{static get observedAttributes(){return Object.keys(this.Props)}update(n={}){for(let t in n)this.attributeChangedCallback(t,null,n[t])}attributeChangedCallback(n,t,r){if(!this.component)return;const s=nt(n,{[n]:r},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[n]:s}):(this.component.props[n]=s,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(n={}){if(super(),this.props=n,n.parent||n.ref){let t=null;const r=n.parent||(t=n.ref&&n.ref.current);t&&(t.innerHTML=""),r&&r.appendChild(this)}}}class Ro extends tt{setShadow(){this.attachShadow({mode:"open"})}injectStyles(n){if(!n)return;const t=document.createElement("style");t.textContent=n,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(n,{styles:t}={}){super(n),this.setShadow(),this.injectStyles(t)}}var ot={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:K.set,skin:K.skin};class rt extends tt{async connectedCallback(){const n=et(this.props,ot,this);n.element=this,n.ref=t=>{this.component=t},await Ie(),!this.disconnected&&Qn(b(We,{...n}),this)}constructor(n){super(n)}}V(rt,"Props",ot);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",rt);var cn,Ge=[],ln=M.__b,dn=M.__r,un=M.diffed,fn=M.__c,hn=M.unmount;function Eo(){var e;for(Ge.sort(function(n,t){return n.__v.__b-t.__v.__b});e=Ge.pop();)if(e.__P)try{e.__H.__h.forEach(Ce),e.__H.__h.forEach(Ve),e.__H.__h=[]}catch(n){e.__H.__h=[],M.__e(n,e.__v)}}M.__b=function(e){ln&&ln(e)},M.__r=function(e){dn&&dn(e);var n=e.__c.__H;n&&(n.__h.forEach(Ce),n.__h.forEach(Ve),n.__h=[])},M.diffed=function(e){un&&un(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(Ge.push(n)!==1&&cn===M.requestAnimationFrame||((cn=M.requestAnimationFrame)||function(t){var r,s=function(){clearTimeout(i),pn&&cancelAnimationFrame(r),setTimeout(t)},i=setTimeout(s,100);pn&&(r=requestAnimationFrame(s))})(Eo))},M.__c=function(e,n){n.some(function(t){try{t.__h.forEach(Ce),t.__h=t.__h.filter(function(r){return!r.__||Ve(r)})}catch(r){n.some(function(s){s.__h&&(s.__h=[])}),n=[],M.__e(r,t.__v)}}),fn&&fn(e,n)},M.unmount=function(e){hn&&hn(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(r){try{Ce(r)}catch(s){n=s}}),n&&M.__e(n,t.__v))};var pn=typeof requestAnimationFrame=="function";function Ce(e){var n=e.__c;typeof n=="function"&&(e.__c=void 0,n())}function Ve(e){e.__c=e.__()}function Bo(e,n){for(var t in n)e[t]=n[t];return e}function gn(e,n){for(var t in e)if(t!=="__source"&&!(t in n))return!0;for(var r in n)if(r!=="__source"&&e[r]!==n[r])return!0;return!1}function De(e){this.props=e}(De.prototype=new Z).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,n){return gn(this.props,e)||gn(this.state,n)};var mn=M.__b;M.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),mn&&mn(e)};var Po=M.__e;M.__e=function(e,n,t){if(e.then){for(var r,s=n;s=s.__;)if((r=s.__c)&&r.__c)return n.__e==null&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n)}Po(e,n,t)};var In=M.unmount;function Ae(){this.__u=0,this.t=null,this.__b=null}function it(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function ye(){this.u=null,this.o=null}M.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&e.__h===!0&&(e.type=null),In&&In(e)},(Ae.prototype=new Z).__c=function(e,n){var t=n.__c,r=this;r.t==null&&(r.t=[]),r.t.push(t);var s=it(r.__v),i=!1,c=function(){i||(i=!0,t.__R=null,s?s(u):u())};t.__R=c;var u=function(){if(!--r.__u){if(r.state.__e){var f=r.state.__e;r.__v.__k[0]=function g(h,I,v){return h&&(h.__v=null,h.__k=h.__k&&h.__k.map(function(x){return g(x,I,v)}),h.__c&&h.__c.__P===I&&(h.__e&&v.insertBefore(h.__e,h.__d),h.__c.__e=!0,h.__c.__P=v)),h}(f,f.__c.__P,f.__c.__O)}var d;for(r.setState({__e:r.__b=null});d=r.t.pop();)d.forceUpdate()}},l=n.__h===!0;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(c,c)},Ae.prototype.componentWillUnmount=function(){this.t=[]},Ae.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function i(c,u,l){return c&&(c.__c&&c.__c.__H&&(c.__c.__H.__.forEach(function(f){typeof f.__c=="function"&&f.__c()}),c.__c.__H=null),(c=Bo({},c)).__c!=null&&(c.__c.__P===l&&(c.__c.__P=u),c.__c=null),c.__k=c.__k&&c.__k.map(function(f){return i(f,u,l)})),c}(this.__b,t,r.__O=r.__P)}this.__b=null}var s=n.__e&&Fe(de,null,e.fallback);return s&&(s.__h=null),[Fe(de,null,n.__e?null:e.children),s]};var xn=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.u=t=t[2]}};(ye.prototype=new Z).__e=function(e){var n=this,t=it(n.__v),r=n.o.get(e);return r[0]++,function(s){var i=function(){n.props.revealOrder?(r.push(s),xn(n,e,r)):s()};t?t(i):i()}},ye.prototype.render=function(e){this.u=null,this.o=new Map;var n=$e(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},ye.prototype.componentDidUpdate=ye.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(n,t){xn(e,t,n)})};var Lo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ao=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ho=typeof document<"u",Fo=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};Z.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Z.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})});var vn=M.event;function Uo(){}function No(){return this.cancelBubble}function Wo(){return this.defaultPrevented}M.event=function(e){return vn&&(e=vn(e)),e.persist=Uo,e.isPropagationStopped=No,e.isDefaultPrevented=Wo,e.nativeEvent=e};var bn={configurable:!0,get:function(){return this.class}},yn=M.vnode;M.vnode=function(e){var n=e.type,t=e.props,r=t;if(typeof n=="string"){var s=n.indexOf("-")===-1;for(var i in r={},t){var c=t[i];Ho&&i==="children"&&n==="noscript"||i==="value"&&"defaultValue"in t&&c==null||(i==="defaultValue"&&"value"in t&&t.value==null?i="value":i==="download"&&c===!0?c="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+n)&&!Fo(t.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():s&&Ao.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():c===null&&(c=void 0),r[i]=c)}n=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=$e(t.children).forEach(function(u){u.props.selected=r.value.indexOf(u.props.value)!=-1})),n=="select"&&r.defaultValue!=null&&(r.value=$e(t.children).forEach(function(u){u.props.selected=r.multiple?r.defaultValue.indexOf(u.props.value)!=-1:r.defaultValue==u.props.value})),e.props=r,t.class!=t.className&&(bn.enumerable="className"in t,t.className!=null&&(r.class=t.className),Object.defineProperty(r,"className",bn))}e.$$typeof=Lo,yn&&yn(e)};var wn=M.__r;M.__r=function(e){wn&&wn(e),e.__c};const Go={light:"outline",dark:"solid"};class Vo extends De{renderIcon(n){const{icon:t}=n;if(t){if(t.svg)return b("span",{class:"flex",dangerouslySetInnerHTML:{__html:t.svg}});if(t.src)return b("img",{src:t.src})}const r=Oe.categories[n.id]||Oe.categories.custom,s=this.props.icons=="auto"?Go[this.props.theme]:this.props.icons;return r[s]||r}render(){let n=null;return b("nav",{id:"nav",class:"padding","data-position":this.props.position,dir:this.props.dir,children:b("div",{class:"flex relative",children:[this.categories.map((t,r)=>{const s=t.name||G.categories[t.id],i=!this.props.unfocused&&t.id==this.state.categoryId;return i&&(n=r),b("button",{"aria-label":s,"aria-selected":i||void 0,title:s,type:"button",class:"flex flex-grow flex-center",onMouseDown:c=>c.preventDefault(),onClick:()=>{this.props.onClick({category:t,i:r})},children:this.renderIcon(t)})}),b("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:n==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${n*100}%)`:`translateX(${n*100}%)`}})]})})}constructor(){super(),this.categories=E.categories.filter(n=>!n.target),this.state={categoryId:this.categories[0].id}}}class qo extends De{shouldComponentUpdate(n){for(let t in n)if(t!="children"&&n[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const we={rowsPerRender:10};class Qo extends Z{getInitialState(n=this.props){return{skin:oe.get("skin")||n.skin,theme:this.initTheme(n.theme)}}componentWillMount(){this.dir=G.rtl?"rtl":"ltr",this.refs={menu:X(),navigation:X(),scroll:X(),search:X(),searchInput:X(),skinToneButton:X(),skinToneRadio:X()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:n}=this.refs;n.current&&n.current.focus()}}componentWillReceiveProps(n){this.nextState||(this.nextState={});for(const t in n)this.nextState[t]=n[t];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let t=!1;for(const s in this.nextState)this.props[s]=this.nextState[s],(s==="custom"||s==="categories")&&(t=!0);delete this.nextState;const r=this.getInitialState();if(t)return this.reset(r);this.setState(r)})}componentWillUnmount(){this.unregister()}async reset(n={}){await Ie(this.props),this.initGrid(),this.unobserve(),this.setState(n,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){var n;document.removeEventListener("click",this.handleClickOutside),(n=this.darkMedia)==null||n.removeEventListener("change",this.darkMediaCallback),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:n=[]}={}){Array.isArray(n)||(n=[n]);for(const t of this.observers)n.includes(t)||t.disconnect();this.observers=[].concat(n)}initGrid(){const{categories:n}=E;this.refs.categories=new Map;const t=E.categories.map(s=>s.id).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const r=(s,i)=>{const c=[];c.__categoryId=i.id,c.__index=s.length,this.grid.push(c);const u=this.grid.length-1,l=u%we.rowsPerRender?{}:X();return l.index=u,l.posinset=this.grid.setsize+1,s.push(l),c};for(let s of n){const i=[];let c=r(i,s);for(let u of s.emojis)c.length==this.getPerLine()&&(c=r(i,s)),this.grid.setsize+=1,c.push(u);this.refs.categories.set(s.id,{root:X(),rows:i})}}initTheme(n){if(n!="auto")return n;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addEventListener("change",this.darkMediaCallback)}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(n=this.props){if(!n.dynamicWidth)return;const{element:t,emojiButtonSize:r}=n,s=()=>{const{width:c}=t.getBoundingClientRect();return Math.floor(c/r)},i=new ResizeObserver(()=>{this.unobserve({except:i}),this.setState({perLine:s()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return i.observe(t),this.observers.push(i),s()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([n,t]){const r=this.state.searchResults||this.grid,s=r[n]&&r[n][t];if(s)return se.get(s)}observeCategories(){const n=this.refs.navigation.current;if(!n)return;const t=new Map,r=c=>{c!=n.state.categoryId&&n.setState({categoryId:c})},s={root:this.refs.scroll.current,threshold:[0,1]},i=new IntersectionObserver(c=>{for(const l of c){const f=l.target.dataset.id;t.set(f,l.intersectionRatio)}const u=[...t];for(const[l,f]of u)if(f){r(l);break}},s);for(const{root:c}of this.refs.categories.values())i.observe(c.current);this.observers.push(i)}observeRows(){const n={...this.state.visibleRows},t=new IntersectionObserver(r=>{for(const s of r){const i=parseInt(s.target.dataset.index);s.isIntersecting?n[i]=!0:delete n[i]}this.setState({visibleRows:n})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(we.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*we.rowsPerRender}px`});for(const{rows:r}of this.refs.categories.values())for(const s of r)s.current&&t.observe(s.current);this.observers.push(t)}preventDefault(n){n.preventDefault()}unfocusSearch(){const n=this.refs.searchInput.current;n&&n.blur()}navigate({e:n,input:t,left:r,right:s,up:i,down:c}){const u=this.state.searchResults||this.grid;if(!u.length)return;let[l,f]=this.state.pos;const d=(()=>{if(l==0&&f==0&&!n.repeat&&(r||i))return null;if(l==-1)return!n.repeat&&(s||c)&&t.selectionStart==t.value.length?[0,0]:null;if(r||s){let g=u[l];const h=r?-1:1;if(f+=h,!g[f]){if(l+=h,g=u[l],!g)return l=r?0:u.length-1,f=r?0:u[l].length-1,[l,f];f=r?g.length-1:0}return[l,f]}if(i||c){l+=i?-1:1;const g=u[l];return g?(g[f]||(f=g.length-1),[l,f]):(l=i?0:u.length-1,f=i?0:u[l].length-1,[l,f])}})();if(d)n.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:d,keyboard:!0},()=>{this.scrollTo({row:d[0]})})}scrollTo({categoryId:n,row:t}){const r=this.state.searchResults||this.grid;if(!r.length)return;const s=this.refs.scroll.current,i=s.getBoundingClientRect();let c=0;if(t>=0&&(n=r[t].__categoryId),n&&(c=(this.refs[n]||this.refs.categories.get(n).root).current.getBoundingClientRect().top-(i.top-s.scrollTop)+1),t>=0)if(!t)c=0;else{const u=r[t].__index,l=c+u*this.props.emojiButtonSize,f=l+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(l<s.scrollTop)c=l;else if(f>s.scrollTop+i.height)c=f-i.height;else return}this.ignoreMouse(),s.scrollTop=c}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(n){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:n||[-1,-1],keyboard:!1})}handleEmojiClick({e:n,emoji:t,pos:r}){if(this.props.onEmojiSelect&&(!t&&r&&(t=this.getEmojiByPos(r)),t)){const s=zo(t,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&Yn.add(s,this.props),this.props.onEmojiSelect(s,n)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(n){this.setState({tempSkin:n})}handleSkinClick(n){this.ignoreMouse(),this.closeSkins(),this.setState({skin:n,tempSkin:null}),oe.set("skin",n)}renderNav(){return b(Vo,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const n=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return b("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[b("div",{class:"flex flex-middle flex-grow",children:[b("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:b(We,{emoji:n,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),b("div",{class:`margin-${this.dir[0]}`,children:n||t?b("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[b("div",{class:"preview-title ellipsis",children:n?n.name:G.search_no_results_1}),b("div",{class:"preview-subtitle ellipsis color-c",children:n?n.skins[0].shortcodes:G.search_no_results_2})]}):b("div",{class:"preview-placeholder color-c",children:G.pick})})]}),!n&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(n,{pos:t,posinset:r,grid:s}){const i=this.props.emojiButtonSize,c=this.state.tempSkin||this.state.skin,l=(n.skins[c-1]||n.skins[0]).native,f=Mo(this.state.pos,t),d=t.concat(n.id).join("");return b(qo,{selected:f,skin:c,size:i,children:b("button",{"aria-label":l,"aria-selected":f||void 0,"aria-posinset":r,"aria-setsize":s.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?n.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:g=>this.handleEmojiClick({e:g,emoji:n}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[b("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(r-1)%this.props.emojiButtonColors.length]:void 0}}),b(We,{emoji:n,set:this.props.set,size:this.props.emojiSize,skin:c,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},d)}renderSearch(){const n=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return b("div",{children:[b("div",{class:"spacer"}),b("div",{class:"flex flex-middle",children:[b("div",{class:"search relative flex-grow",children:[b("input",{type:"search",ref:this.refs.searchInput,placeholder:G.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),b("span",{class:"icon loupe flex",children:Oe.search.loupe}),this.state.searchResults&&b("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:Oe.search.delete})]}),n&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:n}=this.state;return n?b("div",{class:"category",ref:this.refs.search,children:[b("div",{class:`sticky padding-small align-${this.dir[0]}`,children:G.categories.search}),b("div",{children:n.length?n.map((t,r)=>b("div",{class:"flex",children:t.map((s,i)=>this.renderEmojiButton(s,{pos:[r,i],posinset:r*this.props.perLine+i+1,grid:n}))})):b("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&b("a",{onClick:this.props.onAddCustomEmoji,children:G.add_custom})})})]}):null}renderCategories(){const{categories:n}=E,t=!!this.state.searchResults,r=this.getPerLine();return b("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0,height:"100%"},children:n.map(s=>{const{root:i,rows:c}=this.refs.categories.get(s.id);return b("div",{"data-id":s.target?s.target.id:s.id,class:"category",ref:i,children:[b("div",{class:`sticky padding-small align-${this.dir[0]}`,children:s.name||G.categories[s.id]}),b("div",{class:"relative",style:{height:c.length*this.props.emojiButtonSize},children:c.map((u,l)=>{const f=u.index-u.index%we.rowsPerRender,d=this.state.visibleRows[f],g="current"in u?u:void 0;if(!d&&!g)return null;const h=l*r,I=h+r,v=s.emojis.slice(h,I);return v.length<r&&v.push(...new Array(r-v.length)),b("div",{"data-index":u.index,ref:g,class:"flex row",style:{top:l*this.props.emojiButtonSize},children:d&&v.map((x,m)=>{if(!x)return b("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const y=se.get(x);return this.renderEmojiButton(y,{pos:[u.index,m],posinset:u.posinset+m,grid:this.grid})})},u.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:b("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:b("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":G.skins.choose,title:G.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:b("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const n=this.getEmojiByPos(this.state.pos),t=n?n.name:"";return b("div",{"aria-live":"polite",class:"sr-only",children:t})}renderSkins(){const t=this.refs.skinToneButton.current.getBoundingClientRect(),r=this.base.getBoundingClientRect(),s={};return this.dir=="ltr"?s.right=r.right-t.right-3:s.left=t.left-r.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?s.bottom=r.bottom-t.top+6:(s.top=t.bottom-r.top+3,s.bottom="auto"),b("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":G.skins.choose,class:"menu hidden","data-position":s.top?"top":"bottom",style:s,children:[...Array(6).keys()].map(i=>{const c=i+1,u=this.state.skin==c;return b("div",{children:[b("input",{type:"radio",name:"skin-tone",value:c,"aria-label":G.skins[c],ref:u?this.refs.skinToneRadio:null,defaultChecked:u,onChange:()=>this.handleSkinMouseOver(c),onKeyDown:l=>{(l.code=="Enter"||l.code=="Space"||l.code=="Tab")&&(l.preventDefault(),this.handleSkinClick(c))}}),b("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(c),onMouseEnter:()=>this.handleSkinMouseOver(c),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[b("span",{class:`skin-tone skin-tone-${c}`}),b("span",{class:"margin-small-lr",children:G.skins[c]})]})]})})})}render(){const n=this.props.perLine*this.props.emojiButtonSize;return b("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${n}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&b("div",{class:"padding-lr",children:this.renderSearch()}),b("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:b("div",{style:{width:this.props.dynamicWidth?"100%":n,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(n){super(),V(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),V(this,"handleClickOutside",t=>{const{element:r}=this.props;t.target!=r&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(t))}),V(this,"handleBaseClick",t=>{this.state.showSkins&&(t.target.closest(".menu")||(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins()))}),V(this,"handleBaseKeydown",t=>{this.state.showSkins&&t.key=="Escape"&&(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins())}),V(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),V(this,"handleSearchInput",async()=>{const t=this.refs.searchInput.current;if(!t)return;const{value:r}=t,s=await se.search(r),i=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!s)return this.setState({searchResults:s,pos:[-1,-1]},i);const c=t.selectionStart==t.value.length?[0,0]:[-1,-1],u=[];u.setsize=s.length;let l=null;for(let f of s)(!u.length||l.length==this.getPerLine())&&(l=[],l.__categoryId="search",l.__index=u.length,u.push(l)),l.push(f);this.ignoreMouse(),this.setState({searchResults:u,pos:c},i)}),V(this,"handleSearchKeyDown",t=>{const r=t.currentTarget;switch(t.stopImmediatePropagation(),t.key){case"ArrowLeft":this.navigate({e:t,input:r,left:!0});break;case"ArrowRight":this.navigate({e:t,input:r,right:!0});break;case"ArrowUp":this.navigate({e:t,input:r,up:!0});break;case"ArrowDown":this.navigate({e:t,input:r,down:!0});break;case"Enter":t.preventDefault(),this.handleEmojiClick({e:t,pos:this.state.pos});break;case"Escape":t.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),V(this,"clearSearch",()=>{const t=this.refs.searchInput.current;t&&(t.value="",t.focus(),this.handleSearchInput())}),V(this,"handleCategoryClick",({category:t,i:r})=>{this.scrollTo(r==0?{row:-1}:{categoryId:t.id})}),V(this,"openSkins",t=>{const{currentTarget:r}=t,s=r.getBoundingClientRect();this.setState({showSkins:s},async()=>{await $o(2);const i=this.refs.menu.current;i&&(i.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(n),visibleRows:{0:!0},...this.getInitialState(n)}}}class st extends Ro{async connectedCallback(){const n=et(this.props,K,this);n.element=this,n.ref=t=>{this.component=t},await Ie(n),!this.disconnected&&Qn(b(Qo,{...n}),this.shadowRoot)}constructor(n){super(n,{styles:Bn(at)})}}V(st,"Props",K);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",st);var at={};at=`:host {
19
+ width: min-content;
20
+ height: 435px;
21
+ min-height: 230px;
22
+ border-radius: var(--border-radius);
23
+ box-shadow: var(--shadow);
24
+ --border-radius: 10px;
25
+ --category-icon-size: 18px;
26
+ --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
27
+ --font-size: 15px;
28
+ --preview-placeholder-size: 21px;
29
+ --preview-title-size: 1.1em;
30
+ --preview-subtitle-size: .9em;
31
+ --shadow-color: 0deg 0% 0%;
32
+ --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14);
33
+ display: flex;
34
+ }
35
+
36
+ [data-theme="light"] {
37
+ --em-rgb-color: var(--rgb-color, 34, 36, 39);
38
+ --em-rgb-accent: var(--rgb-accent, 34, 102, 237);
39
+ --em-rgb-background: var(--rgb-background, 255, 255, 255);
40
+ --em-rgb-input: var(--rgb-input, 255, 255, 255);
41
+ --em-color-border: var(--color-border, rgba(0, 0, 0, .05));
42
+ --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1));
43
+ }
44
+
45
+ [data-theme="dark"] {
46
+ --em-rgb-color: var(--rgb-color, 222, 222, 221);
47
+ --em-rgb-accent: var(--rgb-accent, 58, 130, 247);
48
+ --em-rgb-background: var(--rgb-background, 21, 22, 23);
49
+ --em-rgb-input: var(--rgb-input, 0, 0, 0);
50
+ --em-color-border: var(--color-border, rgba(255, 255, 255, .1));
51
+ --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2));
52
+ }
53
+
54
+ #root {
55
+ --color-a: rgb(var(--em-rgb-color));
56
+ --color-b: rgba(var(--em-rgb-color), .65);
57
+ --color-c: rgba(var(--em-rgb-color), .45);
58
+ --padding: 12px;
59
+ --padding-small: calc(var(--padding) / 2);
60
+ --sidebar-width: 16px;
61
+ --duration: 225ms;
62
+ --duration-fast: 125ms;
63
+ --duration-instant: 50ms;
64
+ --easing: cubic-bezier(.4, 0, .2, 1);
65
+ width: 100%;
66
+ text-align: left;
67
+ border-radius: var(--border-radius);
68
+ background-color: rgb(var(--em-rgb-background));
69
+ position: relative;
70
+ }
71
+
72
+ @media (prefers-reduced-motion) {
73
+ #root {
74
+ --duration: 0;
75
+ --duration-fast: 0;
76
+ --duration-instant: 0;
77
+ }
78
+ }
79
+
80
+ #root[data-menu] button {
81
+ cursor: auto;
82
+ }
83
+
84
+ #root[data-menu] .menu button {
85
+ cursor: pointer;
86
+ }
87
+
88
+ :host, #root, input, button {
89
+ color: rgb(var(--em-rgb-color));
90
+ font-family: var(--font-family);
91
+ font-size: var(--font-size);
92
+ -webkit-font-smoothing: antialiased;
93
+ -moz-osx-font-smoothing: grayscale;
94
+ line-height: normal;
95
+ }
96
+
97
+ *, :before, :after {
98
+ box-sizing: border-box;
99
+ min-width: 0;
100
+ margin: 0;
101
+ padding: 0;
102
+ }
103
+
104
+ .relative {
105
+ position: relative;
106
+ }
107
+
108
+ .flex {
109
+ display: flex;
110
+ }
111
+
112
+ .flex-auto {
113
+ flex: none;
114
+ }
115
+
116
+ .flex-center {
117
+ justify-content: center;
118
+ }
119
+
120
+ .flex-column {
121
+ flex-direction: column;
122
+ }
123
+
124
+ .flex-grow {
125
+ flex: auto;
126
+ }
127
+
128
+ .flex-middle {
129
+ align-items: center;
130
+ }
131
+
132
+ .flex-wrap {
133
+ flex-wrap: wrap;
134
+ }
135
+
136
+ .padding {
137
+ padding: var(--padding);
138
+ }
139
+
140
+ .padding-t {
141
+ padding-top: var(--padding);
142
+ }
143
+
144
+ .padding-lr {
145
+ padding-left: var(--padding);
146
+ padding-right: var(--padding);
147
+ }
148
+
149
+ .padding-r {
150
+ padding-right: var(--padding);
151
+ }
152
+
153
+ .padding-small {
154
+ padding: var(--padding-small);
155
+ }
156
+
157
+ .padding-small-b {
158
+ padding-bottom: var(--padding-small);
159
+ }
160
+
161
+ .padding-small-lr {
162
+ padding-left: var(--padding-small);
163
+ padding-right: var(--padding-small);
164
+ }
165
+
166
+ .margin {
167
+ margin: var(--padding);
168
+ }
169
+
170
+ .margin-r {
171
+ margin-right: var(--padding);
172
+ }
173
+
174
+ .margin-l {
175
+ margin-left: var(--padding);
176
+ }
177
+
178
+ .margin-small-l {
179
+ margin-left: var(--padding-small);
180
+ }
181
+
182
+ .margin-small-lr {
183
+ margin-left: var(--padding-small);
184
+ margin-right: var(--padding-small);
185
+ }
186
+
187
+ .align-l {
188
+ text-align: left;
189
+ }
190
+
191
+ .align-r {
192
+ text-align: right;
193
+ }
194
+
195
+ .color-a {
196
+ color: var(--color-a);
197
+ }
198
+
199
+ .color-b {
200
+ color: var(--color-b);
201
+ }
202
+
203
+ .color-c {
204
+ color: var(--color-c);
205
+ }
206
+
207
+ .ellipsis {
208
+ white-space: nowrap;
209
+ max-width: 100%;
210
+ width: auto;
211
+ text-overflow: ellipsis;
212
+ overflow: hidden;
213
+ }
214
+
215
+ .sr-only {
216
+ width: 1px;
217
+ height: 1px;
218
+ position: absolute;
219
+ top: auto;
220
+ left: -10000px;
221
+ overflow: hidden;
222
+ }
223
+
224
+ a {
225
+ cursor: pointer;
226
+ color: rgb(var(--em-rgb-accent));
227
+ }
228
+
229
+ a:hover {
230
+ text-decoration: underline;
231
+ }
232
+
233
+ .spacer {
234
+ height: 10px;
235
+ }
236
+
237
+ [dir="rtl"] .scroll {
238
+ padding-left: 0;
239
+ padding-right: var(--padding);
240
+ }
241
+
242
+ .scroll {
243
+ padding-right: 0;
244
+ overflow-x: hidden;
245
+ overflow-y: auto;
246
+ }
247
+
248
+ .scroll::-webkit-scrollbar {
249
+ width: var(--sidebar-width);
250
+ height: var(--sidebar-width);
251
+ }
252
+
253
+ .scroll::-webkit-scrollbar-track {
254
+ border: 0;
255
+ }
256
+
257
+ .scroll::-webkit-scrollbar-button {
258
+ width: 0;
259
+ height: 0;
260
+ display: none;
261
+ }
262
+
263
+ .scroll::-webkit-scrollbar-corner {
264
+ background-color: rgba(0, 0, 0, 0);
265
+ }
266
+
267
+ .scroll::-webkit-scrollbar-thumb {
268
+ min-height: 20%;
269
+ min-height: 65px;
270
+ border: 4px solid rgb(var(--em-rgb-background));
271
+ border-radius: 8px;
272
+ }
273
+
274
+ .scroll::-webkit-scrollbar-thumb:hover {
275
+ background-color: var(--em-color-border-over) !important;
276
+ }
277
+
278
+ .scroll:hover::-webkit-scrollbar-thumb {
279
+ background-color: var(--em-color-border);
280
+ }
281
+
282
+ .sticky {
283
+ z-index: 1;
284
+ background-color: rgba(var(--em-rgb-background), .9);
285
+ -webkit-backdrop-filter: blur(4px);
286
+ backdrop-filter: blur(4px);
287
+ font-weight: 500;
288
+ position: sticky;
289
+ top: -1px;
290
+ }
291
+
292
+ [dir="rtl"] .search input[type="search"] {
293
+ padding: 10px 2.2em 10px 2em;
294
+ }
295
+
296
+ [dir="rtl"] .search .loupe {
297
+ left: auto;
298
+ right: .7em;
299
+ }
300
+
301
+ [dir="rtl"] .search .delete {
302
+ left: .7em;
303
+ right: auto;
304
+ }
305
+
306
+ .search {
307
+ z-index: 2;
308
+ position: relative;
309
+ }
310
+
311
+ .search input, .search button {
312
+ font-size: calc(var(--font-size) - 1px);
313
+ }
314
+
315
+ .search input[type="search"] {
316
+ width: 100%;
317
+ background-color: var(--em-color-border);
318
+ transition-duration: var(--duration);
319
+ transition-property: background-color, box-shadow;
320
+ transition-timing-function: var(--easing);
321
+ border: 0;
322
+ border-radius: 10px;
323
+ outline: 0;
324
+ padding: 10px 2em 10px 2.2em;
325
+ display: block;
326
+ }
327
+
328
+ .search input[type="search"]::-ms-input-placeholder {
329
+ color: inherit;
330
+ opacity: .6;
331
+ }
332
+
333
+ .search input[type="search"]::placeholder {
334
+ color: inherit;
335
+ opacity: .6;
336
+ }
337
+
338
+ .search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration {
339
+ -webkit-appearance: none;
340
+ -ms-appearance: none;
341
+ appearance: none;
342
+ }
343
+
344
+ .search input[type="search"]:focus {
345
+ background-color: rgb(var(--em-rgb-input));
346
+ box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2);
347
+ }
348
+
349
+ .search .icon {
350
+ z-index: 1;
351
+ color: rgba(var(--em-rgb-color), .7);
352
+ position: absolute;
353
+ top: 50%;
354
+ transform: translateY(-50%);
355
+ }
356
+
357
+ .search .loupe {
358
+ pointer-events: none;
359
+ left: .7em;
360
+ }
361
+
362
+ .search .delete {
363
+ right: .7em;
364
+ }
365
+
366
+ svg {
367
+ fill: currentColor;
368
+ width: 1em;
369
+ height: 1em;
370
+ }
371
+
372
+ button {
373
+ -webkit-appearance: none;
374
+ -ms-appearance: none;
375
+ appearance: none;
376
+ cursor: pointer;
377
+ color: currentColor;
378
+ background-color: rgba(0, 0, 0, 0);
379
+ border: 0;
380
+ }
381
+
382
+ #nav {
383
+ z-index: 2;
384
+ padding-top: 12px;
385
+ padding-bottom: 12px;
386
+ padding-right: var(--sidebar-width);
387
+ position: relative;
388
+ }
389
+
390
+ #nav button {
391
+ color: var(--color-b);
392
+ transition: color var(--duration) var(--easing);
393
+ }
394
+
395
+ #nav button:hover {
396
+ color: var(--color-a);
397
+ }
398
+
399
+ #nav svg, #nav img {
400
+ width: var(--category-icon-size);
401
+ height: var(--category-icon-size);
402
+ }
403
+
404
+ #nav[dir="rtl"] .bar {
405
+ left: auto;
406
+ right: 0;
407
+ }
408
+
409
+ #nav .bar {
410
+ width: 100%;
411
+ height: 3px;
412
+ background-color: rgb(var(--em-rgb-accent));
413
+ transition: transform var(--duration) var(--easing);
414
+ border-radius: 3px 3px 0 0;
415
+ position: absolute;
416
+ bottom: -12px;
417
+ left: 0;
418
+ }
419
+
420
+ #nav button[aria-selected] {
421
+ color: rgb(var(--em-rgb-accent));
422
+ }
423
+
424
+ #preview {
425
+ z-index: 2;
426
+ padding: calc(var(--padding) + 4px) var(--padding);
427
+ padding-right: var(--sidebar-width);
428
+ position: relative;
429
+ }
430
+
431
+ #preview .preview-placeholder {
432
+ font-size: var(--preview-placeholder-size);
433
+ }
434
+
435
+ #preview .preview-title {
436
+ font-size: var(--preview-title-size);
437
+ }
438
+
439
+ #preview .preview-subtitle {
440
+ font-size: var(--preview-subtitle-size);
441
+ }
442
+
443
+ #nav:before, #preview:before {
444
+ content: "";
445
+ height: 2px;
446
+ position: absolute;
447
+ left: 0;
448
+ right: 0;
449
+ }
450
+
451
+ #nav[data-position="top"]:before, #preview[data-position="top"]:before {
452
+ background: linear-gradient(to bottom, var(--em-color-border), transparent);
453
+ top: 100%;
454
+ }
455
+
456
+ #nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before {
457
+ background: linear-gradient(to top, var(--em-color-border), transparent);
458
+ bottom: 100%;
459
+ }
460
+
461
+ .category:last-child {
462
+ min-height: calc(100% + 1px);
463
+ }
464
+
465
+ .category button {
466
+ font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif;
467
+ position: relative;
468
+ }
469
+
470
+ .category button > * {
471
+ position: relative;
472
+ }
473
+
474
+ .category button .background {
475
+ opacity: 0;
476
+ background-color: var(--em-color-border);
477
+ transition: opacity var(--duration-fast) var(--easing) var(--duration-instant);
478
+ position: absolute;
479
+ top: 0;
480
+ bottom: 0;
481
+ left: 0;
482
+ right: 0;
483
+ }
484
+
485
+ .category button:hover .background {
486
+ transition-duration: var(--duration-instant);
487
+ transition-delay: 0s;
488
+ }
489
+
490
+ .category button[aria-selected] .background {
491
+ opacity: 1;
492
+ }
493
+
494
+ .category button[data-keyboard] .background {
495
+ transition: none;
496
+ }
497
+
498
+ .row {
499
+ width: 100%;
500
+ position: absolute;
501
+ top: 0;
502
+ left: 0;
503
+ }
504
+
505
+ .skin-tone-button {
506
+ border: 1px solid rgba(0, 0, 0, 0);
507
+ border-radius: 100%;
508
+ }
509
+
510
+ .skin-tone-button:hover {
511
+ border-color: var(--em-color-border);
512
+ }
513
+
514
+ .skin-tone-button:active .skin-tone {
515
+ transform: scale(.85) !important;
516
+ }
517
+
518
+ .skin-tone-button .skin-tone {
519
+ transition: transform var(--duration) var(--easing);
520
+ }
521
+
522
+ .skin-tone-button[aria-selected] {
523
+ background-color: var(--em-color-border);
524
+ border-top-color: rgba(0, 0, 0, .05);
525
+ border-bottom-color: rgba(0, 0, 0, 0);
526
+ border-left-width: 0;
527
+ border-right-width: 0;
528
+ }
529
+
530
+ .skin-tone-button[aria-selected] .skin-tone {
531
+ transform: scale(.9);
532
+ }
533
+
534
+ .menu {
535
+ z-index: 2;
536
+ white-space: nowrap;
537
+ border: 1px solid var(--em-color-border);
538
+ background-color: rgba(var(--em-rgb-background), .9);
539
+ -webkit-backdrop-filter: blur(4px);
540
+ backdrop-filter: blur(4px);
541
+ transition-property: opacity, transform;
542
+ transition-duration: var(--duration);
543
+ transition-timing-function: var(--easing);
544
+ border-radius: 10px;
545
+ padding: 4px;
546
+ position: absolute;
547
+ box-shadow: 1px 1px 5px rgba(0, 0, 0, .05);
548
+ }
549
+
550
+ .menu.hidden {
551
+ opacity: 0;
552
+ }
553
+
554
+ .menu[data-position="bottom"] {
555
+ transform-origin: 100% 100%;
556
+ }
557
+
558
+ .menu[data-position="bottom"].hidden {
559
+ transform: scale(.9)rotate(-3deg)translateY(5%);
560
+ }
561
+
562
+ .menu[data-position="top"] {
563
+ transform-origin: 100% 0;
564
+ }
565
+
566
+ .menu[data-position="top"].hidden {
567
+ transform: scale(.9)rotate(3deg)translateY(-5%);
568
+ }
569
+
570
+ .menu input[type="radio"] {
571
+ clip: rect(0 0 0 0);
572
+ width: 1px;
573
+ height: 1px;
574
+ border: 0;
575
+ margin: 0;
576
+ padding: 0;
577
+ position: absolute;
578
+ overflow: hidden;
579
+ }
580
+
581
+ .menu input[type="radio"]:checked + .option {
582
+ box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent));
583
+ }
584
+
585
+ .option {
586
+ width: 100%;
587
+ border-radius: 6px;
588
+ padding: 4px 6px;
589
+ }
590
+
591
+ .option:hover {
592
+ color: #fff;
593
+ background-color: rgb(var(--em-rgb-accent));
594
+ }
595
+
596
+ .skin-tone {
597
+ width: 16px;
598
+ height: 16px;
599
+ border-radius: 100%;
600
+ display: inline-block;
601
+ position: relative;
602
+ overflow: hidden;
603
+ }
604
+
605
+ .skin-tone:after {
606
+ content: "";
607
+ mix-blend-mode: overlay;
608
+ background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0));
609
+ border: 1px solid rgba(0, 0, 0, .8);
610
+ border-radius: 100%;
611
+ position: absolute;
612
+ top: 0;
613
+ bottom: 0;
614
+ left: 0;
615
+ right: 0;
616
+ box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff;
617
+ }
618
+
619
+ .skin-tone-1 {
620
+ background-color: #ffc93a;
621
+ }
622
+
623
+ .skin-tone-2 {
624
+ background-color: #ffdab7;
625
+ }
626
+
627
+ .skin-tone-3 {
628
+ background-color: #e7b98f;
629
+ }
630
+
631
+ .skin-tone-4 {
632
+ background-color: #c88c61;
633
+ }
634
+
635
+ .skin-tone-5 {
636
+ background-color: #a46134;
637
+ }
638
+
639
+ .skin-tone-6 {
640
+ background-color: #5d4437;
641
+ }
642
+
643
+ [data-index] {
644
+ justify-content: space-between;
645
+ }
646
+
647
+ [data-emoji-set="twitter"] .skin-tone:after {
648
+ box-shadow: none;
649
+ border-color: rgba(0, 0, 0, .5);
650
+ }
651
+
652
+ [data-emoji-set="twitter"] .skin-tone-1 {
653
+ background-color: #fade72;
654
+ }
655
+
656
+ [data-emoji-set="twitter"] .skin-tone-2 {
657
+ background-color: #f3dfd0;
658
+ }
659
+
660
+ [data-emoji-set="twitter"] .skin-tone-3 {
661
+ background-color: #eed3a8;
662
+ }
663
+
664
+ [data-emoji-set="twitter"] .skin-tone-4 {
665
+ background-color: #cfad8d;
666
+ }
667
+
668
+ [data-emoji-set="twitter"] .skin-tone-5 {
669
+ background-color: #a8805d;
670
+ }
671
+
672
+ [data-emoji-set="twitter"] .skin-tone-6 {
673
+ background-color: #765542;
674
+ }
675
+
676
+ [data-emoji-set="google"] .skin-tone:after {
677
+ box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4);
678
+ }
679
+
680
+ [data-emoji-set="google"] .skin-tone-1 {
681
+ background-color: #f5c748;
682
+ }
683
+
684
+ [data-emoji-set="google"] .skin-tone-2 {
685
+ background-color: #f1d5aa;
686
+ }
687
+
688
+ [data-emoji-set="google"] .skin-tone-3 {
689
+ background-color: #d4b48d;
690
+ }
691
+
692
+ [data-emoji-set="google"] .skin-tone-4 {
693
+ background-color: #aa876b;
694
+ }
695
+
696
+ [data-emoji-set="google"] .skin-tone-5 {
697
+ background-color: #916544;
698
+ }
699
+
700
+ [data-emoji-set="google"] .skin-tone-6 {
701
+ background-color: #61493f;
702
+ }
703
+
704
+ [data-emoji-set="facebook"] .skin-tone:after {
705
+ border-color: rgba(0, 0, 0, .4);
706
+ box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff;
707
+ }
708
+
709
+ [data-emoji-set="facebook"] .skin-tone-1 {
710
+ background-color: #f5c748;
711
+ }
712
+
713
+ [data-emoji-set="facebook"] .skin-tone-2 {
714
+ background-color: #f1d5aa;
715
+ }
716
+
717
+ [data-emoji-set="facebook"] .skin-tone-3 {
718
+ background-color: #d4b48d;
719
+ }
720
+
721
+ [data-emoji-set="facebook"] .skin-tone-4 {
722
+ background-color: #aa876b;
723
+ }
724
+
725
+ [data-emoji-set="facebook"] .skin-tone-5 {
726
+ background-color: #916544;
727
+ }
728
+
729
+ [data-emoji-set="facebook"] .skin-tone-6 {
730
+ background-color: #61493f;
731
+ }
732
+
733
+ `;let kn=!1;kn||(Ie({data:je}),kn=!0);const Zo=()=>{const e=[{id:"frequent",name:"Frequently Used",icon:o.jsx(C.IconClock,{size:20,strokeWidth:2.5})}];return je.categories.forEach(n=>{if(n.emojis&&n.emojis.length>0){let t=o.jsx(C.IconMoodSmile,{size:20,strokeWidth:2}),r=n.name;switch(n.id){case"people":t=o.jsx(C.IconMoodSmile,{size:20,strokeWidth:2}),r="Smileys & People";break;case"nature":t=o.jsx(C.IconTrees,{size:20,strokeWidth:2}),r="Animals & Nature";break;case"foods":t=o.jsx(C.IconApple,{size:20,strokeWidth:2}),r="Food & Drink";break;case"activity":t=o.jsx(C.IconBallBasketball,{size:20,strokeWidth:2}),r="Activities";break;case"travel":t=o.jsx(C.IconPlane,{size:20,strokeWidth:2}),r="Travel & Places";break;case"places":t=o.jsx(C.IconPlane,{size:20,strokeWidth:2}),r="Travel & Places";break;case"objects":t=o.jsx(C.IconBulb,{size:20,strokeWidth:2}),r="Objects";break;case"symbols":t=o.jsx(C.IconHeart,{size:20,strokeWidth:2}),r="Symbols";break;case"flags":t=o.jsx(C.IconFlag,{size:20,strokeWidth:2}),r="Flags";break;case"frequent":return;default:t=o.jsx(C.IconMoodSmile,{size:20,strokeWidth:2}),r=`Category: ${n.id}`;break}e.push({id:n.id,name:r,icon:t})}}),e},Yo=({onEmojiSelect:e,height:n=200})=>{const[t,r]=p.useState(""),[s,i]=p.useState("people"),[c,u]=p.useState(()=>{if(typeof window<"u"){const m=localStorage.getItem("emoji-frequent");return m?JSON.parse(m):[]}return[]}),[l,f]=p.useState([]),[d,g]=p.useState(!1),h=Zo();p.useEffect(()=>{t.trim()?(g(!0),se.search(t).then(m=>{f(m.map(y=>({id:y.id,native:y.skins[0].native,name:y.name,keywords:y.keywords}))),g(!1)})):f([])},[t]);const I=p.useMemo(()=>{if(t.trim())return l;if(s==="frequent")return c.map(y=>({id:y,native:y,name:"",keywords:[]}));const m=je.categories.find(y=>y.id===s);return m?m.emojis.map(y=>{const w=je.emojis[y];return{id:w.id,native:w.skins[0].native,name:w.name,keywords:w.keywords}}):[]},[t,s,c,l]),v=m=>{e(m),u(y=>{const w=y.filter(_=>_!==m),S=[m,...w].slice(0,20);return typeof window<"u"&&localStorage.setItem("emoji-frequent",JSON.stringify(S)),S})},x=m=>{if(t.trim())return"Results";const y=h.find(w=>w.id===m);return y?y.name:m.charAt(0).toUpperCase()+m.slice(1)};return o.jsxs(a.Stack,{gap:0,style:{height:n,width:"100%"},children:[o.jsx(a.Box,{p:"sm",pb:"xs",children:o.jsxs(a.Stack,{gap:"xs",children:[o.jsx(a.TextInput,{placeholder:"Search emojis...",value:t,onChange:m=>r(m.target.value),leftSection:o.jsx(C.IconSearch,{size:16,strokeWidth:2.5}),fw:500,size:"sm",radius:"md",styles:{input:{backgroundColor:"var(--mantine-color-gray-0)",color:"var(--mantine-color-gray-9)"}}}),o.jsx(a.Text,{size:"sm",c:"var(--mantine-color-gray-6)",ta:"left",fw:500,children:x(s)})]})}),o.jsx(a.Box,{style:{flex:1,overflow:"hidden"},children:o.jsx(a.ScrollArea,{h:"100%",type:"hover",offsetScrollbars:!1,children:o.jsx(a.Box,{style:{display:"grid",gridTemplateColumns:"repeat(9, 1fr)",gap:"0px",padding:"0px 12px 12px 12px"},children:d?o.jsx(a.Text,{size:"sm",c:"dimmed",ta:"center",py:"xl",style:{gridColumn:"1 / -1"},children:"Searching..."}):I.length>0?I.map(m=>o.jsx(a.Tooltip,{label:m.name||m.id,position:"top",withArrow:!0,openDelay:300,withinPortal:!0,zIndex:1e3,color:"dark",children:o.jsx(a.Button,{variant:"subtle",size:"sm",p:0,onClick:()=>v(m.native),style:{width:"40px",height:"40px",fontSize:"22px",border:"none",backgroundColor:"transparent",borderRadius:"var(--mantine-radius-md)",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:y=>{y.currentTarget.style.backgroundColor="var(--mantine-color-gray-1)"},onMouseLeave:y=>{y.currentTarget.style.backgroundColor="transparent"},children:m.native})},m.id)):o.jsx(a.Text,{size:"sm",c:"dimmed",ta:"center",py:"xl",style:{gridColumn:"1 / -1"},children:"No emojis found"})})})}),o.jsx(a.Box,{px:"sm",py:"xs",style:{borderTop:"1px solid var(--mantine-color-gray-3)"},children:o.jsx(a.Flex,{gap:"0px",justify:"center",wrap:"wrap",children:h.map(m=>o.jsx(a.Tooltip,{label:m.name,position:"top",withArrow:!0,openDelay:500,withinPortal:!0,zIndex:1e3,color:"dark",children:o.jsx(a.Box,{onClick:()=>{i(m.id),r("")},style:{width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--mantine-radius-md)",cursor:"pointer","&:hover":{backgroundColor:"var(--mantine-color-gray-0)"},backgroundColor:s===m.id?"var(--mantine-color-gray-0)":"transparent",color:s===m.id?"var(--mantine-color-blue-6)":"var(--mantine-color-gray-6)",transition:"all 0.1s ease"},onMouseEnter:y=>{y.currentTarget.style.backgroundColor="var(--mantine-color-gray-1)"},onMouseLeave:y=>{y.currentTarget.style.backgroundColor="transparent"},children:m.icon})},m.id))})})]})},ct=["IconUser","IconUserCircle","IconUserCheck","IconUserX","IconUserPlus","IconUserMinus","IconUserEdit","IconUserCog","IconUserShield","IconUserStar","IconUserSearch","IconUserQuestion","IconUserOff","IconUsers","IconUserBolt","IconUserCode","IconUserDollar","IconUserExclamation","IconUserFilled","IconUserHexagon","IconUserKey","IconUserPause","IconUserPin","IconUserPlay","IconUserScan","IconUserShare","IconUserSquare","IconUserUp","IconUserVoice","IconUserWrench"],lt=["IconBriefcase","IconBuilding","IconBuildingStore","IconBuildingBank","IconBuildingWarehouse","IconBuildingSkyscraper","IconBuildingBridge","IconBuildingCar","IconBuildingFactory","IconBuildingHospital","IconBuildingMonument","IconBuildingPavilon","IconBuildingTunnel","IconBuildingWindmill","IconChartBar","IconChartLine","IconChartPie","IconChartDots","IconChartArea","IconChartArcs","IconChartCandle","IconChartDonut","IconChartRadar","IconTrendingUp","IconTrendingDown","IconTarget","IconFlag","IconTrophy","IconAward","IconMedal","IconCertificate","IconBadge","IconCrown","IconStar","IconStarFilled","IconStarHalf","IconStarOff","IconFileText","IconFile","IconFileAlert","IconFileAnalytics","IconFileBarcode","IconFileBroken","IconFileCertificate","IconFileChart","IconFileCheck","IconFileCode","IconFileDatabase","IconFileDollar","IconFileDownload","IconFileEuro","IconFileExport","IconFileFunction","IconFileImport","IconFileInfo","IconFileInvoice","IconFileLambda","IconFileLike","IconFileMinus","IconFileMusic","IconFileOff","IconFilePencil","IconFilePhone","IconFilePlus","IconFileReport","IconFileRss","IconFileScissors","IconFileSearch","IconFileSettings","IconFileShredder","IconFileSignal","IconFileSpreadsheet","IconFileStar","IconFileSymlink","IconFileTime","IconFileType","IconFileTypography","IconFileUnknown","IconFileUpload","IconFileVector","IconFileX","IconFileZip","IconFolder","IconFolderOpen","IconFolderPlus","IconFolderMinus","IconFolderX","IconFolderCheck","IconFolderCog","IconFolderDown","IconFolderHeart","IconFolderOff","IconFolderPause","IconFolderPin","IconFolderQuestion","IconFolderSearch","IconFolderShare","IconFolderStar","IconFolderUp","IconFolderWrench","IconArchive","IconArchiveOff","IconBox","IconBoxMultiple","IconBoxOff","IconBoxPadding","IconBoxSeam","IconBriefcaseOff","IconClipboard","IconClipboardCheck","IconClipboardCopy","IconClipboardData","IconClipboardHeart","IconClipboardList","IconClipboardOff","IconClipboardPaste","IconClipboardText","IconClipboardTypography","IconClipboardX","IconCopy","IconCut","IconPaste","IconDuplicate","IconEdit","IconEditCircle","IconEditCircleOff"],dt=["IconDeviceDesktop","IconDeviceLaptop","IconDeviceMobile","IconDeviceTablet","IconDeviceWatch","IconDeviceTv","IconDeviceGamepad","IconDeviceAirpods","IconDeviceImac","IconDeviceIpad","IconDeviceIphone","IconDeviceMacbook","IconDeviceNintendo","IconDevicePlaystation","IconDeviceXbox","IconCode","IconTerminal","IconDatabase","IconServer","IconWifi","IconBluetooth","IconCpu","IconKeyboard","IconMouse","IconCamera","IconVideo","IconMicrophone","IconSpeaker","IconHeadphones","IconPrinter","IconScanner","IconRouter","IconModem","IconAntenna","IconSatellite","IconRadar","IconRadar2","IconBroadcast","IconBroadcastOff","IconRadio","IconRadioactive","IconRadioactiveOff","IconSignal","IconSignal4G","IconSignal5G","IconSignalOff","IconBattery","IconBattery1","IconBattery2","IconBattery3","IconBattery4","IconBatteryOff","IconBatteryCharging","IconBatteryAutomotive","IconBatteryEco","IconBatteryFilled","IconPlug","IconPlugConnected","IconPlugConnectedX","IconPlugOff","IconPlugX","IconPower","IconPowerOff","IconOutlet","IconCable","IconCableOff","IconCircuitAmmeter","IconCircuitBattery","IconCircuitBulb","IconCircuitCapacitor","IconCircuitCell","IconCircuitCellPlus","IconCircuitChangeover","IconCircuitDiode","IconCircuitDiodeZener","IconCircuitGround","IconCircuitGroundDigital","IconCircuitInductor","IconCircuitMotor","IconCircuitPushbutton","IconCircuitResistor","IconCircuitSwitchClosed","IconCircuitSwitchOpen","IconCircuitVoltmeter","IconCpu2","IconCpuOff","IconMemory","IconMemoryCard","IconMemoryStick","IconHardDrive","IconHardDrive2","IconDisk","IconDiskOff","IconCd","IconCdOff","IconDvd","IconDvdOff","IconFloppyDisk","IconFloppyDiskOff","IconUsb","IconUsbOff","IconSdCard","IconSdCardOff","IconCloud","IconCloudComputing","IconCloudDataConnection","IconCloudDownload","IconCloudLock","IconCloudOff","IconCloudRain","IconCloudSnow","IconCloudStorm","IconCloudUpload","IconCloudCheck","IconCloudCode","IconCloudCog","IconCloudDollar","IconCloudDown","IconCloudExclamation","IconCloudHeart","IconCloudMinus","IconCloudPause","IconCloudPin","IconCloudPlus","IconCloudQuestion","IconCloudSearch","IconCloudShare","IconCloudStar","IconCloudUp","IconCloudX"],ut=["IconMoodSmile","IconMoodHappy","IconMoodWink","IconMoodSad","IconMoodConfused","IconMoodAnnoyed","IconMoodAngry","IconMoodCry","IconMoodTongue","IconMoodKiss","IconMoodHeart","IconMoodLove","IconMoodEmpty","IconMoodNervous","IconMoodSuprised","IconMoodSilence","IconMoodSick","IconMoodTongueWink","IconMoodTongueWink2","IconMoodWink2","IconHeart","IconHeartFilled","IconHeartBroken","IconHeartHandshake","IconHeartMinus","IconHeartOff","IconHeartPlus","IconHeartRateMonitor","IconThumbUp","IconThumbDown","IconSmile","IconFrown","IconMeh","IconLaugh","IconWink","IconKiss","IconTongue","IconGrin","IconSmirk"],ft=["IconTrees","IconLeaf","IconFlower","IconPlant","IconSun","IconMoon","IconStar","IconCloud","IconCloudRain","IconCloudSnow","IconSnowflake","IconDroplet","IconFlame","IconMountain","IconTree","IconPineTree","IconBug","IconButterfly","IconFish","IconBird","IconCat","IconDog","IconRabbit","IconPaw","IconPawprint","IconFeather","IconSeeding","IconSeedingOff","IconPlant2","IconPlantOff","IconLeafOff","IconFlower2","IconFlowerOff","IconTreesOff","IconTreeOff","IconPineTreeOff","IconPalmTree","IconPalmTreeOff","IconSunOff","IconSunHigh","IconSunLow","IconMoonOff","IconMoonStars","IconMoon2","IconMoonFilled","IconStars","IconStarsOff","IconStarFilled","IconStarHalf","IconStarOff","IconCloudOff","IconCloudStorm","IconCloudFog","IconCloudWind","IconSnowflakeOff","IconDropletOff","IconDropletFilled","IconDropletHalf","IconDropletHalf2","IconDropletHalfFilled","IconFlameOff","IconFire","IconFireExtinguisher","IconMountainOff","IconMountain2","IconHills","IconHillsOff","IconValley","IconValleyOff","IconBugOff","IconButterflyOff","IconBee","IconBeeOff","IconSpider","IconSpiderOff","IconAnt","IconAntOff","IconLadybug","IconLadybugOff","IconGrasshopper","IconGrasshopperOff","IconCricket","IconCricketOff","IconFishOff","IconFishBone","IconFishBoneOff","IconShark","IconSharkOff","IconWhale","IconWhaleOff","IconDolphin","IconDolphinOff","IconOctopus","IconOctopusOff","IconSeahorse","IconSeahorseOff","IconBirdOff","IconEagle","IconEagleOff","IconOwl","IconOwlOff","IconParrot","IconParrotOff","IconPeacock","IconPeacockOff","IconPenguin","IconPenguinOff","IconSwan","IconSwanOff","IconCatOff","IconDogOff","IconRabbitOff","IconFeatherOff","IconWing","IconWingOff","IconEgg","IconEggOff","IconEggCracked","IconEggCrackedOff","IconEggFilled","IconEggFilledOff","IconEggFried","IconEggFriedOff","IconNest","IconNestOff","IconNestEggs","IconNestEggsOff"],ht=["IconCircle","IconSquare","IconTriangle","IconDiamond","IconHexagon","IconPentagon","IconOctagon","IconCross","IconPlus","IconMinus","IconCheck","IconX","IconArrowUp","IconArrowDown","IconArrowLeft","IconArrowRight","IconArrowUpLeft","IconArrowUpRight","IconArrowDownLeft","IconArrowDownRight","IconArrowLeftUp","IconArrowLeftDown","IconArrowRightUp","IconArrowRightDown","IconPlay","IconPause","IconStop","IconRecord","IconSkipBack","IconSkipForward","IconRewind","IconFastForward","IconCircleDot","IconCircleFilled","IconCircleHalf","IconCircleHalf2","IconCircleHalfFilled","IconCircleOff","IconCircleX","IconSquareDot","IconSquareFilled","IconSquareHalf","IconSquareHalfFilled","IconSquareOff","IconSquareRounded","IconSquareRoundedDot","IconSquareRoundedFilled","IconSquareRoundedHalf","IconSquareRoundedHalfFilled","IconSquareRoundedOff","IconSquareRoundedX","IconSquareX","IconTriangleFilled","IconTriangleInverted","IconTriangleInvertedFilled","IconTriangleOff","IconTriangleSquare","IconTriangleSquareCircle","IconDiamondFilled","IconDiamondOff","IconHexagonFilled","IconHexagonOff","IconPentagonFilled","IconPentagonOff","IconOctagonFilled","IconOctagonOff","IconCrossOff","IconPlusMinus","IconMinusMinus","IconCheckbox","IconCheckboxOff","IconChecks","IconXbox","IconXboxOff","IconYinYang","IconYinYangOff","IconYoga","IconYogaOff","IconZodiac","IconZodiacOff","IconZoom","IconZoomCancel","IconZoomCode","IconZoomExclamation","IconZoomFilled","IconZoomIn","IconZoomInArea","IconZoomInAreaFilled","IconZoomInFilled","IconZoomMoney","IconZoomPan","IconZoomQuestion","IconZoomReplace","IconZoomReset","IconZoomScan","IconZoomScanFilled","IconZoomX"],pt=["IconEdit","IconDelete","IconSave","IconOpen","IconClose","IconAdd","IconRemove","IconSearch","IconFilter","IconSort","IconRefresh","IconReload","IconUndo","IconRedo","IconCut","IconCopy","IconPaste","IconDuplicate","IconMove","IconRotate","IconFlip","IconResize","IconScale","IconCrop","IconTransform","IconWrench","IconHammer","IconScrewdriver","IconTool","IconTools","IconSaw","IconDrill","IconDrillOff","IconAxe","IconAxeOff","IconPickaxe","IconPickaxeOff","IconShovel","IconShovelOff","IconRake","IconRakeOff","IconHoe","IconHoeOff","IconScythe","IconScytheOff","IconPitchfork","IconPitchforkOff","IconFork","IconForkOff","IconKnife","IconKnifeOff","IconSword","IconSwordOff","IconDagger","IconDaggerOff","IconSpear","IconSpearOff","IconBow","IconBowOff","IconArrow","IconArrowOff","IconCrossbow","IconCrossbowOff","IconGun","IconGunOff","IconPistol","IconPistolOff","IconRifle","IconRifleOff","IconShotgun","IconShotgunOff","IconBomb","IconBombOff","IconGrenade","IconGrenadeOff","IconDynamite","IconDynamiteOff","IconMine","IconMineOff","IconTorpedo","IconTorpedoOff","IconMissile","IconMissileOff","IconRocket","IconRocketOff","IconBazooka","IconBazookaOff","IconCannon","IconCannonOff","IconTank","IconTankOff","IconHelicopter","IconHelicopterOff","IconPlane","IconPlaneOff","IconJet","IconJetOff","IconSatellite","IconSatelliteOff","IconSpace","IconSpaceOff","IconGalaxy","IconGalaxyOff","IconPlanet","IconPlanetOff","IconEarth","IconEarthOff","IconMoon","IconMoonOff","IconSun","IconSunOff","IconStar","IconStarOff","IconAsteroid","IconAsteroidOff","IconComet","IconCometOff","IconMeteor","IconMeteorOff","IconUfo","IconUfoOff","IconAlien","IconAlienOff","IconRobot","IconRobotOff","IconAndroid","IconAndroidOff","IconIos","IconIosOff","IconWindows","IconWindowsOff","IconLinux","IconLinuxOff","IconMac","IconMacOff","IconUbuntu","IconUbuntuOff","IconDebian","IconDebianOff","IconRedhat","IconRedhatOff","IconCentos","IconCentosOff","IconFedora","IconFedoraOff","IconSuse","IconSuseOff","IconArch","IconArchOff","IconGentoo","IconGentooOff","IconSlackware","IconSlackwareOff","IconMint","IconMintOff","IconKali","IconKaliOff","IconParrot","IconParrotOff","IconBacktrack","IconBacktrackOff","IconBlackarch","IconBlackarchOff","IconPentoo","IconPentooOff","IconMatriux","IconMatriuxOff","IconNodezero","IconNodezeroOff","IconBugtraq","IconBugtraqOff","IconCyborg","IconCyborgOff","IconDefensive","IconDefensiveOff","IconDracos","IconDracosOff","IconFembuntu","IconFembuntuOff","IconGnacktrack","IconGnacktrackOff","IconHackintosh","IconHackintoshOff","IconHak5","IconHak5Off","IconHavij","IconHavijOff","IconJackal","IconJackalOff","IconKnoppix","IconKnoppixOff","IconKodachi","IconKodachiOff","IconLion","IconLionOff","IconMandriva","IconMandrivaOff","IconMobily","IconMobilyOff","IconMuslim","IconMuslimOff","IconNetrunner","IconNetrunnerOff","IconPardus","IconPardusOff","IconQubes","IconQubesOff","IconSabayon","IconSabayonOff","IconScientific","IconScientificOff","IconSemplice","IconSempliceOff","IconSiduction","IconSiductionOff","IconSlax","IconSlaxOff","IconSli","IconSliOff","IconTails","IconTailsOff","IconVector","IconVectorOff","IconVoid","IconVoidOff","IconWhonix","IconWhonixOff","IconZorin","IconZorinOff","IconAlpine","IconAlpineOff","IconElementary","IconElementaryOff","IconManjaro","IconManjaroOff","IconOpenbsd","IconOpenbsdOff","IconOpenSuse","IconOpenSuseOff","IconPop","IconPopOff","IconSolus","IconSolusOff"],gt=["IconMessage","IconMessageCircle","IconMessageDots","IconMessagePlus","IconMessageReport","IconMessageShare","IconMessageText","IconMessages","IconMessagesOff","IconMail","IconMailOpened","IconMailFast","IconMailOff","IconMailPause","IconMailPin","IconMailPlus","IconMailQuestion","IconMailSearch","IconMailShare","IconMailStar","IconMailUp","IconMailX","IconPhone","IconPhoneCall","IconPhoneIncoming","IconPhoneOff","IconPhoneOutgoing","IconPhonePause","IconPhonePlus","IconPhoneX","IconVideo","IconVideoOff","IconVideoPlus","IconCamera","IconCameraOff","IconCameraPlus","IconMicrophone","IconMicrophoneOff","IconMicrophone2","IconMicrophone2Off","IconHeadphones","IconHeadphonesOff","IconSpeaker","IconSpeakerOff","IconBroadcast","IconBroadcastOff","IconRadio","IconRadioactive","IconRadioactiveOff","IconAntenna","IconAntennaBars1","IconAntennaBars2","IconAntennaBars3","IconAntennaBars4","IconAntennaBars5","IconAntennaOff","IconSatellite","IconSatelliteOff","IconWifi","IconWifi0","IconWifi1","IconWifi2","IconWifiOff","IconBluetooth","IconBluetoothConnected","IconBluetoothOff","IconBluetoothX","IconShare","IconShareOff","IconShare2","IconShare3","IconAt","IconHash","IconLink","IconLinkOff","IconExternalLink","IconExternalLinkOff","IconSend","IconSendOff","IconSend2","IconReceipt","IconReceiptOff","IconReceipt2","IconReceiptRefund","IconReceiptTax","IconReceiptEuro","IconReceiptDollar","IconReceiptPound","IconReceiptYen","IconReceiptYuan","IconReceiptWon","IconReceiptRupee","IconReceiptBaht","IconReceiptLira","IconReceiptRuble","IconReceiptShekel","IconReceiptTaka","IconReceiptHryvnia","IconReceiptKrone","IconReceiptKrona","IconReceiptZloty","IconReceiptForint","IconReceiptLeu","IconReceiptLev","IconReceiptKuna","IconReceiptDinar","IconReceiptDirham","IconReceiptRial","IconReceiptRiyal","IconReceiptAfghani","IconReceiptAriary","IconReceiptCedi","IconReceiptDalasi","IconReceiptFranc","IconReceiptGourde","IconReceiptKina","IconReceiptKip","IconReceiptKwacha","IconReceiptKwanza","IconReceiptLari","IconReceiptLek","IconReceiptLilangeni","IconReceiptLoti","IconReceiptManat","IconReceiptMetical","IconReceiptNaira","IconReceiptPeso","IconReceiptPula","IconReceiptRand","IconReceiptRupiah","IconReceiptShilling","IconReceiptSom","IconReceiptSomoni","IconReceiptTenge","IconReceiptVatu","IconReceiptWon","IconReceiptXof","IconReceiptYuan","IconReceiptZloty"];[...ct,...lt,...dt,...ut,...ft,...ht,...pt,...gt];const pe=[{id:"recent",name:"Recently Used",icons:[],isDynamic:!0},{id:"user",name:"User & Profile",icons:ct},{id:"business",name:"Business & Work",icons:lt},{id:"tech",name:"Technology",icons:dt},{id:"expressions",name:"Expressions",icons:ut},{id:"nature",name:"Nature & Animals",icons:ft},{id:"shapes",name:"Shapes & Symbols",icons:ht},{id:"actions",name:"Actions & Tools",icons:pt},{id:"communication",name:"Communication",icons:gt}],Xo={recent:o.jsx(C.IconClock,{size:20,strokeWidth:2.5}),user:o.jsx(C.IconUser,{size:20,strokeWidth:2.5}),business:o.jsx(C.IconBriefcase,{size:20,strokeWidth:2.5}),tech:o.jsx(C.IconDeviceDesktop,{size:20,strokeWidth:2.5}),expressions:o.jsx(C.IconMoodSmile,{size:20,strokeWidth:2.5}),nature:o.jsx(C.IconTrees,{size:20,strokeWidth:2.5}),shapes:o.jsx(C.IconCircle,{size:20,strokeWidth:2.5}),actions:o.jsx(C.IconTool,{size:20,strokeWidth:2.5}),communication:o.jsx(C.IconMessage,{size:20,strokeWidth:2.5})},Ko=({selectedCategory:e,onCategoryChange:n})=>o.jsx(a.Flex,{gap:"0px",justify:"center",wrap:"wrap",children:pe.map(t=>{const r=Xo[t.id];return o.jsx(a.Tooltip,{label:t.name,position:"top",withArrow:!0,openDelay:500,withinPortal:!0,zIndex:1e3,color:"dark",children:o.jsx(a.Box,{onClick:()=>n(t.id),style:{width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--mantine-radius-md)",cursor:"pointer",backgroundColor:e===t.id?"var(--mantine-color-gray-0)":"transparent",color:e===t.id?"var(--mantine-color-blue-6)":"var(--mantine-color-gray-6)",transition:"all 0.2s ease"},onMouseEnter:s=>{s.currentTarget.style.backgroundColor="var(--mantine-color-gray-1)"},onMouseLeave:s=>{s.currentTarget.style.backgroundColor=e===t.id?"var(--mantine-color-gray-0)":"transparent"},children:r})},t.id)})}),mt=p.memo(({onIconSelect:e,height:n=358})=>{var m,y;const[t,r]=p.useState(""),[s,i]=p.useState("recent"),[c,u]=p.useState(!1),[l,f]=p.useState([]);p.useLayoutEffect(()=>{if(typeof window<"u"){const w=localStorage.getItem("avatar-icon-recent");if(w)try{f(JSON.parse(w))}catch(S){console.warn("Error parsing recent icons from localStorage:",S)}}},[]);const d=p.useMemo(()=>pe.filter(w=>w.id!=="recent"&&!("isDynamic"in w)).flatMap(w=>w.icons),[]),g=p.useMemo(()=>{if(s==="recent"){const S=new Set(d);return l.filter(_=>S.has(_))}const w=pe.find(S=>S.id===s);return(w==null?void 0:w.icons)||[]},[s,l,d]),h=p.useCallback((w,S)=>{if(!w.trim())return S;const _=w.toLowerCase().trim(),$=_.split(/\s+/);return S.filter(D=>{const k=D.replace(/^Icon/,"").split(/(?=[A-Z])/).map(R=>R.toLowerCase().trim()).filter(R=>R.length>0);return!!(k.some(R=>$.some(L=>R===L))||_.length>2&&k.some(R=>$.some(L=>R.startsWith(L)))||_.length<=2&&k.some(R=>$.some(L=>R.includes(L)))||$.length>1&&$.every(R=>k.some(L=>L===R||L.startsWith(R))))})},[]),I=p.useMemo(()=>t.trim()?h(t,d):g,[t,g,d,h]),v=p.useCallback(w=>{d.includes(w)&&f(_=>{const $=[w,..._.filter(D=>D!==w)].slice(0,20);return typeof window<"u"&&localStorage.setItem("avatar-icon-recent",JSON.stringify($)),$}),e(w)},[e,d]),x=p.useCallback(w=>{s!==w&&(r(""),i(w),requestAnimationFrame(()=>{u(!0),setTimeout(()=>u(!1),100)}))},[s]);return o.jsxs(a.Stack,{gap:0,style:{height:n,width:"100%"},children:[o.jsx(a.Box,{p:"sm",pb:"xs",children:o.jsxs(a.Stack,{gap:"xs",children:[o.jsx(a.TextInput,{placeholder:t.trim()?"Search all icons...":`Search in ${(m=pe.find(w=>w.id===s))==null?void 0:m.name}...`,value:t,onChange:w=>r(w.target.value),leftSection:o.jsx(C.IconSearch,{size:16}),fw:500,size:"sm",radius:"md",styles:{input:{backgroundColor:"var(--mantine-color-gray-0)",color:"var(--mantine-color-gray-9)"}}}),o.jsx(a.Text,{size:"sm",c:"var(--mantine-color-gray-6)",ta:"left",fw:500,children:t.trim()?"Results":(y=pe.find(w=>w.id===s))==null?void 0:y.name})]})}),o.jsx(a.Box,{style:{flex:1,overflow:"hidden"},children:o.jsx(a.ScrollArea,{h:"100%",type:"hover",children:o.jsx(a.Box,{style:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"4px",padding:"0 12px 12px 12px",opacity:c?.7:1,transition:"opacity 0.05s ease"},children:I.map(w=>o.jsx(jn,{iconName:w,onClick:()=>v(w),size:20},t.trim()?`search-${w}`:`${s}-${w}`))},`${s}-${t}`)})}),o.jsx(a.Box,{px:"sm",py:"xs",style:{borderTop:"1px solid var(--mantine-color-gray-3)"},children:o.jsx(Ko,{selectedCategory:s,onCategoryChange:x})})]})});mt.displayName="IconGrid";const Jo=({previewImage:e,fileInputRef:n,selectedEmoji:t,size:r,loading:s,onFileInputClick:i,onImageChange:c,onImageAccept:u,onClearImagePreview:l})=>o.jsx(a.Box,{p:"sm",style:{width:"384px"},children:o.jsxs(a.Stack,{gap:"md",align:"center",children:[e||t?o.jsxs(a.Box,{children:[o.jsx(a.Text,{size:"sm",fw:500,mb:"xs",children:"Preview"}),o.jsx(a.Avatar,{src:e,radius:"md",style:{width:`${ie(r)}px !important`,height:`${ie(r)}px !important`,minWidth:`${ie(r)}px`,minHeight:`${ie(r)}px`,maxWidth:`${ie(r)}px`,maxHeight:`${ie(r)}px`,border:"1px solid var(--mantine-color-gray-4)",objectFit:"cover",boxSizing:"border-box"},children:t})]}):o.jsx(a.Button,{variant:"subtle",bg:"gray.0",styles:{root:{height:"64px"}},leftSection:o.jsx(C.IconPhoto,{size:20}),onClick:i,loading:s,disabled:s,fullWidth:!0,children:"Choose Image"}),e||t?o.jsx(a.Button,{variant:"outline",leftSection:o.jsx(C.IconPhoto,{size:16}),onClick:i,loading:s,disabled:s,fullWidth:!0,children:e||t?"Change Image":"Choose Image"}):null,o.jsx("input",{ref:n,type:"file",accept:"image/jpeg,image/jpg,image/png,image/gif,image/webp",onChange:f=>{var d;return c(((d=f.target.files)==null?void 0:d[0])||null)},style:{display:"none"},disabled:s}),(e||t)&&o.jsxs(a.Group,{gap:"sm",w:"100%",children:[o.jsx(a.Button,{variant:"outline",color:"gray",onClick:l,fullWidth:!0,children:"Back"}),o.jsx(a.Button,{color:"blue",onClick:u,loading:s,disabled:s,fullWidth:!0,children:"Accept"})]}),o.jsx(a.Text,{size:"xs",c:"var(--mantine-color-gray-6)",ta:"center",children:"Supported formats: JPG, PNG, GIF, WebP"})]})}),er=({onEmojiSelect:e})=>o.jsx(Yo,{onEmojiSelect:e,height:358}),nr=({onIconSelect:e})=>o.jsx(mt,{onIconSelect:e,height:358}),tr=({previewImage:e,selectedEmoji:n,size:t,loading:r,onFileInputClick:s,onImageChange:i,onImageAccept:c,onClearImagePreview:u,fileInputRef:l})=>o.jsx(Jo,{previewImage:e,fileInputRef:l,selectedEmoji:n,size:t,loading:r,onFileInputClick:s,onImageChange:i,onImageAccept:c,onClearImagePreview:u}),or=()=>o.jsx(a.Box,{style:{width:400,height:358,display:"flex",alignItems:"center",justifyContent:"center"},children:o.jsxs(a.Stack,{align:"center",gap:"sm",children:[o.jsx(a.Loader,{size:"sm"}),o.jsx(a.Text,{size:"sm",c:"gray.6",children:"Loading avatar options..."})]})}),rr=({opened:e,onOpen:n,onClose:t,avatar:r,onAvatarSelect:s,onRemove:i,onEmojiSelect:c,onImageSelect:u,onIconSelect:l,size:f="lg",loading:d=!1,placeholder:g,showPlaceholder:h=!0,position:I="bottom-start",withinPortal:v=!0,zIndex:x=1e3})=>{const m=p.useRef(null),y=p.useRef(null),w=p.useRef(null),{selectedTab:S,tabHovered:_,previewImage:$,selectedEmoji:D,selectedIcon:z,selectedFile:k,handleTabChange:R,handleTabHover:L,handleImagePreview:T,handleImageAccept:B,handleEmojiSelect:H,handleIconSelect:ee,clearImagePreview:ne,resetState:U}=io({onAvatarSelect:s,onEmojiSelect:c,onImageSelect:u,onIconSelect:l});so({opened:e,onClose:t,popoverRef:y}),p.useEffect(()=>{e||U()},[e,U]);const ce=q=>{console.log("Emoji clicked:",q),H(q),t()},fe=q=>{console.log("Icon clicked:",q),ee(q),t()},he=q=>{q&&T(q)},F=()=>{k?(B(),t()):(D||z)&&t()},le=()=>{m.current&&m.current.click()},j=()=>{ne()},O=()=>{console.log("Avatar removed"),i==null||i(),t()},P=()=>!!r,A=()=>d?o.jsx(_e,{size:f,loading:!0}):o.jsx(ae,{avatar:r,size:f,placeholder:g,showPlaceholder:h,editable:!0,onClick:()=>{!d&&!e&&n()}}),Q=o.jsx(er,{onEmojiSelect:ce}),re=o.jsx(nr,{onIconSelect:fe}),xe=o.jsx(tr,{previewImage:$,selectedEmoji:D,size:f,loading:d,onFileInputClick:le,onImageChange:he,onImageAccept:F,onClearImagePreview:j,fileInputRef:m}),ve=o.jsx(a.Box,{children:o.jsx(ao,{selectedTab:S,tabHovered:_,onTabChange:R,onTabHover:L,onRemove:O,hasAvatar:P(),children:S==="emoji"?Q:S==="icons"?re:xe})});return o.jsx("div",{style:{position:"relative",display:"inline-block"},children:o.jsxs(a.Popover,{opened:e,onClose:()=>{console.log("Popover onClose called"),t()},position:I,withinPortal:v,withArrow:!0,shadow:"md",radius:"md",closeOnClickOutside:!1,closeOnEscape:!1,offset:8,transitionProps:{transition:"fade",duration:150},children:[o.jsx(a.Popover.Target,{children:o.jsx("div",{ref:w,style:{position:"relative"},children:A()})}),o.jsx(a.Popover.Dropdown,{ref:y,p:0,style:{width:"auto",overflow:"hidden",zIndex:x},children:o.jsx(p.Suspense,{fallback:o.jsx(or,{}),children:ve})})]})})},ir=e=>{if(!e||typeof e!="string")return!1;const n=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return e.length<5||e.length>254?!1:n.test(e.trim())},sr=e=>{const n=[];return e.forEach(t=>{ir(t)||n.push({email:t,error:"Please enter a valid email address"})}),{isValid:n.length===0,errors:n}},ar=e=>{const n=[],t=new Set;return e.forEach(r=>{const s=r.toLowerCase().trim();t.has(s)?n.push({email:r,error:"This email has already been added"}):t.add(s)}),n},cr=e=>{const n=sr(e),t=ar(e),r=[...n.errors,...t];return{isValid:r.length===0,errors:r}},lr=({value:e,onChange:n,onInputChange:t,suggestedUsers:r=[],tagDisplayMap:s={}})=>{const[i,c]=p.useState(""),[u,l]=p.useState([]),f=p.useRef(null),d=e.map(x=>{if(s[x])return s[x];const m=r.find(y=>y.email===x);return m&&m.name?m.name:x});p.useEffect(()=>{t&&t(i)},[i,t]),p.useEffect(()=>{if(e.length>0){const x=cr(e);l(x.errors)}else l([])},[e]),p.useEffect(()=>{const x=f.current;if(!x)return;let m;const y=w=>{const _=w.target.value||"";clearTimeout(m),m=setTimeout(()=>{c(_)},150)};return x.addEventListener("input",y),()=>{x.removeEventListener("input",y),clearTimeout(m)}},[]);const g=p.useCallback(x=>{const m=r.map(w=>({name:w.name||w.email,email:w.email})),y=x.map(w=>{const S=m.find(_=>_.name.toLowerCase()===w.toLowerCase());return S?S.email:w}).filter(w=>w.includes("@")?!0:!m.some(_=>{const $=_.name.toLowerCase(),D=w.toLowerCase();return $.startsWith(D)&&D!==$}));n(y),c("")},[n,r]),h=p.useCallback(()=>{f.current&&(f.current.value="",c(""))},[]),I=u.length===0&&e.length>0,v=p.useCallback((x,m,y)=>{x&&e.length>0&&m&&(x(e,m,y),c(""))},[e]);return{inputText:i,tagsInputRef:f,displayValue:d,validationErrors:u,isValid:I,handleEmailChange:g,clearInput:h,handleInvite:v}},dr=({onInvite:e,onUpdateRole:n,onRemoveUser:t,invitedUsers:r=[],suggestedUsers:s=[],roleOptions:i=[]})=>{const[c,u]=p.useState([]),[l,f]=p.useState([]),[d,g]=p.useState(""),[h,I]=p.useState({}),v=i.length>0?i[0].value:void 0,[x,m]=p.useState(v);p.useEffect(()=>{i.length>0&&!x&&m(i[0].value)},[i.length,x]),p.useEffect(()=>{const T=s.filter(B=>c.includes(B.email)).map(B=>B.id);f(B=>B.filter(H=>T.includes(H)))},[c,s.length]);const[y,w]=p.useState("invite"),[S,_]=p.useState(null),$=(T,B,H)=>{e&&e(T,B,H),u([]),g("")},D=(T,B)=>{n&&n(T,B)},z=T=>{t&&t(T)},k=T=>{f(B=>B.includes(T)?B.filter(H=>H!==T):[...B,T])},R=T=>{c.includes(T.email)||(u([...c,T.email]),I(B=>({...B,[T.email]:T.name||T.email})),l.includes(T.id)||f([...l,T.id]),g(""))},L=d.trim()?s.filter(T=>{var H;const B=d.toLowerCase();return T.email.toLowerCase().includes(B)||((H=T.name)==null?void 0:H.toLowerCase().includes(B))}):[];return{emails:c,setEmails:u,selectedUsers:l,setSelectedUsers:f,inputText:d,setInputText:g,tagDisplayMap:h,setTagDisplayMap:I,selectedRole:x,setSelectedRole:m,selectedTab:y,setSelectedTab:w,tabHovered:S,setTabHovered:_,filteredUsers:L,handleInvite:$,handleUpdateRole:D,handleRemoveUser:z,handleToggleUser:k,handleAddSuggestedUser:R}},ur=p.forwardRef(({value:e,onChange:n,placeholder:t="Add one or more emails",onInvite:r,roleOptions:s=[],selectedRole:i,onRoleChange:c,onInputChange:u,suggestedUsers:l=[],tagDisplayMap:f={}},d)=>{const[g,h]=p.useState("Hello, I would like to invite you to join my workspace"),{tagsInputRef:I,displayValue:v,validationErrors:x,isValid:m,handleEmailChange:y,clearInput:w,handleInvite:S}=lr({value:e,onChange:n,onInputChange:u,suggestedUsers:l,tagDisplayMap:f}),_=()=>{S(r,i,g),h("")};p.useImperativeHandle(d,()=>({clearInput:w}),[w]);const $=v.length>0,D=c&&s.length>0,z=x.length>0;return o.jsxs(a.Stack,{gap:"md",children:[o.jsxs(a.Box,{children:[o.jsx(a.Box,{style:{maxHeight:"120px",overflowY:"auto",overflowX:"hidden",paddingRight:"8px",marginRight:"-8px"},children:o.jsx(a.TagsInput,{ref:I,value:v,onChange:y,placeholder:$?"":t,radius:"md",rightSection:D?o.jsx(a.Box,{style:{position:"absolute",right:"8px",top:"17px",transform:"translateY(-50%)",height:"24px",display:"flex",alignItems:"center"},children:o.jsx(Te,{value:i||"",onChange:k=>c(k),data:s,placeholder:"Select role",defaultOption:s[s.length-1],disabledOptions:["owner"]})}):null,rightSectionProps:{style:{width:D?"120px":"0px",position:"absolute",height:"32px",right:"8px"}},styles:{input:{paddingRight:D?"130px":"12px",minHeight:"36px",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"4px",borderRadius:"var(--mantine-radius-md)",border:z?"2px solid var(--mantine-color-red-6)":"2px solid var(--mantine-color-blue-7)",backgroundColor:"var(--mantine-color-gray-0)"},pillsList:{height:"24px !important",borderRadius:"var(--mantine-radius-md) !important"},pill:{height:"24px !important",borderRadius:"var(--mantine-radius-md) !important",backgroundColor:z?"var(--mantine-color-red-1) !important":"var(--mantine-color-orange-1) !important",color:z?"var(--mantine-color-red-7) !important":"var(--mantine-color-gray-7) !important",fontSize:"var(--mantine-font-size-sm)"}}})}),z&&o.jsx(a.Stack,{gap:"xs",mt:"xs",children:x.map((k,R)=>o.jsxs(a.Text,{size:"xs",c:"red",children:[k.email,": ",k.error]},R))})]}),$&&o.jsxs(a.Stack,{gap:"sm",children:[o.jsx(a.Textarea,{size:"sm",value:g,onChange:k=>h(k.currentTarget.value),minRows:2,maxRows:4,radius:"md"}),o.jsx(a.Button,{variant:"filled",color:"blue",onClick:_,fullWidth:!0,radius:"md",disabled:!m,children:"Send invitations"})]})]})}),fr=e=>{switch(e){case"member":return"green";case"invited":return"orange";case"declined":return"red";case"revoked":return"red";case"expired":return"red";default:return"gray"}},hr=e=>{switch(e){case"member":return"Member";case"invited":return"Invited";case"declined":return"Declined";case"revoked":return"Revoked";case"expired":return"Expired";default:return"Unknown"}},pr=e=>{if(e){if(typeof e=="object"&&"type"in e)return e;if(typeof e=="string")return{type:"image",value:e}}},qe=({user:e,isSelected:n=!1,onToggle:t,onUpdateRole:r,onRemoveUser:s,roleOptions:i=[],variant:c="invited",onClick:u})=>{var m;const l=((m=e.name)==null?void 0:m.trim())||e.email,f=()=>{t&&t(e.id)},d=y=>{if(r){const w=y;r(e.id,w)}},g=c==="suggested"||c==="read-only",h=c==="invited"&&i.length>0,[I,v]=p.useState(!1),x=()=>{u==null||u()};return o.jsxs(a.Group,{justify:"space-between",align:"center",wrap:"nowrap",w:"100%",style:{cursor:"pointer",borderRadius:"var(--mantine-radius-md)",padding:"6px"},onClick:x,bg:I?"var(--mantine-color-gray-0)":"transparent",onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),children:[o.jsxs(a.Group,{gap:"sm",w:"100%",align:"flex-start",wrap:"nowrap",children:[o.jsx(ae,{avatar:pr(e.avatar),size:"md",placeholder:l,showPlaceholder:!0}),o.jsxs(a.Stack,{gap:0,w:"100%",justify:"flex-start",align:"flex-start",children:[o.jsxs(a.Group,{gap:"sm",align:"flex-start",wrap:"nowrap",children:[o.jsxs(a.Group,{gap:"sm",align:"flex-start",wrap:"nowrap",children:[o.jsx(a.Text,{size:"sm",fw:500,lineClamp:1,mb:-2,children:l}),e.isCurrentUser&&o.jsx(a.Badge,{size:"xs",variant:"light",color:"gray",radius:"sm",children:"Owner"})]}),e.status!=="member"&&o.jsx(a.Badge,{size:"xs",variant:"light",color:fr(e.status),radius:"sm",children:hr(e.status)})]}),o.jsx(a.Text,{size:"xs",c:"dimmed",lineClamp:1,children:e.email})]})]}),o.jsxs(a.Group,{gap:"sm",align:"center",children:[g&&c!=="read-only"&&o.jsx(a.Radio,{checked:n,onChange:f,size:"sm",onClick:y=>y.stopPropagation(),pr:4}),h&&!e.isCurrentUser&&o.jsx(Te,{value:e.role,onChange:d,data:i,placeholder:"Select role",defaultOption:i.find(y=>y.value===e.role),withRemove:!0,onRemove:()=>s==null?void 0:s(e.id)})]})]})},It=({opened:e,onClose:n,onInvite:t,onUpdateRole:r,onRemoveUser:s,invitedUsers:i=[],children:c,roleOptions:u=[],suggestedUsers:l=[]})=>{const f=p.useRef(null),{emails:d,setEmails:g,selectedUsers:h,inputText:I,setInputText:v,tagDisplayMap:x,selectedRole:m,setSelectedRole:y,selectedTab:w,setSelectedTab:S,tabHovered:_,setTabHovered:$,filteredUsers:D,handleInvite:z,handleUpdateRole:k,handleRemoveUser:R,handleToggleUser:L,handleAddSuggestedUser:T}=dr({onInvite:t,onUpdateRole:r,onRemoveUser:s,invitedUsers:i,suggestedUsers:l,roleOptions:u}),B=U=>{T(U),f.current&&f.current.clearInput()},H=o.jsxs(o.Fragment,{children:[o.jsx(ur,{ref:f,value:d,onChange:g,onInvite:z,roleOptions:u,selectedRole:m,onRoleChange:y,onInputChange:v,suggestedUsers:l,tagDisplayMap:x}),o.jsx(a.Space,{h:"sm"}),o.jsx(a.ScrollArea,{mah:200,type:"auto",style:{overflow:"visible"},children:o.jsx(a.Box,{children:i.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(a.Text,{size:"sm",fw:500,children:"Already members"}),o.jsx(a.Space,{h:"sm"}),o.jsx(a.Stack,{gap:"sm",children:i.map(U=>o.jsx(qe,{user:U,isSelected:h.includes(U.id),onToggle:L,onUpdateRole:k,onRemoveUser:R,roleOptions:u,variant:"invited"},U.id))})]})})}),D.length>0&&o.jsx(a.ScrollArea,{pt:"sm",mah:200,type:"auto",style:{overflow:"visible"},children:o.jsx(a.Box,{children:D.length>0?o.jsxs(o.Fragment,{children:[o.jsxs(a.Text,{size:"sm",fw:500,children:["Suggested ",I.trim()&&`(filtered by "${I}")`]}),o.jsx(a.Space,{h:"sm"}),o.jsx(a.Stack,{gap:"sm",children:D.map(U=>o.jsx(qe,{user:U,isSelected:h.includes(U.id),onToggle:L,onUpdateRole:k,onRemoveUser:R,roleOptions:u,variant:"suggested",onClick:()=>B(U)},U.id))})]}):null})})]}),ee=o.jsx(o.Fragment,{children:o.jsxs(a.Stack,{gap:"md",p:"sm",children:[o.jsxs(a.Stack,{gap:4,align:"center",children:[o.jsx(a.Text,{size:"sm",fw:500,ta:"center",children:"Publish to the web"}),o.jsx(a.Text,{size:"sm",fw:500,color:"var(--mantine-color-gray-6)",ta:"center",children:"Anyone with the link can view this page"})]}),o.jsx(a.Button,{variant:"filled",size:"xs",radius:"md",fw:500,fz:"var(--mantine-font-size-sm)",ta:"center",children:"Publish"})]})}),ne=o.jsx(a.Box,{style:{width:"400px",maxHeight:"600px",overflow:"visible"},children:o.jsx(a.Stack,{gap:"lg",children:o.jsxs(a.Tabs,{color:"black",defaultValue:"invite",styles:{tab:{backgroundColor:"transparent"}},children:[o.jsxs(a.Tabs.List,{px:"var(--mantine-spacing-sm)",pt:"xs",children:[o.jsx(a.Tabs.Tab,{value:"invite",p:0,pb:6,onClick:()=>{S("invite")},onMouseEnter:()=>$("invite"),onMouseLeave:()=>$(null),style:{backgroundColor:"transparent"},children:o.jsx(a.Box,{style:{borderRadius:"var(--mantine-radius-md)",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 8px",border:"none",backgroundColor:_==="invite"?"var(--mantine-color-gray-1)":"transparent",color:w==="invite"?"var(--mantine-color-gray-9)":"var(--mantine-color-gray-6)",cursor:"pointer"},fw:500,fz:"var(--mantine-font-size-sm)",children:"Invite"})}),o.jsx(a.Tabs.Tab,{value:"publish",p:0,pb:6,onClick:()=>{S("publish")},onMouseEnter:()=>$("publish"),onMouseLeave:()=>$(null),style:{backgroundColor:"transparent"},children:o.jsx(a.Box,{style:{height:"24px",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 8px",borderRadius:"var(--mantine-radius-md)",border:"none",backgroundColor:_==="publish"?"var(--mantine-color-gray-1)":"transparent",color:w==="publish"?"var(--mantine-color-gray-9)":"var(--mantine-color-gray-6)",cursor:"pointer"},fw:500,fz:"var(--mantine-font-size-sm)",children:"Publish"})})]}),o.jsx(a.Tabs.Panel,{value:"invite",children:o.jsx(a.Box,{p:"sm",children:H})}),o.jsx(a.Tabs.Panel,{value:"publish",children:o.jsx(a.Box,{p:"sm",children:ee})})]})})});return o.jsx(me,{trigger:c,menuItems:[],opened:e,onClose:n,styles:{dropdown:{padding:"0",borderRadius:"var(--mantine-radius-md)"}},children:ne})},gr=({onInvite:e,onUpdateRole:n,onRemoveUser:t,invitedUsers:r,currentUser:s,roleOptions:i,suggestedUsers:c,label:u="Share"})=>{const[l,f]=p.useState(!1),d=()=>f(!1),g=o.jsx(zn,{label:u,onClick:()=>f(!0),isActive:l});return o.jsx(It,{opened:l,onClose:d,onInvite:e,onUpdateRole:n,onRemoveUser:t,invitedUsers:r,currentUser:s,roleOptions:i,suggestedUsers:c,children:g})},mr=(e,n="es")=>{const t=new Date,r=typeof e=="string"?new Date(e):e,s=Math.floor((t.getTime()-r.getTime())/1e3),i={es:{now:"ahora",seconds:"segundos",second:"segundo",minutes:"minutos",minute:"minuto",hours:"horas",hour:"hora",days:"días",day:"día",weeks:"semanas",week:"semana",months:"meses",month:"mes",years:"años",year:"año",ago:"hace"},en:{now:"now",seconds:"seconds",second:"second",minutes:"minutes",minute:"minute",hours:"hours",hour:"hour",days:"days",day:"day",weeks:"weeks",week:"week",months:"months",month:"month",years:"years",year:"year",ago:"ago"}},c=i[n]||i.en;if(s<5)return c.now;if(s<60)return n==="es"?`${c.ago} ${s} ${s===1?c.second:c.seconds}`:`${s} ${s===1?c.second:c.seconds} ${c.ago}`;const u=Math.floor(s/60);if(u<60)return n==="es"?`${c.ago} ${u} ${u===1?c.minute:c.minutes}`:`${u} ${u===1?c.minute:c.minutes} ${c.ago}`;const l=Math.floor(u/60);if(l<24)return n==="es"?`${c.ago} ${l} ${l===1?c.hour:c.hours}`:`${l} ${l===1?c.hour:c.hours} ${c.ago}`;const f=Math.floor(l/24);if(f<7)return n==="es"?`${c.ago} ${f} ${f===1?c.day:c.days}`:`${f} ${f===1?c.day:c.days} ${c.ago}`;const d=Math.floor(f/7);if(d<4)return n==="es"?`${c.ago} ${d} ${d===1?c.week:c.weeks}`:`${d} ${d===1?c.week:c.weeks} ${c.ago}`;const g=Math.floor(f/30);if(g<12)return n==="es"?`${c.ago} ${g} ${g===1?c.month:c.months}`:`${g} ${g===1?c.month:c.months} ${c.ago}`;const h=Math.floor(f/365);return n==="es"?`${c.ago} ${h} ${h===1?c.year:c.years}`:`${h} ${h===1?c.year:c.years} ${c.ago}`},Ir=(e,n="es")=>{const t=typeof e=="string"?new Date(e):e,r={es:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],en:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},i=(r[n]||r.en)[t.getMonth()],c=t.getDate();return n==="es"?`${c} ${i}`:`${i} ${c}`},xr=e=>{const n=typeof e=="string"?new Date(e):e,t=new Date;return n.toDateString()===t.toDateString()},vr=e=>{const n=typeof e=="string"?new Date(e):e,t=new Date;return t.setDate(t.getDate()-1),n.toDateString()===t.toDateString()},br=(e,n="es")=>xr(e)?n==="es"?"Hoy":"Today":vr(e)?n==="es"?"Ayer":"Yesterday":mr(e,n),yr=({notification:e,message:n,markAsRead:t,archiveNotification:r,children:s,actions:i})=>{var d,g,h,I,v;const c=new Date().getTime()-new Date(e.timestamp).getTime()<6048e5?br(e.timestamp,"en"):Ir(e.timestamp,"en"),[u,l]=p.useState(!1),f=o.jsxs(a.Group,{bg:"var(--mantine-color-gray-1)",p:4,style:{borderRadius:"var(--mantine-radius-md)"},w:"auto",wrap:"nowrap",gap:0,children:[!e.isRead&&o.jsx(W,{onClick:()=>t(e.id),icon:C.IconCheck}),!e.isArchived&&o.jsx(W,{onClick:()=>r(e.id),icon:C.IconArchive})]});return o.jsxs(a.Box,{p:"sm",bg:u?"var(--mantine-color-gray-0)":"white",style:{cursor:"pointer",borderTop:"1px solid var(--mantine-color-gray-2)"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[o.jsxs(a.Group,{justify:"space-between",align:"flex-start",gap:"sm",wrap:"nowrap",style:{margin:0},children:[(d=e.metadata)!=null&&d.avatar_url?o.jsx(a.Avatar,{name:(g=e.metadata)==null?void 0:g.fullname,size:"sm",radius:"md",src:(h=e.metadata)==null?void 0:h.avatar_url}):o.jsx(On,{size:"xs",showText:!1,radius:"xs"}),o.jsxs(a.Stack,{gap:"xs",justify:"flex-start",w:"100%",children:[o.jsx(a.Box,{fz:"sm",m:0,style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",textOverflow:"ellipsis",minHeight:"unset",height:"auto",whiteSpace:"normal",wordBreak:"break-word"},children:n}),o.jsxs(a.Text,{size:"xs",c:"dimmed",fw:500,style:{whiteSpace:"nowrap"},children:[e.category?((I=e.category)==null?void 0:I.charAt(0).toUpperCase())+((v=e.category)==null?void 0:v.slice(1)):""," ","• ",c]})]}),u?f:!e.isRead&&o.jsx(a.Indicator,{color:"var(--mantine-color-blue-6)",size:10,position:"top-end"})]}),s,i&&o.jsx(a.Group,{justify:"flex-start",align:"flex-start",gap:"xs",wrap:"nowrap",pl:36,pt:8,children:i})]})},wr=(e,n,t,r,s)=>{const[i,c]=p.useState(!1),u=p.useRef(null),l=p.useRef(null),f=p.useRef(null);p.useEffect(()=>{c(e)},[e]);const d=p.useCallback(h=>{h[0].isIntersecting&&r&&!s&&t&&t()},[r,s,t]),g=p.useCallback(()=>{if(!(!u.current||!e||!n||!t)){l.current&&(l.current.disconnect(),l.current=null);try{const h=new IntersectionObserver(d,{threshold:.1,rootMargin:"50px"});h.observe(u.current),l.current=h}catch(h){console.error("Failed to setup intersection observer:",h)}}},[e,n,t,d]);return p.useEffect(()=>{if(f.current&&(clearTimeout(f.current),f.current=null),!e||!n||!t){l.current&&(l.current.disconnect(),l.current=null);return}if(!u.current){f.current=setTimeout(()=>g(),50);return}return g(),()=>{f.current&&(clearTimeout(f.current),f.current=null),l.current&&(l.current.disconnect(),l.current=null)}},[e,n,t,g]),p.useEffect(()=>()=>{f.current&&clearTimeout(f.current),l.current&&l.current.disconnect()},[]),{isActive:i,loadMoreRef:u}},kr=({notifications:e,isLoading:n=!1,isLoadingMore:t=!1,hasMore:r=!1,unreadCount:s=0,markAllAsRead:i,archiveAllNotifications:c,markAsRead:u,archiveNotification:l,loadMore:f,onFilterChange:d,currentFilter:g="all",customRenderer:h,opened:I=!1,onOpen:v=()=>{},onClose:x=()=>{},enableInfiniteScroll:m=!0})=>{const y=[{children:"Mark all as read",leftSection:o.jsx(C.IconChecklist,{size:16}),onClick:()=>i()},{children:"Archive all",leftSection:o.jsx(C.IconArchive,{size:16}),onClick:()=>c()}],w=[{children:"All",leftSection:o.jsx(C.IconChecklist,{size:16}),onClick:()=>d==null?void 0:d("all"),active:g==="all"},{children:"Unread",leftSection:o.jsx(C.IconChecklist,{size:16}),onClick:()=>d==null?void 0:d("unread"),active:g==="unread"},{children:"Archived",leftSection:o.jsx(C.IconArchive,{size:16}),onClick:()=>d==null?void 0:d("archived"),active:g==="archived"}],S=D=>h&&D.category&&["welcome","upgrade"].includes(D.category)?h(D,u,l):o.jsx(yr,{notification:D,markAsRead:u,archiveNotification:l,message:D.message,actions:D.actions},D.id),{isActive:_,loadMoreRef:$}=wr(I,m,f||(()=>{}),r,t);return o.jsxs(o.Fragment,{children:[o.jsx(Tn,{isActive:_,icon:o.jsx(C.IconBell,{strokeWidth:2,color:"var(--mantine-color-gray-7)"}),onClick:()=>{I?x():v()},disabled:!1,variant:"subtle",color:"gray",fullWidth:!0,style:{borderRadius:"var(--mantine-radius-md)",cursor:"pointer"},label:"Inbox",indicator:s>0?s>99?"99+":s:void 0}),o.jsxs(a.Drawer,{opened:I,onClose:x,position:"left",size:400,style:{position:"relative",left:300,zIndex:0,borderLeft:"1px solid var(--mantine-color-gray-2)"},withCloseButton:!1,padding:0,withOverlay:!0,closeOnClickOutside:!0,closeOnEscape:!0,overlayProps:{backgroundOpacity:0,blur:0},children:[o.jsx(a.FocusTrap.InitialFocus,{}),o.jsxs(a.Box,{p:0,h:"100%",style:{display:"flex",flexDirection:"column"},children:[o.jsx(a.Box,{style:{position:"sticky",top:0,zIndex:10,backgroundColor:"var(--mantine-color-white)"},children:o.jsxs(a.Group,{justify:"space-between",align:"center",gap:"xs",style:{borderRadius:"var(--mantine-radius-md)"},px:"sm",py:"md",children:[o.jsx(a.Text,{size:"sm",fw:500,children:"Inbox"}),o.jsxs(a.Group,{gap:"xs",children:[o.jsx(me,{position:"bottom-end",menuItems:w,trigger:o.jsx(W,{icon:C.IconFilter})}),o.jsx(me,{position:"bottom-end",menuItems:y,trigger:o.jsx(W,{onClick:()=>{},icon:C.IconDots,changeIconOnHover:!0,iconHovered:C.IconDots})})]})]})}),o.jsxs(a.Box,{style:{flex:1,overflow:"auto"},children:[n&&e.length===0?o.jsx(a.Stack,{gap:0,w:"100%",h:"100%",justify:"center",align:"center",py:"xl",children:o.jsx(a.Loader,{})}):e.length>0?o.jsx(a.Stack,{gap:0,children:e.map(D=>S(D))}):o.jsxs(a.Stack,{gap:0,w:"100%",h:"100%",justify:"center",align:"center",py:"xl",children:[o.jsx(C.IconInbox,{size:24,color:"var(--mantine-color-gray-6)"}),o.jsx(a.Text,{size:"sm",fw:500,c:"dimmed",ta:"center",mt:"sm",children:"No new updates"})]}),o.jsx(a.Box,{ref:$,style:{padding:"16px",display:m?"flex":"none",justifyContent:"center",alignItems:"center",minHeight:"60px"},children:t&&o.jsxs(a.Group,{display:"flex",ta:"center",gap:"xs",children:[o.jsx(a.Loader,{size:"sm",color:"gray.5"}),o.jsx(a.Text,{size:"sm",c:"dimmed",fw:500,children:"Loading more ..."})]})}),t&&!m&&o.jsxs(a.Group,{display:"flex",ta:"center",gap:"xs",children:[o.jsx(a.Loader,{size:"sm",color:"gray.5"}),o.jsx(a.Text,{size:"sm",c:"dimmed",fw:500,children:"Loading more ..."})]}),!m&&r&&f&&o.jsx(a.Button,{color:"var(--mantine-color-gray-3)",variant:"subtle",onClick:f,loading:t,disabled:t,style:{alignSelf:"center"},children:t?"Loading...":"Load More"})]})]})]})]})},Cr=({header:e,body:n,footer:t,withBorder:r=!0,position:s="left",bg:i="var(--mantine-color-gray-0)"})=>{const[c,u]=p.useState(!1),l=()=>{if(!r)return{};const f="var(--mantine-color-gray-3)",d="1px";return s==="left"?{borderRight:`${d} solid ${f}`}:s==="right"?{borderLeft:`${d} solid ${f}`}:{}};return o.jsxs(a.Stack,{gap:"sm",h:"100%",p:"sm",bg:i,style:l(),onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[e&&o.jsx(a.Box,{children:typeof e=="function"?e({hovered:c}):e}),n&&o.jsx(a.Box,{style:{flex:1,minHeight:0,width:"100%",overflow:"hidden"},children:typeof n=="function"?n({hovered:c}):n}),t&&o.jsx(a.Box,{children:typeof t=="function"?t({hovered:c}):t})]})};p.createContext(void 0);const xt=({workspace:e,currentUserId:n,currentWorkspaceId:t,onClick:r})=>{const s=t===e.id,i=n&&e.ownerId===n;return o.jsxs(a.Box,{onClick:r,style:{display:"flex",alignItems:"center",padding:"6px",borderRadius:"var(--mantine-radius-md)",cursor:"pointer",gap:"8px",width:"100%",boxSizing:"border-box"},onMouseEnter:c=>{c.currentTarget.style.backgroundColor="var(--mantine-color-gray-0)"},onMouseLeave:c=>{c.currentTarget.style.backgroundColor="transparent"},children:[o.jsx(ae,{size:"xs",avatar:typeof e.avatar=="string"?{type:"image",value:e.avatar}:e.avatar,placeholder:e.name,showPlaceholder:!0,style:{flexShrink:0}}),o.jsx(a.Text,{size:"sm",fw:500,c:"gray.9",truncate:!0,style:{flex:1,minWidth:0},children:e.name}),o.jsxs(a.Box,{style:{display:"flex",alignItems:"center",gap:"4px",flexShrink:0,paddingLeft:"8px"},children:[s&&o.jsx(C.IconCheck,{size:16,color:"var(--mantine-color-blue-6)"}),i&&o.jsx(a.Badge,{size:"xs",variant:"light",color:"yellow",radius:"sm",children:"Owner"})]})]})},jr="_menuItem_3gic2_1",_r="_workspaceButton_3gic2_14",Sr="_workspaceText_3gic2_24",Mr="_scrollWrapper_3gic2_30",He={menuItem:jr,workspaceButton:_r,workspaceText:Sr,scrollWrapper:Mr},$r=({workspaces:e=[],currentWorkspace:n,currentUserId:t,isLoading:r=!1,error:s=null,onWorkspaceSelect:i,onCreateWorkspace:c,emptyMessage:u="No workspaces found",loadingMessage:l="Loading workspaces...",errorMessage:f="Failed to load workspaces",className:d,onCloseSidebar:g,sidebarHovered:h=!1,children:I,menuItems:v})=>{const[x,m]=p.useState(!1),[y,w]=p.useState(""),S=p.useMemo(()=>y?e.filter(z=>{var k;return z.name.toLowerCase().includes(y.toLowerCase())||((k=z.ownerEmail)==null?void 0:k.toLowerCase().includes(y.toLowerCase()))}):e,[e,y]),_=z=>{i==null||i(z.id),m(!1),w("")};if(r)return o.jsxs(a.Group,{gap:"xs",children:[o.jsx(a.Loader,{size:"sm"}),o.jsx(a.Text,{size:"sm",c:"dimmed",children:l})]});if(s)return o.jsx(a.Alert,{color:"red",title:"Error",children:f});const[$,D]=p.useState(h);return e.length===0&&!r&&!s?o.jsx(a.Box,{children:o.jsx(a.Text,{size:"sm",c:"dimmed",children:u})}):o.jsxs(a.Menu,{opened:x,onOpen:()=>m(!0),onClose:()=>m(!1),position:"bottom-start",styles:{dropdown:{width:"350px",overflow:"hidden"}},withinPortal:!0,children:[o.jsx(a.Menu.Target,{children:o.jsx(a.Box,{w:"100%",onClick:()=>m(!x),style:{padding:"6px",display:"flex",alignItems:"center",borderRadius:"var(--mantine-radius-md)",cursor:"pointer"},className:`${He.workspaceButton} ${d||""}`,bg:$||x?"var(--mantine-color-gray-1)":"transparent",onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:o.jsx(a.Group,{gap:"xs",wrap:"nowrap",style:{width:"100%",overflow:"hidden"},children:n?o.jsxs(o.Fragment,{children:[o.jsx(ae,{size:"xs",avatar:typeof n.avatar=="string"?{type:"image",value:n.avatar}:n.avatar,placeholder:n.name,showPlaceholder:!0,style:{flexShrink:0}}),o.jsx(a.Text,{size:"sm",fw:500,c:"gray.9",truncate:!0,style:{flex:1,minWidth:0},children:n.name}),o.jsxs(a.Group,{gap:4,wrap:"nowrap",style:{flexShrink:0},children:[o.jsx(a.ActionIcon,{radius:"md",size:"md",color:"gray",variant:"subtle",onClick:()=>m(!x),children:o.jsx(C.IconChevronDown,{size:20,strokeWidth:2,color:"var(--mantine-color-gray-7)"})}),($||h)&&o.jsx(W,{icon:C.IconChevronsLeft,size:"md",color:"gray",variant:"subtle",onClick:()=>{g==null||g()}})]})]}):o.jsx(a.Text,{size:"sm",c:"dimmed",children:"Select workspace"})})})}),o.jsx(a.Menu.Dropdown,{style:{borderRadius:"var(--mantine-radius-md)"},p:0,children:o.jsxs(a.Stack,{gap:0,children:[I,o.jsx(a.Menu.Divider,{style:{margin:"1px 0px"}}),o.jsx(a.Stack,{gap:0,px:4,children:S.length===0?o.jsx(a.Menu.Item,{disabled:!0,children:o.jsx(a.Text,{size:"sm",c:"dimmed",children:u})}):o.jsxs(o.Fragment,{children:[o.jsxs(a.Group,{justify:"space-between",align:"center",p:4,children:[o.jsx(a.Text,{size:"xs",c:"dimmed",fw:500,p:4,truncate:!0,children:"Workspaces"}),c&&o.jsx(a.Anchor,{onClick:()=>{c(),m(!1)},size:"xs",underline:"never",fw:500,p:4,truncate:!0,style:{display:"flex",alignItems:"center",gap:"4px"},children:"Add"})]}),o.jsx("div",{className:He.scrollWrapper,children:o.jsx(a.ScrollArea,{mah:150,scrollbarSize:6,scrollHideDelay:0,children:o.jsx(a.Stack,{gap:0,mb:6,children:S.map(z=>o.jsx(a.Box,{onClick:()=>_(z),className:He.menuItem,style:{padding:0,borderRadius:"var(--mantine-radius-md)",cursor:"pointer",overflow:"hidden"},onMouseEnter:k=>{k.currentTarget.style.backgroundColor="var(--mantine-color-gray-1)"},onMouseLeave:k=>{k.currentTarget.style.backgroundColor="transparent"},children:o.jsx(xt,{workspace:z,currentUserId:t,currentWorkspaceId:n==null?void 0:n.id,onClick:()=>_(z)})},z.id))})})})]})}),v&&o.jsx(a.Menu.Divider,{style:{margin:"1px 0px"}}),v&&o.jsx(a.Box,{p:4,children:v==null?void 0:v.map(z=>o.jsx(a.MenuItem,{onClick:z.onClick,leftSection:z.icon,children:z.label,color:z.color,"data-danger":z.color,fw:500,style:{height:"40px",borderRadius:"var(--mantine-radius-md)",padding:"6px"}},z.label))})]})})]})},zr=({opened:e,onClose:n,children:t,...r})=>o.jsxs(a.Modal,{withCloseButton:!1,opened:e,onClose:n,size:"70%",centered:!0,overlayProps:{backgroundOpacity:.55},styles:{content:{minHeight:"100%"}},padding:"md",...r,children:[o.jsxs(a.Group,{justify:"space-between",wrap:"nowrap",children:[o.jsx(a.Group,{justify:"space-between",wrap:"nowrap",gap:"xs",children:o.jsx(W,{icon:C.IconMaximize,size:"md",onClick:()=>{}})}),o.jsxs(a.Group,{justify:"space-between",gap:"xs",children:[o.jsx(W,{icon:C.IconStar,size:"md",onClick:()=>{}}),o.jsx(W,{icon:C.IconDots,size:"md",onClick:()=>{}})]})]}),t]}),Or=({opened:e,onClose:n,content:t,position:r="right",size:s="xl"})=>o.jsxs(a.Drawer,{opened:e,onClose:n,position:r,size:s,padding:"md",withCloseButton:!1,children:[o.jsxs(a.Group,{justify:"space-between",wrap:"nowrap",children:[o.jsxs(a.Group,{justify:"space-between",wrap:"nowrap",gap:"xs",children:[o.jsx(W,{icon:C.IconChevronsRight,size:"md",onClick:n}),o.jsx(W,{icon:C.IconMaximize,size:"md",onClick:()=>{}})]}),o.jsxs(a.Group,{justify:"space-between",gap:"xs",children:[o.jsx(W,{icon:C.IconStar,size:"md",onClick:()=>{}}),o.jsx(W,{icon:C.IconDots,size:"md",onClick:()=>{}})]})]}),t]}),Dr=({children:e})=>o.jsx(a.Box,{style:{minHeight:"100vh",width:"100%",maxWidth:"100%",margin:"0 auto"},id:"full-page",children:e}),vt=a.createTheme({primaryColor:"blue",fontFamily:"Inter, system-ui, Avenir, Helvetica, Arial, sans-serif",fontFamilyMonospace:"Monaco, Courier, monospace",headings:{fontFamily:"Inter, system-ui, Avenir, Helvetica, Arial, sans-serif"},colors:{},components:{}});function Tr({children:e,theme:n}){return o.jsxs(a.MantineProvider,{theme:n||vt,children:[o.jsx($t.Notifications,{}),o.jsx(zt.ModalsProvider,{children:o.jsx(Ot.DatesProvider,{settings:{firstDayOfWeek:0},children:e})})]})}exports.ActionButton=W;exports.AvatarSelector=rr;exports.BoxAvatar=ae;exports.CenterPeek=zr;exports.EmojiAvatar=Cn;exports.ExpandableSearch=Dn;exports.FilterDropdown=Wt;exports.FullPage=Dr;exports.GenericTable=En;exports.IconAvatar=Sn;exports.ImageAvatar=Mn;exports.InvitedUserCard=qe;exports.Logo=On;exports.Menu=me;exports.NavButton=Tn;exports.NavLink=Vt;exports.Navbar=Cr;exports.NotificationSidebar=kr;exports.PlaceholderAvatar=_e;exports.PopoverItem=Rn;exports.PopoverSelector=Te;exports.ShareButton=gr;exports.ShareMenu=It;exports.SidePeek=Or;exports.TextButton=zn;exports.ThemeProvider=Tr;exports.WorkspaceSelector=$r;exports.WorkspaceSelectorItem=xt;exports.getInitialsFromName=$n;exports.theme=vt;