@als-tp/als-react-ts-ui 0.3.0 → 0.4.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 (403) hide show
  1. package/dist/als-react-ts-ui.js +95 -12432
  2. package/dist/als-react-ts-ui10.js +9 -0
  3. package/dist/als-react-ts-ui100.js +142 -0
  4. package/dist/als-react-ts-ui101.js +199 -0
  5. package/dist/als-react-ts-ui102.js +146 -0
  6. package/dist/als-react-ts-ui103.js +31 -0
  7. package/dist/als-react-ts-ui104.js +52 -0
  8. package/dist/als-react-ts-ui105.js +28 -0
  9. package/dist/als-react-ts-ui106.js +27 -0
  10. package/dist/als-react-ts-ui107.js +24 -0
  11. package/dist/als-react-ts-ui108.js +23 -0
  12. package/dist/als-react-ts-ui109.js +311 -0
  13. package/dist/als-react-ts-ui11.js +9 -0
  14. package/dist/als-react-ts-ui110.js +7 -0
  15. package/dist/als-react-ts-ui111.js +7 -0
  16. package/dist/als-react-ts-ui112.js +7 -0
  17. package/dist/als-react-ts-ui113.js +26 -0
  18. package/dist/als-react-ts-ui114.js +25 -0
  19. package/dist/als-react-ts-ui115.js +172 -0
  20. package/dist/als-react-ts-ui116.js +305 -0
  21. package/dist/als-react-ts-ui117.js +37 -0
  22. package/dist/als-react-ts-ui118.js +40 -0
  23. package/dist/als-react-ts-ui119.js +40 -0
  24. package/dist/als-react-ts-ui12.js +9 -0
  25. package/dist/als-react-ts-ui120.js +34 -0
  26. package/dist/als-react-ts-ui121.js +41 -0
  27. package/dist/als-react-ts-ui122.js +61 -0
  28. package/dist/als-react-ts-ui123.js +5 -0
  29. package/dist/als-react-ts-ui124.js +181 -0
  30. package/dist/als-react-ts-ui125.js +7 -0
  31. package/dist/als-react-ts-ui126.js +7 -0
  32. package/dist/als-react-ts-ui127.js +7 -0
  33. package/dist/als-react-ts-ui128.js +7 -0
  34. package/dist/als-react-ts-ui129.js +85 -0
  35. package/dist/als-react-ts-ui13.js +127 -0
  36. package/dist/als-react-ts-ui130.js +35 -0
  37. package/dist/als-react-ts-ui131.js +9 -0
  38. package/dist/als-react-ts-ui132.js +9 -0
  39. package/dist/als-react-ts-ui133.js +206 -0
  40. package/dist/als-react-ts-ui134.js +127 -0
  41. package/dist/als-react-ts-ui135.js +20 -0
  42. package/dist/als-react-ts-ui136.js +85 -0
  43. package/dist/als-react-ts-ui137.js +37 -0
  44. package/dist/als-react-ts-ui138.js +101 -0
  45. package/dist/als-react-ts-ui139.js +68 -0
  46. package/dist/als-react-ts-ui14.js +9 -0
  47. package/dist/als-react-ts-ui140.js +39 -0
  48. package/dist/als-react-ts-ui141.js +21 -0
  49. package/dist/als-react-ts-ui142.js +26 -0
  50. package/dist/als-react-ts-ui143.js +65 -0
  51. package/dist/als-react-ts-ui144.js +24 -0
  52. package/dist/als-react-ts-ui145.js +112 -0
  53. package/dist/als-react-ts-ui146.js +34 -0
  54. package/dist/als-react-ts-ui147.js +27 -0
  55. package/dist/als-react-ts-ui148.js +44 -0
  56. package/dist/als-react-ts-ui149.js +17 -0
  57. package/dist/als-react-ts-ui15.js +9 -0
  58. package/dist/als-react-ts-ui150.js +24 -0
  59. package/dist/als-react-ts-ui151.js +15 -0
  60. package/dist/als-react-ts-ui152.js +24 -0
  61. package/dist/als-react-ts-ui153.js +61 -0
  62. package/dist/als-react-ts-ui154.js +23 -0
  63. package/dist/als-react-ts-ui155.js +33 -0
  64. package/dist/als-react-ts-ui156.js +29 -0
  65. package/dist/als-react-ts-ui157.js +29 -0
  66. package/dist/als-react-ts-ui158.js +109 -0
  67. package/dist/als-react-ts-ui159.js +31 -0
  68. package/dist/als-react-ts-ui16.js +9 -0
  69. package/dist/als-react-ts-ui160.js +29 -0
  70. package/dist/als-react-ts-ui161.js +6 -0
  71. package/dist/als-react-ts-ui162.js +11 -0
  72. package/dist/als-react-ts-ui163.js +81 -0
  73. package/dist/als-react-ts-ui164.js +10 -0
  74. package/dist/als-react-ts-ui165.js +14 -0
  75. package/dist/als-react-ts-ui166.js +57 -0
  76. package/dist/als-react-ts-ui167.js +35 -0
  77. package/dist/als-react-ts-ui168.js +19 -0
  78. package/dist/als-react-ts-ui169.js +69 -0
  79. package/dist/als-react-ts-ui17.js +35 -0
  80. package/dist/als-react-ts-ui170.js +7 -0
  81. package/dist/als-react-ts-ui171.js +66 -0
  82. package/dist/als-react-ts-ui172.js +14 -0
  83. package/dist/als-react-ts-ui173.js +55 -0
  84. package/dist/als-react-ts-ui174.js +14 -0
  85. package/dist/als-react-ts-ui175.js +14 -0
  86. package/dist/als-react-ts-ui176.js +6 -0
  87. package/dist/als-react-ts-ui177.js +21 -0
  88. package/dist/als-react-ts-ui178.js +69 -0
  89. package/dist/als-react-ts-ui179.js +91 -0
  90. package/dist/als-react-ts-ui18.js +9 -0
  91. package/dist/als-react-ts-ui180.js +25 -0
  92. package/dist/als-react-ts-ui181.js +167 -0
  93. package/dist/als-react-ts-ui182.js +6 -0
  94. package/dist/als-react-ts-ui183.js +20 -0
  95. package/dist/als-react-ts-ui184.js +9 -0
  96. package/dist/als-react-ts-ui185.js +89 -0
  97. package/dist/als-react-ts-ui186.js +14 -0
  98. package/dist/als-react-ts-ui187.js +65 -0
  99. package/dist/als-react-ts-ui188.js +40 -0
  100. package/dist/als-react-ts-ui189.js +16 -0
  101. package/dist/als-react-ts-ui19.js +9 -0
  102. package/dist/als-react-ts-ui190.js +6 -0
  103. package/dist/als-react-ts-ui191.js +7 -0
  104. package/dist/als-react-ts-ui192.js +14 -0
  105. package/dist/als-react-ts-ui193.js +294 -0
  106. package/dist/als-react-ts-ui194.js +7 -0
  107. package/dist/als-react-ts-ui195.js +41 -0
  108. package/dist/als-react-ts-ui196.js +127 -0
  109. package/dist/als-react-ts-ui197.js +7 -0
  110. package/dist/als-react-ts-ui198.js +22 -0
  111. package/dist/als-react-ts-ui199.js +83 -0
  112. package/dist/als-react-ts-ui20.js +9 -0
  113. package/dist/als-react-ts-ui200.js +66 -0
  114. package/dist/als-react-ts-ui201.js +48 -0
  115. package/dist/als-react-ts-ui202.js +7 -0
  116. package/dist/als-react-ts-ui203.js +21 -0
  117. package/dist/als-react-ts-ui204.js +18 -0
  118. package/dist/als-react-ts-ui205.js +35 -0
  119. package/dist/als-react-ts-ui206.js +14 -0
  120. package/dist/als-react-ts-ui207.js +11 -0
  121. package/dist/als-react-ts-ui208.js +14 -0
  122. package/dist/als-react-ts-ui209.js +16 -0
  123. package/dist/als-react-ts-ui21.js +9 -0
  124. package/dist/als-react-ts-ui210.js +6 -0
  125. package/dist/als-react-ts-ui211.js +6 -0
  126. package/dist/als-react-ts-ui212.js +8 -0
  127. package/dist/als-react-ts-ui213.js +82 -0
  128. package/dist/als-react-ts-ui214.js +6 -0
  129. package/dist/als-react-ts-ui215.js +23 -0
  130. package/dist/als-react-ts-ui216.js +20 -0
  131. package/dist/als-react-ts-ui217.js +28 -0
  132. package/dist/als-react-ts-ui218.js +45 -0
  133. package/dist/als-react-ts-ui219.js +7 -0
  134. package/dist/als-react-ts-ui22.js +9 -0
  135. package/dist/als-react-ts-ui220.js +6 -0
  136. package/dist/als-react-ts-ui221.js +136 -0
  137. package/dist/als-react-ts-ui222.js +8 -0
  138. package/dist/als-react-ts-ui223.js +68 -0
  139. package/dist/als-react-ts-ui224.js +6 -0
  140. package/dist/als-react-ts-ui225.js +19 -0
  141. package/dist/als-react-ts-ui226.js +14 -0
  142. package/dist/als-react-ts-ui227.js +6 -0
  143. package/dist/als-react-ts-ui228.js +23 -0
  144. package/dist/als-react-ts-ui229.js +32 -0
  145. package/dist/als-react-ts-ui23.js +104 -0
  146. package/dist/als-react-ts-ui230.js +20 -0
  147. package/dist/als-react-ts-ui231.js +76 -0
  148. package/dist/als-react-ts-ui232.js +131 -0
  149. package/dist/als-react-ts-ui233.js +117 -0
  150. package/dist/als-react-ts-ui234.js +104 -0
  151. package/dist/als-react-ts-ui235.js +53 -0
  152. package/dist/als-react-ts-ui236.js +106 -0
  153. package/dist/als-react-ts-ui237.js +24 -0
  154. package/dist/als-react-ts-ui238.js +35 -0
  155. package/dist/als-react-ts-ui239.js +77 -0
  156. package/dist/als-react-ts-ui24.js +9 -0
  157. package/dist/als-react-ts-ui240.js +229 -0
  158. package/dist/als-react-ts-ui241.js +72 -0
  159. package/dist/als-react-ts-ui242.js +50 -0
  160. package/dist/als-react-ts-ui243.js +202 -0
  161. package/dist/als-react-ts-ui244.js +50 -0
  162. package/dist/als-react-ts-ui245.js +22 -0
  163. package/dist/als-react-ts-ui246.js +8 -0
  164. package/dist/als-react-ts-ui247.js +11 -0
  165. package/dist/als-react-ts-ui248.js +14 -0
  166. package/dist/als-react-ts-ui249.js +24 -0
  167. package/dist/als-react-ts-ui25.js +11 -0
  168. package/dist/als-react-ts-ui250.js +97 -0
  169. package/dist/als-react-ts-ui251.js +16 -0
  170. package/dist/als-react-ts-ui252.js +8 -0
  171. package/dist/als-react-ts-ui253.js +24 -0
  172. package/dist/als-react-ts-ui254.js +60 -0
  173. package/dist/als-react-ts-ui255.js +19 -0
  174. package/dist/als-react-ts-ui256.js +29 -0
  175. package/dist/als-react-ts-ui257.js +45 -0
  176. package/dist/als-react-ts-ui258.js +23 -0
  177. package/dist/als-react-ts-ui259.js +51 -0
  178. package/dist/als-react-ts-ui26.js +9 -0
  179. package/dist/als-react-ts-ui260.js +53 -0
  180. package/dist/als-react-ts-ui261.js +20 -0
  181. package/dist/als-react-ts-ui262.js +14 -0
  182. package/dist/als-react-ts-ui263.js +38 -0
  183. package/dist/als-react-ts-ui264.js +285 -0
  184. package/dist/als-react-ts-ui265.js +56 -0
  185. package/dist/als-react-ts-ui266.js +82 -0
  186. package/dist/als-react-ts-ui267.js +8 -0
  187. package/dist/als-react-ts-ui268.js +6 -0
  188. package/dist/als-react-ts-ui269.js +26 -0
  189. package/dist/als-react-ts-ui27.js +9 -0
  190. package/dist/als-react-ts-ui270.js +18 -0
  191. package/dist/als-react-ts-ui271.js +6 -0
  192. package/dist/als-react-ts-ui272.js +265 -0
  193. package/dist/als-react-ts-ui273.js +14 -0
  194. package/dist/als-react-ts-ui274.js +13 -0
  195. package/dist/als-react-ts-ui275.js +44 -0
  196. package/dist/als-react-ts-ui276.js +7 -0
  197. package/dist/als-react-ts-ui277.js +12 -0
  198. package/dist/als-react-ts-ui278.js +10 -0
  199. package/dist/als-react-ts-ui279.js +8 -0
  200. package/dist/als-react-ts-ui28.js +122 -0
  201. package/dist/als-react-ts-ui280.js +14 -0
  202. package/dist/als-react-ts-ui281.js +14 -0
  203. package/dist/als-react-ts-ui282.js +7 -0
  204. package/dist/als-react-ts-ui283.js +6 -0
  205. package/dist/als-react-ts-ui284.js +14 -0
  206. package/dist/als-react-ts-ui285.js +92 -0
  207. package/dist/als-react-ts-ui286.js +58 -0
  208. package/dist/als-react-ts-ui287.js +4 -0
  209. package/dist/als-react-ts-ui288.js +26 -0
  210. package/dist/als-react-ts-ui289.js +155 -0
  211. package/dist/als-react-ts-ui29.js +9 -0
  212. package/dist/als-react-ts-ui290.js +116 -0
  213. package/dist/als-react-ts-ui291.js +67 -0
  214. package/dist/als-react-ts-ui292.js +14 -0
  215. package/dist/als-react-ts-ui293.js +14 -0
  216. package/dist/als-react-ts-ui294.js +63 -0
  217. package/dist/als-react-ts-ui295.js +62 -0
  218. package/dist/als-react-ts-ui296.js +90 -0
  219. package/dist/als-react-ts-ui297.js +19 -0
  220. package/dist/als-react-ts-ui298.js +211 -0
  221. package/dist/als-react-ts-ui299.js +6 -0
  222. package/dist/als-react-ts-ui3.js +142 -0
  223. package/dist/als-react-ts-ui30.js +9 -0
  224. package/dist/als-react-ts-ui300.js +16 -0
  225. package/dist/als-react-ts-ui301.js +50 -0
  226. package/dist/als-react-ts-ui302.js +15 -0
  227. package/dist/als-react-ts-ui303.js +17 -0
  228. package/dist/als-react-ts-ui304.js +17 -0
  229. package/dist/als-react-ts-ui305.js +78 -0
  230. package/dist/als-react-ts-ui306.js +183 -0
  231. package/dist/als-react-ts-ui307.js +57 -0
  232. package/dist/als-react-ts-ui308.js +32 -0
  233. package/dist/als-react-ts-ui309.js +16 -0
  234. package/dist/als-react-ts-ui31.js +9 -0
  235. package/dist/als-react-ts-ui310.js +11 -0
  236. package/dist/als-react-ts-ui311.js +209 -0
  237. package/dist/als-react-ts-ui312.js +401 -0
  238. package/dist/als-react-ts-ui313.js +17 -0
  239. package/dist/als-react-ts-ui314.js +14 -0
  240. package/dist/als-react-ts-ui315.js +12 -0
  241. package/dist/als-react-ts-ui316.js +6 -0
  242. package/dist/als-react-ts-ui317.js +130 -0
  243. package/dist/als-react-ts-ui318.js +47 -0
  244. package/dist/als-react-ts-ui319.js +20 -0
  245. package/dist/als-react-ts-ui32.js +11 -0
  246. package/dist/als-react-ts-ui320.js +14 -0
  247. package/dist/als-react-ts-ui321.js +7 -0
  248. package/dist/als-react-ts-ui322.js +14 -0
  249. package/dist/als-react-ts-ui323.js +16 -0
  250. package/dist/als-react-ts-ui324.js +6 -0
  251. package/dist/als-react-ts-ui325.js +6 -0
  252. package/dist/als-react-ts-ui326.js +14 -0
  253. package/dist/als-react-ts-ui327.js +6 -0
  254. package/dist/als-react-ts-ui328.js +28 -0
  255. package/dist/als-react-ts-ui329.js +597 -0
  256. package/dist/als-react-ts-ui33.js +173 -0
  257. package/dist/als-react-ts-ui330.js +44 -0
  258. package/dist/als-react-ts-ui331.js +41 -0
  259. package/dist/als-react-ts-ui332.js +59 -0
  260. package/dist/als-react-ts-ui333.js +10 -0
  261. package/dist/als-react-ts-ui334.js +14 -0
  262. package/dist/als-react-ts-ui335.js +14 -0
  263. package/dist/als-react-ts-ui336.js +14 -0
  264. package/dist/als-react-ts-ui337.js +23 -0
  265. package/dist/als-react-ts-ui338.js +6 -0
  266. package/dist/als-react-ts-ui339.js +10 -0
  267. package/dist/als-react-ts-ui34.js +9 -0
  268. package/dist/als-react-ts-ui340.js +19 -0
  269. package/dist/als-react-ts-ui341.js +14 -0
  270. package/dist/als-react-ts-ui342.js +15 -0
  271. package/dist/als-react-ts-ui343.js +6 -0
  272. package/dist/als-react-ts-ui344.js +324 -0
  273. package/dist/als-react-ts-ui345.js +5 -0
  274. package/dist/als-react-ts-ui346.js +489 -0
  275. package/dist/als-react-ts-ui347.js +23 -0
  276. package/dist/als-react-ts-ui348.js +8 -0
  277. package/dist/als-react-ts-ui349.js +6 -0
  278. package/dist/als-react-ts-ui35.js +9 -0
  279. package/dist/als-react-ts-ui350.js +10 -0
  280. package/dist/als-react-ts-ui351.js +4 -0
  281. package/dist/als-react-ts-ui352.js +57 -0
  282. package/dist/als-react-ts-ui353.js +58 -0
  283. package/dist/als-react-ts-ui354.js +10 -0
  284. package/dist/als-react-ts-ui355.js +14 -0
  285. package/dist/als-react-ts-ui356.js +9 -0
  286. package/dist/als-react-ts-ui357.js +4 -0
  287. package/dist/als-react-ts-ui358.js +34 -0
  288. package/dist/als-react-ts-ui359.js +14 -0
  289. package/dist/als-react-ts-ui36.js +9 -0
  290. package/dist/als-react-ts-ui360.js +4 -0
  291. package/dist/als-react-ts-ui361.js +6 -0
  292. package/dist/als-react-ts-ui362.js +6 -0
  293. package/dist/als-react-ts-ui363.js +78 -0
  294. package/dist/als-react-ts-ui364.js +4 -0
  295. package/dist/als-react-ts-ui365.js +10 -0
  296. package/dist/als-react-ts-ui366.js +4 -0
  297. package/dist/als-react-ts-ui367.js +6 -0
  298. package/dist/als-react-ts-ui368.js +134 -0
  299. package/dist/als-react-ts-ui369.js +4 -0
  300. package/dist/als-react-ts-ui37.js +9 -0
  301. package/dist/als-react-ts-ui370.js +46 -0
  302. package/dist/als-react-ts-ui371.js +58 -0
  303. package/dist/als-react-ts-ui372.js +4 -0
  304. package/dist/als-react-ts-ui373.js +4 -0
  305. package/dist/als-react-ts-ui38.js +257 -0
  306. package/dist/als-react-ts-ui39.js +48 -0
  307. package/dist/als-react-ts-ui4.js +158 -0
  308. package/dist/als-react-ts-ui40.js +96 -0
  309. package/dist/als-react-ts-ui41.js +78 -0
  310. package/dist/als-react-ts-ui42.js +23 -0
  311. package/dist/als-react-ts-ui43.js +111 -0
  312. package/dist/als-react-ts-ui44.js +112 -0
  313. package/dist/als-react-ts-ui45.js +40 -0
  314. package/dist/als-react-ts-ui46.js +45 -0
  315. package/dist/als-react-ts-ui47.js +55 -0
  316. package/dist/als-react-ts-ui48.js +39 -0
  317. package/dist/als-react-ts-ui49.js +50 -0
  318. package/dist/als-react-ts-ui5.js +26 -0
  319. package/dist/als-react-ts-ui50.js +79 -0
  320. package/dist/als-react-ts-ui51.js +24 -0
  321. package/dist/als-react-ts-ui52.js +24 -0
  322. package/dist/als-react-ts-ui53.js +40 -0
  323. package/dist/als-react-ts-ui54.js +30 -0
  324. package/dist/als-react-ts-ui55.js +208 -0
  325. package/dist/als-react-ts-ui56.js +17 -0
  326. package/dist/als-react-ts-ui57.js +24 -0
  327. package/dist/als-react-ts-ui58.js +30 -0
  328. package/dist/als-react-ts-ui59.js +39 -0
  329. package/dist/als-react-ts-ui6.js +103 -0
  330. package/dist/als-react-ts-ui60.js +30 -0
  331. package/dist/als-react-ts-ui61.js +24 -0
  332. package/dist/als-react-ts-ui62.js +7 -0
  333. package/dist/als-react-ts-ui63.js +7 -0
  334. package/dist/als-react-ts-ui64.js +7 -0
  335. package/dist/als-react-ts-ui65.js +7 -0
  336. package/dist/als-react-ts-ui66.js +7 -0
  337. package/dist/als-react-ts-ui67.js +25 -0
  338. package/dist/als-react-ts-ui68.js +50 -0
  339. package/dist/als-react-ts-ui69.js +7 -0
  340. package/dist/als-react-ts-ui7.js +42 -0
  341. package/dist/als-react-ts-ui70.js +7 -0
  342. package/dist/als-react-ts-ui71.js +7 -0
  343. package/dist/als-react-ts-ui72.js +15 -0
  344. package/dist/als-react-ts-ui73.js +13 -0
  345. package/dist/als-react-ts-ui74.js +7 -0
  346. package/dist/als-react-ts-ui75.js +7 -0
  347. package/dist/als-react-ts-ui76.js +7 -0
  348. package/dist/als-react-ts-ui77.js +7 -0
  349. package/dist/als-react-ts-ui78.js +7 -0
  350. package/dist/als-react-ts-ui79.js +17 -0
  351. package/dist/als-react-ts-ui8.js +9 -0
  352. package/dist/als-react-ts-ui80.js +120 -0
  353. package/dist/als-react-ts-ui81.js +110 -0
  354. package/dist/als-react-ts-ui82.js +111 -0
  355. package/dist/als-react-ts-ui83.js +38 -0
  356. package/dist/als-react-ts-ui84.js +26 -0
  357. package/dist/als-react-ts-ui85.js +26 -0
  358. package/dist/als-react-ts-ui86.js +36 -0
  359. package/dist/als-react-ts-ui87.js +39 -0
  360. package/dist/als-react-ts-ui88.js +110 -0
  361. package/dist/als-react-ts-ui89.js +25 -0
  362. package/dist/als-react-ts-ui9.js +9 -0
  363. package/dist/als-react-ts-ui90.js +7 -0
  364. package/dist/als-react-ts-ui91.js +74 -0
  365. package/dist/als-react-ts-ui92.js +7 -0
  366. package/dist/als-react-ts-ui93.js +7 -0
  367. package/dist/als-react-ts-ui94.js +21 -0
  368. package/dist/als-react-ts-ui95.js +6 -0
  369. package/dist/als-react-ts-ui96.js +6 -0
  370. package/dist/als-react-ts-ui97.js +141 -0
  371. package/dist/als-react-ts-ui98.js +34 -0
  372. package/dist/als-react-ts-ui99.js +30 -0
  373. package/dist/components/ALSAccordion/index.module.css +1 -0
  374. package/dist/components/ALSAlertDialog/ALSAlertDialog.d.ts +106 -0
  375. package/dist/components/ALSAlertDialog/ALSAlertDialog.d.ts.map +1 -0
  376. package/dist/components/ALSAlertDialog/index.d.ts +16 -4
  377. package/dist/components/ALSAlertDialog/index.d.ts.map +1 -1
  378. package/dist/components/ALSAlertDialog/index.module.css +1 -0
  379. package/dist/components/ALSAutocomplete/ALSAutocomplete.d.ts +46 -0
  380. package/dist/components/ALSAutocomplete/ALSAutocomplete.d.ts.map +1 -0
  381. package/dist/components/ALSAutocomplete/index.d.ts +25 -4
  382. package/dist/components/ALSAutocomplete/index.d.ts.map +1 -1
  383. package/dist/components/ALSAutocomplete/index.module.css +1 -0
  384. package/dist/components/ALSAvatar/index.d.ts +75 -3
  385. package/dist/components/ALSAvatar/index.d.ts.map +1 -1
  386. package/dist/components/ALSAvatar/index.module.css +1 -0
  387. package/dist/components/ALSButton/index.module.css +1 -0
  388. package/dist/components/ALSCheckbox/index.module.css +0 -0
  389. package/dist/components/ALSDialog/index.module.css +1 -0
  390. package/dist/components/ALSInput/index.module.css +1 -0
  391. package/dist/components/ALSPopover/index.module.css +1 -0
  392. package/dist/components/ALSProgress/index.module.css +1 -0
  393. package/dist/components/ALSSelect/index.module.css +1 -0
  394. package/dist/components/ALSTabs/index.module.css +1 -0
  395. package/dist/components/ALSToast/index.module.css +1 -0
  396. package/dist/{als-react-ts-ui.css → index.css} +1 -1
  397. package/dist/index.d.ts +1 -1
  398. package/dist/index.d.ts.map +1 -1
  399. package/dist/layout/MainLayout/index.module.css +1 -0
  400. package/package.json +1 -1
  401. package/dist/als-react-ts-ui.cjs +0 -21
  402. package/dist/als-react-ts-ui.cjs.map +0 -1
  403. package/dist/als-react-ts-ui.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"als-react-ts-ui.cjs","sources":["../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useControlled.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useRefWithInit.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useStableCallback.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useIsoLayoutEffect.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/warn.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/composite/list/CompositeListContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/composite/list/CompositeList.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/direction-provider/DirectionContext.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/formatErrorMessage.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/accordion/root/AccordionRootContext.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useMergedRefs.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/reactVersion.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/getReactElementRef.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/mergeObjects.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/getStateAttributesProps.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/resolveClassName.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/resolveStyle.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/merge-props/mergeProps.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/empty.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/constants.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/useRenderElement.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/reason-parts.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/createBaseUIEventDetails.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/accordion/root/AccordionRoot.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/safeReact.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useId.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/useBaseUiId.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useOnMount.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useAnimationFrame.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/resolveRef.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/useAnimationsFinished.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/useTransitionStatus.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/collapsible/root/useCollapsibleRoot.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/collapsible/root/CollapsibleRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/composite/list/useCompositeListItem.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/accordion/item/AccordionItemContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/stateAttributesMapping.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/collapsible/panel/CollapsiblePanelDataAttributes.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/collapsible/trigger/CollapsibleTriggerDataAttributes.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/collapsibleOpenStateMapping.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/accordion/item/AccordionItemDataAttributes.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/accordion/item/stateAttributesMapping.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/accordion/item/AccordionItem.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/accordion/header/AccordionHeader.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/isElementDisabled.js","../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/error.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/composite/root/CompositeRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/useFocusableWhenDisabled.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/use-button/useButton.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/detectBrowser.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/utils/constants.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/utils/element.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/utils/nodes.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/utils/event.js","../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/utils/composite.js","../node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/utils/tabbable.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/composite/composite.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/accordion/trigger/AccordionTrigger.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/accordion/root/AccordionRootDataAttributes.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/collapsible/panel/useCollapsiblePanel.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/accordion/panel/AccordionPanelCssVars.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useValueAsRef.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/useOpenChangeComplete.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/accordion/panel/AccordionPanel.js","../src/components/ALSAccordion/index.tsx","../src/components/ALSAlertDialog/index.tsx","../src/components/ALSAutocomplete/index.tsx","../src/components/ALSAvatar/index.tsx","../src/components/ALSButton/index.tsx","../src/components/ALSCheckbox/index.tsx","../src/components/ALSCheckboxGroup/index.tsx","../src/components/ALSCollapsible/index.tsx","../src/components/ALSCombobox/index.tsx","../src/components/ALSContextMenu/index.tsx","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/root/DialogRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/popupStateMapping.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/backdrop/DialogBackdrop.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/close/DialogClose.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/description/DialogDescription.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useTimeout.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/utils/createEventEmitter.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/components/FloatingTreeStore.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/components/FloatingTree.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/utils/createAttribute.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useHover.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/visuallyHidden.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/owner.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/FocusGuard.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/utils/enqueueFocus.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/utils/markOthers.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/components/FloatingPortal.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/components/FloatingFocusManager.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useClick.js","../node_modules/.pnpm/@floating-ui+core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../node_modules/.pnpm/@floating-ui+dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../node_modules/.pnpm/@floating-ui+react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useDismiss.js","../node_modules/.pnpm/reselect@5.1.1/node_modules/reselect/dist/reselect.mjs","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/store/createSelector.js","../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/shim/index.js","../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js","../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/shim/with-selector.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/store/useStore.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/store/Store.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/store/ReactStore.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useForcedRerendering.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/components/FloatingRootStore.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/popups/popupStoreUtils.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/popups/popupTriggerMap.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/utils/getEmptyRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/popups/store.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useFloatingRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useFloating.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useHoverInteractionSharedState.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useHoverFloatingInteraction.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useHoverReferenceInteraction.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useInteractions.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useListNavigation.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useRole.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/hooks/useTypeahead.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/safePolygon.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/popup/DialogPopupCssVars.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/popup/DialogPopupDataAttributes.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/portal/DialogPortalContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/popup/DialogPopup.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/inertValue.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/InternalBackdrop.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/portal/DialogPortal.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useScrollLock.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useEnhancedClickHandler.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/useOpenInteractionType.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/root/useDialogRoot.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/store/DialogStore.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/root/DialogRoot.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/title/DialogTitle.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/dialog/trigger/DialogTrigger.js","../src/components/ALSDialog/index.tsx","../src/components/ALSField/index.tsx","../src/components/ALSFieldset/index.tsx","../src/components/ALSForm/index.tsx","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/field/control/FieldControlDataAttributes.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/field/utils/constants.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/field/root/FieldRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/form/FormContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/labelable-provider/LabelableContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/field/utils/getCombinedFieldValidityData.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/labelable-provider/useLabelableId.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/field/useField.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/field/control/FieldControl.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/input/Input.js","../src/components/ALSInput/index.tsx","../src/components/ALSMenu/index.tsx","../src/components/ALSMenubar/index.tsx","../src/components/ALSMeter/index.tsx","../src/components/ALSNavigationMenu/index.tsx","../src/components/ALSNumberField/index.tsx","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/root/PopoverRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/store/PopoverStore.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/root/PopoverRoot.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/utils/constants.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/trigger/PopoverTrigger.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/portal/PopoverPortalContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/portal/PopoverPortal.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/positioner/PopoverPositionerContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/floating-ui-react/middleware/arrow.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/hideMiddleware.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/adaptiveOriginMiddleware.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/useAnchorPositioning.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/getDisabledMountTransitionStyles.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/positioner/PopoverPositioner.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/getCssDimensions.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/usePopupAutoResize.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toolbar/root/ToolbarRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/popup/PopoverPopup.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/arrow/PopoverArrow.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/backdrop/PopoverBackdrop.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/title/PopoverTitle.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/description/PopoverDescription.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/popover/close/PopoverClose.js","../src/components/ALSPopover/index.tsx","../src/components/ALSPreviewCard/index.tsx","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/formatNumber.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/progress/root/ProgressRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/progress/root/ProgressRootDataAttributes.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/progress/root/stateAttributesMapping.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/progress/root/ProgressRoot.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/progress/track/ProgressTrack.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/valueToPercent.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/progress/indicator/ProgressIndicator.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/progress/value/ProgressValue.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/progress/label/ProgressLabel.js","../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../src/components/ALSProgress/ALSProgress.tsx","../src/components/ALSProgress/index.tsx","../src/components/ALSRadio/index.tsx","../src/components/ALSScrollArea/index.tsx","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/useOnFirstRender.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/root/SelectRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/itemEquality.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/serializeValue.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/resolveValueLabel.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/store.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/useValueChanged.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/root/SelectRoot.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/getPseudoElementBounds.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/trigger/SelectTrigger.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/value/SelectValue.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/icon/SelectIcon.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/portal/SelectPortalContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/portal/SelectPortal.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/positioner/SelectPositionerContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/popup/utils.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/positioner/SelectPositioner.js","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/isMouseWithinBounds.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/styles.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/popup/SelectPopup.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/item/SelectItemContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/item/SelectItem.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/item-indicator/SelectItemIndicator.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/item-text/SelectItemText.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/group/SelectGroupContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/group/SelectGroup.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/select/group-label/SelectGroupLabel.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/separator/Separator.js","../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.0/node_modules/lucide-react/dist/esm/shared/src/utils.js","../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.0/node_modules/lucide-react/dist/esm/defaultAttributes.js","../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.0/node_modules/lucide-react/dist/esm/Icon.js","../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.0/node_modules/lucide-react/dist/esm/createLucideIcon.js","../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/check.js","../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.0/node_modules/lucide-react/dist/esm/icons/chevron-down.js","../src/components/ALSSelect/index.tsx","../src/components/ALSSeparator/index.tsx","../src/components/ALSSlider/index.tsx","../src/components/ALSSwitch/index.tsx","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/root/TabsRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/root/TabsRootDataAttributes.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/root/stateAttributesMapping.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/root/TabsRoot.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/composite/constants.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/composite/item/useCompositeItem.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/list/TabsListContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/tab/TabsTab.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/indicator/prehydrationScript.min.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/indicator/TabsIndicatorCssVars.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/indicator/TabsIndicator.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/panel/TabsPanelDataAttributes.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/panel/TabsPanel.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/composite/root/useCompositeRoot.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/composite/root/CompositeRoot.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/tabs/list/TabsList.js","../src/components/ALSTabs/components.tsx","../src/components/ALSTabs/ALSTabs.ts","../node_modules/.pnpm/@base-ui-components+utils@0.2.1_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/utils/esm/generateId.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/provider/ToastProviderContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/utils/resolvePromiseOptions.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/provider/ToastProvider.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/viewport/ToastViewportContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/viewport/ToastViewportCssVars.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/viewport/ToastViewport.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/root/ToastRootContext.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/root/ToastRootCssVars.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/root/ToastRoot.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/content/ToastContent.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/description/ToastDescription.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/title/ToastTitle.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/close/ToastClose.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/action/ToastAction.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/utils/FloatingPortalLite.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/portal/ToastPortal.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/useToastManager.js","../node_modules/.pnpm/@base-ui-components+react@1.0.0-beta.7_@types+react@19.2.7_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui-components/react/esm/toast/createToastManager.js","../src/components/ALSToast/index.tsx","../src/components/ALSToggle/index.tsx","../src/components/ALSToggleGroup/index.tsx","../src/components/ALSToolbar/index.tsx","../src/components/ALSTooltip/index.tsx","../src/layout/MainLayout/index.tsx"],"sourcesContent":["'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`Base UI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is for more details.\n if (!isControlled && JSON.stringify(defaultValue) !== JSON.stringify(defaultProp)) {\n console.error([`Base UI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useRefWithInit(sortColumns, columns)\n */\n\nexport function useRefWithInit(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nimport { useRefWithInit } from \"./useRefWithInit.js\";\n\n// https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\nconst useInsertionEffect = React[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0, -3)];\nconst useSafeInsertionEffect =\n// React 17 doesn't have useInsertionEffect.\nuseInsertionEffect &&\n// Preact replaces useInsertionEffect with useLayoutEffect and fires too late.\nuseInsertionEffect !== React.useLayoutEffect ? useInsertionEffect : fn => fn();\n/**\n * Stabilizes the function passed so it's always the same between renders.\n *\n * The function becomes non-reactive to any values it captures.\n * It can safely be passed as a dependency of `React.useMemo` and `React.useEffect` without re-triggering them if its captured values change.\n *\n * The function must only be called inside effects and event handlers, never during render (which throws an error).\n *\n * This hook is a more permissive version of React 19.2's `React.useEffectEvent` in that it can be passed through contexts and called in event handler props, not just effects.\n */\nexport function useStableCallback(callback) {\n const stable = useRefWithInit(createStableCallback).current;\n stable.next = callback;\n useSafeInsertionEffect(stable.effect);\n return stable.trampoline;\n}\nfunction createStableCallback() {\n const stable = {\n next: undefined,\n callback: assertNotCalled,\n trampoline: (...args) => stable.callback?.(...args),\n effect: () => {\n stable.callback = stable.next;\n }\n };\n return stable;\n}\nfunction assertNotCalled() {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error('Base UI: Cannot call an event handler while rendering.');\n }\n}","'use client';\n\nimport * as React from 'react';\nconst noop = () => {};\nexport const useIsoLayoutEffect = typeof document !== 'undefined' ? React.useLayoutEffect : noop;","let set;\nif (process.env.NODE_ENV !== 'production') {\n set = new Set();\n}\nexport function warn(...messages) {\n if (process.env.NODE_ENV !== 'production') {\n const messageKey = messages.join(' ');\n if (!set.has(messageKey)) {\n set.add(messageKey);\n console.warn(`Base UI: ${messageKey}`);\n }\n }\n}","'use client';\n\nimport * as React from 'react';\nexport const CompositeListContext = /*#__PURE__*/React.createContext({\n register: () => {},\n unregister: () => {},\n subscribeMapChange: () => {\n return () => {};\n },\n elementsRef: {\n current: []\n },\n nextIndexRef: {\n current: 0\n }\n});\nif (process.env.NODE_ENV !== \"production\") CompositeListContext.displayName = \"CompositeListContext\";\nexport function useCompositeListContext() {\n return React.useContext(CompositeListContext);\n}","/* eslint-disable no-bitwise */\n'use client';\n\nimport * as React from 'react';\nimport { useRefWithInit } from '@base-ui-components/utils/useRefWithInit';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { CompositeListContext } from \"./CompositeListContext.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Provides context for a list of items in a composite component.\n * @internal\n */\nexport function CompositeList(props) {\n const {\n children,\n elementsRef,\n labelsRef,\n onMapChange: onMapChangeProp\n } = props;\n const onMapChange = useStableCallback(onMapChangeProp);\n const nextIndexRef = React.useRef(0);\n const listeners = useRefWithInit(createListeners).current;\n\n // We use a stable `map` to avoid O(n^2) re-allocation costs for large lists.\n // `mapTick` is our re-render trigger mechanism. We also need to update the\n // elements and label refs, but there's a lot of async work going on and sometimes\n // the effect that handles `onMapChange` gets called after those refs have been\n // filled, and we don't want to lose those values by setting their lengths to `0`.\n // We also need to have them at the proper length because floating-ui uses that\n // information for list navigation.\n\n const map = useRefWithInit(createMap).current;\n // `mapTick` uses a counter rather than objects for low precision-loss risk and better memory efficiency\n const [mapTick, setMapTick] = React.useState(0);\n const lastTickRef = React.useRef(mapTick);\n const register = useStableCallback((node, metadata) => {\n map.set(node, metadata ?? null);\n lastTickRef.current += 1;\n setMapTick(lastTickRef.current);\n });\n const unregister = useStableCallback(node => {\n map.delete(node);\n lastTickRef.current += 1;\n setMapTick(lastTickRef.current);\n });\n const sortedMap = React.useMemo(() => {\n // `mapTick` is the `useMemo` trigger as `map` is stable.\n disableEslintWarning(mapTick);\n const newMap = new Map();\n const sortedNodes = Array.from(map.keys()).sort(sortByDocumentPosition);\n sortedNodes.forEach((node, index) => {\n const metadata = map.get(node) ?? {};\n newMap.set(node, {\n ...metadata,\n index\n });\n });\n return newMap;\n }, [map, mapTick]);\n useIsoLayoutEffect(() => {\n if (typeof MutationObserver !== 'function' || sortedMap.size === 0) {\n return undefined;\n }\n const mutationObserver = new MutationObserver(entries => {\n const diff = new Set();\n const updateDiff = node => diff.has(node) ? diff.delete(node) : diff.add(node);\n entries.forEach(entry => {\n entry.removedNodes.forEach(updateDiff);\n entry.addedNodes.forEach(updateDiff);\n });\n if (diff.size === 0) {\n lastTickRef.current += 1;\n setMapTick(lastTickRef.current);\n }\n });\n sortedMap.forEach((_, node) => {\n if (node.parentElement) {\n mutationObserver.observe(node.parentElement, {\n childList: true\n });\n }\n });\n return () => {\n mutationObserver.disconnect();\n };\n }, [sortedMap]);\n useIsoLayoutEffect(() => {\n const shouldUpdateLengths = lastTickRef.current === mapTick;\n if (shouldUpdateLengths) {\n if (elementsRef.current.length !== sortedMap.size) {\n elementsRef.current.length = sortedMap.size;\n }\n if (labelsRef && labelsRef.current.length !== sortedMap.size) {\n labelsRef.current.length = sortedMap.size;\n }\n nextIndexRef.current = sortedMap.size;\n }\n onMapChange(sortedMap);\n }, [onMapChange, sortedMap, elementsRef, labelsRef, mapTick]);\n useIsoLayoutEffect(() => {\n return () => {\n elementsRef.current = [];\n };\n }, [elementsRef]);\n useIsoLayoutEffect(() => {\n return () => {\n if (labelsRef) {\n labelsRef.current = [];\n }\n };\n }, [labelsRef]);\n const subscribeMapChange = useStableCallback(fn => {\n listeners.add(fn);\n return () => {\n listeners.delete(fn);\n };\n });\n useIsoLayoutEffect(() => {\n listeners.forEach(l => l(sortedMap));\n }, [listeners, sortedMap]);\n const contextValue = React.useMemo(() => ({\n register,\n unregister,\n subscribeMapChange,\n elementsRef,\n labelsRef,\n nextIndexRef\n }), [register, unregister, subscribeMapChange, elementsRef, labelsRef, nextIndexRef]);\n return /*#__PURE__*/_jsx(CompositeListContext.Provider, {\n value: contextValue,\n children: children\n });\n}\nfunction createMap() {\n return new Map();\n}\nfunction createListeners() {\n return new Set();\n}\nfunction sortByDocumentPosition(a, b) {\n const position = a.compareDocumentPosition(b);\n if (position & Node.DOCUMENT_POSITION_FOLLOWING || position & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n return -1;\n }\n if (position & Node.DOCUMENT_POSITION_PRECEDING || position & Node.DOCUMENT_POSITION_CONTAINS) {\n return 1;\n }\n return 0;\n}\nfunction disableEslintWarning(_) {}","'use client';\n\nimport * as React from 'react';\n/**\n * @internal\n */\nexport const DirectionContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DirectionContext.displayName = \"DirectionContext\";\nexport function useDirection() {\n const context = React.useContext(DirectionContext);\n return context?.direction ?? 'ltr';\n}","/**\n * WARNING: Don't import this directly. It's imported by the code generated by\n * `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`\n * constructors to ensure the plugin works as expected. Supported patterns include:\n * throw new Error('My message');\n * throw new Error(`My message: ${foo}`);\n * throw new Error(`My message: ${foo}` + 'another string');\n * ...\n */\nexport default function formatErrorMessage(code, ...args) {\n const url = new URL(`https://base-ui.com/production-error/${code}`);\n args.forEach(arg => url.searchParams.append('args[]', arg));\n return `Base UI error #${code}; visit ${url} for the full message.`;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const AccordionRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") AccordionRootContext.displayName = \"AccordionRootContext\";\nexport function useAccordionRootContext() {\n const context = React.useContext(AccordionRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: AccordionRootContext is missing. Accordion parts must be placed within <Accordion.Root>.' : _formatErrorMessage(10));\n }\n return context;\n}","import { useRefWithInit } from \"./useRefWithInit.js\";\n\n/**\n * Merges refs into a single memoized callback ref or `null`.\n * This makes sure multiple refs are updated together and have the same value.\n *\n * This function accepts up to four refs. If you need to merge more, or have an unspecified number of refs to merge,\n * use `useMergedRefsN` instead.\n */\n\nexport function useMergedRefs(a, b, c, d) {\n const forkRef = useRefWithInit(createForkRef).current;\n if (didChange(forkRef, a, b, c, d)) {\n update(forkRef, [a, b, c, d]);\n }\n return forkRef.callback;\n}\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n *\n * If you need to merge a fixed number (up to four) of refs, use `useMergedRefs` instead for better performance.\n */\nexport function useMergedRefsN(refs) {\n const forkRef = useRefWithInit(createForkRef).current;\n if (didChangeN(forkRef, refs)) {\n update(forkRef, refs);\n }\n return forkRef.callback;\n}\nfunction createForkRef() {\n return {\n callback: null,\n cleanup: null,\n refs: []\n };\n}\nfunction didChange(forkRef, a, b, c, d) {\n // prettier-ignore\n return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;\n}\nfunction didChangeN(forkRef, newRefs) {\n return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);\n}\nfunction update(forkRef, refs) {\n forkRef.refs = refs;\n if (refs.every(ref => ref == null)) {\n forkRef.callback = null;\n return;\n }\n forkRef.callback = instance => {\n if (forkRef.cleanup) {\n forkRef.cleanup();\n forkRef.cleanup = null;\n }\n if (instance != null) {\n const cleanupCallbacks = Array(refs.length).fill(null);\n for (let i = 0; i < refs.length; i += 1) {\n const ref = refs[i];\n if (ref == null) {\n continue;\n }\n switch (typeof ref) {\n case 'function':\n {\n const refCleanup = ref(instance);\n if (typeof refCleanup === 'function') {\n cleanupCallbacks[i] = refCleanup;\n }\n break;\n }\n case 'object':\n {\n ref.current = instance;\n break;\n }\n default:\n }\n }\n forkRef.cleanup = () => {\n for (let i = 0; i < refs.length; i += 1) {\n const ref = refs[i];\n if (ref == null) {\n continue;\n }\n switch (typeof ref) {\n case 'function':\n {\n const cleanupCallback = cleanupCallbacks[i];\n if (typeof cleanupCallback === 'function') {\n cleanupCallback();\n } else {\n ref(null);\n }\n break;\n }\n case 'object':\n {\n ref.current = null;\n break;\n }\n default:\n }\n }\n };\n }\n };\n}","import * as React from 'react';\nconst majorVersion = parseInt(React.version, 10);\nexport function isReactVersionAtLeast(reactVersionToCheck) {\n return majorVersion >= reactVersionToCheck;\n}","import * as React from 'react';\nimport { isReactVersionAtLeast } from \"./reactVersion.js\";\n\n/**\n * Extracts the `ref` from a React element, handling different React versions.\n */\nexport function getReactElementRef(element) {\n if (! /*#__PURE__*/React.isValidElement(element)) {\n return null;\n }\n const reactElement = element;\n const propsWithRef = reactElement.props;\n return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;\n}","export function mergeObjects(a, b) {\n if (a && !b) {\n return a;\n }\n if (!a && b) {\n return b;\n }\n if (a || b) {\n return {\n ...a,\n ...b\n };\n }\n return undefined;\n}","export function getStateAttributesProps(state, customMapping) {\n const props = {};\n\n /* eslint-disable-next-line guard-for-in */\n for (const key in state) {\n const value = state[key];\n if (customMapping?.hasOwnProperty(key)) {\n const customProps = customMapping[key](value);\n if (customProps != null) {\n Object.assign(props, customProps);\n }\n continue;\n }\n if (value === true) {\n props[`data-${key.toLowerCase()}`] = '';\n } else if (value) {\n props[`data-${key.toLowerCase()}`] = value.toString();\n }\n }\n return props;\n}","/**\n * If the provided className is a string, it will be returned as is.\n * Otherwise, the function will call the className function with the state as the first argument.\n *\n * @param className\n * @param state\n */\nexport function resolveClassName(className, state) {\n return typeof className === 'function' ? className(state) : className;\n}","/**\n * If the provided style is an object, it will be returned as is.\n * Otherwise, the function will call the style function with the state as the first argument.\n *\n * @param style\n * @param state\n */\nexport function resolveStyle(style, state) {\n return typeof style === 'function' ? style(state) : style;\n}","import { mergeObjects } from '@base-ui-components/utils/mergeObjects';\nconst EMPTY_PROPS = {};\n\n/**\n * Merges multiple sets of React props. It follows the Object.assign pattern where the rightmost object's fields overwrite\n * the conflicting ones from others. This doesn't apply to event handlers, `className` and `style` props.\n * Event handlers are merged such that they are called in sequence (the rightmost one being called first),\n * and allows the user to prevent the subsequent event handlers from being\n * executed by attaching a `preventBaseUIHandler` method.\n * It also merges the `className` and `style` props, whereby the classes are concatenated\n * and the rightmost styles overwrite the subsequent ones.\n *\n * Props can either be provided as objects or as functions that take the previous props as an argument.\n * The function will receive the merged props up to that point (going from left to right):\n * so in the case of `(obj1, obj2, fn, obj3)`, `fn` will receive the merged props of `obj1` and `obj2`.\n * The function is responsible for chaining event handlers if needed (i.e. we don't run the merge logic).\n *\n * Event handlers returned by the functions are not automatically prevented when `preventBaseUIHandler` is called.\n * They must check `event.baseUIHandlerPrevented` themselves and bail out if it's true.\n *\n * @important **`ref` is not merged.**\n * @param props props to merge.\n * @returns the merged props.\n */\n/* eslint-disable id-denylist */\n\nexport function mergeProps(a, b, c, d, e) {\n // We need to mutably own `merged`\n let merged = {\n ...resolvePropsGetter(a, EMPTY_PROPS)\n };\n if (b) {\n merged = mergeOne(merged, b);\n }\n if (c) {\n merged = mergeOne(merged, c);\n }\n if (d) {\n merged = mergeOne(merged, d);\n }\n if (e) {\n merged = mergeOne(merged, e);\n }\n return merged;\n}\n/* eslint-enable id-denylist */\n\nexport function mergePropsN(props) {\n if (props.length === 0) {\n return EMPTY_PROPS;\n }\n if (props.length === 1) {\n return resolvePropsGetter(props[0], EMPTY_PROPS);\n }\n\n // We need to mutably own `merged`\n let merged = {\n ...resolvePropsGetter(props[0], EMPTY_PROPS)\n };\n for (let i = 1; i < props.length; i += 1) {\n merged = mergeOne(merged, props[i]);\n }\n return merged;\n}\nfunction mergeOne(merged, inputProps) {\n if (isPropsGetter(inputProps)) {\n return inputProps(merged);\n }\n return mutablyMergeInto(merged, inputProps);\n}\n\n/**\n * Merges two sets of props. In case of conflicts, the external props take precedence.\n */\nfunction mutablyMergeInto(mergedProps, externalProps) {\n if (!externalProps) {\n return mergedProps;\n }\n\n // eslint-disable-next-line guard-for-in\n for (const propName in externalProps) {\n const externalPropValue = externalProps[propName];\n switch (propName) {\n case 'style':\n {\n mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);\n break;\n }\n case 'className':\n {\n mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);\n break;\n }\n default:\n {\n if (isEventHandler(propName, externalPropValue)) {\n mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);\n } else {\n mergedProps[propName] = externalPropValue;\n }\n }\n }\n }\n return mergedProps;\n}\nfunction isEventHandler(key, value) {\n // This approach is more efficient than using a regex.\n const code0 = key.charCodeAt(0);\n const code1 = key.charCodeAt(1);\n const code2 = key.charCodeAt(2);\n return code0 === 111 /* o */ && code1 === 110 /* n */ && code2 >= 65 /* A */ && code2 <= 90 /* Z */ && (typeof value === 'function' || typeof value === 'undefined');\n}\nfunction isPropsGetter(inputProps) {\n return typeof inputProps === 'function';\n}\nfunction resolvePropsGetter(inputProps, previousProps) {\n if (isPropsGetter(inputProps)) {\n return inputProps(previousProps);\n }\n return inputProps ?? EMPTY_PROPS;\n}\nfunction mergeEventHandlers(ourHandler, theirHandler) {\n if (!theirHandler) {\n return ourHandler;\n }\n if (!ourHandler) {\n return theirHandler;\n }\n return event => {\n if (isSyntheticEvent(event)) {\n const baseUIEvent = event;\n makeEventPreventable(baseUIEvent);\n const result = theirHandler(baseUIEvent);\n if (!baseUIEvent.baseUIHandlerPrevented) {\n ourHandler?.(baseUIEvent);\n }\n return result;\n }\n const result = theirHandler(event);\n ourHandler?.(event);\n return result;\n };\n}\nexport function makeEventPreventable(event) {\n event.preventBaseUIHandler = () => {\n event.baseUIHandlerPrevented = true;\n };\n return event;\n}\nexport function mergeClassNames(ourClassName, theirClassName) {\n if (theirClassName) {\n if (ourClassName) {\n // eslint-disable-next-line prefer-template\n return theirClassName + ' ' + ourClassName;\n }\n return theirClassName;\n }\n return ourClassName;\n}\nfunction isSyntheticEvent(event) {\n return event != null && typeof event === 'object' && 'nativeEvent' in event;\n}","export function NOOP() {}\nexport const EMPTY_ARRAY = Object.freeze([]);\nexport const EMPTY_OBJECT = Object.freeze({});","export const TYPEAHEAD_RESET_MS = 500;\nexport const PATIENT_CLICK_THRESHOLD = 500;\nexport const DISABLED_TRANSITIONS_STYLE = {\n style: {\n transition: 'none'\n }\n};\nexport { EMPTY_OBJECT, EMPTY_ARRAY } from '@base-ui-components/utils/empty';\nexport const CLICK_TRIGGER_IDENTIFIER = 'data-base-ui-click-trigger';\n\n/**\n * Used for dropdowns that usually strictly prefer top/bottom placements and\n * use `var(--available-height)` to limit their height.\n */\nexport const DROPDOWN_COLLISION_AVOIDANCE = {\n fallbackAxisSide: 'none'\n};\n\n/**\n * Used by regular popups that usually aren't scrollable and are allowed to\n * freely flip to any axis of placement.\n */\nexport const POPUP_COLLISION_AVOIDANCE = {\n fallbackAxisSide: 'end'\n};\n\n/**\n * Special visually hidden styles for the aria-owns owner element to ensure owned element\n * accessibility in iOS/Safari/VoiceControl.\n * The owner element is an empty span, so most of the common visually hidden styles are not needed.\n * @see https://github.com/floating-ui/floating-ui/issues/3403\n */\nexport const ownerVisuallyHidden = {\n clipPath: 'inset(50%)',\n position: 'fixed',\n top: 0,\n left: 0\n};","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useMergedRefs, useMergedRefsN } from '@base-ui-components/utils/useMergedRefs';\nimport { getReactElementRef } from '@base-ui-components/utils/getReactElementRef';\nimport { mergeObjects } from '@base-ui-components/utils/mergeObjects';\nimport { getStateAttributesProps } from \"./getStateAttributesProps.js\";\nimport { resolveClassName } from \"./resolveClassName.js\";\nimport { resolveStyle } from \"./resolveStyle.js\";\nimport { mergeProps, mergePropsN, mergeClassNames } from \"../merge-props/index.js\";\nimport { EMPTY_OBJECT } from \"./constants.js\";\nimport { createElement as _createElement } from \"react\";\n/**\n * Renders a Base UI element.\n *\n * @param element The default HTML element to render. Can be overridden by the `render` prop.\n * @param componentProps An object containing the `render` and `className` props to be used for element customization. Other props are ignored.\n * @param params Additional parameters for rendering the element.\n */\nexport function useRenderElement(element, componentProps, params = {}) {\n const renderProp = componentProps.render;\n const outProps = useRenderElementProps(componentProps, params);\n if (params.enabled === false) {\n return null;\n }\n const state = params.state ?? EMPTY_OBJECT;\n return evaluateRenderProp(element, renderProp, outProps, state);\n}\n\n/**\n * Computes render element final props.\n */\nfunction useRenderElementProps(componentProps, params = {}) {\n const {\n className: classNameProp,\n style: styleProp,\n render: renderProp\n } = componentProps;\n const {\n state = EMPTY_OBJECT,\n ref,\n props,\n stateAttributesMapping,\n enabled = true\n } = params;\n const className = enabled ? resolveClassName(classNameProp, state) : undefined;\n const style = enabled ? resolveStyle(styleProp, state) : undefined;\n const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;\n const outProps = enabled ? mergeObjects(stateProps, Array.isArray(props) ? mergePropsN(props) : props) ?? EMPTY_OBJECT : EMPTY_OBJECT;\n\n // SAFETY: The `useMergedRefs` functions use a single hook to store the same value,\n // switching between them at runtime is safe. If this assertion fails, React will\n // throw at runtime anyway.\n // This also skips the `useMergedRefs` call on the server, which is fine because\n // refs are not used on the server side.\n /* eslint-disable react-hooks/rules-of-hooks */\n if (typeof document !== 'undefined') {\n if (!enabled) {\n useMergedRefs(null, null);\n } else if (Array.isArray(ref)) {\n outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);\n } else {\n outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);\n }\n }\n if (!enabled) {\n return EMPTY_OBJECT;\n }\n if (className !== undefined) {\n outProps.className = mergeClassNames(outProps.className, className);\n }\n if (style !== undefined) {\n outProps.style = mergeObjects(outProps.style, style);\n }\n return outProps;\n}\nfunction evaluateRenderProp(element, render, props, state) {\n if (render) {\n if (typeof render === 'function') {\n return render(props, state);\n }\n const mergedProps = mergeProps(props, render.props);\n mergedProps.ref = props.ref;\n return /*#__PURE__*/React.cloneElement(render, mergedProps);\n }\n if (element) {\n if (typeof element === 'string') {\n return renderTag(element, props);\n }\n }\n // Unreachable, but the typings on `useRenderElement` need to be reworked\n // to annotate it correctly.\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: Render element or function are not defined.' : _formatErrorMessage(8));\n}\nfunction renderTag(Tag, props) {\n if (Tag === 'button') {\n return /*#__PURE__*/_createElement(\"button\", {\n type: \"button\",\n ...props,\n key: props.key\n });\n }\n if (Tag === 'img') {\n return /*#__PURE__*/_createElement(\"img\", {\n alt: \"\",\n ...props,\n key: props.key\n });\n }\n return /*#__PURE__*/React.createElement(Tag, props);\n}","export const none = 'none';\nexport const triggerPress = 'trigger-press';\nexport const triggerHover = 'trigger-hover';\nexport const triggerFocus = 'trigger-focus';\nexport const outsidePress = 'outside-press';\nexport const itemPress = 'item-press';\nexport const closePress = 'close-press';\nexport const linkPress = 'link-press';\nexport const clearPress = 'clear-press';\nexport const chipRemovePress = 'chip-remove-press';\nexport const trackPress = 'track-press';\nexport const incrementPress = 'increment-press';\nexport const decrementPress = 'decrement-press';\nexport const inputChange = 'input-change';\nexport const inputClear = 'input-clear';\nexport const inputBlur = 'input-blur';\nexport const inputPaste = 'input-paste';\nexport const focusOut = 'focus-out';\nexport const escapeKey = 'escape-key';\nexport const listNavigation = 'list-navigation';\nexport const keyboard = 'keyboard';\nexport const pointer = 'pointer';\nexport const drag = 'drag';\nexport const wheel = 'wheel';\nexport const scrub = 'scrub';\nexport const cancelOpen = 'cancel-open';\nexport const siblingOpen = 'sibling-open';\nexport const disabled = 'disabled';\nexport const imperativeAction = 'imperative-action';\nexport const windowResize = 'window-resize';","import { EMPTY_OBJECT } from \"./constants.js\";\nimport { REASONS } from \"./reasons.js\";\n\n/**\n * Maps a change `reason` string to the corresponding native event type.\n */\n\n/**\n * Details of custom change events emitted by Base UI components.\n */\n\n/**\n * Details of custom generic events emitted by Base UI components.\n */\n\n/**\n * Creates a Base UI event details object with the given reason and utilities\n * for preventing Base UI's internal event handling.\n */\nexport function createChangeEventDetails(reason, event, trigger, customProperties) {\n let canceled = false;\n let allowPropagation = false;\n const custom = customProperties ?? EMPTY_OBJECT;\n const details = {\n reason,\n event: event ?? new Event('base-ui'),\n cancel() {\n canceled = true;\n },\n allowPropagation() {\n allowPropagation = true;\n },\n get isCanceled() {\n return canceled;\n },\n get isPropagationAllowed() {\n return allowPropagation;\n },\n trigger,\n ...custom\n };\n return details;\n}\nexport function createGenericEventDetails(reason, event, customProperties) {\n const custom = customProperties ?? EMPTY_OBJECT;\n const details = {\n reason,\n event: event ?? new Event('base-ui'),\n ...custom\n };\n return details;\n}","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui-components/utils/useControlled';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { warn } from '@base-ui-components/utils/warn';\nimport { CompositeList } from \"../../composite/list/CompositeList.js\";\nimport { useDirection } from \"../../direction-provider/DirectionContext.js\";\nimport { AccordionRootContext } from \"./AccordionRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst rootStateAttributesMapping = {\n value: () => null\n};\n\n/**\n * Groups all parts of the accordion.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Accordion](https://base-ui.com/react/components/accordion)\n */\nexport const AccordionRoot = /*#__PURE__*/React.forwardRef(function AccordionRoot(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled = false,\n hiddenUntilFound: hiddenUntilFoundProp,\n keepMounted: keepMountedProp,\n loopFocus = true,\n onValueChange: onValueChangeProp,\n multiple = false,\n orientation = 'vertical',\n value: valueProp,\n defaultValue: defaultValueProp,\n ...elementProps\n } = componentProps;\n const direction = useDirection();\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useIsoLayoutEffect(() => {\n if (hiddenUntilFoundProp && keepMountedProp === false) {\n warn('The `keepMounted={false}` prop on a Accordion.Root will be ignored when using `hiddenUntilFound` since it requires Panels to remain mounted when closed.');\n }\n }, [hiddenUntilFoundProp, keepMountedProp]);\n }\n\n // memoized to allow omitting both defaultValue and value\n // which would otherwise trigger a warning in useControlled\n const defaultValue = React.useMemo(() => {\n if (valueProp === undefined) {\n return defaultValueProp ?? [];\n }\n return undefined;\n }, [valueProp, defaultValueProp]);\n const onValueChange = useStableCallback(onValueChangeProp);\n const accordionItemRefs = React.useRef([]);\n const [value, setValue] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Accordion',\n state: 'value'\n });\n const handleValueChange = useStableCallback((newValue, nextOpen) => {\n const details = createChangeEventDetails(REASONS.none);\n if (!multiple) {\n const nextValue = value[0] === newValue ? [] : [newValue];\n onValueChange(nextValue, details);\n if (details.isCanceled) {\n return;\n }\n setValue(nextValue);\n } else if (nextOpen) {\n const nextOpenValues = value.slice();\n nextOpenValues.push(newValue);\n onValueChange(nextOpenValues, details);\n if (details.isCanceled) {\n return;\n }\n setValue(nextOpenValues);\n } else {\n const nextOpenValues = value.filter(v => v !== newValue);\n onValueChange(nextOpenValues, details);\n if (details.isCanceled) {\n return;\n }\n setValue(nextOpenValues);\n }\n });\n const state = React.useMemo(() => ({\n value,\n disabled,\n orientation\n }), [value, disabled, orientation]);\n const contextValue = React.useMemo(() => ({\n accordionItemRefs,\n direction,\n disabled,\n handleValueChange,\n hiddenUntilFound: hiddenUntilFoundProp ?? false,\n keepMounted: keepMountedProp ?? false,\n loopFocus,\n orientation,\n state,\n value\n }), [direction, disabled, handleValueChange, hiddenUntilFoundProp, keepMountedProp, loopFocus, orientation, state, value]);\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n dir: direction,\n role: 'region'\n }, elementProps],\n stateAttributesMapping: rootStateAttributesMapping\n });\n return /*#__PURE__*/_jsx(AccordionRootContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: accordionItemRefs,\n children: element\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") AccordionRoot.displayName = \"AccordionRoot\";","import * as React from 'react';\n\n// https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\nexport const SafeReact = {\n ...React\n};","'use client';\n\nimport * as React from 'react';\nimport { SafeReact } from \"./safeReact.js\";\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride, prefix = 'mui') {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`${prefix}-${globalId}`);\n }\n }, [defaultId, prefix]);\n return id;\n}\nconst maybeReactUseId = SafeReact.useId;\n\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport function useId(idOverride, prefix) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride, prefix);\n}","'use client';\n\nimport { useId } from '@base-ui-components/utils/useId';\n\n/**\n * Wraps `useId` and prefixes generated `id`s with `base-ui-`\n * @param {string | undefined} idOverride overrides the generated id when provided\n * @returns {string | undefined}\n */\nexport function useBaseUiId(idOverride) {\n return useId(idOverride, 'base-ui');\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport { useRefWithInit } from \"./useRefWithInit.js\";\nimport { useOnMount } from \"./useOnMount.js\";\n/** Unlike `setTimeout`, rAF doesn't guarantee a positive integer return value, so we can't have\n * a monomorphic `uint` type with `0` meaning empty.\n * See warning note at:\n * https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame#return_value */\nconst EMPTY = null;\nlet LAST_RAF = globalThis.requestAnimationFrame;\nclass Scheduler {\n /* This implementation uses an array as a backing data-structure for frame callbacks.\n * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it\n * never calls the native `cancelAnimationFrame` if there are no frames left. This can\n * be much more efficient if there is a call pattern that alterns as\n * \"request-cancel-request-cancel-…\".\n * But in the case of \"request-request-…-cancel-cancel-…\", it leaves the final animation\n * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */\n\n callbacks = [];\n callbacksCount = 0;\n nextId = 1;\n startId = 1;\n isScheduled = false;\n tick = timestamp => {\n this.isScheduled = false;\n const currentCallbacks = this.callbacks;\n const currentCallbacksCount = this.callbacksCount;\n\n // Update these before iterating, callbacks could call `requestAnimationFrame` again.\n this.callbacks = [];\n this.callbacksCount = 0;\n this.startId = this.nextId;\n if (currentCallbacksCount > 0) {\n for (let i = 0; i < currentCallbacks.length; i += 1) {\n currentCallbacks[i]?.(timestamp);\n }\n }\n };\n request(fn) {\n const id = this.nextId;\n this.nextId += 1;\n this.callbacks.push(fn);\n this.callbacksCount += 1;\n\n /* In a test environment with fake timers, a fake `requestAnimationFrame` can be called\n * but there's no guarantee that the animation frame will actually run before the fake\n * timers are teared, which leaves `isScheduled` set, but won't run our `tick()`. */\n const didRAFChange = process.env.NODE_ENV === 'test' && LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true);\n if (!this.isScheduled || didRAFChange) {\n requestAnimationFrame(this.tick);\n this.isScheduled = true;\n }\n return id;\n }\n cancel(id) {\n const index = id - this.startId;\n if (index < 0 || index >= this.callbacks.length) {\n return;\n }\n this.callbacks[index] = null;\n this.callbacksCount -= 1;\n }\n}\nconst scheduler = new Scheduler();\nexport class AnimationFrame {\n static create() {\n return new AnimationFrame();\n }\n static request(fn) {\n return scheduler.request(fn);\n }\n static cancel(id) {\n return scheduler.cancel(id);\n }\n currentId = EMPTY;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n request(fn) {\n this.cancel();\n this.currentId = scheduler.request(() => {\n this.currentId = EMPTY;\n fn();\n });\n }\n cancel = () => {\n if (this.currentId !== EMPTY) {\n scheduler.cancel(this.currentId);\n this.currentId = EMPTY;\n }\n };\n disposeEffect = () => {\n return this.cancel;\n };\n}\n\n/**\n * A `requestAnimationFrame` with automatic cleanup and guard.\n */\nexport function useAnimationFrame() {\n const timeout = useRefWithInit(AnimationFrame.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","/**\n * If the provided argument is a ref object, returns its `current` value.\n * Otherwise, returns the argument itself.\n */\nexport function resolveRef(maybeRef) {\n if (maybeRef == null) {\n return maybeRef;\n }\n return 'current' in maybeRef ? maybeRef.current : maybeRef;\n}","'use client';\n\nimport * as ReactDOM from 'react-dom';\nimport { useAnimationFrame } from '@base-ui-components/utils/useAnimationFrame';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { resolveRef } from \"./resolveRef.js\";\n\n/**\n * Executes a function once all animations have finished on the provided element.\n * @param elementOrRef - The element to watch for animations.\n * @param waitForNextTick - Whether to wait for the next tick before checking for animations.\n * @param treatAbortedAsFinished - Whether to treat aborted animations as finished. If `false`, and there are aborted animations,\n * the function will check again if any new animations have started and wait for them to finish.\n * @returns A function that takes a callback to execute once all animations have finished, and an optional AbortSignal to abort the callback\n */\nexport function useAnimationsFinished(elementOrRef, waitForNextTick = false, treatAbortedAsFinished = true) {\n const frame = useAnimationFrame();\n return useStableCallback((fnToExecute,\n /**\n * An optional [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that\n * can be used to abort `fnToExecute` before all the animations have finished.\n * @default null\n */\n signal = null) => {\n frame.cancel();\n const element = resolveRef(elementOrRef);\n if (element == null) {\n return;\n }\n if (typeof element.getAnimations !== 'function' || globalThis.BASE_UI_ANIMATIONS_DISABLED) {\n fnToExecute();\n } else {\n frame.request(() => {\n function exec() {\n if (!element) {\n return;\n }\n Promise.all(element.getAnimations().map(anim => anim.finished)).then(() => {\n if (signal != null && signal.aborted) {\n return;\n }\n\n // Synchronously flush the unmounting of the component so that the browser doesn't\n // paint: https://github.com/mui/base-ui/issues/979\n ReactDOM.flushSync(fnToExecute);\n }).catch(() => {\n if (treatAbortedAsFinished) {\n if (signal != null && signal.aborted) {\n return;\n }\n ReactDOM.flushSync(fnToExecute);\n } else if (element.getAnimations().length > 0 && element.getAnimations().some(anim => anim.pending || anim.playState !== 'finished')) {\n // Sometimes animations can be aborted because a property they depend on changes while the animation plays.\n // In such cases, we need to re-check if any new animations have started.\n exec();\n }\n });\n }\n\n // `open: true` animations need to wait for the next tick to be detected\n if (waitForNextTick) {\n frame.request(exec);\n } else {\n exec();\n }\n });\n }\n });\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { AnimationFrame } from '@base-ui-components/utils/useAnimationFrame';\n/**\n * Provides a status string for CSS animations.\n * @param open - a boolean that determines if the element is open.\n * @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`\n */\nexport function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {\n const [transitionStatus, setTransitionStatus] = React.useState(open && enableIdleState ? 'idle' : undefined);\n const [mounted, setMounted] = React.useState(open);\n if (open && !mounted) {\n setMounted(true);\n setTransitionStatus('starting');\n }\n if (!open && mounted && transitionStatus !== 'ending' && !deferEndingState) {\n setTransitionStatus('ending');\n }\n if (!open && !mounted && transitionStatus === 'ending') {\n setTransitionStatus(undefined);\n }\n useIsoLayoutEffect(() => {\n if (!open && mounted && transitionStatus !== 'ending' && deferEndingState) {\n const frame = AnimationFrame.request(() => {\n setTransitionStatus('ending');\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }\n return undefined;\n }, [open, mounted, transitionStatus, deferEndingState]);\n useIsoLayoutEffect(() => {\n if (!open || enableIdleState) {\n return undefined;\n }\n const frame = AnimationFrame.request(() => {\n ReactDOM.flushSync(() => {\n setTransitionStatus(undefined);\n });\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open]);\n useIsoLayoutEffect(() => {\n if (!open || !enableIdleState) {\n return undefined;\n }\n if (open && mounted && transitionStatus !== 'idle') {\n setTransitionStatus('starting');\n }\n const frame = AnimationFrame.request(() => {\n setTransitionStatus('idle');\n });\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open, mounted, setTransitionStatus, transitionStatus]);\n return React.useMemo(() => ({\n mounted,\n setMounted,\n transitionStatus\n }), [mounted, transitionStatus]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui-components/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useAnimationsFinished } from \"../../utils/useAnimationsFinished.js\";\nimport { useTransitionStatus } from \"../../utils/useTransitionStatus.js\";\nexport function useCollapsibleRoot(parameters) {\n const {\n open: openParam,\n defaultOpen,\n onOpenChange,\n disabled\n } = parameters;\n const isControlled = openParam !== undefined;\n const [open, setOpen] = useControlled({\n controlled: openParam,\n default: defaultOpen,\n name: 'Collapsible',\n state: 'open'\n });\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open, true, true);\n const [visible, setVisible] = React.useState(open);\n const [{\n height,\n width\n }, setDimensions] = React.useState({\n height: undefined,\n width: undefined\n });\n const defaultPanelId = useBaseUiId();\n const [panelIdState, setPanelIdState] = React.useState();\n const panelId = panelIdState ?? defaultPanelId;\n const [hiddenUntilFound, setHiddenUntilFound] = React.useState(false);\n const [keepMounted, setKeepMounted] = React.useState(false);\n const abortControllerRef = React.useRef(null);\n const animationTypeRef = React.useRef(null);\n const transitionDimensionRef = React.useRef(null);\n const panelRef = React.useRef(null);\n const runOnceAnimationsFinish = useAnimationsFinished(panelRef, false);\n const handleTrigger = useStableCallback(event => {\n const nextOpen = !open;\n const eventDetails = createChangeEventDetails(REASONS.triggerPress, event.nativeEvent);\n onOpenChange(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n const panel = panelRef.current;\n if (animationTypeRef.current === 'css-animation' && panel != null) {\n panel.style.removeProperty('animation-name');\n }\n if (!hiddenUntilFound && !keepMounted) {\n if (animationTypeRef.current != null && animationTypeRef.current !== 'css-animation') {\n if (!mounted && nextOpen) {\n setMounted(true);\n }\n }\n if (animationTypeRef.current === 'css-animation') {\n if (!visible && nextOpen) {\n setVisible(true);\n }\n if (!mounted && nextOpen) {\n setMounted(true);\n }\n }\n }\n setOpen(nextOpen);\n if (animationTypeRef.current === 'none' && mounted && !nextOpen) {\n setMounted(false);\n }\n });\n useIsoLayoutEffect(() => {\n /**\n * Unmount immediately when closing in controlled mode and keepMounted={false}\n * and no CSS animations or transitions are applied\n */\n if (isControlled && animationTypeRef.current === 'none' && !keepMounted && !open) {\n setMounted(false);\n }\n }, [isControlled, keepMounted, open, openParam, setMounted]);\n return React.useMemo(() => ({\n abortControllerRef,\n animationTypeRef,\n disabled,\n handleTrigger,\n height,\n mounted,\n open,\n panelId,\n panelRef,\n runOnceAnimationsFinish,\n setDimensions,\n setHiddenUntilFound,\n setKeepMounted,\n setMounted,\n setOpen,\n setPanelIdState,\n setVisible,\n transitionDimensionRef,\n transitionStatus,\n visible,\n width\n }), [abortControllerRef, animationTypeRef, disabled, handleTrigger, height, mounted, open, panelId, panelRef, runOnceAnimationsFinish, setDimensions, setHiddenUntilFound, setKeepMounted, setMounted, setOpen, setVisible, transitionDimensionRef, transitionStatus, visible, width]);\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const CollapsibleRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") CollapsibleRootContext.displayName = \"CollapsibleRootContext\";\nexport function useCollapsibleRootContext() {\n const context = React.useContext(CollapsibleRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.' : _formatErrorMessage(15));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useCompositeListContext } from \"./CompositeListContext.js\";\nexport let IndexGuessBehavior = /*#__PURE__*/function (IndexGuessBehavior) {\n IndexGuessBehavior[IndexGuessBehavior[\"None\"] = 0] = \"None\";\n IndexGuessBehavior[IndexGuessBehavior[\"GuessFromOrder\"] = 1] = \"GuessFromOrder\";\n return IndexGuessBehavior;\n}({});\n\n/**\n * Used to register a list item and its index (DOM position) in the `CompositeList`.\n */\nexport function useCompositeListItem(params = {}) {\n const {\n label,\n metadata,\n textRef,\n indexGuessBehavior,\n index: externalIndex\n } = params;\n const {\n register,\n unregister,\n subscribeMapChange,\n elementsRef,\n labelsRef,\n nextIndexRef\n } = useCompositeListContext();\n const indexRef = React.useRef(-1);\n const [index, setIndex] = React.useState(externalIndex ?? (indexGuessBehavior === IndexGuessBehavior.GuessFromOrder ? () => {\n if (indexRef.current === -1) {\n const newIndex = nextIndexRef.current;\n nextIndexRef.current += 1;\n indexRef.current = newIndex;\n }\n return indexRef.current;\n } : -1));\n const componentRef = React.useRef(null);\n const ref = React.useCallback(node => {\n componentRef.current = node;\n if (index !== -1 && node !== null) {\n elementsRef.current[index] = node;\n if (labelsRef) {\n const isLabelDefined = label !== undefined;\n labelsRef.current[index] = isLabelDefined ? label : textRef?.current?.textContent ?? node.textContent;\n }\n }\n }, [index, elementsRef, labelsRef, label, textRef]);\n useIsoLayoutEffect(() => {\n if (externalIndex != null) {\n return undefined;\n }\n const node = componentRef.current;\n if (node) {\n register(node, metadata);\n return () => {\n unregister(node);\n };\n }\n return undefined;\n }, [externalIndex, register, unregister, metadata]);\n useIsoLayoutEffect(() => {\n if (externalIndex != null) {\n return undefined;\n }\n return subscribeMapChange(map => {\n const i = componentRef.current ? map.get(componentRef.current)?.index : null;\n if (i != null) {\n setIndex(i);\n }\n });\n }, [externalIndex, subscribeMapChange, setIndex]);\n return React.useMemo(() => ({\n ref,\n index\n }), [index, ref]);\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const AccordionItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") AccordionItemContext.displayName = \"AccordionItemContext\";\nexport function useAccordionItemContext() {\n const context = React.useContext(AccordionItemContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: AccordionItemContext is missing. Accordion parts must be placed within <Accordion.Item>.' : _formatErrorMessage(9));\n }\n return context;\n}","export let TransitionStatusDataAttributes = /*#__PURE__*/function (TransitionStatusDataAttributes) {\n /**\n * Present when the component is animating in.\n */\n TransitionStatusDataAttributes[\"startingStyle\"] = \"data-starting-style\";\n /**\n * Present when the component is animating out.\n */\n TransitionStatusDataAttributes[\"endingStyle\"] = \"data-ending-style\";\n return TransitionStatusDataAttributes;\n}({});\nconst STARTING_HOOK = {\n [TransitionStatusDataAttributes.startingStyle]: ''\n};\nconst ENDING_HOOK = {\n [TransitionStatusDataAttributes.endingStyle]: ''\n};\nexport const transitionStatusMapping = {\n transitionStatus(value) {\n if (value === 'starting') {\n return STARTING_HOOK;\n }\n if (value === 'ending') {\n return ENDING_HOOK;\n }\n return null;\n }\n};","import { TransitionStatusDataAttributes } from \"../../utils/stateAttributesMapping.js\";\nexport let CollapsiblePanelDataAttributes = function (CollapsiblePanelDataAttributes) {\n /**\n * Present when the collapsible panel is open.\n */\n CollapsiblePanelDataAttributes[\"open\"] = \"data-open\";\n /**\n * Present when the collapsible panel is closed.\n */\n CollapsiblePanelDataAttributes[\"closed\"] = \"data-closed\";\n /**\n * Present when the panel is animating in.\n */\n CollapsiblePanelDataAttributes[CollapsiblePanelDataAttributes[\"startingStyle\"] = TransitionStatusDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the panel is animating out.\n */\n CollapsiblePanelDataAttributes[CollapsiblePanelDataAttributes[\"endingStyle\"] = TransitionStatusDataAttributes.endingStyle] = \"endingStyle\";\n return CollapsiblePanelDataAttributes;\n}({});","export let CollapsibleTriggerDataAttributes = /*#__PURE__*/function (CollapsibleTriggerDataAttributes) {\n /**\n * Present when the collapsible panel is open.\n */\n CollapsibleTriggerDataAttributes[\"panelOpen\"] = \"data-panel-open\";\n return CollapsibleTriggerDataAttributes;\n}({});","import { CollapsiblePanelDataAttributes } from \"../collapsible/panel/CollapsiblePanelDataAttributes.js\";\nimport { CollapsibleTriggerDataAttributes } from \"../collapsible/trigger/CollapsibleTriggerDataAttributes.js\";\nconst PANEL_OPEN_HOOK = {\n [CollapsiblePanelDataAttributes.open]: ''\n};\nconst PANEL_CLOSED_HOOK = {\n [CollapsiblePanelDataAttributes.closed]: ''\n};\nexport const triggerOpenStateMapping = {\n open(value) {\n if (value) {\n return {\n [CollapsibleTriggerDataAttributes.panelOpen]: ''\n };\n }\n return null;\n }\n};\nexport const collapsibleOpenStateMapping = {\n open(value) {\n if (value) {\n return PANEL_OPEN_HOOK;\n }\n return PANEL_CLOSED_HOOK;\n }\n};","export let AccordionItemDataAttributes = /*#__PURE__*/function (AccordionItemDataAttributes) {\n /**\n * Indicates the index of the accordion item.\n * @type {number}\n */\n AccordionItemDataAttributes[\"index\"] = \"data-index\";\n /**\n * Present when the accordion item is disabled.\n */\n AccordionItemDataAttributes[\"disabled\"] = \"data-disabled\";\n /**\n * Present when the accordion item is open.\n */\n AccordionItemDataAttributes[\"open\"] = \"data-open\";\n return AccordionItemDataAttributes;\n}({});","import { collapsibleOpenStateMapping as baseMapping } from \"../../utils/collapsibleOpenStateMapping.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\nimport { AccordionItemDataAttributes } from \"./AccordionItemDataAttributes.js\";\nexport const accordionStateAttributesMapping = {\n ...baseMapping,\n index: value => {\n return Number.isInteger(value) ? {\n [AccordionItemDataAttributes.index]: String(value)\n } : null;\n },\n ...transitionStatusMapping,\n value: () => null\n};","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useMergedRefs } from '@base-ui-components/utils/useMergedRefs';\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { useCollapsibleRoot } from \"../../collapsible/root/useCollapsibleRoot.js\";\nimport { CollapsibleRootContext } from \"../../collapsible/root/CollapsibleRootContext.js\";\nimport { useCompositeListItem } from \"../../composite/list/useCompositeListItem.js\";\nimport { useAccordionRootContext } from \"../root/AccordionRootContext.js\";\nimport { AccordionItemContext } from \"./AccordionItemContext.js\";\nimport { accordionStateAttributesMapping } from \"./stateAttributesMapping.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Groups an accordion header with the corresponding panel.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Accordion](https://base-ui.com/react/components/accordion)\n */\nexport const AccordionItem = /*#__PURE__*/React.forwardRef(function AccordionItem(componentProps, forwardedRef) {\n const {\n className,\n disabled: disabledProp = false,\n onOpenChange: onOpenChangeProp,\n render,\n value: valueProp,\n ...elementProps\n } = componentProps;\n const {\n ref: listItemRef,\n index\n } = useCompositeListItem();\n const mergedRef = useMergedRefs(forwardedRef, listItemRef);\n const {\n disabled: contextDisabled,\n handleValueChange,\n state: rootState,\n value: openValues\n } = useAccordionRootContext();\n const fallbackValue = useBaseUiId();\n const value = valueProp ?? fallbackValue;\n const disabled = disabledProp || contextDisabled;\n const isOpen = React.useMemo(() => {\n if (!openValues) {\n return false;\n }\n for (let i = 0; i < openValues.length; i += 1) {\n if (openValues[i] === value) {\n return true;\n }\n }\n return false;\n }, [openValues, value]);\n const onOpenChange = useStableCallback((nextOpen, eventDetails) => {\n onOpenChangeProp?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n handleValueChange(value, nextOpen);\n });\n const collapsible = useCollapsibleRoot({\n open: isOpen,\n onOpenChange,\n disabled\n });\n const collapsibleState = React.useMemo(() => ({\n open: collapsible.open,\n disabled: collapsible.disabled,\n hidden: !collapsible.mounted,\n transitionStatus: collapsible.transitionStatus\n }), [collapsible.open, collapsible.disabled, collapsible.mounted, collapsible.transitionStatus]);\n const collapsibleContext = React.useMemo(() => ({\n ...collapsible,\n onOpenChange,\n state: collapsibleState\n }), [collapsible, collapsibleState, onOpenChange]);\n const state = React.useMemo(() => ({\n ...rootState,\n index,\n disabled,\n open: isOpen\n }), [disabled, index, isOpen, rootState]);\n const [triggerId, setTriggerId] = React.useState(useBaseUiId());\n const accordionItemContext = React.useMemo(() => ({\n open: isOpen,\n state,\n setTriggerId,\n triggerId\n }), [isOpen, state, setTriggerId, triggerId]);\n const element = useRenderElement('div', componentProps, {\n state,\n ref: mergedRef,\n props: elementProps,\n stateAttributesMapping: accordionStateAttributesMapping\n });\n return /*#__PURE__*/_jsx(CollapsibleRootContext.Provider, {\n value: collapsibleContext,\n children: /*#__PURE__*/_jsx(AccordionItemContext.Provider, {\n value: accordionItemContext,\n children: element\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") AccordionItem.displayName = \"AccordionItem\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useAccordionItemContext } from \"../item/AccordionItemContext.js\";\nimport { accordionStateAttributesMapping } from \"../item/stateAttributesMapping.js\";\n\n/**\n * A heading that labels the corresponding panel.\n * Renders an `<h3>` element.\n *\n * Documentation: [Base UI Accordion](https://base-ui.com/react/components/accordion)\n */\nexport const AccordionHeader = /*#__PURE__*/React.forwardRef(function AccordionHeader(componentProps, forwardedRef) {\n const {\n render,\n className,\n ...elementProps\n } = componentProps;\n const {\n state\n } = useAccordionItemContext();\n const element = useRenderElement('h3', componentProps, {\n state,\n ref: forwardedRef,\n props: elementProps,\n stateAttributesMapping: accordionStateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") AccordionHeader.displayName = \"AccordionHeader\";","export function isElementDisabled(element) {\n return element == null || element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true';\n}","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","let set;\nif (process.env.NODE_ENV !== 'production') {\n set = new Set();\n}\nexport function error(...messages) {\n if (process.env.NODE_ENV !== 'production') {\n const messageKey = messages.join(' ');\n if (!set.has(messageKey)) {\n set.add(messageKey);\n console.error(`Base UI: ${messageKey}`);\n }\n }\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const CompositeRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") CompositeRootContext.displayName = \"CompositeRootContext\";\nexport function useCompositeRootContext(optional = false) {\n const context = React.useContext(CompositeRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.' : _formatErrorMessage(16));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nexport function useFocusableWhenDisabled(parameters) {\n const {\n focusableWhenDisabled,\n disabled,\n composite = false,\n tabIndex: tabIndexProp = 0,\n isNativeButton\n } = parameters;\n const isFocusableComposite = composite && focusableWhenDisabled !== false;\n const isNonFocusableComposite = composite && focusableWhenDisabled === false;\n\n // we can't explicitly assign `undefined` to any of these props because it\n // would otherwise prevent subsequently merged props from setting them\n const props = React.useMemo(() => {\n const additionalProps = {\n // allow Tabbing away from focusableWhenDisabled elements\n onKeyDown(event) {\n if (disabled && focusableWhenDisabled && event.key !== 'Tab') {\n event.preventDefault();\n }\n }\n };\n if (!composite) {\n additionalProps.tabIndex = tabIndexProp;\n if (!isNativeButton && disabled) {\n additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;\n }\n }\n if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled) {\n additionalProps['aria-disabled'] = disabled;\n }\n if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {\n additionalProps.disabled = disabled;\n }\n return additionalProps;\n }, [composite, disabled, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);\n return {\n props\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { error } from '@base-ui-components/utils/error';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { makeEventPreventable, mergeProps } from \"../merge-props/index.js\";\nimport { useCompositeRootContext } from \"../composite/root/CompositeRootContext.js\";\nimport { useFocusableWhenDisabled } from \"../utils/useFocusableWhenDisabled.js\";\nexport function useButton(parameters = {}) {\n const {\n disabled = false,\n focusableWhenDisabled,\n tabIndex = 0,\n native: isNativeButton = true\n } = parameters;\n const elementRef = React.useRef(null);\n const isCompositeItem = useCompositeRootContext(true) !== undefined;\n const isValidLink = useStableCallback(() => {\n const element = elementRef.current;\n return Boolean(element?.tagName === 'A' && element?.href);\n });\n const {\n props: focusableWhenDisabledProps\n } = useFocusableWhenDisabled({\n focusableWhenDisabled,\n disabled,\n composite: isCompositeItem,\n tabIndex,\n isNativeButton\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (!elementRef.current) {\n return;\n }\n const isButtonTag = elementRef.current.tagName === 'BUTTON';\n if (isNativeButton) {\n if (!isButtonTag) {\n error('A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`.');\n }\n } else if (isButtonTag) {\n error('A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.');\n }\n }, [isNativeButton]);\n }\n\n // handles a disabled composite button rendering another button, e.g.\n // <Toolbar.Button disabled render={<Menu.Trigger />} />\n // the `disabled` prop needs to pass through 2 `useButton`s then finally\n // delete the `disabled` attribute from DOM\n const updateDisabled = React.useCallback(() => {\n const element = elementRef.current;\n if (!isButtonElement(element)) {\n return;\n }\n if (isCompositeItem && disabled && focusableWhenDisabledProps.disabled === undefined && element.disabled) {\n element.disabled = false;\n }\n }, [disabled, focusableWhenDisabledProps.disabled, isCompositeItem]);\n useIsoLayoutEffect(updateDisabled, [updateDisabled]);\n const getButtonProps = React.useCallback((externalProps = {}) => {\n const {\n onClick: externalOnClick,\n onMouseDown: externalOnMouseDown,\n onKeyUp: externalOnKeyUp,\n onKeyDown: externalOnKeyDown,\n onPointerDown: externalOnPointerDown,\n ...otherExternalProps\n } = externalProps;\n const type = isNativeButton ? 'button' : undefined;\n return mergeProps({\n type,\n onClick(event) {\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnClick?.(event);\n },\n onMouseDown(event) {\n if (!disabled) {\n externalOnMouseDown?.(event);\n }\n },\n onKeyDown(event) {\n if (!disabled) {\n makeEventPreventable(event);\n externalOnKeyDown?.(event);\n }\n if (event.baseUIHandlerPrevented) {\n return;\n }\n const shouldClick = event.target === event.currentTarget && !isNativeButton && !isValidLink() && !disabled;\n const isEnterKey = event.key === 'Enter';\n const isSpaceKey = event.key === ' ';\n\n // Keyboard accessibility for non interactive elements\n if (shouldClick) {\n if (isSpaceKey || isEnterKey) {\n event.preventDefault();\n }\n if (isEnterKey) {\n externalOnClick?.(event);\n }\n }\n },\n onKeyUp(event) {\n // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n // https://codesandbox.io/p/sandbox/button-keyup-preventdefault-dn7f0\n // Keyboard accessibility for non interactive elements\n if (!disabled) {\n makeEventPreventable(event);\n externalOnKeyUp?.(event);\n }\n if (event.baseUIHandlerPrevented) {\n return;\n }\n if (event.target === event.currentTarget && !isNativeButton && !disabled && event.key === ' ') {\n externalOnClick?.(event);\n }\n },\n onPointerDown(event) {\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnPointerDown?.(event);\n }\n }, !isNativeButton ? {\n role: 'button'\n } : undefined, focusableWhenDisabledProps, otherExternalProps);\n }, [disabled, focusableWhenDisabledProps, isNativeButton, isValidLink]);\n const buttonRef = useStableCallback(element => {\n elementRef.current = element;\n updateDisabled();\n });\n return {\n getButtonProps,\n buttonRef\n };\n}\nfunction isButtonElement(elem) {\n return isHTMLElement(elem) && elem.tagName === 'BUTTON';\n}","const hasNavigator = typeof navigator !== 'undefined';\nconst nav = getNavigatorData();\nconst platform = getPlatform();\nconst userAgent = getUserAgent();\nexport const isWebKit = typeof CSS === 'undefined' || !CSS.supports ? false : CSS.supports('-webkit-backdrop-filter:none');\nexport const isIOS =\n// iPads can claim to be MacIntel\nnav.platform === 'MacIntel' && nav.maxTouchPoints > 1 ? true : /iP(hone|ad|od)|iOS/.test(nav.platform);\nexport const isFirefox = hasNavigator && /firefox/i.test(userAgent);\nexport const isSafari = hasNavigator && /apple/i.test(navigator.vendor);\nexport const isEdge = hasNavigator && /Edg/i.test(userAgent);\nexport const isAndroid = hasNavigator && /android/i.test(platform) || /android/i.test(userAgent);\nexport const isMac = hasNavigator && platform.toLowerCase().startsWith('mac') && !navigator.maxTouchPoints;\nexport const isJSDOM = userAgent.includes('jsdom/');\n\n// Avoid Chrome DevTools blue warning.\nfunction getNavigatorData() {\n if (!hasNavigator) {\n return {\n platform: '',\n maxTouchPoints: -1\n };\n }\n const uaData = navigator.userAgentData;\n if (uaData?.platform) {\n return {\n platform: uaData.platform,\n maxTouchPoints: navigator.maxTouchPoints\n };\n }\n return {\n platform: navigator.platform ?? '',\n maxTouchPoints: navigator.maxTouchPoints ?? -1\n };\n}\nfunction getUserAgent() {\n if (!hasNavigator) {\n return '';\n }\n const uaData = navigator.userAgentData;\n if (uaData && Array.isArray(uaData.brands)) {\n return uaData.brands.map(({\n brand,\n version\n }) => `${brand}/${version}`).join(' ');\n }\n return navigator.userAgent;\n}\nfunction getPlatform() {\n if (!hasNavigator) {\n return '';\n }\n const uaData = navigator.userAgentData;\n if (uaData?.platform) {\n return uaData.platform;\n }\n return navigator.platform ?? '';\n}","export const FOCUSABLE_ATTRIBUTE = 'data-base-ui-focusable';\nexport const ACTIVE_KEY = 'active';\nexport const SELECTED_KEY = 'selected';\nexport const TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';","import { isHTMLElement, isShadowRoot } from '@floating-ui/utils/dom';\nimport { isJSDOM } from '@base-ui-components/utils/detectBrowser';\nimport { FOCUSABLE_ATTRIBUTE, TYPEABLE_SELECTOR } from \"./constants.js\";\nexport function activeElement(doc) {\n let element = doc.activeElement;\n while (element?.shadowRoot?.activeElement != null) {\n element = element.shadowRoot.activeElement;\n }\n return element;\n}\nexport function contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode?.();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\nexport function getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nexport function isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const eventAgain = event;\n return eventAgain.target != null && node.contains(eventAgain.target);\n}\nexport function isRootElement(element) {\n return element.matches('html,body');\n}\nexport function getDocument(node) {\n return node?.ownerDocument || document;\n}\nexport function isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nexport function isTypeableCombobox(element) {\n if (!element) {\n return false;\n }\n return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\nexport function matchesFocusVisible(element) {\n // We don't want to block focus from working with `visibleOnly`\n // (JSDOM doesn't match `:focus-visible` when the element has `:focus`)\n if (!element || isJSDOM) {\n return true;\n }\n try {\n return element.matches(':focus-visible');\n } catch (_e) {\n return true;\n }\n}\nexport function getFloatingFocusElement(floatingElement) {\n if (!floatingElement) {\n return null;\n }\n // Try to find the element that has `{...getFloatingProps()}` spread on it.\n // This indicates the floating element is acting as a positioning wrapper, and\n // so focus should be managed on the child element with the event handlers and\n // aria props.\n return floatingElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? floatingElement : floatingElement.querySelector(`[${FOCUSABLE_ATTRIBUTE}]`) || floatingElement;\n}","/* eslint-disable @typescript-eslint/no-loop-func */\n\nexport function getNodeChildren(nodes, id, onlyOpenChildren = true) {\n const directChildren = nodes.filter(node => node.parentId === id && (!onlyOpenChildren || node.context?.open));\n return directChildren.flatMap(child => [child, ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);\n}\nexport function getDeepestNode(nodes, id) {\n let deepestNodeId;\n let maxDepth = -1;\n function findDeepest(nodeId, depth) {\n if (depth > maxDepth) {\n deepestNodeId = nodeId;\n maxDepth = depth;\n }\n const children = getNodeChildren(nodes, nodeId);\n children.forEach(child => {\n findDeepest(child.id, depth + 1);\n });\n }\n findDeepest(id, 0);\n return nodes.find(node => node.id === deepestNodeId);\n}\nexport function getNodeAncestors(nodes, id) {\n let allAncestors = [];\n let currentParentId = nodes.find(node => node.id === id)?.parentId;\n while (currentParentId) {\n const currentNode = nodes.find(node => node.id === currentParentId);\n currentParentId = currentNode?.parentId;\n if (currentNode) {\n allAncestors = allAncestors.concat(currentNode);\n }\n }\n return allAncestors;\n}","import { isAndroid, isJSDOM } from '@base-ui-components/utils/detectBrowser';\nexport function stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\nexport function isReactEvent(event) {\n return 'nativeEvent' in event;\n}\n\n// License: https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/utils/src/isVirtualEvent.ts\nexport function isVirtualClick(event) {\n // FIXME: Firefox is now emitting a deprecation warning for `mozInputSource`.\n // Try to find a workaround for this. `react-aria` source still has the check.\n if (event.mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n if (isAndroid && event.pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n return event.detail === 0 && !event.pointerType;\n}\nexport function isVirtualPointerEvent(event) {\n if (isJSDOM) {\n return false;\n }\n return !isAndroid && event.width === 0 && event.height === 0 || isAndroid && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||\n // iOS VoiceOver returns 0.333• for width/height.\n event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';\n}\nexport function isMouseLikePointerType(pointerType, strict) {\n // On some Linux machines with Chromium, mouse inputs return a `pointerType`\n // of \"pen\": https://github.com/floating-ui/floating-ui/issues/2015\n const values = ['mouse', 'pen'];\n if (!strict) {\n values.push('', undefined);\n }\n return values.includes(pointerType);\n}","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nconst yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);\nfunction getSideAxis(placement) {\n return yAxisSides.has(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport { floor } from '@floating-ui/utils';\nimport { stopEvent } from \"./event.js\";\nimport { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from \"./constants.js\";\nexport function isDifferentGridRow(index, cols, prevRow) {\n return Math.floor(index / cols) !== prevRow;\n}\nexport function isIndexOutOfListBounds(listRef, index) {\n return index < 0 || index >= listRef.current.length;\n}\nexport function getMinListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef, {\n disabledIndices\n });\n}\nexport function getMaxListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef, {\n decrement: true,\n startingIndex: listRef.current.length,\n disabledIndices\n });\n}\nexport function findNonDisabledListIndex(listRef, {\n startingIndex = -1,\n decrement = false,\n disabledIndices,\n amount = 1\n} = {}) {\n let index = startingIndex;\n do {\n index += decrement ? -amount : amount;\n } while (index >= 0 && index <= listRef.current.length - 1 && isListIndexDisabled(listRef, index, disabledIndices));\n return index;\n}\nexport function getGridNavigatedIndex(listRef, {\n event,\n orientation,\n loopFocus,\n rtl,\n cols,\n disabledIndices,\n minIndex,\n maxIndex,\n prevIndex,\n stopEvent: stop = false\n}) {\n let nextIndex = prevIndex;\n\n // ---------------------------------------------------------------------------\n // Detect row structure based on DOM. This works when items are grouped inside\n // elements that declare `role=\"row\"` (e.g., Combobox.Row). We build a matrix\n // where each entry is the array of item indices for that visual row. The\n // algorithm gracefully falls back to regular `cols`-based handling when no\n // row structure can be detected.\n // ---------------------------------------------------------------------------\n const rows = [];\n const rowIndexMap = {};\n let hasRoleRow = false;\n {\n let currentRowEl = null;\n let currentRowIndex = -1;\n listRef.current.forEach((el, idx) => {\n if (el == null) {\n return;\n }\n const rowEl = el.closest('[role=\"row\"]');\n if (rowEl) {\n hasRoleRow = true;\n }\n if (rowEl !== currentRowEl || currentRowIndex === -1) {\n currentRowEl = rowEl;\n currentRowIndex += 1;\n rows[currentRowIndex] = [];\n }\n rows[currentRowIndex].push(idx);\n rowIndexMap[idx] = currentRowIndex;\n });\n }\n const hasDomRows = hasRoleRow && rows.length > 0 && rows.some(row => row.length !== cols);\n function navigateVertically(direction) {\n if (!hasDomRows || prevIndex === -1) {\n return undefined;\n }\n const currentRow = rowIndexMap[prevIndex];\n if (currentRow == null) {\n return undefined;\n }\n const colInRow = rows[currentRow].indexOf(prevIndex);\n let nextRow = direction === 'up' ? currentRow - 1 : currentRow + 1;\n if (loopFocus) {\n if (nextRow < 0) {\n nextRow = rows.length - 1;\n } else if (nextRow >= rows.length) {\n nextRow = 0;\n }\n }\n const visited = new Set();\n while (nextRow >= 0 && nextRow < rows.length && !visited.has(nextRow)) {\n visited.add(nextRow);\n const targetRow = rows[nextRow];\n if (targetRow.length === 0) {\n nextRow = direction === 'up' ? nextRow - 1 : nextRow + 1;\n continue;\n }\n const clampedCol = Math.min(colInRow, targetRow.length - 1);\n // Start from the preferred column, fallback leftwards until first\n // enabled item is found.\n for (let col = clampedCol; col >= 0; col -= 1) {\n const candidate = targetRow[col];\n if (!isListIndexDisabled(listRef, candidate, disabledIndices)) {\n return candidate;\n }\n }\n // Row had no enabled items, move to next row in the same direction.\n nextRow = direction === 'up' ? nextRow - 1 : nextRow + 1;\n if (loopFocus) {\n if (nextRow < 0) {\n nextRow = rows.length - 1;\n } else if (nextRow >= rows.length) {\n nextRow = 0;\n }\n }\n }\n return undefined;\n }\n if (event.key === ARROW_UP) {\n const domBasedCandidate = navigateVertically('up');\n if (domBasedCandidate !== undefined) {\n if (stop) {\n stopEvent(event);\n }\n nextIndex = domBasedCandidate;\n } else {\n // fallback to original logic\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex === -1) {\n nextIndex = maxIndex;\n } else {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: nextIndex,\n amount: cols,\n decrement: true,\n disabledIndices\n });\n if (loopFocus && (prevIndex - cols < minIndex || nextIndex < 0)) {\n const col = prevIndex % cols;\n const maxCol = maxIndex % cols;\n const offset = maxIndex - (maxCol - col);\n if (maxCol === col) {\n nextIndex = maxIndex;\n } else {\n nextIndex = maxCol > col ? offset : offset - cols;\n }\n }\n }\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n }\n if (event.key === ARROW_DOWN) {\n const domBasedCandidate = navigateVertically('down');\n if (domBasedCandidate !== undefined) {\n if (stop) {\n stopEvent(event);\n }\n nextIndex = domBasedCandidate;\n } else {\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex === -1) {\n nextIndex = minIndex;\n } else {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n amount: cols,\n disabledIndices\n });\n if (loopFocus && prevIndex + cols > maxIndex) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex % cols - cols,\n amount: cols,\n disabledIndices\n });\n }\n }\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n }\n\n // Remains on the same row/column.\n if (orientation === 'both') {\n const prevRow = floor(prevIndex / cols);\n if (event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT)) {\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex % cols !== cols - 1) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n disabledIndices\n });\n if (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n } else if (loopFocus) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)) {\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex % cols !== 0) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n decrement: true,\n disabledIndices\n });\n if (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n } else if (loopFocus) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n const lastRow = floor(maxIndex / cols) === prevRow;\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n if (loopFocus && lastRow) {\n nextIndex = event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT) ? maxIndex : findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n } else {\n nextIndex = prevIndex;\n }\n }\n }\n return nextIndex;\n}\n\n/** For each cell index, gets the item index that occupies that cell */\nexport function createGridCellMap(sizes, cols, dense) {\n const cellMap = [];\n let startIndex = 0;\n sizes.forEach(({\n width,\n height\n }, index) => {\n if (width > cols) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `[Floating UI]: Invalid grid - item width at index ${index} is greater than grid columns` : _formatErrorMessage(29, index));\n }\n }\n let itemPlaced = false;\n if (dense) {\n startIndex = 0;\n }\n while (!itemPlaced) {\n const targetCells = [];\n for (let i = 0; i < width; i += 1) {\n for (let j = 0; j < height; j += 1) {\n targetCells.push(startIndex + i + j * cols);\n }\n }\n if (startIndex % cols + width <= cols && targetCells.every(cell => cellMap[cell] == null)) {\n targetCells.forEach(cell => {\n cellMap[cell] = index;\n });\n itemPlaced = true;\n } else {\n startIndex += 1;\n }\n }\n });\n\n // convert into a non-sparse array\n return [...cellMap];\n}\n\n/** Gets cell index of an item's corner or -1 when index is -1. */\nexport function getGridCellIndexOfCorner(index, sizes, cellMap, cols, corner) {\n if (index === -1) {\n return -1;\n }\n const firstCellIndex = cellMap.indexOf(index);\n const sizeItem = sizes[index];\n switch (corner) {\n case 'tl':\n return firstCellIndex;\n case 'tr':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + sizeItem.width - 1;\n case 'bl':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + (sizeItem.height - 1) * cols;\n case 'br':\n return cellMap.lastIndexOf(index);\n default:\n return -1;\n }\n}\n\n/** Gets all cell indices that correspond to the specified indices */\nexport function getGridCellIndices(indices, cellMap) {\n return cellMap.flatMap((index, cellIndex) => indices.includes(index) ? [cellIndex] : []);\n}\nexport function isListIndexDisabled(listRef, index, disabledIndices) {\n if (typeof disabledIndices === 'function') {\n return disabledIndices(index);\n }\n if (disabledIndices) {\n return disabledIndices.includes(index);\n }\n const element = listRef.current[index];\n if (!element) {\n return false;\n }\n return element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true';\n}","/*!\n* tabbable 6.3.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar _isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && _isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (_isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (_isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = _getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n if (displayCheck === 'full-native') {\n if ('checkVisibility' in node) {\n // Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility\n var visible = node.checkVisibility({\n // Checking opacity might be desirable for some use cases, but natively,\n // opacity zero elements _are_ focusable and tabbable.\n checkOpacity: false,\n opacityProperty: false,\n contentVisibilityAuto: true,\n visibilityProperty: true,\n // This is an alias for `visibilityProperty`. Contemporary browsers\n // support both. However, this alias has wider browser support (Chrome\n // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so\n // we include it anyway.\n checkVisibilityCSS: true\n });\n return !visible;\n }\n // Fall through to manual visibility checks\n }\n\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' ||\n // full-native can run this branch when it falls through in case\n // Element#checkVisibility is unsupported\n displayCheck === 'full-native' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n _isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar _sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? _sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return _sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","import { tabbable } from 'tabbable';\nimport { activeElement, contains, getDocument } from \"./element.js\";\nexport const getTabbableOptions = () => ({\n getShadowRoot: true,\n displayCheck:\n // JSDOM does not support the `tabbable` library. To solve this we can\n // check if `ResizeObserver` is a real function (not polyfilled), which\n // determines if the current environment is JSDOM-like.\n typeof ResizeObserver === 'function' && ResizeObserver.toString().includes('[native code]') ? 'full' : 'none'\n});\nfunction getTabbableIn(container, dir) {\n const list = tabbable(container, getTabbableOptions());\n const len = list.length;\n if (len === 0) {\n return undefined;\n }\n const active = activeElement(getDocument(container));\n const index = list.indexOf(active);\n // eslint-disable-next-line no-nested-ternary\n const nextIndex = index === -1 ? dir === 1 ? 0 : len - 1 : index + dir;\n return list[nextIndex];\n}\nexport function getNextTabbable(referenceElement) {\n return getTabbableIn(getDocument(referenceElement).body, 1) || referenceElement;\n}\nexport function getPreviousTabbable(referenceElement) {\n return getTabbableIn(getDocument(referenceElement).body, -1) || referenceElement;\n}\nfunction getTabbableNearElement(referenceElement, dir) {\n if (!referenceElement) {\n return null;\n }\n const list = tabbable(getDocument(referenceElement).body, getTabbableOptions());\n const elementCount = list.length;\n if (elementCount === 0) {\n return null;\n }\n const index = list.indexOf(referenceElement);\n if (index === -1) {\n return null;\n }\n const nextIndex = (index + dir + elementCount) % elementCount;\n return list[nextIndex];\n}\nexport function getTabbableAfterElement(referenceElement) {\n return getTabbableNearElement(referenceElement, 1);\n}\nexport function getTabbableBeforeElement(referenceElement) {\n return getTabbableNearElement(referenceElement, -1);\n}\nexport function isOutsideEvent(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nexport function disableFocusInside(container) {\n const tabbableElements = tabbable(container, getTabbableOptions());\n tabbableElements.forEach(element => {\n element.dataset.tabindex = element.getAttribute('tabindex') || '';\n element.setAttribute('tabindex', '-1');\n });\n}\nexport function enableFocusInside(container) {\n const elements = container.querySelectorAll('[data-tabindex]');\n elements.forEach(element => {\n const tabindex = element.dataset.tabindex;\n delete element.dataset.tabindex;\n if (tabindex) {\n element.setAttribute('tabindex', tabindex);\n } else {\n element.removeAttribute('tabindex');\n }\n });\n}","import { isHTMLElement } from '@floating-ui/utils/dom';\nexport { stopEvent, isIndexOutOfListBounds, isListIndexDisabled, createGridCellMap, findNonDisabledListIndex, getGridCellIndexOfCorner, getGridCellIndices, getGridNavigatedIndex, getMaxListIndex, getMinListIndex } from \"../floating-ui-react/utils.js\";\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const HOME = 'Home';\nexport const END = 'End';\nexport const HORIZONTAL_KEYS = new Set([ARROW_LEFT, ARROW_RIGHT]);\nexport const HORIZONTAL_KEYS_WITH_EXTRA_KEYS = new Set([ARROW_LEFT, ARROW_RIGHT, HOME, END]);\nexport const VERTICAL_KEYS = new Set([ARROW_UP, ARROW_DOWN]);\nexport const VERTICAL_KEYS_WITH_EXTRA_KEYS = new Set([ARROW_UP, ARROW_DOWN, HOME, END]);\nexport const ARROW_KEYS = new Set([...HORIZONTAL_KEYS, ...VERTICAL_KEYS]);\nexport const ALL_KEYS = new Set([...ARROW_KEYS, HOME, END]);\nexport const COMPOSITE_KEYS = new Set([ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, HOME, END]);\nexport const SHIFT = 'Shift';\nexport const CONTROL = 'Control';\nexport const ALT = 'Alt';\nexport const META = 'Meta';\nexport const MODIFIER_KEYS = new Set([SHIFT, CONTROL, ALT, META]);\nfunction isInputElement(element) {\n return isHTMLElement(element) && element.tagName === 'INPUT';\n}\nexport function isNativeInput(element) {\n if (isInputElement(element) && element.selectionStart != null) {\n return true;\n }\n if (isHTMLElement(element) && element.tagName === 'TEXTAREA') {\n return true;\n }\n return false;\n}\nexport function scrollIntoViewIfNeeded(scrollContainer, element, direction, orientation) {\n if (!scrollContainer || !element || !element.scrollTo) {\n return;\n }\n let targetX = scrollContainer.scrollLeft;\n let targetY = scrollContainer.scrollTop;\n const isOverflowingX = scrollContainer.clientWidth < scrollContainer.scrollWidth;\n const isOverflowingY = scrollContainer.clientHeight < scrollContainer.scrollHeight;\n if (isOverflowingX && orientation !== 'vertical') {\n const elementOffsetLeft = getOffset(scrollContainer, element, 'left');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (direction === 'ltr') {\n if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n } else if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n }\n }\n if (direction === 'rtl') {\n if (elementOffsetLeft - elementStyles.scrollMarginRight < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {\n // overflow to the left, scroll to align left edges\n targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;\n } else if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {\n // overflow to the right, scroll to align right edges\n targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;\n }\n }\n }\n if (isOverflowingY && orientation !== 'horizontal') {\n const elementOffsetTop = getOffset(scrollContainer, element, 'top');\n const containerStyles = getStyles(scrollContainer);\n const elementStyles = getStyles(element);\n if (elementOffsetTop - elementStyles.scrollMarginTop < scrollContainer.scrollTop + containerStyles.scrollPaddingTop) {\n // overflow upwards, align top edges\n targetY = elementOffsetTop - elementStyles.scrollMarginTop - containerStyles.scrollPaddingTop;\n } else if (elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom > scrollContainer.scrollTop + scrollContainer.clientHeight - containerStyles.scrollPaddingBottom) {\n // overflow downwards, align bottom edges\n targetY = elementOffsetTop + element.offsetHeight + elementStyles.scrollMarginBottom - scrollContainer.clientHeight + containerStyles.scrollPaddingBottom;\n }\n }\n scrollContainer.scrollTo({\n left: targetX,\n top: targetY,\n behavior: 'auto'\n });\n}\nfunction getOffset(ancestor, element, side) {\n const propName = side === 'left' ? 'offsetLeft' : 'offsetTop';\n let result = 0;\n while (element.offsetParent) {\n result += element[propName];\n if (element.offsetParent === ancestor) {\n break;\n }\n element = element.offsetParent;\n }\n return result;\n}\nfunction getStyles(element) {\n const styles = getComputedStyle(element);\n return {\n scrollMarginTop: parseFloat(styles.scrollMarginTop) || 0,\n scrollMarginRight: parseFloat(styles.scrollMarginRight) || 0,\n scrollMarginBottom: parseFloat(styles.scrollMarginBottom) || 0,\n scrollMarginLeft: parseFloat(styles.scrollMarginLeft) || 0,\n scrollPaddingTop: parseFloat(styles.scrollPaddingTop) || 0,\n scrollPaddingRight: parseFloat(styles.scrollPaddingRight) || 0,\n scrollPaddingBottom: parseFloat(styles.scrollPaddingBottom) || 0,\n scrollPaddingLeft: parseFloat(styles.scrollPaddingLeft) || 0\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { isElementDisabled } from '@base-ui-components/utils/isElementDisabled';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { triggerOpenStateMapping } from \"../../utils/collapsibleOpenStateMapping.js\";\nimport { useButton } from \"../../use-button/index.js\";\nimport { useCollapsibleRootContext } from \"../../collapsible/root/CollapsibleRootContext.js\";\nimport { ARROW_DOWN, ARROW_UP, ARROW_RIGHT, ARROW_LEFT, HOME, END, stopEvent } from \"../../composite/composite.js\";\nimport { useAccordionRootContext } from \"../root/AccordionRootContext.js\";\nimport { useAccordionItemContext } from \"../item/AccordionItemContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nconst SUPPORTED_KEYS = new Set([ARROW_DOWN, ARROW_UP, ARROW_RIGHT, ARROW_LEFT, HOME, END]);\nfunction getActiveTriggers(accordionItemRefs) {\n const {\n current: accordionItemElements\n } = accordionItemRefs;\n const output = [];\n for (let i = 0; i < accordionItemElements.length; i += 1) {\n const section = accordionItemElements[i];\n if (!isElementDisabled(section)) {\n const trigger = section?.querySelector('[type=\"button\"]');\n if (!isElementDisabled(trigger)) {\n output.push(trigger);\n }\n }\n }\n return output;\n}\n\n/**\n * A button that opens and closes the corresponding panel.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Accordion](https://base-ui.com/react/components/accordion)\n */\n\nexport const AccordionTrigger = /*#__PURE__*/React.forwardRef(function AccordionTrigger(componentProps, forwardedRef) {\n const {\n disabled: disabledProp,\n className,\n id: idProp,\n render,\n nativeButton = true,\n ...elementProps\n } = componentProps;\n const {\n panelId,\n open,\n handleTrigger,\n disabled: contextDisabled\n } = useCollapsibleRootContext();\n const disabled = disabledProp ?? contextDisabled;\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton\n });\n const {\n accordionItemRefs,\n direction,\n loopFocus,\n orientation\n } = useAccordionRootContext();\n const isRtl = direction === 'rtl';\n const isHorizontal = orientation === 'horizontal';\n const {\n state,\n setTriggerId,\n triggerId: id\n } = useAccordionItemContext();\n useIsoLayoutEffect(() => {\n if (idProp) {\n setTriggerId(idProp);\n }\n return () => {\n setTriggerId(undefined);\n };\n }, [idProp, setTriggerId]);\n const props = React.useMemo(() => ({\n 'aria-controls': open ? panelId : undefined,\n 'aria-expanded': open,\n disabled,\n id,\n onClick: handleTrigger,\n onKeyDown(event) {\n if (!SUPPORTED_KEYS.has(event.key)) {\n return;\n }\n stopEvent(event);\n const triggers = getActiveTriggers(accordionItemRefs);\n const numOfEnabledTriggers = triggers.length;\n const lastIndex = numOfEnabledTriggers - 1;\n let nextIndex = -1;\n const thisIndex = triggers.indexOf(event.target);\n function toNext() {\n if (loopFocus) {\n nextIndex = thisIndex + 1 > lastIndex ? 0 : thisIndex + 1;\n } else {\n nextIndex = Math.min(thisIndex + 1, lastIndex);\n }\n }\n function toPrev() {\n if (loopFocus) {\n nextIndex = thisIndex === 0 ? lastIndex : thisIndex - 1;\n } else {\n nextIndex = thisIndex - 1;\n }\n }\n switch (event.key) {\n case ARROW_DOWN:\n if (!isHorizontal) {\n toNext();\n }\n break;\n case ARROW_UP:\n if (!isHorizontal) {\n toPrev();\n }\n break;\n case ARROW_RIGHT:\n if (isHorizontal) {\n if (isRtl) {\n toPrev();\n } else {\n toNext();\n }\n }\n break;\n case ARROW_LEFT:\n if (isHorizontal) {\n if (isRtl) {\n toNext();\n } else {\n toPrev();\n }\n }\n break;\n case 'Home':\n nextIndex = 0;\n break;\n case 'End':\n nextIndex = lastIndex;\n break;\n default:\n break;\n }\n if (nextIndex > -1) {\n triggers[nextIndex].focus();\n }\n }\n }), [accordionItemRefs, disabled, handleTrigger, id, isHorizontal, isRtl, loopFocus, open, panelId]);\n const element = useRenderElement('button', componentProps, {\n state,\n ref: [forwardedRef, buttonRef],\n props: [props, elementProps, getButtonProps],\n stateAttributesMapping: triggerOpenStateMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") AccordionTrigger.displayName = \"AccordionTrigger\";","export let AccordionRootDataAttributes = /*#__PURE__*/function (AccordionRootDataAttributes) {\n /**\n * Present when the accordion is disabled.\n */\n AccordionRootDataAttributes[\"disabled\"] = \"data-disabled\";\n /**\n * Indicates the orientation of the accordion.\n */\n AccordionRootDataAttributes[\"orientation\"] = \"data-orientation\";\n return AccordionRootDataAttributes;\n}({});","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useMergedRefs } from '@base-ui-components/utils/useMergedRefs';\nimport { useOnMount } from '@base-ui-components/utils/useOnMount';\nimport { AnimationFrame, useAnimationFrame } from '@base-ui-components/utils/useAnimationFrame';\nimport { warn } from '@base-ui-components/utils/warn';\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { CollapsiblePanelDataAttributes } from \"./CollapsiblePanelDataAttributes.js\";\nimport { AccordionRootDataAttributes } from \"../../accordion/root/AccordionRootDataAttributes.js\";\nexport function useCollapsiblePanel(parameters) {\n const {\n abortControllerRef,\n animationTypeRef,\n externalRef,\n height,\n hiddenUntilFound,\n keepMounted,\n id: idParam,\n mounted,\n onOpenChange,\n open,\n panelRef,\n runOnceAnimationsFinish,\n setDimensions,\n setMounted,\n setOpen,\n setVisible,\n transitionDimensionRef,\n visible,\n width\n } = parameters;\n const isBeforeMatchRef = React.useRef(false);\n const latestAnimationNameRef = React.useRef(null);\n const shouldCancelInitialOpenAnimationRef = React.useRef(open);\n const shouldCancelInitialOpenTransitionRef = React.useRef(open);\n const endingStyleFrame = useAnimationFrame();\n\n /**\n * When opening, the `hidden` attribute is removed immediately.\n * When closing, the `hidden` attribute is set after any exit animations runs.\n */\n const hidden = React.useMemo(() => {\n if (animationTypeRef.current === 'css-animation') {\n return !visible;\n }\n return !open && !mounted;\n }, [open, mounted, visible, animationTypeRef]);\n\n /**\n * When `keepMounted` is `true` this runs once as soon as it exists in the DOM\n * regardless of initial open state.\n *\n * When `keepMounted` is `false` this runs on every mount, typically every\n * time it opens. If the panel is in the middle of a close transition that is\n * interrupted and re-opens, this won't run as the panel was not unmounted.\n */\n const handlePanelRef = useStableCallback(element => {\n if (!element) {\n return undefined;\n }\n if (animationTypeRef.current == null || transitionDimensionRef.current == null) {\n const panelStyles = getComputedStyle(element);\n const hasAnimation = panelStyles.animationName !== 'none' && panelStyles.animationName !== '';\n const hasTransition = panelStyles.transitionDuration !== '0s' && panelStyles.transitionDuration !== '';\n\n /**\n * animationTypeRef is safe to read in render because it's only ever set\n * once here during the first render and never again.\n * https://react.dev/learn/referencing-values-with-refs#best-practices-for-refs\n */\n if (hasAnimation && hasTransition) {\n if (process.env.NODE_ENV !== 'production') {\n warn('CSS transitions and CSS animations both detected on Collapsible or Accordion panel.', 'Only one of either animation type should be used.');\n }\n } else if (panelStyles.animationName === 'none' && panelStyles.transitionDuration !== '0s') {\n animationTypeRef.current = 'css-transition';\n } else if (panelStyles.animationName !== 'none' && panelStyles.transitionDuration === '0s') {\n animationTypeRef.current = 'css-animation';\n } else {\n animationTypeRef.current = 'none';\n }\n\n /**\n * We need to know in advance which side is being collapsed when using CSS\n * transitions in order to set the value of width/height to `0px` momentarily.\n * Setting both to `0px` will break layout.\n */\n if (element.getAttribute(AccordionRootDataAttributes.orientation) === 'horizontal' || panelStyles.transitionProperty.indexOf('width') > -1) {\n transitionDimensionRef.current = 'width';\n } else {\n transitionDimensionRef.current = 'height';\n }\n }\n if (animationTypeRef.current !== 'css-transition') {\n return undefined;\n }\n if (height === undefined || width === undefined) {\n setDimensions({\n height: element.scrollHeight,\n width: element.scrollWidth\n });\n if (shouldCancelInitialOpenTransitionRef.current) {\n element.style.setProperty('transition-duration', '0s');\n }\n }\n let frame = -1;\n let nextFrame = -1;\n frame = AnimationFrame.request(() => {\n shouldCancelInitialOpenTransitionRef.current = false;\n nextFrame = AnimationFrame.request(() => {\n /**\n * This is slightly faster than another RAF and is the earliest\n * opportunity to remove the temporary `transition-duration: 0s` that\n * was applied to cancel opening transitions of initially open panels.\n * https://nolanlawson.com/2018/09/25/accurately-measuring-layout-on-the-web/\n */\n setTimeout(() => {\n element.style.removeProperty('transition-duration');\n });\n });\n });\n return () => {\n AnimationFrame.cancel(frame);\n AnimationFrame.cancel(nextFrame);\n };\n });\n const mergedPanelRef = useMergedRefs(externalRef, panelRef, handlePanelRef);\n useIsoLayoutEffect(() => {\n if (animationTypeRef.current !== 'css-transition') {\n return undefined;\n }\n const panel = panelRef.current;\n if (!panel) {\n return undefined;\n }\n let resizeFrame = -1;\n if (abortControllerRef.current != null) {\n abortControllerRef.current.abort();\n abortControllerRef.current = null;\n }\n if (open) {\n const originalLayoutStyles = {\n 'justify-content': panel.style.justifyContent,\n 'align-items': panel.style.alignItems,\n 'align-content': panel.style.alignContent,\n 'justify-items': panel.style.justifyItems\n };\n\n /* opening */\n Object.keys(originalLayoutStyles).forEach(key => {\n panel.style.setProperty(key, 'initial', 'important');\n });\n\n /**\n * When `keepMounted={false}` and the panel is initially closed, the very\n * first time it opens (not any subsequent opens) `data-starting-style` is\n * off or missing by a frame so we need to set it manually. Otherwise any\n * CSS properties expected to transition using [data-starting-style] may\n * be mis-timed and appear to be complete skipped.\n */\n if (!shouldCancelInitialOpenTransitionRef.current && !keepMounted) {\n panel.setAttribute(CollapsiblePanelDataAttributes.startingStyle, '');\n }\n setDimensions({\n height: panel.scrollHeight,\n width: panel.scrollWidth\n });\n resizeFrame = AnimationFrame.request(() => {\n Object.entries(originalLayoutStyles).forEach(([key, value]) => {\n if (value === '') {\n panel.style.removeProperty(key);\n } else {\n panel.style.setProperty(key, value);\n }\n });\n });\n } else {\n if (panel.scrollHeight === 0 && panel.scrollWidth === 0) {\n return undefined;\n }\n\n /* closing */\n setDimensions({\n height: panel.scrollHeight,\n width: panel.scrollWidth\n });\n const abortController = new AbortController();\n abortControllerRef.current = abortController;\n const signal = abortController.signal;\n let attributeObserver = null;\n const endingStyleAttribute = CollapsiblePanelDataAttributes.endingStyle;\n\n // Wait for `[data-ending-style]` to be applied.\n attributeObserver = new MutationObserver(mutationList => {\n const hasEndingStyle = mutationList.some(mutation => mutation.type === 'attributes' && mutation.attributeName === endingStyleAttribute);\n if (hasEndingStyle) {\n attributeObserver?.disconnect();\n attributeObserver = null;\n runOnceAnimationsFinish(() => {\n setDimensions({\n height: 0,\n width: 0\n });\n panel.style.removeProperty('content-visibility');\n setMounted(false);\n if (abortControllerRef.current === abortController) {\n abortControllerRef.current = null;\n }\n }, signal);\n }\n });\n attributeObserver.observe(panel, {\n attributes: true,\n attributeFilter: [endingStyleAttribute]\n });\n return () => {\n attributeObserver?.disconnect();\n endingStyleFrame.cancel();\n if (abortControllerRef.current === abortController) {\n abortController.abort();\n abortControllerRef.current = null;\n }\n };\n }\n return () => {\n AnimationFrame.cancel(resizeFrame);\n };\n }, [abortControllerRef, animationTypeRef, endingStyleFrame, hiddenUntilFound, keepMounted, mounted, open, panelRef, runOnceAnimationsFinish, setDimensions, setMounted]);\n useIsoLayoutEffect(() => {\n if (animationTypeRef.current !== 'css-animation') {\n return;\n }\n const panel = panelRef.current;\n if (!panel) {\n return;\n }\n latestAnimationNameRef.current = panel.style.animationName || latestAnimationNameRef.current;\n panel.style.setProperty('animation-name', 'none');\n setDimensions({\n height: panel.scrollHeight,\n width: panel.scrollWidth\n });\n if (!shouldCancelInitialOpenAnimationRef.current && !isBeforeMatchRef.current) {\n panel.style.removeProperty('animation-name');\n }\n if (open) {\n if (abortControllerRef.current != null) {\n abortControllerRef.current.abort();\n abortControllerRef.current = null;\n }\n setMounted(true);\n setVisible(true);\n } else {\n abortControllerRef.current = new AbortController();\n runOnceAnimationsFinish(() => {\n setMounted(false);\n setVisible(false);\n abortControllerRef.current = null;\n }, abortControllerRef.current.signal);\n }\n }, [abortControllerRef, animationTypeRef, open, panelRef, runOnceAnimationsFinish, setDimensions, setMounted, setVisible, visible]);\n useOnMount(() => {\n const frame = AnimationFrame.request(() => {\n shouldCancelInitialOpenAnimationRef.current = false;\n });\n return () => AnimationFrame.cancel(frame);\n });\n useIsoLayoutEffect(() => {\n if (!hiddenUntilFound) {\n return undefined;\n }\n const panel = panelRef.current;\n if (!panel) {\n return undefined;\n }\n let frame = -1;\n let nextFrame = -1;\n if (open && isBeforeMatchRef.current) {\n panel.style.transitionDuration = '0s';\n setDimensions({\n height: panel.scrollHeight,\n width: panel.scrollWidth\n });\n frame = AnimationFrame.request(() => {\n isBeforeMatchRef.current = false;\n nextFrame = AnimationFrame.request(() => {\n setTimeout(() => {\n panel.style.removeProperty('transition-duration');\n });\n });\n });\n }\n return () => {\n AnimationFrame.cancel(frame);\n AnimationFrame.cancel(nextFrame);\n };\n }, [hiddenUntilFound, open, panelRef, setDimensions]);\n useIsoLayoutEffect(() => {\n const panel = panelRef.current;\n if (panel && hiddenUntilFound && hidden) {\n /**\n * React only supports a boolean for the `hidden` attribute and forces\n * legit string values to booleans so we have to force it back in the DOM\n * when necessary: https://github.com/facebook/react/issues/24740\n */\n panel.setAttribute('hidden', 'until-found');\n /**\n * Set data-starting-style here to persist the closed styles, this is to\n * prevent transitions from starting when the `hidden` attribute changes\n * to `'until-found'` as they could have different `display` properties:\n * https://github.com/tailwindlabs/tailwindcss/pull/14625\n */\n if (animationTypeRef.current === 'css-transition') {\n panel.setAttribute(CollapsiblePanelDataAttributes.startingStyle, '');\n }\n }\n }, [hiddenUntilFound, hidden, animationTypeRef, panelRef]);\n React.useEffect(function registerBeforeMatchListener() {\n const panel = panelRef.current;\n if (!panel) {\n return undefined;\n }\n function handleBeforeMatch(event) {\n isBeforeMatchRef.current = true;\n setOpen(true);\n onOpenChange(true, createChangeEventDetails(REASONS.none, event));\n }\n panel.addEventListener('beforematch', handleBeforeMatch);\n return () => {\n panel.removeEventListener('beforematch', handleBeforeMatch);\n };\n }, [onOpenChange, panelRef, setOpen]);\n return React.useMemo(() => ({\n props: {\n hidden,\n id: idParam,\n ref: mergedPanelRef\n }\n }), [hidden, idParam, mergedPanelRef]);\n}","export let AccordionPanelCssVars = /*#__PURE__*/function (AccordionPanelCssVars) {\n /**\n * The accordion panel's height.\n * @type {number}\n */\n AccordionPanelCssVars[\"accordionPanelHeight\"] = \"--accordion-panel-height\";\n /**\n * The accordion panel's width.\n * @type {number}\n */\n AccordionPanelCssVars[\"accordionPanelWidth\"] = \"--accordion-panel-width\";\n return AccordionPanelCssVars;\n}({});","'use client';\n\nimport { useIsoLayoutEffect } from \"./useIsoLayoutEffect.js\";\nimport { useRefWithInit } from \"./useRefWithInit.js\";\n\n/**\n * Untracks the provided value by turning it into a ref to remove its reactivity.\n *\n * Used to access the passed value inside `React.useEffect` without causing the effect to re-run when the value changes.\n */\nexport function useValueAsRef(value) {\n const latest = useRefWithInit(createLatestRef, value).current;\n latest.next = value;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useIsoLayoutEffect(latest.effect);\n return latest;\n}\nfunction createLatestRef(value) {\n const latest = {\n current: value,\n next: value,\n effect: () => {\n latest.current = latest.next;\n }\n };\n return latest;\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui-components/utils/useValueAsRef';\nimport { useAnimationsFinished } from \"./useAnimationsFinished.js\";\n\n/**\n * Calls the provided function when the CSS open/close animation or transition completes.\n */\nexport function useOpenChangeComplete(parameters) {\n const {\n enabled = true,\n open,\n ref,\n onComplete: onCompleteParam\n } = parameters;\n const openRef = useValueAsRef(open);\n const onComplete = useStableCallback(onCompleteParam);\n const runOnceAnimationsFinish = useAnimationsFinished(ref, open);\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n runOnceAnimationsFinish(() => {\n if (open === openRef.current) {\n onComplete();\n }\n });\n }, [enabled, open, onComplete, runOnceAnimationsFinish, openRef]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { warn } from '@base-ui-components/utils/warn';\nimport { useCollapsibleRootContext } from \"../../collapsible/root/CollapsibleRootContext.js\";\nimport { useCollapsiblePanel } from \"../../collapsible/panel/useCollapsiblePanel.js\";\nimport { useAccordionRootContext } from \"../root/AccordionRootContext.js\";\nimport { useAccordionItemContext } from \"../item/AccordionItemContext.js\";\nimport { accordionStateAttributesMapping } from \"../item/stateAttributesMapping.js\";\nimport { AccordionPanelCssVars } from \"./AccordionPanelCssVars.js\";\nimport { useOpenChangeComplete } from \"../../utils/useOpenChangeComplete.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n/**\n * A collapsible panel with the accordion item contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Accordion](https://base-ui.com/react/components/accordion)\n */\nexport const AccordionPanel = /*#__PURE__*/React.forwardRef(function AccordionPanel(componentProps, forwardedRef) {\n const {\n className,\n hiddenUntilFound: hiddenUntilFoundProp,\n keepMounted: keepMountedProp,\n id: idProp,\n render,\n ...elementProps\n } = componentProps;\n const {\n hiddenUntilFound: contextHiddenUntilFound,\n keepMounted: contextKeepMounted\n } = useAccordionRootContext();\n const {\n abortControllerRef,\n animationTypeRef,\n height,\n mounted,\n onOpenChange,\n open,\n panelId,\n panelRef,\n runOnceAnimationsFinish,\n setDimensions,\n setHiddenUntilFound,\n setKeepMounted,\n setMounted,\n setOpen,\n setVisible,\n transitionDimensionRef,\n visible,\n width,\n setPanelIdState,\n transitionStatus\n } = useCollapsibleRootContext();\n const hiddenUntilFound = hiddenUntilFoundProp ?? contextHiddenUntilFound;\n const keepMounted = keepMountedProp ?? contextKeepMounted;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useIsoLayoutEffect(() => {\n if (keepMountedProp === false && hiddenUntilFound) {\n warn('The `keepMounted={false}` prop on a Accordion.Panel will be ignored when using `contextHiddenUntilFound` on the Panel or the Root since it requires the panel to remain mounted when closed.');\n }\n }, [hiddenUntilFound, keepMountedProp]);\n }\n useIsoLayoutEffect(() => {\n if (idProp) {\n setPanelIdState(idProp);\n return () => {\n setPanelIdState(undefined);\n };\n }\n return undefined;\n }, [idProp, setPanelIdState]);\n useIsoLayoutEffect(() => {\n setHiddenUntilFound(hiddenUntilFound);\n }, [setHiddenUntilFound, hiddenUntilFound]);\n useIsoLayoutEffect(() => {\n setKeepMounted(keepMounted);\n }, [setKeepMounted, keepMounted]);\n useOpenChangeComplete({\n open: open && transitionStatus === 'idle',\n ref: panelRef,\n onComplete() {\n if (!open) {\n return;\n }\n setDimensions({\n width: undefined,\n height: undefined\n });\n }\n });\n const {\n props\n } = useCollapsiblePanel({\n abortControllerRef,\n animationTypeRef,\n externalRef: forwardedRef,\n height,\n hiddenUntilFound,\n id: idProp ?? panelId,\n keepMounted,\n mounted,\n onOpenChange,\n open,\n panelRef,\n runOnceAnimationsFinish,\n setDimensions,\n setMounted,\n setOpen,\n setVisible,\n transitionDimensionRef,\n visible,\n width\n });\n const {\n state,\n triggerId\n } = useAccordionItemContext();\n const panelState = React.useMemo(() => ({\n ...state,\n transitionStatus\n }), [state, transitionStatus]);\n const element = useRenderElement('div', componentProps, {\n state: panelState,\n ref: [forwardedRef, panelRef],\n props: [props, {\n 'aria-labelledby': triggerId,\n role: 'region',\n style: {\n [AccordionPanelCssVars.accordionPanelHeight]: height === undefined ? 'auto' : `${height}px`,\n [AccordionPanelCssVars.accordionPanelWidth]: width === undefined ? 'auto' : `${width}px`\n }\n }, elementProps],\n stateAttributesMapping: accordionStateAttributesMapping\n });\n const shouldRender = keepMounted || hiddenUntilFound || !keepMounted && mounted;\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") AccordionPanel.displayName = \"AccordionPanel\";","import React, { forwardRef, createContext, useContext } from \"react\";\nimport { Accordion } from \"@base-ui-components/react/accordion\";\nimport styles from \"./index.module.css\";\n\n// ============================================================================\n// Types\n// ============================================================================\n\ntype AccordionVariant = \"default\" | \"bordered\" | \"separated\" | \"minimal\";\ntype AccordionSize = \"sm\" | \"md\" | \"lg\";\n\ninterface ALSAccordionContextValue {\n variant: AccordionVariant;\n size: AccordionSize;\n}\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst ALSAccordionContext = createContext<ALSAccordionContextValue>({\n variant: \"default\",\n size: \"md\",\n});\n\nconst useALSAccordionContext = () => useContext(ALSAccordionContext);\n\n// ============================================================================\n// Root Component\n// ============================================================================\n\ninterface ALSAccordionRootProps {\n /** The controlled value of the item(s) that should be expanded */\n value?: string[];\n /** The default value of items that should be expanded (uncontrolled) */\n defaultValue?: string[];\n /** Callback when accordion items change */\n onValueChange?: React.ComponentProps<\n typeof Accordion.Root\n >[\"onValueChange\"];\n /** Whether multiple items can be open at the same time */\n openMultiple?: boolean;\n /** Whether the accordion is disabled */\n disabled?: boolean;\n\n /** The visual orientation of the accordion */\n orientation?: \"horizontal\" | \"vertical\";\n /** Visual variant of the accordion */\n variant?: AccordionVariant;\n /** Size variant */\n size?: AccordionSize;\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSAccordionRoot = forwardRef<HTMLDivElement, ALSAccordionRootProps>(\n (\n {\n value,\n defaultValue,\n onValueChange,\n openMultiple = false,\n disabled = false,\n\n orientation = \"vertical\",\n variant = \"default\",\n size = \"md\",\n className,\n children,\n },\n ref\n ) => {\n const rootClassName = [\n styles.root,\n styles[`root--${variant}`],\n styles[`root--${size}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <ALSAccordionContext.Provider value={{ variant, size }}>\n <Accordion.Root\n ref={ref}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n multiple={openMultiple}\n disabled={disabled}\n orientation={orientation}\n className={rootClassName}\n >\n {children}\n </Accordion.Root>\n </ALSAccordionContext.Provider>\n );\n }\n);\n\nALSAccordionRoot.displayName = \"ALSAccordion.Root\";\n\n// ============================================================================\n// Item Component\n// ============================================================================\n\ninterface ALSAccordionItemProps {\n /** Unique value for this item */\n value: string;\n /** Whether this item is disabled */\n disabled?: boolean;\n /** Callback when this item opens or closes */\n onOpenChange?: (open: boolean) => void;\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSAccordionItem = forwardRef<HTMLDivElement, ALSAccordionItemProps>(\n ({ value, disabled, onOpenChange, className, children }, ref) => {\n const { variant, size } = useALSAccordionContext();\n\n const itemClassName = [\n styles.item,\n styles[`item--${variant}`],\n styles[`item--${size}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Accordion.Item\n ref={ref}\n value={value}\n disabled={disabled}\n onOpenChange={onOpenChange}\n className={itemClassName}\n >\n {children}\n </Accordion.Item>\n );\n }\n);\n\nALSAccordionItem.displayName = \"ALSAccordion.Item\";\n\n// ============================================================================\n// Header Component\n// ============================================================================\n\ninterface ALSAccordionHeaderProps {\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSAccordionHeader = forwardRef<\n HTMLHeadingElement,\n ALSAccordionHeaderProps\n>(({ className, children }, ref) => {\n const { variant, size } = useALSAccordionContext();\n\n const headerClassName = [\n styles.header,\n styles[`header--${variant}`],\n styles[`header--${size}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Accordion.Header ref={ref} className={headerClassName}>\n {children}\n </Accordion.Header>\n );\n});\n\nALSAccordionHeader.displayName = \"ALSAccordion.Header\";\n\n// ============================================================================\n// Trigger Component\n// ============================================================================\n\ninterface ALSAccordionTriggerProps {\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSAccordionTrigger = forwardRef<\n HTMLButtonElement,\n ALSAccordionTriggerProps\n>(({ className, children }, ref) => {\n const { variant, size } = useALSAccordionContext();\n\n const triggerClassName = [\n styles.trigger,\n styles[`trigger--${variant}`],\n styles[`trigger--${size}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Accordion.Trigger ref={ref} className={triggerClassName}>\n <span className={styles.triggerContent}>{children}</span>\n <span className={styles.triggerIcon} aria-hidden=\"true\">\n <ChevronIcon />\n </span>\n </Accordion.Trigger>\n );\n});\n\nALSAccordionTrigger.displayName = \"ALSAccordion.Trigger\";\n\n// ============================================================================\n// Panel Component\n// ============================================================================\n\ninterface ALSAccordionPanelProps {\n /** Whether to keep the panel in DOM when closed */\n keepMounted?: boolean;\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSAccordionPanel = forwardRef<HTMLDivElement, ALSAccordionPanelProps>(\n ({ keepMounted = false, className, children }, ref) => {\n const { variant, size } = useALSAccordionContext();\n\n const panelClassName = [\n styles.panel,\n styles[`panel--${variant}`],\n styles[`panel--${size}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Accordion.Panel\n ref={ref}\n keepMounted={keepMounted}\n className={panelClassName}\n >\n <div className={styles.panelContent}>{children}</div>\n </Accordion.Panel>\n );\n }\n);\n\nALSAccordionPanel.displayName = \"ALSAccordion.Panel\";\n\n// ============================================================================\n// Chevron Icon\n// ============================================================================\n\nconst ChevronIcon: React.FC = () => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={styles.chevronSvg}\n >\n <path\n d=\"M5 7.5L10 12.5L15 7.5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\n// ============================================================================\n// Compound Component Export\n// ============================================================================\n\nexport const ALSAccordion = {\n Root: ALSAccordionRoot,\n Item: ALSAccordionItem,\n Header: ALSAccordionHeader,\n Trigger: ALSAccordionTrigger,\n Panel: ALSAccordionPanel,\n};\n\nexport type {\n ALSAccordionRootProps,\n ALSAccordionItemProps,\n ALSAccordionHeaderProps,\n ALSAccordionTriggerProps,\n ALSAccordionPanelProps,\n AccordionVariant,\n AccordionSize,\n};\n","import styles from './index.module.css';\n\nexport interface ALSAlertDialogProps {\n // TODO: Define props\n}\n\nexport function ALSAlertDialog(props: ALSAlertDialogProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement AlertDialog */}\n </div>\n );\n}\n\nexport default ALSAlertDialog;\n","import styles from './index.module.css';\n\nexport interface ALSAutocompleteProps {\n // TODO: Define props\n}\n\nexport function ALSAutocomplete(props: ALSAutocompleteProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Autocomplete */}\n </div>\n );\n}\n\nexport default ALSAutocomplete;\n","import styles from './index.module.css';\n\nexport interface ALSAvatarProps {\n // TODO: Define props\n}\n\nexport function ALSAvatar(props: ALSAvatarProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Avatar */}\n </div>\n );\n}\n\nexport default ALSAvatar;\n","import { forwardRef, type ButtonHTMLAttributes } from \"react\";\nimport styles from \"./index.module.css\";\n\nexport type ButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"success\"\n | \"danger\"\n | \"warning\";\nexport type ButtonStyle = \"full\" | \"outline\" | \"ghost\" | \"empty\";\nexport type ButtonSize = \"sm\" | \"md\" | \"lg\" | \"full\";\n\nexport interface ALSButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant;\n buttonStyle?: ButtonStyle;\n size?: ButtonSize;\n block?: boolean;\n children?: React.ReactNode;\n}\n\nexport const ALSButton = forwardRef<HTMLButtonElement, ALSButtonProps>(\n (\n {\n variant = \"primary\",\n buttonStyle = \"full\",\n size = \"md\",\n block = false,\n className = \"\",\n children,\n disabled = false,\n type = \"button\",\n ...rest\n },\n ref\n ) => {\n const classNames = [\n styles.button,\n styles[`variant-${variant}`],\n styles[`style-${buttonStyle}`],\n styles[`size-${size}`],\n block ? styles.block : \"\",\n disabled ? styles.disabled : \"\",\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <button\n ref={ref}\n className={classNames}\n disabled={disabled}\n type={type}\n {...rest}\n >\n {children}\n </button>\n );\n }\n);\n\nALSButton.displayName = \"ALSButton\";\n\nexport default ALSButton;\n","import styles from './index.module.css';\n\nexport interface ALSCheckboxProps {\n // TODO: Define props\n}\n\nexport function ALSCheckbox(props: ALSCheckboxProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Checkbox */}\n </div>\n );\n}\n\nexport default ALSCheckbox;\n","import styles from './index.module.css';\n\nexport interface ALSCheckboxGroupProps {\n // TODO: Define props\n}\n\nexport function ALSCheckboxGroup(props: ALSCheckboxGroupProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement CheckboxGroup */}\n </div>\n );\n}\n\nexport default ALSCheckboxGroup;\n","import styles from './index.module.css';\n\nexport interface ALSCollapsibleProps {\n // TODO: Define props\n}\n\nexport function ALSCollapsible(props: ALSCollapsibleProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Collapsible */}\n </div>\n );\n}\n\nexport default ALSCollapsible;\n","import styles from './index.module.css';\n\nexport interface ALSComboboxProps {\n // TODO: Define props\n}\n\nexport function ALSCombobox(props: ALSComboboxProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Combobox */}\n </div>\n );\n}\n\nexport default ALSCombobox;\n","import styles from './index.module.css';\n\nexport interface ALSContextMenuProps {\n // TODO: Define props\n}\n\nexport function ALSContextMenu(props: ALSContextMenuProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement ContextMenu */}\n </div>\n );\n}\n\nexport default ALSContextMenu;\n","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const DialogRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DialogRootContext.displayName = \"DialogRootContext\";\nexport function useDialogRootContext(optional) {\n const dialogRootContext = React.useContext(DialogRootContext);\n if (optional === false && dialogRootContext === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.' : _formatErrorMessage(27));\n }\n return dialogRootContext;\n}","import { TransitionStatusDataAttributes } from \"./stateAttributesMapping.js\";\nexport let CommonPopupDataAttributes = function (CommonPopupDataAttributes) {\n /**\n * Present when the popup is open.\n */\n CommonPopupDataAttributes[\"open\"] = \"data-open\";\n /**\n * Present when the popup is closed.\n */\n CommonPopupDataAttributes[\"closed\"] = \"data-closed\";\n /**\n * Present when the popup is animating in.\n */\n CommonPopupDataAttributes[CommonPopupDataAttributes[\"startingStyle\"] = TransitionStatusDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the popup is animating out.\n */\n CommonPopupDataAttributes[CommonPopupDataAttributes[\"endingStyle\"] = TransitionStatusDataAttributes.endingStyle] = \"endingStyle\";\n /**\n * Present when the anchor is hidden.\n */\n CommonPopupDataAttributes[\"anchorHidden\"] = \"data-anchor-hidden\";\n return CommonPopupDataAttributes;\n}({});\nexport let CommonTriggerDataAttributes = /*#__PURE__*/function (CommonTriggerDataAttributes) {\n /**\n * Present when the popup is open.\n */\n CommonTriggerDataAttributes[\"popupOpen\"] = \"data-popup-open\";\n /**\n * Present when a pressable trigger is pressed.\n */\n CommonTriggerDataAttributes[\"pressed\"] = \"data-pressed\";\n return CommonTriggerDataAttributes;\n}({});\nconst TRIGGER_HOOK = {\n [CommonTriggerDataAttributes.popupOpen]: ''\n};\nconst PRESSABLE_TRIGGER_HOOK = {\n [CommonTriggerDataAttributes.popupOpen]: '',\n [CommonTriggerDataAttributes.pressed]: ''\n};\nconst POPUP_OPEN_HOOK = {\n [CommonPopupDataAttributes.open]: ''\n};\nconst POPUP_CLOSED_HOOK = {\n [CommonPopupDataAttributes.closed]: ''\n};\nconst ANCHOR_HIDDEN_HOOK = {\n [CommonPopupDataAttributes.anchorHidden]: ''\n};\nexport const triggerOpenStateMapping = {\n open(value) {\n if (value) {\n return TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const pressableTriggerOpenStateMapping = {\n open(value) {\n if (value) {\n return PRESSABLE_TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const popupStateMapping = {\n open(value) {\n if (value) {\n return POPUP_OPEN_HOOK;\n }\n return POPUP_CLOSED_HOOK;\n },\n anchorHidden(value) {\n if (value) {\n return ANCHOR_HIDDEN_HOOK;\n }\n return null;\n }\n};","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { popupStateMapping as baseMapping } from \"../../utils/popupStateMapping.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\nconst stateAttributesMapping = {\n ...baseMapping,\n ...transitionStatusMapping\n};\n\n/**\n * An overlay displayed beneath the popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogBackdrop = /*#__PURE__*/React.forwardRef(function DialogBackdrop(componentProps, forwardedRef) {\n const {\n render,\n className,\n forceRender = false,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useDialogRootContext();\n const open = store.useState('open');\n const nested = store.useState('nested');\n const mounted = store.useState('mounted');\n const transitionStatus = store.useState('transitionStatus');\n const state = React.useMemo(() => ({\n open,\n transitionStatus\n }), [open, transitionStatus]);\n return useRenderElement('div', componentProps, {\n state,\n ref: [store.context.backdropRef, forwardedRef],\n stateAttributesMapping,\n props: [{\n role: 'presentation',\n hidden: !mounted,\n style: {\n userSelect: 'none',\n WebkitUserSelect: 'none'\n }\n }, elementProps],\n enabled: forceRender || !nested\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogBackdrop.displayName = \"DialogBackdrop\";","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useButton } from \"../../use-button/index.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\n\n/**\n * A button that closes the dialog.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogClose = /*#__PURE__*/React.forwardRef(function DialogClose(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled = false,\n nativeButton = true,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useDialogRootContext();\n const open = store.useState('open');\n function handleClick(event) {\n if (open) {\n store.setOpen(false, createChangeEventDetails(REASONS.closePress, event.nativeEvent));\n }\n }\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const state = React.useMemo(() => ({\n disabled\n }), [disabled]);\n return useRenderElement('button', componentProps, {\n state,\n ref: [forwardedRef, buttonRef],\n props: [{\n onClick: handleClick\n }, elementProps, getButtonProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogClose.displayName = \"DialogClose\";","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\n/**\n * A paragraph with additional information about the dialog.\n * Renders a `<p>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogDescription = /*#__PURE__*/React.forwardRef(function DialogDescription(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useDialogRootContext();\n const id = useBaseUiId(idProp);\n store.useSyncedValueWithCleanup('descriptionElementId', id);\n return useRenderElement('p', componentProps, {\n ref: forwardedRef,\n props: [{\n id\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogDescription.displayName = \"DialogDescription\";","'use client';\n\nimport { useRefWithInit } from \"./useRefWithInit.js\";\nimport { useOnMount } from \"./useOnMount.js\";\nconst EMPTY = 0;\nexport class Timeout {\n static create() {\n return new Timeout();\n }\n currentId = EMPTY;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = EMPTY;\n fn();\n }, delay); /* Node.js types are enabled in development */\n }\n isStarted() {\n return this.currentId !== EMPTY;\n }\n clear = () => {\n if (this.currentId !== EMPTY) {\n clearTimeout(this.currentId);\n this.currentId = EMPTY;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\n\n/**\n * A `setTimeout` with automatic cleanup and guard.\n */\nexport function useTimeout() {\n const timeout = useRefWithInit(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","export function createEventEmitter() {\n const map = new Map();\n return {\n emit(event, data) {\n map.get(event)?.forEach(listener => listener(data));\n },\n on(event, listener) {\n if (!map.has(event)) {\n map.set(event, new Set());\n }\n map.get(event).add(listener);\n },\n off(event, listener) {\n map.get(event)?.delete(listener);\n }\n };\n}","import { createEventEmitter } from \"../utils/createEventEmitter.js\";\n\n/**\n * Stores and manages floating elements in a tree structure.\n * This is a backing store for the `FloatingTree` component.\n */\nexport class FloatingTreeStore {\n nodesRef = {\n current: []\n };\n events = createEventEmitter();\n addNode(node) {\n this.nodesRef.current.push(node);\n }\n removeNode(node) {\n const index = this.nodesRef.current.findIndex(n => n === node);\n if (index !== -1) {\n this.nodesRef.current.splice(index, 1);\n }\n }\n}","import * as React from 'react';\nimport { useId } from '@base-ui-components/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui-components/utils/useRefWithInit';\nimport { FloatingTreeStore } from \"./FloatingTreeStore.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FloatingNodeContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") FloatingNodeContext.displayName = \"FloatingNodeContext\";\nconst FloatingTreeContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the parent node id for nested floating elements, if available.\n * Returns `null` for top-level floating elements.\n */\nif (process.env.NODE_ENV !== \"production\") FloatingTreeContext.displayName = \"FloatingTreeContext\";\nexport const useFloatingParentNodeId = () => React.useContext(FloatingNodeContext)?.id || null;\n\n/**\n * Returns the nearest floating tree context, if available.\n */\nexport const useFloatingTree = externalTree => {\n const contextTree = React.useContext(FloatingTreeContext);\n return externalTree ?? contextTree;\n};\n\n/**\n * Registers a node into the `FloatingTree`, returning its id.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nexport function useFloatingNodeId(externalTree) {\n const id = useId();\n const tree = useFloatingTree(externalTree);\n const parentId = useFloatingParentNodeId();\n useIsoLayoutEffect(() => {\n if (!id) {\n return undefined;\n }\n const node = {\n id,\n parentId\n };\n tree?.addNode(node);\n return () => {\n tree?.removeNode(node);\n };\n }, [tree, id, parentId]);\n return id;\n}\n/**\n * Provides parent node context for nested floating elements.\n * @see https://floating-ui.com/docs/FloatingTree\n * @internal\n */\nexport function FloatingNode(props) {\n const {\n children,\n id\n } = props;\n const parentId = useFloatingParentNodeId();\n return /*#__PURE__*/_jsx(FloatingNodeContext.Provider, {\n value: React.useMemo(() => ({\n id,\n parentId\n }), [id, parentId]),\n children: children\n });\n}\n/**\n * Provides context for nested floating elements when they are not children of\n * each other on the DOM.\n * This is not necessary in all cases, except when there must be explicit communication between parent and child floating elements. It is necessary for:\n * - The `bubbles` option in the `useDismiss()` Hook\n * - Nested virtual list navigation\n * - Nested floating elements that each open on hover\n * - Custom communication between parent and child floating elements\n * @see https://floating-ui.com/docs/FloatingTree\n * @internal\n */\nexport function FloatingTree(props) {\n const {\n children,\n externalTree\n } = props;\n const tree = useRefWithInit(() => externalTree ?? new FloatingTreeStore()).current;\n return /*#__PURE__*/_jsx(FloatingTreeContext.Provider, {\n value: tree,\n children: children\n });\n}","export function createAttribute(name) {\n return `data-base-ui-${name}`;\n}","import * as React from 'react';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { useValueAsRef } from '@base-ui-components/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { contains, getDocument, getTarget, isMouseLikePointerType } from \"../utils.js\";\nimport { useFloatingParentNodeId, useFloatingTree } from \"../components/FloatingTree.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nimport { TYPEABLE_SELECTOR } from \"../utils/constants.js\";\nconst safePolygonIdentifier = createAttribute('safe-polygon');\nconst interactiveSelector = `button,[role=\"button\"],select,[tabindex]:not([tabindex=\"-1\"]),${TYPEABLE_SELECTOR}`;\nfunction isInteractiveElement(element) {\n return element ? Boolean(element.closest(interactiveSelector)) : false;\n}\nexport function getDelay(value, prop, pointerType) {\n if (pointerType && !isMouseLikePointerType(pointerType)) {\n return 0;\n }\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'function') {\n const result = value();\n if (typeof result === 'number') {\n return result;\n }\n return result?.[prop];\n }\n return value?.[prop];\n}\nfunction getRestMs(value) {\n if (typeof value === 'function') {\n return value();\n }\n return value;\n}\n/**\n * Opens the floating element while hovering over the reference element, like\n * CSS `:hover`.\n * @see https://floating-ui.com/docs/useHover\n */\nexport function useHover(context, props = {}) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const domReferenceElement = store.useState('domReferenceElement');\n const {\n dataRef,\n events\n } = store.context;\n const {\n enabled = true,\n delay = 0,\n handleClose = null,\n mouseOnly = false,\n restMs = 0,\n move = true,\n triggerElement = null,\n externalTree\n } = props;\n const tree = useFloatingTree(externalTree);\n const parentId = useFloatingParentNodeId();\n const handleCloseRef = useValueAsRef(handleClose);\n const delayRef = useValueAsRef(delay);\n const restMsRef = useValueAsRef(restMs);\n const pointerTypeRef = React.useRef(undefined);\n const interactedInsideRef = React.useRef(false);\n const timeout = useTimeout();\n const handlerRef = React.useRef(undefined);\n const restTimeout = useTimeout();\n const blockMouseMoveRef = React.useRef(true);\n const performedPointerEventsMutationRef = React.useRef(false);\n const unbindMouseMoveRef = React.useRef(() => {});\n const restTimeoutPendingRef = React.useRef(false);\n const isHoverOpen = useStableCallback(() => {\n const type = dataRef.current.openEvent?.type;\n return type?.includes('mouse') && type !== 'mousedown';\n });\n const isClickLikeOpenEvent = useStableCallback(() => {\n if (interactedInsideRef.current) {\n return true;\n }\n return dataRef.current.openEvent ? ['click', 'mousedown'].includes(dataRef.current.openEvent.type) : false;\n });\n\n // When closing before opening, clear the delay timeouts to cancel it\n // from showing.\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function onOpenChangeLocal(details) {\n if (!details.open) {\n timeout.clear();\n restTimeout.clear();\n blockMouseMoveRef.current = true;\n restTimeoutPendingRef.current = false;\n }\n }\n events.on('openchange', onOpenChangeLocal);\n return () => {\n events.off('openchange', onOpenChangeLocal);\n };\n }, [enabled, events, timeout, restTimeout]);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n if (!handleCloseRef.current) {\n return undefined;\n }\n if (!open) {\n return undefined;\n }\n function onLeave(event) {\n if (isClickLikeOpenEvent()) {\n return;\n }\n if (isHoverOpen()) {\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event, event.currentTarget ?? undefined));\n }\n }\n const html = getDocument(floatingElement).documentElement;\n html.addEventListener('mouseleave', onLeave);\n return () => {\n html.removeEventListener('mouseleave', onLeave);\n };\n }, [floatingElement, open, store, enabled, handleCloseRef, isHoverOpen, isClickLikeOpenEvent]);\n const closeWithDelay = React.useCallback((event, runElseBranch = true) => {\n const closeDelay = getDelay(delayRef.current, 'close', pointerTypeRef.current);\n if (closeDelay && !handlerRef.current) {\n timeout.start(closeDelay, () => store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event)));\n } else if (runElseBranch) {\n timeout.clear();\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event));\n }\n }, [delayRef, store, timeout]);\n const cleanupMouseMoveHandler = useStableCallback(() => {\n unbindMouseMoveRef.current();\n handlerRef.current = undefined;\n });\n const clearPointerEvents = useStableCallback(() => {\n if (performedPointerEventsMutationRef.current) {\n const body = getDocument(floatingElement).body;\n body.style.pointerEvents = '';\n body.removeAttribute(safePolygonIdentifier);\n performedPointerEventsMutationRef.current = false;\n }\n });\n const handleInteractInside = useStableCallback(event => {\n const target = getTarget(event);\n if (!isInteractiveElement(target)) {\n interactedInsideRef.current = false;\n return;\n }\n interactedInsideRef.current = true;\n });\n\n // Registering the mouse events on the reference directly to bypass React's\n // delegation system. If the cursor was on a disabled element and then entered\n // the reference (no gap), `mouseenter` doesn't fire in the delegation system.\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function onReferenceMouseEnter(event) {\n timeout.clear();\n blockMouseMoveRef.current = false;\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current) || getRestMs(restMsRef.current) > 0 && !getDelay(delayRef.current, 'open')) {\n return;\n }\n const openDelay = getDelay(delayRef.current, 'open', pointerTypeRef.current);\n const trigger = event.currentTarget ?? undefined;\n const domReference = store.select('domReferenceElement');\n const isOverInactiveTrigger = domReference && trigger && !contains(domReference, trigger);\n if (openDelay) {\n timeout.start(openDelay, () => {\n if (!store.select('open')) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, event, trigger));\n }\n });\n } else if (!open || isOverInactiveTrigger) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, event, trigger));\n }\n }\n function onReferenceMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n clearPointerEvents();\n return;\n }\n unbindMouseMoveRef.current();\n const doc = getDocument(floatingElement);\n restTimeout.clear();\n restTimeoutPendingRef.current = false;\n const triggers = store.context.triggerElements;\n if (event.relatedTarget && triggers.hasElement(event.relatedTarget)) {\n // If the mouse is leaving the reference element to another trigger, don't explicitly close the popup\n // as it will be moved.\n return;\n }\n if (handleCloseRef.current && dataRef.current.floatingContext) {\n // Prevent clearing `onScrollMouseLeave` timeout.\n if (!open) {\n timeout.clear();\n }\n handlerRef.current = handleCloseRef.current({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event, true);\n }\n }\n });\n const handler = handlerRef.current;\n doc.addEventListener('mousemove', handler);\n unbindMouseMoveRef.current = () => {\n doc.removeEventListener('mousemove', handler);\n };\n return;\n }\n\n // Allow interactivity without `safePolygon` on touch devices. With a\n // pointer, a short close delay is an alternative, so it should work\n // consistently.\n const shouldClose = pointerTypeRef.current === 'touch' ? !contains(floatingElement, event.relatedTarget) : true;\n if (shouldClose) {\n closeWithDelay(event);\n }\n }\n\n // Ensure the floating element closes after scrolling even if the pointer\n // did not move.\n // https://github.com/floating-ui/floating-ui/discussions/1692\n function onScrollMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n return;\n }\n if (!dataRef.current.floatingContext) {\n return;\n }\n const triggers = store.context.triggerElements;\n if (event.relatedTarget && triggers.hasElement(event.relatedTarget)) {\n // If the mouse is leaving the reference element to another trigger, don't explicitly close the popup\n // as it will be moved.\n return;\n }\n handleCloseRef.current?.({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event);\n }\n }\n })(event);\n }\n function onFloatingMouseEnter() {\n timeout.clear();\n clearPointerEvents();\n }\n function onFloatingMouseLeave(event) {\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event, false);\n }\n }\n const trigger = triggerElement ?? domReferenceElement;\n if (isElement(trigger)) {\n const floating = floatingElement;\n if (open) {\n trigger.addEventListener('mouseleave', onScrollMouseLeave);\n }\n if (move) {\n trigger.addEventListener('mousemove', onReferenceMouseEnter, {\n once: true\n });\n }\n trigger.addEventListener('mouseenter', onReferenceMouseEnter);\n trigger.addEventListener('mouseleave', onReferenceMouseLeave);\n if (floating) {\n floating.addEventListener('mouseleave', onScrollMouseLeave);\n floating.addEventListener('mouseenter', onFloatingMouseEnter);\n floating.addEventListener('mouseleave', onFloatingMouseLeave);\n floating.addEventListener('pointerdown', handleInteractInside, true);\n }\n return () => {\n if (open) {\n trigger.removeEventListener('mouseleave', onScrollMouseLeave);\n }\n if (move) {\n trigger.removeEventListener('mousemove', onReferenceMouseEnter);\n }\n trigger.removeEventListener('mouseenter', onReferenceMouseEnter);\n trigger.removeEventListener('mouseleave', onReferenceMouseLeave);\n if (floating) {\n floating.removeEventListener('mouseleave', onScrollMouseLeave);\n floating.removeEventListener('mouseenter', onFloatingMouseEnter);\n floating.removeEventListener('mouseleave', onFloatingMouseLeave);\n floating.removeEventListener('pointerdown', handleInteractInside, true);\n }\n };\n }\n return undefined;\n }, [enabled, mouseOnly, move, domReferenceElement, floatingElement, triggerElement, store, closeWithDelay, cleanupMouseMoveHandler, clearPointerEvents, open, tree, delayRef, handleCloseRef, dataRef, isClickLikeOpenEvent, restMsRef, timeout, restTimeout, handleInteractInside]);\n\n // Block pointer-events of every element other than the reference and floating\n // while the floating element is open and has a `handleClose` handler. Also\n // handles nested floating elements.\n // https://github.com/floating-ui/floating-ui/issues/1722\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return undefined;\n }\n\n // eslint-disable-next-line no-underscore-dangle\n if (open && handleCloseRef.current?.__options?.blockPointerEvents && isHoverOpen()) {\n performedPointerEventsMutationRef.current = true;\n const floatingEl = floatingElement;\n if (isElement(domReferenceElement) && floatingEl) {\n const body = getDocument(floatingElement).body;\n body.setAttribute(safePolygonIdentifier, '');\n const ref = domReferenceElement;\n const parentFloating = tree?.nodesRef.current.find(node => node.id === parentId)?.context?.elements.floating;\n if (parentFloating) {\n parentFloating.style.pointerEvents = '';\n }\n body.style.pointerEvents = 'none';\n ref.style.pointerEvents = 'auto';\n floatingEl.style.pointerEvents = 'auto';\n return () => {\n body.style.pointerEvents = '';\n ref.style.pointerEvents = '';\n floatingEl.style.pointerEvents = '';\n };\n }\n }\n return undefined;\n }, [enabled, open, parentId, tree, handleCloseRef, isHoverOpen, domReferenceElement, floatingElement]);\n useIsoLayoutEffect(() => {\n if (!open) {\n pointerTypeRef.current = undefined;\n restTimeoutPendingRef.current = false;\n interactedInsideRef.current = false;\n cleanupMouseMoveHandler();\n clearPointerEvents();\n }\n }, [open, cleanupMouseMoveHandler, clearPointerEvents]);\n React.useEffect(() => {\n return () => {\n cleanupMouseMoveHandler();\n timeout.clear();\n restTimeout.clear();\n interactedInsideRef.current = false;\n };\n }, [enabled, domReferenceElement, cleanupMouseMoveHandler, timeout, restTimeout]);\n React.useEffect(() => {\n return clearPointerEvents;\n }, [clearPointerEvents]);\n const reference = React.useMemo(() => {\n function setPointerRef(event) {\n pointerTypeRef.current = event.pointerType;\n }\n return {\n onPointerDown: setPointerRef,\n onPointerEnter: setPointerRef,\n onMouseMove(event) {\n const {\n nativeEvent\n } = event;\n const trigger = event.currentTarget;\n\n // `true` when there are multiple triggers per floating element and user hovers over the one that\n // wasn't used to open the floating element.\n const isOverInactiveTrigger = store.select('domReferenceElement') && !contains(store.select('domReferenceElement'), event.target);\n function handleMouseMove() {\n if (!blockMouseMoveRef.current && (!store.select('open') || isOverInactiveTrigger)) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, nativeEvent, trigger));\n }\n }\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current)) {\n return;\n }\n if (store.select('open') && !isOverInactiveTrigger || getRestMs(restMsRef.current) === 0) {\n return;\n }\n\n // Ignore insignificant movements to account for tremors.\n if (!isOverInactiveTrigger && restTimeoutPendingRef.current && event.movementX ** 2 + event.movementY ** 2 < 2) {\n return;\n }\n restTimeout.clear();\n if (pointerTypeRef.current === 'touch') {\n handleMouseMove();\n } else if (isOverInactiveTrigger) {\n handleMouseMove();\n } else {\n restTimeoutPendingRef.current = true;\n restTimeout.start(getRestMs(restMsRef.current), handleMouseMove);\n }\n }\n };\n }, [mouseOnly, store, restMsRef, restTimeout]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}","export const visuallyHidden = {\n clip: 'rect(0 0 0 0)',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n position: 'fixed',\n top: 0,\n left: 0,\n border: 0,\n padding: 0,\n width: 1,\n height: 1,\n margin: -1\n};","export { getWindow as ownerWindow } from '@floating-ui/utils/dom';\nexport function ownerDocument(node) {\n return node?.ownerDocument || document;\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { isSafari } from '@base-ui-components/utils/detectBrowser';\nimport { visuallyHidden } from '@base-ui-components/utils/visuallyHidden';\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const FocusGuard = /*#__PURE__*/React.forwardRef(function FocusGuard(props, ref) {\n const [role, setRole] = React.useState();\n useIsoLayoutEffect(() => {\n if (isSafari) {\n // Unlike other screen readers such as NVDA and JAWS, the virtual cursor\n // on VoiceOver does trigger the onFocus event, so we can use the focus\n // trap element. On Safari, only buttons trigger the onFocus event.\n setRole('button');\n }\n }, []);\n const restProps = {\n tabIndex: 0,\n // Role is only for VoiceOver\n role\n };\n return /*#__PURE__*/_jsx(\"span\", {\n ...props,\n ref: ref,\n style: visuallyHidden,\n \"aria-hidden\": role ? undefined : true,\n ...restProps,\n \"data-base-ui-focus-guard\": \"\"\n });\n});\nif (process.env.NODE_ENV !== \"production\") FocusGuard.displayName = \"FocusGuard\";","let rafId = 0;\nexport function enqueueFocus(el, options = {}) {\n const {\n preventScroll = false,\n cancelPrevious = true,\n sync = false\n } = options;\n if (cancelPrevious) {\n cancelAnimationFrame(rafId);\n }\n const exec = () => el?.focus({\n preventScroll\n });\n if (sync) {\n exec();\n } else {\n rafId = requestAnimationFrame(exec);\n }\n}","// Modified to add conditional `aria-hidden` support:\n// https://github.com/theKashey/aria-hidden/blob/9220c8f4a4fd35f63bee5510a9f41a37264382d4/src/index.ts\nimport { getNodeName } from '@floating-ui/utils/dom';\nimport { getDocument } from \"./element.js\";\nconst counters = {\n inert: new WeakMap(),\n 'aria-hidden': new WeakMap(),\n none: new WeakMap()\n};\nfunction getCounterMap(control) {\n if (control === 'inert') {\n return counters.inert;\n }\n if (control === 'aria-hidden') {\n return counters['aria-hidden'];\n }\n return counters.none;\n}\nlet uncontrolledElementsSet = new WeakSet();\nlet markerMap = {};\nlet lockCount = 0;\nexport const supportsInert = () => typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;\nconst unwrapHost = node => node && (node.host || unwrapHost(node.parentNode));\nconst correctElements = (parent, targets) => targets.map(target => {\n if (parent.contains(target)) {\n return target;\n }\n const correctedTarget = unwrapHost(target);\n if (parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n return null;\n}).filter(x => x != null);\nfunction applyAttributeToOthers(uncorrectedAvoidElements, body, ariaHidden, inert) {\n const markerName = 'data-base-ui-inert';\n // eslint-disable-next-line no-nested-ternary\n const controlAttribute = inert ? 'inert' : ariaHidden ? 'aria-hidden' : null;\n const avoidElements = correctElements(body, uncorrectedAvoidElements);\n const elementsToKeep = new Set();\n const elementsToStop = new Set(avoidElements);\n const hiddenElements = [];\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n const markerCounter = markerMap[markerName];\n avoidElements.forEach(keep);\n deep(body);\n elementsToKeep.clear();\n function keep(el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n if (el.parentNode) {\n keep(el.parentNode);\n }\n }\n function deep(parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n [].forEach.call(parent.children, node => {\n if (getNodeName(node) === 'script') {\n return;\n }\n if (elementsToKeep.has(node)) {\n deep(node);\n } else {\n const attr = controlAttribute ? node.getAttribute(controlAttribute) : null;\n const alreadyHidden = attr !== null && attr !== 'false';\n const counterMap = getCounterMap(controlAttribute);\n const counterValue = (counterMap.get(node) || 0) + 1;\n const markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenElements.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledElementsSet.add(node);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, '');\n }\n if (!alreadyHidden && controlAttribute) {\n node.setAttribute(controlAttribute, controlAttribute === 'inert' ? '' : 'true');\n }\n }\n });\n }\n lockCount += 1;\n return () => {\n hiddenElements.forEach(element => {\n const counterMap = getCounterMap(controlAttribute);\n const currentCounterValue = counterMap.get(element) || 0;\n const counterValue = currentCounterValue - 1;\n const markerValue = (markerCounter.get(element) || 0) - 1;\n counterMap.set(element, counterValue);\n markerCounter.set(element, markerValue);\n if (!counterValue) {\n if (!uncontrolledElementsSet.has(element) && controlAttribute) {\n element.removeAttribute(controlAttribute);\n }\n uncontrolledElementsSet.delete(element);\n }\n if (!markerValue) {\n element.removeAttribute(markerName);\n }\n });\n lockCount -= 1;\n if (!lockCount) {\n counters.inert = new WeakMap();\n counters['aria-hidden'] = new WeakMap();\n counters.none = new WeakMap();\n uncontrolledElementsSet = new WeakSet();\n markerMap = {};\n }\n };\n}\nexport function markOthers(avoidElements, ariaHidden = false, inert = false) {\n const body = getDocument(avoidElements[0]).body;\n return applyAttributeToOthers(avoidElements.concat(Array.from(body.querySelectorAll('[aria-live]'))), body, ariaHidden, inert);\n}","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { isNode } from '@floating-ui/utils/dom';\nimport { useId } from '@base-ui-components/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { FocusGuard } from \"../../utils/FocusGuard.js\";\nimport { enableFocusInside, disableFocusInside, getPreviousTabbable, getNextTabbable, isOutsideEvent } from \"../utils.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { EMPTY_OBJECT, ownerVisuallyHidden } from \"../../utils/constants.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") PortalContext.displayName = \"PortalContext\";\nexport const usePortalContext = () => React.useContext(PortalContext);\nconst attr = createAttribute('portal');\nexport function useFloatingPortalNode(props = {}) {\n const {\n ref,\n container: containerProp,\n componentProps = EMPTY_OBJECT,\n elementProps,\n elementState\n } = props;\n const uniqueId = useId();\n const portalContext = usePortalContext();\n const parentPortalNode = portalContext?.portalNode;\n const [containerElement, setContainerElement] = React.useState(null);\n const [portalNode, setPortalNode] = React.useState(null);\n const containerRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n // Wait for the container to be resolved if explicitly `null`.\n if (containerProp === null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n\n // React 17 does not use React.useId().\n if (uniqueId == null) {\n return;\n }\n const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;\n if (resolvedContainer == null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n if (containerRef.current !== resolvedContainer) {\n containerRef.current = resolvedContainer;\n setPortalNode(null);\n setContainerElement(resolvedContainer);\n }\n }, [containerProp, parentPortalNode, uniqueId]);\n const portalElement = useRenderElement('div', componentProps, {\n ref: [ref, setPortalNode],\n state: elementState,\n props: [{\n id: uniqueId,\n [attr]: ''\n }, elementProps]\n });\n\n // This `createPortal` call injects `portalElement` into the `container`.\n // Another call inside `FloatingPortal`/`FloatingPortalLite` then injects the children into `portalElement`.\n const portalSubtree = containerElement && portalElement ? /*#__PURE__*/ReactDOM.createPortal(portalElement, containerElement) : null;\n return {\n portalNode,\n portalSubtree\n };\n}\n\n/**\n * Portals the floating element into a given container element — by default,\n * outside of the app root and into the body.\n * This is necessary to ensure the floating element can appear outside any\n * potential parent containers that cause clipping (such as `overflow: hidden`),\n * while retaining its location in the React tree.\n * @see https://floating-ui.com/docs/FloatingPortal\n * @internal\n */\nexport const FloatingPortal = /*#__PURE__*/React.forwardRef(function FloatingPortal(componentProps, forwardedRef) {\n const {\n children,\n container,\n className,\n render,\n renderGuards,\n ...elementProps\n } = componentProps;\n const {\n portalNode,\n portalSubtree\n } = useFloatingPortalNode({\n container,\n ref: forwardedRef,\n componentProps,\n elementProps\n });\n const beforeOutsideRef = React.useRef(null);\n const afterOutsideRef = React.useRef(null);\n const beforeInsideRef = React.useRef(null);\n const afterInsideRef = React.useRef(null);\n const [focusManagerState, setFocusManagerState] = React.useState(null);\n const modal = focusManagerState?.modal;\n const open = focusManagerState?.open;\n const shouldRenderGuards = typeof renderGuards === 'boolean' ? renderGuards : !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;\n\n // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n React.useEffect(() => {\n if (!portalNode || modal) {\n return undefined;\n }\n\n // Make sure elements inside the portal element are tabbable only when the\n // portal has already been focused, either by tabbing into a focus trap\n // element outside or using the mouse.\n function onFocus(event) {\n if (portalNode && isOutsideEvent(event)) {\n const focusing = event.type === 'focusin';\n const manageFocus = focusing ? enableFocusInside : disableFocusInside;\n manageFocus(portalNode);\n }\n }\n\n // Listen to the event on the capture phase so they run before the focus\n // trap elements onFocus prop is called.\n portalNode.addEventListener('focusin', onFocus, true);\n portalNode.addEventListener('focusout', onFocus, true);\n return () => {\n portalNode.removeEventListener('focusin', onFocus, true);\n portalNode.removeEventListener('focusout', onFocus, true);\n };\n }, [portalNode, modal]);\n React.useEffect(() => {\n if (!portalNode || open) {\n return;\n }\n enableFocusInside(portalNode);\n }, [open, portalNode]);\n const portalContextValue = React.useMemo(() => ({\n beforeOutsideRef,\n afterOutsideRef,\n beforeInsideRef,\n afterInsideRef,\n portalNode,\n setFocusManagerState\n }), [portalNode]);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [portalSubtree, /*#__PURE__*/_jsxs(PortalContext.Provider, {\n value: portalContextValue,\n children: [shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: beforeOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n beforeInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n }\n }\n }), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(\"span\", {\n \"aria-owns\": portalNode.id,\n style: ownerVisuallyHidden\n }), portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: afterOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n afterInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n if (focusManagerState?.closeOnFocusOut) {\n focusManagerState?.onOpenChange(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));\n }\n }\n }\n })]\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") FloatingPortal.displayName = \"FloatingPortal\";","import * as React from 'react';\nimport { tabbable, isTabbable, focusable } from 'tabbable';\nimport { getComputedStyle, getNodeName, isHTMLElement } from '@floating-ui/utils/dom';\nimport { useMergedRefs } from '@base-ui-components/utils/useMergedRefs';\nimport { useValueAsRef } from '@base-ui-components/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { visuallyHidden } from '@base-ui-components/utils/visuallyHidden';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { useAnimationFrame } from '@base-ui-components/utils/useAnimationFrame';\nimport { ownerWindow } from '@base-ui-components/utils/owner';\nimport { FocusGuard } from \"../../utils/FocusGuard.js\";\nimport { activeElement, contains, getDocument, getTarget, isTypeableCombobox, isVirtualClick, isVirtualPointerEvent, stopEvent, getNodeAncestors, getNodeChildren, getFloatingFocusElement, getTabbableOptions, isOutsideEvent, getNextTabbable, getPreviousTabbable } from \"../utils.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.js\";\nimport { markOthers } from \"../utils/markOthers.js\";\nimport { usePortalContext } from \"./FloatingPortal.js\";\nimport { useFloatingTree } from \"./FloatingTree.js\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../utils/constants.js\";\nimport { resolveRef } from \"../../utils/resolveRef.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction getEventType(event, lastInteractionType) {\n const win = ownerWindow(event.target);\n if (event instanceof win.KeyboardEvent) {\n return 'keyboard';\n }\n if (event instanceof win.FocusEvent) {\n // Focus events can be caused by a preceding pointer interaction (e.g., focusout on outside press).\n // Prefer the last known pointer type if provided, else treat as keyboard.\n return lastInteractionType || 'keyboard';\n }\n if ('pointerType' in event) {\n return event.pointerType || 'keyboard';\n }\n if ('touches' in event) {\n return 'touch';\n }\n if (event instanceof win.MouseEvent) {\n // onClick events may not contain pointer events, and will fall through to here\n return lastInteractionType || (event.detail === 0 ? 'keyboard' : 'mouse');\n }\n return '';\n}\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction clearDisconnectedPreviouslyFocusedElements() {\n previouslyFocusedElements = previouslyFocusedElements.filter(el => el.isConnected);\n}\nfunction addPreviouslyFocusedElement(element) {\n clearDisconnectedPreviouslyFocusedElements();\n if (element && getNodeName(element) !== 'body') {\n previouslyFocusedElements.push(element);\n if (previouslyFocusedElements.length > LIST_LIMIT) {\n previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n }\n }\n}\nfunction getPreviouslyFocusedElement() {\n clearDisconnectedPreviouslyFocusedElements();\n return previouslyFocusedElements[previouslyFocusedElements.length - 1];\n}\nfunction getFirstTabbableElement(container) {\n if (!container) {\n return null;\n }\n const tabbableOptions = getTabbableOptions();\n if (isTabbable(container, tabbableOptions)) {\n return container;\n }\n return tabbable(container, tabbableOptions)[0] || container;\n}\nfunction isFocusable(element) {\n if (!element || !element.isConnected) {\n return false;\n }\n if (typeof element.checkVisibility === 'function') {\n return element.checkVisibility();\n }\n return getComputedStyle(element).display !== 'none';\n}\nfunction handleTabIndex(floatingFocusElement, orderRef) {\n if (!orderRef.current.includes('floating') && !floatingFocusElement.getAttribute('role')?.includes('dialog')) {\n return;\n }\n const options = getTabbableOptions();\n const focusableElements = focusable(floatingFocusElement, options);\n const tabbableContent = focusableElements.filter(element => {\n const dataTabIndex = element.getAttribute('data-tabindex') || '';\n return isTabbable(element, options) || element.hasAttribute('data-tabindex') && !dataTabIndex.startsWith('-');\n });\n const tabIndex = floatingFocusElement.getAttribute('tabindex');\n if (orderRef.current.includes('floating') || tabbableContent.length === 0) {\n if (tabIndex !== '0') {\n floatingFocusElement.setAttribute('tabindex', '0');\n }\n } else if (tabIndex !== '-1' || floatingFocusElement.hasAttribute('data-tabindex') && floatingFocusElement.getAttribute('data-tabindex') !== '-1') {\n floatingFocusElement.setAttribute('tabindex', '-1');\n floatingFocusElement.setAttribute('data-tabindex', '-1');\n }\n}\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n * @internal\n */\nexport function FloatingFocusManager(props) {\n const {\n context,\n children,\n disabled = false,\n order = ['content'],\n initialFocus = true,\n returnFocus = true,\n restoreFocus = false,\n modal = true,\n closeOnFocusOut = true,\n openInteractionType = '',\n getInsideElements: getInsideElementsProp = () => [],\n nextFocusableElement,\n previousFocusableElement,\n beforeContentFocusGuardRef,\n externalTree\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const domReference = store.useState('domReferenceElement');\n const floating = store.useState('floatingElement');\n const {\n events,\n dataRef\n } = store.context;\n const getNodeId = useStableCallback(() => dataRef.current.floatingContext?.nodeId);\n const getInsideElements = useStableCallback(getInsideElementsProp);\n const ignoreInitialFocus = initialFocus === false;\n // If the reference is a combobox and is typeable (e.g. input/textarea),\n // there are different focus semantics. The guards should not be rendered, but\n // aria-hidden should be applied to all nodes still. Further, the visually\n // hidden dismiss button should only appear at the end of the list, not the\n // start.\n const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n const orderRef = useValueAsRef(order);\n const initialFocusRef = useValueAsRef(initialFocus);\n const returnFocusRef = useValueAsRef(returnFocus);\n const openInteractionTypeRef = useValueAsRef(openInteractionType);\n const tree = useFloatingTree(externalTree);\n const portalContext = usePortalContext();\n const startDismissButtonRef = React.useRef(null);\n const endDismissButtonRef = React.useRef(null);\n const preventReturnFocusRef = React.useRef(false);\n const isPointerDownRef = React.useRef(false);\n const tabbableIndexRef = React.useRef(-1);\n const closeTypeRef = React.useRef('');\n const lastInteractionTypeRef = React.useRef('');\n const blurTimeout = useTimeout();\n const pointerDownTimeout = useTimeout();\n const restoreFocusFrame = useAnimationFrame();\n const isInsidePortal = portalContext != null;\n const floatingFocusElement = getFloatingFocusElement(floating);\n const getTabbableContent = useStableCallback((container = floatingFocusElement) => {\n return container ? tabbable(container, getTabbableOptions()) : [];\n });\n const getTabbableElements = useStableCallback(container => {\n const content = getTabbableContent(container);\n return orderRef.current.map(() => content).filter(Boolean).flat();\n });\n React.useEffect(() => {\n if (disabled) {\n return undefined;\n }\n if (!modal) {\n return undefined;\n }\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (contains(floatingFocusElement, activeElement(getDocument(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n stopEvent(event);\n }\n }\n }\n const doc = getDocument(floatingFocusElement);\n doc.addEventListener('keydown', onKeyDown);\n return () => {\n doc.removeEventListener('keydown', onKeyDown);\n };\n }, [disabled, domReference, floatingFocusElement, modal, orderRef, isUntrappedTypeableCombobox, getTabbableContent, getTabbableElements]);\n React.useEffect(() => {\n if (disabled) {\n return undefined;\n }\n if (!floating) {\n return undefined;\n }\n function handleFocusIn(event) {\n const target = getTarget(event);\n const tabbableContent = getTabbableContent();\n const tabbableIndex = tabbableContent.indexOf(target);\n if (tabbableIndex !== -1) {\n tabbableIndexRef.current = tabbableIndex;\n }\n }\n floating.addEventListener('focusin', handleFocusIn);\n return () => {\n floating.removeEventListener('focusin', handleFocusIn);\n };\n }, [disabled, floating, getTabbableContent]);\n\n // Track the last interaction type at the document level to disambiguate focus events\n React.useEffect(() => {\n if (disabled || !open) {\n return undefined;\n }\n const doc = getDocument(floatingFocusElement);\n function onPointerDown(event) {\n lastInteractionTypeRef.current = event.pointerType || 'keyboard';\n }\n function onKeyDown() {\n lastInteractionTypeRef.current = 'keyboard';\n }\n doc.addEventListener('pointerdown', onPointerDown, true);\n doc.addEventListener('keydown', onKeyDown, true);\n return () => {\n doc.removeEventListener('pointerdown', onPointerDown, true);\n doc.removeEventListener('keydown', onKeyDown, true);\n };\n }, [disabled, floating, domReference, floatingFocusElement, open]);\n React.useEffect(() => {\n if (disabled) {\n return undefined;\n }\n if (!closeOnFocusOut) {\n return undefined;\n }\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n pointerDownTimeout.start(0, () => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n const currentTarget = event.currentTarget;\n const target = getTarget(event);\n queueMicrotask(() => {\n const nodeId = getNodeId();\n const triggers = store.context.triggerElements;\n const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext?.portalNode, relatedTarget) || relatedTarget != null && triggers.hasElement(relatedTarget) || triggers.hasMatchingElement(trigger => contains(trigger, relatedTarget)) || relatedTarget?.hasAttribute(createAttribute('focus-guard')) || tree && (getNodeChildren(tree.nodesRef.current, nodeId).find(node => contains(node.context?.elements.floating, relatedTarget) || contains(node.context?.elements.domReference, relatedTarget)) || getNodeAncestors(tree.nodesRef.current, nodeId).find(node => [node.context?.elements.floating, getFloatingFocusElement(node.context?.elements.floating)].includes(relatedTarget) || node.context?.elements.domReference === relatedTarget)));\n if (currentTarget === domReference && floatingFocusElement) {\n handleTabIndex(floatingFocusElement, orderRef);\n }\n\n // Restore focus to the previous tabbable element index to prevent\n // focus from being lost outside the floating tree.\n if (restoreFocus && currentTarget !== domReference && !isFocusable(target) && activeElement(getDocument(floatingFocusElement)) === getDocument(floatingFocusElement).body) {\n // Let `FloatingPortal` effect knows that focus is still inside the\n // floating tree.\n if (isHTMLElement(floatingFocusElement)) {\n floatingFocusElement.focus();\n // If explicitly requested to restore focus to the popup container, do not search\n // for the next/previous tabbable element.\n if (restoreFocus === 'popup') {\n // If the element is removed on pointerdown, focus tries to move it,\n // but since it's removed at the same time, focus gets lost as it\n // happens after the .focus() call above.\n // In this case, focus needs to be moved asynchronously.\n restoreFocusFrame.request(() => {\n floatingFocusElement.focus();\n });\n return;\n }\n }\n const prevTabbableIndex = tabbableIndexRef.current;\n const tabbableContent = getTabbableContent();\n const nodeToFocus = tabbableContent[prevTabbableIndex] || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;\n if (isHTMLElement(nodeToFocus)) {\n nodeToFocus.focus();\n }\n }\n\n // https://github.com/floating-ui/floating-ui/issues/3060\n if (dataRef.current.insideReactTree) {\n dataRef.current.insideReactTree = false;\n return;\n }\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && (\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n // For an \"untrapped\" typeable combobox (input role=combobox with\n // initialFocus=false), re-opening the popup and tabbing out should still close it even\n // when the previously focused element (e.g. the next tabbable outside the popup) is\n // focused again. Otherwise, the popup remains open on the second Tab sequence:\n // click input -> Tab (closes) -> click input -> Tab.\n // Allow closing when `isUntrappedTypeableCombobox` regardless of the previously focused element.\n isUntrappedTypeableCombobox || relatedTarget !== getPreviouslyFocusedElement())) {\n preventReturnFocusRef.current = true;\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event));\n }\n });\n }\n function markInsideReactTree() {\n dataRef.current.insideReactTree = true;\n blurTimeout.start(0, () => {\n dataRef.current.insideReactTree = false;\n });\n }\n const domReferenceElement = isHTMLElement(domReference) ? domReference : null;\n const cleanups = [];\n if (!floating && !domReferenceElement) {\n return undefined;\n }\n if (domReferenceElement) {\n domReferenceElement.addEventListener('focusout', handleFocusOutside);\n domReferenceElement.addEventListener('pointerdown', handlePointerDown);\n cleanups.push(() => {\n domReferenceElement.removeEventListener('focusout', handleFocusOutside);\n domReferenceElement.removeEventListener('pointerdown', handlePointerDown);\n });\n }\n if (floating) {\n floating.addEventListener('focusout', handleFocusOutside);\n if (portalContext) {\n floating.addEventListener('focusout', markInsideReactTree, true);\n cleanups.push(() => {\n floating.removeEventListener('focusout', markInsideReactTree, true);\n });\n }\n cleanups.push(() => {\n floating.removeEventListener('focusout', handleFocusOutside);\n });\n }\n return () => {\n cleanups.forEach(cleanup => {\n cleanup();\n });\n };\n }, [disabled, domReference, floating, floatingFocusElement, modal, tree, portalContext, store, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, orderRef, dataRef, blurTimeout, pointerDownTimeout, restoreFocusFrame]);\n const beforeGuardRef = React.useRef(null);\n const afterGuardRef = React.useRef(null);\n const mergedBeforeGuardRef = useMergedRefs(beforeGuardRef, beforeContentFocusGuardRef, portalContext?.beforeInsideRef);\n const mergedAfterGuardRef = useMergedRefs(afterGuardRef, portalContext?.afterInsideRef);\n React.useEffect(() => {\n if (disabled || !floating || !open) {\n return undefined;\n }\n\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from(portalContext?.portalNode?.querySelectorAll(`[${createAttribute('portal')}]`) || []);\n const ancestors = tree ? getNodeAncestors(tree.nodesRef.current, getNodeId()) : [];\n const rootAncestorComboboxDomReference = ancestors.find(node => isTypeableCombobox(node.context?.elements.domReference || null))?.context?.elements.domReference;\n const insideElements = [floating, rootAncestorComboboxDomReference, ...portalNodes, ...getInsideElements(), startDismissButtonRef.current, endDismissButtonRef.current, beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement), isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n const cleanup = markOthers(insideElements, modal || isUntrappedTypeableCombobox);\n return () => {\n cleanup();\n };\n }, [open, disabled, domReference, floating, modal, orderRef, portalContext, isUntrappedTypeableCombobox, tree, getNodeId, getInsideElements, nextFocusableElement, previousFocusableElement]);\n useIsoLayoutEffect(() => {\n if (!open || disabled || !isHTMLElement(floatingFocusElement)) {\n return;\n }\n const doc = getDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n\n // Wait for any layout effect state setters to execute to set `tabIndex`.\n queueMicrotask(() => {\n const focusableElements = getTabbableElements(floatingFocusElement);\n const initialFocusValueOrFn = initialFocusRef.current;\n const resolvedInitialFocus = typeof initialFocusValueOrFn === 'function' ? initialFocusValueOrFn(openInteractionTypeRef.current || '') : initialFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedInitialFocus === undefined || resolvedInitialFocus === false) {\n return;\n }\n let elToFocus;\n if (resolvedInitialFocus === true || resolvedInitialFocus === null) {\n elToFocus = focusableElements[0] || floatingFocusElement;\n } else {\n elToFocus = resolveRef(resolvedInitialFocus);\n }\n elToFocus = elToFocus || focusableElements[0] || floatingFocusElement;\n const focusAlreadyInsideFloatingEl = contains(floatingFocusElement, previouslyFocusedElement);\n if (focusAlreadyInsideFloatingEl) {\n return;\n }\n enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floatingFocusElement\n });\n });\n }, [disabled, open, floatingFocusElement, ignoreInitialFocus, getTabbableElements, initialFocusRef, openInteractionTypeRef]);\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n const doc = getDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n addPreviouslyFocusedElement(previouslyFocusedElement);\n\n // Dismissing via outside press should always ignore `returnFocus` to\n // prevent unwanted scrolling.\n function onOpenChangeLocal(details) {\n if (!details.open) {\n closeTypeRef.current = getEventType(details.nativeEvent, lastInteractionTypeRef.current);\n }\n if (details.reason === REASONS.triggerHover && details.nativeEvent.type === 'mouseleave') {\n preventReturnFocusRef.current = true;\n }\n if (details.reason !== REASONS.outsidePress) {\n return;\n }\n if (details.nested) {\n preventReturnFocusRef.current = false;\n } else if (isVirtualClick(details.nativeEvent) || isVirtualPointerEvent(details.nativeEvent)) {\n preventReturnFocusRef.current = false;\n } else {\n let isPreventScrollSupported = false;\n document.createElement('div').focus({\n get preventScroll() {\n isPreventScrollSupported = true;\n return false;\n }\n });\n if (isPreventScrollSupported) {\n preventReturnFocusRef.current = false;\n } else {\n preventReturnFocusRef.current = true;\n }\n }\n }\n events.on('openchange', onOpenChangeLocal);\n const fallbackEl = doc.createElement('span');\n fallbackEl.setAttribute('tabindex', '-1');\n fallbackEl.setAttribute('aria-hidden', 'true');\n Object.assign(fallbackEl.style, visuallyHidden);\n if (isInsidePortal && domReference) {\n domReference.insertAdjacentElement('afterend', fallbackEl);\n }\n function getReturnElement() {\n const returnFocusValueOrFn = returnFocusRef.current;\n let resolvedReturnFocusValue = typeof returnFocusValueOrFn === 'function' ? returnFocusValueOrFn(closeTypeRef.current) : returnFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedReturnFocusValue === undefined || resolvedReturnFocusValue === false) {\n return null;\n }\n if (resolvedReturnFocusValue === null) {\n resolvedReturnFocusValue = true;\n }\n if (typeof resolvedReturnFocusValue === 'boolean') {\n const el = domReference || getPreviouslyFocusedElement();\n return el && el.isConnected ? el : fallbackEl;\n }\n const fallback = domReference || getPreviouslyFocusedElement() || fallbackEl;\n return resolveRef(resolvedReturnFocusValue) || fallback;\n }\n return () => {\n events.off('openchange', onOpenChangeLocal);\n const activeEl = activeElement(doc);\n const isFocusInsideFloatingTree = contains(floating, activeEl) || tree && getNodeChildren(tree.nodesRef.current, getNodeId(), false).some(node => contains(node.context?.elements.floating, activeEl));\n const returnElement = getReturnElement();\n queueMicrotask(() => {\n // This is `returnElement`, if it's tabbable, or its first tabbable child.\n const tabbableReturnElement = getFirstTabbableElement(returnElement);\n const hasExplicitReturnFocus = typeof returnFocusRef.current !== 'boolean';\n if (\n // eslint-disable-next-line react-hooks/exhaustive-deps\n returnFocusRef.current && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && (\n // If the focus moved somewhere else after mount, avoid returning focus\n // since it likely entered a different element which should be\n // respected: https://github.com/floating-ui/floating-ui/issues/2607\n !hasExplicitReturnFocus && tabbableReturnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n tabbableReturnElement.focus({\n preventScroll: true\n });\n }\n fallbackEl.remove();\n });\n };\n }, [disabled, floating, floatingFocusElement, returnFocusRef, dataRef, events, tree, isInsidePortal, domReference, getNodeId]);\n React.useEffect(() => {\n // The `returnFocus` cleanup behavior is inside a microtask; ensure we\n // wait for it to complete before resetting the flag.\n queueMicrotask(() => {\n preventReturnFocusRef.current = false;\n });\n }, [disabled]);\n React.useEffect(() => {\n if (disabled || !open) {\n return undefined;\n }\n function handlePointerDown(event) {\n const target = getTarget(event);\n if (target?.closest(`[${CLICK_TRIGGER_IDENTIFIER}]`)) {\n isPointerDownRef.current = true;\n }\n }\n const doc = getDocument(floatingFocusElement);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n return () => {\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n };\n }, [disabled, open, floatingFocusElement]);\n\n // Synchronize the `context` & `modal` value to the FloatingPortal context.\n // It will decide whether or not it needs to render its own guards.\n useIsoLayoutEffect(() => {\n if (disabled) {\n return undefined;\n }\n if (!portalContext) {\n return undefined;\n }\n portalContext.setFocusManagerState({\n modal,\n closeOnFocusOut,\n open,\n onOpenChange: store.setOpen,\n domReference\n });\n return () => {\n portalContext.setFocusManagerState(null);\n };\n }, [disabled, portalContext, modal, open, store, closeOnFocusOut, domReference]);\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n handleTabIndex(floatingFocusElement, orderRef);\n return () => {\n queueMicrotask(clearDisconnectedPreviouslyFocusedElements);\n };\n }, [disabled, floatingFocusElement, orderRef]);\n const shouldRenderGuards = !disabled && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedBeforeGuardRef,\n onFocus: event => {\n if (modal) {\n const els = getTabbableElements();\n enqueueFocus(els[els.length - 1]);\n } else if (portalContext?.portalNode) {\n preventReturnFocusRef.current = false;\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n } else {\n resolveRef(previousFocusableElement ?? portalContext.beforeOutsideRef)?.focus();\n }\n }\n }\n }), children, shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedAfterGuardRef,\n onFocus: event => {\n if (modal) {\n enqueueFocus(getTabbableElements()[0]);\n } else if (portalContext?.portalNode) {\n if (closeOnFocusOut) {\n preventReturnFocusRef.current = true;\n }\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n } else {\n resolveRef(nextFocusableElement ?? portalContext.afterOutsideRef)?.focus();\n }\n }\n }\n })]\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { useAnimationFrame } from '@base-ui-components/utils/useAnimationFrame';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { EMPTY_OBJECT } from \"../../utils/constants.js\";\nimport { isMouseLikePointerType, isTypeableElement } from \"../utils.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\n/**\n * Opens or closes the floating element when clicking the reference element.\n * @see https://floating-ui.com/docs/useClick\n */\nexport function useClick(context, props = {}) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const dataRef = store.context.dataRef;\n const {\n enabled = true,\n event: eventOption = 'click',\n toggle = true,\n ignoreMouse = false,\n stickIfOpen = true,\n touchOpenDelay = 0\n } = props;\n const pointerTypeRef = React.useRef(undefined);\n const frame = useAnimationFrame();\n const touchOpenTimeout = useTimeout();\n const reference = React.useMemo(() => ({\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onMouseDown(event) {\n const pointerType = pointerTypeRef.current;\n const nativeEvent = event.nativeEvent;\n const open = store.select('open');\n\n // Ignore all buttons except for the \"main\" button.\n // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n if (event.button !== 0 || eventOption === 'click' || isMouseLikePointerType(pointerType, true) && ignoreMouse) {\n return;\n }\n const openEvent = dataRef.current.openEvent;\n const openEventType = openEvent?.type;\n const hasClickedOnInactiveTrigger = store.select('domReferenceElement') !== event.currentTarget;\n const nextOpen = open && hasClickedOnInactiveTrigger || !(open && toggle && (openEvent && stickIfOpen ? openEventType === 'click' || openEventType === 'mousedown' : true));\n\n // Animations sometimes won't run on a typeable element if using a rAF.\n // Focus is always set on these elements. For touch, we may delay opening.\n if (isTypeableElement(nativeEvent.target)) {\n const details = createChangeEventDetails(REASONS.triggerPress, nativeEvent, nativeEvent.target);\n if (nextOpen && pointerType === 'touch' && touchOpenDelay > 0) {\n touchOpenTimeout.start(touchOpenDelay, () => {\n store.setOpen(true, details);\n });\n } else {\n store.setOpen(nextOpen, details);\n }\n return;\n }\n\n // Capture the currentTarget before the rAF.\n // as React sets it to null after the event handler completes.\n const eventCurrentTarget = event.currentTarget;\n\n // Wait until focus is set on the element. This is an alternative to\n // `event.preventDefault()` to avoid :focus-visible from appearing when using a pointer.\n frame.request(() => {\n const details = createChangeEventDetails(REASONS.triggerPress, nativeEvent, eventCurrentTarget);\n if (nextOpen && pointerType === 'touch' && touchOpenDelay > 0) {\n touchOpenTimeout.start(touchOpenDelay, () => {\n store.setOpen(true, details);\n });\n } else {\n store.setOpen(nextOpen, details);\n }\n });\n },\n onClick(event) {\n if (eventOption === 'mousedown-only') {\n return;\n }\n const pointerType = pointerTypeRef.current;\n if (eventOption === 'mousedown' && pointerType) {\n pointerTypeRef.current = undefined;\n return;\n }\n if (isMouseLikePointerType(pointerType, true) && ignoreMouse) {\n return;\n }\n const open = store.select('open');\n const openEvent = dataRef.current.openEvent;\n const openEventType = openEvent?.type;\n const hasClickedOnInactiveTrigger = store.select('domReferenceElement') !== event.currentTarget;\n const nextOpen = open && hasClickedOnInactiveTrigger || !(open && toggle && (openEvent && stickIfOpen ? openEventType === 'click' || openEventType === 'mousedown' || openEventType === 'keydown' || openEventType === 'keyup' : true));\n const details = createChangeEventDetails(REASONS.triggerPress, event.nativeEvent, event.currentTarget);\n if (nextOpen && pointerType === 'touch' && touchOpenDelay > 0) {\n touchOpenTimeout.start(touchOpenDelay, () => {\n store.setOpen(true, details);\n });\n } else {\n store.setOpen(nextOpen, details);\n }\n },\n onKeyDown() {\n pointerTypeRef.current = undefined;\n }\n }), [dataRef, eventOption, ignoreMouse, store, stickIfOpen, toggle, frame, touchOpenTimeout, touchOpenDelay]);\n return React.useMemo(() => enabled ? {\n reference\n } : EMPTY_OBJECT, [enabled, reference]);\n}","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nconst absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => ({\n ...offset$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => ({\n ...shift$1(options),\n options: [options, deps]\n});\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => ({\n ...limitShift$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => ({\n ...flip$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => ({\n ...size$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => ({\n ...autoPlacement$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => ({\n ...hide$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => ({\n ...inline$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => ({\n ...arrow$1(options),\n options: [options, deps]\n});\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n","import * as React from 'react';\nimport { getOverflowAncestors } from '@floating-ui/react-dom';\nimport { getComputedStyle, getParentNode, isElement, isHTMLElement, isLastTraversableNode, isWebKit } from '@floating-ui/utils/dom';\nimport { Timeout, useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { contains, getDocument, getTarget, isEventTargetWithin, isReactEvent, isRootElement, getNodeChildren } from \"../utils.js\";\n\n/* eslint-disable no-underscore-dangle */\n\nimport { useFloatingTree } from \"../components/FloatingTree.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nconst bubbleHandlerKeys = {\n intentional: 'onClick',\n sloppy: 'onPointerDown'\n};\nexport function normalizeProp(normalizable) {\n return {\n escapeKey: typeof normalizable === 'boolean' ? normalizable : normalizable?.escapeKey ?? false,\n outsidePress: typeof normalizable === 'boolean' ? normalizable : normalizable?.outsidePress ?? true\n };\n}\n/**\n * Closes the floating element when a dismissal is requested — by default, when\n * the user presses the `escape` key or outside of the floating element.\n * @see https://floating-ui.com/docs/useDismiss\n */\nexport function useDismiss(context, props = {}) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const referenceElement = store.useState('referenceElement');\n const domReferenceElement = store.useState('domReferenceElement');\n const {\n onOpenChange,\n dataRef\n } = store.context;\n const {\n enabled = true,\n escapeKey = true,\n outsidePress: outsidePressProp = true,\n outsidePressEvent = 'sloppy',\n referencePress = false,\n referencePressEvent = 'sloppy',\n ancestorScroll = false,\n bubbles,\n externalTree\n } = props;\n const tree = useFloatingTree(externalTree);\n const outsidePressFn = useStableCallback(typeof outsidePressProp === 'function' ? outsidePressProp : () => false);\n const outsidePress = typeof outsidePressProp === 'function' ? outsidePressFn : outsidePressProp;\n const endedOrStartedInsideRef = React.useRef(false);\n const {\n escapeKey: escapeKeyBubbles,\n outsidePress: outsidePressBubbles\n } = normalizeProp(bubbles);\n const touchStateRef = React.useRef(null);\n const cancelDismissOnEndTimeout = useTimeout();\n const clearInsideReactTreeTimeout = useTimeout();\n const clearInsideReactTree = useStableCallback(() => {\n clearInsideReactTreeTimeout.clear();\n dataRef.current.insideReactTree = false;\n });\n const isComposingRef = React.useRef(false);\n const currentPointerTypeRef = React.useRef('');\n const trackPointerType = useStableCallback(event => {\n currentPointerTypeRef.current = event.pointerType;\n });\n const getOutsidePressEvent = useStableCallback(() => {\n const type = currentPointerTypeRef.current;\n const computedType = type === 'pen' || !type ? 'mouse' : type;\n const resolved = typeof outsidePressEvent === 'function' ? outsidePressEvent() : outsidePressEvent;\n if (typeof resolved === 'string') {\n return resolved;\n }\n return resolved[computedType];\n });\n const closeOnEscapeKeyDown = useStableCallback(event => {\n if (!open || !enabled || !escapeKey || event.key !== 'Escape') {\n return;\n }\n\n // Wait until IME is settled. Pressing `Escape` while composing should\n // close the compose menu, but not the floating element.\n if (isComposingRef.current) {\n return;\n }\n const nodeId = dataRef.current.floatingContext?.nodeId;\n const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];\n if (!escapeKeyBubbles) {\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n if (child.context?.open && !child.context.dataRef.current.__escapeKeyBubbles) {\n shouldDismiss = false;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n }\n const native = isReactEvent(event) ? event.nativeEvent : event;\n const eventDetails = createChangeEventDetails(REASONS.escapeKey, native);\n store.setOpen(false, eventDetails);\n if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {\n event.stopPropagation();\n }\n });\n const shouldIgnoreEvent = useStableCallback(event => {\n const computedOutsidePressEvent = getOutsidePressEvent();\n return computedOutsidePressEvent === 'intentional' && event.type !== 'click' || computedOutsidePressEvent === 'sloppy' && event.type === 'click';\n });\n const markInsideReactTree = useStableCallback(() => {\n dataRef.current.insideReactTree = true;\n clearInsideReactTreeTimeout.start(0, clearInsideReactTree);\n });\n const closeOnPressOutside = useStableCallback((event, endedOrStartedInside = false) => {\n if (shouldIgnoreEvent(event)) {\n clearInsideReactTree();\n return;\n }\n if (dataRef.current.insideReactTree) {\n clearInsideReactTree();\n return;\n }\n if (getOutsidePressEvent() === 'intentional' && endedOrStartedInside) {\n return;\n }\n if (typeof outsidePress === 'function' && !outsidePress(event)) {\n return;\n }\n const target = getTarget(event);\n const inertSelector = `[${createAttribute('inert')}]`;\n const markers = getDocument(store.select('floatingElement')).querySelectorAll(inertSelector);\n const triggers = store.context.triggerElements;\n\n // If another trigger is clicked, don't close the floating element.\n if (target && (triggers.hasElement(target) || triggers.hasMatchingElement(trigger => contains(trigger, target)))) {\n return;\n }\n let targetRootAncestor = isElement(target) ? target : null;\n while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {\n const nextParent = getParentNode(targetRootAncestor);\n if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {\n break;\n }\n targetRootAncestor = nextParent;\n }\n\n // Check if the click occurred on a third-party element injected after the\n // floating element rendered.\n if (markers.length && isElement(target) && !isRootElement(target) &&\n // Clicked on a direct ancestor (e.g. FloatingOverlay).\n !contains(target, store.select('floatingElement')) &&\n // If the target root element contains none of the markers, then the\n // element was injected after the floating element rendered.\n Array.from(markers).every(marker => !contains(targetRootAncestor, marker))) {\n return;\n }\n\n // Check if the click occurred on the scrollbar\n // Skip for touch events: scrollbars don't receive touch events on most platforms\n if (isHTMLElement(target) && !('touches' in event)) {\n const lastTraversableNode = isLastTraversableNode(target);\n const style = getComputedStyle(target);\n const scrollRe = /auto|scroll/;\n const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);\n const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);\n const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;\n const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;\n const isRTL = style.direction === 'rtl';\n\n // Check click position relative to scrollbar.\n // In some browsers it is possible to change the <body> (or window)\n // scrollbar to the left side, but is very rare and is difficult to\n // check for. Plus, for modal dialogs with backdrops, it is more\n // important that the backdrop is checked but not so much the window.\n const pressedVerticalScrollbar = canScrollY && (isRTL ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);\n const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;\n if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {\n return;\n }\n }\n const nodeId = dataRef.current.floatingContext?.nodeId;\n const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some(node => isEventTargetWithin(event, node.context?.elements.floating));\n if (isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement')) || targetIsInsideChildren) {\n return;\n }\n const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n if (child.context?.open && !child.context.dataRef.current.__outsidePressBubbles) {\n shouldDismiss = false;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n store.setOpen(false, createChangeEventDetails(REASONS.outsidePress, event));\n clearInsideReactTree();\n });\n const handlePointerDown = useStableCallback(event => {\n if (getOutsidePressEvent() !== 'sloppy' || event.pointerType === 'touch' || !store.select('open') || !enabled || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\n return;\n }\n closeOnPressOutside(event);\n });\n const handleTouchStart = useStableCallback(event => {\n if (getOutsidePressEvent() !== 'sloppy' || !store.select('open') || !enabled || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\n return;\n }\n const touch = event.touches[0];\n if (touch) {\n touchStateRef.current = {\n startTime: Date.now(),\n startX: touch.clientX,\n startY: touch.clientY,\n dismissOnTouchEnd: false,\n dismissOnMouseDown: true\n };\n cancelDismissOnEndTimeout.start(1000, () => {\n if (touchStateRef.current) {\n touchStateRef.current.dismissOnTouchEnd = false;\n touchStateRef.current.dismissOnMouseDown = false;\n }\n });\n }\n });\n const handleTouchStartCapture = useStableCallback(event => {\n const target = getTarget(event);\n function callback() {\n handleTouchStart(event);\n target?.removeEventListener(event.type, callback);\n }\n target?.addEventListener(event.type, callback);\n });\n const closeOnPressOutsideCapture = useStableCallback(event => {\n // When click outside is lazy (`up` event), handle dragging.\n // Don't close if:\n // - The click started inside the floating element.\n // - The click ended inside the floating element.\n const endedOrStartedInside = endedOrStartedInsideRef.current;\n endedOrStartedInsideRef.current = false;\n cancelDismissOnEndTimeout.clear();\n if (event.type === 'mousedown' && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {\n return;\n }\n const target = getTarget(event);\n function callback() {\n if (event.type === 'pointerdown') {\n handlePointerDown(event);\n } else {\n closeOnPressOutside(event, endedOrStartedInside);\n }\n target?.removeEventListener(event.type, callback);\n }\n target?.addEventListener(event.type, callback);\n });\n const handleTouchMove = useStableCallback(event => {\n if (getOutsidePressEvent() !== 'sloppy' || !touchStateRef.current || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\n return;\n }\n const touch = event.touches[0];\n if (!touch) {\n return;\n }\n const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);\n const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n if (distance > 5) {\n touchStateRef.current.dismissOnTouchEnd = true;\n }\n if (distance > 10) {\n closeOnPressOutside(event);\n cancelDismissOnEndTimeout.clear();\n touchStateRef.current = null;\n }\n });\n const handleTouchMoveCapture = useStableCallback(event => {\n const target = getTarget(event);\n function callback() {\n handleTouchMove(event);\n target?.removeEventListener(event.type, callback);\n }\n target?.addEventListener(event.type, callback);\n });\n const handleTouchEnd = useStableCallback(event => {\n if (getOutsidePressEvent() !== 'sloppy' || !touchStateRef.current || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\n return;\n }\n if (touchStateRef.current.dismissOnTouchEnd) {\n closeOnPressOutside(event);\n }\n cancelDismissOnEndTimeout.clear();\n touchStateRef.current = null;\n });\n const handleTouchEndCapture = useStableCallback(event => {\n const target = getTarget(event);\n function callback() {\n handleTouchEnd(event);\n target?.removeEventListener(event.type, callback);\n }\n target?.addEventListener(event.type, callback);\n });\n React.useEffect(() => {\n if (!open || !enabled) {\n return undefined;\n }\n dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;\n dataRef.current.__outsidePressBubbles = outsidePressBubbles;\n const compositionTimeout = new Timeout();\n function onScroll(event) {\n store.setOpen(false, createChangeEventDetails(REASONS.none, event));\n }\n function handleCompositionStart() {\n compositionTimeout.clear();\n isComposingRef.current = true;\n }\n function handleCompositionEnd() {\n // Safari fires `compositionend` before `keydown`, so we need to wait\n // until the next tick to set `isComposing` to `false`.\n // https://bugs.webkit.org/show_bug.cgi?id=165004\n compositionTimeout.start(\n // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.\n // Only apply to WebKit for the test to remain 0ms.\n isWebKit() ? 5 : 0, () => {\n isComposingRef.current = false;\n });\n }\n const doc = getDocument(floatingElement);\n doc.addEventListener('pointerdown', trackPointerType, true);\n if (escapeKey) {\n doc.addEventListener('keydown', closeOnEscapeKeyDown);\n doc.addEventListener('compositionstart', handleCompositionStart);\n doc.addEventListener('compositionend', handleCompositionEnd);\n }\n if (outsidePress) {\n doc.addEventListener('click', closeOnPressOutsideCapture, true);\n doc.addEventListener('pointerdown', closeOnPressOutsideCapture, true);\n doc.addEventListener('touchstart', handleTouchStartCapture, true);\n doc.addEventListener('touchmove', handleTouchMoveCapture, true);\n doc.addEventListener('touchend', handleTouchEndCapture, true);\n doc.addEventListener('mousedown', closeOnPressOutsideCapture, true);\n }\n let ancestors = [];\n if (ancestorScroll) {\n if (isElement(domReferenceElement)) {\n ancestors = getOverflowAncestors(domReferenceElement);\n }\n if (isElement(floatingElement)) {\n ancestors = ancestors.concat(getOverflowAncestors(floatingElement));\n }\n if (!isElement(referenceElement) && referenceElement && referenceElement.contextElement) {\n ancestors = ancestors.concat(getOverflowAncestors(referenceElement.contextElement));\n }\n }\n\n // Ignore the visual viewport for scrolling dismissal (allow pinch-zoom)\n ancestors = ancestors.filter(ancestor => ancestor !== doc.defaultView?.visualViewport);\n ancestors.forEach(ancestor => {\n ancestor.addEventListener('scroll', onScroll, {\n passive: true\n });\n });\n return () => {\n doc.removeEventListener('pointerdown', trackPointerType, true);\n if (escapeKey) {\n doc.removeEventListener('keydown', closeOnEscapeKeyDown);\n doc.removeEventListener('compositionstart', handleCompositionStart);\n doc.removeEventListener('compositionend', handleCompositionEnd);\n }\n if (outsidePress) {\n doc.removeEventListener('click', closeOnPressOutsideCapture, true);\n doc.removeEventListener('pointerdown', closeOnPressOutsideCapture, true);\n doc.removeEventListener('touchstart', handleTouchStartCapture, true);\n doc.removeEventListener('touchmove', handleTouchMoveCapture, true);\n doc.removeEventListener('touchend', handleTouchEndCapture, true);\n doc.removeEventListener('mousedown', closeOnPressOutsideCapture, true);\n }\n ancestors.forEach(ancestor => {\n ancestor.removeEventListener('scroll', onScroll);\n });\n compositionTimeout.clear();\n };\n }, [dataRef, floatingElement, referenceElement, domReferenceElement, escapeKey, outsidePress, open, onOpenChange, ancestorScroll, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, closeOnPressOutside, closeOnPressOutsideCapture, handlePointerDown, handleTouchStartCapture, handleTouchMoveCapture, handleTouchEndCapture, trackPointerType, store]);\n React.useEffect(clearInsideReactTree, [outsidePress, clearInsideReactTree]);\n const reference = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n ...(referencePress && {\n [bubbleHandlerKeys[referencePressEvent]]: event => {\n store.setOpen(false, createChangeEventDetails(REASONS.triggerPress, event.nativeEvent));\n },\n ...(referencePressEvent !== 'intentional' && {\n onClick(event) {\n store.setOpen(false, createChangeEventDetails(REASONS.triggerPress, event.nativeEvent));\n }\n })\n })\n }), [closeOnEscapeKeyDown, store, referencePress, referencePressEvent]);\n const handlePressedInside = useStableCallback(event => {\n const target = getTarget(event.nativeEvent);\n if (!contains(store.select('floatingElement'), target) || event.button !== 0) {\n return;\n }\n endedOrStartedInsideRef.current = true;\n });\n const floating = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n onMouseDown: handlePressedInside,\n onMouseUp: handlePressedInside,\n onPointerDownCapture: markInsideReactTree,\n onMouseDownCapture: markInsideReactTree,\n onClickCapture: markInsideReactTree,\n onMouseUpCapture: markInsideReactTree,\n onTouchEndCapture: markInsideReactTree,\n onTouchMoveCapture: markInsideReactTree\n }), [closeOnEscapeKeyDown, handlePressedInside, markInsideReactTree]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n trigger: reference\n } : {}, [enabled, reference, floating]);\n}","// src/devModeChecks/identityFunctionCheck.ts\nvar runIdentityFunctionCheck = (resultFunc, inputSelectorsResults, outputSelectorResult) => {\n if (inputSelectorsResults.length === 1 && inputSelectorsResults[0] === outputSelectorResult) {\n let isInputSameAsOutput = false;\n try {\n const emptyObject = {};\n if (resultFunc(emptyObject) === emptyObject)\n isInputSameAsOutput = true;\n } catch {\n }\n if (isInputSameAsOutput) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"The result function returned its own inputs without modification. e.g\\n`createSelector([state => state.todos], todos => todos)`\\nThis could lead to inefficient memoization and unnecessary re-renders.\\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.\",\n { stack }\n );\n }\n }\n};\n\n// src/devModeChecks/inputStabilityCheck.ts\nvar runInputStabilityCheck = (inputSelectorResultsObject, options, inputSelectorArgs) => {\n const { memoize, memoizeOptions } = options;\n const { inputSelectorResults, inputSelectorResultsCopy } = inputSelectorResultsObject;\n const createAnEmptyObject = memoize(() => ({}), ...memoizeOptions);\n const areInputSelectorResultsEqual = createAnEmptyObject.apply(null, inputSelectorResults) === createAnEmptyObject.apply(null, inputSelectorResultsCopy);\n if (!areInputSelectorResultsEqual) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"An input selector returned a different result when passed same arguments.\\nThis means your output selector will likely run more frequently than intended.\\nAvoid returning a new reference inside your input selector, e.g.\\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`\",\n {\n arguments: inputSelectorArgs,\n firstInputs: inputSelectorResults,\n secondInputs: inputSelectorResultsCopy,\n stack\n }\n );\n }\n};\n\n// src/devModeChecks/setGlobalDevModeChecks.ts\nvar globalDevModeChecks = {\n inputStabilityCheck: \"once\",\n identityFunctionCheck: \"once\"\n};\nvar setGlobalDevModeChecks = (devModeChecks) => {\n Object.assign(globalDevModeChecks, devModeChecks);\n};\n\n// src/utils.ts\nvar NOT_FOUND = /* @__PURE__ */ Symbol(\"NOT_FOUND\");\nfunction assertIsFunction(func, errorMessage = `expected a function, instead received ${typeof func}`) {\n if (typeof func !== \"function\") {\n throw new TypeError(errorMessage);\n }\n}\nfunction assertIsObject(object, errorMessage = `expected an object, instead received ${typeof object}`) {\n if (typeof object !== \"object\") {\n throw new TypeError(errorMessage);\n }\n}\nfunction assertIsArrayOfFunctions(array, errorMessage = `expected all items to be functions, instead received the following types: `) {\n if (!array.every((item) => typeof item === \"function\")) {\n const itemTypes = array.map(\n (item) => typeof item === \"function\" ? `function ${item.name || \"unnamed\"}()` : typeof item\n ).join(\", \");\n throw new TypeError(`${errorMessage}[${itemTypes}]`);\n }\n}\nvar ensureIsArray = (item) => {\n return Array.isArray(item) ? item : [item];\n};\nfunction getDependencies(createSelectorArgs) {\n const dependencies = Array.isArray(createSelectorArgs[0]) ? createSelectorArgs[0] : createSelectorArgs;\n assertIsArrayOfFunctions(\n dependencies,\n `createSelector expects all input-selectors to be functions, but received the following types: `\n );\n return dependencies;\n}\nfunction collectInputSelectorResults(dependencies, inputSelectorArgs) {\n const inputSelectorResults = [];\n const { length } = dependencies;\n for (let i = 0; i < length; i++) {\n inputSelectorResults.push(dependencies[i].apply(null, inputSelectorArgs));\n }\n return inputSelectorResults;\n}\nvar getDevModeChecksExecutionInfo = (firstRun, devModeChecks) => {\n const { identityFunctionCheck, inputStabilityCheck } = {\n ...globalDevModeChecks,\n ...devModeChecks\n };\n return {\n identityFunctionCheck: {\n shouldRun: identityFunctionCheck === \"always\" || identityFunctionCheck === \"once\" && firstRun,\n run: runIdentityFunctionCheck\n },\n inputStabilityCheck: {\n shouldRun: inputStabilityCheck === \"always\" || inputStabilityCheck === \"once\" && firstRun,\n run: runInputStabilityCheck\n }\n };\n};\n\n// src/autotrackMemoize/autotracking.ts\nvar $REVISION = 0;\nvar CURRENT_TRACKER = null;\nvar Cell = class {\n revision = $REVISION;\n _value;\n _lastValue;\n _isEqual = tripleEq;\n constructor(initialValue, isEqual = tripleEq) {\n this._value = this._lastValue = initialValue;\n this._isEqual = isEqual;\n }\n // Whenever a storage value is read, it'll add itself to the current tracker if\n // one exists, entangling its state with that cache.\n get value() {\n CURRENT_TRACKER?.add(this);\n return this._value;\n }\n // Whenever a storage value is updated, we bump the global revision clock,\n // assign the revision for this storage to the new value, _and_ we schedule a\n // rerender. This is important, and it's what makes autotracking _pull_\n // based. We don't actively tell the caches which depend on the storage that\n // anything has happened. Instead, we recompute the caches when needed.\n set value(newValue) {\n if (this.value === newValue)\n return;\n this._value = newValue;\n this.revision = ++$REVISION;\n }\n};\nfunction tripleEq(a, b) {\n return a === b;\n}\nvar TrackingCache = class {\n _cachedValue;\n _cachedRevision = -1;\n _deps = [];\n hits = 0;\n fn;\n constructor(fn) {\n this.fn = fn;\n }\n clear() {\n this._cachedValue = void 0;\n this._cachedRevision = -1;\n this._deps = [];\n this.hits = 0;\n }\n get value() {\n if (this.revision > this._cachedRevision) {\n const { fn } = this;\n const currentTracker = /* @__PURE__ */ new Set();\n const prevTracker = CURRENT_TRACKER;\n CURRENT_TRACKER = currentTracker;\n this._cachedValue = fn();\n CURRENT_TRACKER = prevTracker;\n this.hits++;\n this._deps = Array.from(currentTracker);\n this._cachedRevision = this.revision;\n }\n CURRENT_TRACKER?.add(this);\n return this._cachedValue;\n }\n get revision() {\n return Math.max(...this._deps.map((d) => d.revision), 0);\n }\n};\nfunction getValue(cell) {\n if (!(cell instanceof Cell)) {\n console.warn(\"Not a valid cell! \", cell);\n }\n return cell.value;\n}\nfunction setValue(storage, value) {\n if (!(storage instanceof Cell)) {\n throw new TypeError(\n \"setValue must be passed a tracked store created with `createStorage`.\"\n );\n }\n storage.value = storage._lastValue = value;\n}\nfunction createCell(initialValue, isEqual = tripleEq) {\n return new Cell(initialValue, isEqual);\n}\nfunction createCache(fn) {\n assertIsFunction(\n fn,\n \"the first parameter to `createCache` must be a function\"\n );\n return new TrackingCache(fn);\n}\n\n// src/autotrackMemoize/tracking.ts\nvar neverEq = (a, b) => false;\nfunction createTag() {\n return createCell(null, neverEq);\n}\nfunction dirtyTag(tag, value) {\n setValue(tag, value);\n}\nvar consumeCollection = (node) => {\n let tag = node.collectionTag;\n if (tag === null) {\n tag = node.collectionTag = createTag();\n }\n getValue(tag);\n};\nvar dirtyCollection = (node) => {\n const tag = node.collectionTag;\n if (tag !== null) {\n dirtyTag(tag, null);\n }\n};\n\n// src/autotrackMemoize/proxy.ts\nvar REDUX_PROXY_LABEL = Symbol();\nvar nextId = 0;\nvar proto = Object.getPrototypeOf({});\nvar ObjectTreeNode = class {\n constructor(value) {\n this.value = value;\n this.value = value;\n this.tag.value = value;\n }\n proxy = new Proxy(this, objectProxyHandler);\n tag = createTag();\n tags = {};\n children = {};\n collectionTag = null;\n id = nextId++;\n};\nvar objectProxyHandler = {\n get(node, key) {\n function calculateResult() {\n const { value } = node;\n const childValue = Reflect.get(value, key);\n if (typeof key === \"symbol\") {\n return childValue;\n }\n if (key in proto) {\n return childValue;\n }\n if (typeof childValue === \"object\" && childValue !== null) {\n let childNode = node.children[key];\n if (childNode === void 0) {\n childNode = node.children[key] = createNode(childValue);\n }\n if (childNode.tag) {\n getValue(childNode.tag);\n }\n return childNode.proxy;\n } else {\n let tag = node.tags[key];\n if (tag === void 0) {\n tag = node.tags[key] = createTag();\n tag.value = childValue;\n }\n getValue(tag);\n return childValue;\n }\n }\n const res = calculateResult();\n return res;\n },\n ownKeys(node) {\n consumeCollection(node);\n return Reflect.ownKeys(node.value);\n },\n getOwnPropertyDescriptor(node, prop) {\n return Reflect.getOwnPropertyDescriptor(node.value, prop);\n },\n has(node, prop) {\n return Reflect.has(node.value, prop);\n }\n};\nvar ArrayTreeNode = class {\n constructor(value) {\n this.value = value;\n this.value = value;\n this.tag.value = value;\n }\n proxy = new Proxy([this], arrayProxyHandler);\n tag = createTag();\n tags = {};\n children = {};\n collectionTag = null;\n id = nextId++;\n};\nvar arrayProxyHandler = {\n get([node], key) {\n if (key === \"length\") {\n consumeCollection(node);\n }\n return objectProxyHandler.get(node, key);\n },\n ownKeys([node]) {\n return objectProxyHandler.ownKeys(node);\n },\n getOwnPropertyDescriptor([node], prop) {\n return objectProxyHandler.getOwnPropertyDescriptor(node, prop);\n },\n has([node], prop) {\n return objectProxyHandler.has(node, prop);\n }\n};\nfunction createNode(value) {\n if (Array.isArray(value)) {\n return new ArrayTreeNode(value);\n }\n return new ObjectTreeNode(value);\n}\nfunction updateNode(node, newValue) {\n const { value, tags, children } = node;\n node.value = newValue;\n if (Array.isArray(value) && Array.isArray(newValue) && value.length !== newValue.length) {\n dirtyCollection(node);\n } else {\n if (value !== newValue) {\n let oldKeysSize = 0;\n let newKeysSize = 0;\n let anyKeysAdded = false;\n for (const _key in value) {\n oldKeysSize++;\n }\n for (const key in newValue) {\n newKeysSize++;\n if (!(key in value)) {\n anyKeysAdded = true;\n break;\n }\n }\n const isDifferent = anyKeysAdded || oldKeysSize !== newKeysSize;\n if (isDifferent) {\n dirtyCollection(node);\n }\n }\n }\n for (const key in tags) {\n const childValue = value[key];\n const newChildValue = newValue[key];\n if (childValue !== newChildValue) {\n dirtyCollection(node);\n dirtyTag(tags[key], newChildValue);\n }\n if (typeof newChildValue === \"object\" && newChildValue !== null) {\n delete tags[key];\n }\n }\n for (const key in children) {\n const childNode = children[key];\n const newChildValue = newValue[key];\n const childValue = childNode.value;\n if (childValue === newChildValue) {\n continue;\n } else if (typeof newChildValue === \"object\" && newChildValue !== null) {\n updateNode(childNode, newChildValue);\n } else {\n deleteNode(childNode);\n delete children[key];\n }\n }\n}\nfunction deleteNode(node) {\n if (node.tag) {\n dirtyTag(node.tag, null);\n }\n dirtyCollection(node);\n for (const key in node.tags) {\n dirtyTag(node.tags[key], null);\n }\n for (const key in node.children) {\n deleteNode(node.children[key]);\n }\n}\n\n// src/lruMemoize.ts\nfunction createSingletonCache(equals) {\n let entry;\n return {\n get(key) {\n if (entry && equals(entry.key, key)) {\n return entry.value;\n }\n return NOT_FOUND;\n },\n put(key, value) {\n entry = { key, value };\n },\n getEntries() {\n return entry ? [entry] : [];\n },\n clear() {\n entry = void 0;\n }\n };\n}\nfunction createLruCache(maxSize, equals) {\n let entries = [];\n function get(key) {\n const cacheIndex = entries.findIndex((entry) => equals(key, entry.key));\n if (cacheIndex > -1) {\n const entry = entries[cacheIndex];\n if (cacheIndex > 0) {\n entries.splice(cacheIndex, 1);\n entries.unshift(entry);\n }\n return entry.value;\n }\n return NOT_FOUND;\n }\n function put(key, value) {\n if (get(key) === NOT_FOUND) {\n entries.unshift({ key, value });\n if (entries.length > maxSize) {\n entries.pop();\n }\n }\n }\n function getEntries() {\n return entries;\n }\n function clear() {\n entries = [];\n }\n return { get, put, getEntries, clear };\n}\nvar referenceEqualityCheck = (a, b) => a === b;\nfunction createCacheKeyComparator(equalityCheck) {\n return function areArgumentsShallowlyEqual(prev, next) {\n if (prev === null || next === null || prev.length !== next.length) {\n return false;\n }\n const { length } = prev;\n for (let i = 0; i < length; i++) {\n if (!equalityCheck(prev[i], next[i])) {\n return false;\n }\n }\n return true;\n };\n}\nfunction lruMemoize(func, equalityCheckOrOptions) {\n const providedOptions = typeof equalityCheckOrOptions === \"object\" ? equalityCheckOrOptions : { equalityCheck: equalityCheckOrOptions };\n const {\n equalityCheck = referenceEqualityCheck,\n maxSize = 1,\n resultEqualityCheck\n } = providedOptions;\n const comparator = createCacheKeyComparator(equalityCheck);\n let resultsCount = 0;\n const cache = maxSize <= 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator);\n function memoized() {\n let value = cache.get(arguments);\n if (value === NOT_FOUND) {\n value = func.apply(null, arguments);\n resultsCount++;\n if (resultEqualityCheck) {\n const entries = cache.getEntries();\n const matchingEntry = entries.find(\n (entry) => resultEqualityCheck(entry.value, value)\n );\n if (matchingEntry) {\n value = matchingEntry.value;\n resultsCount !== 0 && resultsCount--;\n }\n }\n cache.put(arguments, value);\n }\n return value;\n }\n memoized.clearCache = () => {\n cache.clear();\n memoized.resetResultsCount();\n };\n memoized.resultsCount = () => resultsCount;\n memoized.resetResultsCount = () => {\n resultsCount = 0;\n };\n return memoized;\n}\n\n// src/autotrackMemoize/autotrackMemoize.ts\nfunction autotrackMemoize(func) {\n const node = createNode(\n []\n );\n let lastArgs = null;\n const shallowEqual = createCacheKeyComparator(referenceEqualityCheck);\n const cache = createCache(() => {\n const res = func.apply(null, node.proxy);\n return res;\n });\n function memoized() {\n if (!shallowEqual(lastArgs, arguments)) {\n updateNode(node, arguments);\n lastArgs = arguments;\n }\n return cache.value;\n }\n memoized.clearCache = () => {\n return cache.clear();\n };\n return memoized;\n}\n\n// src/weakMapMemoize.ts\nvar StrongRef = class {\n constructor(value) {\n this.value = value;\n }\n deref() {\n return this.value;\n }\n};\nvar Ref = typeof WeakRef !== \"undefined\" ? WeakRef : StrongRef;\nvar UNTERMINATED = 0;\nvar TERMINATED = 1;\nfunction createCacheNode() {\n return {\n s: UNTERMINATED,\n v: void 0,\n o: null,\n p: null\n };\n}\nfunction weakMapMemoize(func, options = {}) {\n let fnNode = createCacheNode();\n const { resultEqualityCheck } = options;\n let lastResult;\n let resultsCount = 0;\n function memoized() {\n let cacheNode = fnNode;\n const { length } = arguments;\n for (let i = 0, l = length; i < l; i++) {\n const arg = arguments[i];\n if (typeof arg === \"function\" || typeof arg === \"object\" && arg !== null) {\n let objectCache = cacheNode.o;\n if (objectCache === null) {\n cacheNode.o = objectCache = /* @__PURE__ */ new WeakMap();\n }\n const objectNode = objectCache.get(arg);\n if (objectNode === void 0) {\n cacheNode = createCacheNode();\n objectCache.set(arg, cacheNode);\n } else {\n cacheNode = objectNode;\n }\n } else {\n let primitiveCache = cacheNode.p;\n if (primitiveCache === null) {\n cacheNode.p = primitiveCache = /* @__PURE__ */ new Map();\n }\n const primitiveNode = primitiveCache.get(arg);\n if (primitiveNode === void 0) {\n cacheNode = createCacheNode();\n primitiveCache.set(arg, cacheNode);\n } else {\n cacheNode = primitiveNode;\n }\n }\n }\n const terminatedNode = cacheNode;\n let result;\n if (cacheNode.s === TERMINATED) {\n result = cacheNode.v;\n } else {\n result = func.apply(null, arguments);\n resultsCount++;\n if (resultEqualityCheck) {\n const lastResultValue = lastResult?.deref?.() ?? lastResult;\n if (lastResultValue != null && resultEqualityCheck(lastResultValue, result)) {\n result = lastResultValue;\n resultsCount !== 0 && resultsCount--;\n }\n const needsWeakRef = typeof result === \"object\" && result !== null || typeof result === \"function\";\n lastResult = needsWeakRef ? new Ref(result) : result;\n }\n }\n terminatedNode.s = TERMINATED;\n terminatedNode.v = result;\n return result;\n }\n memoized.clearCache = () => {\n fnNode = createCacheNode();\n memoized.resetResultsCount();\n };\n memoized.resultsCount = () => resultsCount;\n memoized.resetResultsCount = () => {\n resultsCount = 0;\n };\n return memoized;\n}\n\n// src/createSelectorCreator.ts\nfunction createSelectorCreator(memoizeOrOptions, ...memoizeOptionsFromArgs) {\n const createSelectorCreatorOptions = typeof memoizeOrOptions === \"function\" ? {\n memoize: memoizeOrOptions,\n memoizeOptions: memoizeOptionsFromArgs\n } : memoizeOrOptions;\n const createSelector2 = (...createSelectorArgs) => {\n let recomputations = 0;\n let dependencyRecomputations = 0;\n let lastResult;\n let directlyPassedOptions = {};\n let resultFunc = createSelectorArgs.pop();\n if (typeof resultFunc === \"object\") {\n directlyPassedOptions = resultFunc;\n resultFunc = createSelectorArgs.pop();\n }\n assertIsFunction(\n resultFunc,\n `createSelector expects an output function after the inputs, but received: [${typeof resultFunc}]`\n );\n const combinedOptions = {\n ...createSelectorCreatorOptions,\n ...directlyPassedOptions\n };\n const {\n memoize,\n memoizeOptions = [],\n argsMemoize = weakMapMemoize,\n argsMemoizeOptions = [],\n devModeChecks = {}\n } = combinedOptions;\n const finalMemoizeOptions = ensureIsArray(memoizeOptions);\n const finalArgsMemoizeOptions = ensureIsArray(argsMemoizeOptions);\n const dependencies = getDependencies(createSelectorArgs);\n const memoizedResultFunc = memoize(function recomputationWrapper() {\n recomputations++;\n return resultFunc.apply(\n null,\n arguments\n );\n }, ...finalMemoizeOptions);\n let firstRun = true;\n const selector = argsMemoize(function dependenciesChecker() {\n dependencyRecomputations++;\n const inputSelectorResults = collectInputSelectorResults(\n dependencies,\n arguments\n );\n lastResult = memoizedResultFunc.apply(null, inputSelectorResults);\n if (process.env.NODE_ENV !== \"production\") {\n const { identityFunctionCheck, inputStabilityCheck } = getDevModeChecksExecutionInfo(firstRun, devModeChecks);\n if (identityFunctionCheck.shouldRun) {\n identityFunctionCheck.run(\n resultFunc,\n inputSelectorResults,\n lastResult\n );\n }\n if (inputStabilityCheck.shouldRun) {\n const inputSelectorResultsCopy = collectInputSelectorResults(\n dependencies,\n arguments\n );\n inputStabilityCheck.run(\n { inputSelectorResults, inputSelectorResultsCopy },\n { memoize, memoizeOptions: finalMemoizeOptions },\n arguments\n );\n }\n if (firstRun)\n firstRun = false;\n }\n return lastResult;\n }, ...finalArgsMemoizeOptions);\n return Object.assign(selector, {\n resultFunc,\n memoizedResultFunc,\n dependencies,\n dependencyRecomputations: () => dependencyRecomputations,\n resetDependencyRecomputations: () => {\n dependencyRecomputations = 0;\n },\n lastResult: () => lastResult,\n recomputations: () => recomputations,\n resetRecomputations: () => {\n recomputations = 0;\n },\n memoize,\n argsMemoize\n });\n };\n Object.assign(createSelector2, {\n withTypes: () => createSelector2\n });\n return createSelector2;\n}\nvar createSelector = /* @__PURE__ */ createSelectorCreator(weakMapMemoize);\n\n// src/createStructuredSelector.ts\nvar createStructuredSelector = Object.assign(\n (inputSelectorsObject, selectorCreator = createSelector) => {\n assertIsObject(\n inputSelectorsObject,\n `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof inputSelectorsObject}`\n );\n const inputSelectorKeys = Object.keys(inputSelectorsObject);\n const dependencies = inputSelectorKeys.map(\n (key) => inputSelectorsObject[key]\n );\n const structuredSelector = selectorCreator(\n dependencies,\n (...inputSelectorResults) => {\n return inputSelectorResults.reduce((composition, value, index) => {\n composition[inputSelectorKeys[index]] = value;\n return composition;\n }, {});\n }\n );\n return structuredSelector;\n },\n { withTypes: () => createStructuredSelector }\n);\nexport {\n createSelector,\n createSelectorCreator,\n createStructuredSelector,\n lruMemoize,\n referenceEqualityCheck,\n setGlobalDevModeChecks,\n autotrackMemoize as unstable_autotrackMemoize,\n weakMapMemoize\n};\n//# sourceMappingURL=reselect.mjs.map","import _formatErrorMessage from \"../formatErrorMessage.js\";\nimport { lruMemoize, createSelectorCreator } from 'reselect';\n\n/* eslint-disable no-underscore-dangle */ // __cacheKey__\n\nconst reselectCreateSelector = createSelectorCreator({\n memoize: lruMemoize,\n memoizeOptions: {\n maxSize: 1,\n equalityCheck: Object.is\n }\n});\n/**\n * Creates a selector function that can be used to derive values from the store's state.\n * The selector can take up to three additional arguments that can be used in the selector logic.\n * This function accepts up to six functions and combines them into a single selector function.\n * The last parameter is the combiner function that combines the results of the previous selectors.\n *\n * @example\n * const selector = createSelector(\n * (state) => state.disabled\n * );\n *\n * @example\n * const selector = createSelector(\n * (state) => state.disabled,\n * (state) => state.open,\n * (disabled, open) => ({ disabled, open })\n * );\n *\n */\n/* eslint-disable id-denylist */\nexport const createSelector = (a, b, c, d, e, f, ...other) => {\n if (other.length > 0) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Unsupported number of selectors' : _formatErrorMessage(1));\n }\n let selector;\n if (a && b && c && d && e && f) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n const ve = e(state, a1, a2, a3);\n return f(va, vb, vc, vd, ve, a1, a2, a3);\n };\n } else if (a && b && c && d && e) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n return e(va, vb, vc, vd, a1, a2, a3);\n };\n } else if (a && b && c && d) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n return d(va, vb, vc, a1, a2, a3);\n };\n } else if (a && b && c) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n return c(va, vb, a1, a2, a3);\n };\n } else if (a && b) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n return b(va, a1, a2, a3);\n };\n } else if (a) {\n selector = a;\n } else {\n throw new Error('Missing arguments');\n }\n return selector;\n};\n/* eslint-enable id-denylist */\n\nexport const createSelectorMemoized = (...selectors) => {\n const cache = new WeakMap();\n let nextCacheId = 1;\n const combiner = selectors[selectors.length - 1];\n const nSelectors = selectors.length - 1 || 1;\n // (s1, s2, ..., sN, a1, a2, a3) => { ... }\n const argsLength = combiner.length - nSelectors;\n if (argsLength > 3) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Unsupported number of arguments' : _formatErrorMessage(2));\n }\n const selector = (state, a1, a2, a3) => {\n let cacheKey = state.__cacheKey__;\n if (!cacheKey) {\n cacheKey = {\n id: nextCacheId\n };\n state.__cacheKey__ = cacheKey;\n nextCacheId += 1;\n }\n let fn = cache.get(cacheKey);\n if (!fn) {\n let reselectArgs = selectors;\n const selectorArgs = [undefined, undefined, undefined];\n switch (argsLength) {\n case 0:\n break;\n case 1:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], combiner];\n break;\n }\n case 2:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], () => selectorArgs[1], combiner];\n break;\n }\n case 3:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], () => selectorArgs[1], () => selectorArgs[2], combiner];\n break;\n }\n default:\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Unsupported number of arguments' : _formatErrorMessage(2));\n }\n fn = reselectCreateSelector(...reselectArgs);\n fn.selectorArgs = selectorArgs;\n cache.set(cacheKey, fn);\n }\n fn.selectorArgs[0] = a1;\n fn.selectorArgs[1] = a2;\n fn.selectorArgs[2] = a3;\n\n // prettier-ignore\n switch (argsLength) {\n case 0:\n return fn(state);\n case 1:\n return fn(state, a1);\n case 2:\n return fn(state, a1, a2);\n case 3:\n return fn(state, a1, a2, a3);\n default:\n throw new Error('unreachable');\n }\n };\n return selector;\n};","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","// We need to import the shim because React 17 does not support the `useSyncExternalStore` API.\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';\n/**\n * Returns a value from the store. The value is derived from the store's state using the provided selector function.\n * Updates to the store's other properties will not cause re-renders.\n *\n * @param store The Store instance to read from.\n * @param selector A function that selects a value from the store's state.\n * @param a1 Optional first argument for the selector function.\n * @param a2 Optional second argument for the selector function.\n * @param a3 Optional third argument for the selector function.\n */\nexport function useStore(store, selector, a1, a2, a3) {\n const selectorWithArgs = state => selector(state, a1, a2, a3);\n return useSyncExternalStoreWithSelector(store.subscribe, store.getSnapshot, store.getSnapshot, selectorWithArgs);\n}","/**\n * A data store implementation that allows subscribing to state changes and updating the state.\n * It uses an observer pattern to notify subscribers when the state changes.\n */\nexport class Store {\n /**\n * The current state of the store.\n * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.\n * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).\n * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.\n *\n * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.\n */\n\n // Internal state to handle recursive `setState()` calls\n\n constructor(state) {\n this.state = state;\n this.listeners = new Set();\n this.updateTick = 0;\n }\n\n /**\n * Registers a listener that will be called whenever the store's state changes.\n *\n * @param fn The listener function to be called on state changes.\n * @returns A function to unsubscribe the listener.\n */\n subscribe = fn => {\n this.listeners.add(fn);\n return () => {\n this.listeners.delete(fn);\n };\n };\n\n /**\n * Returns the current state of the store.\n */\n getSnapshot = () => {\n return this.state;\n };\n\n /**\n * Updates the entire store's state and notifies all registered listeners.\n *\n * @param newState The new state to set for the store.\n */\n setState(newState) {\n if (this.state === newState) {\n return;\n }\n this.state = newState;\n this.updateTick += 1;\n const currentTick = this.updateTick;\n for (const listener of this.listeners) {\n if (currentTick !== this.updateTick) {\n // If the tick has changed, a recursive `setState` call has been made,\n // and it has already notified all listeners.\n return;\n }\n listener(newState);\n }\n }\n\n /**\n * Merges the provided changes into the current state and notifies listeners if there are changes.\n *\n * @param changes An object containing the changes to apply to the current state.\n */\n update(changes) {\n for (const key in changes) {\n if (!Object.is(this.state[key], changes[key])) {\n Store.prototype.setState.call(this, {\n ...this.state,\n ...changes\n });\n return;\n }\n }\n }\n\n /**\n * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.\n *\n * @param key The key in the store's state to update.\n * @param value The new value to set for the specified key.\n */\n set(key, value) {\n if (!Object.is(this.state[key], value)) {\n Store.prototype.setState.call(this, {\n ...this.state,\n [key]: value\n });\n }\n }\n\n /**\n * Gives the state a new reference and updates all registered listeners.\n */\n notifyAll() {\n const newState = {\n ...this.state\n };\n Store.prototype.setState.call(this, newState);\n }\n}","/* False positives - ESLint thinks we're calling a hook from a class component. */\n/* eslint-disable react-hooks/rules-of-hooks */\nimport * as React from 'react';\nimport { Store } from \"./Store.js\";\nimport { useStore } from \"./useStore.js\";\nimport { useStableCallback } from \"../useStableCallback.js\";\nimport { useIsoLayoutEffect } from \"../useIsoLayoutEffect.js\";\nimport { NOOP } from \"../empty.js\";\n\n/**\n * A Store that supports controlled state keys, non-reactive values and provides utility methods for React.\n */\nexport class ReactStore extends Store {\n /**\n * Creates a new ReactStore instance.\n *\n * @param state Initial state of the store.\n * @param context Non-reactive context values.\n * @param selectors Optional selectors for use with `useState`.\n */\n constructor(state, context = {}, selectors) {\n super(state);\n this.context = context;\n this.selectors = selectors;\n }\n\n /**\n * Non-reactive values such as refs, callbacks, etc.\n */\n\n /**\n * Keeps track of which properties are controlled.\n */\n controlledValues = new Map();\n /**\n * Synchronizes a single external value into the store.\n *\n * Note that the while the value in `state` is updated immediately, the value returned\n * by `useState` is updated before the next render (similarly to React's `useState`).\n */\n useSyncedValue(key, value) {\n React.useDebugValue(key);\n useIsoLayoutEffect(() => {\n if (this.state[key] !== value) {\n this.set(key, value);\n }\n }, [key, value]);\n }\n\n /**\n * Synchronizes a single external value into the store and\n * cleans it up (sets to `undefined`) on unmount.\n *\n * Note that the while the value in `state` is updated immediately, the value returned\n * by `useState` is updated before the next render (similarly to React's `useState`).\n */\n useSyncedValueWithCleanup(key, value) {\n useIsoLayoutEffect(() => {\n if (this.state[key] !== value) {\n this.set(key, value);\n }\n return () => {\n this.set(key, undefined);\n };\n }, [key, value]);\n }\n\n /**\n * Synchronizes multiple external values into the store.\n *\n * Note that the while the values in `state` are updated immediately, the values returned\n * by `useState` are updated before the next render (similarly to React's `useState`).\n */\n useSyncedValues(statePart) {\n if (process.env.NODE_ENV !== 'production') {\n // Check that an object with the same shape is passed on every render\n React.useDebugValue(statePart, p => Object.keys(p));\n const keys = React.useRef(Object.keys(statePart)).current;\n const nextKeys = Object.keys(statePart);\n if (keys.length !== nextKeys.length || keys.some((key, index) => key !== nextKeys[index])) {\n console.error('ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.');\n }\n }\n const dependencies = Object.values(statePart);\n useIsoLayoutEffect(() => {\n this.update(statePart);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencies);\n }\n\n /**\n * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key.\n * - If `controlled` is non-undefined, the key is marked as controlled and the store's\n * state at `key` is updated to match `controlled`. Local writes to that key are ignored.\n * - If `controlled` is undefined, the key is marked as uncontrolled. The store's state\n * is initialized to `defaultValue` on first render and can be updated with local writes.\n */\n useControlledProp(key, controlled, defaultValue) {\n React.useDebugValue(key);\n const isControlled = controlled !== undefined;\n if (process.env.NODE_ENV !== 'production') {\n const previouslyControlled = this.controlledValues.get(key);\n if (previouslyControlled !== undefined && previouslyControlled !== isControlled) {\n console.error(`A component is changing the ${isControlled ? '' : 'un'}controlled state of ${key.toString()} to be ${isControlled ? 'un' : ''}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);\n }\n }\n if (!this.controlledValues.has(key)) {\n // First time initialization\n this.controlledValues.set(key, isControlled);\n if (!isControlled && !Object.is(this.state[key], defaultValue)) {\n super.setState({\n ...this.state,\n [key]: defaultValue\n });\n }\n }\n useIsoLayoutEffect(() => {\n if (isControlled && !Object.is(this.state[key], controlled)) {\n // Set the internal state to match the controlled value.\n super.setState({\n ...this.state,\n [key]: controlled\n });\n }\n }, [key, controlled, defaultValue, isControlled]);\n }\n\n /**\n * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.\n * If the key is controlled (registered via {@link useControlledProp} with a non-undefined value),\n * the update is ignored and no listeners are notified.\n *\n * @param key The state key to update.\n * @param value The new value to set for the specified key.\n */\n set(key, value) {\n if (this.controlledValues.get(key) === true) {\n // Ignore updates to controlled values\n return;\n }\n super.set(key, value);\n }\n\n /**\n * Merges the provided changes into the current state and notifies listeners if there are changes.\n * Controlled keys are filtered out and not updated.\n *\n * @param values An object containing the changes to apply to the current state.\n */\n update(values) {\n const newValues = {\n ...values\n };\n for (const key in newValues) {\n if (!Object.hasOwn(newValues, key)) {\n continue;\n }\n if (this.controlledValues.get(key) === true) {\n // Ignore updates to controlled values\n delete newValues[key];\n continue;\n }\n }\n super.update(newValues);\n }\n\n /**\n * Updates the entire store's state and notifies all registered listeners.\n * Controlled keys are left unchanged; only uncontrolled keys from `newState` are applied.\n *\n * @param newState The new state to set for the store.\n */\n setState(newState) {\n const newValues = {\n ...newState\n };\n for (const key in newValues) {\n if (!Object.hasOwn(newValues, key)) {\n continue;\n }\n if (this.controlledValues.get(key) === true) {\n // Ignore updates to controlled values\n delete newValues[key];\n continue;\n }\n }\n super.setState({\n ...this.state,\n ...newValues\n });\n }\n\n /** Gets the current value from the store using a selector with the provided key.\n *\n * @param key Key of the selector to use.\n */\n select = (key, a1, a2, a3) => {\n const selector = this.selectors[key];\n return selector(this.state, a1, a2, a3);\n };\n\n /**\n * Returns a value from the store's state using a selector function.\n * Used to subscribe to specific parts of the state.\n * This methods causes a rerender whenever the selected state changes.\n *\n * @param key Key of the selector to use.\n */\n useState = (key, a1, a2, a3) => {\n React.useDebugValue(key);\n const selector = this.selectors[key];\n const value = useStore(this, selector, a1, a2, a3);\n return value;\n };\n\n /**\n * Wraps a function with `useStableCallback` to ensure it has a stable reference\n * and assigns it to the context.\n *\n * @param key Key of the event callback. Must be a function in the context.\n * @param fn Function to assign.\n */\n useContextCallback(key, fn) {\n React.useDebugValue(key);\n const stableFunction = useStableCallback(fn ?? NOOP);\n this.context[key] = stableFunction;\n }\n\n /**\n * Returns a stable setter function for a specific key in the store's state.\n * It's commonly used to pass as a ref callback to React elements.\n *\n * @param key Key of the state to set.\n */\n useStateSetter(key) {\n const ref = React.useRef(undefined);\n if (ref.current === undefined) {\n ref.current = value => {\n this.set(key, value);\n };\n }\n return ref.current;\n }\n\n /**\n * Observes changes derived from the store's selectors and calls the listener when the selected value changes.\n *\n * @param key Key of the selector to observe.\n * @param listener Listener function called when the selector result changes.\n */\n\n observe(selector, listener) {\n let selectFn;\n if (typeof selector === 'function') {\n selectFn = selector;\n } else {\n selectFn = this.selectors[selector];\n }\n let prevValue = selectFn(this.state);\n listener(prevValue, prevValue, this);\n return this.subscribe(nextState => {\n const nextValue = selectFn(nextState);\n if (!Object.is(prevValue, nextValue)) {\n const oldValue = prevValue;\n prevValue = nextValue;\n listener(nextValue, oldValue, this);\n }\n });\n }\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * Returns a function that forces a rerender.\n */\nexport function useForcedRerendering() {\n const [, setState] = React.useState({});\n return React.useCallback(() => {\n setState({});\n }, []);\n}","import { createSelector, ReactStore } from '@base-ui-components/utils/store';\nimport { createEventEmitter } from \"../utils/createEventEmitter.js\";\nconst selectors = {\n open: createSelector(state => state.open),\n domReferenceElement: createSelector(state => state.domReferenceElement),\n referenceElement: createSelector(state => state.positionReference ?? state.referenceElement),\n floatingElement: createSelector(state => state.floatingElement),\n floatingId: createSelector(state => state.floatingId)\n};\nexport class FloatingRootStore extends ReactStore {\n constructor(options) {\n const {\n nested,\n noEmit,\n onOpenChange,\n triggerElements,\n ...initialState\n } = options;\n super({\n ...initialState,\n positionReference: initialState.referenceElement,\n domReferenceElement: initialState.referenceElement\n }, {\n onOpenChange,\n dataRef: {\n current: {}\n },\n events: createEventEmitter(),\n nested,\n noEmit,\n triggerElements\n }, selectors);\n }\n\n /**\n * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.\n *\n * @param newOpen The new open state.\n * @param eventDetails Details about the event that triggered the open state change.\n */\n setOpen = (newOpen, eventDetails) => {\n this.context.dataRef.current.openEvent = newOpen ? eventDetails.event : undefined;\n if (!this.context.noEmit) {\n const details = {\n open: newOpen,\n reason: eventDetails.reason,\n nativeEvent: eventDetails.event,\n nested: this.context.nested,\n triggerElement: eventDetails.trigger\n };\n this.context.events.emit('openchange', details);\n }\n this.context.onOpenChange?.(newOpen, eventDetails);\n };\n}","import * as React from 'react';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useTransitionStatus } from \"../useTransitionStatus.js\";\nimport { useOpenChangeComplete } from \"../useOpenChangeComplete.js\";\n/**\n * Returns a callback ref that registers/unregisters the trigger element in the store.\n *\n * @param store The Store instance where the trigger should be registered.\n */\nexport function useTriggerRegistration(id, store) {\n // Keep track of the currently registered element to unregister it on unmount or id change.\n const registeredElementId = React.useRef(null);\n return React.useCallback(element => {\n if (id === undefined) {\n return undefined;\n }\n if (registeredElementId.current !== null) {\n store.context.triggerElements.delete(registeredElementId.current);\n registeredElementId.current = null;\n }\n if (element !== null) {\n registeredElementId.current = id;\n store.context.triggerElements.add(id, element);\n return () => {\n if (registeredElementId.current !== null) {\n store.context.triggerElements.delete(registeredElementId.current);\n registeredElementId.current = null;\n }\n };\n }\n return undefined;\n }, [store, id]);\n}\n\n/**\n * Sets up trigger data forwarding to the store.\n *\n * @param triggerId Id of the trigger.\n * @param triggerElement The trigger DOM element.\n * @param store The Store instance managing the popup state.\n * @param stateUpdates An object with state updates to apply when the trigger is active.\n */\nexport function useTriggerDataForwarding(triggerId, triggerElement, store, stateUpdates) {\n const isMountedByThisTrigger = store.useState('isMountedByTrigger', triggerId);\n const baseRegisterTrigger = useTriggerRegistration(triggerId, store);\n const registerTrigger = useStableCallback(element => {\n const cleanup = baseRegisterTrigger(element);\n if (element !== null && store.select('open') && store.select('activeTriggerId') == null) {\n // This runs when popup is open, but no active trigger is set.\n // It can happen when using controlled mode and the trigger is mounted after opening or if `triggerId` prop is not set explicitly.\n // In such cases the first trigger to run this code becomes the active trigger (store.select('activeTriggerId') should not return null after that).\n // This is mostly for compatibility with contained triggers where no explicit `triggerId` was required in controlled mode.\n store.update({\n activeTriggerId: triggerId,\n activeTriggerElement: element,\n ...stateUpdates\n });\n }\n return cleanup;\n });\n useIsoLayoutEffect(() => {\n if (isMountedByThisTrigger) {\n store.update({\n activeTriggerElement: triggerElement,\n ...stateUpdates\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMountedByThisTrigger, store, triggerElement, ...Object.values(stateUpdates)]);\n return {\n registerTrigger,\n isMountedByThisTrigger\n };\n}\n/**\n * Ensures that when there's only one trigger element registered, it is set as the active trigger.\n * This allows controlled popups to work correctly without an explicit triggerId, maintaining compatibility\n * with the contained triggers.\n *\n * This should be called on the Root part.\n *\n * @param open Whether the popup is open.\n * @param store The Store instance managing the popup state.\n */\nexport function useImplicitActiveTrigger(store) {\n const open = store.useState('open');\n useIsoLayoutEffect(() => {\n if (open && !store.select('activeTriggerId') && store.context.triggerElements.size === 1) {\n const iteratorResult = store.context.triggerElements.entries().next();\n if (!iteratorResult.done) {\n const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;\n store.update({\n activeTriggerId: implicitTriggerId,\n activeTriggerElement: implicitTriggerElement\n });\n }\n }\n }, [open, store]);\n}\n\n/**\n * Mangages the mounted state of the popup.\n * Sets up the transition status listeners and handles unmounting when needed.\n * Updates the `mounted` and `transitionStatus` states in the store.\n *\n * @param open Whether the popup is open.\n * @param store The Store instance managing the popup state.\n * @param onUnmount Optional callback to be called when the popup is unmounted.\n *\n * @returns A function to forcibly unmount the popup.\n */\nexport function useOpenStateTransitions(open, store, onUnmount) {\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open);\n store.useSyncedValues({\n mounted,\n transitionStatus\n });\n const forceUnmount = useStableCallback(() => {\n setMounted(false);\n store.update({\n activeTriggerId: null,\n activeTriggerElement: null,\n mounted: false\n });\n onUnmount?.();\n store.context.onOpenChangeComplete?.(false);\n });\n const preventUnmountingOnClose = store.useState('preventUnmountingOnClose');\n useOpenChangeComplete({\n enabled: !preventUnmountingOnClose,\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (!open) {\n forceUnmount();\n }\n }\n });\n return {\n forceUnmount,\n transitionStatus\n };\n}","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\n/**\n * Data structure to keep track of popup trigger elements by their IDs.\n * Uses both a set of Elements and a map of IDs to Elements for efficient lookups.\n */\nexport class PopupTriggerMap {\n constructor() {\n this.elements = new Set();\n this.idMap = new Map();\n }\n\n /**\n * Adds a trigger element with the given ID.\n *\n * Note: The provided element is assumed to not be registered under multiple IDs.\n */\n add(id, element) {\n const existingElement = this.idMap.get(id);\n if (existingElement === element) {\n return;\n }\n if (existingElement !== undefined) {\n // We assume that the same element won't be registered under multiple ids.\n // This is safe considering how useTriggerRegistration is implemented.\n this.elements.delete(existingElement);\n }\n this.elements.add(element);\n this.idMap.set(id, element);\n if (process.env.NODE_ENV !== 'production') {\n if (this.elements.size !== this.idMap.size) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.' : _formatErrorMessage(87));\n }\n }\n }\n\n /**\n * Removes the trigger element with the given ID.\n */\n delete(id) {\n const element = this.idMap.get(id);\n if (element) {\n this.elements.delete(element);\n this.idMap.delete(id);\n }\n }\n\n /**\n * Whether the given element is registered as a trigger.\n */\n hasElement(element) {\n return this.elements.has(element);\n }\n\n /**\n * Whether there is a registered trigger element matching the given predicate.\n */\n hasMatchingElement(predicate) {\n for (const element of this.elements) {\n if (predicate(element)) {\n return true;\n }\n }\n return false;\n }\n getById(id) {\n return this.idMap.get(id);\n }\n entries() {\n return this.idMap.entries();\n }\n get size() {\n return this.idMap.size;\n }\n}","import { PopupTriggerMap } from \"../../utils/popups/index.js\";\nimport { FloatingRootStore } from \"../components/FloatingRootStore.js\";\nexport function getEmptyRootContext() {\n return new FloatingRootStore({\n open: false,\n floatingElement: null,\n referenceElement: null,\n triggerElements: new PopupTriggerMap(),\n floatingId: '',\n nested: false,\n noEmit: false,\n onOpenChange: undefined\n });\n}","import { createSelector } from '@base-ui-components/utils/store';\nimport { getEmptyRootContext } from \"../../floating-ui-react/utils/getEmptyRootContext.js\";\nimport { EMPTY_OBJECT } from \"../constants.js\";\n\n/**\n * State common to all popup stores.\n */\n\nexport function createInitialPopupStoreState() {\n return {\n open: false,\n mounted: false,\n transitionStatus: 'idle',\n floatingRootContext: getEmptyRootContext(),\n preventUnmountingOnClose: false,\n payload: undefined,\n activeTriggerId: null,\n activeTriggerElement: null,\n popupElement: null,\n positionerElement: null,\n activeTriggerProps: EMPTY_OBJECT,\n inactiveTriggerProps: EMPTY_OBJECT,\n popupProps: EMPTY_OBJECT\n };\n}\nexport const popupStoreSelectors = {\n open: createSelector(state => state.open),\n mounted: createSelector(state => state.mounted),\n transitionStatus: createSelector(state => state.transitionStatus),\n floatingRootContext: createSelector(state => state.floatingRootContext),\n preventUnmountingOnClose: createSelector(state => state.preventUnmountingOnClose),\n payload: createSelector(state => state.payload),\n activeTriggerId: createSelector(state => state.activeTriggerId),\n activeTriggerElement: createSelector(state => state.mounted ? state.activeTriggerElement : null),\n /**\n * Whether the trigger with the given ID was used to open the popup.\n */\n isTriggerActive: createSelector((state, triggerId) => triggerId !== undefined && state.activeTriggerId === triggerId),\n /**\n * Whether the popup is open and was activated by a trigger with the given ID.\n */\n isOpenedByTrigger: createSelector((state, triggerId) => triggerId !== undefined && state.activeTriggerId === triggerId && state.open),\n /**\n * Whether the popup is mounted and was activated by a trigger with the given ID.\n */\n isMountedByTrigger: createSelector((state, triggerId) => triggerId !== undefined && state.activeTriggerId === triggerId && state.mounted),\n triggerProps: createSelector((state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps),\n popupProps: createSelector(state => state.popupProps),\n popupElement: createSelector(state => state.popupElement),\n positionerElement: createSelector(state => state.positionerElement)\n};","import { isElement } from '@floating-ui/utils/dom';\nimport { useId } from '@base-ui-components/utils/useId';\nimport { useRefWithInit } from '@base-ui-components/utils/useRefWithInit';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useFloatingParentNodeId } from \"../components/FloatingTree.js\";\nimport { FloatingRootStore } from \"../components/FloatingRootStore.js\";\nimport { PopupTriggerMap } from \"../../utils/popups/index.js\";\nexport function useFloatingRootContext(options) {\n const {\n open = false,\n onOpenChange,\n elements = {}\n } = options;\n const floatingId = useId();\n const nested = useFloatingParentNodeId() != null;\n if (process.env.NODE_ENV !== 'production') {\n const optionDomReference = elements.reference;\n if (optionDomReference && !isElement(optionDomReference)) {\n console.error('Cannot pass a virtual element to the `elements.reference` option,', 'as it must be a real DOM element. Use `context.setPositionReference()`', 'instead.');\n }\n }\n const store = useRefWithInit(() => new FloatingRootStore({\n open,\n onOpenChange,\n referenceElement: elements.reference ?? null,\n floatingElement: elements.floating ?? null,\n triggerElements: elements.triggers ?? new PopupTriggerMap(),\n floatingId,\n nested,\n noEmit: options.noEmit || false\n })).current;\n useIsoLayoutEffect(() => {\n const valuesToSync = {\n open,\n floatingId\n };\n\n // Only sync elements that are defined to avoid overwriting existing ones\n if (elements.reference !== undefined) {\n valuesToSync.referenceElement = elements.reference;\n valuesToSync.domReferenceElement = isElement(elements.reference) ? elements.reference : null;\n }\n if (elements.floating !== undefined) {\n valuesToSync.floatingElement = elements.floating;\n }\n store.update(valuesToSync);\n }, [open, floatingId, elements.reference, elements.floating, store]);\n store.context.onOpenChange = onOpenChange;\n store.context.nested = nested;\n store.context.noEmit = options.noEmit || false;\n return store;\n}","import * as React from 'react';\nimport { useFloating as usePosition } from '@floating-ui/react-dom';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useFloatingTree } from \"../components/FloatingTree.js\";\nimport { useFloatingRootContext } from \"./useFloatingRootContext.js\";\n/**\n * Provides data to position a floating element and context to add interactions.\n * @see https://floating-ui.com/docs/useFloating\n */\nexport function useFloating(options = {}) {\n const {\n nodeId,\n externalTree\n } = options;\n const internalRootStore = useFloatingRootContext(options);\n const rootContext = options.rootContext || internalRootStore;\n const rootContextElements = {\n reference: rootContext.useState('referenceElement'),\n floating: rootContext.useState('floatingElement'),\n domReference: rootContext.useState('domReferenceElement')\n };\n const [positionReference, setPositionReferenceRaw] = React.useState(null);\n const domReferenceRef = React.useRef(null);\n const tree = useFloatingTree(externalTree);\n useIsoLayoutEffect(() => {\n if (rootContextElements.domReference) {\n domReferenceRef.current = rootContextElements.domReference;\n }\n }, [rootContextElements.domReference]);\n const position = usePosition({\n ...options,\n elements: {\n ...rootContextElements,\n ...(positionReference && {\n reference: positionReference\n })\n }\n });\n const setPositionReference = React.useCallback(node => {\n const computedPositionReference = isElement(node) ? {\n getBoundingClientRect: () => node.getBoundingClientRect(),\n getClientRects: () => node.getClientRects(),\n contextElement: node\n } : node;\n // Store the positionReference in state if the DOM reference is specified externally via the\n // `elements.reference` option. This ensures that it won't be overridden on future renders.\n setPositionReferenceRaw(computedPositionReference);\n position.refs.setReference(computedPositionReference);\n }, [position.refs]);\n const [localDomReference, setLocalDomReference] = React.useState(null);\n const [localFloatingElement, setLocalFloatingElement] = React.useState(null);\n rootContext.useSyncedValue('referenceElement', localDomReference);\n rootContext.useSyncedValue('domReferenceElement', isElement(localDomReference) ? localDomReference : null);\n rootContext.useSyncedValue('floatingElement', localFloatingElement);\n const setReference = React.useCallback(node => {\n if (isElement(node) || node === null) {\n domReferenceRef.current = node;\n setLocalDomReference(node);\n }\n\n // Backwards-compatibility for passing a virtual element to `reference`\n // after it has set the DOM reference.\n if (isElement(position.refs.reference.current) || position.refs.reference.current === null ||\n // Don't allow setting virtual elements using the old technique back to\n // `null` to support `positionReference` + an unstable `reference`\n // callback ref.\n node !== null && !isElement(node)) {\n position.refs.setReference(node);\n }\n }, [position.refs, setLocalDomReference]);\n const setFloating = React.useCallback(node => {\n setLocalFloatingElement(node);\n position.refs.setFloating(node);\n }, [position.refs]);\n const refs = React.useMemo(() => ({\n ...position.refs,\n setReference,\n setFloating,\n setPositionReference,\n domReference: domReferenceRef\n }), [position.refs, setReference, setFloating, setPositionReference]);\n const elements = React.useMemo(() => ({\n ...position.elements,\n domReference: rootContextElements.domReference\n }), [position.elements, rootContextElements.domReference]);\n const open = rootContext.useState('open');\n const floatingId = rootContext.useState('floatingId');\n const context = React.useMemo(() => ({\n ...position,\n dataRef: rootContext.context.dataRef,\n open,\n onOpenChange: rootContext.setOpen,\n events: rootContext.context.events,\n floatingId,\n refs,\n elements,\n nodeId,\n rootStore: rootContext\n }), [position, refs, elements, nodeId, rootContext, open, floatingId]);\n useIsoLayoutEffect(() => {\n rootContext.context.dataRef.current.floatingContext = context;\n const node = tree?.nodesRef.current.find(n => n.id === nodeId);\n if (node) {\n node.context = context;\n }\n });\n return React.useMemo(() => ({\n ...position,\n context,\n refs,\n elements,\n rootStore: rootContext\n }), [position, refs, elements, context, rootContext]);\n}","import { useId } from '@base-ui-components/utils/useId';\nimport { useRefWithInit } from '@base-ui-components/utils/useRefWithInit';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { useFloatingParentNodeId } from \"../components/FloatingTree.js\";\nimport { FloatingRootStore } from \"../components/FloatingRootStore.js\";\n/**\n * Initializes a FloatingRootStore that is kept in sync with the provided PopupStore.\n * The new instance is created only once and updated on every render.\n */\nexport function useSyncedFloatingRootContext(options) {\n const {\n popupStore,\n noEmit = false,\n treatPopupAsFloatingElement = false,\n onOpenChange\n } = options;\n const floatingId = useId();\n const nested = useFloatingParentNodeId() != null;\n const open = popupStore.useState('open');\n const referenceElement = popupStore.useState('activeTriggerElement');\n const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? 'popupElement' : 'positionerElement');\n const triggerElements = popupStore.context.triggerElements;\n const store = useRefWithInit(() => new FloatingRootStore({\n open,\n referenceElement,\n floatingElement,\n triggerElements,\n onOpenChange,\n floatingId,\n nested,\n noEmit\n })).current;\n useIsoLayoutEffect(() => {\n const valuesToSync = {\n open,\n floatingId,\n referenceElement,\n floatingElement\n };\n if (isElement(referenceElement)) {\n valuesToSync.domReferenceElement = referenceElement;\n }\n store.update(valuesToSync);\n }, [open, floatingId, referenceElement, floatingElement, store]);\n\n // TODO: When `setOpen` is a part of the PopupStore API, we don't need to sync it.\n store.context.onOpenChange = onOpenChange;\n store.context.nested = nested;\n store.context.noEmit = noEmit;\n return store;\n}","import * as React from 'react';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { createAttribute } from \"../utils/createAttribute.js\";\nimport { TYPEABLE_SELECTOR } from \"../utils/constants.js\";\nexport const safePolygonIdentifier = createAttribute('safe-polygon');\nconst interactiveSelector = `button,a,[role=\"button\"],select,[tabindex]:not([tabindex=\"-1\"]),${TYPEABLE_SELECTOR}`;\nexport function isInteractiveElement(element) {\n return element ? Boolean(element.closest(interactiveSelector)) : false;\n}\nexport function useHoverInteractionSharedState(store) {\n const pointerTypeRef = React.useRef(undefined);\n const interactedInsideRef = React.useRef(false);\n const handlerRef = React.useRef(undefined);\n const blockMouseMoveRef = React.useRef(true);\n const performedPointerEventsMutationRef = React.useRef(false);\n const unbindMouseMoveRef = React.useRef(() => {});\n const restTimeoutPendingRef = React.useRef(false);\n const openChangeTimeout = useTimeout();\n const restTimeout = useTimeout();\n const handleCloseOptionsRef = React.useRef(undefined);\n return React.useMemo(() => {\n const data = store.context.dataRef.current;\n if (!data.hoverInteractionState) {\n data.hoverInteractionState = {\n pointerTypeRef,\n interactedInsideRef,\n handlerRef,\n blockMouseMoveRef,\n performedPointerEventsMutationRef,\n unbindMouseMoveRef,\n restTimeoutPendingRef,\n openChangeTimeout,\n restTimeout,\n handleCloseOptionsRef\n };\n }\n return data.hoverInteractionState;\n }, [store, pointerTypeRef, interactedInsideRef, handlerRef, blockMouseMoveRef, performedPointerEventsMutationRef, unbindMouseMoveRef, restTimeoutPendingRef, openChangeTimeout, restTimeout, handleCloseOptionsRef]);\n}","import * as React from 'react';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { getDocument, getTarget, isMouseLikePointerType } from \"../utils.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useFloatingParentNodeId, useFloatingTree } from \"../components/FloatingTree.js\";\nimport { isInteractiveElement, safePolygonIdentifier, useHoverInteractionSharedState } from \"./useHoverInteractionSharedState.js\";\nconst clickLikeEvents = new Set(['click', 'mousedown']);\n\n/**\n * Provides hover interactions that should be attached to the floating element.\n */\nexport function useHoverFloatingInteraction(context, parameters = {}) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const domReferenceElement = store.useState('domReferenceElement');\n const {\n dataRef\n } = store.context;\n const {\n enabled = true,\n closeDelay: closeDelayProp = 0,\n externalTree\n } = parameters;\n const {\n pointerTypeRef,\n interactedInsideRef,\n handlerRef,\n performedPointerEventsMutationRef,\n unbindMouseMoveRef,\n restTimeoutPendingRef,\n openChangeTimeout: openChangeTimeout,\n handleCloseOptionsRef\n } = useHoverInteractionSharedState(store);\n const tree = useFloatingTree(externalTree);\n const parentId = useFloatingParentNodeId();\n const isClickLikeOpenEvent = useStableCallback(() => {\n if (interactedInsideRef.current) {\n return true;\n }\n return dataRef.current.openEvent ? clickLikeEvents.has(dataRef.current.openEvent.type) : false;\n });\n const isHoverOpen = useStableCallback(() => {\n const type = dataRef.current.openEvent?.type;\n return type?.includes('mouse') && type !== 'mousedown';\n });\n const closeWithDelay = React.useCallback((event, runElseBranch = true) => {\n const closeDelay = getDelay(closeDelayProp, pointerTypeRef.current);\n if (closeDelay && !handlerRef.current) {\n openChangeTimeout.start(closeDelay, () => store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event)));\n } else if (runElseBranch) {\n openChangeTimeout.clear();\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event));\n }\n }, [closeDelayProp, handlerRef, store, pointerTypeRef, openChangeTimeout]);\n const cleanupMouseMoveHandler = useStableCallback(() => {\n unbindMouseMoveRef.current();\n handlerRef.current = undefined;\n });\n const clearPointerEvents = useStableCallback(() => {\n if (performedPointerEventsMutationRef.current) {\n const body = getDocument(floatingElement).body;\n body.style.pointerEvents = '';\n body.removeAttribute(safePolygonIdentifier);\n performedPointerEventsMutationRef.current = false;\n }\n });\n const handleInteractInside = useStableCallback(event => {\n const target = getTarget(event);\n if (!isInteractiveElement(target)) {\n interactedInsideRef.current = false;\n return;\n }\n interactedInsideRef.current = true;\n });\n useIsoLayoutEffect(() => {\n if (!open) {\n pointerTypeRef.current = undefined;\n restTimeoutPendingRef.current = false;\n interactedInsideRef.current = false;\n cleanupMouseMoveHandler();\n clearPointerEvents();\n }\n }, [open, pointerTypeRef, restTimeoutPendingRef, interactedInsideRef, cleanupMouseMoveHandler, clearPointerEvents]);\n React.useEffect(() => {\n return () => {\n cleanupMouseMoveHandler();\n };\n }, [cleanupMouseMoveHandler]);\n React.useEffect(() => {\n return clearPointerEvents;\n }, [clearPointerEvents]);\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return undefined;\n }\n if (open && handleCloseOptionsRef.current?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) {\n performedPointerEventsMutationRef.current = true;\n const body = getDocument(floatingElement).body;\n body.setAttribute(safePolygonIdentifier, '');\n const ref = domReferenceElement;\n const floatingEl = floatingElement;\n const parentFloating = tree?.nodesRef.current.find(node => node.id === parentId)?.context?.elements.floating;\n if (parentFloating) {\n parentFloating.style.pointerEvents = '';\n }\n body.style.pointerEvents = 'none';\n ref.style.pointerEvents = 'auto';\n floatingEl.style.pointerEvents = 'auto';\n return () => {\n body.style.pointerEvents = '';\n ref.style.pointerEvents = '';\n floatingEl.style.pointerEvents = '';\n };\n }\n return undefined;\n }, [enabled, open, domReferenceElement, floatingElement, handleCloseOptionsRef, isHoverOpen, tree, parentId, performedPointerEventsMutationRef]);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n\n // Ensure the floating element closes after scrolling even if the pointer\n // did not move.\n // https://github.com/floating-ui/floating-ui/discussions/1692\n function onScrollMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n return;\n }\n if (!dataRef.current.floatingContext) {\n return;\n }\n const triggerElements = store.context.triggerElements;\n if (event.relatedTarget && triggerElements.hasElement(event.relatedTarget)) {\n // If the mouse is leaving the reference element to another trigger, don't explicitly close the popup\n // as it will be moved.\n return;\n }\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event);\n }\n }\n function onFloatingMouseEnter(event) {\n openChangeTimeout.clear();\n clearPointerEvents();\n handlerRef.current?.(event);\n cleanupMouseMoveHandler();\n }\n function onFloatingMouseLeave(event) {\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event, false);\n }\n }\n const floating = floatingElement;\n if (floating) {\n floating.addEventListener('mouseleave', onScrollMouseLeave);\n floating.addEventListener('mouseenter', onFloatingMouseEnter);\n floating.addEventListener('mouseleave', onFloatingMouseLeave);\n floating.addEventListener('pointerdown', handleInteractInside, true);\n }\n return () => {\n if (floating) {\n floating.removeEventListener('mouseleave', onScrollMouseLeave);\n floating.removeEventListener('mouseenter', onFloatingMouseEnter);\n floating.removeEventListener('mouseleave', onFloatingMouseLeave);\n floating.removeEventListener('pointerdown', handleInteractInside, true);\n }\n };\n });\n}\nexport function getDelay(value, pointerType) {\n if (pointerType && !isMouseLikePointerType(pointerType)) {\n return 0;\n }\n if (typeof value === 'function') {\n return value();\n }\n return value;\n}","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { useValueAsRef } from '@base-ui-components/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { contains, getDocument, isMouseLikePointerType } from \"../utils.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { getDelay } from \"./useHover.js\";\nimport { useFloatingTree } from \"../components/FloatingTree.js\";\nimport { safePolygonIdentifier, useHoverInteractionSharedState } from \"./useHoverInteractionSharedState.js\";\nfunction getRestMs(value) {\n if (typeof value === 'function') {\n return value();\n }\n return value;\n}\n\n/**\n * Provides hover interactions that should be attached to reference or trigger\n * elements.\n */\nexport function useHoverReferenceInteraction(context, props = {}) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const {\n dataRef,\n events\n } = store.context;\n const {\n enabled = true,\n delay = 0,\n handleClose = null,\n mouseOnly = false,\n restMs = 0,\n move = true,\n triggerElement = null,\n externalTree,\n isActiveTrigger = true\n } = props;\n const tree = useFloatingTree(externalTree);\n const {\n pointerTypeRef,\n interactedInsideRef,\n handlerRef: closeHandlerRef,\n blockMouseMoveRef,\n performedPointerEventsMutationRef,\n unbindMouseMoveRef,\n restTimeoutPendingRef,\n openChangeTimeout,\n restTimeout,\n handleCloseOptionsRef\n } = useHoverInteractionSharedState(store);\n const handleCloseRef = useValueAsRef(handleClose);\n const delayRef = useValueAsRef(delay);\n const restMsRef = useValueAsRef(restMs);\n if (isActiveTrigger) {\n // eslint-disable-next-line no-underscore-dangle\n handleCloseOptionsRef.current = handleCloseRef.current?.__options;\n }\n const isClickLikeOpenEvent = useStableCallback(() => {\n if (interactedInsideRef.current) {\n return true;\n }\n return dataRef.current.openEvent ? ['click', 'mousedown'].includes(dataRef.current.openEvent.type) : false;\n });\n const closeWithDelay = React.useCallback((event, runElseBranch = true) => {\n const closeDelay = getDelay(delayRef.current, 'close', pointerTypeRef.current);\n if (closeDelay && !closeHandlerRef.current) {\n openChangeTimeout.start(closeDelay, () => store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event)));\n } else if (runElseBranch) {\n openChangeTimeout.clear();\n store.setOpen(false, createChangeEventDetails(REASONS.triggerHover, event));\n }\n }, [delayRef, closeHandlerRef, store, pointerTypeRef, openChangeTimeout]);\n const cleanupMouseMoveHandler = useStableCallback(() => {\n unbindMouseMoveRef.current();\n closeHandlerRef.current = undefined;\n });\n const clearPointerEvents = useStableCallback(() => {\n if (performedPointerEventsMutationRef.current) {\n const body = getDocument(store.select('domReferenceElement')).body;\n body.style.pointerEvents = '';\n body.removeAttribute(safePolygonIdentifier);\n performedPointerEventsMutationRef.current = false;\n }\n });\n\n // When closing before opening, clear the delay timeouts to cancel it\n // from showing.\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n function onOpenChangeLocal(details) {\n if (!details.open) {\n openChangeTimeout.clear();\n restTimeout.clear();\n blockMouseMoveRef.current = true;\n restTimeoutPendingRef.current = false;\n }\n }\n events.on('openchange', onOpenChangeLocal);\n return () => {\n events.off('openchange', onOpenChangeLocal);\n };\n }, [enabled, events, openChangeTimeout, restTimeout, blockMouseMoveRef, restTimeoutPendingRef]);\n const handleScrollMouseLeave = useStableCallback(event => {\n if (isClickLikeOpenEvent()) {\n return;\n }\n if (!dataRef.current.floatingContext) {\n return;\n }\n const triggerElements = store.context.triggerElements;\n if (event.relatedTarget && triggerElements.hasElement(event.relatedTarget)) {\n return;\n }\n handleCloseRef.current?.({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event);\n }\n }\n })(event);\n });\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n const trigger = triggerElement ?? (isActiveTrigger ? store.select('domReferenceElement') : null);\n if (!isElement(trigger)) {\n return undefined;\n }\n function onMouseEnter(event) {\n openChangeTimeout.clear();\n blockMouseMoveRef.current = false;\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current)) {\n return;\n }\n\n // Only rest delay is set; there's no fallback delay.\n // This will be handled by `onMouseMove`.\n if (getRestMs(restMsRef.current) > 0 && !getDelay(delayRef.current, 'open')) {\n return;\n }\n const openDelay = getDelay(delayRef.current, 'open', pointerTypeRef.current);\n const currentDomReference = store.select('domReferenceElement');\n const allTriggers = store.context.triggerElements;\n const isOverInactiveTrigger = (allTriggers.hasElement(event.target) || allTriggers.hasMatchingElement(t => contains(t, event.target))) && (!currentDomReference || !contains(currentDomReference, event.target));\n const triggerNode = event.currentTarget ?? null;\n if (openDelay) {\n openChangeTimeout.start(openDelay, () => {\n if (!store.select('open')) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, event, triggerNode));\n }\n });\n } else if (!store.select('open') || isOverInactiveTrigger) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, event, triggerNode));\n }\n }\n function onMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n clearPointerEvents();\n return;\n }\n unbindMouseMoveRef.current();\n const domReferenceElement = store.select('domReferenceElement');\n const doc = getDocument(domReferenceElement);\n restTimeout.clear();\n restTimeoutPendingRef.current = false;\n const triggerElements = store.context.triggerElements;\n if (event.relatedTarget && triggerElements.hasElement(event.relatedTarget)) {\n return;\n }\n if (handleCloseRef.current && dataRef.current.floatingContext) {\n if (!store.select('open')) {\n openChangeTimeout.clear();\n }\n closeHandlerRef.current = handleCloseRef.current({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event, true);\n }\n }\n });\n const handler = closeHandlerRef.current;\n handler(event);\n doc.addEventListener('mousemove', handler);\n unbindMouseMoveRef.current = () => {\n doc.removeEventListener('mousemove', handler);\n };\n return;\n }\n const shouldClose = pointerTypeRef.current === 'touch' ? !contains(store.select('floatingElement'), event.relatedTarget) : true;\n if (shouldClose) {\n closeWithDelay(event);\n }\n }\n function onScrollMouseLeave(event) {\n handleScrollMouseLeave(event);\n }\n if (store.select('open')) {\n trigger.addEventListener('mouseleave', onScrollMouseLeave);\n }\n if (move) {\n trigger.addEventListener('mousemove', onMouseEnter, {\n once: true\n });\n }\n trigger.addEventListener('mouseenter', onMouseEnter);\n trigger.addEventListener('mouseleave', onMouseLeave);\n return () => {\n trigger.removeEventListener('mouseleave', onScrollMouseLeave);\n if (move) {\n trigger.removeEventListener('mousemove', onMouseEnter);\n }\n trigger.removeEventListener('mouseenter', onMouseEnter);\n trigger.removeEventListener('mouseleave', onMouseLeave);\n };\n }, [cleanupMouseMoveHandler, clearPointerEvents, blockMouseMoveRef, dataRef, delayRef, closeWithDelay, store, enabled, handleCloseRef, handleScrollMouseLeave, isActiveTrigger, isClickLikeOpenEvent, mouseOnly, move, pointerTypeRef, restMsRef, restTimeout, restTimeoutPendingRef, openChangeTimeout, triggerElement, tree, unbindMouseMoveRef, closeHandlerRef]);\n return React.useMemo(() => {\n function setPointerRef(event) {\n pointerTypeRef.current = event.pointerType;\n }\n return {\n onPointerDown: setPointerRef,\n onPointerEnter: setPointerRef,\n onMouseMove(event) {\n const {\n nativeEvent\n } = event;\n const trigger = event.currentTarget;\n const currentDomReference = store.select('domReferenceElement');\n const allTriggers = store.context.triggerElements;\n const currentOpen = store.select('open');\n const isOverInactiveTrigger = (allTriggers.hasElement(event.target) || allTriggers.hasMatchingElement(t => contains(t, event.target))) && (!currentDomReference || !contains(currentDomReference, event.target));\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current)) {\n return;\n }\n if (currentOpen && !isOverInactiveTrigger || getRestMs(restMsRef.current) === 0) {\n return;\n }\n if (!isOverInactiveTrigger && restTimeoutPendingRef.current && event.movementX ** 2 + event.movementY ** 2 < 2) {\n return;\n }\n restTimeout.clear();\n function handleMouseMove() {\n if (!blockMouseMoveRef.current && (!currentOpen || isOverInactiveTrigger)) {\n store.setOpen(true, createChangeEventDetails(REASONS.triggerHover, nativeEvent, trigger));\n }\n }\n if (pointerTypeRef.current === 'touch') {\n ReactDOM.flushSync(() => {\n handleMouseMove();\n });\n } else if (isOverInactiveTrigger && currentOpen) {\n handleMouseMove();\n } else {\n restTimeoutPendingRef.current = true;\n restTimeout.start(getRestMs(restMsRef.current), handleMouseMove);\n }\n }\n };\n }, [blockMouseMoveRef, mouseOnly, store, pointerTypeRef, restMsRef, restTimeout, restTimeoutPendingRef]);\n}","import * as React from 'react';\nimport { ACTIVE_KEY, FOCUSABLE_ATTRIBUTE, SELECTED_KEY } from \"../utils/constants.js\";\n/**\n * Merges an array of interaction hooks' props into prop getters, allowing\n * event handler functions to be composed together without overwriting one\n * another.\n * @see https://floating-ui.com/docs/useInteractions\n */\nexport function useInteractions(propsList = []) {\n const referenceDeps = propsList.map(key => key?.reference);\n const floatingDeps = propsList.map(key => key?.floating);\n const itemDeps = propsList.map(key => key?.item);\n const triggerDeps = propsList.map(key => key?.trigger);\n const getReferenceProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'reference'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n referenceDeps);\n const getFloatingProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'floating'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n floatingDeps);\n const getItemProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'item'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n itemDeps);\n const getTriggerProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'trigger'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n triggerDeps);\n return React.useMemo(() => ({\n getReferenceProps,\n getFloatingProps,\n getItemProps,\n getTriggerProps\n }), [getReferenceProps, getFloatingProps, getItemProps, getTriggerProps]);\n}\n\n/* eslint-disable guard-for-in */\n\nfunction mergeProps(userProps, propsList, elementKey) {\n const eventHandlers = new Map();\n const isItem = elementKey === 'item';\n const outputProps = {};\n if (elementKey === 'floating') {\n outputProps.tabIndex = -1;\n outputProps[FOCUSABLE_ATTRIBUTE] = '';\n }\n for (const key in userProps) {\n if (isItem && userProps) {\n if (key === ACTIVE_KEY || key === SELECTED_KEY) {\n continue;\n }\n }\n outputProps[key] = userProps[key];\n }\n for (let i = 0; i < propsList.length; i += 1) {\n let props;\n const propsOrGetProps = propsList[i]?.[elementKey];\n if (typeof propsOrGetProps === 'function') {\n props = userProps ? propsOrGetProps(userProps) : null;\n } else {\n props = propsOrGetProps;\n }\n if (!props) {\n continue;\n }\n mutablyMergeProps(outputProps, props, isItem, eventHandlers);\n }\n mutablyMergeProps(outputProps, userProps, isItem, eventHandlers);\n return outputProps;\n}\nfunction mutablyMergeProps(outputProps, props, isItem, eventHandlers) {\n for (const key in props) {\n const value = props[key];\n if (isItem && (key === ACTIVE_KEY || key === SELECTED_KEY)) {\n continue;\n }\n if (!key.startsWith('on')) {\n outputProps[key] = value;\n } else {\n if (!eventHandlers.has(key)) {\n eventHandlers.set(key, []);\n }\n if (typeof value === 'function') {\n eventHandlers.get(key)?.push(value);\n outputProps[key] = (...args) => {\n return eventHandlers.get(key)?.map(fn => fn(...args)).find(val => val !== undefined);\n };\n }\n }\n }\n}","import * as React from 'react';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { useValueAsRef } from '@base-ui-components/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { activeElement, contains, getDocument, getTarget, isTypeableCombobox, isVirtualClick, isVirtualPointerEvent, stopEvent, getFloatingFocusElement, isIndexOutOfListBounds, getMinListIndex, getMaxListIndex, getGridNavigatedIndex, isListIndexDisabled, createGridCellMap, getGridCellIndices, getGridCellIndexOfCorner, findNonDisabledListIndex } from \"../utils.js\";\nimport { useFloatingParentNodeId, useFloatingTree } from \"../components/FloatingTree.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.js\";\nimport { ARROW_UP, ARROW_DOWN, ARROW_RIGHT, ARROW_LEFT } from \"../utils/constants.js\";\nexport const ESCAPE = 'Escape';\nfunction doSwitch(orientation, vertical, horizontal) {\n switch (orientation) {\n case 'vertical':\n return vertical;\n case 'horizontal':\n return horizontal;\n default:\n return vertical || horizontal;\n }\n}\nfunction isMainOrientationKey(key, orientation) {\n const vertical = key === ARROW_UP || key === ARROW_DOWN;\n const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isMainOrientationToEndKey(key, orientation, rtl) {\n const vertical = key === ARROW_DOWN;\n const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal) || key === 'Enter' || key === ' ' || key === '';\n}\nfunction isCrossOrientationOpenKey(key, orientation, rtl) {\n const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n const horizontal = key === ARROW_DOWN;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isCrossOrientationCloseKey(key, orientation, rtl, cols) {\n const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n const horizontal = key === ARROW_UP;\n if (orientation === 'both' || orientation === 'horizontal' && cols && cols > 1) {\n return key === ESCAPE;\n }\n return doSwitch(orientation, vertical, horizontal);\n}\n/**\n * Adds arrow key-based navigation of a list of items, either using real DOM\n * focus or virtual focus.\n * @see https://floating-ui.com/docs/useListNavigation\n */\nexport function useListNavigation(context, props) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const domReferenceElement = store.useState('domReferenceElement');\n const dataRef = store.context.dataRef;\n const {\n listRef,\n activeIndex,\n onNavigate: onNavigateProp = () => {},\n enabled = true,\n selectedIndex = null,\n allowEscape = false,\n loopFocus = false,\n nested = false,\n rtl = false,\n virtual = false,\n focusItemOnOpen = 'auto',\n focusItemOnHover = true,\n openOnArrowKeyDown = true,\n disabledIndices = undefined,\n orientation = 'vertical',\n parentOrientation,\n cols = 1,\n scrollItemIntoView = true,\n itemSizes,\n dense = false,\n id,\n externalTree\n } = props;\n if (process.env.NODE_ENV !== 'production') {\n if (allowEscape) {\n if (!loopFocus) {\n console.warn('`useListNavigation` looping must be enabled to allow escaping.');\n }\n if (!virtual) {\n console.warn('`useListNavigation` must be virtual to allow escaping.');\n }\n }\n if (orientation === 'vertical' && cols > 1) {\n console.warn('In grid list navigation mode (`cols` > 1), the `orientation` should', 'be either \"horizontal\" or \"both\".');\n }\n }\n const floatingFocusElement = getFloatingFocusElement(floatingElement);\n const floatingFocusElementRef = useValueAsRef(floatingFocusElement);\n const parentId = useFloatingParentNodeId();\n const tree = useFloatingTree(externalTree);\n useIsoLayoutEffect(() => {\n dataRef.current.orientation = orientation;\n }, [dataRef, orientation]);\n const typeableComboboxReference = isTypeableCombobox(domReferenceElement);\n const focusItemOnOpenRef = React.useRef(focusItemOnOpen);\n const indexRef = React.useRef(selectedIndex ?? -1);\n const keyRef = React.useRef(null);\n const isPointerModalityRef = React.useRef(true);\n const onNavigate = useStableCallback(event => {\n onNavigateProp(indexRef.current === -1 ? null : indexRef.current, event);\n });\n const previousOnNavigateRef = React.useRef(onNavigate);\n const previousMountedRef = React.useRef(!!floatingElement);\n const previousOpenRef = React.useRef(open);\n const forceSyncFocusRef = React.useRef(false);\n const forceScrollIntoViewRef = React.useRef(false);\n const disabledIndicesRef = useValueAsRef(disabledIndices);\n const latestOpenRef = useValueAsRef(open);\n const scrollItemIntoViewRef = useValueAsRef(scrollItemIntoView);\n const selectedIndexRef = useValueAsRef(selectedIndex);\n const focusItem = useStableCallback(() => {\n function runFocus(item) {\n if (virtual) {\n tree?.events.emit('virtualfocus', item);\n } else {\n enqueueFocus(item, {\n sync: forceSyncFocusRef.current,\n preventScroll: true\n });\n }\n }\n const initialItem = listRef.current[indexRef.current];\n const forceScrollIntoView = forceScrollIntoViewRef.current;\n if (initialItem) {\n runFocus(initialItem);\n }\n const scheduler = forceSyncFocusRef.current ? v => v() : requestAnimationFrame;\n scheduler(() => {\n const waitedItem = listRef.current[indexRef.current] || initialItem;\n if (!waitedItem) {\n return;\n }\n if (!initialItem) {\n runFocus(waitedItem);\n }\n const scrollIntoViewOptions = scrollItemIntoViewRef.current;\n const shouldScrollIntoView = scrollIntoViewOptions &&\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n item && (forceScrollIntoView || !isPointerModalityRef.current);\n if (shouldScrollIntoView) {\n // JSDOM doesn't support `.scrollIntoView()` but it's widely supported\n // by all browsers.\n waitedItem.scrollIntoView?.(typeof scrollIntoViewOptions === 'boolean' ? {\n block: 'nearest',\n inline: 'nearest'\n } : scrollIntoViewOptions);\n }\n });\n });\n\n // Sync `selectedIndex` to be the `activeIndex` upon opening the floating\n // element. Also, reset `activeIndex` upon closing the floating element.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (open && floatingElement) {\n indexRef.current = selectedIndex ?? -1;\n if (focusItemOnOpenRef.current && selectedIndex != null) {\n // Regardless of the pointer modality, we want to ensure the selected\n // item comes into view when the floating element is opened.\n forceScrollIntoViewRef.current = true;\n onNavigate();\n }\n } else if (previousMountedRef.current) {\n // Since the user can specify `onNavigate` conditionally\n // (onNavigate: open ? setActiveIndex : setSelectedIndex),\n // we store and call the previous function.\n indexRef.current = -1;\n previousOnNavigateRef.current();\n }\n }, [enabled, open, floatingElement, selectedIndex, onNavigate]);\n\n // Sync `activeIndex` to be the focused item while the floating element is\n // open.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (!open) {\n forceSyncFocusRef.current = false;\n return;\n }\n if (!floatingElement) {\n return;\n }\n if (activeIndex == null) {\n forceSyncFocusRef.current = false;\n if (selectedIndexRef.current != null) {\n return;\n }\n\n // Reset while the floating element was open (e.g. the list changed).\n if (previousMountedRef.current) {\n indexRef.current = -1;\n focusItem();\n }\n\n // Initial sync.\n if ((!previousOpenRef.current || !previousMountedRef.current) && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) {\n let runs = 0;\n const waitForListPopulated = () => {\n if (listRef.current[0] == null) {\n // Avoid letting the browser paint if possible on the first try,\n // otherwise use rAF. Don't try more than twice, since something\n // is wrong otherwise.\n if (runs < 2) {\n const scheduler = runs ? requestAnimationFrame : queueMicrotask;\n scheduler(waitForListPopulated);\n }\n runs += 1;\n } else {\n // initially focus the first non-disabled item\n indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, orientation, rtl) || nested ? getMinListIndex(listRef) : getMaxListIndex(listRef);\n keyRef.current = null;\n onNavigate();\n }\n };\n waitForListPopulated();\n }\n } else if (!isIndexOutOfListBounds(listRef, activeIndex)) {\n indexRef.current = activeIndex;\n focusItem();\n forceScrollIntoViewRef.current = false;\n }\n }, [enabled, open, floatingElement, activeIndex, selectedIndexRef, nested, listRef, orientation, rtl, onNavigate, focusItem, disabledIndicesRef]);\n\n // Ensure the parent floating element has focus when a nested child closes\n // to allow arrow key navigation to work after the pointer leaves the child.\n useIsoLayoutEffect(() => {\n if (!enabled || floatingElement || !tree || virtual || !previousMountedRef.current) {\n return;\n }\n const nodes = tree.nodesRef.current;\n const parent = nodes.find(node => node.id === parentId)?.context?.elements.floating;\n const activeEl = activeElement(getDocument(floatingElement));\n const treeContainsActiveEl = nodes.some(node => node.context && contains(node.context.elements.floating, activeEl));\n if (parent && !treeContainsActiveEl && isPointerModalityRef.current) {\n parent.focus({\n preventScroll: true\n });\n }\n }, [enabled, floatingElement, tree, parentId, virtual]);\n useIsoLayoutEffect(() => {\n previousOnNavigateRef.current = onNavigate;\n previousOpenRef.current = open;\n previousMountedRef.current = !!floatingElement;\n });\n useIsoLayoutEffect(() => {\n if (!open) {\n keyRef.current = null;\n focusItemOnOpenRef.current = focusItemOnOpen;\n }\n }, [open, focusItemOnOpen]);\n const hasActiveIndex = activeIndex != null;\n const item = React.useMemo(() => {\n function syncCurrentTarget(event) {\n if (!latestOpenRef.current) {\n return;\n }\n const index = listRef.current.indexOf(event.currentTarget);\n if (index !== -1 && indexRef.current !== index) {\n indexRef.current = index;\n onNavigate(event);\n }\n }\n const itemProps = {\n onFocus(event) {\n forceSyncFocusRef.current = true;\n syncCurrentTarget(event);\n },\n onClick: ({\n currentTarget\n }) => currentTarget.focus({\n preventScroll: true\n }),\n // Safari\n onMouseMove(event) {\n forceSyncFocusRef.current = true;\n forceScrollIntoViewRef.current = false;\n if (focusItemOnHover) {\n syncCurrentTarget(event);\n }\n },\n onPointerLeave(event) {\n if (!latestOpenRef.current || !isPointerModalityRef.current || event.pointerType === 'touch') {\n return;\n }\n forceSyncFocusRef.current = true;\n const relatedTarget = event.relatedTarget;\n if (!focusItemOnHover || listRef.current.includes(relatedTarget)) {\n return;\n }\n indexRef.current = -1;\n onNavigate(event);\n if (!virtual) {\n floatingFocusElementRef.current?.focus({\n preventScroll: true\n });\n }\n }\n };\n return itemProps;\n }, [latestOpenRef, floatingFocusElementRef, focusItemOnHover, listRef, onNavigate, virtual]);\n const getParentOrientation = React.useCallback(() => {\n return parentOrientation ?? tree?.nodesRef.current.find(node => node.id === parentId)?.context?.dataRef?.current.orientation;\n }, [parentId, tree, parentOrientation]);\n const commonOnKeyDown = useStableCallback(event => {\n isPointerModalityRef.current = false;\n forceSyncFocusRef.current = true;\n\n // When composing a character, Chrome fires ArrowDown twice. Firefox/Safari\n // don't appear to suffer from this. `event.isComposing` is avoided due to\n // Safari not supporting it properly (although it's not needed in the first\n // place for Safari, just avoiding any possible issues).\n if (event.which === 229) {\n return;\n }\n\n // If the floating element is animating out, ignore navigation. Otherwise,\n // the `activeIndex` gets set to 0 despite not being open so the next time\n // the user ArrowDowns, the first item won't be focused.\n if (!latestOpenRef.current && event.currentTarget === floatingFocusElementRef.current) {\n return;\n }\n if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl, cols)) {\n // If the nested list's close key is also the parent navigation key,\n // let the parent navigate. Otherwise, stop propagating the event.\n if (!isMainOrientationKey(event.key, getParentOrientation())) {\n stopEvent(event);\n }\n store.setOpen(false, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent));\n if (isHTMLElement(domReferenceElement)) {\n if (virtual) {\n tree?.events.emit('virtualfocus', domReferenceElement);\n } else {\n domReferenceElement.focus();\n }\n }\n return;\n }\n const currentIndex = indexRef.current;\n const minIndex = getMinListIndex(listRef, disabledIndices);\n const maxIndex = getMaxListIndex(listRef, disabledIndices);\n if (!typeableComboboxReference) {\n if (event.key === 'Home') {\n stopEvent(event);\n indexRef.current = minIndex;\n onNavigate(event);\n }\n if (event.key === 'End') {\n stopEvent(event);\n indexRef.current = maxIndex;\n onNavigate(event);\n }\n }\n\n // Grid navigation.\n if (cols > 1) {\n const sizes = itemSizes || Array.from({\n length: listRef.current.length\n }, () => ({\n width: 1,\n height: 1\n }));\n // To calculate movements on the grid, we use hypothetical cell indices\n // as if every item was 1x1, then convert back to real indices.\n const cellMap = createGridCellMap(sizes, cols, dense);\n const minGridIndex = cellMap.findIndex(index => index != null && !isListIndexDisabled(listRef, index, disabledIndices));\n // last enabled index\n const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !isListIndexDisabled(listRef, index, disabledIndices) ? cellIndex : foundIndex, -1);\n const index = cellMap[getGridNavigatedIndex({\n current: cellMap.map(itemIndex => itemIndex != null ? listRef.current[itemIndex] : null)\n }, {\n event,\n orientation,\n loopFocus,\n rtl,\n cols,\n // treat undefined (empty grid spaces) as disabled indices so we\n // don't end up in them\n disabledIndices: getGridCellIndices([...((typeof disabledIndices !== 'function' ? disabledIndices : null) || listRef.current.map((_, listIndex) => isListIndexDisabled(listRef, listIndex, disabledIndices) ? listIndex : undefined)), undefined], cellMap),\n minIndex: minGridIndex,\n maxIndex: maxGridIndex,\n prevIndex: getGridCellIndexOfCorner(indexRef.current > maxIndex ? minIndex : indexRef.current, sizes, cellMap, cols,\n // use a corner matching the edge closest to the direction\n // we're moving in so we don't end up in the same item. Prefer\n // top/left over bottom/right.\n // eslint-disable-next-line no-nested-ternary\n event.key === ARROW_DOWN ? 'bl' : event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT) ? 'tr' : 'tl'),\n stopEvent: true\n })];\n if (index != null) {\n indexRef.current = index;\n onNavigate(event);\n }\n if (orientation === 'both') {\n return;\n }\n }\n if (isMainOrientationKey(event.key, orientation)) {\n stopEvent(event);\n\n // Reset the index if no item is focused.\n if (open && !virtual && activeElement(event.currentTarget.ownerDocument) === event.currentTarget) {\n indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex;\n onNavigate(event);\n return;\n }\n if (isMainOrientationToEndKey(event.key, orientation, rtl)) {\n if (loopFocus) {\n if (currentIndex >= maxIndex) {\n if (allowEscape && currentIndex !== listRef.current.length) {\n indexRef.current = -1;\n } else {\n // Give time for virtualizers to update the listRef.\n forceSyncFocusRef.current = false;\n indexRef.current = minIndex;\n }\n } else {\n indexRef.current = findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n });\n }\n } else {\n indexRef.current = Math.min(maxIndex, findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n }));\n }\n } else if (loopFocus) {\n if (currentIndex <= minIndex) {\n if (allowEscape && currentIndex !== -1) {\n indexRef.current = listRef.current.length;\n } else {\n // Give time for virtualizers to update the listRef.\n forceSyncFocusRef.current = false;\n indexRef.current = maxIndex;\n }\n } else {\n indexRef.current = findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n });\n }\n } else {\n indexRef.current = Math.max(minIndex, findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n }));\n }\n if (isIndexOutOfListBounds(listRef, indexRef.current)) {\n indexRef.current = -1;\n }\n onNavigate(event);\n }\n });\n const ariaActiveDescendantProp = React.useMemo(() => {\n return virtual && open && hasActiveIndex && {\n 'aria-activedescendant': `${id}-${activeIndex}`\n };\n }, [virtual, open, hasActiveIndex, id, activeIndex]);\n const floating = React.useMemo(() => {\n return {\n 'aria-orientation': orientation === 'both' ? undefined : orientation,\n ...(!typeableComboboxReference ? ariaActiveDescendantProp : {}),\n onKeyDown(event) {\n // Close submenu on Shift+Tab\n if (event.key === 'Tab' && event.shiftKey && open && !virtual) {\n // If the event originated from within a nested element (e.g., a Dialog opened from\n // within the menu), don't close the menu. The nested element has its own focus\n // management and should handle the Tab key.\n const target = getTarget(event.nativeEvent);\n if (target && !contains(floatingFocusElementRef.current, target)) {\n return;\n }\n stopEvent(event);\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));\n if (isHTMLElement(domReferenceElement)) {\n domReferenceElement.focus();\n }\n return;\n }\n commonOnKeyDown(event);\n },\n onPointerMove() {\n isPointerModalityRef.current = true;\n }\n };\n }, [ariaActiveDescendantProp, commonOnKeyDown, floatingFocusElementRef, orientation, typeableComboboxReference, store, open, virtual, domReferenceElement]);\n const trigger = React.useMemo(() => {\n function checkVirtualMouse(event) {\n if (focusItemOnOpen === 'auto' && isVirtualClick(event.nativeEvent)) {\n focusItemOnOpenRef.current = !virtual;\n }\n }\n function checkVirtualPointer(event) {\n // `pointerdown` fires first, reset the state then perform the checks.\n focusItemOnOpenRef.current = focusItemOnOpen;\n if (focusItemOnOpen === 'auto' && isVirtualPointerEvent(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n return {\n onKeyDown(event) {\n // non-reactive open state (to prevent re-creation of the handler)\n const currentOpen = store.select('open');\n isPointerModalityRef.current = false;\n const isArrowKey = event.key.startsWith('Arrow');\n const isParentCrossOpenKey = isCrossOrientationOpenKey(event.key, getParentOrientation(), rtl);\n const isMainKey = isMainOrientationKey(event.key, orientation);\n const isNavigationKey = (nested ? isParentCrossOpenKey : isMainKey) || event.key === 'Enter' || event.key.trim() === '';\n if (virtual && currentOpen) {\n return commonOnKeyDown(event);\n }\n\n // If a floating element should not open on arrow key down, avoid\n // setting `activeIndex` while it's closed.\n if (!currentOpen && !openOnArrowKeyDown && isArrowKey) {\n return undefined;\n }\n if (isNavigationKey) {\n const isParentMainKey = isMainOrientationKey(event.key, getParentOrientation());\n keyRef.current = nested && isParentMainKey ? null : event.key;\n }\n if (nested) {\n if (isParentCrossOpenKey) {\n stopEvent(event);\n if (currentOpen) {\n indexRef.current = getMinListIndex(listRef, disabledIndicesRef.current);\n onNavigate(event);\n } else {\n store.setOpen(true, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent, event.currentTarget));\n }\n }\n return undefined;\n }\n if (isMainKey) {\n if (selectedIndexRef.current != null) {\n indexRef.current = selectedIndexRef.current;\n }\n stopEvent(event);\n if (!currentOpen && openOnArrowKeyDown) {\n store.setOpen(true, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent, event.currentTarget));\n } else {\n commonOnKeyDown(event);\n }\n if (currentOpen) {\n onNavigate(event);\n }\n }\n return undefined;\n },\n onFocus(event) {\n if (store.select('open') && !virtual) {\n indexRef.current = -1;\n onNavigate(event);\n }\n },\n onPointerDown: checkVirtualPointer,\n onPointerEnter: checkVirtualPointer,\n onMouseDown: checkVirtualMouse,\n onClick: checkVirtualMouse\n };\n }, [commonOnKeyDown, disabledIndicesRef, focusItemOnOpen, listRef, nested, onNavigate, store, openOnArrowKeyDown, orientation, getParentOrientation, rtl, selectedIndexRef, virtual]);\n const reference = React.useMemo(() => {\n return {\n ...ariaActiveDescendantProp,\n ...trigger\n };\n }, [ariaActiveDescendantProp, trigger]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item,\n trigger\n } : {}, [enabled, reference, floating, trigger, item]);\n}","import * as React from 'react';\nimport { useId } from '@base-ui-components/utils/useId';\nimport { getFloatingFocusElement } from \"../utils.js\";\nimport { useFloatingParentNodeId } from \"../components/FloatingTree.js\";\nimport { EMPTY_OBJECT } from \"../../utils/constants.js\";\nconst componentRoleToAriaRoleMap = new Map([['select', 'listbox'], ['combobox', 'listbox'], ['label', false]]);\n\n/**\n * Adds base screen reader props to the reference and floating elements for a\n * given floating element `role`.\n * @see https://floating-ui.com/docs/useRole\n */\nexport function useRole(context, props = {}) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const defaultFloatingId = store.useState('floatingId');\n const domReference = store.useState('domReferenceElement');\n const floatingElement = store.useState('floatingElement');\n const {\n enabled = true,\n role = 'dialog'\n } = props;\n const defaultReferenceId = useId();\n const referenceId = domReference?.id || defaultReferenceId;\n const floatingId = React.useMemo(() => getFloatingFocusElement(floatingElement)?.id || defaultFloatingId, [floatingElement, defaultFloatingId]);\n const ariaRole = componentRoleToAriaRoleMap.get(role) ?? role;\n const parentId = useFloatingParentNodeId();\n const isNested = parentId != null;\n const trigger = React.useMemo(() => {\n if (ariaRole === 'tooltip' || role === 'label') {\n return EMPTY_OBJECT;\n }\n return {\n 'aria-haspopup': ariaRole === 'alertdialog' ? 'dialog' : ariaRole,\n 'aria-expanded': 'false',\n ...(ariaRole === 'listbox' && {\n role: 'combobox'\n }),\n ...(ariaRole === 'menu' && isNested && {\n role: 'menuitem'\n }),\n ...(role === 'select' && {\n 'aria-autocomplete': 'none'\n }),\n ...(role === 'combobox' && {\n 'aria-autocomplete': 'list'\n })\n };\n }, [ariaRole, isNested, role]);\n const reference = React.useMemo(() => {\n if (ariaRole === 'tooltip' || role === 'label') {\n return {\n [`aria-${role === 'label' ? 'labelledby' : 'describedby'}`]: open ? floatingId : undefined\n };\n }\n const triggerProps = trigger;\n return {\n ...triggerProps,\n 'aria-expanded': open ? 'true' : 'false',\n 'aria-controls': open ? floatingId : undefined,\n ...(ariaRole === 'menu' && {\n id: referenceId\n })\n };\n }, [ariaRole, floatingId, open, referenceId, role, trigger]);\n const floating = React.useMemo(() => {\n const floatingProps = {\n id: floatingId,\n ...(ariaRole && {\n role: ariaRole\n })\n };\n if (ariaRole === 'tooltip' || role === 'label') {\n return floatingProps;\n }\n return {\n ...floatingProps,\n ...(ariaRole === 'menu' && {\n 'aria-labelledby': referenceId\n })\n };\n }, [ariaRole, floatingId, referenceId, role]);\n const item = React.useCallback(({\n active,\n selected\n }) => {\n const commonProps = {\n role: 'option',\n ...(active && {\n id: `${floatingId}-fui-option`\n })\n };\n\n // For `menu`, we are unable to tell if the item is a `menuitemradio`\n // or `menuitemcheckbox`. For backwards-compatibility reasons, also\n // avoid defaulting to `menuitem` as it may overwrite custom role props.\n switch (role) {\n case 'select':\n case 'combobox':\n return {\n ...commonProps,\n 'aria-selected': selected\n };\n default:\n }\n return {};\n }, [floatingId, role]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item,\n trigger\n } : {}, [enabled, reference, floating, trigger, item]);\n}","import * as React from 'react';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { stopEvent } from \"../utils.js\";\nimport { EMPTY_ARRAY } from \"../../utils/constants.js\";\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nexport function useTypeahead(context, props) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const dataRef = store.context.dataRef;\n const {\n listRef,\n activeIndex,\n onMatch: onMatchProp,\n onTypingChange,\n enabled = true,\n findMatch = null,\n resetMs = 750,\n ignoreKeys = EMPTY_ARRAY,\n selectedIndex = null\n } = props;\n const timeout = useTimeout();\n const stringRef = React.useRef('');\n const prevIndexRef = React.useRef(selectedIndex ?? activeIndex ?? -1);\n const matchIndexRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n if (open) {\n timeout.clear();\n matchIndexRef.current = null;\n stringRef.current = '';\n }\n }, [open, timeout]);\n useIsoLayoutEffect(() => {\n // Sync arrow key navigation but not typeahead navigation.\n if (open && stringRef.current === '') {\n prevIndexRef.current = selectedIndex ?? activeIndex ?? -1;\n }\n }, [open, selectedIndex, activeIndex]);\n const setTypingChange = useStableCallback(value => {\n if (value) {\n if (!dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange?.(value);\n }\n } else if (dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange?.(value);\n }\n });\n const onKeyDown = useStableCallback(event => {\n function getMatchingIndex(list, orderedList, string) {\n const str = findMatch ? findMatch(orderedList, string) : orderedList.find(text => text?.toLocaleLowerCase().indexOf(string.toLocaleLowerCase()) === 0);\n return str ? list.indexOf(str) : -1;\n }\n const listContent = listRef.current;\n if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n if (getMatchingIndex(listContent, listContent, stringRef.current) === -1) {\n setTypingChange(false);\n } else if (event.key === ' ') {\n stopEvent(event);\n }\n }\n if (listContent == null || ignoreKeys.includes(event.key) ||\n // Character key.\n event.key.length !== 1 ||\n // Modifier key.\n event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (open && event.key !== ' ') {\n stopEvent(event);\n setTypingChange(true);\n }\n\n // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n // allow it in this case, too.\n const allowRapidSuccessionOfFirstLetter = listContent.every(text => text ? text[0]?.toLocaleLowerCase() !== text[1]?.toLocaleLowerCase() : true);\n\n // Allows the user to cycle through items that start with the same letter\n // in rapid succession.\n if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n }\n stringRef.current += event.key;\n timeout.start(resetMs, () => {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n setTypingChange(false);\n });\n const prevIndex = prevIndexRef.current;\n const index = getMatchingIndex(listContent, [...listContent.slice((prevIndex || 0) + 1), ...listContent.slice(0, (prevIndex || 0) + 1)], stringRef.current);\n if (index !== -1) {\n onMatchProp?.(index);\n matchIndexRef.current = index;\n } else if (event.key !== ' ') {\n stringRef.current = '';\n setTypingChange(false);\n }\n });\n const reference = React.useMemo(() => ({\n onKeyDown\n }), [onKeyDown]);\n const floating = React.useMemo(() => {\n return {\n onKeyDown,\n onKeyUp(event) {\n if (event.key === ' ') {\n setTypingChange(false);\n }\n }\n };\n }, [onKeyDown, setTypingChange]);\n return React.useMemo(() => enabled ? {\n reference,\n floating\n } : {}, [enabled, reference, floating]);\n}","import { isElement } from '@floating-ui/utils/dom';\nimport { Timeout } from '@base-ui-components/utils/useTimeout';\nimport { contains, getTarget } from \"./utils/element.js\";\nimport { getNodeChildren } from \"./utils/nodes.js\";\n\n/* eslint-disable no-nested-ternary */\n\nfunction isPointInPolygon(point, polygon) {\n const [x, y] = point;\n let isInsideValue = false;\n const length = polygon.length;\n // eslint-disable-next-line no-plusplus\n for (let i = 0, j = length - 1; i < length; j = i++) {\n const [xi, yi] = polygon[i] || [0, 0];\n const [xj, yj] = polygon[j] || [0, 0];\n const intersect = yi >= y !== yj >= y && x <= (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) {\n isInsideValue = !isInsideValue;\n }\n }\n return isInsideValue;\n}\nfunction isInside(point, rect) {\n return point[0] >= rect.x && point[0] <= rect.x + rect.width && point[1] >= rect.y && point[1] <= rect.y + rect.height;\n}\n/**\n * Generates a safe polygon area that the user can traverse without closing the\n * floating element once leaving the reference element.\n * @see https://floating-ui.com/docs/useHover#safepolygon\n */\nexport function safePolygon(options = {}) {\n const {\n buffer = 0.5,\n blockPointerEvents = false,\n requireIntent = true\n } = options;\n const timeout = new Timeout();\n let hasLanded = false;\n let lastX = null;\n let lastY = null;\n let lastCursorTime = typeof performance !== 'undefined' ? performance.now() : 0;\n function getCursorSpeed(x, y) {\n const currentTime = performance.now();\n const elapsedTime = currentTime - lastCursorTime;\n if (lastX === null || lastY === null || elapsedTime === 0) {\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return null;\n }\n const deltaX = x - lastX;\n const deltaY = y - lastY;\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const speed = distance / elapsedTime; // px / ms\n\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return speed;\n }\n const fn = ({\n x,\n y,\n placement,\n elements,\n onClose,\n nodeId,\n tree\n }) => {\n return function onMouseMove(event) {\n function close() {\n timeout.clear();\n onClose();\n }\n timeout.clear();\n if (!elements.domReference || !elements.floating || placement == null || x == null || y == null) {\n return undefined;\n }\n const {\n clientX,\n clientY\n } = event;\n const clientPoint = [clientX, clientY];\n const target = getTarget(event);\n const isLeave = event.type === 'mouseleave';\n const isOverFloatingEl = contains(elements.floating, target);\n const isOverReferenceEl = contains(elements.domReference, target);\n const refRect = elements.domReference.getBoundingClientRect();\n const rect = elements.floating.getBoundingClientRect();\n const side = placement.split('-')[0];\n const cursorLeaveFromRight = x > rect.right - rect.width / 2;\n const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;\n const isOverReferenceRect = isInside(clientPoint, refRect);\n const isFloatingWider = rect.width > refRect.width;\n const isFloatingTaller = rect.height > refRect.height;\n const left = (isFloatingWider ? refRect : rect).left;\n const right = (isFloatingWider ? refRect : rect).right;\n const top = (isFloatingTaller ? refRect : rect).top;\n const bottom = (isFloatingTaller ? refRect : rect).bottom;\n if (isOverFloatingEl) {\n hasLanded = true;\n if (!isLeave) {\n return undefined;\n }\n }\n if (isOverReferenceEl) {\n hasLanded = false;\n }\n if (isOverReferenceEl && !isLeave) {\n hasLanded = true;\n return undefined;\n }\n\n // Prevent overlapping floating element from being stuck in an open-close\n // loop: https://github.com/floating-ui/floating-ui/issues/1910\n if (isLeave && isElement(event.relatedTarget) && contains(elements.floating, event.relatedTarget)) {\n return undefined;\n }\n\n // If any nested child is open, abort.\n if (tree && getNodeChildren(tree.nodesRef.current, nodeId).some(({\n context\n }) => context?.open)) {\n return undefined;\n }\n\n // If the pointer is leaving from the opposite side, the \"buffer\" logic\n // creates a point where the floating element remains open, but should be\n // ignored.\n // A constant of 1 handles floating point rounding errors.\n if (side === 'top' && y >= refRect.bottom - 1 || side === 'bottom' && y <= refRect.top + 1 || side === 'left' && x >= refRect.right - 1 || side === 'right' && x <= refRect.left + 1) {\n return close();\n }\n\n // Ignore when the cursor is within the rectangular trough between the\n // two elements. Since the triangle is created from the cursor point,\n // which can start beyond the ref element's edge, traversing back and\n // forth from the ref to the floating element can cause it to close. This\n // ensures it always remains open in that case.\n let rectPoly = [];\n switch (side) {\n case 'top':\n rectPoly = [[left, refRect.top + 1], [left, rect.bottom - 1], [right, rect.bottom - 1], [right, refRect.top + 1]];\n break;\n case 'bottom':\n rectPoly = [[left, rect.top + 1], [left, refRect.bottom - 1], [right, refRect.bottom - 1], [right, rect.top + 1]];\n break;\n case 'left':\n rectPoly = [[rect.right - 1, bottom], [rect.right - 1, top], [refRect.left + 1, top], [refRect.left + 1, bottom]];\n break;\n case 'right':\n rectPoly = [[refRect.right - 1, bottom], [refRect.right - 1, top], [rect.left + 1, top], [rect.left + 1, bottom]];\n break;\n default:\n }\n function getPolygon([px, py]) {\n switch (side) {\n case 'top':\n {\n const cursorPointOne = [isFloatingWider ? px + buffer / 2 : cursorLeaveFromRight ? px + buffer * 4 : px - buffer * 4, py + buffer + 1];\n const cursorPointTwo = [isFloatingWider ? px - buffer / 2 : cursorLeaveFromRight ? px + buffer * 4 : px - buffer * 4, py + buffer + 1];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.bottom - buffer : isFloatingWider ? rect.bottom - buffer : rect.top], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.bottom - buffer : rect.top : rect.bottom - buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'bottom':\n {\n const cursorPointOne = [isFloatingWider ? px + buffer / 2 : cursorLeaveFromRight ? px + buffer * 4 : px - buffer * 4, py - buffer];\n const cursorPointTwo = [isFloatingWider ? px - buffer / 2 : cursorLeaveFromRight ? px + buffer * 4 : px - buffer * 4, py - buffer];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.top + buffer : isFloatingWider ? rect.top + buffer : rect.bottom], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.top + buffer : rect.bottom : rect.top + buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'left':\n {\n const cursorPointOne = [px + buffer + 1, isFloatingTaller ? py + buffer / 2 : cursorLeaveFromBottom ? py + buffer * 4 : py - buffer * 4];\n const cursorPointTwo = [px + buffer + 1, isFloatingTaller ? py - buffer / 2 : cursorLeaveFromBottom ? py + buffer * 4 : py - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.right - buffer : isFloatingTaller ? rect.right - buffer : rect.left, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.right - buffer : rect.left : rect.right - buffer, rect.bottom]];\n return [...commonPoints, cursorPointOne, cursorPointTwo];\n }\n case 'right':\n {\n const cursorPointOne = [px - buffer, isFloatingTaller ? py + buffer / 2 : cursorLeaveFromBottom ? py + buffer * 4 : py - buffer * 4];\n const cursorPointTwo = [px - buffer, isFloatingTaller ? py - buffer / 2 : cursorLeaveFromBottom ? py + buffer * 4 : py - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.left + buffer : isFloatingTaller ? rect.left + buffer : rect.right, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.left + buffer : rect.right : rect.left + buffer, rect.bottom]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n default:\n return [];\n }\n }\n if (isPointInPolygon([clientX, clientY], rectPoly)) {\n return undefined;\n }\n if (hasLanded && !isOverReferenceRect) {\n return close();\n }\n if (!isLeave && requireIntent) {\n const cursorSpeed = getCursorSpeed(event.clientX, event.clientY);\n const cursorSpeedThreshold = 0.1;\n if (cursorSpeed !== null && cursorSpeed < cursorSpeedThreshold) {\n return close();\n }\n }\n if (!isPointInPolygon([clientX, clientY], getPolygon([x, y]))) {\n close();\n } else if (!hasLanded && requireIntent) {\n timeout.start(40, close);\n }\n return undefined;\n };\n };\n\n // eslint-disable-next-line no-underscore-dangle\n fn.__options = {\n blockPointerEvents\n };\n return fn;\n}","export let DialogPopupCssVars = /*#__PURE__*/function (DialogPopupCssVars) {\n /**\n * Indicates how many dialogs are nested within.\n * @type {number}\n */\n DialogPopupCssVars[\"nestedDialogs\"] = \"--nested-dialogs\";\n return DialogPopupCssVars;\n}({});","import { CommonPopupDataAttributes } from \"../../utils/popupStateMapping.js\";\nexport let DialogPopupDataAttributes = function (DialogPopupDataAttributes) {\n /**\n * Present when the dialog is open.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"open\"] = CommonPopupDataAttributes.open] = \"open\";\n /**\n * Present when the dialog is closed.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"closed\"] = CommonPopupDataAttributes.closed] = \"closed\";\n /**\n * Present when the dialog is animating in.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"startingStyle\"] = CommonPopupDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the dialog is animating out.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"endingStyle\"] = CommonPopupDataAttributes.endingStyle] = \"endingStyle\";\n /**\n * Present when the dialog is nested within another dialog.\n */\n DialogPopupDataAttributes[\"nested\"] = \"data-nested\";\n /**\n * Present when the dialog has other open dialogs nested within it.\n */\n DialogPopupDataAttributes[\"nestedDialogOpen\"] = \"data-nested-dialog-open\";\n return DialogPopupDataAttributes;\n}({});","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const DialogPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DialogPortalContext.displayName = \"DialogPortalContext\";\nexport function useDialogPortalContext() {\n const value = React.useContext(DialogPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Dialog.Portal> is missing.' : _formatErrorMessage(26));\n }\n return value;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingFocusManager } from \"../../floating-ui-react/index.js\";\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { popupStateMapping as baseMapping } from \"../../utils/popupStateMapping.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\nimport { DialogPopupCssVars } from \"./DialogPopupCssVars.js\";\nimport { DialogPopupDataAttributes } from \"./DialogPopupDataAttributes.js\";\nimport { useDialogPortalContext } from \"../portal/DialogPortalContext.js\";\nimport { useOpenChangeComplete } from \"../../utils/useOpenChangeComplete.js\";\nimport { COMPOSITE_KEYS } from \"../../composite/composite.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...baseMapping,\n ...transitionStatusMapping,\n nestedDialogOpen(value) {\n return value ? {\n [DialogPopupDataAttributes.nestedDialogOpen]: ''\n } : null;\n }\n};\n\n/**\n * A container for the dialog contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogPopup = /*#__PURE__*/React.forwardRef(function DialogPopup(componentProps, forwardedRef) {\n const {\n className,\n finalFocus,\n initialFocus,\n render,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useDialogRootContext();\n const descriptionElementId = store.useState('descriptionElementId');\n const disablePointerDismissal = store.useState('disablePointerDismissal');\n const floatingRootContext = store.useState('floatingRootContext');\n const rootPopupProps = store.useState('popupProps');\n const modal = store.useState('modal');\n const mounted = store.useState('mounted');\n const nested = store.useState('nested');\n const nestedOpenDialogCount = store.useState('nestedOpenDialogCount');\n const open = store.useState('open');\n const openMethod = store.useState('openMethod');\n const titleElementId = store.useState('titleElementId');\n const transitionStatus = store.useState('transitionStatus');\n const role = store.useState('role');\n useDialogPortalContext();\n useOpenChangeComplete({\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete?.(true);\n }\n }\n });\n\n // Default initial focus logic:\n // If opened by touch, focus the popup element to prevent the virtual keyboard from opening\n // (this is required for Android specifically as iOS handles this automatically).\n function defaultInitialFocus(interactionType) {\n if (interactionType === 'touch') {\n return store.context.popupRef.current;\n }\n return true;\n }\n const resolvedInitialFocus = initialFocus === undefined ? defaultInitialFocus : initialFocus;\n const nestedDialogOpen = nestedOpenDialogCount > 0;\n const state = React.useMemo(() => ({\n open,\n nested,\n transitionStatus,\n nestedDialogOpen\n }), [open, nested, transitionStatus, nestedDialogOpen]);\n const element = useRenderElement('div', componentProps, {\n state,\n props: [rootPopupProps, {\n 'aria-labelledby': titleElementId ?? undefined,\n 'aria-describedby': descriptionElementId ?? undefined,\n role,\n tabIndex: -1,\n hidden: !mounted,\n onKeyDown(event) {\n if (COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n style: {\n [DialogPopupCssVars.nestedDialogs]: nestedOpenDialogCount\n }\n }, elementProps],\n ref: [forwardedRef, store.context.popupRef, store.useStateSetter('popupElement')],\n stateAttributesMapping\n });\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n openInteractionType: openMethod,\n disabled: !mounted,\n closeOnFocusOut: !disablePointerDismissal,\n initialFocus: resolvedInitialFocus,\n returnFocus: finalFocus,\n modal: modal !== false,\n restoreFocus: \"popup\",\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogPopup.displayName = \"DialogPopup\";","import { isReactVersionAtLeast } from \"./reactVersion.js\";\nexport function inertValue(value) {\n if (isReactVersionAtLeast(19)) {\n return value;\n }\n // compatibility with React < 19\n return value ? 'true' : undefined;\n}","import * as React from 'react';\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const InternalBackdrop = /*#__PURE__*/React.forwardRef(function InternalBackdrop(props, ref) {\n const {\n cutout,\n ...otherProps\n } = props;\n let clipPath;\n if (cutout) {\n const rect = cutout?.getBoundingClientRect();\n clipPath = `polygon(\n 0% 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%,\n 0% 0%,\n ${rect.left}px ${rect.top}px,\n ${rect.left}px ${rect.bottom}px,\n ${rect.right}px ${rect.bottom}px,\n ${rect.right}px ${rect.top}px,\n ${rect.left}px ${rect.top}px\n )`;\n }\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n role: \"presentation\"\n // Ensures Floating UI's outside press detection runs, as it considers\n // it an element that existed when the popup rendered.\n ,\n \"data-base-ui-inert\": \"\",\n ...otherProps,\n style: {\n position: 'fixed',\n inset: 0,\n userSelect: 'none',\n WebkitUserSelect: 'none',\n clipPath\n }\n });\n});\nif (process.env.NODE_ENV !== \"production\") InternalBackdrop.displayName = \"InternalBackdrop\";","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui-components/utils/inertValue';\nimport { FloatingPortal } from \"../../floating-ui-react/index.js\";\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { DialogPortalContext } from \"./DialogPortalContext.js\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.js\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const DialogPortal = /*#__PURE__*/React.forwardRef(function DialogPortal(props, forwardedRef) {\n const {\n keepMounted = false,\n ...portalProps\n } = props;\n const {\n store\n } = useDialogRootContext();\n const mounted = store.useState('mounted');\n const modal = store.useState('modal');\n const shouldRender = mounted || keepMounted;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(DialogPortalContext.Provider, {\n value: keepMounted,\n children: /*#__PURE__*/_jsxs(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps,\n children: [mounted && modal === true && /*#__PURE__*/_jsx(InternalBackdrop, {\n ref: store.context.internalBackdropRef,\n inert: inertValue(!open)\n }), props.children]\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogPortal.displayName = \"DialogPortal\";","'use client';\n\nimport { isOverflowElement } from '@floating-ui/utils/dom';\nimport { isIOS, isWebKit } from \"./detectBrowser.js\";\nimport { ownerDocument, ownerWindow } from \"./owner.js\";\nimport { useIsoLayoutEffect } from \"./useIsoLayoutEffect.js\";\nimport { Timeout } from \"./useTimeout.js\";\nimport { AnimationFrame } from \"./useAnimationFrame.js\";\nimport { NOOP } from \"./empty.js\";\n\n/* eslint-disable lines-between-class-members */\n\nlet originalHtmlStyles = {};\nlet originalBodyStyles = {};\nlet originalHtmlScrollBehavior = '';\nfunction hasInsetScrollbars(referenceElement) {\n if (typeof document === 'undefined') {\n return false;\n }\n const doc = ownerDocument(referenceElement);\n const win = ownerWindow(doc);\n return win.innerWidth - doc.documentElement.clientWidth > 0;\n}\nfunction preventScrollOverlayScrollbars(referenceElement) {\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const body = doc.body;\n\n // If an `overflow` style is present on <html>, we need to lock it, because a lock on <body>\n // won't have any effect.\n // But if <body> has an `overflow` style (like `overflow-x: hidden`), we need to lock it\n // instead, as sticky elements shift otherwise.\n const elementToLock = isOverflowElement(html) ? html : body;\n const originalOverflow = elementToLock.style.overflow;\n elementToLock.style.overflow = 'hidden';\n return () => {\n elementToLock.style.overflow = originalOverflow;\n };\n}\nfunction preventScrollInsetScrollbars(referenceElement) {\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const body = doc.body;\n const win = ownerWindow(html);\n let scrollTop = 0;\n let scrollLeft = 0;\n const resizeFrame = AnimationFrame.create();\n\n // Handle `scrollbar-gutter` in Chrome when there is no scrollable content.\n const supportsStableScrollbarGutter = typeof CSS !== 'undefined' && CSS.supports?.('scrollbar-gutter', 'stable');\n\n // Pinch-zoom in Safari causes a shift. Just don't lock scroll if there's any pinch-zoom.\n if (isWebKit && (win.visualViewport?.scale ?? 1) !== 1) {\n return () => {};\n }\n function lockScroll() {\n /* DOM reads: */\n\n const htmlStyles = win.getComputedStyle(html);\n const bodyStyles = win.getComputedStyle(body);\n const htmlScrollbarGutterValue = htmlStyles.scrollbarGutter || '';\n const hasBothEdges = htmlScrollbarGutterValue.includes('both-edges');\n const scrollbarGutterValue = hasBothEdges ? 'stable both-edges' : 'stable';\n scrollTop = html.scrollTop;\n scrollLeft = html.scrollLeft;\n originalHtmlStyles = {\n scrollbarGutter: html.style.scrollbarGutter,\n overflowY: html.style.overflowY,\n overflowX: html.style.overflowX\n };\n originalHtmlScrollBehavior = html.style.scrollBehavior;\n originalBodyStyles = {\n position: body.style.position,\n height: body.style.height,\n width: body.style.width,\n boxSizing: body.style.boxSizing,\n overflowY: body.style.overflowY,\n overflowX: body.style.overflowX,\n scrollBehavior: body.style.scrollBehavior\n };\n const isScrollableY = html.scrollHeight > html.clientHeight;\n const isScrollableX = html.scrollWidth > html.clientWidth;\n const hasConstantOverflowY = htmlStyles.overflowY === 'scroll' || bodyStyles.overflowY === 'scroll';\n const hasConstantOverflowX = htmlStyles.overflowX === 'scroll' || bodyStyles.overflowX === 'scroll';\n\n // Values can be negative in Firefox\n const scrollbarWidth = Math.max(0, win.innerWidth - html.clientWidth);\n const scrollbarHeight = Math.max(0, win.innerHeight - html.clientHeight);\n\n // Avoid shift due to the default <body> margin. This does cause elements to be clipped\n // with whitespace. Warn if <body> has margins?\n const marginY = parseFloat(bodyStyles.marginTop) + parseFloat(bodyStyles.marginBottom);\n const marginX = parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight);\n const elementToLock = isOverflowElement(html) ? html : body;\n\n /*\n * DOM writes:\n * Do not read the DOM past this point!\n */\n\n if (supportsStableScrollbarGutter) {\n html.style.scrollbarGutter = scrollbarGutterValue;\n elementToLock.style.overflowY = 'hidden';\n elementToLock.style.overflowX = 'hidden';\n return;\n }\n Object.assign(html.style, {\n scrollbarGutter: scrollbarGutterValue,\n overflowY: 'hidden',\n overflowX: 'hidden'\n });\n if (isScrollableY || hasConstantOverflowY) {\n html.style.overflowY = 'scroll';\n }\n if (isScrollableX || hasConstantOverflowX) {\n html.style.overflowX = 'scroll';\n }\n Object.assign(body.style, {\n position: 'relative',\n height: marginY || scrollbarHeight ? `calc(100dvh - ${marginY + scrollbarHeight}px)` : '100dvh',\n width: marginX || scrollbarWidth ? `calc(100vw - ${marginX + scrollbarWidth}px)` : '100vw',\n boxSizing: 'border-box',\n overflow: 'hidden',\n scrollBehavior: 'unset'\n });\n body.scrollTop = scrollTop;\n body.scrollLeft = scrollLeft;\n html.setAttribute('data-base-ui-scroll-locked', '');\n html.style.scrollBehavior = 'unset';\n }\n function cleanup() {\n Object.assign(html.style, originalHtmlStyles);\n Object.assign(body.style, originalBodyStyles);\n if (!supportsStableScrollbarGutter) {\n html.scrollTop = scrollTop;\n html.scrollLeft = scrollLeft;\n html.removeAttribute('data-base-ui-scroll-locked');\n html.style.scrollBehavior = originalHtmlScrollBehavior;\n }\n }\n function handleResize() {\n cleanup();\n resizeFrame.request(lockScroll);\n }\n lockScroll();\n win.addEventListener('resize', handleResize);\n return () => {\n resizeFrame.cancel();\n cleanup();\n // Sometimes this cleanup can be run after test teardown\n // because it is called in a `setTimeout(fn, 0)`,\n // in which case `removeEventListener` wouldn't be available,\n // so we check for it to avoid test failures.\n if (typeof win.removeEventListener === 'function') {\n win.removeEventListener('resize', handleResize);\n }\n };\n}\nclass ScrollLocker {\n lockCount = 0;\n restore = null;\n timeoutLock = Timeout.create();\n timeoutUnlock = Timeout.create();\n acquire(referenceElement) {\n this.lockCount += 1;\n if (this.lockCount === 1 && this.restore === null) {\n this.timeoutLock.start(0, () => this.lock(referenceElement));\n }\n return this.release;\n }\n release = () => {\n this.lockCount -= 1;\n if (this.lockCount === 0 && this.restore) {\n this.timeoutUnlock.start(0, this.unlock);\n }\n };\n unlock = () => {\n if (this.lockCount === 0 && this.restore) {\n this.restore?.();\n this.restore = null;\n }\n };\n lock(referenceElement) {\n if (this.lockCount === 0 || this.restore !== null) {\n return;\n }\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const htmlOverflowY = ownerWindow(html).getComputedStyle(html).overflowY;\n\n // If the site author already hid overflow on <html>, respect it and bail out.\n if (htmlOverflowY === 'hidden' || htmlOverflowY === 'clip') {\n this.restore = NOOP;\n return;\n }\n const hasOverlayScrollbars = isIOS || !hasInsetScrollbars(referenceElement);\n\n // On iOS, scroll locking does not work if the navbar is collapsed. Due to numerous\n // side effects and bugs that arise on iOS, it must be researched extensively before\n // being enabled to ensure it doesn't cause the following issues:\n // - Textboxes must scroll into view when focused, nor cause a glitchy scroll animation.\n // - The navbar must not force itself into view and cause layout shift.\n // - Scroll containers must not flicker upon closing a popup when it has an exit animation.\n this.restore = hasOverlayScrollbars ? preventScrollOverlayScrollbars(referenceElement) : preventScrollInsetScrollbars(referenceElement);\n }\n}\nconst SCROLL_LOCKER = new ScrollLocker();\n\n/**\n * Locks the scroll of the document when enabled.\n *\n * @param enabled - Whether to enable the scroll lock.\n * @param referenceElement - Element to use as a reference for lock calculations.\n */\nexport function useScrollLock(enabled = true, referenceElement = null) {\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return undefined;\n }\n return SCROLL_LOCKER.acquire(referenceElement);\n }, [enabled, referenceElement]);\n}","import * as React from 'react';\n/**\n * Provides a cross-browser way to determine the type of the pointer used to click.\n * Safari and Firefox do not provide the PointerEvent to the click handler (they use MouseEvent) yet.\n * Additionally, this implementation detects if the click was triggered by the keyboard.\n *\n * @param handler The function to be called when the button is clicked. The first parameter is the original event and the second parameter is the pointer type.\n */\nexport function useEnhancedClickHandler(handler) {\n const lastClickInteractionTypeRef = React.useRef('');\n const handlePointerDown = React.useCallback(event => {\n if (event.defaultPrevented) {\n return;\n }\n lastClickInteractionTypeRef.current = event.pointerType;\n handler(event, event.pointerType);\n }, [handler]);\n const handleClick = React.useCallback(event => {\n // event.detail has the number of clicks performed on the element. 0 means it was triggered by the keyboard.\n if (event.detail === 0) {\n handler(event, 'keyboard');\n return;\n }\n if ('pointerType' in event) {\n // Chrome and Edge correctly use PointerEvent\n handler(event, event.pointerType);\n }\n handler(event, lastClickInteractionTypeRef.current);\n lastClickInteractionTypeRef.current = '';\n }, [handler]);\n return {\n onClick: handleClick,\n onPointerDown: handlePointerDown\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useEnhancedClickHandler } from '@base-ui-components/utils/useEnhancedClickHandler';\n\n/**\n * Determines the interaction type (keyboard, mouse, touch, etc.) that opened the component.\n *\n * @param open The open state of the component.\n */\nexport function useOpenInteractionType(open) {\n const [openMethod, setOpenMethod] = React.useState(null);\n const handleTriggerClick = useStableCallback((_, interactionType) => {\n if (!open) {\n setOpenMethod(interactionType);\n }\n });\n const reset = React.useCallback(() => {\n setOpenMethod(null);\n }, []);\n const {\n onClick,\n onPointerDown\n } = useEnhancedClickHandler(handleTriggerClick);\n return React.useMemo(() => ({\n openMethod,\n reset,\n triggerProps: {\n onClick,\n onPointerDown\n }\n }), [openMethod, reset, onClick, onPointerDown]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useScrollLock } from '@base-ui-components/utils/useScrollLock';\nimport { useDismiss, useInteractions, useRole, useSyncedFloatingRootContext } from \"../../floating-ui-react/index.js\";\nimport { contains, getTarget } from \"../../floating-ui-react/utils.js\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useImplicitActiveTrigger, useOpenStateTransitions } from \"../../utils/popups/index.js\";\nexport function useDialogRoot(params) {\n const {\n store,\n parentContext,\n actionsRef\n } = params;\n const open = store.useState('open');\n const disablePointerDismissal = store.useState('disablePointerDismissal');\n const modal = store.useState('modal');\n const popupElement = store.useState('popupElement');\n const {\n openMethod,\n triggerProps,\n reset: resetOpenInteractionType\n } = useOpenInteractionType(open);\n useImplicitActiveTrigger(store);\n const {\n forceUnmount\n } = useOpenStateTransitions(open, store, () => {\n resetOpenInteractionType();\n });\n const createDialogEventDetails = useStableCallback(reason => {\n const details = createChangeEventDetails(reason);\n details.preventUnmountOnClose = () => {\n store.set('preventUnmountingOnClose', true);\n };\n return details;\n });\n const handleImperativeClose = React.useCallback(() => {\n store.setOpen(false, createDialogEventDetails(REASONS.imperativeAction));\n }, [store, createDialogEventDetails]);\n React.useImperativeHandle(actionsRef, () => ({\n unmount: forceUnmount,\n close: handleImperativeClose\n }), [forceUnmount, handleImperativeClose]);\n const floatingRootContext = useSyncedFloatingRootContext({\n popupStore: store,\n onOpenChange: store.setOpen,\n treatPopupAsFloatingElement: true,\n noEmit: true\n });\n const [ownNestedOpenDialogs, setOwnNestedOpenDialogs] = React.useState(0);\n const isTopmost = ownNestedOpenDialogs === 0;\n const role = useRole(floatingRootContext);\n const dismiss = useDismiss(floatingRootContext, {\n outsidePressEvent() {\n if (store.context.internalBackdropRef.current || store.context.backdropRef.current) {\n return 'intentional';\n }\n // Ensure `aria-hidden` on outside elements is removed immediately\n // on outside press when trapping focus.\n return {\n mouse: modal === 'trap-focus' ? 'sloppy' : 'intentional',\n touch: 'sloppy'\n };\n },\n outsidePress(event) {\n // For mouse events, only accept left button (button 0)\n // For touch events, a single touch is equivalent to left button\n if ('button' in event && event.button !== 0) {\n return false;\n }\n if ('touches' in event && event.touches.length !== 1) {\n return false;\n }\n const target = getTarget(event);\n if (isTopmost && !disablePointerDismissal) {\n const eventTarget = target;\n // Only close if the click occurred on the dialog's owning backdrop.\n // This supports multiple modal dialogs that aren't nested in the React tree:\n // https://github.com/mui/base-ui/issues/1320\n if (modal) {\n return store.context.internalBackdropRef.current || store.context.backdropRef.current ? store.context.internalBackdropRef.current === eventTarget || store.context.backdropRef.current === eventTarget || contains(eventTarget, popupElement) && !eventTarget?.hasAttribute('data-base-ui-portal') : true;\n }\n return true;\n }\n return false;\n },\n escapeKey: isTopmost\n });\n useScrollLock(open && modal === true, popupElement);\n const {\n getReferenceProps,\n getFloatingProps,\n getTriggerProps\n } = useInteractions([role, dismiss]);\n\n // Listen for nested open/close events on this store to maintain the count\n store.useContextCallback('onNestedDialogOpen', ownChildrenCount => {\n setOwnNestedOpenDialogs(ownChildrenCount + 1);\n });\n store.useContextCallback('onNestedDialogClose', () => {\n setOwnNestedOpenDialogs(0);\n });\n\n // Notify parent of our open/close state using parent callbacks, if any\n React.useEffect(() => {\n if (parentContext?.onNestedDialogOpen && open) {\n parentContext.onNestedDialogOpen(ownNestedOpenDialogs);\n }\n if (parentContext?.onNestedDialogClose && !open) {\n parentContext.onNestedDialogClose();\n }\n return () => {\n if (parentContext?.onNestedDialogClose && open) {\n parentContext.onNestedDialogClose();\n }\n };\n }, [open, parentContext, ownNestedOpenDialogs]);\n const activeTriggerProps = React.useMemo(() => getReferenceProps(triggerProps), [getReferenceProps, triggerProps]);\n const inactiveTriggerProps = React.useMemo(() => getTriggerProps(triggerProps), [getTriggerProps, triggerProps]);\n const popupProps = React.useMemo(() => getFloatingProps(), [getFloatingProps]);\n store.useSyncedValues({\n openMethod,\n activeTriggerProps,\n inactiveTriggerProps,\n popupProps,\n floatingRootContext,\n nestedOpenDialogCount: ownNestedOpenDialogs\n });\n}","import * as React from 'react';\nimport { createSelector, ReactStore } from '@base-ui-components/utils/store';\nimport { createInitialPopupStoreState, popupStoreSelectors, PopupTriggerMap } from \"../../utils/popups/index.js\";\nconst selectors = {\n ...popupStoreSelectors,\n modal: createSelector(state => state.modal),\n nested: createSelector(state => state.nested),\n nestedOpenDialogCount: createSelector(state => state.nestedOpenDialogCount),\n disablePointerDismissal: createSelector(state => state.disablePointerDismissal),\n openMethod: createSelector(state => state.openMethod),\n descriptionElementId: createSelector(state => state.descriptionElementId),\n titleElementId: createSelector(state => state.titleElementId),\n viewportElement: createSelector(state => state.viewportElement),\n role: createSelector(state => state.role)\n};\nexport class DialogStore extends ReactStore {\n constructor(initialState) {\n super(createInitialState(initialState), {\n popupRef: /*#__PURE__*/React.createRef(),\n backdropRef: /*#__PURE__*/React.createRef(),\n internalBackdropRef: /*#__PURE__*/React.createRef(),\n triggerElements: new PopupTriggerMap(),\n onOpenChange: undefined,\n onOpenChangeComplete: undefined\n }, selectors);\n }\n setOpen = (nextOpen, eventDetails) => {\n eventDetails.preventUnmountOnClose = () => {\n this.set('preventUnmountingOnClose', true);\n };\n if (!nextOpen && eventDetails.trigger == null && this.state.activeTriggerId != null) {\n // When closing the dialog, pass the old trigger to the onOpenChange event\n // so it's not reset too early (potentially causing focus issues in controlled scenarios).\n eventDetails.trigger = this.state.activeTriggerElement ?? undefined;\n }\n this.context.onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n const details = {\n open: nextOpen,\n nativeEvent: eventDetails.event,\n reason: eventDetails.reason,\n nested: this.state.nested\n };\n this.state.floatingRootContext.context.events?.emit('openchange', details);\n const updatedState = {\n open: nextOpen\n };\n\n // If a popup is closing, the `trigger` may be null.\n // We want to keep the previous value so that exit animations are played and focus is returned correctly.\n const newTriggerId = eventDetails.trigger?.id ?? null;\n if (newTriggerId || nextOpen) {\n updatedState.activeTriggerId = newTriggerId;\n updatedState.activeTriggerElement = eventDetails.trigger ?? null;\n }\n this.update(updatedState);\n };\n}\nfunction createInitialState(initialState = {}) {\n return {\n ...createInitialPopupStoreState(),\n modal: true,\n disablePointerDismissal: false,\n popupElement: null,\n viewportElement: null,\n descriptionElementId: undefined,\n titleElementId: undefined,\n openMethod: null,\n nested: false,\n nestedOpenDialogCount: 0,\n role: 'dialog',\n ...initialState\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useRefWithInit } from '@base-ui-components/utils/useRefWithInit';\nimport { useDialogRoot } from \"./useDialogRoot.js\";\nimport { DialogRootContext, useDialogRootContext } from \"./DialogRootContext.js\";\nimport { DialogStore } from \"../store/DialogStore.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Groups all parts of the dialog.\n * Doesn’t render its own HTML element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport function DialogRoot(props) {\n const {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n onOpenChangeComplete,\n disablePointerDismissal = false,\n modal = true,\n actionsRef,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null\n } = props;\n const parentDialogRootContext = useDialogRootContext(true);\n const nested = Boolean(parentDialogRootContext);\n const store = useRefWithInit(() => {\n return handle?.store ?? new DialogStore({\n open: openProp ?? defaultOpen,\n activeTriggerId: triggerIdProp !== undefined ? triggerIdProp : defaultTriggerIdProp,\n modal,\n disablePointerDismissal,\n nested\n });\n }).current;\n store.useControlledProp('open', openProp, defaultOpen);\n store.useControlledProp('activeTriggerId', triggerIdProp, defaultTriggerIdProp);\n store.useSyncedValues({\n disablePointerDismissal,\n nested,\n modal\n });\n store.useContextCallback('onOpenChange', onOpenChange);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n const payload = store.useState('payload');\n useDialogRoot({\n store,\n actionsRef,\n parentContext: parentDialogRootContext?.store.context,\n onOpenChange,\n triggerIdProp\n });\n const contextValue = React.useMemo(() => ({\n store\n }), [store]);\n return /*#__PURE__*/_jsx(DialogRootContext.Provider, {\n value: contextValue,\n children: typeof children === 'function' ? children({\n payload\n }) : children\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\n/**\n * A heading that labels the dialog.\n * Renders an `<h2>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogTitle = /*#__PURE__*/React.forwardRef(function DialogTitle(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useDialogRootContext();\n const id = useBaseUiId(idProp);\n store.useSyncedValueWithCleanup('titleElementId', id);\n return useRenderElement('h2', componentProps, {\n ref: forwardedRef,\n props: [{\n id\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogTitle.displayName = \"DialogTitle\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useButton } from \"../../use-button/useButton.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { triggerOpenStateMapping } from \"../../utils/popupStateMapping.js\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../utils/constants.js\";\nimport { useTriggerDataForwarding } from \"../../utils/popups/index.js\";\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { useClick, useInteractions } from \"../../floating-ui-react/index.js\";\n\n/**\n * A button that opens the dialog.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogTrigger = /*#__PURE__*/React.forwardRef(function DialogTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled = false,\n nativeButton = true,\n id: idProp,\n payload,\n handle,\n ...elementProps\n } = componentProps;\n const dialogRootContext = useDialogRootContext(true);\n const store = handle?.store ?? dialogRootContext?.store;\n if (!store) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.' : _formatErrorMessage(79));\n }\n const thisTriggerId = useBaseUiId(idProp);\n const floatingContext = store.useState('floatingRootContext');\n const isOpenedByThisTrigger = store.useState('isOpenedByTrigger', thisTriggerId);\n const [triggerElement, setTriggerElement] = React.useState(null);\n const {\n registerTrigger,\n isMountedByThisTrigger\n } = useTriggerDataForwarding(thisTriggerId, triggerElement, store, {\n payload\n });\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const click = useClick(floatingContext, {\n enabled: floatingContext != null\n });\n const localInteractionProps = useInteractions([click]);\n const state = React.useMemo(() => ({\n disabled,\n open: isOpenedByThisTrigger\n }), [disabled, isOpenedByThisTrigger]);\n const rootTriggerProps = store.useState('triggerProps', isMountedByThisTrigger);\n return useRenderElement('button', componentProps, {\n state,\n ref: [buttonRef, forwardedRef, registerTrigger, setTriggerElement],\n props: [localInteractionProps.getReferenceProps(), rootTriggerProps, {\n [CLICK_TRIGGER_IDENTIFIER]: '',\n id: thisTriggerId\n }, elementProps, getButtonProps],\n stateAttributesMapping: triggerOpenStateMapping\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogTrigger.displayName = \"DialogTrigger\";","import React, {\n forwardRef,\n createContext,\n useContext,\n\n} from \"react\";\nimport {\n Dialog,\n} from \"@base-ui-components/react/dialog\";\nimport styles from \"./index.module.css\";\n\n\n// ============================================================================\n// Types\n// ============================================================================\n\ntype DialogVariant = \"default\" | \"centered\" \ntype DialogSize = \"sm\" | \"md\" | \"lg\";\n\ninterface ALSDialogContextValue {\n variant: DialogVariant;\n size: DialogSize;\n}\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst ALSDialogContext = createContext<ALSDialogContextValue>({\n variant: \"default\",\n size: \"md\",\n});\n\nconst useALSDialogContext = () => useContext(ALSDialogContext);\n\n// ============================================================================\n// Root Component\n// ============================================================================\n\ninterface ALSDialogRootProps {\n /** Whether the dialog is open (controlled) */\n open?: boolean;\n /** Default open state (uncontrolled) */\n defaultOpen?: boolean;\n /** Callback when open state changes */\n onOpenChange?: (open: boolean) => void;\n /** Whether the dialog is modal (blocks interaction with the rest of the page) */\n modal?: boolean;\n /** Visual variant of the dialog */\n variant?: DialogVariant;\n /** Size variant */\n size?: DialogSize;\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSDialogRoot = forwardRef<HTMLDivElement, ALSDialogRootProps>(\n (\n {\n open,\n defaultOpen = false,\n onOpenChange,\n modal = true,\n variant = \"default\",\n size = \"md\",\n\n children,\n },\n\n ) => {\n return (\n <ALSDialogContext.Provider value={{ variant, size }}>\n <Dialog.Root\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n modal={modal}\n >\n {children}\n </Dialog.Root>\n </ALSDialogContext.Provider>\n );\n }\n);\n\nALSDialogRoot.displayName = \"ALSDialog.Root\";\n\n// ============================================================================\n// Trigger Component\n// ============================================================================\n\ninterface ALSDialogTriggerProps {\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n /** Whether to render as child element */\n asChild?: boolean;\n}\n\nconst ALSDialogTrigger = forwardRef<HTMLButtonElement, ALSDialogTriggerProps>(\n ({ className, children }, ref) => {\n const triggerClassName = [styles.trigger, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Dialog.Trigger\n ref={ref}\n className={triggerClassName}\n nativeButton={false}\n render={(props) =>\n React.cloneElement(children as React.ReactElement, props)\n }\n />\n );\n }\n);\n\nALSDialogTrigger.displayName = \"ALSDialog.Trigger\";\n\n// ============================================================================\n// Backdrop Component\n// ============================================================================\n\ninterface ALSDialogBackdropProps {\n /** Additional class name */\n className?: string;\n /** Whether to keep the backdrop mounted when closed */\n keepMounted?: boolean;\n}\n\nconst ALSDialogBackdrop = forwardRef<HTMLDivElement, ALSDialogBackdropProps>(\n ({ className }, ref) => {\n const backdropClassName = [styles.backdrop, className]\n .filter(Boolean)\n .join(\" \");\n\n return <Dialog.Backdrop ref={ref} className={backdropClassName} />;\n }\n);\n\nALSDialogBackdrop.displayName = \"ALSDialog.Backdrop\";\n\n// ============================================================================\n// Portal Component\n// ============================================================================\n\ninterface ALSDialogPortalProps {\n /** Container element to portal into */\n container?: HTMLElement | null;\n /** Whether to keep the portal mounted when closed */\n keepMounted?: boolean;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSDialogPortal: React.FC<ALSDialogPortalProps> = ({\n container,\n keepMounted = false,\n children,\n}) => {\n return (\n <Dialog.Portal container={container} keepMounted={keepMounted}>\n {children}\n </Dialog.Portal>\n );\n};\n\nALSDialogPortal.displayName = \"ALSDialog.Portal\";\n\n// ============================================================================\n// Popup Component\n// ============================================================================\n\ninterface ALSDialogPopupProps {\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSDialogPopup = forwardRef<HTMLDivElement, ALSDialogPopupProps>(\n ({ className, children }, ref) => {\n const { variant, size } = useALSDialogContext();\n\n const popupClassName = [\n styles.popup,\n styles[`popup--${variant}`],\n styles[`popup--${size}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Dialog.Popup ref={ref} className={popupClassName}>\n {children}\n </Dialog.Popup>\n );\n }\n);\n\nALSDialogPopup.displayName = \"ALSDialog.Popup\";\n\n// ============================================================================\n// Title Component\n// ============================================================================\n\ninterface ALSDialogTitleProps {\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSDialogTitle = forwardRef<HTMLHeadingElement, ALSDialogTitleProps>(\n ({ className, children }, ref) => {\n const titleClassName = [styles.title, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Dialog.Title ref={ref} className={titleClassName}>\n {children}\n </Dialog.Title>\n );\n }\n);\n\nALSDialogTitle.displayName = \"ALSDialog.Title\";\n\n// ============================================================================\n// Description Component\n// ============================================================================\n\ninterface ALSDialogDescriptionProps {\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSDialogDescription = forwardRef<\n HTMLParagraphElement,\n ALSDialogDescriptionProps\n>(({ className, children }, ref) => {\n const descriptionClassName = [styles.description, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Dialog.Description ref={ref} className={descriptionClassName}>\n {children}\n </Dialog.Description>\n );\n});\n\nALSDialogDescription.displayName = \"ALSDialog.Description\";\n\n// ============================================================================\n// Close Component\n// ============================================================================\n\ninterface ALSDialogCloseProps {\n /** Additional class name */\n className?: string;\n /** Children (optional, defaults to X icon) */\n children?: React.ReactNode;\n}\n\nconst ALSDialogClose = forwardRef<HTMLButtonElement, ALSDialogCloseProps>(\n ({ className, children }, ref) => {\n const closeClassName = [styles.close, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Dialog.Close ref={ref} className={closeClassName}>\n {children || <CloseIcon />}\n </Dialog.Close>\n );\n }\n);\n\nALSDialogClose.displayName = \"ALSDialog.Close\";\n\n// ============================================================================\n// Close Icon\n// ============================================================================\n\nconst CloseIcon: React.FC = () => (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={styles.closeIcon}\n >\n <path\n d=\"M15 5L5 15M5 5L15 15\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\n// ============================================================================\n// Compound Component Export\n// ============================================================================\n\nexport const ALSDialog = {\n Root: ALSDialogRoot,\n Trigger: ALSDialogTrigger,\n Backdrop: ALSDialogBackdrop,\n Portal: ALSDialogPortal,\n Popup: ALSDialogPopup,\n Title: ALSDialogTitle,\n Description: ALSDialogDescription,\n Close: ALSDialogClose,\n};\n\nexport type {\n ALSDialogRootProps,\n ALSDialogTriggerProps,\n ALSDialogBackdropProps,\n ALSDialogPortalProps,\n ALSDialogPopupProps,\n ALSDialogTitleProps,\n ALSDialogDescriptionProps,\n ALSDialogCloseProps,\n DialogVariant,\n DialogSize,\n};\n","import styles from './index.module.css';\n\nexport interface ALSFieldProps {\n // TODO: Define props\n}\n\nexport function ALSField(props: ALSFieldProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Field */}\n </div>\n );\n}\n\nexport default ALSField;\n","import styles from './index.module.css';\n\nexport interface ALSFieldsetProps {\n // TODO: Define props\n}\n\nexport function ALSFieldset(props: ALSFieldsetProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Fieldset */}\n </div>\n );\n}\n\nexport default ALSFieldset;\n","import styles from './index.module.css';\n\nexport interface ALSFormProps {\n // TODO: Define props\n}\n\nexport function ALSForm(props: ALSFormProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Form */}\n </div>\n );\n}\n\nexport default ALSForm;\n","export let FieldControlDataAttributes = /*#__PURE__*/function (FieldControlDataAttributes) {\n /**\n * Present when the field is disabled.\n */\n FieldControlDataAttributes[\"disabled\"] = \"data-disabled\";\n /**\n * Present when the field is in valid state.\n */\n FieldControlDataAttributes[\"valid\"] = \"data-valid\";\n /**\n * Present when the field is in invalid state.\n */\n FieldControlDataAttributes[\"invalid\"] = \"data-invalid\";\n /**\n * Present when the field has been touched.\n */\n FieldControlDataAttributes[\"touched\"] = \"data-touched\";\n /**\n * Present when the field's value has changed.\n */\n FieldControlDataAttributes[\"dirty\"] = \"data-dirty\";\n /**\n * Present when the field is filled.\n */\n FieldControlDataAttributes[\"filled\"] = \"data-filled\";\n /**\n * Present when the field control is focused.\n */\n FieldControlDataAttributes[\"focused\"] = \"data-focused\";\n return FieldControlDataAttributes;\n}({});","import { FieldControlDataAttributes } from \"../control/FieldControlDataAttributes.js\";\nexport const DEFAULT_VALIDITY_STATE = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: null,\n valueMissing: false\n};\nexport const fieldValidityMapping = {\n valid(value) {\n if (value === null) {\n return null;\n }\n if (value) {\n return {\n [FieldControlDataAttributes.valid]: ''\n };\n }\n return {\n [FieldControlDataAttributes.invalid]: ''\n };\n }\n};","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { NOOP } from \"../../utils/noop.js\";\nimport { DEFAULT_VALIDITY_STATE } from \"../utils/constants.js\";\nimport { EMPTY_OBJECT } from \"../../utils/constants.js\";\nexport const FieldRootContext = /*#__PURE__*/React.createContext({\n invalid: undefined,\n name: undefined,\n validityData: {\n state: DEFAULT_VALIDITY_STATE,\n errors: [],\n error: '',\n value: '',\n initialValue: null\n },\n setValidityData: NOOP,\n disabled: undefined,\n touched: false,\n setTouched: NOOP,\n dirty: false,\n setDirty: NOOP,\n filled: false,\n setFilled: NOOP,\n focused: false,\n setFocused: NOOP,\n validate: () => null,\n validationMode: 'onSubmit',\n validationDebounceTime: 0,\n shouldValidateOnChange: () => false,\n state: {\n disabled: false,\n valid: null,\n touched: false,\n dirty: false,\n filled: false,\n focused: false\n },\n markedDirtyRef: {\n current: false\n },\n validation: {\n getValidationProps: (props = EMPTY_OBJECT) => props,\n getInputValidationProps: (props = EMPTY_OBJECT) => props,\n inputRef: {\n current: null\n },\n commit: async () => {}\n }\n});\nif (process.env.NODE_ENV !== \"production\") FieldRootContext.displayName = \"FieldRootContext\";\nexport function useFieldRootContext(optional = true) {\n const context = React.useContext(FieldRootContext);\n if (context.setValidityData === NOOP && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.' : _formatErrorMessage(28));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { NOOP } from \"../utils/noop.js\";\nexport const FormContext = /*#__PURE__*/React.createContext({\n formRef: {\n current: {\n fields: new Map()\n }\n },\n errors: {},\n clearErrors: NOOP,\n validationMode: 'onSubmit',\n submitAttemptedRef: {\n current: false\n }\n});\nif (process.env.NODE_ENV !== \"production\") FormContext.displayName = \"FormContext\";\nexport function useFormContext() {\n return React.useContext(FormContext);\n}","'use client';\n\nimport * as React from 'react';\nimport { NOOP } from \"../utils/noop.js\";\n/**\n * A context for providing [labelable elements](https://html.spec.whatwg.org/multipage/forms.html#category-label)\\\n * with an accessible name (label) and description.\n */\nexport const LabelableContext = /*#__PURE__*/React.createContext({\n controlId: undefined,\n setControlId: NOOP,\n labelId: undefined,\n setLabelId: NOOP,\n messageIds: [],\n setMessageIds: NOOP,\n getDescriptionProps: externalProps => externalProps\n});\nif (process.env.NODE_ENV !== \"production\") LabelableContext.displayName = \"LabelableContext\";\nexport function useLabelableContext() {\n return React.useContext(LabelableContext);\n}","/**\n * Combines the field's client-side, stateful validity data with the external invalid state to\n * determine the field's true validity.\n */\nexport function getCombinedFieldValidityData(validityData, invalid) {\n return {\n ...validityData,\n state: {\n ...validityData.state,\n valid: !invalid && validityData.state.valid\n }\n };\n}","'use client';\n\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { NOOP } from \"../utils/noop.js\";\nimport { useBaseUiId } from \"../utils/useBaseUiId.js\";\nimport { useLabelableContext } from \"./LabelableContext.js\";\nexport function useLabelableId(params = {}) {\n const {\n id,\n implicit = false,\n controlRef\n } = params;\n const {\n controlId,\n setControlId\n } = useLabelableContext();\n const defaultId = useBaseUiId(id);\n useIsoLayoutEffect(() => {\n if (!implicit && !id || setControlId === NOOP) {\n return undefined;\n }\n if (implicit) {\n const elem = controlRef?.current;\n if (isElement(elem) && elem.closest('label') != null) {\n setControlId(id ?? null);\n } else {\n setControlId(controlId ?? defaultId);\n }\n } else if (id) {\n setControlId(id);\n }\n return () => {\n if (id) {\n setControlId(undefined);\n }\n };\n }, [id, controlRef, controlId, setControlId, implicit, defaultId]);\n return controlId ?? defaultId;\n}","import * as ReactDOM from 'react-dom';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { getCombinedFieldValidityData } from \"./utils/getCombinedFieldValidityData.js\";\nimport { useFormContext } from \"../form/FormContext.js\";\nimport { useFieldRootContext } from \"./root/FieldRootContext.js\";\nexport function useField(params) {\n const {\n enabled = true,\n value,\n id,\n name,\n controlRef,\n commit\n } = params;\n const {\n formRef\n } = useFormContext();\n const {\n invalid,\n markedDirtyRef,\n validityData,\n setValidityData\n } = useFieldRootContext();\n const getValue = useStableCallback(params.getValue);\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n let initialValue = value;\n if (initialValue === undefined) {\n initialValue = getValue();\n }\n if (validityData.initialValue === null && initialValue !== null) {\n setValidityData(prev => ({\n ...prev,\n initialValue\n }));\n }\n }, [enabled, setValidityData, value, validityData.initialValue, getValue]);\n useIsoLayoutEffect(() => {\n if (!enabled || !id) {\n return;\n }\n formRef.current.fields.set(id, {\n getValue,\n name,\n controlRef,\n validityData: getCombinedFieldValidityData(validityData, invalid),\n validate() {\n let nextValue = value;\n if (nextValue === undefined) {\n nextValue = getValue();\n }\n markedDirtyRef.current = true;\n // Synchronously update the validity state so the submit event can be prevented.\n ReactDOM.flushSync(() => commit(nextValue));\n }\n });\n }, [commit, controlRef, enabled, formRef, getValue, id, invalid, markedDirtyRef, name, validityData, value]);\n useIsoLayoutEffect(() => {\n const fields = formRef.current.fields;\n return () => {\n if (id) {\n fields.delete(id);\n }\n };\n }, [formRef, id]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useControlled } from '@base-ui-components/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useFieldRootContext } from \"../root/FieldRootContext.js\";\nimport { useLabelableContext } from \"../../labelable-provider/LabelableContext.js\";\nimport { useLabelableId } from \"../../labelable-provider/useLabelableId.js\";\nimport { fieldValidityMapping } from \"../utils/constants.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useField } from \"../useField.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\n/**\n * The form control to label and validate.\n * Renders an `<input>` element.\n *\n * You can omit this part and use any Base UI input component instead. For example,\n * [Input](https://base-ui.com/react/components/input), [Checkbox](https://base-ui.com/react/components/checkbox),\n * or [Select](https://base-ui.com/react/components/select), among others, will work with Field out of the box.\n *\n * Documentation: [Base UI Field](https://base-ui.com/react/components/field)\n */\nexport const FieldControl = /*#__PURE__*/React.forwardRef(function FieldControl(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n name: nameProp,\n value: valueProp,\n disabled: disabledProp = false,\n onValueChange,\n defaultValue,\n ...elementProps\n } = componentProps;\n const {\n state: fieldState,\n name: fieldName,\n disabled: fieldDisabled\n } = useFieldRootContext();\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const state = React.useMemo(() => ({\n ...fieldState,\n disabled\n }), [fieldState, disabled]);\n const {\n setTouched,\n setDirty,\n validityData,\n setFocused,\n setFilled,\n validationMode,\n validation\n } = useFieldRootContext();\n const {\n labelId\n } = useLabelableContext();\n const id = useLabelableId({\n id: idProp\n });\n useIsoLayoutEffect(() => {\n const hasExternalValue = valueProp != null;\n if (validation.inputRef.current?.value || hasExternalValue && valueProp !== '') {\n setFilled(true);\n } else if (hasExternalValue && valueProp === '') {\n setFilled(false);\n }\n }, [validation.inputRef, setFilled, valueProp]);\n const [value, setValueUnwrapped] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'FieldControl',\n state: 'value'\n });\n const isControlled = valueProp !== undefined;\n const setValue = useStableCallback((nextValue, eventDetails) => {\n onValueChange?.(nextValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setValueUnwrapped(nextValue);\n });\n useField({\n id,\n name,\n commit: validation.commit,\n value,\n getValue: () => validation.inputRef.current?.value,\n controlRef: validation.inputRef\n });\n const element = useRenderElement('input', componentProps, {\n ref: forwardedRef,\n state,\n props: [{\n id,\n disabled,\n name,\n ref: validation.inputRef,\n 'aria-labelledby': labelId,\n ...(isControlled ? {\n value\n } : {\n defaultValue\n }),\n onChange(event) {\n const inputValue = event.currentTarget.value;\n setValue(inputValue, createChangeEventDetails(REASONS.none, event.nativeEvent));\n setDirty(inputValue !== validityData.initialValue);\n setFilled(inputValue !== '');\n },\n onFocus() {\n setFocused(true);\n },\n onBlur(event) {\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(event.currentTarget.value);\n }\n },\n onKeyDown(event) {\n if (event.currentTarget.tagName === 'INPUT' && event.key === 'Enter') {\n setTouched(true);\n validation.commit(event.currentTarget.value);\n }\n }\n }, validation.getInputValidationProps(), elementProps],\n stateAttributesMapping: fieldValidityMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") FieldControl.displayName = \"FieldControl\";","'use client';\n\nimport * as React from 'react';\nimport { Field } from \"../field/index.js\";\n\n/**\n * A native input element that automatically works with [Field](https://base-ui.com/react/components/field).\n * Renders an `<input>` element.\n *\n * Documentation: [Base UI Input](https://base-ui.com/react/components/input)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Input = /*#__PURE__*/React.forwardRef(function Input(props, forwardedRef) {\n return /*#__PURE__*/_jsx(Field.Control, {\n ref: forwardedRef,\n ...props\n });\n});\nif (process.env.NODE_ENV !== \"production\") Input.displayName = \"Input\";","import React, { forwardRef } from \"react\";\nimport { Input } from \"@base-ui-components/react/input\";\nimport styles from \"./index.module.css\";\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport type InputVariant = \"outlined\" | \"filled\";\nexport type InputSize = \"sm\" | \"md\" | \"lg\";\nexport type InputStatus = \"default\" | \"success\" | \"warning\" | \"error\";\n\nexport interface ALSInputProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\"> {\n /** Visual variant of the input */\n variant?: InputVariant;\n /** Size variant */\n size?: InputSize;\n /** Status/validation state */\n status?: InputStatus;\n /** Additional class name */\n className?: string;\n /** Controlled value */\n value?: string;\n /** Default value (uncontrolled) */\n defaultValue?: string;\n /** Callback when value changes */\n onValueChange?: (\n value: string,\n eventDetails: {\n reason: \"none\";\n event: Event;\n cancel: () => void;\n allowPropagation: () => void;\n isCanceled: boolean;\n isPropagationAllowed: boolean;\n trigger: Element | undefined;\n }\n ) => void;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Whether the input is required */\n required?: boolean;\n /** Placeholder text */\n placeholder?: string;\n /** Input type */\n type?: string;\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\n/**\n * ALSInput - A styled input component based on Base UI Input\n *\n * @example\n * ```tsx\n * <ALSInput\n * variant=\"outlined\"\n * size=\"md\"\n * placeholder=\"Enter text...\"\n * onValueChange={(value) => console.log(value)}\n * />\n * ```\n */\nexport const ALSInput = forwardRef<HTMLInputElement, ALSInputProps>(\n (\n {\n variant = \"outlined\",\n size = \"md\",\n status = \"default\",\n className,\n disabled = false,\n ...props\n },\n ref\n ) => {\n const inputClassName = [\n styles.input,\n styles[`input--${variant}`],\n styles[`input--${size}`],\n styles[`input--${status}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Input\n ref={ref}\n className={inputClassName}\n disabled={disabled}\n {...props}\n />\n );\n }\n);\n\nALSInput.displayName = \"ALSInput\";\n","import styles from './index.module.css';\n\nexport interface ALSMenuProps {\n // TODO: Define props\n}\n\nexport function ALSMenu(props: ALSMenuProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Menu */}\n </div>\n );\n}\n\nexport default ALSMenu;\n","import styles from './index.module.css';\n\nexport interface ALSMenubarProps {\n // TODO: Define props\n}\n\nexport function ALSMenubar(props: ALSMenubarProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Menubar */}\n </div>\n );\n}\n\nexport default ALSMenubar;\n","import styles from './index.module.css';\n\nexport interface ALSMeterProps {\n // TODO: Define props\n}\n\nexport function ALSMeter(props: ALSMeterProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Meter */}\n </div>\n );\n}\n\nexport default ALSMeter;\n","import styles from './index.module.css';\n\nexport interface ALSNavigationMenuProps {\n // TODO: Define props\n}\n\nexport function ALSNavigationMenu(props: ALSNavigationMenuProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement NavigationMenu */}\n </div>\n );\n}\n\nexport default ALSNavigationMenu;\n","import styles from './index.module.css';\n\nexport interface ALSNumberFieldProps {\n // TODO: Define props\n}\n\nexport function ALSNumberField(props: ALSNumberFieldProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement NumberField */}\n </div>\n );\n}\n\nexport default ALSNumberField;\n","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const PopoverRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") PopoverRootContext.displayName = \"PopoverRootContext\";\nexport function usePopoverRootContext(optional) {\n const context = React.useContext(PopoverRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.' : _formatErrorMessage(47));\n }\n return context;\n}","/* eslint-disable react-hooks/rules-of-hooks */\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { ReactStore, createSelector } from '@base-ui-components/utils/store';\nimport { Timeout } from '@base-ui-components/utils/useTimeout';\nimport { useRefWithInit } from '@base-ui-components/utils/useRefWithInit';\nimport { useOnMount } from '@base-ui-components/utils/useOnMount';\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { createInitialPopupStoreState, popupStoreSelectors, PopupTriggerMap } from \"../../utils/popups/index.js\";\nimport { PATIENT_CLICK_THRESHOLD } from \"../../utils/constants.js\";\nfunction createInitialState() {\n return {\n ...createInitialPopupStoreState(),\n disabled: false,\n modal: false,\n instantType: undefined,\n openMethod: null,\n openChangeReason: null,\n titleElementId: undefined,\n descriptionElementId: undefined,\n stickIfOpen: true,\n nested: false,\n openOnHover: false,\n closeDelay: 0\n };\n}\nconst selectors = {\n ...popupStoreSelectors,\n disabled: createSelector(state => state.disabled),\n instantType: createSelector(state => state.instantType),\n openMethod: createSelector(state => state.openMethod),\n openChangeReason: createSelector(state => state.openChangeReason),\n modal: createSelector(state => state.modal),\n stickIfOpen: createSelector(state => state.stickIfOpen),\n titleElementId: createSelector(state => state.titleElementId),\n descriptionElementId: createSelector(state => state.descriptionElementId),\n openOnHover: createSelector(state => state.openOnHover),\n closeDelay: createSelector(state => state.closeDelay)\n};\nexport class PopoverStore extends ReactStore {\n constructor(initialState) {\n const initial = {\n ...createInitialState(),\n ...initialState\n };\n if (initial.open && initialState?.mounted === undefined) {\n initial.mounted = true;\n }\n super(initial, {\n popupRef: /*#__PURE__*/React.createRef(),\n backdropRef: /*#__PURE__*/React.createRef(),\n internalBackdropRef: /*#__PURE__*/React.createRef(),\n onOpenChange: undefined,\n onOpenChangeComplete: undefined,\n triggerFocusTargetRef: /*#__PURE__*/React.createRef(),\n beforeContentFocusGuardRef: /*#__PURE__*/React.createRef(),\n stickIfOpenTimeout: new Timeout(),\n triggerElements: new PopupTriggerMap()\n }, selectors);\n }\n setOpen = (nextOpen, eventDetails) => {\n const isHover = eventDetails.reason === REASONS.triggerHover;\n const isKeyboardClick = eventDetails.reason === REASONS.triggerPress && eventDetails.event.detail === 0;\n const isDismissClose = !nextOpen && (eventDetails.reason === REASONS.escapeKey || eventDetails.reason == null);\n eventDetails.preventUnmountOnClose = () => {\n this.set('preventUnmountingOnClose', true);\n };\n this.context.onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n const details = {\n open: nextOpen,\n nativeEvent: eventDetails.event,\n reason: eventDetails.reason,\n nested: this.state.nested,\n triggerElement: eventDetails.trigger\n };\n const floatingEvents = this.state.floatingRootContext.context.events;\n floatingEvents?.emit('openchange', details);\n const changeState = () => {\n const updatedState = {\n open: nextOpen,\n openChangeReason: eventDetails.reason\n };\n\n // If a popup is closing, the `trigger` may be null.\n // We want to keep the previous value so that exit animations are played and focus is returned correctly.\n const newTriggerId = eventDetails.trigger?.id ?? null;\n if (newTriggerId || nextOpen) {\n updatedState.activeTriggerId = newTriggerId;\n updatedState.activeTriggerElement = eventDetails.trigger ?? null;\n }\n this.update(updatedState);\n };\n if (isHover) {\n // Only allow \"patient\" clicks to close the popover if it's open.\n // If they clicked within 500ms of the popover opening, keep it open.\n this.set('stickIfOpen', true);\n this.context.stickIfOpenTimeout.start(PATIENT_CLICK_THRESHOLD, () => {\n this.set('stickIfOpen', false);\n });\n ReactDOM.flushSync(changeState);\n } else {\n changeState();\n }\n if (isKeyboardClick || isDismissClose) {\n this.set('instantType', isKeyboardClick ? 'click' : 'dismiss');\n } else if (eventDetails.reason === REASONS.focusOut) {\n this.set('instantType', 'focus');\n } else {\n this.set('instantType', undefined);\n }\n };\n static useStore(externalStore, initialState) {\n const store = useRefWithInit(() => {\n return externalStore ?? new PopoverStore(initialState);\n }).current;\n useOnMount(store.disposeEffect);\n return store;\n }\n disposeEffect = () => {\n return this.context.stickIfOpenTimeout.disposeEffect();\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useScrollLock } from '@base-ui-components/utils/useScrollLock';\nimport { useDismiss, useInteractions, useRole, FloatingTree, useFloatingParentNodeId, useSyncedFloatingRootContext } from \"../../floating-ui-react/index.js\";\nimport { PopoverRootContext, usePopoverRootContext } from \"./PopoverRootContext.js\";\nimport { PopoverStore } from \"../store/PopoverStore.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useImplicitActiveTrigger, useOpenStateTransitions } from \"../../utils/popups/index.js\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction PopoverRootComponent({\n props\n}) {\n const {\n children,\n open: openProp,\n defaultOpen: defaultOpenProp = false,\n onOpenChange,\n onOpenChangeComplete,\n modal = false,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null\n } = props;\n const store = PopoverStore.useStore(handle?.store, {\n open: openProp ?? defaultOpenProp,\n modal,\n activeTriggerId: triggerIdProp !== undefined ? triggerIdProp : defaultTriggerIdProp\n });\n store.useControlledProp('open', openProp, defaultOpenProp);\n store.useControlledProp('activeTriggerId', triggerIdProp, defaultTriggerIdProp);\n const open = store.useState('open');\n const positionerElement = store.useState('positionerElement');\n const payload = store.useState('payload');\n const openReason = store.useState('openChangeReason');\n store.useContextCallback('onOpenChange', onOpenChange);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n const {\n openMethod,\n triggerProps: interactionTypeTriggerProps,\n reset: resetOpenInteractionType\n } = useOpenInteractionType(open);\n useImplicitActiveTrigger(store);\n const {\n forceUnmount\n } = useOpenStateTransitions(open, store, () => {\n store.update({\n stickIfOpen: true,\n openChangeReason: null\n });\n resetOpenInteractionType();\n });\n useScrollLock(open && modal === true && openReason !== REASONS.triggerHover && openMethod !== 'touch', positionerElement);\n React.useEffect(() => {\n if (!open) {\n store.context.stickIfOpenTimeout.clear();\n }\n }, [store, open]);\n const createPopoverEventDetails = React.useCallback(reason => {\n const details = createChangeEventDetails(reason);\n details.preventUnmountOnClose = () => {\n store.set('preventUnmountingOnClose', true);\n };\n return details;\n }, [store]);\n const handleImperativeClose = React.useCallback(() => {\n store.setOpen(false, createPopoverEventDetails(REASONS.imperativeAction));\n }, [store, createPopoverEventDetails]);\n React.useImperativeHandle(props.actionsRef, () => ({\n unmount: forceUnmount,\n close: handleImperativeClose\n }), [forceUnmount, handleImperativeClose]);\n const floatingRootContext = useSyncedFloatingRootContext({\n popupStore: store,\n onOpenChange: store.setOpen\n });\n const dismiss = useDismiss(floatingRootContext, {\n outsidePressEvent: {\n // Ensure `aria-hidden` on outside elements is removed immediately\n // on outside press when trapping focus.\n mouse: modal === 'trap-focus' ? 'sloppy' : 'intentional',\n touch: 'sloppy'\n }\n });\n const role = useRole(floatingRootContext);\n const {\n getReferenceProps,\n getFloatingProps,\n getTriggerProps\n } = useInteractions([dismiss, role]);\n const activeTriggerProps = React.useMemo(() => {\n return getReferenceProps(interactionTypeTriggerProps);\n }, [getReferenceProps, interactionTypeTriggerProps]);\n const inactiveTriggerProps = React.useMemo(() => {\n return getTriggerProps(interactionTypeTriggerProps);\n }, [getTriggerProps, interactionTypeTriggerProps]);\n const popupProps = React.useMemo(() => {\n return getFloatingProps();\n }, [getFloatingProps]);\n store.useSyncedValues({\n modal,\n openMethod,\n activeTriggerProps,\n inactiveTriggerProps,\n popupProps,\n floatingRootContext,\n nested: useFloatingParentNodeId() != null\n });\n const popoverContext = React.useMemo(() => ({\n store\n }), [store]);\n return /*#__PURE__*/_jsx(PopoverRootContext.Provider, {\n value: popoverContext,\n children: typeof children === 'function' ? children({\n payload\n }) : children\n });\n}\n\n/**\n * Groups all parts of the popover.\n * Doesn’t render its own HTML element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nexport function PopoverRoot(props) {\n if (usePopoverRootContext(true)) {\n return /*#__PURE__*/_jsx(PopoverRootComponent, {\n props: props\n });\n }\n return /*#__PURE__*/_jsx(FloatingTree, {\n children: /*#__PURE__*/_jsx(PopoverRootComponent, {\n props: props\n })\n });\n}","export const OPEN_DELAY = 300;","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.js\";\nimport { useButton } from \"../../use-button/useButton.js\";\nimport { triggerOpenStateMapping, pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../utils/constants.js\";\nimport { safePolygon, useClick, useHoverReferenceInteraction, useInteractions } from \"../../floating-ui-react/index.js\";\nimport { OPEN_DELAY } from \"../utils/constants.js\";\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { FocusGuard } from \"../../utils/FocusGuard.js\";\nimport { contains, getNextTabbable, getTabbableAfterElement, getTabbableBeforeElement, isOutsideEvent } from \"../../floating-ui-react/utils.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useTriggerDataForwarding } from \"../../utils/popups/index.js\";\n\n/**\n * A button that opens the popover.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const PopoverTrigger = /*#__PURE__*/React.forwardRef(function PopoverTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled = false,\n nativeButton = true,\n handle,\n payload,\n openOnHover = false,\n delay = OPEN_DELAY,\n closeDelay = 0,\n id: idProp,\n ...elementProps\n } = componentProps;\n const rootContext = usePopoverRootContext(true);\n const store = handle?.store ?? rootContext?.store;\n if (!store) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.' : _formatErrorMessage(74));\n }\n const thisTriggerId = useBaseUiId(idProp);\n const isTriggerActive = store.useState('isTriggerActive', thisTriggerId);\n const floatingContext = store.useState('floatingRootContext');\n const isOpenedByThisTrigger = store.useState('isOpenedByTrigger', thisTriggerId);\n const [triggerElement, setTriggerElement] = React.useState(null);\n const {\n registerTrigger,\n isMountedByThisTrigger\n } = useTriggerDataForwarding(thisTriggerId, triggerElement, store, {\n payload,\n disabled,\n openOnHover,\n closeDelay\n });\n const openReason = store.useState('openChangeReason');\n const stickIfOpen = store.useState('stickIfOpen');\n const openMethod = store.useState('openMethod');\n const hoverProps = useHoverReferenceInteraction(floatingContext, {\n enabled: floatingContext != null && openOnHover && (openMethod !== 'touch' || openReason !== REASONS.triggerPress),\n mouseOnly: true,\n move: false,\n handleClose: safePolygon(),\n restMs: delay,\n delay: {\n close: closeDelay\n },\n triggerElement,\n isActiveTrigger: isTriggerActive\n });\n const click = useClick(floatingContext, {\n enabled: floatingContext != null,\n stickIfOpen\n });\n const localProps = useInteractions([click]);\n const rootTriggerProps = store.useState('triggerProps', isMountedByThisTrigger);\n const state = React.useMemo(() => ({\n disabled,\n open: isOpenedByThisTrigger\n }), [disabled, isOpenedByThisTrigger]);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const stateAttributesMapping = React.useMemo(() => ({\n open(value) {\n if (value && openReason === REASONS.triggerPress) {\n return pressableTriggerOpenStateMapping.open(value);\n }\n return triggerOpenStateMapping.open(value);\n }\n }), [openReason]);\n const element = useRenderElement('button', componentProps, {\n state,\n ref: [buttonRef, forwardedRef, registerTrigger, setTriggerElement],\n props: [localProps.getReferenceProps(), hoverProps, rootTriggerProps, {\n [CLICK_TRIGGER_IDENTIFIER]: '',\n id: thisTriggerId\n }, elementProps, getButtonProps],\n stateAttributesMapping\n });\n const preFocusGuardRef = React.useRef(null);\n const handlePreFocusGuardFocus = useStableCallback(event => {\n ReactDOM.flushSync(() => {\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent, event.currentTarget));\n });\n const previousTabbable = getTabbableBeforeElement(preFocusGuardRef.current);\n previousTabbable?.focus();\n });\n const handleFocusTargetFocus = useStableCallback(event => {\n const positionerElement = store.select('positionerElement');\n if (positionerElement && isOutsideEvent(event, positionerElement)) {\n store.context.beforeContentFocusGuardRef.current?.focus();\n } else {\n ReactDOM.flushSync(() => {\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent, event.currentTarget));\n });\n let nextTabbable = getTabbableAfterElement(triggerElement);\n while (nextTabbable !== null && contains(positionerElement, nextTabbable) || nextTabbable?.hasAttribute('aria-hidden')) {\n const prevTabbable = nextTabbable;\n nextTabbable = getNextTabbable(nextTabbable);\n if (nextTabbable === prevTabbable) {\n break;\n }\n }\n nextTabbable?.focus();\n }\n });\n\n // A fragment with key is required to ensure that the `element` is mounted to the same DOM node\n // regardless of whether the focus guards are rendered or not.\n\n if (isTriggerActive) {\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(FocusGuard, {\n ref: preFocusGuardRef,\n onFocus: handlePreFocusGuardFocus\n }), /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n }, thisTriggerId), /*#__PURE__*/_jsx(FocusGuard, {\n ref: store.context.triggerFocusTargetRef,\n onFocus: handleFocusTargetFocus\n })]\n });\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n }, thisTriggerId);\n});\nif (process.env.NODE_ENV !== \"production\") PopoverTrigger.displayName = \"PopoverTrigger\";","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const PopoverPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") PopoverPortalContext.displayName = \"PopoverPortalContext\";\nexport function usePopoverPortalContext() {\n const value = React.useContext(PopoverPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Popover.Portal> is missing.' : _formatErrorMessage(45));\n }\n return value;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingPortal } from \"../../floating-ui-react/index.js\";\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.js\";\nimport { PopoverPortalContext } from \"./PopoverPortalContext.js\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const PopoverPortal = /*#__PURE__*/React.forwardRef(function PopoverPortal(props, forwardedRef) {\n const {\n keepMounted = false,\n ...portalProps\n } = props;\n const {\n store\n } = usePopoverRootContext();\n const mounted = store.useState('mounted');\n const shouldRender = mounted || keepMounted;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(PopoverPortalContext.Provider, {\n value: keepMounted,\n children: /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps,\n renderGuards: false\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") PopoverPortal.displayName = \"PopoverPortal\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const PopoverPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") PopoverPositionerContext.displayName = \"PopoverPositionerContext\";\nexport function usePopoverPositionerContext() {\n const context = React.useContext(PopoverPositionerContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.' : _formatErrorMessage(46));\n }\n return context;\n}","import { clamp, evaluate, getAlignment, getAlignmentAxis, getAxisLength, getPaddingObject } from '@floating-ui/utils';\n/**\n * Fork of the original `arrow` middleware from Floating UI that allows\n * configuring the offset parent.\n */\nexport const baseArrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0,\n offsetParent = 'real'\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = offsetParent === 'real' ? await platform.getOffsetParent?.(element) : elements.floating;\n let clientSize = elements.floating[clientProp] || rects.floating[length];\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await platform.isElement?.(arrowOffsetParent))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n // eslint-disable-next-line no-nested-ternary\n const alignmentOffset = shouldAddOffset ? center < min ? center - min : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nexport const arrow = (options, deps) => ({\n ...baseArrow(options),\n options: [options, deps]\n});","import { hide as nativeHide } from '@floating-ui/react-dom';\nexport const hide = {\n name: 'hide',\n async fn(state) {\n const {\n width,\n height,\n x,\n y\n } = state.rects.reference;\n const anchorHidden = width === 0 && height === 0 && x === 0 && y === 0;\n const nativeHideResult = await nativeHide().fn(state);\n return {\n data: {\n referenceHidden: nativeHideResult.data?.referenceHidden || anchorHidden\n }\n };\n }\n};","import { ownerDocument, ownerWindow } from '@base-ui-components/utils/owner';\nimport { getSide } from '@floating-ui/utils';\nexport const DEFAULT_SIDES = {\n sideX: 'left',\n sideY: 'top'\n};\nexport const adaptiveOrigin = {\n name: 'adaptiveOrigin',\n async fn(state) {\n const {\n x: rawX,\n y: rawY,\n rects: {\n floating: floatRect\n },\n elements: {\n floating\n },\n platform,\n strategy,\n placement\n } = state;\n const win = ownerWindow(floating);\n const styles = win.getComputedStyle(floating);\n const hasTransition = styles.transitionDuration !== '0s' && styles.transitionDuration !== '';\n if (!hasTransition) {\n return {\n x: rawX,\n y: rawY,\n data: DEFAULT_SIDES\n };\n }\n const offsetParent = await platform.getOffsetParent?.(floating);\n let offsetDimensions = {\n width: 0,\n height: 0\n };\n\n // For fixed strategy, prefer visualViewport if available\n if (strategy === 'fixed' && win?.visualViewport) {\n offsetDimensions = {\n width: win.visualViewport.width,\n height: win.visualViewport.height\n };\n } else if (offsetParent === win) {\n const doc = ownerDocument(floating);\n offsetDimensions = {\n width: doc.documentElement.clientWidth,\n height: doc.documentElement.clientHeight\n };\n } else if (await platform.isElement?.(offsetParent)) {\n offsetDimensions = await platform.getDimensions(offsetParent);\n }\n const currentSide = getSide(placement);\n let x = rawX;\n let y = rawY;\n if (currentSide === 'left') {\n x = offsetDimensions.width - (rawX + floatRect.width);\n }\n if (currentSide === 'top') {\n y = offsetDimensions.height - (rawY + floatRect.height);\n }\n const sideX = currentSide === 'left' ? 'right' : DEFAULT_SIDES.sideX;\n const sideY = currentSide === 'top' ? 'bottom' : DEFAULT_SIDES.sideY;\n return {\n x,\n y,\n data: {\n sideX,\n sideY\n }\n };\n }\n};","'use client';\n\nimport * as React from 'react';\nimport { getSide, getAlignment, getSideAxis } from '@floating-ui/utils';\nimport { ownerDocument } from '@base-ui-components/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useValueAsRef } from '@base-ui-components/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { autoUpdate, flip, limitShift, offset, shift, useFloating, size } from \"../floating-ui-react/index.js\";\nimport { useDirection } from \"../direction-provider/DirectionContext.js\";\nimport { arrow } from \"../floating-ui-react/middleware/arrow.js\";\nimport { hide } from \"./hideMiddleware.js\";\nimport { DEFAULT_SIDES } from \"./adaptiveOriginMiddleware.js\";\nfunction getLogicalSide(sideParam, renderedSide, isRtl) {\n const isLogicalSideParam = sideParam === 'inline-start' || sideParam === 'inline-end';\n const logicalRight = isRtl ? 'inline-start' : 'inline-end';\n const logicalLeft = isRtl ? 'inline-end' : 'inline-start';\n return {\n top: 'top',\n right: isLogicalSideParam ? logicalRight : 'right',\n bottom: 'bottom',\n left: isLogicalSideParam ? logicalLeft : 'left'\n }[renderedSide];\n}\nfunction getOffsetData(state, sideParam, isRtl) {\n const {\n rects,\n placement\n } = state;\n const data = {\n side: getLogicalSide(sideParam, getSide(placement), isRtl),\n align: getAlignment(placement) || 'center',\n anchor: {\n width: rects.reference.width,\n height: rects.reference.height\n },\n positioner: {\n width: rects.floating.width,\n height: rects.floating.height\n }\n };\n return data;\n}\n/**\n * Provides standardized anchor positioning behavior for floating elements. Wraps Floating UI's\n * `useFloating` hook.\n */\nexport function useAnchorPositioning(params) {\n const {\n // Public parameters\n anchor,\n positionMethod = 'absolute',\n side: sideParam = 'bottom',\n sideOffset = 0,\n align = 'center',\n alignOffset = 0,\n collisionBoundary,\n collisionPadding: collisionPaddingParam = 5,\n sticky = false,\n arrowPadding = 5,\n disableAnchorTracking = false,\n // Private parameters\n keepMounted = false,\n floatingRootContext,\n mounted,\n collisionAvoidance,\n shiftCrossAxis = false,\n nodeId,\n adaptiveOrigin,\n lazyFlip = false,\n externalTree\n } = params;\n const [mountSide, setMountSide] = React.useState(null);\n if (!mounted && mountSide !== null) {\n setMountSide(null);\n }\n const collisionAvoidanceSide = collisionAvoidance.side || 'flip';\n const collisionAvoidanceAlign = collisionAvoidance.align || 'flip';\n const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || 'end';\n const anchorFn = typeof anchor === 'function' ? anchor : undefined;\n const anchorFnCallback = useStableCallback(anchorFn);\n const anchorDep = anchorFn ? anchorFnCallback : anchor;\n const anchorValueRef = useValueAsRef(anchor);\n const direction = useDirection();\n const isRtl = direction === 'rtl';\n const side = mountSide || {\n top: 'top',\n right: 'right',\n bottom: 'bottom',\n left: 'left',\n 'inline-end': isRtl ? 'left' : 'right',\n 'inline-start': isRtl ? 'right' : 'left'\n }[sideParam];\n const placement = align === 'center' ? side : `${side}-${align}`;\n let collisionPadding = collisionPaddingParam;\n\n // Create a bias to the preferred side.\n // On iOS, when the mobile software keyboard opens, the input is exactly centered\n // in the viewport, but this can cause it to flip to the top undesirably.\n const bias = 1;\n const biasTop = sideParam === 'bottom' ? bias : 0;\n const biasBottom = sideParam === 'top' ? bias : 0;\n const biasLeft = sideParam === 'right' ? bias : 0;\n const biasRight = sideParam === 'left' ? bias : 0;\n if (typeof collisionPadding === 'number') {\n collisionPadding = {\n top: collisionPadding + biasTop,\n right: collisionPadding + biasRight,\n bottom: collisionPadding + biasBottom,\n left: collisionPadding + biasLeft\n };\n } else if (collisionPadding) {\n collisionPadding = {\n top: (collisionPadding.top || 0) + biasTop,\n right: (collisionPadding.right || 0) + biasRight,\n bottom: (collisionPadding.bottom || 0) + biasBottom,\n left: (collisionPadding.left || 0) + biasLeft\n };\n }\n const commonCollisionProps = {\n boundary: collisionBoundary === 'clipping-ancestors' ? 'clippingAncestors' : collisionBoundary,\n padding: collisionPadding\n };\n\n // Using a ref assumes that the arrow element is always present in the DOM for the lifetime of the\n // popup. If this assumption ends up being false, we can switch to state to manage the arrow's\n // presence.\n const arrowRef = React.useRef(null);\n\n // Keep these reactive if they're not functions\n const sideOffsetRef = useValueAsRef(sideOffset);\n const alignOffsetRef = useValueAsRef(alignOffset);\n const sideOffsetDep = typeof sideOffset !== 'function' ? sideOffset : 0;\n const alignOffsetDep = typeof alignOffset !== 'function' ? alignOffset : 0;\n const middleware = [offset(state => {\n const data = getOffsetData(state, sideParam, isRtl);\n const sideAxis = typeof sideOffsetRef.current === 'function' ? sideOffsetRef.current(data) : sideOffsetRef.current;\n const alignAxis = typeof alignOffsetRef.current === 'function' ? alignOffsetRef.current(data) : alignOffsetRef.current;\n return {\n mainAxis: sideAxis,\n crossAxis: alignAxis,\n alignmentAxis: alignAxis\n };\n }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam])];\n const shiftDisabled = collisionAvoidanceAlign === 'none' && collisionAvoidanceSide !== 'shift';\n const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === 'shift');\n const flipMiddleware = collisionAvoidanceSide === 'none' ? null : flip({\n ...commonCollisionProps,\n // Ensure the popup flips if it's been limited by its --available-height and it resizes.\n // Since the size() padding is smaller than the flip() padding, flip() will take precedence.\n padding: {\n top: collisionPadding.top + bias,\n right: collisionPadding.right + bias,\n bottom: collisionPadding.bottom + bias,\n left: collisionPadding.left + bias\n },\n mainAxis: !shiftCrossAxis && collisionAvoidanceSide === 'flip',\n crossAxis: collisionAvoidanceAlign === 'flip' ? 'alignment' : false,\n fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide\n });\n const shiftMiddleware = shiftDisabled ? null : shift(data => {\n const html = ownerDocument(data.elements.floating).documentElement;\n return {\n ...commonCollisionProps,\n // Use the Layout Viewport to avoid shifting around when pinch-zooming\n // for context menus.\n rootBoundary: shiftCrossAxis ? {\n x: 0,\n y: 0,\n width: html.clientWidth,\n height: html.clientHeight\n } : undefined,\n mainAxis: collisionAvoidanceAlign !== 'none',\n crossAxis: crossAxisShiftEnabled,\n limiter: sticky || shiftCrossAxis ? undefined : limitShift(limitData => {\n if (!arrowRef.current) {\n return {};\n }\n const {\n width,\n height\n } = arrowRef.current.getBoundingClientRect();\n const sideAxis = getSideAxis(getSide(limitData.placement));\n const arrowSize = sideAxis === 'y' ? width : height;\n const offsetAmount = sideAxis === 'y' ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom;\n return {\n offset: arrowSize / 2 + offsetAmount / 2\n };\n })\n };\n }, [commonCollisionProps, sticky, shiftCrossAxis, collisionPadding, collisionAvoidanceAlign]);\n\n // https://floating-ui.com/docs/flip#combining-with-shift\n if (collisionAvoidanceSide === 'shift' || collisionAvoidanceAlign === 'shift' || align === 'center') {\n middleware.push(shiftMiddleware, flipMiddleware);\n } else {\n middleware.push(flipMiddleware, shiftMiddleware);\n }\n middleware.push(size({\n ...commonCollisionProps,\n apply({\n elements: {\n floating\n },\n rects: {\n reference\n },\n availableWidth,\n availableHeight\n }) {\n Object.entries({\n '--available-width': `${availableWidth}px`,\n '--available-height': `${availableHeight}px`,\n '--anchor-width': `${reference.width}px`,\n '--anchor-height': `${reference.height}px`\n }).forEach(([key, value]) => {\n floating.style.setProperty(key, value);\n });\n }\n }), arrow(() => ({\n // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,\n // we'll create a fake element.\n element: arrowRef.current || document.createElement('div'),\n padding: arrowPadding,\n offsetParent: 'floating'\n }), [arrowPadding]), {\n name: 'transformOrigin',\n fn(state) {\n const {\n elements,\n middlewareData,\n placement: renderedPlacement,\n rects,\n y\n } = state;\n const currentRenderedSide = getSide(renderedPlacement);\n const currentRenderedAxis = getSideAxis(currentRenderedSide);\n const arrowEl = arrowRef.current;\n const arrowX = middlewareData.arrow?.x || 0;\n const arrowY = middlewareData.arrow?.y || 0;\n const arrowWidth = arrowEl?.clientWidth || 0;\n const arrowHeight = arrowEl?.clientHeight || 0;\n const transformX = arrowX + arrowWidth / 2;\n const transformY = arrowY + arrowHeight / 2;\n const shiftY = Math.abs(middlewareData.shift?.y || 0);\n const halfAnchorHeight = rects.reference.height / 2;\n const sideOffsetValue = typeof sideOffset === 'function' ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset;\n const isOverlappingAnchor = shiftY > sideOffsetValue;\n const adjacentTransformOrigin = {\n top: `${transformX}px calc(100% + ${sideOffsetValue}px)`,\n bottom: `${transformX}px ${-sideOffsetValue}px`,\n left: `calc(100% + ${sideOffsetValue}px) ${transformY}px`,\n right: `${-sideOffsetValue}px ${transformY}px`\n }[currentRenderedSide];\n const overlapTransformOrigin = `${transformX}px ${rects.reference.y + halfAnchorHeight - y}px`;\n elements.floating.style.setProperty('--transform-origin', crossAxisShiftEnabled && currentRenderedAxis === 'y' && isOverlappingAnchor ? overlapTransformOrigin : adjacentTransformOrigin);\n return {};\n }\n }, hide, adaptiveOrigin);\n useIsoLayoutEffect(() => {\n // Ensure positioning doesn't run initially for `keepMounted` elements that\n // aren't initially open.\n if (!mounted && floatingRootContext) {\n floatingRootContext.update({\n referenceElement: null,\n floatingElement: null,\n domReferenceElement: null\n });\n }\n }, [mounted, floatingRootContext]);\n const autoUpdateOptions = React.useMemo(() => ({\n elementResize: !disableAnchorTracking && typeof ResizeObserver !== 'undefined',\n layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== 'undefined'\n }), [disableAnchorTracking]);\n const {\n refs,\n elements,\n x,\n y,\n middlewareData,\n update,\n placement: renderedPlacement,\n context,\n isPositioned,\n floatingStyles: originalFloatingStyles\n } = useFloating({\n rootContext: floatingRootContext,\n placement,\n middleware,\n strategy: positionMethod,\n whileElementsMounted: keepMounted ? undefined : (...args) => autoUpdate(...args, autoUpdateOptions),\n nodeId,\n externalTree\n });\n const {\n sideX,\n sideY\n } = middlewareData.adaptiveOrigin || DEFAULT_SIDES;\n\n // Default to `fixed` when not positioned to prevent `autoFocus` scroll jumps.\n // This ensures the popup is inside the viewport initially before it gets positioned.\n const resolvedPosition = isPositioned ? positionMethod : 'fixed';\n const floatingStyles = React.useMemo(() => adaptiveOrigin ? {\n position: resolvedPosition,\n [sideX]: x,\n [sideY]: y\n } : {\n position: resolvedPosition,\n ...originalFloatingStyles\n }, [adaptiveOrigin, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles]);\n const registeredPositionReferenceRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n if (!mounted) {\n return;\n }\n const anchorValue = anchorValueRef.current;\n const resolvedAnchor = typeof anchorValue === 'function' ? anchorValue() : anchorValue;\n const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null;\n const finalAnchor = unwrappedElement || null;\n if (finalAnchor !== registeredPositionReferenceRef.current) {\n refs.setPositionReference(finalAnchor);\n registeredPositionReferenceRef.current = finalAnchor;\n }\n }, [mounted, refs, anchorDep, anchorValueRef]);\n React.useEffect(() => {\n if (!mounted) {\n return;\n }\n const anchorValue = anchorValueRef.current;\n\n // Refs from parent components are set after useLayoutEffect runs and are available in useEffect.\n // Therefore, if the anchor is a ref, we need to update the position reference in useEffect.\n if (typeof anchorValue === 'function') {\n return;\n }\n if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) {\n refs.setPositionReference(anchorValue.current);\n registeredPositionReferenceRef.current = anchorValue.current;\n }\n }, [mounted, refs, anchorDep, anchorValueRef]);\n React.useEffect(() => {\n if (keepMounted && mounted && elements.domReference && elements.floating) {\n return autoUpdate(elements.domReference, elements.floating, update, autoUpdateOptions);\n }\n return undefined;\n }, [keepMounted, mounted, elements, update, autoUpdateOptions]);\n const renderedSide = getSide(renderedPlacement);\n const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl);\n const renderedAlign = getAlignment(renderedPlacement) || 'center';\n const anchorHidden = Boolean(middlewareData.hide?.referenceHidden);\n\n /**\n * Locks the flip (makes it \"sticky\") so it doesn't prefer a given placement\n * and flips back lazily, not eagerly. Ideal for filtered lists that change\n * the size of the popup dynamically to avoid unwanted flipping when typing.\n */\n useIsoLayoutEffect(() => {\n if (lazyFlip && mounted && isPositioned) {\n setMountSide(renderedSide);\n }\n }, [lazyFlip, mounted, isPositioned, renderedSide]);\n const arrowStyles = React.useMemo(() => ({\n position: 'absolute',\n top: middlewareData.arrow?.y,\n left: middlewareData.arrow?.x\n }), [middlewareData.arrow]);\n const arrowUncentered = middlewareData.arrow?.centerOffset !== 0;\n return React.useMemo(() => ({\n positionerStyles: floatingStyles,\n arrowStyles,\n arrowRef,\n arrowUncentered,\n side: logicalRenderedSide,\n align: renderedAlign,\n physicalSide: renderedSide,\n anchorHidden,\n refs,\n context,\n isPositioned,\n update\n }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden, refs, context, isPositioned, update]);\n}\nfunction isRef(param) {\n return param != null && 'current' in param;\n}","import { DISABLED_TRANSITIONS_STYLE, EMPTY_OBJECT } from \"./constants.js\";\nexport function getDisabledMountTransitionStyles(transitionStatus) {\n return transitionStatus === 'starting' ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT;\n}","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui-components/utils/inertValue';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { FloatingNode, useFloatingNodeId } from \"../../floating-ui-react/index.js\";\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.js\";\nimport { PopoverPositionerContext } from \"./PopoverPositionerContext.js\";\nimport { useAnchorPositioning } from \"../../utils/useAnchorPositioning.js\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.js\";\nimport { usePopoverPortalContext } from \"../portal/PopoverPortalContext.js\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { POPUP_COLLISION_AVOIDANCE } from \"../../utils/constants.js\";\nimport { useAnimationsFinished } from \"../../utils/useAnimationsFinished.js\";\nimport { adaptiveOrigin } from \"../../utils/adaptiveOriginMiddleware.js\";\nimport { getDisabledMountTransitionStyles } from \"../../utils/getDisabledMountTransitionStyles.js\";\n\n/**\n * Positions the popover against the trigger.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const PopoverPositioner = /*#__PURE__*/React.forwardRef(function PopoverPositioner(componentProps, forwardedRef) {\n const {\n render,\n className,\n anchor,\n positionMethod = 'absolute',\n side = 'bottom',\n align = 'center',\n sideOffset = 0,\n alignOffset = 0,\n collisionBoundary = 'clipping-ancestors',\n collisionPadding = 5,\n arrowPadding = 5,\n sticky = false,\n disableAnchorTracking = false,\n collisionAvoidance = POPUP_COLLISION_AVOIDANCE,\n ...elementProps\n } = componentProps;\n const {\n store\n } = usePopoverRootContext();\n const keepMounted = usePopoverPortalContext();\n const nodeId = useFloatingNodeId();\n const floatingRootContext = store.useState('floatingRootContext');\n const mounted = store.useState('mounted');\n const open = store.useState('open');\n const openMethod = store.useState('openMethod');\n const openReason = store.useState('openChangeReason');\n const triggerElement = store.useState('activeTriggerElement');\n const modal = store.useState('modal');\n const positionerElement = store.useState('positionerElement');\n const instantType = store.useState('instantType');\n const transitionStatus = store.useState('transitionStatus');\n const prevTriggerElementRef = React.useRef(null);\n const runOnceAnimationsFinish = useAnimationsFinished(positionerElement, false, false);\n const positioning = useAnchorPositioning({\n anchor,\n floatingRootContext,\n positionMethod,\n mounted,\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n disableAnchorTracking,\n keepMounted,\n nodeId,\n collisionAvoidance,\n adaptiveOrigin\n });\n const defaultProps = React.useMemo(() => {\n const hiddenStyles = {};\n if (!open) {\n hiddenStyles.pointerEvents = 'none';\n }\n return {\n role: 'presentation',\n hidden: !mounted,\n style: {\n ...positioning.positionerStyles,\n ...hiddenStyles\n }\n };\n }, [open, mounted, positioning.positionerStyles]);\n const positioner = React.useMemo(() => ({\n props: defaultProps,\n ...positioning\n }), [defaultProps, positioning]);\n const domReference = floatingRootContext?.select('domReferenceElement');\n\n // When the current trigger element changes, enable transitions on the\n // positioner temporarily\n useIsoLayoutEffect(() => {\n const currentTriggerElement = domReference;\n const prevTriggerElement = prevTriggerElementRef.current;\n if (currentTriggerElement) {\n prevTriggerElementRef.current = currentTriggerElement;\n }\n if (prevTriggerElement && currentTriggerElement && currentTriggerElement !== prevTriggerElement) {\n store.set('instantType', undefined);\n const ac = new AbortController();\n runOnceAnimationsFinish(() => {\n store.set('instantType', 'trigger-change');\n }, ac.signal);\n return () => {\n ac.abort();\n };\n }\n return undefined;\n }, [domReference, runOnceAnimationsFinish, store]);\n const state = React.useMemo(() => ({\n open,\n side: positioner.side,\n align: positioner.align,\n anchorHidden: positioner.anchorHidden,\n instant: instantType\n }), [open, positioner.side, positioner.align, positioner.anchorHidden, instantType]);\n const setPositionerElement = React.useCallback(element => {\n store.set('positionerElement', element);\n }, [store]);\n const element = useRenderElement('div', componentProps, {\n state,\n props: [positioner.props, getDisabledMountTransitionStyles(transitionStatus), elementProps],\n ref: [forwardedRef, setPositionerElement],\n stateAttributesMapping: popupStateMapping\n });\n return /*#__PURE__*/_jsxs(PopoverPositionerContext.Provider, {\n value: positioner,\n children: [mounted && modal === true && openReason !== REASONS.triggerHover && openMethod !== 'touch' && /*#__PURE__*/_jsx(InternalBackdrop, {\n ref: store.context.internalBackdropRef,\n inert: inertValue(!open),\n cutout: triggerElement\n }), /*#__PURE__*/_jsx(FloatingNode, {\n id: nodeId,\n children: element\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") PopoverPositioner.displayName = \"PopoverPositioner\";","import { round } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement } from '@floating-ui/utils/dom';\nexport function getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height\n };\n}","import * as React from 'react';\nimport { useAnimationFrame } from '@base-ui-components/utils/useAnimationFrame';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useAnimationsFinished } from \"./useAnimationsFinished.js\";\nimport { getCssDimensions } from \"./getCssDimensions.js\";\nconst supportsResizeObserver = typeof ResizeObserver !== 'undefined';\nconst DEFAULT_ENABLED = () => true;\n\n/**\n * Allows the element to automatically resize based on its content while supporting animations.\n */\nexport function usePopupAutoResize(parameters) {\n const {\n popupElement,\n positionerElement,\n content,\n mounted,\n enabled = DEFAULT_ENABLED,\n onMeasureLayout: onMeasureLayoutParam,\n onMeasureLayoutComplete: onMeasureLayoutCompleteParam\n } = parameters;\n const isInitialRender = React.useRef(true);\n const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true, false);\n const animationFrame = useAnimationFrame();\n const previousDimensionsRef = React.useRef(null);\n const onMeasureLayout = useStableCallback(onMeasureLayoutParam);\n const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam);\n useIsoLayoutEffect(() => {\n // Reset the state when the popup is closed.\n if (!mounted || !enabled() || !supportsResizeObserver) {\n isInitialRender.current = true;\n previousDimensionsRef.current = null;\n return undefined;\n }\n if (!popupElement || !positionerElement) {\n return undefined;\n }\n const observer = new ResizeObserver(entries => {\n const entry = entries[0];\n if (entry) {\n if (previousDimensionsRef.current === null) {\n previousDimensionsRef.current = {\n width: Math.ceil(entry.borderBoxSize[0].inlineSize),\n height: Math.ceil(entry.borderBoxSize[0].blockSize)\n };\n } else {\n previousDimensionsRef.current.width = Math.ceil(entry.borderBoxSize[0].inlineSize);\n previousDimensionsRef.current.height = Math.ceil(entry.borderBoxSize[0].blockSize);\n }\n }\n });\n observer.observe(popupElement);\n\n // Measure the rendered size to enable transitions:\n popupElement.style.setProperty('--popup-width', 'auto');\n popupElement.style.setProperty('--popup-height', 'auto');\n const restorePopupPosition = overrideElementStyle(popupElement, 'position', 'static');\n const restorePopupTransform = overrideElementStyle(popupElement, 'transform', 'none');\n const restorePopupScale = overrideElementStyle(popupElement, 'scale', '1');\n const restoreAvailableWidth = overrideElementStyle(positionerElement, '--available-width', 'max-content');\n const restoreAvailableHeight = overrideElementStyle(positionerElement, '--available-height', 'max-content');\n onMeasureLayout?.();\n\n // Initial render (for each time the popup opens).\n if (isInitialRender.current || previousDimensionsRef.current === null) {\n positionerElement.style.setProperty('--positioner-width', 'max-content');\n positionerElement.style.setProperty('--positioner-height', 'max-content');\n const dimensions = getCssDimensions(popupElement);\n positionerElement.style.setProperty('--positioner-width', `${dimensions.width}px`);\n positionerElement.style.setProperty('--positioner-height', `${dimensions.height}px`);\n restorePopupPosition();\n restorePopupTransform();\n restorePopupScale();\n restoreAvailableWidth();\n restoreAvailableHeight();\n onMeasureLayoutComplete?.(null, dimensions);\n isInitialRender.current = false;\n return () => {\n observer.disconnect();\n };\n }\n\n // Subsequent renders while open (when `content` changes).\n popupElement.style.setProperty('--popup-width', 'auto');\n popupElement.style.setProperty('--popup-height', 'auto');\n positionerElement.style.setProperty('--positioner-width', 'max-content');\n positionerElement.style.setProperty('--positioner-height', 'max-content');\n const newDimensions = getCssDimensions(popupElement);\n popupElement.style.setProperty('--popup-width', `${previousDimensionsRef.current.width}px`);\n popupElement.style.setProperty('--popup-height', `${previousDimensionsRef.current.height}px`);\n restorePopupPosition();\n restorePopupTransform();\n restoreAvailableWidth();\n restoreAvailableHeight();\n onMeasureLayoutComplete?.(previousDimensionsRef.current, newDimensions);\n positionerElement.style.setProperty('--positioner-width', `${newDimensions.width}px`);\n positionerElement.style.setProperty('--positioner-height', `${newDimensions.height}px`);\n const abortController = new AbortController();\n animationFrame.request(() => {\n popupElement.style.setProperty('--popup-width', `${newDimensions.width}px`);\n popupElement.style.setProperty('--popup-height', `${newDimensions.height}px`);\n runOnceAnimationsFinish(() => {\n popupElement.style.setProperty('--popup-width', 'auto');\n popupElement.style.setProperty('--popup-height', 'auto');\n }, abortController.signal);\n });\n return () => {\n observer.disconnect();\n abortController.abort();\n animationFrame.cancel();\n };\n }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, enabled, mounted, onMeasureLayout, onMeasureLayoutComplete]);\n}\nfunction overrideElementStyle(element, property, value) {\n const originalValue = element.style.getPropertyValue(property);\n element.style.setProperty(property, value);\n return () => {\n element.style.setProperty(property, originalValue);\n };\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ToolbarRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToolbarRootContext.displayName = \"ToolbarRootContext\";\nexport function useToolbarRootContext(optional) {\n const context = React.useContext(ToolbarRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.' : _formatErrorMessage(69));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { FloatingFocusManager, useHoverFloatingInteraction } from \"../../floating-ui-react/index.js\";\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.js\";\nimport { usePopoverPositionerContext } from \"../positioner/PopoverPositionerContext.js\";\nimport { popupStateMapping as baseMapping } from \"../../utils/popupStateMapping.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\nimport { useOpenChangeComplete } from \"../../utils/useOpenChangeComplete.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { usePopupAutoResize } from \"../../utils/usePopupAutoResize.js\";\nimport { EMPTY_OBJECT } from \"../../utils/constants.js\";\nimport { useDirection } from \"../../direction-provider/DirectionContext.js\";\nimport { COMPOSITE_KEYS } from \"../../composite/composite.js\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.js\";\nimport { getDisabledMountTransitionStyles } from \"../../utils/getDisabledMountTransitionStyles.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...baseMapping,\n ...transitionStatusMapping\n};\n\n/**\n * A container for the popover contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nexport const PopoverPopup = /*#__PURE__*/React.forwardRef(function PopoverPopup(componentProps, forwardedRef) {\n const {\n className,\n render,\n initialFocus,\n finalFocus,\n ...elementProps\n } = componentProps;\n const {\n store\n } = usePopoverRootContext();\n const positioner = usePopoverPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const direction = useDirection();\n const open = store.useState('open');\n const openMethod = store.useState('openMethod');\n const instantType = store.useState('instantType');\n const transitionStatus = store.useState('transitionStatus');\n const popupProps = store.useState('popupProps');\n const titleId = store.useState('titleElementId');\n const descriptionId = store.useState('descriptionElementId');\n const modal = store.useState('modal');\n const mounted = store.useState('mounted');\n const openReason = store.useState('openChangeReason');\n const popupElement = store.useState('popupElement');\n const payload = store.useState('payload');\n const positionerElement = store.useState('positionerElement');\n const activeTriggerElement = store.useState('activeTriggerElement');\n const floatingContext = store.useState('floatingRootContext');\n useOpenChangeComplete({\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete?.(true);\n }\n }\n });\n const disabled = store.useState('disabled');\n const openOnHover = store.useState('openOnHover');\n const closeDelay = store.useState('closeDelay');\n useHoverFloatingInteraction(floatingContext, {\n enabled: openOnHover && !disabled,\n closeDelay\n });\n\n // Default initial focus logic:\n // If opened by touch, focus the popup element to prevent the virtual keyboard from opening\n // (this is required for Android specifically as iOS handles this automatically).\n function defaultInitialFocus(interactionType) {\n if (interactionType === 'touch') {\n return store.context.popupRef.current;\n }\n return true;\n }\n const resolvedInitialFocus = initialFocus === undefined ? defaultInitialFocus : initialFocus;\n const state = React.useMemo(() => ({\n open,\n side: positioner.side,\n align: positioner.align,\n instant: instantType,\n transitionStatus\n }), [open, positioner.side, positioner.align, instantType, transitionStatus]);\n const setPopupElement = React.useCallback(element => {\n store.set('popupElement', element);\n }, [store]);\n function handleMeasureLayout() {\n floatingContext.context.events.emit('measure-layout');\n }\n function handleMeasureLayoutComplete(previousDimensions, nextDimensions) {\n floatingContext.context.events.emit('measure-layout-complete', {\n previousDimensions,\n nextDimensions\n });\n }\n\n // If there's just one trigger, we can skip the auto-resize logic as\n // the popover will always be anchored to the same position.\n const autoresizeEnabled = () => store.context.triggerElements.size > 1;\n usePopupAutoResize({\n popupElement,\n positionerElement,\n mounted,\n content: payload,\n enabled: autoresizeEnabled,\n onMeasureLayout: handleMeasureLayout,\n onMeasureLayoutComplete: handleMeasureLayoutComplete\n });\n const anchoringStyles = React.useMemo(() => {\n // Ensure popup size transitions correctly when anchored to `bottom` (side=top) or `right` (side=left).\n let isOriginSide = positioner.side === 'top';\n let isPhysicalLeft = positioner.side === 'left';\n if (direction === 'rtl') {\n isOriginSide = isOriginSide || positioner.side === 'inline-end';\n isPhysicalLeft = isPhysicalLeft || positioner.side === 'inline-end';\n } else {\n isOriginSide = isOriginSide || positioner.side === 'inline-start';\n isPhysicalLeft = isPhysicalLeft || positioner.side === 'inline-start';\n }\n return isOriginSide ? {\n position: 'absolute',\n [positioner.side === 'top' ? 'bottom' : 'top']: '0',\n [isPhysicalLeft ? 'right' : 'left']: '0'\n } : EMPTY_OBJECT;\n }, [positioner.side, direction]);\n const element = useRenderElement('div', componentProps, {\n state,\n ref: [forwardedRef, store.context.popupRef, setPopupElement],\n props: [popupProps, {\n 'aria-labelledby': titleId,\n 'aria-describedby': descriptionId,\n style: anchoringStyles,\n onKeyDown(event) {\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n }\n }, getDisabledMountTransitionStyles(transitionStatus), elementProps],\n stateAttributesMapping\n });\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingContext,\n openInteractionType: openMethod,\n modal: modal === 'trap-focus',\n disabled: !mounted || openReason === REASONS.triggerHover,\n initialFocus: resolvedInitialFocus,\n returnFocus: finalFocus,\n restoreFocus: \"popup\",\n previousFocusableElement: isHTMLElement(activeTriggerElement) ? activeTriggerElement : undefined,\n nextFocusableElement: store.context.triggerFocusTargetRef,\n beforeContentFocusGuardRef: store.context.beforeContentFocusGuardRef,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") PopoverPopup.displayName = \"PopoverPopup\";","'use client';\n\nimport * as React from 'react';\nimport { usePopoverPositionerContext } from \"../positioner/PopoverPositionerContext.js\";\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.js\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n\n/**\n * Displays an element positioned against the popover anchor.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nexport const PopoverArrow = /*#__PURE__*/React.forwardRef(function PopoverArrow(componentProps, forwardedRef) {\n const {\n className,\n render,\n ...elementProps\n } = componentProps;\n const {\n store\n } = usePopoverRootContext();\n const open = store.useState('open');\n const {\n arrowRef,\n side,\n align,\n arrowUncentered,\n arrowStyles\n } = usePopoverPositionerContext();\n const state = React.useMemo(() => ({\n open,\n side,\n align,\n uncentered: arrowUncentered\n }), [open, side, align, arrowUncentered]);\n const element = useRenderElement('div', componentProps, {\n state,\n ref: [forwardedRef, arrowRef],\n props: [{\n style: arrowStyles,\n 'aria-hidden': true\n }, elementProps],\n stateAttributesMapping: popupStateMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") PopoverArrow.displayName = \"PopoverArrow\";","'use client';\n\nimport * as React from 'react';\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.js\";\nimport { popupStateMapping as baseMapping } from \"../../utils/popupStateMapping.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nconst stateAttributesMapping = {\n ...baseMapping,\n ...transitionStatusMapping\n};\n\n/**\n * An overlay displayed beneath the popover.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nexport const PopoverBackdrop = /*#__PURE__*/React.forwardRef(function PopoverBackdrop(props, forwardedRef) {\n const {\n className,\n render,\n ...elementProps\n } = props;\n const {\n store\n } = usePopoverRootContext();\n const open = store.useState('open');\n const mounted = store.useState('mounted');\n const transitionStatus = store.useState('transitionStatus');\n const openReason = store.useState('openChangeReason');\n const state = React.useMemo(() => ({\n open,\n transitionStatus\n }), [open, transitionStatus]);\n const element = useRenderElement('div', props, {\n state,\n ref: [store.context.backdropRef, forwardedRef],\n props: [{\n role: 'presentation',\n hidden: !mounted,\n style: {\n pointerEvents: openReason === REASONS.triggerHover ? 'none' : undefined,\n userSelect: 'none',\n WebkitUserSelect: 'none'\n }\n }, elementProps],\n stateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") PopoverBackdrop.displayName = \"PopoverBackdrop\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\n\n/**\n * A heading that labels the popover.\n * Renders an `<h2>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nexport const PopoverTitle = /*#__PURE__*/React.forwardRef(function PopoverTitle(componentProps, forwardedRef) {\n const {\n render,\n className,\n ...elementProps\n } = componentProps;\n const {\n store\n } = usePopoverRootContext();\n const id = useBaseUiId(elementProps.id);\n useIsoLayoutEffect(() => {\n store.set('titleElementId', id);\n return () => {\n store.set('titleElementId', undefined);\n };\n }, [store, id]);\n const element = useRenderElement('h2', componentProps, {\n ref: forwardedRef,\n props: [{\n id\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") PopoverTitle.displayName = \"PopoverTitle\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.js\";\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n\n/**\n * A paragraph with additional information about the popover.\n * Renders a `<p>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nexport const PopoverDescription = /*#__PURE__*/React.forwardRef(function PopoverDescription(componentProps, forwardedRef) {\n const {\n render,\n className,\n ...elementProps\n } = componentProps;\n const {\n store\n } = usePopoverRootContext();\n const id = useBaseUiId(elementProps.id);\n useIsoLayoutEffect(() => {\n store.set('descriptionElementId', id);\n return () => {\n store.set('descriptionElementId', undefined);\n };\n }, [store, id]);\n const element = useRenderElement('p', componentProps, {\n ref: forwardedRef,\n props: [{\n id\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") PopoverDescription.displayName = \"PopoverDescription\";","'use client';\n\nimport * as React from 'react';\nimport { usePopoverRootContext } from \"../root/PopoverRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useButton } from \"../../use-button/index.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\n\n/**\n * A button that closes the popover.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover)\n */\nexport const PopoverClose = /*#__PURE__*/React.forwardRef(function PopoverClose(props, forwardedRef) {\n const {\n render,\n className,\n disabled = false,\n nativeButton = true,\n ...elementProps\n } = props;\n const {\n buttonRef,\n getButtonProps\n } = useButton({\n disabled,\n focusableWhenDisabled: false,\n native: nativeButton\n });\n const {\n store\n } = usePopoverRootContext();\n const element = useRenderElement('button', props, {\n ref: [forwardedRef, buttonRef],\n props: [{\n onClick(event) {\n store.setOpen(false, createChangeEventDetails(REASONS.closePress, event.nativeEvent, event.currentTarget));\n }\n }, elementProps, getButtonProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") PopoverClose.displayName = \"PopoverClose\";","import * as React from \"react\";\nimport { Popover } from \"@base-ui-components/react/popover\";\nimport styles from \"./index.module.css\";\n\nexport const ALSPopoverRoot = Popover.Root;\n\nexport const ALSPopoverTrigger = React.forwardRef<\n HTMLButtonElement,\n Popover.Trigger.Props\n>(function ALSPopoverTrigger({ children, ...props }, ref) {\n return (\n <Popover.Trigger\n {...props}\n ref={ref}\n nativeButton={false}\n render={(props) =>\n React.cloneElement(children as React.ReactElement, props)\n }\n />\n );\n});\n\nexport const ALSPopoverPortal = Popover.Portal;\n\nexport const ALSPopoverPositioner = React.forwardRef<\n HTMLDivElement,\n Popover.Positioner.Props\n>(function ALSPopoverPositioner(props, ref) {\n return <Popover.Positioner {...props} ref={ref} />;\n});\n\nexport const ALSPopoverPopup = React.forwardRef<\n HTMLDivElement,\n Popover.Popup.Props\n>(function ALSPopoverPopup({ className, ...props }, ref) {\n return (\n <Popover.Popup\n {...props}\n className={`${styles.popup} ${className || \"\"}`}\n ref={ref}\n />\n );\n});\n\nexport const ALSPopoverArrow = React.forwardRef<\n HTMLDivElement,\n Popover.Arrow.Props\n>(function ALSPopoverArrow({ className, ...props }, ref) {\n return (\n <Popover.Arrow\n {...props}\n className={`${styles.arrow} ${className || \"\"}`}\n ref={ref}\n />\n );\n});\n\nexport const ALSPopoverTitle = React.forwardRef<\n HTMLHeadingElement,\n Popover.Title.Props\n>(function ALSPopoverTitle({ className, ...props }, ref) {\n return (\n <Popover.Title\n {...props}\n className={`${styles.title} ${className || \"\"}`}\n ref={ref}\n />\n );\n});\n\nexport const ALSPopoverDescription = React.forwardRef<\n HTMLParagraphElement,\n Popover.Description.Props\n>(function ALSPopoverDescription({ className, ...props }, ref) {\n return (\n <Popover.Description\n {...props}\n className={`${styles.description} ${className || \"\"}`}\n ref={ref}\n />\n );\n});\n\nexport const ALSPopoverClose = React.forwardRef<\n HTMLButtonElement,\n Popover.Close.Props\n>(function ALSPopoverClose({ className, ...props }, ref) {\n return (\n <Popover.Close\n {...props}\n className={`${styles.close} ${className || \"\"}`}\n ref={ref}\n />\n );\n});\n\nexport const ALSPopoverBackdrop = React.forwardRef<\n HTMLDivElement,\n Popover.Backdrop.Props\n>(function ALSPopoverBackdrop({ className, ...props }, ref) {\n return (\n <Popover.Backdrop\n {...props}\n className={`${styles.backdrop} ${className || \"\"}`}\n ref={ref}\n />\n );\n});\n\nexport const ALSPopover = {\n Root: ALSPopoverRoot,\n Trigger: ALSPopoverTrigger,\n Portal: ALSPopoverPortal,\n Positioner: ALSPopoverPositioner,\n Popup: ALSPopoverPopup,\n Arrow: ALSPopoverArrow,\n Title: ALSPopoverTitle,\n Description: ALSPopoverDescription,\n Close: ALSPopoverClose,\n Backdrop: ALSPopoverBackdrop,\n};\n\nexport type {\n PopoverRootProps as ALSPopoverRootProps,\n PopoverTriggerProps as ALSPopoverTriggerProps,\n PopoverPortalProps as ALSPopoverPortalProps,\n PopoverPositionerProps as ALSPopoverPositionerProps,\n PopoverPopupProps as ALSPopoverPopupProps,\n PopoverArrowProps as ALSPopoverArrowProps,\n PopoverTitleProps as ALSPopoverTitleProps,\n PopoverDescriptionProps as ALSPopoverDescriptionProps,\n PopoverCloseProps as ALSPopoverCloseProps,\n PopoverBackdropProps as ALSPopoverBackdropProps,\n} from \"@base-ui-components/react/popover\";\n","import styles from './index.module.css';\n\nexport interface ALSPreviewCardProps {\n // TODO: Define props\n}\n\nexport function ALSPreviewCard(props: ALSPreviewCardProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement PreviewCard */}\n </div>\n );\n}\n\nexport default ALSPreviewCard;\n","export const cache = new Map();\nexport function getFormatter(locale, options) {\n const optionsString = JSON.stringify({\n locale,\n options\n });\n const cachedFormatter = cache.get(optionsString);\n if (cachedFormatter) {\n return cachedFormatter;\n }\n const formatter = new Intl.NumberFormat(locale, options);\n cache.set(optionsString, formatter);\n return formatter;\n}\nexport function formatNumber(value, locale, options) {\n if (value == null) {\n return '';\n }\n return getFormatter(locale, options).format(value);\n}\nexport function formatNumberMaxPrecision(value, locale, options) {\n return formatNumber(value, locale, {\n ...options,\n maximumFractionDigits: 20\n });\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\n/**\n * @internal\n */\nexport const ProgressRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ProgressRootContext.displayName = \"ProgressRootContext\";\nexport function useProgressRootContext() {\n const context = React.useContext(ProgressRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.' : _formatErrorMessage(51));\n }\n return context;\n}","export let ProgressRootDataAttributes = /*#__PURE__*/function (ProgressRootDataAttributes) {\n /**\n * Present when the progress has completed.\n */\n ProgressRootDataAttributes[\"complete\"] = \"data-complete\";\n /**\n * Present when the progress is in interminate state.\n */\n ProgressRootDataAttributes[\"indeterminate\"] = \"data-indeterminate\";\n /**\n * Present while the progress is progressing.\n */\n ProgressRootDataAttributes[\"progressing\"] = \"data-progressing\";\n return ProgressRootDataAttributes;\n}({});","import { ProgressRootDataAttributes } from \"./ProgressRootDataAttributes.js\";\nexport const progressStateAttributesMapping = {\n status(value) {\n if (value === 'progressing') {\n return {\n [ProgressRootDataAttributes.progressing]: ''\n };\n }\n if (value === 'complete') {\n return {\n [ProgressRootDataAttributes.complete]: ''\n };\n }\n if (value === 'indeterminate') {\n return {\n [ProgressRootDataAttributes.indeterminate]: ''\n };\n }\n return null;\n }\n};","'use client';\n\nimport * as React from 'react';\nimport { useValueAsRef } from '@base-ui-components/utils/useValueAsRef';\nimport { formatNumber } from \"../../utils/formatNumber.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { ProgressRootContext } from \"./ProgressRootContext.js\";\nimport { progressStateAttributesMapping } from \"./stateAttributesMapping.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction formatValue(value, locale, format) {\n if (value == null) {\n return '';\n }\n if (!format) {\n return formatNumber(value / 100, locale, {\n style: 'percent'\n });\n }\n return formatNumber(value, locale, format);\n}\nfunction getDefaultAriaValueText(formattedValue, value) {\n if (value == null) {\n return 'indeterminate progress';\n }\n return formattedValue || `${value}%`;\n}\n\n/**\n * Groups all parts of the progress bar and provides the task completion status to screen readers.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Progress](https://base-ui.com/react/components/progress)\n */\nexport const ProgressRoot = /*#__PURE__*/React.forwardRef(function ProgressRoot(componentProps, forwardedRef) {\n const {\n format,\n getAriaValueText = getDefaultAriaValueText,\n locale,\n max = 100,\n min = 0,\n value,\n render,\n className,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState();\n const formatOptionsRef = useValueAsRef(format);\n let status = 'indeterminate';\n if (Number.isFinite(value)) {\n status = value === max ? 'complete' : 'progressing';\n }\n const formattedValue = formatValue(value, locale, formatOptionsRef.current);\n const state = React.useMemo(() => ({\n status\n }), [status]);\n const defaultProps = {\n 'aria-labelledby': labelId,\n 'aria-valuemax': max,\n 'aria-valuemin': min,\n 'aria-valuenow': value ?? undefined,\n 'aria-valuetext': getAriaValueText(formattedValue, value),\n role: 'progressbar'\n };\n const contextValue = React.useMemo(() => ({\n formattedValue,\n max,\n min,\n setLabelId,\n state,\n status,\n value\n }), [formattedValue, max, min, setLabelId, state, status, value]);\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: [defaultProps, elementProps],\n stateAttributesMapping: progressStateAttributesMapping\n });\n return /*#__PURE__*/_jsx(ProgressRootContext.Provider, {\n value: contextValue,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") ProgressRoot.displayName = \"ProgressRoot\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useProgressRootContext } from \"../root/ProgressRootContext.js\";\nimport { progressStateAttributesMapping } from \"../root/stateAttributesMapping.js\";\n/**\n * Contains the progress bar indicator.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Progress](https://base-ui.com/react/components/progress)\n */\nexport const ProgressTrack = /*#__PURE__*/React.forwardRef(function ProgressTrack(componentProps, forwardedRef) {\n const {\n render,\n className,\n ...elementProps\n } = componentProps;\n const {\n state\n } = useProgressRootContext();\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: elementProps,\n stateAttributesMapping: progressStateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ProgressTrack.displayName = \"ProgressTrack\";","export function valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { valueToPercent } from \"../../utils/valueToPercent.js\";\nimport { useProgressRootContext } from \"../root/ProgressRootContext.js\";\nimport { progressStateAttributesMapping } from \"../root/stateAttributesMapping.js\";\n/**\n * Visualizes the completion status of the task.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Progress](https://base-ui.com/react/components/progress)\n */\nexport const ProgressIndicator = /*#__PURE__*/React.forwardRef(function ProgressIndicator(componentProps, forwardedRef) {\n const {\n render,\n className,\n ...elementProps\n } = componentProps;\n const {\n max,\n min,\n value,\n state\n } = useProgressRootContext();\n const percentageValue = Number.isFinite(value) && value !== null ? valueToPercent(value, min, max) : null;\n const getStyles = React.useCallback(() => {\n if (percentageValue == null) {\n return {};\n }\n return {\n insetInlineStart: 0,\n height: 'inherit',\n width: `${percentageValue}%`\n };\n }, [percentageValue]);\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n style: getStyles()\n }, elementProps],\n stateAttributesMapping: progressStateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ProgressIndicator.displayName = \"ProgressIndicator\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useProgressRootContext } from \"../root/ProgressRootContext.js\";\nimport { progressStateAttributesMapping } from \"../root/stateAttributesMapping.js\";\n/**\n * A text label displaying the current value.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Progress](https://base-ui.com/react/components/progress)\n */\nexport const ProgressValue = /*#__PURE__*/React.forwardRef(function ProgressValue(componentProps, forwardedRef) {\n const {\n className,\n render,\n children,\n ...elementProps\n } = componentProps;\n const {\n value,\n formattedValue,\n state\n } = useProgressRootContext();\n const formattedValueArg = value == null ? 'indeterminate' : formattedValue;\n const formattedValueDisplay = value == null ? null : formattedValue;\n const element = useRenderElement('span', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n 'aria-hidden': true,\n children: typeof children === 'function' ? children(formattedValueArg, value) : formattedValueDisplay\n }, elementProps],\n stateAttributesMapping: progressStateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ProgressValue.displayName = \"ProgressValue\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useProgressRootContext } from \"../root/ProgressRootContext.js\";\nimport { progressStateAttributesMapping } from \"../root/stateAttributesMapping.js\";\n/**\n * An accessible label for the progress bar.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Progress](https://base-ui.com/react/components/progress)\n */\nexport const ProgressLabel = /*#__PURE__*/React.forwardRef(function ProgressLabel(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n ...elementProps\n } = componentProps;\n const id = useBaseUiId(idProp);\n const {\n setLabelId,\n state\n } = useProgressRootContext();\n useIsoLayoutEffect(() => {\n setLabelId(id);\n return () => setLabelId(undefined);\n }, [id, setLabelId]);\n const element = useRenderElement('span', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n id\n }, elementProps],\n stateAttributesMapping: progressStateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ProgressLabel.displayName = \"ProgressLabel\";","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import { Progress } from \"@base-ui-components/react/progress\";\nimport clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport type React from \"react\";\nimport styles from \"./index.module.css\";\n\n/**\n * Progress variant types\n */\nexport type ProgressVariant = \"primary\" | \"success\" | \"warning\" | \"error\";\n\n/**\n * Progress size types\n */\nexport type ProgressSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Props for ALSProgressRoot component\n */\nexport interface ALSProgressRootProps\n extends React.ComponentPropsWithoutRef<typeof Progress.Root> {\n variant?: ProgressVariant;\n size?: ProgressSize;\n}\n\n/**\n * Props for ALSProgressTrack component\n */\nexport type ALSProgressTrackProps = React.ComponentPropsWithoutRef<\n typeof Progress.Track\n>;\n\n/**\n * Props for ALSProgressIndicator component\n */\nexport type ALSProgressIndicatorProps = React.ComponentPropsWithoutRef<\n typeof Progress.Indicator\n>;\n\n/**\n * Props for ALSProgressLabel component\n */\nexport type ALSProgressLabelProps = React.ComponentPropsWithoutRef<\n typeof Progress.Label\n>;\n\n/**\n * Props for ALSProgressValue component\n */\nexport type ALSProgressValueProps = React.ComponentPropsWithoutRef<\n typeof Progress.Value\n>;\n\n/**\n * Root component that provides progress state context\n */\nconst ALSProgressRoot = forwardRef<HTMLDivElement, ALSProgressRootProps>(\n ({ className, variant = \"primary\", size = \"md\", ...props }, ref) => {\n return (\n <Progress.Root\n ref={ref}\n className={clsx(\n styles.root,\n styles[`variant-${variant}`],\n styles[`size-${size}`],\n className\n )}\n {...props}\n />\n );\n }\n);\nALSProgressRoot.displayName = \"ALSProgressRoot\";\n\n/**\n * Container for the progress indicator\n */\nconst ALSProgressTrack = forwardRef<HTMLDivElement, ALSProgressTrackProps>(\n ({ className, ...props }, ref) => {\n return (\n <Progress.Track\n ref={ref}\n className={clsx(styles.track, className)}\n {...props}\n />\n );\n }\n);\nALSProgressTrack.displayName = \"ALSProgressTrack\";\n\n/**\n * Visual indicator showing progress completion\n */\nconst ALSProgressIndicator = forwardRef<\n HTMLDivElement,\n ALSProgressIndicatorProps\n>(({ className, ...props }, ref) => {\n return (\n <Progress.Indicator\n ref={ref}\n className={clsx(styles.indicator, className)}\n {...props}\n />\n );\n});\nALSProgressIndicator.displayName = \"ALSProgressIndicator\";\n\n/**\n * Optional label for the progress bar\n */\nconst ALSProgressLabel = forwardRef<HTMLSpanElement, ALSProgressLabelProps>(\n ({ className, ...props }, ref) => {\n return (\n <Progress.Label\n ref={ref}\n className={clsx(styles.label, className)}\n {...props}\n />\n );\n }\n);\nALSProgressLabel.displayName = \"ALSProgressLabel\";\n\n/**\n * Optional value display (e.g., \"75%\")\n */\nconst ALSProgressValue = forwardRef<HTMLSpanElement, ALSProgressValueProps>(\n ({ className, ...props }, ref) => {\n return (\n <Progress.Value\n ref={ref}\n className={clsx(styles.value, className)}\n {...props}\n />\n );\n }\n);\nALSProgressValue.displayName = \"ALSProgressValue\";\n\nexport {\n ALSProgressRoot,\n ALSProgressTrack,\n ALSProgressIndicator,\n ALSProgressLabel,\n ALSProgressValue,\n};\n","import {\n ALSProgressRoot,\n ALSProgressTrack,\n ALSProgressIndicator,\n ALSProgressLabel,\n ALSProgressValue,\n} from \"./ALSProgress\";\n\nimport type {\n ALSProgressRootProps,\n ALSProgressTrackProps,\n ALSProgressIndicatorProps,\n ALSProgressLabelProps,\n ALSProgressValueProps,\n} from \"./ALSProgress\";\n\n/**\n * ALSProgress compound component\n */\nexport const ALSProgress = {\n Root: ALSProgressRoot,\n Track: ALSProgressTrack,\n Indicator: ALSProgressIndicator,\n Label: ALSProgressLabel,\n Value: ALSProgressValue,\n};\n\nexport type {\n ALSProgressRootProps,\n ALSProgressTrackProps,\n ALSProgressIndicatorProps,\n ALSProgressLabelProps,\n ALSProgressValueProps,\n};\n","import styles from './index.module.css';\n\nexport interface ALSRadioProps {\n // TODO: Define props\n}\n\nexport function ALSRadio(props: ALSRadioProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Radio */}\n </div>\n );\n}\n\nexport default ALSRadio;\n","import styles from './index.module.css';\n\nexport interface ALSScrollAreaProps {\n // TODO: Define props\n}\n\nexport function ALSScrollArea(props: ALSScrollAreaProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement ScrollArea */}\n </div>\n );\n}\n\nexport default ALSScrollArea;\n","import * as React from 'react';\nexport function useOnFirstRender(fn) {\n const ref = React.useRef(true);\n if (ref.current) {\n ref.current = false;\n fn();\n }\n}","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectRootContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") SelectRootContext.displayName = \"SelectRootContext\";\nexport const SelectFloatingContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") SelectFloatingContext.displayName = \"SelectFloatingContext\";\nexport function useSelectRootContext() {\n const context = React.useContext(SelectRootContext);\n if (context === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(60));\n }\n return context;\n}\nexport function useSelectFloatingContext() {\n const context = React.useContext(SelectFloatingContext);\n if (context === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.' : _formatErrorMessage(61));\n }\n return context;\n}","export const defaultItemEquality = (item, value) => Object.is(item, value);\nexport function compareItemEquality(item, value, comparer) {\n if (item == null || value == null) {\n return Object.is(item, value);\n }\n return comparer(item, value);\n}\nexport function itemIncludes(collection, value, comparer) {\n if (!collection || collection.length === 0) {\n return false;\n }\n return collection.some(item => {\n if (item === undefined) {\n return false;\n }\n return compareItemEquality(item, value, comparer);\n });\n}\nexport function findItemIndex(collection, value, comparer) {\n if (!collection || collection.length === 0) {\n return -1;\n }\n return collection.findIndex(item => {\n if (item === undefined) {\n return false;\n }\n return compareItemEquality(item, value, comparer);\n });\n}\nexport function removeItem(collection, value, comparer) {\n return collection.filter(item => !compareItemEquality(item, value, comparer));\n}","export function serializeValue(value) {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n}","'use client';\n\nimport { serializeValue } from \"./serializeValue.js\";\nexport function isGroupedItems(items) {\n return items != null && items.length > 0 && typeof items[0] === 'object' && items[0] != null && 'items' in items[0];\n}\nexport function stringifyAsLabel(item, itemToStringLabel) {\n if (itemToStringLabel && item != null) {\n return itemToStringLabel(item) ?? '';\n }\n if (item && typeof item === 'object') {\n if ('label' in item && item.label != null) {\n return String(item.label);\n }\n if ('value' in item) {\n return String(item.value);\n }\n }\n return serializeValue(item);\n}\nexport function stringifyAsValue(item, itemToStringValue) {\n if (itemToStringValue && item != null) {\n return itemToStringValue(item) ?? '';\n }\n if (item && typeof item === 'object' && 'value' in item && 'label' in item) {\n return serializeValue(item.value);\n }\n return serializeValue(item);\n}\nexport function resolveSelectedLabel(value, items, itemToStringLabel) {\n if (itemToStringLabel && value != null) {\n return itemToStringLabel(value);\n }\n\n // Custom object with explicit label takes precedence\n if (value && typeof value === 'object' && 'label' in value && value.label != null) {\n return value.label;\n }\n\n // Items provided as plain record map\n if (items && !Array.isArray(items)) {\n return items[value] ?? stringifyAsLabel(value, itemToStringLabel);\n }\n\n // Items provided as array (flat or grouped)\n if (Array.isArray(items)) {\n const flatItems = isGroupedItems(items) ? items.flatMap(g => g.items) : items;\n\n // If no value selected, prefer the null option label when available\n if (value == null) {\n const nullItem = flatItems.find(it => it.value == null);\n if (nullItem && nullItem.label != null) {\n return nullItem.label;\n }\n return stringifyAsLabel(value, itemToStringLabel);\n }\n\n // Primitive selected value: map to first matching item's label\n if (typeof value !== 'object') {\n const match = flatItems.find(it => it && it.value === value);\n if (match && match.label != null) {\n return match.label;\n }\n return stringifyAsLabel(value, itemToStringLabel);\n }\n\n // Object without explicit label: try matching by its `value` property\n if ('value' in value) {\n const match = flatItems.find(it => it && it.value === value.value);\n if (match && match.label != null) {\n return match.label;\n }\n }\n }\n return stringifyAsLabel(value, itemToStringLabel);\n}\nexport function resolveMultipleLabels(values, itemToStringLabel) {\n if (!Array.isArray(values) || values.length === 0) {\n return '';\n }\n return values.map(v => stringifyAsLabel(v, itemToStringLabel)).join(', ');\n}","import { createSelector } from '@base-ui-components/utils/store';\nimport { compareItemEquality } from \"../utils/itemEquality.js\";\nimport { stringifyAsValue } from \"../utils/resolveValueLabel.js\";\nexport const selectors = {\n id: createSelector(state => state.id),\n modal: createSelector(state => state.modal),\n multiple: createSelector(state => state.multiple),\n items: createSelector(state => state.items),\n itemToStringLabel: createSelector(state => state.itemToStringLabel),\n itemToStringValue: createSelector(state => state.itemToStringValue),\n isItemEqualToValue: createSelector(state => state.isItemEqualToValue),\n value: createSelector(state => state.value),\n open: createSelector(state => state.open),\n mounted: createSelector(state => state.mounted),\n forceMount: createSelector(state => state.forceMount),\n transitionStatus: createSelector(state => state.transitionStatus),\n touchModality: createSelector(state => state.touchModality),\n activeIndex: createSelector(state => state.activeIndex),\n selectedIndex: createSelector(state => state.selectedIndex),\n isActive: createSelector((state, index) => state.activeIndex === index),\n isSelected: createSelector((state, index, candidate) => {\n const comparer = state.isItemEqualToValue;\n const storeValue = state.value;\n if (state.multiple) {\n return Array.isArray(storeValue) && storeValue.some(item => compareItemEquality(item, candidate, comparer));\n }\n\n // `selectedIndex` is only updated after the items mount for the first time,\n // the value check avoids a re-render for the initially selected item.\n if (state.selectedIndex === index && state.selectedIndex !== null) {\n return true;\n }\n return compareItemEquality(storeValue, candidate, comparer);\n }),\n isSelectedByFocus: createSelector((state, index) => {\n return state.selectedIndex === index;\n }),\n popupProps: createSelector(state => state.popupProps),\n triggerProps: createSelector(state => state.triggerProps),\n triggerElement: createSelector(state => state.triggerElement),\n positionerElement: createSelector(state => state.positionerElement),\n listElement: createSelector(state => state.listElement),\n scrollUpArrowVisible: createSelector(state => state.scrollUpArrowVisible),\n scrollDownArrowVisible: createSelector(state => state.scrollDownArrowVisible),\n hasScrollArrows: createSelector(state => state.hasScrollArrows),\n serializedValue: createSelector(state => {\n const {\n multiple,\n value,\n itemToStringValue\n } = state;\n if (multiple && Array.isArray(value) && value.length === 0) {\n return '';\n }\n return stringifyAsValue(value, itemToStringValue);\n })\n};","import * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nexport function useValueChanged(value, onChange) {\n const valueRef = React.useRef(value);\n const onChangeCallback = useStableCallback(onChange);\n useIsoLayoutEffect(() => {\n if (valueRef.current === value) {\n return;\n }\n onChangeCallback(valueRef.current);\n }, [value, onChangeCallback]);\n useIsoLayoutEffect(() => {\n valueRef.current = value;\n }, [value]);\n}","'use client';\n\nimport * as React from 'react';\nimport { visuallyHidden } from '@base-ui-components/utils/visuallyHidden';\nimport { useMergedRefs } from '@base-ui-components/utils/useMergedRefs';\nimport { useRefWithInit } from '@base-ui-components/utils/useRefWithInit';\nimport { useOnFirstRender } from '@base-ui-components/utils/useOnFirstRender';\nimport { useControlled } from '@base-ui-components/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui-components/utils/useValueAsRef';\nimport { useStore, Store } from '@base-ui-components/utils/store';\nimport { useClick, useDismiss, useFloatingRootContext, useInteractions, useListNavigation, useTypeahead } from \"../../floating-ui-react/index.js\";\nimport { SelectRootContext, SelectFloatingContext } from \"./SelectRootContext.js\";\nimport { useFieldRootContext } from \"../../field/root/FieldRootContext.js\";\nimport { useLabelableContext } from \"../../labelable-provider/LabelableContext.js\";\nimport { useLabelableId } from \"../../labelable-provider/useLabelableId.js\";\nimport { useTransitionStatus } from \"../../utils/useTransitionStatus.js\";\nimport { selectors } from \"../store.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useOpenChangeComplete } from \"../../utils/useOpenChangeComplete.js\";\nimport { useFormContext } from \"../../form/FormContext.js\";\nimport { useField } from \"../../field/useField.js\";\nimport { stringifyAsValue } from \"../../utils/resolveValueLabel.js\";\nimport { EMPTY_ARRAY } from \"../../utils/constants.js\";\nimport { defaultItemEquality, findItemIndex } from \"../../utils/itemEquality.js\";\nimport { useValueChanged } from \"../../utils/useValueChanged.js\";\n\n/**\n * Groups all parts of the select.\n * Doesn’t render its own HTML element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function SelectRoot(props) {\n const {\n id,\n value: valueProp,\n defaultValue = null,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n name: nameProp,\n disabled: disabledProp = false,\n readOnly = false,\n required = false,\n modal = true,\n actionsRef,\n inputRef,\n onOpenChangeComplete,\n items,\n multiple = false,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue = defaultItemEquality,\n children\n } = props;\n const {\n clearErrors\n } = useFormContext();\n const {\n setDirty,\n shouldValidateOnChange,\n validityData,\n setFilled,\n name: fieldName,\n disabled: fieldDisabled,\n validation\n } = useFieldRootContext();\n const {\n controlId\n } = useLabelableContext();\n const generatedId = useLabelableId({\n id\n });\n const disabled = fieldDisabled || disabledProp;\n const name = fieldName ?? nameProp;\n const [value, setValueUnwrapped] = useControlled({\n controlled: valueProp,\n default: multiple ? defaultValue ?? EMPTY_ARRAY : defaultValue,\n name: 'Select',\n state: 'value'\n });\n const [open, setOpenUnwrapped] = useControlled({\n controlled: openProp,\n default: defaultOpen,\n name: 'Select',\n state: 'open'\n });\n const listRef = React.useRef([]);\n const labelsRef = React.useRef([]);\n const popupRef = React.useRef(null);\n const scrollHandlerRef = React.useRef(null);\n const scrollArrowsMountedCountRef = React.useRef(0);\n const valueRef = React.useRef(null);\n const valuesRef = React.useRef([]);\n const typingRef = React.useRef(false);\n const keyboardActiveRef = React.useRef(false);\n const selectedItemTextRef = React.useRef(null);\n const selectionRef = React.useRef({\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false\n });\n const alignItemWithTriggerActiveRef = React.useRef(false);\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open);\n const store = useRefWithInit(() => new Store({\n id: generatedId,\n modal,\n multiple,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue,\n value,\n open,\n mounted,\n transitionStatus,\n items,\n forceMount: false,\n touchModality: false,\n activeIndex: null,\n selectedIndex: null,\n popupProps: {},\n triggerProps: {},\n triggerElement: null,\n positionerElement: null,\n listElement: null,\n scrollUpArrowVisible: false,\n scrollDownArrowVisible: false,\n hasScrollArrows: false\n })).current;\n const activeIndex = useStore(store, selectors.activeIndex);\n const selectedIndex = useStore(store, selectors.selectedIndex);\n const triggerElement = useStore(store, selectors.triggerElement);\n const positionerElement = useStore(store, selectors.positionerElement);\n const serializedValue = React.useMemo(() => {\n if (multiple && Array.isArray(value) && value.length === 0) {\n return '';\n }\n return stringifyAsValue(value, itemToStringValue);\n }, [multiple, value, itemToStringValue]);\n const controlRef = useValueAsRef(store.state.triggerElement);\n useField({\n id: generatedId,\n commit: validation.commit,\n value,\n controlRef,\n name,\n getValue: () => value\n });\n const initialValueRef = React.useRef(value);\n useIsoLayoutEffect(() => {\n // Ensure the values and labels are registered for programmatic value changes.\n if (value !== initialValueRef.current) {\n store.set('forceMount', true);\n }\n }, [store, value]);\n useIsoLayoutEffect(() => {\n setFilled(value !== null);\n }, [value, setFilled]);\n useIsoLayoutEffect(function syncSelectedIndex() {\n if (open) {\n return;\n }\n const registry = valuesRef.current;\n if (multiple) {\n const currentValue = Array.isArray(value) ? value : [];\n if (currentValue.length === 0) {\n store.set('selectedIndex', null);\n return;\n }\n const lastValue = currentValue[currentValue.length - 1];\n const lastIndex = findItemIndex(registry, lastValue, isItemEqualToValue);\n store.set('selectedIndex', lastIndex === -1 ? null : lastIndex);\n return;\n }\n const index = findItemIndex(registry, value, isItemEqualToValue);\n store.set('selectedIndex', index === -1 ? null : index);\n }, [multiple, open, value, valuesRef, isItemEqualToValue, store]);\n useValueChanged(value, () => {\n clearErrors(name);\n setDirty(value !== validityData.initialValue);\n if (shouldValidateOnChange()) {\n validation.commit(value);\n } else {\n validation.commit(value, true);\n }\n });\n const setOpen = useStableCallback((nextOpen, eventDetails) => {\n onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setOpenUnwrapped(nextOpen);\n\n // The active index will sync to the last selected index on the next open.\n // Workaround `enableFocusInside` in Floating UI setting `tabindex=0` of a non-highlighted\n // option upon close when tabbing out due to `keepMounted=true`:\n // https://github.com/floating-ui/floating-ui/pull/3004/files#diff-962a7439cdeb09ea98d4b622a45d517bce07ad8c3f866e089bda05f4b0bbd875R194-R199\n // This otherwise causes options to retain `tabindex=0` incorrectly when the popup is closed\n // when tabbing outside.\n if (!nextOpen && store.state.activeIndex !== null) {\n const activeOption = listRef.current[store.state.activeIndex];\n // Wait for Floating UI's focus effect to have fired\n queueMicrotask(() => {\n activeOption?.setAttribute('tabindex', '-1');\n });\n }\n });\n const handleUnmount = useStableCallback(() => {\n setMounted(false);\n store.set('activeIndex', null);\n onOpenChangeComplete?.(false);\n });\n useOpenChangeComplete({\n enabled: !actionsRef,\n open,\n ref: popupRef,\n onComplete() {\n if (!open) {\n handleUnmount();\n }\n }\n });\n React.useImperativeHandle(actionsRef, () => ({\n unmount: handleUnmount\n }), [handleUnmount]);\n const setValue = useStableCallback((nextValue, eventDetails) => {\n onValueChange?.(nextValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setValueUnwrapped(nextValue);\n });\n const handleScrollArrowVisibility = useStableCallback(() => {\n const scroller = store.state.listElement || popupRef.current;\n if (!scroller) {\n return;\n }\n const viewportTop = scroller.scrollTop;\n const viewportBottom = scroller.scrollTop + scroller.clientHeight;\n const shouldShowUp = viewportTop > 1;\n const shouldShowDown = viewportBottom < scroller.scrollHeight - 1;\n if (store.state.scrollUpArrowVisible !== shouldShowUp) {\n store.set('scrollUpArrowVisible', shouldShowUp);\n }\n if (store.state.scrollDownArrowVisible !== shouldShowDown) {\n store.set('scrollDownArrowVisible', shouldShowDown);\n }\n });\n const floatingContext = useFloatingRootContext({\n open,\n onOpenChange: setOpen,\n elements: {\n reference: triggerElement,\n floating: positionerElement\n }\n });\n const click = useClick(floatingContext, {\n enabled: !readOnly && !disabled,\n event: 'mousedown'\n });\n const dismiss = useDismiss(floatingContext, {\n bubbles: false\n });\n const listNavigation = useListNavigation(floatingContext, {\n enabled: !readOnly && !disabled,\n listRef,\n activeIndex,\n selectedIndex,\n disabledIndices: EMPTY_ARRAY,\n onNavigate(nextActiveIndex) {\n // Retain the highlight while transitioning out.\n if (nextActiveIndex === null && !open) {\n return;\n }\n store.set('activeIndex', nextActiveIndex);\n },\n // Implement our own listeners since `onPointerLeave` on each option fires while scrolling with\n // the `alignItemWithTrigger=true`, causing a performance issue on Chrome.\n focusItemOnHover: false\n });\n const typeahead = useTypeahead(floatingContext, {\n enabled: !readOnly && !disabled && (open || !multiple),\n listRef: labelsRef,\n activeIndex,\n selectedIndex,\n onMatch(index) {\n if (open) {\n store.set('activeIndex', index);\n } else {\n setValue(valuesRef.current[index], createChangeEventDetails('none'));\n }\n },\n onTypingChange(typing) {\n // FIXME: Floating UI doesn't support allowing space to select an item while the popup is\n // closed and the trigger isn't a native <button>.\n typingRef.current = typing;\n }\n });\n const {\n getReferenceProps,\n getFloatingProps,\n getItemProps\n } = useInteractions([click, dismiss, listNavigation, typeahead]);\n useOnFirstRender(() => {\n store.update({\n popupProps: getFloatingProps(),\n triggerProps: getReferenceProps()\n });\n });\n useIsoLayoutEffect(() => {\n store.update({\n id: generatedId,\n modal,\n multiple,\n value,\n open,\n mounted,\n transitionStatus,\n popupProps: getFloatingProps(),\n triggerProps: getReferenceProps(),\n items,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue\n });\n }, [store, generatedId, modal, multiple, value, open, mounted, transitionStatus, getFloatingProps, getReferenceProps, items, itemToStringLabel, itemToStringValue, isItemEqualToValue]);\n const contextValue = React.useMemo(() => ({\n store,\n name,\n required,\n disabled,\n readOnly,\n multiple,\n itemToStringLabel,\n itemToStringValue,\n setValue,\n setOpen,\n listRef,\n popupRef,\n scrollHandlerRef,\n handleScrollArrowVisibility,\n scrollArrowsMountedCountRef,\n getItemProps,\n events: floatingContext.context.events,\n valueRef,\n valuesRef,\n labelsRef,\n typingRef,\n selectionRef,\n selectedItemTextRef,\n validation,\n onOpenChangeComplete,\n keyboardActiveRef,\n alignItemWithTriggerActiveRef,\n initialValueRef\n }), [store, name, required, disabled, readOnly, multiple, itemToStringLabel, itemToStringValue, setValue, setOpen, getItemProps, floatingContext.context.events, validation, onOpenChangeComplete, handleScrollArrowVisibility]);\n const ref = useMergedRefs(inputRef, validation.inputRef);\n const hasMultipleSelection = multiple && Array.isArray(value) && value.length > 0;\n const hiddenInputs = React.useMemo(() => {\n if (!multiple || !Array.isArray(value) || !name) {\n return null;\n }\n return value.map(v => {\n const currentSerializedValue = stringifyAsValue(v, itemToStringValue);\n return /*#__PURE__*/_jsx(\"input\", {\n type: \"hidden\",\n name: name,\n value: currentSerializedValue\n }, currentSerializedValue);\n });\n }, [multiple, value, name, itemToStringValue]);\n return /*#__PURE__*/_jsx(SelectRootContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsxs(SelectFloatingContext.Provider, {\n value: floatingContext,\n children: [children, /*#__PURE__*/_jsx(\"input\", {\n ...validation.getInputValidationProps({\n onFocus() {\n // Move focus to the trigger element when the hidden input is focused.\n store.state.triggerElement?.focus();\n },\n // Handle browser autofill.\n onChange(event) {\n // Workaround for https://github.com/facebook/react/issues/9023\n if (event.nativeEvent.defaultPrevented) {\n return;\n }\n const nextValue = event.target.value;\n const details = createChangeEventDetails(REASONS.none, event.nativeEvent);\n function handleChange() {\n if (multiple) {\n // Browser autofill only writes a single scalar value.\n return;\n }\n\n // Handle single selection: match against registered values using serialization\n const matchingValue = valuesRef.current.find(v => {\n const candidate = stringifyAsValue(v, itemToStringValue);\n if (candidate.toLowerCase() === nextValue.toLowerCase()) {\n return true;\n }\n return false;\n });\n if (matchingValue != null) {\n setDirty(matchingValue !== validityData.initialValue);\n setValue(matchingValue, details);\n if (shouldValidateOnChange()) {\n validation.commit(matchingValue);\n }\n }\n }\n store.set('forceMount', true);\n queueMicrotask(handleChange);\n }\n }),\n id: id || controlId || undefined,\n name: multiple ? undefined : name,\n value: serializedValue,\n disabled: disabled,\n required: required && !hasMultipleSelection,\n readOnly: readOnly,\n ref: ref,\n style: visuallyHidden,\n tabIndex: -1,\n \"aria-hidden\": true\n }), hiddenInputs]\n })\n });\n}","export function getPseudoElementBounds(element) {\n const elementRect = element.getBoundingClientRect();\n\n // Avoid \"Not implemented: window.getComputedStyle(elt, pseudoElt)\"\n if (process.env.NODE_ENV === 'test') {\n return elementRect;\n }\n const beforeStyles = window.getComputedStyle(element, '::before');\n const afterStyles = window.getComputedStyle(element, '::after');\n const hasPseudoElements = beforeStyles.content !== 'none' || afterStyles.content !== 'none';\n if (!hasPseudoElements) {\n return elementRect;\n }\n\n // Get dimensions of pseudo-elements\n const beforeWidth = parseFloat(beforeStyles.width) || 0;\n const beforeHeight = parseFloat(beforeStyles.height) || 0;\n const afterWidth = parseFloat(afterStyles.width) || 0;\n const afterHeight = parseFloat(afterStyles.height) || 0;\n\n // Calculate max dimensions including pseudo-elements\n const totalWidth = Math.max(elementRect.width, beforeWidth, afterWidth);\n const totalHeight = Math.max(elementRect.height, beforeHeight, afterHeight);\n\n // Calculate the differences to extend the bounds\n const widthDiff = totalWidth - elementRect.width;\n const heightDiff = totalHeight - elementRect.height;\n return {\n left: elementRect.left - widthDiff / 2,\n right: elementRect.right + widthDiff / 2,\n top: elementRect.top - heightDiff / 2,\n bottom: elementRect.bottom + heightDiff / 2\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui-components/utils/owner';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useMergedRefs } from '@base-ui-components/utils/useMergedRefs';\nimport { useValueAsRef } from '@base-ui-components/utils/useValueAsRef';\nimport { useStore } from '@base-ui-components/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.js\";\nimport { useFieldRootContext } from \"../../field/root/FieldRootContext.js\";\nimport { useLabelableContext } from \"../../labelable-provider/LabelableContext.js\";\nimport { pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.js\";\nimport { fieldValidityMapping } from \"../../field/utils/constants.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { selectors } from \"../store.js\";\nimport { getPseudoElementBounds } from \"../../utils/getPseudoElementBounds.js\";\nimport { contains, getFloatingFocusElement } from \"../../floating-ui-react/utils.js\";\nimport { mergeProps } from \"../../merge-props/index.js\";\nimport { useButton } from \"../../use-button/index.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nconst BOUNDARY_OFFSET = 2;\nconst stateAttributesMapping = {\n ...pressableTriggerOpenStateMapping,\n ...fieldValidityMapping,\n value: () => null\n};\n\n/**\n * A button that opens the select popup.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectTrigger = /*#__PURE__*/React.forwardRef(function SelectTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled: disabledProp = false,\n nativeButton = true,\n ...elementProps\n } = componentProps;\n const {\n setTouched,\n setFocused,\n validationMode,\n state: fieldState,\n disabled: fieldDisabled\n } = useFieldRootContext();\n const {\n labelId\n } = useLabelableContext();\n const {\n store,\n setOpen,\n selectionRef,\n validation,\n readOnly,\n alignItemWithTriggerActiveRef,\n disabled: selectDisabled,\n keyboardActiveRef\n } = useSelectRootContext();\n const disabled = fieldDisabled || selectDisabled || disabledProp;\n const open = useStore(store, selectors.open);\n const value = useStore(store, selectors.value);\n const triggerProps = useStore(store, selectors.triggerProps);\n const positionerElement = useStore(store, selectors.positionerElement);\n const listElement = useStore(store, selectors.listElement);\n const serializedValue = useStore(store, selectors.serializedValue);\n const positionerRef = useValueAsRef(positionerElement);\n const triggerRef = React.useRef(null);\n const timeoutFocus = useTimeout();\n const timeoutMouseDown = useTimeout();\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const setTriggerElement = useStableCallback(element => {\n store.set('triggerElement', element);\n });\n const mergedRef = useMergedRefs(forwardedRef, triggerRef, buttonRef, setTriggerElement);\n const timeout1 = useTimeout();\n const timeout2 = useTimeout();\n React.useEffect(() => {\n if (open) {\n // mousedown -> move to unselected item -> mouseup should not select within 200ms.\n timeout2.start(200, () => {\n selectionRef.current.allowUnselectedMouseUp = true;\n\n // mousedown -> mouseup on selected item should not select within 400ms.\n timeout1.start(200, () => {\n selectionRef.current.allowSelectedMouseUp = true;\n });\n });\n return () => {\n timeout1.clear();\n timeout2.clear();\n };\n }\n selectionRef.current = {\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false\n };\n timeoutMouseDown.clear();\n return undefined;\n }, [open, selectionRef, timeoutMouseDown, timeout1, timeout2]);\n const ariaControlsId = React.useMemo(() => {\n return listElement?.id ?? getFloatingFocusElement(positionerElement)?.id;\n }, [listElement, positionerElement]);\n const props = mergeProps(triggerProps, {\n role: 'combobox',\n 'aria-expanded': open ? 'true' : 'false',\n 'aria-haspopup': 'listbox',\n 'aria-controls': open ? ariaControlsId : undefined,\n 'aria-labelledby': labelId,\n 'aria-readonly': readOnly || undefined,\n tabIndex: disabled ? -1 : 0,\n ref: mergedRef,\n onFocus(event) {\n setFocused(true);\n // The popup element shouldn't obscure the focused trigger.\n if (open && alignItemWithTriggerActiveRef.current) {\n setOpen(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));\n }\n\n // Saves a re-render on initial click: `forceMount === true` mounts\n // the items before `open === true`. We could sync those cycles better\n // without a timeout, but this is enough for now.\n //\n // XXX: might be causing `act()` warnings.\n timeoutFocus.start(0, () => {\n store.set('forceMount', true);\n });\n },\n onBlur() {\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(value);\n }\n },\n onPointerMove({\n pointerType\n }) {\n keyboardActiveRef.current = false;\n store.set('touchModality', pointerType === 'touch');\n },\n onPointerDown({\n pointerType\n }) {\n store.set('touchModality', pointerType === 'touch');\n },\n onKeyDown() {\n keyboardActiveRef.current = true;\n },\n onMouseDown(event) {\n if (open) {\n return;\n }\n const doc = ownerDocument(event.currentTarget);\n function handleMouseUp(mouseEvent) {\n if (!triggerRef.current) {\n return;\n }\n const mouseUpTarget = mouseEvent.target;\n\n // Early return if clicked on trigger element or its children\n if (contains(triggerRef.current, mouseUpTarget) || contains(positionerRef.current, mouseUpTarget) || mouseUpTarget === triggerRef.current) {\n return;\n }\n const bounds = getPseudoElementBounds(triggerRef.current);\n if (mouseEvent.clientX >= bounds.left - BOUNDARY_OFFSET && mouseEvent.clientX <= bounds.right + BOUNDARY_OFFSET && mouseEvent.clientY >= bounds.top - BOUNDARY_OFFSET && mouseEvent.clientY <= bounds.bottom + BOUNDARY_OFFSET) {\n return;\n }\n setOpen(false, createChangeEventDetails(REASONS.cancelOpen, mouseEvent));\n }\n\n // Firefox can fire this upon mousedown\n timeoutMouseDown.start(0, () => {\n doc.addEventListener('mouseup', handleMouseUp, {\n once: true\n });\n });\n }\n }, validation.getValidationProps, elementProps, getButtonProps);\n\n // ensure nested useButton does not overwrite the combobox role:\n // <Toolbar.Button render={<Select.Trigger />} />\n props.role = 'combobox';\n const state = React.useMemo(() => ({\n ...fieldState,\n open,\n disabled,\n value,\n readOnly,\n placeholder: !serializedValue\n }), [fieldState, open, disabled, value, readOnly, serializedValue]);\n return useRenderElement('button', componentProps, {\n ref: [forwardedRef, triggerRef],\n state,\n stateAttributesMapping,\n props\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectTrigger.displayName = \"SelectTrigger\";","'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui-components/utils/store';\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.js\";\nimport { resolveSelectedLabel, resolveMultipleLabels } from \"../../utils/resolveValueLabel.js\";\nimport { selectors } from \"../store.js\";\nconst stateAttributesMapping = {\n value: () => null\n};\n\n/**\n * A text label of the currently selected item.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectValue = /*#__PURE__*/React.forwardRef(function SelectValue(componentProps, forwardedRef) {\n const {\n className,\n render,\n children: childrenProp,\n ...elementProps\n } = componentProps;\n const {\n store,\n valueRef\n } = useSelectRootContext();\n const value = useStore(store, selectors.value);\n const items = useStore(store, selectors.items);\n const itemToStringLabel = useStore(store, selectors.itemToStringLabel);\n const serializedValue = useStore(store, selectors.serializedValue);\n const state = React.useMemo(() => ({\n value,\n placeholder: !serializedValue\n }), [value, serializedValue]);\n const children = typeof childrenProp === 'function' ? childrenProp(value) : childrenProp ?? (Array.isArray(value) ? resolveMultipleLabels(value, itemToStringLabel) : resolveSelectedLabel(value, items, itemToStringLabel));\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, valueRef],\n props: [{\n children\n }, elementProps],\n stateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectValue.displayName = \"SelectValue\";","'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui-components/utils/store';\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.js\";\nimport { triggerOpenStateMapping } from \"../../utils/popupStateMapping.js\";\nimport { selectors } from \"../store.js\";\n\n/**\n * An icon that indicates that the trigger button opens a select popup.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectIcon = /*#__PURE__*/React.forwardRef(function SelectIcon(componentProps, forwardedRef) {\n const {\n className,\n render,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useSelectRootContext();\n const open = useStore(store, selectors.open);\n const state = React.useMemo(() => ({\n open\n }), [open]);\n const element = useRenderElement('span', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n 'aria-hidden': true,\n children: '▼'\n }, elementProps],\n stateAttributesMapping: triggerOpenStateMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectIcon.displayName = \"SelectIcon\";","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectPortalContext.displayName = \"SelectPortalContext\";\nexport function useSelectPortalContext() {\n const value = React.useContext(SelectPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Select.Portal> is missing.' : _formatErrorMessage(58));\n }\n return value;\n}","'use client';\n\nimport * as React from 'react';\nimport { useStore } from '@base-ui-components/utils/store';\nimport { FloatingPortal } from \"../../floating-ui-react/index.js\";\nimport { SelectPortalContext } from \"./SelectPortalContext.js\";\nimport { useSelectRootContext } from \"../root/SelectRootContext.js\";\nimport { selectors } from \"../store.js\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectPortal = /*#__PURE__*/React.forwardRef(function SelectPortal(portalProps, forwardedRef) {\n const {\n store\n } = useSelectRootContext();\n const mounted = useStore(store, selectors.mounted);\n const forceMount = useStore(store, selectors.forceMount);\n const shouldRender = mounted || forceMount;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(SelectPortalContext.Provider, {\n value: true,\n children: /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPortal.displayName = \"SelectPortal\";","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectPositionerContext.displayName = \"SelectPositionerContext\";\nexport function useSelectPositionerContext() {\n const context = React.useContext(SelectPositionerContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.' : _formatErrorMessage(59));\n }\n return context;\n}","export function clearStyles(element, originalStyles) {\n if (element) {\n Object.assign(element.style, originalStyles);\n }\n}\nexport const LIST_FUNCTIONAL_STYLES = {\n position: 'relative',\n maxHeight: '100%',\n overflowX: 'hidden',\n overflowY: 'auto'\n};","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui-components/utils/inertValue';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useScrollLock } from '@base-ui-components/utils/useScrollLock';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useStore } from '@base-ui-components/utils/store';\nimport { useSelectRootContext, useSelectFloatingContext } from \"../root/SelectRootContext.js\";\nimport { CompositeList } from \"../../composite/list/CompositeList.js\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.js\";\nimport { useAnchorPositioning } from \"../../utils/useAnchorPositioning.js\";\nimport { SelectPositionerContext } from \"./SelectPositionerContext.js\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { DROPDOWN_COLLISION_AVOIDANCE } from \"../../utils/constants.js\";\nimport { clearStyles } from \"../popup/utils.js\";\nimport { selectors } from \"../store.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { findItemIndex, itemIncludes } from \"../../utils/itemEquality.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst FIXED = {\n position: 'fixed'\n};\n\n/**\n * Positions the select popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectPositioner = /*#__PURE__*/React.forwardRef(function SelectPositioner(componentProps, forwardedRef) {\n const {\n anchor,\n positionMethod = 'absolute',\n className,\n render,\n side = 'bottom',\n align = 'center',\n sideOffset = 0,\n alignOffset = 0,\n collisionBoundary = 'clipping-ancestors',\n collisionPadding,\n arrowPadding = 5,\n sticky = false,\n disableAnchorTracking,\n alignItemWithTrigger = true,\n collisionAvoidance = DROPDOWN_COLLISION_AVOIDANCE,\n ...elementProps\n } = componentProps;\n const {\n store,\n listRef,\n labelsRef,\n alignItemWithTriggerActiveRef,\n selectedItemTextRef,\n valuesRef,\n initialValueRef,\n popupRef,\n setValue\n } = useSelectRootContext();\n const floatingRootContext = useSelectFloatingContext();\n const open = useStore(store, selectors.open);\n const mounted = useStore(store, selectors.mounted);\n const modal = useStore(store, selectors.modal);\n const value = useStore(store, selectors.value);\n const touchModality = useStore(store, selectors.touchModality);\n const positionerElement = useStore(store, selectors.positionerElement);\n const triggerElement = useStore(store, selectors.triggerElement);\n const isItemEqualToValue = useStore(store, selectors.isItemEqualToValue);\n const scrollUpArrowRef = React.useRef(null);\n const scrollDownArrowRef = React.useRef(null);\n const [controlledAlignItemWithTrigger, setControlledAlignItemWithTrigger] = React.useState(alignItemWithTrigger);\n const alignItemWithTriggerActive = mounted && controlledAlignItemWithTrigger && !touchModality;\n if (!mounted && controlledAlignItemWithTrigger !== alignItemWithTrigger) {\n setControlledAlignItemWithTrigger(alignItemWithTrigger);\n }\n useIsoLayoutEffect(() => {\n if (!mounted) {\n if (selectors.scrollUpArrowVisible(store.state)) {\n store.set('scrollUpArrowVisible', false);\n }\n if (selectors.scrollDownArrowVisible(store.state)) {\n store.set('scrollDownArrowVisible', false);\n }\n }\n }, [store, mounted]);\n React.useImperativeHandle(alignItemWithTriggerActiveRef, () => alignItemWithTriggerActive);\n useScrollLock((alignItemWithTriggerActive || modal) && open && !touchModality, triggerElement);\n const positioning = useAnchorPositioning({\n anchor,\n floatingRootContext,\n positionMethod,\n mounted,\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n disableAnchorTracking: disableAnchorTracking ?? alignItemWithTriggerActive,\n collisionAvoidance,\n keepMounted: true\n });\n const renderedSide = alignItemWithTriggerActive ? 'none' : positioning.side;\n const positionerStyles = alignItemWithTriggerActive ? FIXED : positioning.positionerStyles;\n const defaultProps = React.useMemo(() => {\n const hiddenStyles = {};\n if (!open) {\n hiddenStyles.pointerEvents = 'none';\n }\n return {\n role: 'presentation',\n hidden: !mounted,\n style: {\n ...positionerStyles,\n ...hiddenStyles\n }\n };\n }, [open, mounted, positionerStyles]);\n const state = React.useMemo(() => ({\n open,\n side: renderedSide,\n align: positioning.align,\n anchorHidden: positioning.anchorHidden\n }), [open, renderedSide, positioning.align, positioning.anchorHidden]);\n const setPositionerElement = useStableCallback(element => {\n store.set('positionerElement', element);\n });\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, setPositionerElement],\n state,\n stateAttributesMapping: popupStateMapping,\n props: [defaultProps, elementProps]\n });\n const prevMapSizeRef = React.useRef(0);\n const onMapChange = useStableCallback(map => {\n if (map.size === 0 && prevMapSizeRef.current === 0) {\n return;\n }\n if (valuesRef.current.length === 0) {\n return;\n }\n const prevSize = prevMapSizeRef.current;\n prevMapSizeRef.current = map.size;\n if (map.size === prevSize) {\n return;\n }\n const eventDetails = createChangeEventDetails(REASONS.none);\n if (prevSize !== 0 && !store.state.multiple && value !== null) {\n const valueIndex = findItemIndex(valuesRef.current, value, isItemEqualToValue);\n if (valueIndex === -1) {\n const initial = initialValueRef.current;\n const hasInitial = initial != null && itemIncludes(valuesRef.current, initial, isItemEqualToValue);\n const nextValue = hasInitial ? initial : null;\n setValue(nextValue, eventDetails);\n if (nextValue === null) {\n store.set('selectedIndex', null);\n selectedItemTextRef.current = null;\n }\n }\n }\n if (prevSize !== 0 && store.state.multiple && Array.isArray(value)) {\n const nextValue = value.filter(v => itemIncludes(valuesRef.current, v, isItemEqualToValue));\n if (nextValue.length !== value.length || nextValue.some(v => !itemIncludes(value, v, isItemEqualToValue))) {\n setValue(nextValue, eventDetails);\n if (nextValue.length === 0) {\n store.set('selectedIndex', null);\n selectedItemTextRef.current = null;\n }\n }\n }\n if (open && alignItemWithTriggerActive) {\n store.update({\n scrollUpArrowVisible: false,\n scrollDownArrowVisible: false\n });\n const stylesToClear = {\n height: ''\n };\n clearStyles(positionerElement, stylesToClear);\n clearStyles(popupRef.current, stylesToClear);\n }\n });\n const contextValue = React.useMemo(() => ({\n ...positioning,\n side: renderedSide,\n alignItemWithTriggerActive,\n setControlledAlignItemWithTrigger,\n scrollUpArrowRef,\n scrollDownArrowRef\n }), [positioning, renderedSide, alignItemWithTriggerActive, setControlledAlignItemWithTrigger]);\n return /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: listRef,\n labelsRef: labelsRef,\n onMapChange: onMapChange,\n children: /*#__PURE__*/_jsxs(SelectPositionerContext.Provider, {\n value: contextValue,\n children: [mounted && modal && /*#__PURE__*/_jsx(InternalBackdrop, {\n inert: inertValue(!open),\n cutout: triggerElement\n }), element]\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPositioner.displayName = \"SelectPositioner\";","export function isMouseWithinBounds(event) {\n const targetRect = event.currentTarget.getBoundingClientRect();\n\n // Safari randomly fires `mouseleave` incorrectly when the item is\n // aligned to the trigger. This is a workaround to prevent the highlight\n // from being removed while the cursor is still within the bounds of the item.\n // https://github.com/mui/base-ui/issues/869\n const isWithinBounds = targetRect.top + 1 <= event.clientY && event.clientY <= targetRect.bottom - 1 && targetRect.left + 1 <= event.clientX && event.clientX <= targetRect.right - 1;\n return isWithinBounds;\n}","import { jsx as _jsx } from \"react/jsx-runtime\";\nconst DISABLE_SCROLLBAR_CLASS_NAME = 'base-ui-disable-scrollbar';\nexport const styleDisableScrollbar = {\n className: DISABLE_SCROLLBAR_CLASS_NAME,\n element: /*#__PURE__*/_jsx(\"style\", {\n href: DISABLE_SCROLLBAR_CLASS_NAME,\n precedence: \"base-ui:low\",\n children: `.${DISABLE_SCROLLBAR_CLASS_NAME}{scrollbar-width:none}.${DISABLE_SCROLLBAR_CLASS_NAME}::-webkit-scrollbar{display:none}`\n })\n};","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { isWebKit } from '@base-ui-components/utils/detectBrowser';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { ownerDocument, ownerWindow } from '@base-ui-components/utils/owner';\nimport { isMouseWithinBounds } from '@base-ui-components/utils/isMouseWithinBounds';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui-components/utils/store';\nimport { useAnimationFrame } from '@base-ui-components/utils/useAnimationFrame';\nimport { FloatingFocusManager } from \"../../floating-ui-react/index.js\";\nimport { useSelectFloatingContext, useSelectRootContext } from \"../root/SelectRootContext.js\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.js\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.js\";\nimport { styleDisableScrollbar } from \"../../utils/styles.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\nimport { useOpenChangeComplete } from \"../../utils/useOpenChangeComplete.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { selectors } from \"../store.js\";\nimport { clearStyles, LIST_FUNCTIONAL_STYLES } from \"./utils.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.js\";\nimport { COMPOSITE_KEYS } from \"../../composite/composite.js\";\nimport { getDisabledMountTransitionStyles } from \"../../utils/getDisabledMountTransitionStyles.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...popupStateMapping,\n ...transitionStatusMapping\n};\n\n/**\n * A container for the select list.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectPopup = /*#__PURE__*/React.forwardRef(function SelectPopup(componentProps, forwardedRef) {\n const {\n render,\n className,\n ...elementProps\n } = componentProps;\n const {\n store,\n popupRef,\n onOpenChangeComplete,\n setOpen,\n valueRef,\n selectedItemTextRef,\n keyboardActiveRef,\n multiple,\n handleScrollArrowVisibility,\n scrollHandlerRef\n } = useSelectRootContext();\n const {\n side,\n align,\n alignItemWithTriggerActive,\n setControlledAlignItemWithTrigger,\n scrollDownArrowRef,\n scrollUpArrowRef\n } = useSelectPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const floatingRootContext = useSelectFloatingContext();\n const highlightTimeout = useTimeout();\n const id = useStore(store, selectors.id);\n const open = useStore(store, selectors.open);\n const mounted = useStore(store, selectors.mounted);\n const popupProps = useStore(store, selectors.popupProps);\n const transitionStatus = useStore(store, selectors.transitionStatus);\n const triggerElement = useStore(store, selectors.triggerElement);\n const positionerElement = useStore(store, selectors.positionerElement);\n const listElement = useStore(store, selectors.listElement);\n const initialHeightRef = React.useRef(0);\n const reachedMaxHeightRef = React.useRef(false);\n const maxHeightRef = React.useRef(0);\n const initialPlacedRef = React.useRef(false);\n const originalPositionerStylesRef = React.useRef({});\n const scrollArrowFrame = useAnimationFrame();\n const handleScroll = useStableCallback(scroller => {\n if (!positionerElement || !popupRef.current || !initialPlacedRef.current) {\n return;\n }\n if (reachedMaxHeightRef.current || !alignItemWithTriggerActive) {\n handleScrollArrowVisibility();\n return;\n }\n const isTopPositioned = positionerElement.style.top === '0px';\n const isBottomPositioned = positionerElement.style.bottom === '0px';\n const currentHeight = positionerElement.getBoundingClientRect().height;\n const doc = ownerDocument(positionerElement);\n const positionerStyles = getComputedStyle(positionerElement);\n const marginTop = parseFloat(positionerStyles.marginTop);\n const marginBottom = parseFloat(positionerStyles.marginBottom);\n const viewportHeight = doc.documentElement.clientHeight - marginTop - marginBottom;\n const scrollTop = scroller.scrollTop;\n const scrollHeight = scroller.scrollHeight;\n const clientHeight = scroller.clientHeight;\n const maxScrollTop = scrollHeight - clientHeight;\n let nextPositionerHeight = null;\n let nextScrollTop = null;\n let setReachedMax = false;\n if (isTopPositioned) {\n const diff = maxScrollTop - scrollTop;\n const idealHeight = currentHeight + diff;\n const nextHeight = Math.min(idealHeight, viewportHeight);\n nextPositionerHeight = nextHeight;\n if (nextHeight !== viewportHeight) {\n nextScrollTop = maxScrollTop;\n } else {\n setReachedMax = true;\n }\n } else if (isBottomPositioned) {\n const diff = scrollTop - 0;\n const idealHeight = currentHeight + diff;\n const nextHeight = Math.min(idealHeight, viewportHeight);\n const overshoot = idealHeight - viewportHeight;\n nextPositionerHeight = nextHeight;\n if (nextHeight !== viewportHeight) {\n nextScrollTop = 0;\n } else {\n setReachedMax = true;\n if (scrollTop < maxScrollTop) {\n nextScrollTop = scrollTop - (diff - overshoot);\n }\n }\n }\n if (nextPositionerHeight != null) {\n positionerElement.style.height = `${nextPositionerHeight}px`;\n }\n if (nextScrollTop != null) {\n scroller.scrollTop = nextScrollTop;\n }\n if (setReachedMax) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n });\n React.useImperativeHandle(scrollHandlerRef, () => handleScroll, [handleScroll]);\n useOpenChangeComplete({\n open,\n ref: popupRef,\n onComplete() {\n if (open) {\n onOpenChangeComplete?.(true);\n }\n }\n });\n const state = React.useMemo(() => ({\n open,\n transitionStatus,\n side,\n align\n }), [open, transitionStatus, side, align]);\n useIsoLayoutEffect(() => {\n if (!positionerElement || !popupRef.current || Object.keys(originalPositionerStylesRef.current).length) {\n return;\n }\n originalPositionerStylesRef.current = {\n top: positionerElement.style.top || '0',\n left: positionerElement.style.left || '0',\n right: positionerElement.style.right,\n height: positionerElement.style.height,\n bottom: positionerElement.style.bottom,\n minHeight: positionerElement.style.minHeight,\n maxHeight: positionerElement.style.maxHeight,\n marginTop: positionerElement.style.marginTop,\n marginBottom: positionerElement.style.marginBottom\n };\n }, [popupRef, positionerElement]);\n useIsoLayoutEffect(() => {\n if (mounted || alignItemWithTriggerActive) {\n return;\n }\n initialPlacedRef.current = false;\n reachedMaxHeightRef.current = false;\n initialHeightRef.current = 0;\n maxHeightRef.current = 0;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n }, [mounted, alignItemWithTriggerActive, positionerElement, popupRef]);\n useIsoLayoutEffect(() => {\n const popupElement = popupRef.current;\n if (!mounted || !triggerElement || !positionerElement || !popupElement) {\n return;\n }\n if (!alignItemWithTriggerActive) {\n initialPlacedRef.current = true;\n scrollArrowFrame.request(handleScrollArrowVisibility);\n return;\n }\n\n // Wait for `selectedItemTextRef.current` to be set.\n queueMicrotask(() => {\n const positionerStyles = getComputedStyle(positionerElement);\n const popupStyles = getComputedStyle(popupElement);\n const doc = ownerDocument(triggerElement);\n const win = ownerWindow(positionerElement);\n const triggerRect = triggerElement.getBoundingClientRect();\n const positionerRect = positionerElement.getBoundingClientRect();\n const triggerX = triggerRect.left;\n const triggerHeight = triggerRect.height;\n const scroller = listElement || popupElement;\n const scrollHeight = scroller.scrollHeight;\n const borderBottom = parseFloat(popupStyles.borderBottomWidth);\n const marginTop = parseFloat(positionerStyles.marginTop) || 10;\n const marginBottom = parseFloat(positionerStyles.marginBottom) || 10;\n const minHeight = parseFloat(positionerStyles.minHeight) || 100;\n const paddingLeft = 5;\n const paddingRight = 5;\n const triggerCollisionThreshold = 20;\n const viewportHeight = doc.documentElement.clientHeight - marginTop - marginBottom;\n const viewportWidth = doc.documentElement.clientWidth;\n const availableSpaceBeneathTrigger = viewportHeight - triggerRect.bottom + triggerHeight;\n const textElement = selectedItemTextRef.current;\n const valueElement = valueRef.current;\n let offsetX = 0;\n let offsetY = 0;\n if (textElement && valueElement) {\n const valueRect = valueElement.getBoundingClientRect();\n const textRect = textElement.getBoundingClientRect();\n const valueLeftFromTriggerLeft = valueRect.left - triggerX;\n const textLeftFromPositionerLeft = textRect.left - positionerRect.left;\n const valueCenterFromPositionerTop = valueRect.top - triggerRect.top + valueRect.height / 2;\n const textCenterFromTriggerTop = textRect.top - positionerRect.top + textRect.height / 2;\n offsetX = valueLeftFromTriggerLeft - textLeftFromPositionerLeft;\n offsetY = textCenterFromTriggerTop - valueCenterFromPositionerTop;\n }\n const idealHeight = availableSpaceBeneathTrigger + offsetY + marginBottom + borderBottom;\n let height = Math.min(viewportHeight, idealHeight);\n const maxHeight = viewportHeight - marginTop - marginBottom;\n const scrollTop = idealHeight - height;\n const left = Math.max(paddingLeft, triggerX + offsetX);\n const maxRight = viewportWidth - paddingRight;\n const rightOverflow = Math.max(0, left + positionerRect.width - maxRight);\n positionerElement.style.left = `${left - rightOverflow}px`;\n positionerElement.style.height = `${height}px`;\n positionerElement.style.maxHeight = 'auto';\n positionerElement.style.marginTop = `${marginTop}px`;\n positionerElement.style.marginBottom = `${marginBottom}px`;\n popupElement.style.height = '100%';\n const maxScrollTop = scroller.scrollHeight - scroller.clientHeight;\n const isTopPositioned = scrollTop >= maxScrollTop;\n if (isTopPositioned) {\n height = Math.min(viewportHeight, positionerRect.height) - (scrollTop - maxScrollTop);\n }\n\n // When the trigger is too close to the top or bottom of the viewport, or the minHeight is\n // reached, we fallback to aligning the popup to the trigger as the UX is poor otherwise.\n const fallbackToAlignPopupToTrigger = triggerRect.top < triggerCollisionThreshold || triggerRect.bottom > viewportHeight - triggerCollisionThreshold || height < Math.min(scrollHeight, minHeight);\n\n // Safari doesn't position the popup correctly when pinch-zoomed.\n const isPinchZoomed = (win.visualViewport?.scale ?? 1) !== 1 && isWebKit;\n if (fallbackToAlignPopupToTrigger || isPinchZoomed) {\n initialPlacedRef.current = true;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n ReactDOM.flushSync(() => setControlledAlignItemWithTrigger(false));\n return;\n }\n if (isTopPositioned) {\n const topOffset = Math.max(0, viewportHeight - idealHeight);\n positionerElement.style.top = positionerRect.height >= maxHeight ? '0' : `${topOffset}px`;\n positionerElement.style.height = `${height}px`;\n scroller.scrollTop = scroller.scrollHeight - scroller.clientHeight;\n initialHeightRef.current = Math.max(minHeight, height);\n } else {\n positionerElement.style.bottom = '0';\n initialHeightRef.current = Math.max(minHeight, height);\n scroller.scrollTop = scrollTop;\n }\n if (initialHeightRef.current === viewportHeight) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n\n // Avoid the `onScroll` event logic from triggering before the popup is placed.\n setTimeout(() => {\n initialPlacedRef.current = true;\n });\n });\n }, [store, mounted, positionerElement, triggerElement, valueRef, selectedItemTextRef, popupRef, handleScrollArrowVisibility, alignItemWithTriggerActive, setControlledAlignItemWithTrigger, scrollArrowFrame, scrollDownArrowRef, scrollUpArrowRef, listElement]);\n React.useEffect(() => {\n if (!alignItemWithTriggerActive || !positionerElement || !mounted) {\n return undefined;\n }\n const win = ownerWindow(positionerElement);\n function handleResize(event) {\n setOpen(false, createChangeEventDetails(REASONS.windowResize, event));\n }\n win.addEventListener('resize', handleResize);\n return () => {\n win.removeEventListener('resize', handleResize);\n };\n }, [setOpen, alignItemWithTriggerActive, positionerElement, mounted]);\n const defaultProps = {\n ...(listElement ? {\n role: 'presentation',\n 'aria-orientation': undefined\n } : {\n role: 'listbox',\n 'aria-multiselectable': multiple || undefined,\n id: `${id}-list`\n }),\n onKeyDown(event) {\n keyboardActiveRef.current = true;\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n onMouseMove() {\n keyboardActiveRef.current = false;\n },\n onPointerLeave(event) {\n if (isMouseWithinBounds(event) || event.pointerType === 'touch') {\n return;\n }\n const popup = event.currentTarget;\n highlightTimeout.start(0, () => {\n store.set('activeIndex', null);\n popup.focus({\n preventScroll: true\n });\n });\n },\n onScroll(event) {\n if (listElement) {\n return;\n }\n scrollHandlerRef.current?.(event.currentTarget);\n },\n ...(alignItemWithTriggerActive && {\n style: listElement ? {\n height: '100%'\n } : LIST_FUNCTIONAL_STYLES\n })\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, popupRef],\n state,\n stateAttributesMapping,\n props: [popupProps, defaultProps, getDisabledMountTransitionStyles(transitionStatus), {\n className: !listElement && alignItemWithTriggerActive ? styleDisableScrollbar.className : undefined\n }, elementProps]\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [styleDisableScrollbar.element, /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n modal: false,\n disabled: !mounted,\n restoreFocus: true,\n children: element\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPopup.displayName = \"SelectPopup\";","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectItemContext.displayName = \"SelectItemContext\";\nexport function useSelectItemContext() {\n const context = React.useContext(SelectItemContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.' : _formatErrorMessage(57));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useValueAsRef } from '@base-ui-components/utils/useValueAsRef';\nimport { isMouseWithinBounds } from '@base-ui-components/utils/isMouseWithinBounds';\nimport { useTimeout } from '@base-ui-components/utils/useTimeout';\nimport { useStore } from '@base-ui-components/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.js\";\nimport { useCompositeListItem, IndexGuessBehavior } from \"../../composite/list/useCompositeListItem.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { SelectItemContext } from \"./SelectItemContext.js\";\nimport { selectors } from \"../store.js\";\nimport { useButton } from \"../../use-button/index.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { compareItemEquality, removeItem } from \"../../utils/itemEquality.js\";\n\n/**\n * An individual option in the select popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectItem = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function SelectItem(componentProps, forwardedRef) {\n const {\n render,\n className,\n value = null,\n label,\n disabled = false,\n nativeButton = false,\n ...elementProps\n } = componentProps;\n const textRef = React.useRef(null);\n const listItem = useCompositeListItem({\n label,\n textRef,\n indexGuessBehavior: IndexGuessBehavior.GuessFromOrder\n });\n const {\n store,\n getItemProps,\n setOpen,\n setValue,\n selectionRef,\n typingRef,\n valuesRef,\n keyboardActiveRef,\n multiple\n } = useSelectRootContext();\n const highlightTimeout = useTimeout();\n const highlighted = useStore(store, selectors.isActive, listItem.index);\n const selected = useStore(store, selectors.isSelected, listItem.index, value);\n const selectedByFocus = useStore(store, selectors.isSelectedByFocus, listItem.index);\n const isItemEqualToValue = useStore(store, selectors.isItemEqualToValue);\n const index = listItem.index;\n const hasRegistered = index !== -1;\n const itemRef = React.useRef(null);\n const indexRef = useValueAsRef(index);\n useIsoLayoutEffect(() => {\n if (!hasRegistered) {\n return undefined;\n }\n const values = valuesRef.current;\n values[index] = value;\n return () => {\n delete values[index];\n };\n }, [hasRegistered, index, value, valuesRef]);\n useIsoLayoutEffect(() => {\n if (!hasRegistered) {\n return undefined;\n }\n const selectedValue = store.state.value;\n let candidate = selectedValue;\n if (multiple && Array.isArray(selectedValue) && selectedValue.length > 0) {\n candidate = selectedValue[selectedValue.length - 1];\n }\n if (candidate !== undefined && compareItemEquality(candidate, value, isItemEqualToValue)) {\n store.set('selectedIndex', index);\n }\n return undefined;\n }, [hasRegistered, index, multiple, isItemEqualToValue, store, value]);\n const state = React.useMemo(() => ({\n disabled,\n selected,\n highlighted\n }), [disabled, selected, highlighted]);\n const rootProps = getItemProps({\n active: highlighted,\n selected\n });\n // With our custom `focusItemOnHover` implementation, this interferes with the logic and can\n // cause the index state to be stuck when leaving the select popup.\n rootProps.onFocus = undefined;\n rootProps.id = undefined;\n const lastKeyRef = React.useRef(null);\n const pointerTypeRef = React.useRef('mouse');\n const didPointerDownRef = React.useRef(false);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton\n });\n function commitSelection(event) {\n const selectedValue = store.state.value;\n if (multiple) {\n const currentValue = Array.isArray(selectedValue) ? selectedValue : [];\n const nextValue = selected ? removeItem(currentValue, value, isItemEqualToValue) : [...currentValue, value];\n setValue(nextValue, createChangeEventDetails(REASONS.itemPress, event));\n } else {\n setValue(value, createChangeEventDetails(REASONS.itemPress, event));\n setOpen(false, createChangeEventDetails(REASONS.itemPress, event));\n }\n }\n const defaultProps = {\n role: 'option',\n 'aria-selected': selected,\n 'aria-disabled': disabled || undefined,\n tabIndex: highlighted ? 0 : -1,\n onFocus() {\n store.set('activeIndex', index);\n },\n onMouseEnter() {\n if (!keyboardActiveRef.current && store.state.selectedIndex === null) {\n store.set('activeIndex', index);\n }\n },\n onMouseMove() {\n store.set('activeIndex', index);\n },\n onMouseLeave(event) {\n if (keyboardActiveRef.current || isMouseWithinBounds(event)) {\n return;\n }\n highlightTimeout.start(0, () => {\n if (store.state.activeIndex === index) {\n store.set('activeIndex', null);\n }\n });\n },\n onTouchStart() {\n selectionRef.current = {\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false\n };\n },\n onKeyDown(event) {\n lastKeyRef.current = event.key;\n store.set('activeIndex', index);\n },\n onClick(event) {\n didPointerDownRef.current = false;\n\n // Prevent double commit on {Enter}\n if (event.type === 'keydown' && lastKeyRef.current === null) {\n return;\n }\n if (disabled || lastKeyRef.current === ' ' && typingRef.current || pointerTypeRef.current !== 'touch' && !highlighted) {\n return;\n }\n lastKeyRef.current = null;\n commitSelection(event.nativeEvent);\n },\n onPointerEnter(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n didPointerDownRef.current = true;\n },\n onMouseUp(event) {\n if (disabled) {\n return;\n }\n if (didPointerDownRef.current) {\n didPointerDownRef.current = false;\n return;\n }\n const disallowSelectedMouseUp = !selectionRef.current.allowSelectedMouseUp && selected;\n const disallowUnselectedMouseUp = !selectionRef.current.allowUnselectedMouseUp && !selected;\n if (disallowSelectedMouseUp || disallowUnselectedMouseUp || pointerTypeRef.current !== 'touch' && !highlighted) {\n return;\n }\n commitSelection(event.nativeEvent);\n }\n };\n const element = useRenderElement('div', componentProps, {\n ref: [buttonRef, forwardedRef, listItem.ref, itemRef],\n state,\n props: [rootProps, defaultProps, elementProps, getButtonProps]\n });\n const contextValue = React.useMemo(() => ({\n selected,\n indexRef,\n textRef,\n selectedByFocus,\n hasRegistered\n }), [selected, indexRef, textRef, selectedByFocus, hasRegistered]);\n return /*#__PURE__*/_jsx(SelectItemContext.Provider, {\n value: contextValue,\n children: element\n });\n}));\nif (process.env.NODE_ENV !== \"production\") SelectItem.displayName = \"SelectItem\";","'use client';\n\nimport * as React from 'react';\nimport { useSelectItemContext } from \"../item/SelectItemContext.js\";\nimport { useTransitionStatus } from \"../../utils/useTransitionStatus.js\";\nimport { useOpenChangeComplete } from \"../../utils/useOpenChangeComplete.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\n\n/**\n * Indicates whether the select item is selected.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectItemIndicator = /*#__PURE__*/React.forwardRef(function SelectItemIndicator(componentProps, forwardedRef) {\n const keepMounted = componentProps.keepMounted ?? false;\n const {\n selected\n } = useSelectItemContext();\n const shouldRender = keepMounted || selected;\n if (!shouldRender) {\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return /*#__PURE__*/_jsx(Inner, {\n ...componentProps,\n ref: forwardedRef\n });\n});\n\n/** The core implementation of the indicator is split here to avoid paying the hooks\n * costs unless the element needs to be mounted. */\nif (process.env.NODE_ENV !== \"production\") SelectItemIndicator.displayName = \"SelectItemIndicator\";\nconst Inner = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef((componentProps, forwardedRef) => {\n const {\n render,\n className,\n keepMounted,\n ...elementProps\n } = componentProps;\n const {\n selected\n } = useSelectItemContext();\n const indicatorRef = React.useRef(null);\n const {\n transitionStatus,\n setMounted\n } = useTransitionStatus(selected);\n const state = React.useMemo(() => ({\n selected,\n transitionStatus\n }), [selected, transitionStatus]);\n const element = useRenderElement('span', componentProps, {\n ref: [forwardedRef, indicatorRef],\n state,\n props: [{\n 'aria-hidden': true,\n children: '✔️'\n }, elementProps],\n stateAttributesMapping: transitionStatusMapping\n });\n useOpenChangeComplete({\n open: selected,\n ref: indicatorRef,\n onComplete() {\n if (!selected) {\n setMounted(false);\n }\n }\n });\n return element;\n}));\nif (process.env.NODE_ENV !== \"production\") Inner.displayName = \"Inner\";","'use client';\n\nimport * as React from 'react';\nimport { useSelectRootContext } from \"../root/SelectRootContext.js\";\nimport { useSelectItemContext } from \"../item/SelectItemContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n\n/**\n * A text label of the select item.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectItemText = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function SelectItemText(componentProps, forwardedRef) {\n const {\n indexRef,\n textRef,\n selectedByFocus,\n hasRegistered\n } = useSelectItemContext();\n const {\n selectedItemTextRef\n } = useSelectRootContext();\n const {\n className,\n render,\n ...elementProps\n } = componentProps;\n const localRef = React.useCallback(node => {\n if (!node || !hasRegistered) {\n return;\n }\n const hasNoSelectedItemText = selectedItemTextRef.current === null || !selectedItemTextRef.current.isConnected;\n if (selectedByFocus || hasNoSelectedItemText && indexRef.current === 0) {\n selectedItemTextRef.current = node;\n }\n }, [selectedItemTextRef, indexRef, selectedByFocus, hasRegistered]);\n const element = useRenderElement('div', componentProps, {\n ref: [localRef, forwardedRef, textRef],\n props: elementProps\n });\n return element;\n}));\nif (process.env.NODE_ENV !== \"production\") SelectItemText.displayName = \"SelectItemText\";","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const SelectGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") SelectGroupContext.displayName = \"SelectGroupContext\";\nexport function useSelectGroupContext() {\n const context = React.useContext(SelectGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.' : _formatErrorMessage(56));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { SelectGroupContext } from \"./SelectGroupContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n\n/**\n * Groups related select items with the corresponding label.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const SelectGroup = /*#__PURE__*/React.forwardRef(function SelectGroup(componentProps, forwardedRef) {\n const {\n className,\n render,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState();\n const contextValue = React.useMemo(() => ({\n labelId,\n setLabelId\n }), [labelId, setLabelId]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n role: 'group',\n 'aria-labelledby': labelId\n }, elementProps]\n });\n return /*#__PURE__*/_jsx(SelectGroupContext.Provider, {\n value: contextValue,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectGroup.displayName = \"SelectGroup\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { useSelectGroupContext } from \"../group/SelectGroupContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n\n/**\n * An accessible label that is automatically associated with its parent group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Select](https://base-ui.com/react/components/select)\n */\nexport const SelectGroupLabel = /*#__PURE__*/React.forwardRef(function SelectGroupLabel(componentProps, forwardedRef) {\n const {\n className,\n render,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n setLabelId\n } = useSelectGroupContext();\n const id = useBaseUiId(idProp);\n useIsoLayoutEffect(() => {\n setLabelId(id);\n }, [id, setLabelId]);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: [{\n id\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") SelectGroupLabel.displayName = \"SelectGroupLabel\";","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../utils/useRenderElement.js\";\n\n/**\n * A separator element accessible to screen readers.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Separator](https://base-ui.com/react/components/separator)\n */\nexport const Separator = /*#__PURE__*/React.forwardRef(function SeparatorComponent(componentProps, forwardedRef) {\n const {\n className,\n render,\n orientation = 'horizontal',\n ...elementProps\n } = componentProps;\n const state = React.useMemo(() => ({\n orientation\n }), [orientation]);\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n role: 'separator',\n 'aria-orientation': orientation\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") Separator.displayName = \"Separator\";","/**\n * @license lucide-react v0.555.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n};\n\nexport { hasA11yProp, mergeClasses, toCamelCase, toKebabCase, toPascalCase };\n//# sourceMappingURL=utils.js.map\n","/**\n * @license lucide-react v0.555.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.555.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses, hasA11yProp } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.555.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n","/**\n * @license lucide-react v0.555.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"M20 6 9 17l-5-5\", key: \"1gmf2c\" }]];\nconst Check = createLucideIcon(\"check\", __iconNode);\n\nexport { __iconNode, Check as default };\n//# sourceMappingURL=check.js.map\n","/**\n * @license lucide-react v0.555.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m6 9 6 6 6-6\", key: \"qrunsl\" }]];\nconst ChevronDown = createLucideIcon(\"chevron-down\", __iconNode);\n\nexport { __iconNode, ChevronDown as default };\n//# sourceMappingURL=chevron-down.js.map\n","import * as React from \"react\";\nimport { Select } from \"@base-ui-components/react/select\";\nimport { ChevronDown, Check } from \"lucide-react\";\nimport { clsx } from \"clsx\";\nimport styles from \"./index.module.css\";\n\n/* -------------------------------------------------------------------------------------------------\n * Root\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ALSSelectRootProps<Value> extends Select.Root.Props<Value> {}\n\nfunction ALSSelectRoot<Value>(props: ALSSelectRootProps<Value>) {\n return <Select.Root {...props} />;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Trigger\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ALSSelectTriggerProps extends Select.Trigger.Props {\n placeholder?: string;\n /**\n * Custom render function for the selected value(s).\n * Useful for formatting multiple selections or object values.\n */\n renderValue?: Select.Value.Props[\"render\"];\n}\n\nconst ALSSelectTrigger = React.forwardRef<\n HTMLButtonElement,\n ALSSelectTriggerProps\n>(({ className, children, placeholder, renderValue, ...props }, ref) => {\n // Default render function that handles placeholder\n const defaultRender: Select.Value.Props[\"render\"] = (valueProps, state) => {\n if (\n !state.value ||\n (Array.isArray(state.value) && state.value.length === 0)\n ) {\n return <span {...valueProps}>{placeholder || \"Select...\"}</span>;\n }\n // For arrays (multiple selection), join with comma\n if (Array.isArray(state.value)) {\n return <span {...valueProps}>{state.value.join(\", \")}</span>;\n }\n // For single values, just display as is\n return <span {...valueProps}>{String(state.value)}</span>;\n };\n\n return (\n <Select.Trigger\n ref={ref}\n className={clsx(styles.trigger, className)}\n {...props}\n >\n <Select.Value render={renderValue || defaultRender} />\n <Select.Icon className={styles.icon}>\n <ChevronDown size={16} />\n </Select.Icon>\n </Select.Trigger>\n );\n});\n\nALSSelectTrigger.displayName = \"ALSSelect.Trigger\";\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ALSSelectPortalProps extends Select.Portal.Props {}\n\nfunction ALSSelectPortal(props: ALSSelectPortalProps) {\n return <Select.Portal {...props} />;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Positioner\n * -----------------------------------------------------------------------------------------------*/\ninterface ALSSelectPositionerProps extends Select.Positioner.Props {}\n\nconst ALSSelectPositioner = React.forwardRef<\n HTMLDivElement,\n ALSSelectPositionerProps\n>(({ className, ...props }, ref) => {\n return (\n <Select.Positioner\n ref={ref}\n className={clsx(className)}\n sideOffset={4}\n {...props}\n />\n );\n});\n\nALSSelectPositioner.displayName = \"ALSSelect.Positioner\";\n\n/* -------------------------------------------------------------------------------------------------\n * Popup\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ALSSelectPopupProps extends Select.Popup.Props {}\n\nconst ALSSelectPopup = React.forwardRef<HTMLDivElement, ALSSelectPopupProps>(\n ({ className, ...props }, ref) => {\n return (\n <Select.Popup\n ref={ref}\n className={clsx(styles.popup, className)}\n {...props}\n />\n );\n }\n);\n\nALSSelectPopup.displayName = \"ALSSelect.Popup\";\n\n/* -------------------------------------------------------------------------------------------------\n * Item\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ALSSelectItemProps extends Select.Item.Props {}\n\nconst ALSSelectItem = React.forwardRef<HTMLDivElement, ALSSelectItemProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <Select.Item\n ref={ref}\n className={clsx(styles.item, className)}\n {...props}\n >\n <Select.ItemText>{children}</Select.ItemText>\n <Select.ItemIndicator className={styles.itemIndicator}>\n <Check size={16} />\n </Select.ItemIndicator>\n </Select.Item>\n );\n }\n);\n\nALSSelectItem.displayName = \"ALSSelect.Item\";\n\n/* -------------------------------------------------------------------------------------------------\n * Group\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ALSSelectGroupProps extends Select.Group.Props {}\n\nconst ALSSelectGroup = React.forwardRef<HTMLDivElement, ALSSelectGroupProps>(\n ({ className, ...props }, ref) => {\n return (\n <Select.Group\n ref={ref}\n className={clsx(styles.group, className)}\n {...props}\n />\n );\n }\n);\n\nALSSelectGroup.displayName = \"ALSSelect.Group\";\n\n/* -------------------------------------------------------------------------------------------------\n * Label\n * -----------------------------------------------------------------------------------------------*/\ninterface ALSSelectLabelProps extends Select.GroupLabel.Props {}\n\nconst ALSSelectLabel = React.forwardRef<HTMLDivElement, ALSSelectLabelProps>(\n ({ className, ...props }, ref) => {\n return (\n <Select.GroupLabel\n ref={ref}\n className={clsx(styles.label, className)}\n {...props}\n />\n );\n }\n);\n\nALSSelectLabel.displayName = \"ALSSelect.Label\";\n\n/* -------------------------------------------------------------------------------------------------\n * Separator\n * -----------------------------------------------------------------------------------------------*/\ninterface ALSSelectSeparatorProps extends Select.Separator.Props {}\n\nconst ALSSelectSeparator = React.forwardRef<\n HTMLDivElement,\n ALSSelectSeparatorProps\n>(({ className, ...props }, ref) => {\n return (\n <Select.Separator\n ref={ref}\n className={clsx(styles.separator, className)}\n {...props}\n />\n );\n});\n\nALSSelectSeparator.displayName = \"ALSSelect.Separator\";\n\n/* -------------------------------------------------------------------------------------------------\n * Export\n * -----------------------------------------------------------------------------------------------*/\n\nexport const ALSSelect = {\n Root: ALSSelectRoot,\n Trigger: ALSSelectTrigger,\n Portal: ALSSelectPortal,\n Positioner: ALSSelectPositioner,\n Popup: ALSSelectPopup,\n Item: ALSSelectItem,\n Group: ALSSelectGroup,\n Label: ALSSelectLabel,\n Separator: ALSSelectSeparator,\n};\n\nexport type {\n ALSSelectRootProps,\n ALSSelectTriggerProps,\n ALSSelectPortalProps,\n ALSSelectPositionerProps,\n ALSSelectPopupProps,\n ALSSelectItemProps,\n ALSSelectGroupProps,\n ALSSelectLabelProps,\n ALSSelectSeparatorProps,\n};\n","import styles from './index.module.css';\n\nexport interface ALSSeparatorProps {\n // TODO: Define props\n}\n\nexport function ALSSeparator(props: ALSSeparatorProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Separator */}\n </div>\n );\n}\n\nexport default ALSSeparator;\n","import styles from './index.module.css';\n\nexport interface ALSSliderProps {\n // TODO: Define props\n}\n\nexport function ALSSlider(props: ALSSliderProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Slider */}\n </div>\n );\n}\n\nexport default ALSSlider;\n","import styles from './index.module.css';\n\nexport interface ALSSwitchProps {\n // TODO: Define props\n}\n\nexport function ALSSwitch(props: ALSSwitchProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Switch */}\n </div>\n );\n}\n\nexport default ALSSwitch;\n","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\n/**\n * @internal\n */\nexport const TabsRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") TabsRootContext.displayName = \"TabsRootContext\";\nexport function useTabsRootContext() {\n const context = React.useContext(TabsRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.' : _formatErrorMessage(64));\n }\n return context;\n}","export let TabsRootDataAttributes = /*#__PURE__*/function (TabsRootDataAttributes) {\n /**\n * Indicates the direction of the activation (based on the previous active tab).\n * @type {'left' | 'right' | 'up' | 'down' | 'none'}\n */\n TabsRootDataAttributes[\"activationDirection\"] = \"data-activation-direction\";\n /**\n * Indicates the orientation of the tabs.\n * @type {'horizontal' | 'vertical'}\n */\n TabsRootDataAttributes[\"orientation\"] = \"data-orientation\";\n return TabsRootDataAttributes;\n}({});","import { TabsRootDataAttributes } from \"./TabsRootDataAttributes.js\";\nexport const tabsStateAttributesMapping = {\n tabActivationDirection: dir => ({\n [TabsRootDataAttributes.activationDirection]: dir\n })\n};","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui-components/utils/useControlled';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { CompositeList } from \"../../composite/list/CompositeList.js\";\nimport { useDirection } from \"../../direction-provider/DirectionContext.js\";\nimport { TabsRootContext } from \"./TabsRootContext.js\";\nimport { tabsStateAttributesMapping } from \"./stateAttributesMapping.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Groups the tabs and the corresponding panels.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)\n */\nexport const TabsRoot = /*#__PURE__*/React.forwardRef(function TabsRoot(componentProps, forwardedRef) {\n const {\n className,\n defaultValue = 0,\n onValueChange: onValueChangeProp,\n orientation = 'horizontal',\n render,\n value: valueProp,\n ...elementProps\n } = componentProps;\n const direction = useDirection();\n const tabPanelRefs = React.useRef([]);\n const [value, setValue] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Tabs',\n state: 'value'\n });\n const [tabPanelMap, setTabPanelMap] = React.useState(() => new Map());\n const [tabMap, setTabMap] = React.useState(() => new Map());\n const [tabActivationDirection, setTabActivationDirection] = React.useState('none');\n const onValueChange = useStableCallback((newValue, eventDetails) => {\n onValueChangeProp?.(newValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setValue(newValue);\n setTabActivationDirection(eventDetails.activationDirection);\n });\n\n // get the `id` attribute of <Tabs.Panel> to set as the value of `aria-controls` on <Tabs.Tab>\n const getTabPanelIdByTabValueOrIndex = React.useCallback((tabValue, index) => {\n if (tabValue === undefined && index < 0) {\n return undefined;\n }\n for (const tabPanelMetadata of tabPanelMap.values()) {\n // find by tabValue\n if (tabValue !== undefined && tabPanelMetadata && tabValue === tabPanelMetadata?.value) {\n return tabPanelMetadata.id;\n }\n\n // find by index\n if (tabValue === undefined && tabPanelMetadata?.index && tabPanelMetadata?.index === index) {\n return tabPanelMetadata.id;\n }\n }\n return undefined;\n }, [tabPanelMap]);\n\n // get the `id` attribute of <Tabs.Tab> to set as the value of `aria-labelledby` on <Tabs.Panel>\n const getTabIdByPanelValueOrIndex = React.useCallback((tabPanelValue, index) => {\n if (tabPanelValue === undefined && index < 0) {\n return undefined;\n }\n for (const tabMetadata of tabMap.values()) {\n // find by tabPanelValue\n if (tabPanelValue !== undefined && index > -1 && tabPanelValue === (tabMetadata?.value ?? tabMetadata?.index ?? undefined)) {\n return tabMetadata?.id;\n }\n\n // find by index\n if (tabPanelValue === undefined && index > -1 && index === (tabMetadata?.value ?? tabMetadata?.index ?? undefined)) {\n return tabMetadata?.id;\n }\n }\n return undefined;\n }, [tabMap]);\n\n // used in `useActivationDirectionDetector` for setting data-activation-direction\n const getTabElementBySelectedValue = React.useCallback(selectedValue => {\n if (selectedValue === undefined) {\n return null;\n }\n for (const [tabElement, tabMetadata] of tabMap.entries()) {\n if (tabMetadata != null && selectedValue === (tabMetadata.value ?? tabMetadata.index)) {\n return tabElement;\n }\n }\n return null;\n }, [tabMap]);\n const tabsContextValue = React.useMemo(() => ({\n direction,\n getTabElementBySelectedValue,\n getTabIdByPanelValueOrIndex,\n getTabPanelIdByTabValueOrIndex,\n onValueChange,\n orientation,\n setTabMap,\n tabActivationDirection,\n value\n }), [direction, getTabElementBySelectedValue, getTabIdByPanelValueOrIndex, getTabPanelIdByTabValueOrIndex, onValueChange, orientation, setTabMap, tabActivationDirection, value]);\n const state = {\n orientation,\n tabActivationDirection\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: elementProps,\n stateAttributesMapping: tabsStateAttributesMapping\n });\n return /*#__PURE__*/_jsx(TabsRootContext.Provider, {\n value: tabsContextValue,\n children: /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: tabPanelRefs,\n onMapChange: setTabPanelMap,\n children: element\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") TabsRoot.displayName = \"TabsRoot\";","export const ACTIVE_COMPOSITE_ITEM = 'data-composite-item-active';","'use client';\n\nimport * as React from 'react';\nimport { useMergedRefs } from '@base-ui-components/utils/useMergedRefs';\nimport { useCompositeRootContext } from \"../root/CompositeRootContext.js\";\nimport { useCompositeListItem } from \"../list/useCompositeListItem.js\";\nexport function useCompositeItem(params = {}) {\n const {\n highlightItemOnHover,\n highlightedIndex,\n onHighlightedIndexChange\n } = useCompositeRootContext();\n const {\n ref,\n index\n } = useCompositeListItem(params);\n const isHighlighted = highlightedIndex === index;\n const itemRef = React.useRef(null);\n const mergedRef = useMergedRefs(ref, itemRef);\n const compositeProps = React.useMemo(() => ({\n tabIndex: isHighlighted ? 0 : -1,\n onFocus() {\n onHighlightedIndexChange(index);\n },\n onMouseMove() {\n const item = itemRef.current;\n if (!highlightItemOnHover || !item) {\n return;\n }\n const disabled = item.hasAttribute('disabled') || item.ariaDisabled === 'true';\n if (!isHighlighted && !disabled) {\n item.focus();\n }\n }\n }), [isHighlighted, onHighlightedIndexChange, index, highlightItemOnHover]);\n return {\n compositeProps,\n compositeRef: mergedRef,\n index\n };\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const TabsListContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") TabsListContext.displayName = \"TabsListContext\";\nexport function useTabsListContext() {\n const context = React.useContext(TabsListContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.' : _formatErrorMessage(65));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui-components/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useButton } from \"../../use-button/index.js\";\nimport { ACTIVE_COMPOSITE_ITEM } from \"../../composite/constants.js\";\nimport { useCompositeItem } from \"../../composite/item/useCompositeItem.js\";\nimport { useTabsRootContext } from \"../root/TabsRootContext.js\";\nimport { useTabsListContext } from \"../list/TabsListContext.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { activeElement, contains } from \"../../floating-ui-react/utils.js\";\n\n/**\n * An individual interactive tab button that toggles the corresponding panel.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)\n */\nexport const TabsTab = /*#__PURE__*/React.forwardRef(function TabsTab(componentProps, forwardedRef) {\n const {\n className,\n disabled = false,\n render,\n value: valueProp,\n id: idProp,\n nativeButton = true,\n ...elementProps\n } = componentProps;\n const {\n value: activeTabValue,\n getTabPanelIdByTabValueOrIndex,\n orientation\n } = useTabsRootContext();\n const {\n activateOnFocus,\n highlightedTabIndex,\n onTabActivation,\n setHighlightedTabIndex,\n tabsListElement\n } = useTabsListContext();\n const id = useBaseUiId(idProp);\n const tabMetadata = React.useMemo(() => ({\n disabled,\n id,\n value: valueProp\n }), [disabled, id, valueProp]);\n const {\n compositeProps,\n compositeRef,\n index\n // hook is used instead of the CompositeItem component\n // because the index is needed for Tab internals\n } = useCompositeItem({\n metadata: tabMetadata\n });\n const tabValue = valueProp ?? index;\n\n // the `active` state isn't set on the server (it relies on effects to be calculated),\n // so we fall back to checking the `value` param with the activeTabValue from the TabsContext\n const active = React.useMemo(() => {\n if (valueProp === undefined) {\n return index < 0 ? false : index === activeTabValue;\n }\n return valueProp === activeTabValue;\n }, [index, activeTabValue, valueProp]);\n const isNavigatingRef = React.useRef(false);\n\n // Keep the highlighted item in sync with the currently active tab\n // when the value prop changes externally (controlled mode)\n useIsoLayoutEffect(() => {\n if (isNavigatingRef.current) {\n isNavigatingRef.current = false;\n return;\n }\n if (!(active && index > -1 && highlightedTabIndex !== index)) {\n return;\n }\n\n // If focus is currently within the tabs list, don't override the roving\n // focus highlight. This keeps keyboard navigation relative to the focused\n // item after an external/asynchronous selection change.\n const listElement = tabsListElement;\n if (listElement != null) {\n const activeEl = activeElement(ownerDocument(listElement));\n if (activeEl && contains(listElement, activeEl)) {\n return;\n }\n }\n setHighlightedTabIndex(index);\n }, [active, index, highlightedTabIndex, setHighlightedTabIndex, disabled, tabsListElement]);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton,\n focusableWhenDisabled: true\n });\n const tabPanelId = index > -1 ? getTabPanelIdByTabValueOrIndex(valueProp, index) : undefined;\n const isPressingRef = React.useRef(false);\n const isMainButtonRef = React.useRef(false);\n function onClick(event) {\n if (active || disabled) {\n return;\n }\n onTabActivation(tabValue, createChangeEventDetails(REASONS.none, event.nativeEvent, undefined, {\n activationDirection: 'none'\n }));\n }\n function onFocus(event) {\n if (active) {\n return;\n }\n if (index > -1) {\n setHighlightedTabIndex(index);\n }\n if (disabled) {\n return;\n }\n if (activateOnFocus && (!isPressingRef.current ||\n // keyboard or touch focus\n isPressingRef.current && isMainButtonRef.current) // mouse focus\n ) {\n onTabActivation(tabValue, createChangeEventDetails(REASONS.none, event.nativeEvent, undefined, {\n activationDirection: 'none'\n }));\n }\n }\n function onPointerDown(event) {\n if (active || disabled) {\n return;\n }\n isPressingRef.current = true;\n function handlePointerUp() {\n isPressingRef.current = false;\n isMainButtonRef.current = false;\n }\n if (!event.button || event.button === 0) {\n isMainButtonRef.current = true;\n const doc = ownerDocument(event.currentTarget);\n doc.addEventListener('pointerup', handlePointerUp, {\n once: true\n });\n }\n }\n const state = React.useMemo(() => ({\n disabled,\n active,\n orientation\n }), [disabled, active, orientation]);\n const element = useRenderElement('button', componentProps, {\n state,\n ref: [forwardedRef, buttonRef, compositeRef],\n props: [compositeProps, {\n role: 'tab',\n 'aria-controls': tabPanelId,\n 'aria-selected': active,\n id,\n onClick,\n onFocus,\n onPointerDown,\n [ACTIVE_COMPOSITE_ITEM]: active ? '' : undefined,\n onKeyDownCapture() {\n isNavigatingRef.current = true;\n }\n }, elementProps, getButtonProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") TabsTab.displayName = \"TabsTab\";","// This file is autogenerated. Do not edit it directly.\n// To update it, modify the corresponding source file and run `pnpm inline-scripts`.\n\n// prettier-ignore\nexport const script = '!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\\'[role=\"tablist\"]\\');if(!e)return;const i=e.querySelector(\"[data-active]\");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;const l=getComputedStyle(e).direction;let n=0,o=0,c=0,r=0,f=0,s=0;if(null!=i&&null!=e){const t=e.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=i.getBoundingClientRect();n=u-t.left+e.scrollLeft-e.clientLeft,c=d-t.top+e.scrollTop-e.clientTop,f=h,s=p,o=\"ltr\"===l?e.scrollWidth-n-f-e.clientLeft:n-e.clientLeft,r=e.scrollHeight-c-s-e.clientTop}function u(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}u(\"left\",n),u(\"right\",o),u(\"top\",c),u(\"bottom\",r),u(\"width\",f),u(\"height\",s),f>0&&s>0&&t.removeAttribute(\"hidden\")}();';","export let TabsIndicatorCssVars = /*#__PURE__*/function (TabsIndicatorCssVars) {\n /**\n * Indicates the distance on the left side from the parent's container if the tab is active.\n * @type {number}\n */\n TabsIndicatorCssVars[\"activeTabLeft\"] = \"--active-tab-left\";\n /**\n * Indicates the distance on the right side from the parent's container if the tab is active.\n * @type {number}\n */\n TabsIndicatorCssVars[\"activeTabRight\"] = \"--active-tab-right\";\n /**\n * Indicates the distance on the top side from the parent's container if the tab is active.\n * @type {number}\n */\n TabsIndicatorCssVars[\"activeTabTop\"] = \"--active-tab-top\";\n /**\n * Indicates the distance on the bottom side from the parent's container if the tab is active.\n * @type {number}\n */\n TabsIndicatorCssVars[\"activeTabBottom\"] = \"--active-tab-bottom\";\n /**\n * Indicates the width of the tab if it is active.\n * @type {number}\n */\n TabsIndicatorCssVars[\"activeTabWidth\"] = \"--active-tab-width\";\n /**\n * Indicates the width of the tab if it is active.\n * @type {number}\n */\n TabsIndicatorCssVars[\"activeTabHeight\"] = \"--active-tab-height\";\n return TabsIndicatorCssVars;\n}({});","'use client';\n\nimport * as React from 'react';\nimport { useForcedRerendering } from '@base-ui-components/utils/useForcedRerendering';\nimport { useOnMount } from '@base-ui-components/utils/useOnMount';\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useDirection } from \"../../direction-provider/DirectionContext.js\";\nimport { useTabsRootContext } from \"../root/TabsRootContext.js\";\nimport { tabsStateAttributesMapping } from \"../root/stateAttributesMapping.js\";\nimport { useTabsListContext } from \"../list/TabsListContext.js\";\nimport { script as prehydrationScript } from \"./prehydrationScript.min.js\";\nimport { TabsIndicatorCssVars } from \"./TabsIndicatorCssVars.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...tabsStateAttributesMapping,\n activeTabPosition: () => null,\n activeTabSize: () => null\n};\n\n/**\n * A visual indicator that can be styled to match the position of the currently active tab.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)\n */\nexport const TabsIndicator = /*#__PURE__*/React.forwardRef(function TabIndicator(componentProps, forwardedRef) {\n const {\n className,\n render,\n renderBeforeHydration = false,\n ...elementProps\n } = componentProps;\n const {\n getTabElementBySelectedValue,\n orientation,\n tabActivationDirection,\n value\n } = useTabsRootContext();\n const {\n tabsListElement\n } = useTabsListContext();\n const [isMounted, setIsMounted] = React.useState(false);\n const {\n value: activeTabValue\n } = useTabsRootContext();\n const direction = useDirection();\n useOnMount(() => setIsMounted(true));\n const rerender = useForcedRerendering();\n React.useEffect(() => {\n if (value != null && tabsListElement != null && typeof ResizeObserver !== 'undefined') {\n const resizeObserver = new ResizeObserver(rerender);\n resizeObserver.observe(tabsListElement);\n return () => {\n resizeObserver.disconnect();\n };\n }\n return undefined;\n }, [value, tabsListElement, rerender]);\n let left = 0;\n let right = 0;\n let top = 0;\n let bottom = 0;\n let width = 0;\n let height = 0;\n let isTabSelected = false;\n if (value != null && tabsListElement != null) {\n const activeTab = getTabElementBySelectedValue(value);\n isTabSelected = true;\n if (activeTab != null) {\n const tabsListRect = tabsListElement.getBoundingClientRect();\n const {\n left: tabLeft,\n top: tabTop,\n width: computedWidth,\n height: computedHeight\n } = activeTab.getBoundingClientRect();\n left = tabLeft - tabsListRect.left + tabsListElement.scrollLeft - tabsListElement.clientLeft;\n top = tabTop - tabsListRect.top + tabsListElement.scrollTop - tabsListElement.clientTop;\n width = computedWidth;\n height = computedHeight;\n right = direction === 'ltr' ? tabsListElement.scrollWidth - left - width - tabsListElement.clientLeft : left - tabsListElement.clientLeft;\n bottom = tabsListElement.scrollHeight - top - height - tabsListElement.clientTop;\n }\n }\n const activeTabPosition = React.useMemo(() => isTabSelected ? {\n left,\n right,\n top,\n bottom\n } : null, [left, right, top, bottom, isTabSelected]);\n const activeTabSize = React.useMemo(() => isTabSelected ? {\n width,\n height\n } : null, [width, height, isTabSelected]);\n const style = React.useMemo(() => {\n if (!isTabSelected) {\n return undefined;\n }\n return {\n [TabsIndicatorCssVars.activeTabLeft]: `${left}px`,\n [TabsIndicatorCssVars.activeTabRight]: `${right}px`,\n [TabsIndicatorCssVars.activeTabTop]: `${top}px`,\n [TabsIndicatorCssVars.activeTabBottom]: `${bottom}px`,\n [TabsIndicatorCssVars.activeTabWidth]: `${width}px`,\n [TabsIndicatorCssVars.activeTabHeight]: `${height}px`\n };\n }, [left, right, top, bottom, width, height, isTabSelected]);\n const displayIndicator = isTabSelected && width > 0 && height > 0;\n const state = React.useMemo(() => ({\n orientation,\n activeTabPosition,\n activeTabSize,\n tabActivationDirection\n }), [orientation, activeTabPosition, activeTabSize, tabActivationDirection]);\n const element = useRenderElement('span', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n role: 'presentation',\n style,\n hidden: !displayIndicator // do not display the indicator before the layout is settled\n }, elementProps, {\n suppressHydrationWarning: true\n }],\n stateAttributesMapping\n });\n if (activeTabValue == null) {\n return null;\n }\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [element, !isMounted && renderBeforeHydration && /*#__PURE__*/_jsx(\"script\", {\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML: {\n __html: prehydrationScript\n },\n suppressHydrationWarning: true\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") TabsIndicator.displayName = \"TabsIndicator\";","export let TabsPanelDataAttributes = /*#__PURE__*/function (TabsPanelDataAttributes) {\n /**\n * Indicates the index of the tab panel.\n */\n TabsPanelDataAttributes[\"index\"] = \"data-index\";\n /**\n * Indicates the direction of the activation (based on the previous active tab).\n * @type {'left' | 'right' | 'up' | 'down' | 'none'}\n */\n TabsPanelDataAttributes[\"activationDirection\"] = \"data-activation-direction\";\n /**\n * Indicates the orientation of the tabs.\n * @type {'horizontal' | 'vertical'}\n */\n TabsPanelDataAttributes[\"orientation\"] = \"data-orientation\";\n /**\n * Present when the panel is hidden.\n */\n TabsPanelDataAttributes[\"hidden\"] = \"data-hidden\";\n return TabsPanelDataAttributes;\n}({});","'use client';\n\nimport * as React from 'react';\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useCompositeListItem } from \"../../composite/list/useCompositeListItem.js\";\nimport { tabsStateAttributesMapping } from \"../root/stateAttributesMapping.js\";\nimport { useTabsRootContext } from \"../root/TabsRootContext.js\";\nimport { TabsPanelDataAttributes } from \"./TabsPanelDataAttributes.js\";\n\n/**\n * A panel displayed when the corresponding tab is active.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)\n */\nexport const TabsPanel = /*#__PURE__*/React.forwardRef(function TabPanel(componentProps, forwardedRef) {\n const {\n children,\n className,\n value: valueProp,\n render,\n keepMounted = false,\n ...elementProps\n } = componentProps;\n const {\n value: selectedValue,\n getTabIdByPanelValueOrIndex,\n orientation,\n tabActivationDirection\n } = useTabsRootContext();\n const id = useBaseUiId();\n const metadata = React.useMemo(() => ({\n id,\n value: valueProp\n }), [id, valueProp]);\n const {\n ref: listItemRef,\n index\n } = useCompositeListItem({\n metadata\n });\n const tabPanelValue = valueProp ?? index;\n const hidden = tabPanelValue !== selectedValue;\n const correspondingTabId = React.useMemo(() => {\n return getTabIdByPanelValueOrIndex(valueProp, index);\n }, [getTabIdByPanelValueOrIndex, index, valueProp]);\n const state = React.useMemo(() => ({\n hidden,\n orientation,\n tabActivationDirection\n }), [hidden, orientation, tabActivationDirection]);\n const element = useRenderElement('div', componentProps, {\n state,\n ref: [forwardedRef, listItemRef],\n props: [{\n 'aria-labelledby': correspondingTabId,\n hidden,\n id: id ?? undefined,\n role: 'tabpanel',\n tabIndex: hidden ? -1 : 0,\n [TabsPanelDataAttributes.index]: index\n }, elementProps, {\n children: hidden && !keepMounted ? undefined : children\n }],\n stateAttributesMapping: tabsStateAttributesMapping\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") TabsPanel.displayName = \"TabsPanel\";","'use client';\n\nimport * as React from 'react';\nimport { isElementDisabled } from '@base-ui-components/utils/isElementDisabled';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useMergedRefs } from '@base-ui-components/utils/useMergedRefs';\nimport { ALL_KEYS, ARROW_DOWN, ARROW_KEYS, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, END, HOME, HORIZONTAL_KEYS, HORIZONTAL_KEYS_WITH_EXTRA_KEYS, MODIFIER_KEYS, VERTICAL_KEYS, VERTICAL_KEYS_WITH_EXTRA_KEYS, createGridCellMap, findNonDisabledListIndex, getGridCellIndexOfCorner, getGridCellIndices, getGridNavigatedIndex, getMaxListIndex, getMinListIndex, isListIndexDisabled, isIndexOutOfListBounds, isNativeInput, scrollIntoViewIfNeeded } from \"../composite.js\";\nimport { ACTIVE_COMPOSITE_ITEM } from \"../constants.js\";\nconst EMPTY_ARRAY = [];\nexport function useCompositeRoot(params) {\n const {\n itemSizes,\n cols = 1,\n loopFocus = true,\n dense = false,\n orientation = 'both',\n direction,\n highlightedIndex: externalHighlightedIndex,\n onHighlightedIndexChange: externalSetHighlightedIndex,\n rootRef: externalRef,\n enableHomeAndEndKeys = false,\n stopEventPropagation = false,\n disabledIndices,\n modifierKeys = EMPTY_ARRAY\n } = params;\n const [internalHighlightedIndex, internalSetHighlightedIndex] = React.useState(0);\n const isGrid = cols > 1;\n const rootRef = React.useRef(null);\n const mergedRef = useMergedRefs(rootRef, externalRef);\n const elementsRef = React.useRef([]);\n const hasSetDefaultIndexRef = React.useRef(false);\n const highlightedIndex = externalHighlightedIndex ?? internalHighlightedIndex;\n const onHighlightedIndexChange = useStableCallback((index, shouldScrollIntoView = false) => {\n (externalSetHighlightedIndex ?? internalSetHighlightedIndex)(index);\n if (shouldScrollIntoView) {\n const newActiveItem = elementsRef.current[index];\n scrollIntoViewIfNeeded(rootRef.current, newActiveItem, direction, orientation);\n }\n });\n const onMapChange = useStableCallback(map => {\n if (map.size === 0 || hasSetDefaultIndexRef.current) {\n return;\n }\n hasSetDefaultIndexRef.current = true;\n const sortedElements = Array.from(map.keys());\n const activeItem = sortedElements.find(compositeElement => compositeElement?.hasAttribute(ACTIVE_COMPOSITE_ITEM)) ?? null;\n // Set the default highlighted index of an arbitrary composite item.\n const activeIndex = activeItem ? sortedElements.indexOf(activeItem) : -1;\n if (activeIndex !== -1) {\n onHighlightedIndexChange(activeIndex);\n }\n scrollIntoViewIfNeeded(rootRef.current, activeItem, direction, orientation);\n });\n const props = React.useMemo(() => ({\n 'aria-orientation': orientation === 'both' ? undefined : orientation,\n ref: mergedRef,\n onFocus(event) {\n const element = rootRef.current;\n if (!element || !isNativeInput(event.target)) {\n return;\n }\n event.target.setSelectionRange(0, event.target.value.length ?? 0);\n },\n onKeyDown(event) {\n const RELEVANT_KEYS = enableHomeAndEndKeys ? ALL_KEYS : ARROW_KEYS;\n if (!RELEVANT_KEYS.has(event.key)) {\n return;\n }\n if (isModifierKeySet(event, modifierKeys)) {\n return;\n }\n const element = rootRef.current;\n if (!element) {\n return;\n }\n const isRtl = direction === 'rtl';\n const horizontalForwardKey = isRtl ? ARROW_LEFT : ARROW_RIGHT;\n const forwardKey = {\n horizontal: horizontalForwardKey,\n vertical: ARROW_DOWN,\n both: horizontalForwardKey\n }[orientation];\n const horizontalBackwardKey = isRtl ? ARROW_RIGHT : ARROW_LEFT;\n const backwardKey = {\n horizontal: horizontalBackwardKey,\n vertical: ARROW_UP,\n both: horizontalBackwardKey\n }[orientation];\n if (isNativeInput(event.target) && !isElementDisabled(event.target)) {\n const selectionStart = event.target.selectionStart;\n const selectionEnd = event.target.selectionEnd;\n const textContent = event.target.value ?? '';\n // return to native textbox behavior when\n // 1 - Shift is held to make a text selection, or if there already is a text selection\n if (selectionStart == null || event.shiftKey || selectionStart !== selectionEnd) {\n return;\n }\n // 2 - arrow-ing forward and not in the last position of the text\n if (event.key !== backwardKey && selectionStart < textContent.length) {\n return;\n }\n // 3 -arrow-ing backward and not in the first position of the text\n if (event.key !== forwardKey && selectionStart > 0) {\n return;\n }\n }\n let nextIndex = highlightedIndex;\n const minIndex = getMinListIndex(elementsRef, disabledIndices);\n const maxIndex = getMaxListIndex(elementsRef, disabledIndices);\n if (isGrid) {\n const sizes = itemSizes || Array.from({\n length: elementsRef.current.length\n }, () => ({\n width: 1,\n height: 1\n }));\n // To calculate movements on the grid, we use hypothetical cell indices\n // as if every item was 1x1, then convert back to real indices.\n const cellMap = createGridCellMap(sizes, cols, dense);\n const minGridIndex = cellMap.findIndex(index => index != null && !isListIndexDisabled(elementsRef, index, disabledIndices));\n // last enabled index\n const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !isListIndexDisabled(elementsRef, index, disabledIndices) ? cellIndex : foundIndex, -1);\n nextIndex = cellMap[getGridNavigatedIndex({\n current: cellMap.map(itemIndex => itemIndex ? elementsRef.current[itemIndex] : null)\n }, {\n event,\n orientation,\n loopFocus,\n cols,\n // treat undefined (empty grid spaces) as disabled indices so we\n // don't end up in them\n disabledIndices: getGridCellIndices([...(disabledIndices || elementsRef.current.map((_, index) => isListIndexDisabled(elementsRef, index) ? index : undefined)), undefined], cellMap),\n minIndex: minGridIndex,\n maxIndex: maxGridIndex,\n prevIndex: getGridCellIndexOfCorner(highlightedIndex > maxIndex ? minIndex : highlightedIndex, sizes, cellMap, cols,\n // use a corner matching the edge closest to the direction we're\n // moving in so we don't end up in the same item. Prefer\n // top/left over bottom/right.\n // eslint-disable-next-line no-nested-ternary\n event.key === ARROW_DOWN ? 'bl' : event.key === ARROW_RIGHT ? 'tr' : 'tl'),\n rtl: isRtl\n })]; // navigated cell will never be nullish\n }\n const forwardKeys = {\n horizontal: [horizontalForwardKey],\n vertical: [ARROW_DOWN],\n both: [horizontalForwardKey, ARROW_DOWN]\n }[orientation];\n const backwardKeys = {\n horizontal: [horizontalBackwardKey],\n vertical: [ARROW_UP],\n both: [horizontalBackwardKey, ARROW_UP]\n }[orientation];\n const preventedKeys = isGrid ? RELEVANT_KEYS : {\n horizontal: enableHomeAndEndKeys ? HORIZONTAL_KEYS_WITH_EXTRA_KEYS : HORIZONTAL_KEYS,\n vertical: enableHomeAndEndKeys ? VERTICAL_KEYS_WITH_EXTRA_KEYS : VERTICAL_KEYS,\n both: RELEVANT_KEYS\n }[orientation];\n if (enableHomeAndEndKeys) {\n if (event.key === HOME) {\n nextIndex = minIndex;\n } else if (event.key === END) {\n nextIndex = maxIndex;\n }\n }\n if (nextIndex === highlightedIndex && (forwardKeys.includes(event.key) || backwardKeys.includes(event.key))) {\n if (loopFocus && nextIndex === maxIndex && forwardKeys.includes(event.key)) {\n nextIndex = minIndex;\n } else if (loopFocus && nextIndex === minIndex && backwardKeys.includes(event.key)) {\n nextIndex = maxIndex;\n } else {\n nextIndex = findNonDisabledListIndex(elementsRef, {\n startingIndex: nextIndex,\n decrement: backwardKeys.includes(event.key),\n disabledIndices\n });\n }\n }\n if (nextIndex !== highlightedIndex && !isIndexOutOfListBounds(elementsRef, nextIndex)) {\n if (stopEventPropagation) {\n event.stopPropagation();\n }\n if (preventedKeys.has(event.key)) {\n event.preventDefault();\n }\n onHighlightedIndexChange(nextIndex, true);\n\n // Wait for FocusManager `returnFocus` to execute.\n queueMicrotask(() => {\n elementsRef.current[nextIndex]?.focus();\n });\n }\n }\n }), [cols, dense, direction, disabledIndices, elementsRef, enableHomeAndEndKeys, highlightedIndex, isGrid, itemSizes, loopFocus, mergedRef, modifierKeys, onHighlightedIndexChange, orientation, stopEventPropagation]);\n return React.useMemo(() => ({\n props,\n highlightedIndex,\n onHighlightedIndexChange,\n elementsRef,\n disabledIndices,\n onMapChange,\n relayKeyboardEvent: props.onKeyDown\n }), [props, highlightedIndex, onHighlightedIndexChange, elementsRef, disabledIndices, onMapChange]);\n}\nfunction isModifierKeySet(event, ignoredModifierKeys) {\n for (const key of MODIFIER_KEYS.values()) {\n if (ignoredModifierKeys.includes(key)) {\n continue;\n }\n if (event.getModifierState(key)) {\n return true;\n }\n }\n return false;\n}","'use client';\n\nimport * as React from 'react';\nimport { CompositeList } from \"../list/CompositeList.js\";\nimport { useCompositeRoot } from \"./useCompositeRoot.js\";\nimport { CompositeRootContext } from \"./CompositeRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useDirection } from \"../../direction-provider/DirectionContext.js\";\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from \"../../utils/constants.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @internal\n */\nexport function CompositeRoot(componentProps) {\n const {\n render,\n className,\n refs = EMPTY_ARRAY,\n props = EMPTY_ARRAY,\n state = EMPTY_OBJECT,\n stateAttributesMapping,\n highlightedIndex: highlightedIndexProp,\n onHighlightedIndexChange: onHighlightedIndexChangeProp,\n orientation,\n dense,\n itemSizes,\n loopFocus,\n cols,\n enableHomeAndEndKeys,\n onMapChange: onMapChangeProp,\n stopEventPropagation = true,\n rootRef,\n disabledIndices,\n modifierKeys,\n highlightItemOnHover = false,\n tag = 'div',\n ...elementProps\n } = componentProps;\n const direction = useDirection();\n const {\n props: defaultProps,\n highlightedIndex,\n onHighlightedIndexChange,\n elementsRef,\n onMapChange: onMapChangeUnwrapped,\n relayKeyboardEvent\n } = useCompositeRoot({\n itemSizes,\n cols,\n loopFocus,\n dense,\n orientation,\n highlightedIndex: highlightedIndexProp,\n onHighlightedIndexChange: onHighlightedIndexChangeProp,\n rootRef,\n stopEventPropagation,\n enableHomeAndEndKeys,\n direction,\n disabledIndices,\n modifierKeys\n });\n const element = useRenderElement(tag, componentProps, {\n state,\n ref: refs,\n props: [defaultProps, ...props, elementProps],\n stateAttributesMapping\n });\n const contextValue = React.useMemo(() => ({\n highlightedIndex,\n onHighlightedIndexChange,\n highlightItemOnHover,\n relayKeyboardEvent\n }), [highlightedIndex, onHighlightedIndexChange, highlightItemOnHover, relayKeyboardEvent]);\n return /*#__PURE__*/_jsx(CompositeRootContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: elementsRef,\n onMapChange: newMap => {\n onMapChangeProp?.(newMap);\n onMapChangeUnwrapped(newMap);\n },\n children: element\n })\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { CompositeRoot } from \"../../composite/root/CompositeRoot.js\";\nimport { tabsStateAttributesMapping } from \"../root/stateAttributesMapping.js\";\nimport { useTabsRootContext } from \"../root/TabsRootContext.js\";\nimport { TabsListContext } from \"./TabsListContext.js\";\nimport { EMPTY_ARRAY } from \"../../utils/constants.js\";\n\n/**\n * Groups the individual tab buttons.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Tabs](https://base-ui.com/react/components/tabs)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const TabsList = /*#__PURE__*/React.forwardRef(function TabsList(componentProps, forwardedRef) {\n const {\n activateOnFocus = false,\n className,\n loopFocus = true,\n render,\n ...elementProps\n } = componentProps;\n const {\n getTabElementBySelectedValue,\n onValueChange,\n orientation,\n value,\n setTabMap,\n tabActivationDirection\n } = useTabsRootContext();\n const [highlightedTabIndex, setHighlightedTabIndex] = React.useState(0);\n const [tabsListElement, setTabsListElement] = React.useState(null);\n const detectActivationDirection = useActivationDirectionDetector(value,\n // the old value\n orientation, tabsListElement, getTabElementBySelectedValue);\n const onTabActivation = useStableCallback((newValue, eventDetails) => {\n if (newValue !== value) {\n const activationDirection = detectActivationDirection(newValue);\n eventDetails.activationDirection = activationDirection;\n onValueChange(newValue, eventDetails);\n }\n });\n const state = React.useMemo(() => ({\n orientation,\n tabActivationDirection\n }), [orientation, tabActivationDirection]);\n const defaultProps = {\n 'aria-orientation': orientation === 'vertical' ? 'vertical' : undefined,\n role: 'tablist'\n };\n const tabsListContextValue = React.useMemo(() => ({\n activateOnFocus,\n highlightedTabIndex,\n onTabActivation,\n setHighlightedTabIndex,\n tabsListElement,\n value\n }), [activateOnFocus, highlightedTabIndex, onTabActivation, setHighlightedTabIndex, tabsListElement, value]);\n return /*#__PURE__*/_jsx(TabsListContext.Provider, {\n value: tabsListContextValue,\n children: /*#__PURE__*/_jsx(CompositeRoot, {\n render: render,\n className: className,\n state: state,\n refs: [forwardedRef, setTabsListElement],\n props: [defaultProps, elementProps],\n stateAttributesMapping: tabsStateAttributesMapping,\n highlightedIndex: highlightedTabIndex,\n enableHomeAndEndKeys: true,\n loopFocus: loopFocus,\n orientation: orientation,\n onHighlightedIndexChange: setHighlightedTabIndex,\n onMapChange: setTabMap,\n disabledIndices: EMPTY_ARRAY\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") TabsList.displayName = \"TabsList\";\nfunction getInset(tab, tabsList) {\n const {\n left: tabLeft,\n top: tabTop\n } = tab.getBoundingClientRect();\n const {\n left: listLeft,\n top: listTop\n } = tabsList.getBoundingClientRect();\n const left = tabLeft - listLeft;\n const top = tabTop - listTop;\n return {\n left,\n top\n };\n}\nfunction useActivationDirectionDetector(\n// the old value\nactiveTabValue, orientation, tabsListElement, getTabElement) {\n const [previousTabEdge, setPreviousTabEdge] = React.useState(null);\n useIsoLayoutEffect(() => {\n // Whenever orientation changes, reset the state.\n if (activeTabValue == null || tabsListElement == null) {\n setPreviousTabEdge(null);\n return;\n }\n const activeTab = getTabElement(activeTabValue);\n if (activeTab == null) {\n setPreviousTabEdge(null);\n return;\n }\n const {\n left,\n top\n } = getInset(activeTab, tabsListElement);\n setPreviousTabEdge(orientation === 'horizontal' ? left : top);\n }, [orientation, getTabElement, tabsListElement, activeTabValue]);\n return React.useCallback(newValue => {\n if (newValue === activeTabValue) {\n return 'none';\n }\n if (newValue == null) {\n setPreviousTabEdge(null);\n return 'none';\n }\n if (newValue != null && tabsListElement != null) {\n const activeTabElement = getTabElement(newValue);\n if (activeTabElement != null) {\n const {\n left,\n top\n } = getInset(activeTabElement, tabsListElement);\n if (previousTabEdge == null) {\n setPreviousTabEdge(orientation === 'horizontal' ? left : top);\n return 'none';\n }\n if (orientation === 'horizontal') {\n if (left < previousTabEdge) {\n setPreviousTabEdge(left);\n return 'left';\n }\n if (left > previousTabEdge) {\n setPreviousTabEdge(left);\n return 'right';\n }\n } else if (top < previousTabEdge) {\n setPreviousTabEdge(top);\n return 'up';\n } else if (top > previousTabEdge) {\n setPreviousTabEdge(top);\n return 'down';\n }\n }\n }\n return 'none';\n }, [getTabElement, orientation, previousTabEdge, tabsListElement, activeTabValue]);\n}","import React, { forwardRef, createContext, useContext } from \"react\";\nimport { Tabs } from \"@base-ui-components/react/tabs\";\nimport styles from \"./index.module.css\";\n\n// ============================================================================\n// Types\n// ============================================================================\n\ntype TabsOrientation = \"horizontal\" | \"vertical\";\ntype TabsSize = \"sm\" | \"md\" | \"lg\";\n\ninterface ALSTabsContextValue {\n size: TabsSize;\n}\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst ALSTabsContext = createContext<ALSTabsContextValue>({\n size: \"md\",\n});\n\nconst useALSTabsContext = () => useContext(ALSTabsContext);\n\n// ============================================================================\n// Root Component\n// ============================================================================\n\ninterface ALSTabsRootProps {\n /** The value of the currently active Tab (controlled) */\n value?: number | string;\n /** Default value (uncontrolled) */\n defaultValue?: number | string;\n /** Callback when tab value changes */\n onValueChange?: (value: number | string) => void;\n /** Component orientation (layout flow direction) */\n orientation?: TabsOrientation;\n /** Size variant */\n size?: TabsSize;\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSTabsRoot = forwardRef<HTMLDivElement, ALSTabsRootProps>(\n (\n {\n value,\n defaultValue = 0,\n onValueChange,\n orientation = \"horizontal\",\n size = \"md\",\n className,\n children,\n },\n ref\n ) => {\n const rootClassName = [\n styles.root,\n styles[`root--${orientation}`],\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <ALSTabsContext.Provider value={{ size }}>\n <Tabs.Root\n ref={ref}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n orientation={orientation}\n className={rootClassName}\n >\n {children}\n </Tabs.Root>\n </ALSTabsContext.Provider>\n );\n }\n);\n\nALSTabsRoot.displayName = \"ALSTabs.Root\";\n\n// ============================================================================\n// List Component\n// ============================================================================\n\ninterface ALSTabsListProps {\n /** Whether to automatically change active tab on arrow key focus */\n activateOnFocus?: boolean;\n /** Whether to loop keyboard focus back to first item */\n loopFocus?: boolean;\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSTabsList = forwardRef<HTMLDivElement, ALSTabsListProps>(\n (\n { activateOnFocus = false, loopFocus = true, className, children },\n ref\n ) => {\n const listClassName = [styles.list, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Tabs.List\n ref={ref}\n activateOnFocus={activateOnFocus}\n loopFocus={loopFocus}\n className={listClassName}\n >\n {children}\n </Tabs.List>\n );\n }\n);\n\nALSTabsList.displayName = \"ALSTabs.List\";\n\n// ============================================================================\n// Tab Component\n// ============================================================================\n\ninterface ALSTabsTabProps {\n /** The value of the Tab */\n value?: number | string;\n /** Whether the tab is disabled */\n disabled?: boolean;\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSTabsTab = forwardRef<HTMLButtonElement, ALSTabsTabProps>(\n ({ value, disabled = false, className, children }, ref) => {\n const { size } = useALSTabsContext();\n\n const tabClassName = [styles.tab, styles[`tab--${size}`], className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Tabs.Tab\n ref={ref}\n value={value}\n disabled={disabled}\n className={tabClassName}\n >\n {children}\n </Tabs.Tab>\n );\n }\n);\n\nALSTabsTab.displayName = \"ALSTabs.Tab\";\n\n// ============================================================================\n// Indicator Component\n// ============================================================================\n\ninterface ALSTabsIndicatorProps {\n /** Additional class name */\n className?: string;\n /** Whether to render before hydration */\n renderBeforeHydration?: boolean;\n}\n\nconst ALSTabsIndicator = forwardRef<HTMLSpanElement, ALSTabsIndicatorProps>(\n ({ className, renderBeforeHydration = false }, ref) => {\n const indicatorClassName = [styles.indicator, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Tabs.Indicator\n ref={ref}\n renderBeforeHydration={renderBeforeHydration}\n className={indicatorClassName}\n />\n );\n }\n);\n\nALSTabsIndicator.displayName = \"ALSTabs.Indicator\";\n\n// ============================================================================\n// Panel Component\n// ============================================================================\n\ninterface ALSTabsPanelProps {\n /** The value of the TabPanel */\n value?: number | string;\n /** Whether to keep the HTML element in DOM while hidden */\n keepMounted?: boolean;\n /** Additional class name */\n className?: string;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSTabsPanel = forwardRef<HTMLDivElement, ALSTabsPanelProps>(\n ({ value, keepMounted = false, className, children }, ref) => {\n const panelClassName = [styles.panel, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Tabs.Panel\n ref={ref}\n value={value}\n keepMounted={keepMounted}\n className={panelClassName}\n >\n {children}\n </Tabs.Panel>\n );\n }\n);\n\nALSTabsPanel.displayName = \"ALSTabs.Panel\";\n\n// ============================================================================\n// Component Exports\n// ============================================================================\n\nexport { ALSTabsRoot, ALSTabsList, ALSTabsTab, ALSTabsIndicator, ALSTabsPanel };\n\n// ============================================================================\n// Type Exports\n// ============================================================================\n\nexport type {\n ALSTabsRootProps,\n ALSTabsListProps,\n ALSTabsTabProps,\n ALSTabsIndicatorProps,\n ALSTabsPanelProps,\n TabsOrientation,\n TabsSize,\n};\n","// ============================================================================\n// Compound Component Export\n// ============================================================================\n\nimport {\n ALSTabsRoot,\n ALSTabsList,\n ALSTabsTab,\n ALSTabsIndicator,\n ALSTabsPanel,\n} from \"./components\";\n\nexport const ALSTabs = {\n Root: ALSTabsRoot,\n List: ALSTabsList,\n Tab: ALSTabsTab,\n Indicator: ALSTabsIndicator,\n Panel: ALSTabsPanel,\n};\n\n// Re-export types\nexport type {\n ALSTabsRootProps,\n ALSTabsListProps,\n ALSTabsTabProps,\n ALSTabsIndicatorProps,\n ALSTabsPanelProps,\n TabsOrientation,\n TabsSize,\n} from \"./components\";\n","let counter = 0;\nexport function generateId(prefix) {\n counter += 1;\n return `${prefix}-${Math.random().toString(36).slice(2, 6)}-${counter}`;\n}","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ToastContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToastContext.displayName = \"ToastContext\";\nexport function useToastContext() {\n const context = React.useContext(ToastContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: useToastManager must be used within <Toast.Provider>.' : _formatErrorMessage(73));\n }\n return context;\n}","export function resolvePromiseOptions(options, result) {\n if (typeof options === 'string') {\n return {\n description: options\n };\n }\n if (typeof options === 'function') {\n const resolvedOptions = options(result);\n return typeof resolvedOptions === 'string' ? {\n description: resolvedOptions\n } : resolvedOptions;\n }\n return options;\n}","'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui-components/utils/owner';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { generateId } from '@base-ui-components/utils/generateId';\nimport { Timeout } from '@base-ui-components/utils/useTimeout';\nimport { activeElement, contains } from \"../../floating-ui-react/utils.js\";\nimport { ToastContext } from \"./ToastProviderContext.js\";\nimport { isFocusVisible } from \"../utils/focusVisible.js\";\nimport { resolvePromiseOptions } from \"../utils/resolvePromiseOptions.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Provides a context for creating and managing toasts.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastProvider = function ToastProvider(props) {\n const {\n children,\n timeout = 5000,\n limit = 3,\n toastManager\n } = props;\n const [toasts, setToasts] = React.useState([]);\n const [hovering, setHovering] = React.useState(false);\n const [focused, setFocused] = React.useState(false);\n const [prevFocusElement, setPrevFocusElement] = React.useState(null);\n if (toasts.length === 0) {\n if (hovering) {\n setHovering(false);\n }\n if (focused) {\n setFocused(false);\n }\n }\n const expanded = hovering || focused;\n const timersRef = React.useRef(new Map());\n const viewportRef = React.useRef(null);\n const windowFocusedRef = React.useRef(true);\n const isPausedRef = React.useRef(false);\n function handleFocusManagement(toastId) {\n const activeEl = activeElement(ownerDocument(viewportRef.current));\n if (!viewportRef.current || !contains(viewportRef.current, activeEl) || !isFocusVisible(activeEl)) {\n return;\n }\n const currentIndex = toasts.findIndex(toast => toast.id === toastId);\n let nextToast = null;\n\n // Try to find the next toast that isn't animating out\n let index = currentIndex + 1;\n while (index < toasts.length) {\n if (toasts[index].transitionStatus !== 'ending') {\n nextToast = toasts[index];\n break;\n }\n index += 1;\n }\n\n // Go backwards if no next toast is found\n if (!nextToast) {\n index = currentIndex - 1;\n while (index >= 0) {\n if (toasts[index].transitionStatus !== 'ending') {\n nextToast = toasts[index];\n break;\n }\n index -= 1;\n }\n }\n if (nextToast) {\n nextToast.ref?.current?.focus();\n } else {\n prevFocusElement?.focus({\n preventScroll: true\n });\n }\n }\n const pauseTimers = useStableCallback(() => {\n if (isPausedRef.current) {\n return;\n }\n isPausedRef.current = true;\n timersRef.current.forEach(timer => {\n if (timer.timeout) {\n timer.timeout.clear();\n const elapsed = Date.now() - timer.start;\n const remaining = timer.delay - elapsed;\n timer.remaining = remaining > 0 ? remaining : 0;\n }\n });\n });\n const resumeTimers = useStableCallback(() => {\n if (!isPausedRef.current) {\n return;\n }\n isPausedRef.current = false;\n timersRef.current.forEach((timer, id) => {\n timer.remaining = timer.remaining > 0 ? timer.remaining : timer.delay;\n timer.timeout ??= Timeout.create();\n timer.timeout.start(timer.remaining, () => {\n timersRef.current.delete(id);\n timer.callback();\n });\n timer.start = Date.now();\n });\n });\n const close = useStableCallback(toastId => {\n setToasts(prevToasts => {\n const toastsWithEnding = prevToasts.map(toast => toast.id === toastId ? {\n ...toast,\n transitionStatus: 'ending',\n height: 0\n } : toast);\n const activeToasts = toastsWithEnding.filter(t => t.transitionStatus !== 'ending');\n return toastsWithEnding.map(toast => {\n if (toast.transitionStatus === 'ending') {\n return toast;\n }\n const isActiveToastLimited = activeToasts.indexOf(toast) >= limit;\n return {\n ...toast,\n limited: isActiveToastLimited\n };\n });\n });\n const timer = timersRef.current.get(toastId);\n if (timer && timer.timeout) {\n timer.timeout.clear();\n timersRef.current.delete(toastId);\n }\n const toast = toasts.find(t => t.id === toastId);\n toast?.onClose?.();\n handleFocusManagement(toastId);\n if (toasts.length === 1) {\n setHovering(false);\n setFocused(false);\n }\n });\n const remove = useStableCallback(toastId => {\n setToasts(prev => prev.filter(toast => toast.id !== toastId));\n const toast = toasts.find(t => t.id === toastId);\n toast?.onRemove?.();\n });\n const scheduleTimer = useStableCallback((id, delay, callback) => {\n const start = Date.now();\n const shouldStartActive = windowFocusedRef.current && !hovering && !focused;\n const currentTimeout = shouldStartActive ? Timeout.create() : undefined;\n currentTimeout?.start(delay, () => {\n timersRef.current.delete(id);\n callback();\n });\n timersRef.current.set(id, {\n timeout: currentTimeout,\n start: shouldStartActive ? start : 0,\n delay,\n remaining: delay,\n callback\n });\n });\n const add = useStableCallback(toast => {\n const id = toast.id || generateId('toast');\n const toastToAdd = {\n ...toast,\n id,\n transitionStatus: 'starting'\n };\n setToasts(prev => {\n const updatedToasts = [toastToAdd, ...prev];\n const activeToasts = updatedToasts.filter(t => t.transitionStatus !== 'ending');\n\n // Mark oldest toasts for removal when over limit\n if (activeToasts.length > limit) {\n const excessCount = activeToasts.length - limit;\n const oldestActiveToasts = activeToasts.slice(-excessCount);\n return updatedToasts.map(t => oldestActiveToasts.some(old => old.id === t.id) ? {\n ...t,\n limited: true\n } : {\n ...t,\n limited: false\n });\n }\n return updatedToasts.map(t => ({\n ...t,\n limited: false\n }));\n });\n const duration = toastToAdd.timeout ?? timeout;\n if (toastToAdd.type !== 'loading' && duration > 0) {\n scheduleTimer(id, duration, () => close(id));\n }\n if (hovering || focused || !windowFocusedRef.current) {\n pauseTimers();\n }\n return id;\n });\n const update = useStableCallback((id, updates) => {\n setToasts(prev => prev.map(toast => toast.id === id ? {\n ...toast,\n ...updates\n } : toast));\n });\n const promise = useStableCallback((promiseValue, options) => {\n // Create a loading toast (which does not auto-dismiss).\n const loadingOptions = resolvePromiseOptions(options.loading);\n const id = add({\n ...loadingOptions,\n type: 'loading'\n });\n const handledPromise = promiseValue.then(result => {\n const successOptions = resolvePromiseOptions(options.success, result);\n update(id, {\n ...successOptions,\n type: 'success'\n });\n const successTimeout = successOptions.timeout ?? timeout;\n if (successTimeout > 0) {\n scheduleTimer(id, successTimeout, () => close(id));\n }\n if (hovering || focused || !windowFocusedRef.current) {\n pauseTimers();\n }\n return result;\n }).catch(error => {\n const errorOptions = resolvePromiseOptions(options.error, error);\n update(id, {\n ...errorOptions,\n type: 'error'\n });\n const errorTimeout = errorOptions.timeout ?? timeout;\n if (errorTimeout > 0) {\n scheduleTimer(id, errorTimeout, () => close(id));\n }\n if (hovering || focused || !windowFocusedRef.current) {\n pauseTimers();\n }\n return Promise.reject(error);\n });\n\n // Private API used exclusively by `Manager` to handoff the promise\n // back to the manager after it's handled here.\n if ({}.hasOwnProperty.call(options, 'setPromise')) {\n options.setPromise(handledPromise);\n }\n return handledPromise;\n });\n React.useEffect(function subscribeToToastManager() {\n if (!toastManager) {\n return undefined;\n }\n const unsubscribe = toastManager[' subscribe'](({\n action,\n options\n }) => {\n const id = options.id;\n if (action === 'promise' && options.promise) {\n promise(options.promise, options);\n } else if (action === 'update' && id) {\n update(id, options);\n } else if (action === 'close' && id) {\n close(id);\n } else {\n add(options);\n }\n });\n return unsubscribe;\n }, [add, update, scheduleTimer, timeout, toastManager, promise, close]);\n const contextValue = React.useMemo(() => ({\n toasts,\n setToasts,\n hovering,\n setHovering,\n focused,\n setFocused,\n expanded,\n add,\n close,\n remove,\n update,\n promise,\n pauseTimers,\n resumeTimers,\n prevFocusElement,\n setPrevFocusElement,\n viewportRef,\n scheduleTimer,\n windowFocusedRef\n }), [add, close, focused, hovering, expanded, pauseTimers, prevFocusElement, promise, remove, resumeTimers, scheduleTimer, toasts, update]);\n return /*#__PURE__*/_jsx(ToastContext.Provider, {\n value: contextValue,\n children: children\n });\n};\nif (process.env.NODE_ENV !== \"production\") ToastProvider.displayName = \"ToastProvider\";","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ToastViewportContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToastViewportContext.displayName = \"ToastViewportContext\";\nexport function useToastViewportContext() {\n const context = React.useContext(ToastViewportContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ToastViewportContext is missing. Toast parts must be placed within <Toast.Viewport>.' : _formatErrorMessage(67));\n }\n return context;\n}","export let ToastViewportCssVars = /*#__PURE__*/function (ToastViewportCssVars) {\n /**\n * Indicates the height of the frontmost toast.\n * @type {number}\n */\n ToastViewportCssVars[\"frontmostHeight\"] = \"--toast-frontmost-height\";\n return ToastViewportCssVars;\n}({});","'use client';\n\nimport * as React from 'react';\nimport { ownerDocument, ownerWindow } from '@base-ui-components/utils/owner';\nimport { visuallyHidden } from '@base-ui-components/utils/visuallyHidden';\nimport { activeElement, contains, getTarget } from \"../../floating-ui-react/utils.js\";\nimport { FocusGuard } from \"../../utils/FocusGuard.js\";\nimport { ToastViewportContext } from \"./ToastViewportContext.js\";\nimport { useToastContext } from \"../provider/ToastProviderContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { isFocusVisible } from \"../utils/focusVisible.js\";\nimport { ToastViewportCssVars } from \"./ToastViewportCssVars.js\";\n\n/**\n * A container viewport for toasts.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const ToastViewport = /*#__PURE__*/React.forwardRef(function ToastViewport(componentProps, forwardedRef) {\n const {\n render,\n className,\n children,\n ...elementProps\n } = componentProps;\n const {\n toasts,\n pauseTimers,\n resumeTimers,\n setHovering,\n setFocused,\n viewportRef,\n windowFocusedRef,\n prevFocusElement,\n setPrevFocusElement,\n expanded,\n focused\n } = useToastContext();\n const handlingFocusGuardRef = React.useRef(false);\n const markedReadyForMouseLeaveRef = React.useRef(false);\n const numToasts = toasts.length;\n const frontmostHeight = toasts[0]?.height ?? 0;\n const hasTransitioningToasts = React.useMemo(() => toasts.some(toast => toast.transitionStatus === 'ending'), [toasts]);\n\n // Listen globally for F6 so we can force-focus the viewport.\n React.useEffect(() => {\n if (!viewportRef.current) {\n return undefined;\n }\n function handleGlobalKeyDown(event) {\n if (numToasts === 0) {\n return;\n }\n if (event.key === 'F6' && event.target !== viewportRef.current) {\n event.preventDefault();\n setPrevFocusElement(activeElement(ownerDocument(viewportRef.current)));\n viewportRef.current?.focus({\n preventScroll: true\n });\n pauseTimers();\n setFocused(true);\n }\n }\n const win = ownerWindow(viewportRef.current);\n win.addEventListener('keydown', handleGlobalKeyDown);\n return () => {\n win.removeEventListener('keydown', handleGlobalKeyDown);\n };\n }, [pauseTimers, setFocused, setPrevFocusElement, numToasts, viewportRef]);\n React.useEffect(() => {\n if (!viewportRef.current || !numToasts) {\n return undefined;\n }\n const win = ownerWindow(viewportRef.current);\n function handleWindowBlur(event) {\n if (event.target !== win) {\n return;\n }\n windowFocusedRef.current = false;\n pauseTimers();\n }\n function handleWindowFocus(event) {\n if (event.relatedTarget || event.target === win) {\n return;\n }\n const target = getTarget(event);\n const activeEl = activeElement(ownerDocument(viewportRef.current));\n if (!contains(viewportRef.current, target) || !isFocusVisible(activeEl)) {\n resumeTimers();\n }\n\n // Wait for the `handleFocus` event to fire.\n setTimeout(() => {\n windowFocusedRef.current = true;\n });\n }\n win.addEventListener('blur', handleWindowBlur, true);\n win.addEventListener('focus', handleWindowFocus, true);\n return () => {\n win.removeEventListener('blur', handleWindowBlur, true);\n win.removeEventListener('focus', handleWindowFocus, true);\n };\n }, [pauseTimers, resumeTimers, viewportRef, windowFocusedRef, setFocused,\n // `viewportRef.current` isn't available on the first render,\n // since the portal node hasn't yet been created.\n // By adding this dependency, we ensure the window listeners\n // are added when toasts have been created, once the ref is available.\n numToasts]);\n React.useEffect(() => {\n const viewportNode = viewportRef.current;\n if (!viewportNode || numToasts === 0) {\n return undefined;\n }\n const doc = ownerDocument(viewportNode);\n function handlePointerDown(event) {\n if (event.pointerType !== 'touch') {\n return;\n }\n const target = getTarget(event);\n if (contains(viewportNode, target)) {\n return;\n }\n resumeTimers();\n setHovering(false);\n setFocused(false);\n }\n doc.addEventListener('pointerdown', handlePointerDown, true);\n return () => {\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n };\n }, [numToasts, resumeTimers, setFocused, setHovering, viewportRef]);\n function handleFocusGuard(event) {\n if (!viewportRef.current) {\n return;\n }\n handlingFocusGuardRef.current = true;\n\n // If we're coming off the container, move to the first toast\n if (event.relatedTarget === viewportRef.current) {\n toasts[0]?.ref?.current?.focus();\n } else {\n prevFocusElement?.focus({\n preventScroll: true\n });\n }\n }\n function handleKeyDown(event) {\n if (event.key === 'Tab' && event.shiftKey && event.target === viewportRef.current) {\n event.preventDefault();\n prevFocusElement?.focus({\n preventScroll: true\n });\n resumeTimers();\n }\n }\n React.useEffect(() => {\n if (!windowFocusedRef.current || hasTransitioningToasts || !markedReadyForMouseLeaveRef.current) {\n return;\n }\n\n // Once transitions have finished, see if a mouseleave was already triggered\n // but blocked from taking effect. If so, we can now safely resume timers and\n // collapse the viewport.\n resumeTimers();\n setHovering(false);\n markedReadyForMouseLeaveRef.current = false;\n }, [hasTransitioningToasts, resumeTimers, setHovering, windowFocusedRef]);\n function handleMouseEnter() {\n pauseTimers();\n setHovering(true);\n markedReadyForMouseLeaveRef.current = false;\n }\n function handleMouseLeave() {\n if (toasts.some(toast => toast.transitionStatus === 'ending')) {\n // When swiping to dismiss, wait until the transitions have settled\n // to avoid the viewport collapsing while the user is interacting.\n markedReadyForMouseLeaveRef.current = true;\n } else {\n resumeTimers();\n setHovering(false);\n }\n }\n function handleFocus() {\n if (handlingFocusGuardRef.current) {\n handlingFocusGuardRef.current = false;\n return;\n }\n if (focused) {\n return;\n }\n\n // Only set focused when the active element is focus-visible.\n // This prevents the viewport from staying expanded when clicking inside without\n // keyboard navigation.\n if (isFocusVisible(ownerDocument(viewportRef.current).activeElement)) {\n setFocused(true);\n pauseTimers();\n }\n }\n function handleBlur(event) {\n if (!focused || contains(viewportRef.current, event.relatedTarget)) {\n return;\n }\n setFocused(false);\n resumeTimers();\n }\n const defaultProps = {\n tabIndex: -1,\n role: 'region',\n 'aria-live': 'polite',\n 'aria-atomic': false,\n 'aria-relevant': 'additions text',\n 'aria-label': 'Notifications',\n onMouseEnter: handleMouseEnter,\n onMouseMove: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onKeyDown: handleKeyDown,\n onClick: handleFocus\n };\n const state = React.useMemo(() => ({\n expanded\n }), [expanded]);\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, viewportRef],\n state,\n props: [defaultProps, {\n style: {\n [ToastViewportCssVars.frontmostHeight]: frontmostHeight ? `${frontmostHeight}px` : undefined\n }\n }, elementProps, {\n children: /*#__PURE__*/_jsxs(React.Fragment, {\n children: [numToasts > 0 && prevFocusElement && /*#__PURE__*/_jsx(FocusGuard, {\n onFocus: handleFocusGuard\n }), children, numToasts > 0 && prevFocusElement && /*#__PURE__*/_jsx(FocusGuard, {\n onFocus: handleFocusGuard\n })]\n })\n }]\n });\n const contextValue = React.useMemo(() => ({\n viewportRef\n }), [viewportRef]);\n const highPriorityToasts = React.useMemo(() => toasts.filter(toast => toast.priority === 'high'), [toasts]);\n return /*#__PURE__*/_jsxs(ToastViewportContext.Provider, {\n value: contextValue,\n children: [numToasts > 0 && prevFocusElement && /*#__PURE__*/_jsx(FocusGuard, {\n onFocus: handleFocusGuard\n }), element, !focused && highPriorityToasts.length > 0 && /*#__PURE__*/_jsx(\"div\", {\n style: visuallyHidden,\n children: highPriorityToasts.map(toast => /*#__PURE__*/_jsxs(\"div\", {\n role: \"alert\",\n \"aria-atomic\": true,\n children: [/*#__PURE__*/_jsx(\"div\", {\n children: toast.title\n }), /*#__PURE__*/_jsx(\"div\", {\n children: toast.description\n })]\n }, toast.id))\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") ToastViewport.displayName = \"ToastViewport\";","import _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ToastRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToastRootContext.displayName = \"ToastRootContext\";\nexport function useToastRootContext() {\n const context = React.useContext(ToastRootContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.' : _formatErrorMessage(66));\n }\n return context;\n}","export let ToastRootCssVars = /*#__PURE__*/function (ToastRootCssVars) {\n /**\n * Indicates the index of the toast in the list.\n * @type {number}\n */\n ToastRootCssVars[\"index\"] = \"--toast-index\";\n /**\n * Indicates the vertical pixels offset of the toast in the list when expanded.\n * @type {number}\n */\n ToastRootCssVars[\"offsetY\"] = \"--toast-offset-y\";\n /**\n * Indicates the measured natural height of the toast in pixels.\n * @type {number}\n */\n ToastRootCssVars[\"height\"] = \"--toast-height\";\n /**\n * Indicates the horizontal swipe movement of the toast.\n * @type {number}\n */\n ToastRootCssVars[\"swipeMovementX\"] = \"--toast-swipe-movement-x\";\n /**\n * Indicates the vertical swipe movement of the toast.\n * @type {number}\n */\n ToastRootCssVars[\"swipeMovementY\"] = \"--toast-swipe-movement-y\";\n return ToastRootCssVars;\n}({});","'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui-components/utils/owner';\nimport { inertValue } from '@base-ui-components/utils/inertValue';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui-components/utils/useStableCallback';\nimport { activeElement, contains, getTarget } from \"../../floating-ui-react/utils.js\";\nimport { ToastRootContext } from \"./ToastRootContext.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\nimport { useToastContext } from \"../provider/ToastProviderContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useOpenChangeComplete } from \"../../utils/useOpenChangeComplete.js\";\nimport { ToastRootCssVars } from \"./ToastRootCssVars.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...transitionStatusMapping,\n swipeDirection(value) {\n return value ? {\n 'data-swipe-direction': value\n } : null;\n }\n};\nconst SWIPE_THRESHOLD = 40;\nconst REVERSE_CANCEL_THRESHOLD = 10;\nconst OPPOSITE_DIRECTION_DAMPING_FACTOR = 0.5;\nconst MIN_DRAG_THRESHOLD = 1;\nfunction getDisplacement(direction, deltaX, deltaY) {\n switch (direction) {\n case 'up':\n return -deltaY;\n case 'down':\n return deltaY;\n case 'left':\n return -deltaX;\n case 'right':\n return deltaX;\n default:\n return 0;\n }\n}\nfunction getElementTransform(element) {\n const computedStyle = window.getComputedStyle(element);\n const transform = computedStyle.transform;\n let translateX = 0;\n let translateY = 0;\n let scale = 1;\n if (transform && transform !== 'none') {\n const matrix = transform.match(/matrix(?:3d)?\\(([^)]+)\\)/);\n if (matrix) {\n const values = matrix[1].split(', ').map(parseFloat);\n if (values.length === 6) {\n translateX = values[4];\n translateY = values[5];\n scale = Math.sqrt(values[0] * values[0] + values[1] * values[1]);\n } else if (values.length === 16) {\n translateX = values[12];\n translateY = values[13];\n scale = values[0];\n }\n }\n }\n return {\n x: translateX,\n y: translateY,\n scale\n };\n}\n\n/**\n * Groups all parts of an individual toast.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastRoot = /*#__PURE__*/React.forwardRef(function ToastRoot(componentProps, forwardedRef) {\n const {\n toast,\n render,\n className,\n swipeDirection = ['down', 'right'],\n ...elementProps\n } = componentProps;\n const isAnchored = toast.positionerProps?.anchor !== undefined;\n let swipeDirections = [];\n if (!isAnchored) {\n swipeDirections = Array.isArray(swipeDirection) ? swipeDirection : [swipeDirection];\n }\n const swipeEnabled = swipeDirections.length > 0;\n const {\n toasts,\n focused,\n close,\n remove,\n setToasts,\n pauseTimers,\n expanded,\n setHovering\n } = useToastContext();\n const [currentSwipeDirection, setCurrentSwipeDirection] = React.useState(undefined);\n const [isSwiping, setIsSwiping] = React.useState(false);\n const [isRealSwipe, setIsRealSwipe] = React.useState(false);\n const [dragDismissed, setDragDismissed] = React.useState(false);\n const [dragOffset, setDragOffset] = React.useState({\n x: 0,\n y: 0\n });\n const [initialTransform, setInitialTransform] = React.useState({\n x: 0,\n y: 0,\n scale: 1\n });\n const [titleId, setTitleId] = React.useState();\n const [descriptionId, setDescriptionId] = React.useState();\n const [lockedDirection, setLockedDirection] = React.useState(null);\n const rootRef = React.useRef(null);\n const dragStartPosRef = React.useRef({\n x: 0,\n y: 0\n });\n const initialTransformRef = React.useRef({\n x: 0,\n y: 0,\n scale: 1\n });\n const intendedSwipeDirectionRef = React.useRef(undefined);\n const maxSwipeDisplacementRef = React.useRef(0);\n const cancelledSwipeRef = React.useRef(false);\n const swipeCancelBaselineRef = React.useRef({\n x: 0,\n y: 0\n });\n const isFirstPointerMoveRef = React.useRef(false);\n const domIndex = React.useMemo(() => toasts.indexOf(toast), [toast, toasts]);\n const visibleIndex = React.useMemo(() => toasts.filter(t => t.transitionStatus !== 'ending').indexOf(toast), [toast, toasts]);\n const offsetY = React.useMemo(() => {\n return toasts.slice(0, toasts.indexOf(toast)).reduce((acc, t) => acc + (t.height || 0), 0);\n }, [toasts, toast]);\n useOpenChangeComplete({\n open: toast.transitionStatus !== 'ending',\n ref: rootRef,\n onComplete() {\n if (toast.transitionStatus === 'ending') {\n remove(toast.id);\n }\n }\n });\n const recalculateHeight = useStableCallback(() => {\n const element = rootRef.current;\n if (!element) {\n return;\n }\n const previousHeight = element.style.height;\n element.style.height = 'auto';\n const height = element.offsetHeight;\n element.style.height = previousHeight;\n setToasts(prev => prev.map(t => t.id === toast.id ? {\n ...t,\n ref: rootRef,\n height,\n transitionStatus: undefined\n } : t));\n });\n useIsoLayoutEffect(recalculateHeight, [recalculateHeight]);\n function applyDirectionalDamping(deltaX, deltaY) {\n let newDeltaX = deltaX;\n let newDeltaY = deltaY;\n if (!swipeDirections.includes('left') && !swipeDirections.includes('right')) {\n newDeltaX = deltaX > 0 ? deltaX ** OPPOSITE_DIRECTION_DAMPING_FACTOR : -(Math.abs(deltaX) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);\n } else {\n if (!swipeDirections.includes('right') && deltaX > 0) {\n newDeltaX = deltaX ** OPPOSITE_DIRECTION_DAMPING_FACTOR;\n }\n if (!swipeDirections.includes('left') && deltaX < 0) {\n newDeltaX = -(Math.abs(deltaX) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);\n }\n }\n if (!swipeDirections.includes('up') && !swipeDirections.includes('down')) {\n newDeltaY = deltaY > 0 ? deltaY ** OPPOSITE_DIRECTION_DAMPING_FACTOR : -(Math.abs(deltaY) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);\n } else {\n if (!swipeDirections.includes('down') && deltaY > 0) {\n newDeltaY = deltaY ** OPPOSITE_DIRECTION_DAMPING_FACTOR;\n }\n if (!swipeDirections.includes('up') && deltaY < 0) {\n newDeltaY = -(Math.abs(deltaY) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);\n }\n }\n return {\n x: newDeltaX,\n y: newDeltaY\n };\n }\n function handlePointerDown(event) {\n if (event.button !== 0) {\n return;\n }\n if (event.pointerType === 'touch') {\n pauseTimers();\n }\n const target = getTarget(event.nativeEvent);\n const isInteractiveElement = target ? target.closest('button,a,input,textarea,[role=\"button\"],[data-swipe-ignore]') : false;\n if (isInteractiveElement) {\n return;\n }\n cancelledSwipeRef.current = false;\n intendedSwipeDirectionRef.current = undefined;\n maxSwipeDisplacementRef.current = 0;\n dragStartPosRef.current = {\n x: event.clientX,\n y: event.clientY\n };\n swipeCancelBaselineRef.current = dragStartPosRef.current;\n if (rootRef.current) {\n const transform = getElementTransform(rootRef.current);\n initialTransformRef.current = transform;\n setInitialTransform(transform);\n setDragOffset({\n x: transform.x,\n y: transform.y\n });\n }\n setHovering(true);\n setIsSwiping(true);\n setIsRealSwipe(false);\n setLockedDirection(null);\n isFirstPointerMoveRef.current = true;\n rootRef.current?.setPointerCapture(event.pointerId);\n }\n function handlePointerMove(event) {\n if (!isSwiping) {\n return;\n }\n\n // Prevent text selection on Safari\n event.preventDefault();\n if (isFirstPointerMoveRef.current) {\n // Adjust the starting position to the current position on the first move\n // to account for the delay between pointerdown and the first pointermove on iOS.\n dragStartPosRef.current = {\n x: event.clientX,\n y: event.clientY\n };\n isFirstPointerMoveRef.current = false;\n }\n const {\n clientY,\n clientX,\n movementX,\n movementY\n } = event;\n if (movementY < 0 && clientY > swipeCancelBaselineRef.current.y || movementY > 0 && clientY < swipeCancelBaselineRef.current.y) {\n swipeCancelBaselineRef.current = {\n x: swipeCancelBaselineRef.current.x,\n y: clientY\n };\n }\n if (movementX < 0 && clientX > swipeCancelBaselineRef.current.x || movementX > 0 && clientX < swipeCancelBaselineRef.current.x) {\n swipeCancelBaselineRef.current = {\n x: clientX,\n y: swipeCancelBaselineRef.current.y\n };\n }\n const deltaX = clientX - dragStartPosRef.current.x;\n const deltaY = clientY - dragStartPosRef.current.y;\n const cancelDeltaY = clientY - swipeCancelBaselineRef.current.y;\n const cancelDeltaX = clientX - swipeCancelBaselineRef.current.x;\n if (!isRealSwipe) {\n const movementDistance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n if (movementDistance >= MIN_DRAG_THRESHOLD) {\n setIsRealSwipe(true);\n if (lockedDirection === null) {\n const hasHorizontal = swipeDirections.includes('left') || swipeDirections.includes('right');\n const hasVertical = swipeDirections.includes('up') || swipeDirections.includes('down');\n if (hasHorizontal && hasVertical) {\n const absX = Math.abs(deltaX);\n const absY = Math.abs(deltaY);\n setLockedDirection(absX > absY ? 'horizontal' : 'vertical');\n }\n }\n }\n }\n let candidate;\n if (!intendedSwipeDirectionRef.current) {\n if (lockedDirection === 'vertical') {\n if (deltaY > 0) {\n candidate = 'down';\n } else if (deltaY < 0) {\n candidate = 'up';\n }\n } else if (lockedDirection === 'horizontal') {\n if (deltaX > 0) {\n candidate = 'right';\n } else if (deltaX < 0) {\n candidate = 'left';\n }\n } else if (Math.abs(deltaX) >= Math.abs(deltaY)) {\n candidate = deltaX > 0 ? 'right' : 'left';\n } else {\n candidate = deltaY > 0 ? 'down' : 'up';\n }\n if (candidate && swipeDirections.includes(candidate)) {\n intendedSwipeDirectionRef.current = candidate;\n maxSwipeDisplacementRef.current = getDisplacement(candidate, deltaX, deltaY);\n setCurrentSwipeDirection(candidate);\n }\n } else {\n const direction = intendedSwipeDirectionRef.current;\n const currentDisplacement = getDisplacement(direction, cancelDeltaX, cancelDeltaY);\n if (currentDisplacement > SWIPE_THRESHOLD) {\n cancelledSwipeRef.current = false;\n setCurrentSwipeDirection(direction);\n } else if (maxSwipeDisplacementRef.current - currentDisplacement >= REVERSE_CANCEL_THRESHOLD) {\n // Mark that a change-of-mind has occurred\n cancelledSwipeRef.current = true;\n }\n }\n const dampedDelta = applyDirectionalDamping(deltaX, deltaY);\n let newOffsetX = initialTransformRef.current.x;\n let newOffsetY = initialTransformRef.current.y;\n if (lockedDirection === 'horizontal') {\n if (swipeDirections.includes('left') || swipeDirections.includes('right')) {\n newOffsetX += dampedDelta.x;\n }\n } else if (lockedDirection === 'vertical') {\n if (swipeDirections.includes('up') || swipeDirections.includes('down')) {\n newOffsetY += dampedDelta.y;\n }\n } else {\n if (swipeDirections.includes('left') || swipeDirections.includes('right')) {\n newOffsetX += dampedDelta.x;\n }\n if (swipeDirections.includes('up') || swipeDirections.includes('down')) {\n newOffsetY += dampedDelta.y;\n }\n }\n setDragOffset({\n x: newOffsetX,\n y: newOffsetY\n });\n }\n function handlePointerUp(event) {\n if (!isSwiping) {\n return;\n }\n setIsSwiping(false);\n setIsRealSwipe(false);\n setLockedDirection(null);\n rootRef.current?.releasePointerCapture(event.pointerId);\n if (cancelledSwipeRef.current) {\n setDragOffset({\n x: initialTransform.x,\n y: initialTransform.y\n });\n setCurrentSwipeDirection(undefined);\n return;\n }\n let shouldClose = false;\n const deltaX = dragOffset.x - initialTransform.x;\n const deltaY = dragOffset.y - initialTransform.y;\n let dismissDirection;\n for (const direction of swipeDirections) {\n switch (direction) {\n case 'right':\n if (deltaX > SWIPE_THRESHOLD) {\n shouldClose = true;\n dismissDirection = 'right';\n }\n break;\n case 'left':\n if (deltaX < -SWIPE_THRESHOLD) {\n shouldClose = true;\n dismissDirection = 'left';\n }\n break;\n case 'down':\n if (deltaY > SWIPE_THRESHOLD) {\n shouldClose = true;\n dismissDirection = 'down';\n }\n break;\n case 'up':\n if (deltaY < -SWIPE_THRESHOLD) {\n shouldClose = true;\n dismissDirection = 'up';\n }\n break;\n default:\n break;\n }\n if (shouldClose) {\n break;\n }\n }\n if (shouldClose) {\n setCurrentSwipeDirection(dismissDirection);\n setDragDismissed(true);\n close(toast.id);\n } else {\n setDragOffset({\n x: initialTransform.x,\n y: initialTransform.y\n });\n setCurrentSwipeDirection(undefined);\n }\n }\n function handleKeyDown(event) {\n if (event.key === 'Escape') {\n if (!rootRef.current || !contains(rootRef.current, activeElement(ownerDocument(rootRef.current)))) {\n return;\n }\n close(toast.id);\n }\n }\n React.useEffect(() => {\n if (!swipeEnabled) {\n return undefined;\n }\n const element = rootRef.current;\n if (!element) {\n return undefined;\n }\n function preventDefaultTouchStart(event) {\n if (contains(element, event.target)) {\n event.preventDefault();\n }\n }\n element.addEventListener('touchmove', preventDefaultTouchStart, {\n passive: false\n });\n return () => {\n element.removeEventListener('touchmove', preventDefaultTouchStart);\n };\n }, [swipeEnabled]);\n function getDragStyles() {\n if (!isSwiping && dragOffset.x === initialTransform.x && dragOffset.y === initialTransform.y && !dragDismissed) {\n return {\n [ToastRootCssVars.swipeMovementX]: '0px',\n [ToastRootCssVars.swipeMovementY]: '0px'\n };\n }\n const deltaX = dragOffset.x - initialTransform.x;\n const deltaY = dragOffset.y - initialTransform.y;\n return {\n transition: isSwiping ? 'none' : undefined,\n // While swiping, freeze the element at its current visual transform so it doesn't snap to the\n // end position.\n transform: isSwiping ? `translateX(${dragOffset.x}px) translateY(${dragOffset.y}px) scale(${initialTransform.scale})` : undefined,\n [ToastRootCssVars.swipeMovementX]: `${deltaX}px`,\n [ToastRootCssVars.swipeMovementY]: `${deltaY}px`\n };\n }\n const isHighPriority = toast.priority === 'high';\n const defaultProps = {\n role: isHighPriority ? 'alertdialog' : 'dialog',\n tabIndex: 0,\n 'aria-modal': false,\n 'aria-labelledby': titleId,\n 'aria-describedby': descriptionId,\n 'aria-hidden': isHighPriority && !focused ? true : undefined,\n onPointerDown: swipeEnabled ? handlePointerDown : undefined,\n onPointerMove: swipeEnabled ? handlePointerMove : undefined,\n onPointerUp: swipeEnabled ? handlePointerUp : undefined,\n onKeyDown: handleKeyDown,\n inert: inertValue(toast.limited),\n style: {\n ...getDragStyles(),\n [ToastRootCssVars.index]: toast.transitionStatus === 'ending' ? domIndex : visibleIndex,\n [ToastRootCssVars.offsetY]: `${offsetY}px`,\n [ToastRootCssVars.height]: toast.height ? `${toast.height}px` : undefined\n }\n };\n const toastRoot = React.useMemo(() => ({\n rootRef,\n toast,\n titleId,\n setTitleId,\n descriptionId,\n setDescriptionId,\n swiping: isSwiping,\n swipeDirection: currentSwipeDirection,\n recalculateHeight,\n index: domIndex,\n visibleIndex,\n expanded\n }), [toast, titleId, descriptionId, isSwiping, currentSwipeDirection, recalculateHeight, domIndex, visibleIndex, expanded]);\n const state = React.useMemo(() => ({\n transitionStatus: toast.transitionStatus,\n expanded,\n limited: toast.limited || false,\n type: toast.type,\n swiping: toastRoot.swiping,\n swipeDirection: toastRoot.swipeDirection\n }), [expanded, toast.transitionStatus, toast.limited, toast.type, toastRoot.swiping, toastRoot.swipeDirection]);\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, toastRoot.rootRef],\n state,\n stateAttributesMapping,\n props: [defaultProps, elementProps]\n });\n return /*#__PURE__*/_jsx(ToastRootContext.Provider, {\n value: toastRoot,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") ToastRoot.displayName = \"ToastRoot\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useToastRootContext } from \"../root/ToastRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n\n/**\n * A container for the contents of a toast.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastContent = /*#__PURE__*/React.forwardRef(function ToastContent(componentProps, forwardedRef) {\n const {\n render,\n className,\n ...elementProps\n } = componentProps;\n const {\n visibleIndex,\n expanded,\n recalculateHeight\n } = useToastRootContext();\n const contentRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n const node = contentRef.current;\n if (!node) {\n return undefined;\n }\n recalculateHeight();\n if (typeof ResizeObserver !== 'function') {\n return undefined;\n }\n const resizeObserver = new ResizeObserver(recalculateHeight);\n resizeObserver.observe(node);\n return () => {\n resizeObserver.disconnect();\n };\n }, [recalculateHeight]);\n const behind = visibleIndex > 0;\n const state = React.useMemo(() => ({\n expanded,\n behind\n }), [expanded, behind]);\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, contentRef],\n state,\n props: elementProps\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ToastContent.displayName = \"ToastContent\";","'use client';\n\nimport * as React from 'react';\nimport { useId } from '@base-ui-components/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useToastRootContext } from \"../root/ToastRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n\n/**\n * A description that describes the toast.\n * Can be used as the default message for the toast when no title is provided.\n * Renders a `<p>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastDescription = /*#__PURE__*/React.forwardRef(function ToastDescription(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n children: childrenProp,\n ...elementProps\n } = componentProps;\n const {\n toast\n } = useToastRootContext();\n const children = childrenProp ?? toast.description;\n const shouldRender = Boolean(children);\n const id = useId(idProp);\n const {\n setDescriptionId\n } = useToastRootContext();\n useIsoLayoutEffect(() => {\n if (!shouldRender) {\n return undefined;\n }\n setDescriptionId(id);\n return () => {\n setDescriptionId(undefined);\n };\n }, [shouldRender, id, setDescriptionId]);\n const state = React.useMemo(() => ({\n type: toast.type\n }), [toast.type]);\n const element = useRenderElement('p', componentProps, {\n ref: forwardedRef,\n state,\n props: {\n ...elementProps,\n id,\n children\n }\n });\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ToastDescription.displayName = \"ToastDescription\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';\nimport { useId } from '@base-ui-components/utils/useId';\nimport { useToastRootContext } from \"../root/ToastRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n\n/**\n * A title that labels the toast.\n * Renders an `<h2>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastTitle = /*#__PURE__*/React.forwardRef(function ToastTitle(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n children: childrenProp,\n ...elementProps\n } = componentProps;\n const {\n toast\n } = useToastRootContext();\n const children = childrenProp ?? toast.title;\n const shouldRender = Boolean(children);\n const id = useId(idProp);\n const {\n setTitleId\n } = useToastRootContext();\n useIsoLayoutEffect(() => {\n if (!shouldRender) {\n return undefined;\n }\n setTitleId(id);\n return () => {\n setTitleId(undefined);\n };\n }, [shouldRender, id, setTitleId]);\n const state = React.useMemo(() => ({\n type: toast.type\n }), [toast.type]);\n const element = useRenderElement('h2', componentProps, {\n ref: forwardedRef,\n state,\n props: {\n ...elementProps,\n id,\n children\n }\n });\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ToastTitle.displayName = \"ToastTitle\";","'use client';\n\nimport * as React from 'react';\nimport { useToastRootContext } from \"../root/ToastRootContext.js\";\nimport { useToastContext } from \"../provider/ToastProviderContext.js\";\nimport { useButton } from \"../../use-button/useButton.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n\n/**\n * Closes the toast when clicked.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastClose = /*#__PURE__*/React.forwardRef(function ToastClose(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled,\n nativeButton = true,\n ...elementProps\n } = componentProps;\n const {\n close,\n expanded\n } = useToastContext();\n const {\n toast\n } = useToastRootContext();\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const state = React.useMemo(() => ({\n type: toast.type\n }), [toast.type]);\n const element = useRenderElement('button', componentProps, {\n ref: [forwardedRef, buttonRef],\n state,\n props: [{\n 'aria-hidden': !expanded,\n onClick() {\n close(toast.id);\n }\n }, elementProps, getButtonProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ToastClose.displayName = \"ToastClose\";","'use client';\n\nimport * as React from 'react';\nimport { useToastRootContext } from \"../root/ToastRootContext.js\";\nimport { useButton } from \"../../use-button/useButton.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\n\n/**\n * Performs an action when clicked.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastAction = /*#__PURE__*/React.forwardRef(function ToastAction(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled,\n nativeButton = true,\n ...elementProps\n } = componentProps;\n const {\n toast\n } = useToastRootContext();\n const computedChildren = toast.actionProps?.children ?? elementProps.children;\n const shouldRender = Boolean(computedChildren);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const state = React.useMemo(() => ({\n type: toast.type\n }), [toast.type]);\n const element = useRenderElement('button', componentProps, {\n ref: [forwardedRef, buttonRef],\n state,\n props: [elementProps, toast.actionProps, getButtonProps, {\n children: computedChildren\n }]\n });\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ToastAction.displayName = \"ToastAction\";","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useFloatingPortalNode } from \"../floating-ui-react/index.js\";\n\n/**\n * `FloatingPortal` includes tabbable logic handling for focus management.\n * For components that don't need tabbable logic, use `FloatingPortalLite`.\n * @internal\n */\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const FloatingPortalLite = /*#__PURE__*/React.forwardRef(function FloatingPortalLite(componentProps, forwardedRef) {\n const {\n children,\n container,\n className,\n render,\n ...elementProps\n } = componentProps;\n const {\n portalNode,\n portalSubtree\n } = useFloatingPortalNode({\n container,\n ref: forwardedRef,\n componentProps,\n elementProps\n });\n if (!portalSubtree && !portalNode) {\n return null;\n }\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [portalSubtree, portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode)]\n });\n});\nif (process.env.NODE_ENV !== \"production\") FloatingPortalLite.displayName = \"FloatingPortalLite\";","'use client';\n\nimport { FloatingPortalLite } from \"../../utils/FloatingPortalLite.js\";\n\n/**\n * A portal element that moves the viewport to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastPortal = FloatingPortalLite;","'use client';\n\nimport _formatErrorMessage from \"@base-ui-components/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { ToastContext } from \"./provider/ToastProviderContext.js\";\n/**\n * Returns the array of toasts and methods to manage them.\n */\nexport function useToastManager() {\n const context = React.useContext(ToastContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: useToastManager must be used within <Toast.Provider>.' : _formatErrorMessage(73));\n }\n const {\n toasts,\n add,\n close,\n update,\n promise\n } = context;\n return React.useMemo(() => ({\n toasts,\n add,\n close,\n update,\n promise\n }), [toasts, add, close, update, promise]);\n}","import { generateId } from '@base-ui-components/utils/generateId';\n/**\n * Creates a new toast manager.\n */\nexport function createToastManager() {\n const listeners = [];\n function emit(data) {\n listeners.forEach(listener => listener(data));\n }\n return {\n // This should be private aside from ToastProvider needing to access it.\n // https://x.com/drosenwasser/status/1816947740032872664\n ' subscribe': function subscribe(listener) {\n listeners.push(listener);\n return () => {\n const index = listeners.indexOf(listener);\n if (index !== -1) {\n listeners.splice(index, 1);\n }\n };\n },\n add(options) {\n const id = options.id || generateId('toast');\n const toastToAdd = {\n ...options,\n id,\n transitionStatus: 'starting'\n };\n emit({\n action: 'add',\n options: toastToAdd\n });\n return id;\n },\n close(id) {\n emit({\n action: 'close',\n options: {\n id\n }\n });\n },\n update(id, updates) {\n emit({\n action: 'update',\n options: {\n ...updates,\n id\n }\n });\n },\n promise(promiseValue, options) {\n let handledPromise = promiseValue;\n emit({\n action: 'promise',\n options: {\n ...options,\n promise: promiseValue,\n setPromise(promise) {\n handledPromise = promise;\n }\n }\n });\n return handledPromise;\n }\n };\n}","import React, { forwardRef } from \"react\";\nimport { Toast } from \"@base-ui-components/react/toast\";\nimport styles from \"./index.module.css\";\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport type ToastType = \"success\" | \"error\" | \"warning\" | \"info\" | \"default\";\n\n// ============================================================================\n// Provider Component\n// ============================================================================\n\ninterface ALSToastProviderProps {\n /** Maximum number of toasts that can be displayed at once */\n limit?: number;\n /** Default timeout in ms before auto-dismiss (0 = no auto-dismiss) */\n timeout?: number;\n /** Global toast manager for use outside React components */\n toastManager?: ReturnType<typeof Toast.createToastManager>;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSToastProvider: React.FC<ALSToastProviderProps> = ({\n limit = 3,\n timeout = 5000,\n toastManager,\n children,\n}) => {\n return (\n <Toast.Provider\n limit={limit}\n timeout={timeout}\n toastManager={toastManager}\n >\n {children}\n </Toast.Provider>\n );\n};\n\nALSToastProvider.displayName = \"ALSToast.Provider\";\n\n// ============================================================================\n// Portal Component\n// ============================================================================\n\ninterface ALSToastPortalProps {\n /** Container element to portal into */\n container?: HTMLElement | null;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSToastPortal: React.FC<ALSToastPortalProps> = ({\n container,\n children,\n}) => {\n return <Toast.Portal container={container}>{children}</Toast.Portal>;\n};\n\nALSToastPortal.displayName = \"ALSToast.Portal\";\n\n// ============================================================================\n// Viewport Component\n// ============================================================================\n\ninterface ALSToastViewportProps {\n /** Additional class name */\n className?: string;\n /** Inline styles */\n style?: React.CSSProperties;\n}\n\nconst ALSToastViewport = forwardRef<HTMLDivElement, ALSToastViewportProps>(\n ({ className, style }, ref) => {\n const { toasts } = Toast.useToastManager();\n const viewportClassName = [styles.viewport, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Toast.Viewport\n ref={ref}\n className={viewportClassName}\n style={style}\n >\n {toasts\n .slice()\n .map((toast, index) => (\n <ALSToastRoot\n key={toast.id}\n toast={toast}\n style={\n {\n \"--toast-index\": index,\n } as React.CSSProperties\n }\n >\n <ALSToastContent>\n {toast.title && (\n <ALSToastTitle>{toast.title}</ALSToastTitle>\n )}\n {toast.description && (\n <ALSToastDescription>\n {toast.description}\n </ALSToastDescription>\n )}\n {toast.actionProps && (\n <ALSToastAction {...toast.actionProps} />\n )}\n <ALSToastClose />\n </ALSToastContent>\n </ALSToastRoot>\n ))}\n </Toast.Viewport>\n );\n }\n);\n\nALSToastViewport.displayName = \"ALSToast.Viewport\";\n\n// ============================================================================\n// Root Component\n// ============================================================================\n\ninterface ALSToastRootProps {\n /** The toast object to render (required) */\n toast: any;\n /** Direction(s) in which the toast can be swiped to dismiss */\n swipeDirection?:\n | \"left\"\n | \"right\"\n | \"up\"\n | \"down\"\n | (\"left\" | \"right\" | \"up\" | \"down\")[];\n /** Additional class name */\n className?: string;\n /** Inline styles */\n style?: React.CSSProperties;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSToastRoot = forwardRef<HTMLDivElement, ALSToastRootProps>(\n (\n {\n toast,\n swipeDirection = [\"down\", \"right\"],\n className,\n style,\n children,\n },\n ref\n ) => {\n const type = (toast.type as ToastType) || \"default\";\n\n const rootClassName = [styles.root, styles[`root--${type}`], className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Toast.Root\n ref={ref}\n toast={toast}\n swipeDirection={swipeDirection}\n className={rootClassName}\n style={style}\n >\n {children}\n </Toast.Root>\n );\n }\n);\n\nALSToastRoot.displayName = \"ALSToast.Root\";\n\n// ============================================================================\n// Content Component\n// ============================================================================\n\ninterface ALSToastContentProps {\n /** Additional class name */\n className?: string;\n /** Inline styles */\n style?: React.CSSProperties;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSToastContent = forwardRef<HTMLDivElement, ALSToastContentProps>(\n ({ className, style, children }, ref) => {\n const contentClassName = [styles.content, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Toast.Content ref={ref} className={contentClassName} style={style}>\n {children}\n </Toast.Content>\n );\n }\n);\n\nALSToastContent.displayName = \"ALSToast.Content\";\n\n// ============================================================================\n// Title Component\n// ============================================================================\n\ninterface ALSToastTitleProps {\n /** Additional class name */\n className?: string;\n /** Inline styles */\n style?: React.CSSProperties;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSToastTitle = forwardRef<HTMLHeadingElement, ALSToastTitleProps>(\n ({ className, style, children }, ref) => {\n const titleClassName = [styles.title, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Toast.Title ref={ref} className={titleClassName} style={style}>\n {children}\n </Toast.Title>\n );\n }\n);\n\nALSToastTitle.displayName = \"ALSToast.Title\";\n\n// ============================================================================\n// Description Component\n// ============================================================================\n\ninterface ALSToastDescriptionProps {\n /** Additional class name */\n className?: string;\n /** Inline styles */\n style?: React.CSSProperties;\n /** Children */\n children: React.ReactNode;\n}\n\nconst ALSToastDescription = forwardRef<\n HTMLParagraphElement,\n ALSToastDescriptionProps\n>(({ className, style, children }, ref) => {\n const descriptionClassName = [styles.description, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Toast.Description\n ref={ref}\n className={descriptionClassName}\n style={style}\n >\n {children}\n </Toast.Description>\n );\n});\n\nALSToastDescription.displayName = \"ALSToast.Description\";\n\n// ============================================================================\n// Action Component\n// ============================================================================\n\ninterface ALSToastActionProps {\n /** Additional class name */\n className?: string;\n /** Inline styles */\n style?: React.CSSProperties;\n /** Children */\n children?: React.ReactNode;\n /** Click handler */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\nconst ALSToastAction = forwardRef<HTMLButtonElement, ALSToastActionProps>(\n ({ className, style, children, onClick }, ref) => {\n const actionClassName = [styles.action, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Toast.Action\n ref={ref}\n className={actionClassName}\n style={style}\n onClick={onClick}\n >\n {children}\n </Toast.Action>\n );\n }\n);\n\nALSToastAction.displayName = \"ALSToast.Action\";\n\n// ============================================================================\n// Close Component\n// ============================================================================\n\ninterface ALSToastCloseProps {\n /** Additional class name */\n className?: string;\n /** Inline styles */\n style?: React.CSSProperties;\n /** Children (optional, defaults to X icon) */\n children?: React.ReactNode;\n}\n\nconst ALSToastClose = forwardRef<HTMLButtonElement, ALSToastCloseProps>(\n ({ className, style, children }, ref) => {\n const closeClassName = [styles.close, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <Toast.Close ref={ref} className={closeClassName} style={style}>\n {children || <CloseIcon />}\n </Toast.Close>\n );\n }\n);\n\nALSToastClose.displayName = \"ALSToast.Close\";\n\n// ============================================================================\n// Close Icon\n// ============================================================================\n\nconst CloseIcon: React.FC = () => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={styles.closeIcon}\n >\n <path\n d=\"M12 4L4 12M4 4L12 12\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\n// ============================================================================\n// Compound Component Export\n// ============================================================================\n\nexport const ALSToast = {\n Provider: ALSToastProvider,\n Portal: ALSToastPortal,\n Viewport: ALSToastViewport,\n Root: ALSToastRoot,\n Content: ALSToastContent,\n Title: ALSToastTitle,\n Description: ALSToastDescription,\n Action: ALSToastAction,\n Close: ALSToastClose,\n useToastManager: Toast.useToastManager,\n createToastManager: Toast.createToastManager,\n};\n\nexport type {\n ALSToastProviderProps,\n ALSToastPortalProps,\n ALSToastViewportProps,\n ALSToastRootProps,\n ALSToastContentProps,\n ALSToastTitleProps,\n ALSToastDescriptionProps,\n ALSToastActionProps,\n ALSToastCloseProps,\n};\n","import styles from './index.module.css';\n\nexport interface ALSToggleProps {\n // TODO: Define props\n}\n\nexport function ALSToggle(props: ALSToggleProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Toggle */}\n </div>\n );\n}\n\nexport default ALSToggle;\n","import styles from './index.module.css';\n\nexport interface ALSToggleGroupProps {\n // TODO: Define props\n}\n\nexport function ALSToggleGroup(props: ALSToggleGroupProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement ToggleGroup */}\n </div>\n );\n}\n\nexport default ALSToggleGroup;\n","import styles from './index.module.css';\n\nexport interface ALSToolbarProps {\n // TODO: Define props\n}\n\nexport function ALSToolbar(props: ALSToolbarProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Toolbar */}\n </div>\n );\n}\n\nexport default ALSToolbar;\n","import styles from './index.module.css';\n\nexport interface ALSTooltipProps {\n // TODO: Define props\n}\n\nexport function ALSTooltip(props: ALSTooltipProps) {\n return (\n <div className={styles.root}>\n {/* TODO: Implement Tooltip */}\n </div>\n );\n}\n\nexport default ALSTooltip;\n","import React, { useState, useEffect, useRef, useCallback } from \"react\";\nimport styles from \"./index.module.css\";\n\n// ==================== Types ====================\ntype AsidePosition = \"left\" | \"right\";\ntype HeaderBehavior = \"fixed\" | \"sticky\" | \"relative\";\ntype AsideVariant = \"fixed\" | \"relative\";\ntype FooterVariant = \"fixed\" | \"sticky\" | \"relative\";\n\ninterface MainLayoutProps {\n children?: React.ReactNode;\n className?: string;\n asidePosition?: AsidePosition;\n}\n\ninterface MainLayoutHeaderProps {\n children: React.ReactNode;\n className?: string;\n behavior?: HeaderBehavior;\n scrollThreshold?: number;\n elevated?: boolean;\n transparent?: boolean;\n height?: number | string;\n}\n\ninterface MainLayoutAsideProps {\n children: React.ReactNode;\n className?: string;\n collapsed?: boolean;\n hidden?: boolean;\n variant?: AsideVariant;\n width?: number | string;\n collapsedWidth?: number | string;\n resizable?: boolean;\n minWidth?: number;\n maxWidth?: number;\n onWidthChange?: (width: number) => void;\n overlay?: boolean;\n onOverlayClose?: () => void;\n /** Content to show when collapsed (icons only) */\n collapsedContent?: React.ReactNode;\n /** Animation duration in ms */\n transitionDuration?: number;\n /** Whether aside should span full viewport height */\n fullHeight?: boolean;\n}\n\ninterface MainLayoutMainProps {\n children: React.ReactNode;\n className?: string;\n maxWidth?: number | string;\n centered?: boolean;\n padding?: \"none\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n}\n\ninterface MainLayoutFooterProps {\n children: React.ReactNode;\n className?: string;\n variant?: FooterVariant;\n height?: number | string;\n}\n\n// ==================== Context for Layout State ====================\ninterface LayoutContextValue {\n asidePosition: AsidePosition;\n asideHidden: boolean;\n asideCollapsed: boolean;\n asideFullHeight: boolean;\n headerBehavior: HeaderBehavior;\n scrollY: number;\n mainRef: React.RefObject<HTMLElement | null> | null;\n registerAside: (\n collapsed: boolean,\n hidden: boolean,\n fullHeight: boolean\n ) => void;\n registerHeader: (behavior: HeaderBehavior) => void;\n}\n\nconst LayoutContext = React.createContext<LayoutContextValue>({\n asidePosition: \"left\",\n asideHidden: false,\n asideCollapsed: false,\n asideFullHeight: false,\n headerBehavior: \"sticky\",\n scrollY: 0,\n mainRef: null,\n registerAside: () => {},\n registerHeader: () => {},\n});\n\n// ==================== Custom Hooks ====================\nexport const useLayout = () => React.useContext(LayoutContext);\n\nconst useScrollDirection = (\n ref: React.RefObject<HTMLElement | null>,\n threshold: number = 10\n) => {\n const [scrollDirection, setScrollDirection] = useState<\"up\" | \"down\">(\"up\");\n const [scrollY, setScrollY] = useState(0);\n const lastScrollY = useRef(0);\n\n useEffect(() => {\n const element = ref.current;\n if (!element) return;\n\n const handleScroll = () => {\n const currentScrollY = element.scrollTop;\n setScrollY(currentScrollY);\n\n if (Math.abs(currentScrollY - lastScrollY.current) < threshold) {\n return;\n }\n\n setScrollDirection(\n currentScrollY > lastScrollY.current ? \"down\" : \"up\"\n );\n lastScrollY.current = currentScrollY;\n };\n\n element.addEventListener(\"scroll\", handleScroll, { passive: true });\n return () => element.removeEventListener(\"scroll\", handleScroll);\n }, [ref, threshold]);\n\n return { scrollDirection, scrollY };\n};\n\n// ==================== Subcomponents ====================\nconst MainLayoutHeader: React.FC<MainLayoutHeaderProps> = ({\n children,\n className = \"\",\n behavior = \"sticky\",\n scrollThreshold = 50,\n elevated = false,\n transparent = false,\n height,\n}) => {\n const { scrollY, registerHeader, asideFullHeight } =\n React.useContext(LayoutContext);\n const [isElevated, setIsElevated] = useState(false);\n const [isTransparent, setIsTransparent] = useState(transparent);\n\n useEffect(() => {\n registerHeader(behavior);\n }, [behavior, registerHeader]);\n\n useEffect(() => {\n if (elevated) {\n setIsElevated(scrollY > 0);\n }\n\n if (transparent) {\n setIsTransparent(scrollY < scrollThreshold);\n }\n }, [scrollY, behavior, scrollThreshold, elevated, transparent]);\n\n const behaviorClass = {\n fixed: styles.headerFixed,\n sticky: styles.headerSticky,\n relative: styles.headerRelative,\n hideOnScroll: styles.headerHideOnScroll,\n }[behavior];\n\n const classNames = [\n styles.header,\n behaviorClass,\n isElevated && styles.headerElevated,\n isTransparent && styles.headerTransparent,\n asideFullHeight && styles.headerWithFullHeightAside,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n const style: React.CSSProperties = height\n ? ({\n \"--header-custom-height\":\n typeof height === \"number\" ? `${height}px` : height,\n } as React.CSSProperties)\n : {};\n\n return (\n <header className={classNames} style={style}>\n {children}\n </header>\n );\n};\n\nconst MainLayoutAside: React.FC<MainLayoutAsideProps> = ({\n children,\n className = \"\",\n collapsed = false,\n hidden = false,\n variant = \"relative\",\n width,\n collapsedWidth,\n resizable = false,\n minWidth = 200,\n maxWidth = 500,\n onWidthChange,\n overlay = false,\n onOverlayClose,\n collapsedContent,\n transitionDuration = 300,\n fullHeight = false,\n}) => {\n const { registerAside, asidePosition } = React.useContext(LayoutContext);\n const [currentWidth, setCurrentWidth] = useState<number | null>(null);\n const [isResizing, setIsResizing] = useState(false);\n const [isClosing, setIsClosing] = useState(false);\n const asideRef = useRef<HTMLElement>(null);\n\n useEffect(() => {\n registerAside(collapsed, hidden, fullHeight);\n }, [collapsed, hidden, fullHeight, registerAside]);\n\n // Handle overlay close animation\n const handleOverlayClose = useCallback(() => {\n if (onOverlayClose) {\n setIsClosing(true);\n setTimeout(() => {\n setIsClosing(false);\n onOverlayClose();\n }, transitionDuration);\n }\n }, [onOverlayClose, transitionDuration]);\n\n // Resize handling\n const handleMouseDown = useCallback(\n (e: React.MouseEvent) => {\n if (!resizable) return;\n e.preventDefault();\n setIsResizing(true);\n },\n [resizable]\n );\n\n useEffect(() => {\n if (!isResizing) return;\n\n const handleMouseMove = (e: MouseEvent) => {\n if (!asideRef.current) return;\n const rect = asideRef.current.getBoundingClientRect();\n let newWidth: number;\n\n if (asidePosition === \"right\") {\n newWidth = rect.right - e.clientX;\n } else {\n newWidth = e.clientX - rect.left;\n }\n\n const clampedWidth = Math.min(\n Math.max(newWidth, minWidth),\n maxWidth\n );\n setCurrentWidth(clampedWidth);\n onWidthChange?.(clampedWidth);\n };\n\n const handleMouseUp = () => {\n setIsResizing(false);\n };\n\n document.addEventListener(\"mousemove\", handleMouseMove);\n document.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n document.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [isResizing, minWidth, maxWidth, onWidthChange, asidePosition]);\n\n if (hidden) return null;\n\n const variantClass =\n variant === \"fixed\" ? styles.asideFixed : styles.asideRelative;\n\n const classNames = [\n styles.aside,\n variantClass,\n collapsed && styles.asideCollapsed,\n overlay && styles.asideOverlay,\n overlay && isClosing && styles.asideOverlayClosing,\n isResizing && styles.asideResizing,\n fullHeight && styles.asideFullHeight,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n const style: React.CSSProperties = {\n ...(width &&\n !collapsed &&\n !currentWidth && {\n \"--aside-width\":\n typeof width === \"number\" ? `${width}px` : width,\n }),\n ...(collapsedWidth &&\n collapsed && {\n \"--aside-collapsed-width\":\n typeof collapsedWidth === \"number\"\n ? `${collapsedWidth}px`\n : collapsedWidth,\n }),\n ...(currentWidth &&\n !collapsed && {\n \"--aside-width\": `${currentWidth}px`,\n }),\n \"--aside-transition-duration\": `${transitionDuration}ms`,\n } as React.CSSProperties;\n\n const contentClassNames = [\n styles.asideContent,\n collapsed && styles.asideContentCollapsed,\n ]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <>\n {overlay && (\n <div\n className={`${styles.asideOverlayBackdrop} ${\n isClosing ? styles.asideOverlayBackdropClosing : \"\"\n }`}\n onClick={handleOverlayClose}\n aria-hidden=\"true\"\n />\n )}\n <aside ref={asideRef} className={classNames} style={style}>\n <div className={contentClassNames}>\n {collapsed && collapsedContent\n ? collapsedContent\n : children}\n </div>\n {resizable && !collapsed && (\n <div\n className={styles.asideResizeHandle}\n onMouseDown={handleMouseDown}\n role=\"separator\"\n aria-orientation=\"vertical\"\n aria-label=\"Resize sidebar\"\n />\n )}\n </aside>\n </>\n );\n};\n\nconst MainLayoutMain: React.FC<MainLayoutMainProps> = ({\n children,\n className = \"\",\n maxWidth,\n centered = false,\n padding = \"lg\",\n}) => {\n const { asideHidden, asideFullHeight, mainRef } =\n React.useContext(LayoutContext);\n\n const paddingClass = {\n none: styles.mainPaddingNone,\n sm: styles.mainPaddingSm,\n md: styles.mainPaddingMd,\n lg: styles.mainPaddingLg,\n xl: styles.mainPaddingXl,\n }[padding];\n\n const classNames = [\n styles.main,\n asideHidden && styles.mainFullWidth,\n asideFullHeight && styles.mainWithFullHeightAside,\n paddingClass,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n const innerStyle: React.CSSProperties = {\n ...(maxWidth && {\n maxWidth: typeof maxWidth === \"number\" ? `${maxWidth}px` : maxWidth,\n }),\n ...(centered && { margin: \"0 auto\" }),\n };\n\n return (\n <main\n ref={mainRef as React.RefObject<HTMLElement>}\n className={classNames}\n >\n {maxWidth || centered ? (\n <div style={innerStyle}>{children}</div>\n ) : (\n children\n )}\n </main>\n );\n};\n\nconst MainLayoutFooter: React.FC<MainLayoutFooterProps> = ({\n children,\n className = \"\",\n variant = \"relative\",\n height,\n}) => {\n const { asideFullHeight } = React.useContext(LayoutContext);\n\n const variantClass = {\n fixed: styles.footerFixed,\n sticky: styles.footerSticky,\n relative: styles.footerRelative,\n }[variant];\n\n const classNames = [\n styles.footer,\n variantClass,\n asideFullHeight && styles.footerWithFullHeightAside,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n const style: React.CSSProperties = height\n ? ({\n \"--footer-custom-height\":\n typeof height === \"number\" ? `${height}px` : height,\n } as React.CSSProperties)\n : {};\n\n return (\n <footer className={classNames} style={style}>\n {children}\n </footer>\n );\n};\n\n// ==================== Root Component ====================\nconst MainLayoutRoot: React.FC<MainLayoutProps> = ({\n children,\n className = \"\",\n asidePosition = \"left\",\n}) => {\n const [asideHidden, setAsideHidden] = useState(false);\n const [asideCollapsed, setAsideCollapsed] = useState(false);\n const [asideFullHeight, setAsideFullHeight] = useState(false);\n const [headerBehavior, setHeaderBehavior] =\n useState<HeaderBehavior>(\"sticky\");\n\n const mainRef = useRef<HTMLElement | null>(null);\n const { scrollY } = useScrollDirection(mainRef);\n\n const registerAside = useCallback(\n (collapsed: boolean, hidden: boolean, fullHeight: boolean) => {\n setAsideCollapsed(collapsed);\n setAsideHidden(hidden);\n setAsideFullHeight(fullHeight);\n },\n []\n );\n\n const registerHeader = useCallback((behavior: HeaderBehavior) => {\n setHeaderBehavior(behavior);\n }, []);\n\n // Also detect if aside is present in children (for initial state)\n useEffect(() => {\n const hasAside = React.Children.toArray(children).some(\n (child) =>\n React.isValidElement(child) &&\n (child.type as React.FC) === MainLayoutAside &&\n !(child.props as MainLayoutAsideProps).hidden\n );\n if (!hasAside) {\n setAsideHidden(true);\n }\n }, [children]);\n\n const layoutClass =\n asidePosition === \"right\" ? styles.layoutRight : styles.layoutLeft;\n\n const classNames = [\n styles.layout,\n layoutClass,\n asideCollapsed && styles.layoutAsideCollapsed,\n asideHidden && styles.layoutAsideHidden,\n asideFullHeight && styles.layoutAsideFullHeight,\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n const contextValue: LayoutContextValue = {\n asidePosition,\n asideHidden,\n asideCollapsed,\n asideFullHeight,\n headerBehavior,\n scrollY,\n mainRef,\n registerAside,\n registerHeader,\n };\n\n return (\n <LayoutContext.Provider value={contextValue}>\n <div className={classNames}>{children}</div>\n </LayoutContext.Provider>\n );\n};\n\n// ==================== Compound Component ====================\nexport const MainLayout = Object.assign({\n Root: MainLayoutRoot,\n Header: MainLayoutHeader,\n Aside: MainLayoutAside,\n Main: MainLayoutMain,\n Footer: MainLayoutFooter,\n});\n\n// ==================== Export Types ====================\nexport type {\n MainLayoutProps,\n MainLayoutHeaderProps,\n MainLayoutAsideProps,\n MainLayoutMainProps,\n MainLayoutFooterProps,\n AsidePosition,\n HeaderBehavior,\n AsideVariant,\n FooterVariant,\n};\n"],"names":["useControlled","controlled","defaultProp","name","state","isControlled","React","valueState","setValue","value","defaultValue","setValueIfUncontrolled","newValue","UNINITIALIZED","useRefWithInit","init","initArg","ref","useInsertionEffect","useSafeInsertionEffect","fn","useStableCallback","callback","stable","createStableCallback","assertNotCalled","args","noop","useIsoLayoutEffect","set","warn","messages","messageKey","CompositeListContext","useCompositeListContext","CompositeList","props","children","elementsRef","labelsRef","onMapChangeProp","onMapChange","nextIndexRef","listeners","createListeners","map","createMap","mapTick","setMapTick","lastTickRef","register","node","metadata","unregister","sortedMap","newMap","sortByDocumentPosition","index","mutationObserver","entries","diff","updateDiff","entry","_","subscribeMapChange","l","contextValue","_jsx","a","b","position","DirectionContext","useDirection","formatErrorMessage","code","url","arg","AccordionRootContext","useAccordionRootContext","context","_formatErrorMessage","useMergedRefs","c","d","forkRef","createForkRef","didChange","update","useMergedRefsN","refs","didChangeN","newRefs","instance","cleanupCallbacks","i","refCleanup","cleanupCallback","majorVersion","isReactVersionAtLeast","reactVersionToCheck","getReactElementRef","element","reactElement","propsWithRef","mergeObjects","getStateAttributesProps","customMapping","key","customProps","resolveClassName","className","resolveStyle","style","EMPTY_PROPS","mergeProps","e","merged","resolvePropsGetter","mergeOne","mergePropsN","inputProps","isPropsGetter","mutablyMergeInto","mergedProps","externalProps","propName","externalPropValue","mergeClassNames","isEventHandler","mergeEventHandlers","code0","code1","code2","previousProps","ourHandler","theirHandler","event","isSyntheticEvent","baseUIEvent","makeEventPreventable","result","ourClassName","theirClassName","NOOP","EMPTY_ARRAY","EMPTY_OBJECT","PATIENT_CLICK_THRESHOLD","DISABLED_TRANSITIONS_STYLE","CLICK_TRIGGER_IDENTIFIER","DROPDOWN_COLLISION_AVOIDANCE","POPUP_COLLISION_AVOIDANCE","ownerVisuallyHidden","useRenderElement","componentProps","params","renderProp","outProps","useRenderElementProps","evaluateRenderProp","classNameProp","styleProp","stateAttributesMapping","enabled","stateProps","render","renderTag","Tag","_createElement","none","triggerPress","triggerHover","outsidePress","itemPress","closePress","focusOut","escapeKey","listNavigation","cancelOpen","imperativeAction","windowResize","createChangeEventDetails","reason","trigger","customProperties","canceled","allowPropagation","custom","rootStateAttributesMapping","AccordionRoot","forwardedRef","disabled","hiddenUntilFoundProp","keepMountedProp","loopFocus","onValueChangeProp","multiple","orientation","valueProp","defaultValueProp","elementProps","direction","onValueChange","accordionItemRefs","handleValueChange","nextOpen","details","REASONS.none","nextOpenValues","v","nextValue","SafeReact","globalId","useGlobalId","idOverride","prefix","defaultId","setDefaultId","id","maybeReactUseId","useId","reactId","useBaseUiId","EMPTY","useOnMount","LAST_RAF","Scheduler","timestamp","currentCallbacks","currentCallbacksCount","didRAFChange","scheduler","AnimationFrame","useAnimationFrame","timeout","resolveRef","maybeRef","useAnimationsFinished","elementOrRef","waitForNextTick","treatAbortedAsFinished","frame","fnToExecute","signal","exec","anim","ReactDOM","useTransitionStatus","open","enableIdleState","deferEndingState","transitionStatus","setTransitionStatus","mounted","setMounted","useCollapsibleRoot","parameters","openParam","defaultOpen","onOpenChange","setOpen","visible","setVisible","height","width","setDimensions","defaultPanelId","panelIdState","setPanelIdState","panelId","hiddenUntilFound","setHiddenUntilFound","keepMounted","setKeepMounted","abortControllerRef","animationTypeRef","transitionDimensionRef","panelRef","runOnceAnimationsFinish","handleTrigger","eventDetails","REASONS.triggerPress","panel","CollapsibleRootContext","useCollapsibleRootContext","IndexGuessBehavior","useCompositeListItem","label","textRef","indexGuessBehavior","externalIndex","indexRef","setIndex","newIndex","componentRef","isLabelDefined","AccordionItemContext","useAccordionItemContext","TransitionStatusDataAttributes","STARTING_HOOK","ENDING_HOOK","transitionStatusMapping","CollapsiblePanelDataAttributes","CollapsibleTriggerDataAttributes","PANEL_OPEN_HOOK","PANEL_CLOSED_HOOK","triggerOpenStateMapping","collapsibleOpenStateMapping","AccordionItemDataAttributes","accordionStateAttributesMapping","baseMapping","AccordionItem","disabledProp","onOpenChangeProp","listItemRef","mergedRef","contextDisabled","rootState","openValues","fallbackValue","isOpen","collapsible","collapsibleState","collapsibleContext","triggerId","setTriggerId","accordionItemContext","AccordionHeader","isElementDisabled","hasWindow","getNodeName","isNode","getWindow","_node$ownerDocument","getDocumentElement","_ref","isElement","isHTMLElement","isShadowRoot","invalidOverflowDisplayValues","isOverflowElement","overflow","overflowX","overflowY","display","getComputedStyle","tableElements","isTableElement","topLayerSelectors","isTopLayer","selector","transformProperties","willChangeValues","containValues","isContainingBlock","elementOrCss","webkit","isWebKit","css","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","lastTraversableNodeNames","getNodeScroll","getNearestOverflowAncestor","parentNode","getOverflowAncestors","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement","error","CompositeRootContext","useCompositeRootContext","optional","useFocusableWhenDisabled","focusableWhenDisabled","composite","tabIndexProp","isNativeButton","isFocusableComposite","isNonFocusableComposite","additionalProps","useButton","tabIndex","elementRef","isCompositeItem","isValidLink","focusableWhenDisabledProps","isButtonTag","updateDisabled","isButtonElement","getButtonProps","externalOnClick","externalOnMouseDown","externalOnKeyUp","externalOnKeyDown","externalOnPointerDown","otherExternalProps","shouldClick","isEnterKey","isSpaceKey","buttonRef","elem","hasNavigator","nav","getNavigatorData","platform","getPlatform","userAgent","getUserAgent","isIOS","isSafari","isAndroid","isJSDOM","uaData","brand","version","FOCUSABLE_ATTRIBUTE","ACTIVE_KEY","SELECTED_KEY","TYPEABLE_SELECTOR","ARROW_LEFT","ARROW_RIGHT","ARROW_UP","ARROW_DOWN","activeElement","doc","contains","parent","child","rootNode","next","getTarget","isEventTargetWithin","eventAgain","isRootElement","getDocument","isTypeableElement","isTypeableCombobox","matchesFocusVisible","getFloatingFocusElement","floatingElement","getNodeChildren","nodes","onlyOpenChildren","getNodeAncestors","allAncestors","currentParentId","stopEvent","isReactEvent","isVirtualClick","isVirtualPointerEvent","isMouseLikePointerType","pointerType","strict","values","sides","min","max","round","floor","createCoords","oppositeSideMap","oppositeAlignmentMap","clamp","start","end","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","yAxisSides","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","length","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","lrPlacement","rlPlacement","tbPlacement","btPlacement","getSideList","side","isStart","getOppositeAxisPlacements","flipAlignment","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","x","y","isDifferentGridRow","cols","prevRow","isIndexOutOfListBounds","listRef","getMinListIndex","disabledIndices","findNonDisabledListIndex","getMaxListIndex","startingIndex","decrement","amount","isListIndexDisabled","getGridNavigatedIndex","minIndex","maxIndex","prevIndex","stop","nextIndex","rows","rowIndexMap","hasRoleRow","currentRowEl","currentRowIndex","el","idx","rowEl","hasDomRows","row","navigateVertically","currentRow","colInRow","nextRow","visited","targetRow","clampedCol","col","candidate","domBasedCandidate","maxCol","offset","lastRow","createGridCellMap","sizes","dense","cellMap","startIndex","itemPlaced","targetCells","j","cell","getGridCellIndexOfCorner","corner","firstCellIndex","sizeItem","getGridCellIndices","indices","cellIndex","candidateSelectors","candidateSelector","NoElement","matches","getRootNode","_element$getRootNode","_isInert","lookUp","_node$getAttribute","inertAtt","inert","isContentEditable","_node$getAttribute2","attValue","getCandidates","includeContainer","filter","candidates","_getCandidatesIteratively","elements","options","elementsToCheck","assigned","content","nestedCandidates","validCandidate","shadowRoot","validShadowRoot","_nestedCandidates","hasTabIndex","getTabIndex","getSortOrderTabIndex","isScope","sortOrderedTabbables","isInput","isHiddenInput","isDetailsWithSummary","r","getCheckedRadio","form","isTabbableRadio","radioScope","queryRadios","radioSet","err","checked","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","attached","_nodeRootHost","_nodeRootHost$ownerDo","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","isHidden","displayCheck","getShadowRoot","isDirectSummary","nodeUnderDetails","originalNode","parentElement","isDisabledFromFieldset","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isShadowRootTabbable","shadowHostNode","_sortByOrder","regularTabbables","orderedTabbables","item","candidateTabindex","acc","sortable","tabbable","container","focusable","isTabbable","getTabbableOptions","getTabbableIn","dir","len","active","getNextTabbable","referenceElement","getPreviousTabbable","getTabbableNearElement","elementCount","getTabbableAfterElement","getTabbableBeforeElement","isOutsideEvent","containerElement","relatedTarget","disableFocusInside","enableFocusInside","tabindex","HOME","END","HORIZONTAL_KEYS","HORIZONTAL_KEYS_WITH_EXTRA_KEYS","VERTICAL_KEYS","VERTICAL_KEYS_WITH_EXTRA_KEYS","ARROW_KEYS","ALL_KEYS","COMPOSITE_KEYS","SHIFT","CONTROL","ALT","META","MODIFIER_KEYS","isInputElement","isNativeInput","scrollIntoViewIfNeeded","scrollContainer","targetX","targetY","isOverflowingX","isOverflowingY","elementOffsetLeft","getOffset","containerStyles","getStyles","elementStyles","elementOffsetTop","ancestor","styles","SUPPORTED_KEYS","getActiveTriggers","accordionItemElements","output","section","AccordionTrigger","idProp","nativeButton","isRtl","isHorizontal","triggers","lastIndex","thisIndex","toNext","toPrev","AccordionRootDataAttributes","useCollapsiblePanel","externalRef","idParam","isBeforeMatchRef","latestAnimationNameRef","shouldCancelInitialOpenAnimationRef","shouldCancelInitialOpenTransitionRef","endingStyleFrame","hidden","handlePanelRef","panelStyles","hasAnimation","hasTransition","nextFrame","mergedPanelRef","resizeFrame","originalLayoutStyles","abortController","attributeObserver","endingStyleAttribute","mutationList","mutation","handleBeforeMatch","AccordionPanelCssVars","useValueAsRef","latest","createLatestRef","useOpenChangeComplete","onCompleteParam","openRef","onComplete","AccordionPanel","contextHiddenUntilFound","contextKeepMounted","panelState","ALSAccordionContext","createContext","useALSAccordionContext","useContext","ALSAccordionRoot","forwardRef","openMultiple","variant","size","rootClassName","jsx","Accordion.Root","ALSAccordionItem","itemClassName","Accordion.Item","ALSAccordionHeader","headerClassName","Accordion.Header","ALSAccordionTrigger","triggerClassName","Accordion.Trigger","ChevronIcon","ALSAccordionPanel","panelClassName","Accordion.Panel","ALSAccordion","ALSAlertDialog","ALSAutocomplete","ALSAvatar","ALSButton","buttonStyle","block","type","rest","classNames","ALSCheckbox","ALSCheckboxGroup","ALSCollapsible","ALSCombobox","ALSContextMenu","DialogRootContext","useDialogRootContext","dialogRootContext","CommonPopupDataAttributes","CommonTriggerDataAttributes","TRIGGER_HOOK","PRESSABLE_TRIGGER_HOOK","POPUP_OPEN_HOOK","POPUP_CLOSED_HOOK","ANCHOR_HIDDEN_HOOK","pressableTriggerOpenStateMapping","popupStateMapping","DialogBackdrop","forceRender","store","nested","DialogClose","handleClick","REASONS.closePress","DialogDescription","Timeout","delay","useTimeout","createEventEmitter","data","listener","FloatingTreeStore","n","FloatingNodeContext","FloatingTreeContext","useFloatingParentNodeId","useFloatingTree","externalTree","contextTree","useFloatingNodeId","tree","parentId","FloatingNode","FloatingTree","createAttribute","getDelay","prop","visuallyHidden","ownerDocument","FocusGuard","role","setRole","restProps","rafId","enqueueFocus","preventScroll","cancelPrevious","sync","counters","getCounterMap","control","uncontrolledElementsSet","markerMap","lockCount","unwrapHost","correctElements","targets","target","correctedTarget","applyAttributeToOthers","uncorrectedAvoidElements","body","ariaHidden","markerName","controlAttribute","avoidElements","elementsToKeep","elementsToStop","hiddenElements","markerCounter","keep","deep","attr","alreadyHidden","counterMap","counterValue","markerValue","markOthers","PortalContext","usePortalContext","useFloatingPortalNode","containerProp","elementState","uniqueId","parentPortalNode","setContainerElement","portalNode","setPortalNode","containerRef","resolvedContainer","portalElement","FloatingPortal","renderGuards","portalSubtree","beforeOutsideRef","afterOutsideRef","beforeInsideRef","afterInsideRef","focusManagerState","setFocusManagerState","modal","shouldRenderGuards","onFocus","portalContextValue","_jsxs","domReference","REASONS.focusOut","getEventType","lastInteractionType","ownerWindow","LIST_LIMIT","previouslyFocusedElements","clearDisconnectedPreviouslyFocusedElements","addPreviouslyFocusedElement","getPreviouslyFocusedElement","getFirstTabbableElement","tabbableOptions","isFocusable","handleTabIndex","floatingFocusElement","orderRef","tabbableContent","dataTabIndex","FloatingFocusManager","order","initialFocus","returnFocus","restoreFocus","closeOnFocusOut","openInteractionType","getInsideElementsProp","nextFocusableElement","previousFocusableElement","beforeContentFocusGuardRef","floating","events","dataRef","getNodeId","getInsideElements","ignoreInitialFocus","isUntrappedTypeableCombobox","initialFocusRef","returnFocusRef","openInteractionTypeRef","portalContext","startDismissButtonRef","endDismissButtonRef","preventReturnFocusRef","isPointerDownRef","tabbableIndexRef","closeTypeRef","lastInteractionTypeRef","blurTimeout","pointerDownTimeout","restoreFocusFrame","isInsidePortal","getTabbableContent","getTabbableElements","onKeyDown","handleFocusIn","tabbableIndex","onPointerDown","handlePointerDown","handleFocusOutside","currentTarget","nodeId","movedToUnrelatedNode","prevTabbableIndex","nodeToFocus","markInsideReactTree","domReferenceElement","cleanups","cleanup","beforeGuardRef","afterGuardRef","mergedBeforeGuardRef","mergedAfterGuardRef","portalNodes","rootAncestorComboboxDomReference","insideElements","previouslyFocusedElement","focusableElements","initialFocusValueOrFn","resolvedInitialFocus","elToFocus","onOpenChangeLocal","REASONS.triggerHover","REASONS.outsidePress","isPreventScrollSupported","fallbackEl","getReturnElement","returnFocusValueOrFn","resolvedReturnFocusValue","fallback","activeEl","isFocusInsideFloatingTree","returnElement","tabbableReturnElement","hasExplicitReturnFocus","els","useClick","eventOption","toggle","ignoreMouse","stickIfOpen","touchOpenDelay","pointerTypeRef","touchOpenTimeout","reference","nativeEvent","openEvent","openEventType","hasClickedOnInactiveTrigger","eventCurrentTarget","computeCoordsFromPlacement","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","config","strategy","middleware","validMiddleware","statefulPlacement","middlewareData","resetCount","nextX","nextY","reset","detectOverflow","_await$platform$isEle","boundary","rootBoundary","elementContext","altBoundary","paddingObject","clippingClientRect","offsetParent","offsetScale","elementClientRect","flip","_middlewareData$arrow","_middlewareData$flip","initialPlacement","checkMainAxis","checkCrossAxis","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","detectOverflowOptions","initialSideAxis","isBasePlacement","fallbackPlacements","hasFallbackAxisSideDirection","placements","overflows","overflowsData","_middlewareData$flip2","_overflowsData$filter","nextPlacement","resetPlacement","_overflowsData$filter2","currentSideAxis","getSideOffsets","isAnySideFullyClipped","hide","offsets","originSides","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","crossAxis","_middlewareData$offse","diffCoords","shift","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","limitShift","rawOffset","computedOffset","limitMin","limitMax","_middlewareData$offse2","isOriginSide","_state$middlewareData","_state$middlewareData2","apply","isYAxis","heightSide","widthSide","maximumClippingHeight","maximumClippingWidth","overflowAvailableHeight","overflowAvailableWidth","noShift","availableHeight","availableWidth","xMin","xMax","yMin","yMax","nextDimensions","getCssDimensions","getComputedStyle$1","hasOffset","offsetWidth","offsetHeight","shouldFallback","unwrapElement","getScale","domElement","$","noOffsets","getVisualOffsets","shouldAddVisualOffsets","isFixed","floatingOffsetParent","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","left","top","getWindowScrollBarX","leftScroll","getHTMLOffset","documentElement","scroll","htmlRect","convertOffsetParentRelativeRectToViewportRelativeRect","topLayer","isOffsetParentAnElement","offsetRect","htmlOffset","getClientRects","getDocumentRect","html","SCROLLBAR_MAX","getViewportRect","visualViewport","visualViewportBased","windowScrollbarX","bodyStyles","bodyMarginInline","clippingStableScrollbarWidth","absoluteOrFixed","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","cache","cachedResult","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","getClippingRect","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getDimensions","getRectRelativeToOffsetParent","setLeftRTLScrollbarOffset","isStaticPositioned","getTrueOffsetParent","polyfill","rawOffsetParent","getOffsetParent","svgOffsetParent","getElementRects","getOffsetParentFn","getDimensionsFn","floatingDimensions","isRTL","rectsAreEqual","observeMove","onMove","io","timeoutId","root","_io","refresh","skip","threshold","elementRectForRootMargin","insetTop","insetRight","insetBottom","insetLeft","isFirstUpdate","handleObserve","ratio","autoUpdate","ancestorScroll","ancestorResize","elementResize","layoutShift","animationFrame","referenceEl","ancestors","cleanupIo","reobserveFrame","resizeObserver","firstEntry","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","offset$1","shift$1","flip$1","size$1","hide$1","limitShift$1","mergedOptions","platformWithCache","computePosition$1","isClient","useLayoutEffect","deepEqual","keys","getDPR","roundByDPR","dpr","useLatestRef","useFloating","externalReference","externalFloating","transform","whileElementsMounted","setData","latestMiddleware","setLatestMiddleware","_reference","_setReference","_floating","_setFloating","setReference","referenceRef","setFloating","floatingRef","floatingEl","hasWhileElementsMounted","whileElementsMountedRef","platformRef","fullData","isMountedRef","floatingStyles","initialStyles","deps","bubbleHandlerKeys","normalizeProp","normalizable","useDismiss","outsidePressProp","outsidePressEvent","referencePress","referencePressEvent","bubbles","outsidePressFn","endedOrStartedInsideRef","escapeKeyBubbles","outsidePressBubbles","touchStateRef","cancelDismissOnEndTimeout","clearInsideReactTreeTimeout","clearInsideReactTree","isComposingRef","currentPointerTypeRef","trackPointerType","getOutsidePressEvent","computedType","resolved","closeOnEscapeKeyDown","shouldDismiss","native","REASONS.escapeKey","shouldIgnoreEvent","computedOutsidePressEvent","closeOnPressOutside","endedOrStartedInside","inertSelector","markers","targetRootAncestor","nextParent","marker","lastTraversableNode","scrollRe","isScrollableX","isScrollableY","canScrollX","canScrollY","pressedVerticalScrollbar","pressedHorizontalScrollbar","targetIsInsideChildren","handleTouchStart","touch","handleTouchStartCapture","closeOnPressOutsideCapture","handleTouchMove","deltaX","deltaY","distance","handleTouchMoveCapture","handleTouchEnd","handleTouchEndCapture","compositionTimeout","onScroll","handleCompositionStart","handleCompositionEnd","handlePressedInside","runIdentityFunctionCheck","resultFunc","inputSelectorsResults","outputSelectorResult","isInputSameAsOutput","emptyObject","stack","runInputStabilityCheck","inputSelectorResultsObject","inputSelectorArgs","memoize","memoizeOptions","inputSelectorResults","inputSelectorResultsCopy","createAnEmptyObject","globalDevModeChecks","NOT_FOUND","assertIsFunction","func","errorMessage","assertIsObject","object","assertIsArrayOfFunctions","array","itemTypes","ensureIsArray","getDependencies","createSelectorArgs","dependencies","collectInputSelectorResults","getDevModeChecksExecutionInfo","firstRun","devModeChecks","identityFunctionCheck","inputStabilityCheck","createSingletonCache","equals","createLruCache","maxSize","get","cacheIndex","put","getEntries","clear","referenceEqualityCheck","createCacheKeyComparator","equalityCheck","prev","lruMemoize","equalityCheckOrOptions","providedOptions","resultEqualityCheck","comparator","resultsCount","memoized","matchingEntry","StrongRef","Ref","UNTERMINATED","TERMINATED","createCacheNode","weakMapMemoize","fnNode","lastResult","cacheNode","objectCache","objectNode","primitiveCache","primitiveNode","terminatedNode","lastResultValue","createSelectorCreator","memoizeOrOptions","memoizeOptionsFromArgs","createSelectorCreatorOptions","createSelector2","recomputations","dependencyRecomputations","directlyPassedOptions","combinedOptions","argsMemoize","argsMemoizeOptions","finalMemoizeOptions","finalArgsMemoizeOptions","memoizedResultFunc","createSelector","createStructuredSelector","inputSelectorsObject","selectorCreator","inputSelectorKeys","composition","f","other","require$$0","is","objectIs","useState","useEffect","useDebugValue","useSyncExternalStore$2","subscribe","getSnapshot","_useState","inst","forceUpdate","checkIfSnapshotChanged","latestGetSnapshot","useSyncExternalStore$1","shim","useSyncExternalStoreShim_production","didWarnOld18Alpha","didWarnUncachedGetSnapshot","cachedValue","useSyncExternalStoreShim_development","shimModule","require$$1","useSyncExternalStore","useRef","useMemo","withSelector_production","getServerSnapshot","isEqual","instRef","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","withSelector_development","withSelectorModule","useStore","a1","a2","a3","selectorWithArgs","useSyncExternalStoreWithSelector","Store","newState","currentTick","changes","ReactStore","selectors","statePart","p","nextKeys","previouslyControlled","newValues","stableFunction","selectFn","prevValue","nextState","oldValue","useForcedRerendering","setState","FloatingRootStore","noEmit","triggerElements","initialState","newOpen","useTriggerRegistration","registeredElementId","useTriggerDataForwarding","triggerElement","stateUpdates","isMountedByThisTrigger","baseRegisterTrigger","registerTrigger","useImplicitActiveTrigger","iteratorResult","implicitTriggerId","implicitTriggerElement","useOpenStateTransitions","onUnmount","forceUnmount","preventUnmountingOnClose","PopupTriggerMap","existingElement","predicate","getEmptyRootContext","createInitialPopupStoreState","popupStoreSelectors","isActive","useFloatingRootContext","floatingId","optionDomReference","valuesToSync","internalRootStore","rootContext","rootContextElements","positionReference","setPositionReferenceRaw","domReferenceRef","usePosition","setPositionReference","computedPositionReference","localDomReference","setLocalDomReference","localFloatingElement","setLocalFloatingElement","useSyncedFloatingRootContext","popupStore","treatPopupAsFloatingElement","safePolygonIdentifier","interactiveSelector","isInteractiveElement","useHoverInteractionSharedState","interactedInsideRef","handlerRef","blockMouseMoveRef","performedPointerEventsMutationRef","unbindMouseMoveRef","restTimeoutPendingRef","openChangeTimeout","restTimeout","handleCloseOptionsRef","clickLikeEvents","useHoverFloatingInteraction","closeDelayProp","isClickLikeOpenEvent","isHoverOpen","closeWithDelay","runElseBranch","closeDelay","cleanupMouseMoveHandler","clearPointerEvents","handleInteractInside","parentFloating","onScrollMouseLeave","onFloatingMouseEnter","onFloatingMouseLeave","getRestMs","useHoverReferenceInteraction","handleClose","mouseOnly","restMs","move","isActiveTrigger","closeHandlerRef","handleCloseRef","delayRef","restMsRef","handleScrollMouseLeave","onMouseEnter","openDelay","currentDomReference","allTriggers","isOverInactiveTrigger","t","triggerNode","onMouseLeave","handler","setPointerRef","currentOpen","handleMouseMove","useInteractions","propsList","referenceDeps","floatingDeps","itemDeps","triggerDeps","getReferenceProps","userProps","getFloatingProps","getItemProps","getTriggerProps","elementKey","eventHandlers","isItem","outputProps","propsOrGetProps","mutablyMergeProps","val","ESCAPE","doSwitch","vertical","horizontal","isMainOrientationKey","isMainOrientationToEndKey","isCrossOrientationOpenKey","isCrossOrientationCloseKey","useListNavigation","activeIndex","onNavigateProp","selectedIndex","allowEscape","virtual","focusItemOnOpen","focusItemOnHover","openOnArrowKeyDown","parentOrientation","scrollItemIntoView","itemSizes","floatingFocusElementRef","typeableComboboxReference","focusItemOnOpenRef","keyRef","isPointerModalityRef","onNavigate","previousOnNavigateRef","previousMountedRef","previousOpenRef","forceSyncFocusRef","forceScrollIntoViewRef","disabledIndicesRef","latestOpenRef","scrollItemIntoViewRef","selectedIndexRef","focusItem","runFocus","initialItem","forceScrollIntoView","waitedItem","scrollIntoViewOptions","runs","waitForListPopulated","treeContainsActiveEl","hasActiveIndex","syncCurrentTarget","getParentOrientation","commonOnKeyDown","REASONS.listNavigation","currentIndex","minGridIndex","maxGridIndex","foundIndex","itemIndex","listIndex","ariaActiveDescendantProp","checkVirtualMouse","checkVirtualPointer","isArrowKey","isParentCrossOpenKey","isMainKey","isNavigationKey","isParentMainKey","componentRoleToAriaRoleMap","useRole","defaultFloatingId","defaultReferenceId","referenceId","ariaRole","isNested","floatingProps","selected","commonProps","useTypeahead","onMatchProp","onTypingChange","findMatch","resetMs","ignoreKeys","stringRef","prevIndexRef","matchIndexRef","setTypingChange","getMatchingIndex","orderedList","string","str","text","listContent","isPointInPolygon","point","polygon","isInsideValue","xi","yi","xj","yj","isInside","safePolygon","buffer","blockPointerEvents","requireIntent","hasLanded","lastX","lastY","lastCursorTime","getCursorSpeed","currentTime","elapsedTime","speed","onClose","close","clientX","clientY","clientPoint","isLeave","isOverFloatingEl","isOverReferenceEl","refRect","cursorLeaveFromRight","cursorLeaveFromBottom","isOverReferenceRect","isFloatingWider","isFloatingTaller","right","bottom","rectPoly","getPolygon","px","py","cursorPointOne","cursorPointTwo","commonPoints","cursorSpeed","DialogPopupCssVars","DialogPopupDataAttributes","DialogPortalContext","useDialogPortalContext","DialogPopup","finalFocus","descriptionElementId","disablePointerDismissal","floatingRootContext","rootPopupProps","nestedOpenDialogCount","openMethod","titleElementId","defaultInitialFocus","interactionType","nestedDialogOpen","inertValue","InternalBackdrop","cutout","otherProps","clipPath","DialogPortal","portalProps","originalHtmlStyles","originalBodyStyles","originalHtmlScrollBehavior","hasInsetScrollbars","preventScrollOverlayScrollbars","elementToLock","originalOverflow","preventScrollInsetScrollbars","scrollTop","scrollLeft","supportsStableScrollbarGutter","lockScroll","htmlStyles","scrollbarGutterValue","hasConstantOverflowY","hasConstantOverflowX","scrollbarWidth","scrollbarHeight","marginY","marginX","handleResize","ScrollLocker","htmlOverflowY","hasOverlayScrollbars","SCROLL_LOCKER","useScrollLock","useEnhancedClickHandler","lastClickInteractionTypeRef","useOpenInteractionType","setOpenMethod","handleTriggerClick","onClick","useDialogRoot","parentContext","actionsRef","popupElement","triggerProps","resetOpenInteractionType","createDialogEventDetails","handleImperativeClose","REASONS.imperativeAction","ownNestedOpenDialogs","setOwnNestedOpenDialogs","isTopmost","dismiss","eventTarget","ownChildrenCount","activeTriggerProps","inactiveTriggerProps","popupProps","DialogStore","createInitialState","updatedState","newTriggerId","DialogRoot","openProp","onOpenChangeComplete","handle","triggerIdProp","defaultTriggerIdProp","parentDialogRootContext","payload","DialogTitle","DialogTrigger","thisTriggerId","floatingContext","isOpenedByThisTrigger","setTriggerElement","click","localInteractionProps","rootTriggerProps","ALSDialogContext","useALSDialogContext","ALSDialogRoot","Dialog.Root","ALSDialogTrigger","Dialog.Trigger","ALSDialogBackdrop","backdropClassName","Dialog.Backdrop","ALSDialogPortal","Dialog.Portal","ALSDialogPopup","popupClassName","Dialog.Popup","ALSDialogTitle","titleClassName","Dialog.Title","ALSDialogDescription","descriptionClassName","Dialog.Description","ALSDialogClose","closeClassName","Dialog.Close","CloseIcon","ALSDialog","ALSField","ALSFieldset","ALSForm","FieldControlDataAttributes","DEFAULT_VALIDITY_STATE","fieldValidityMapping","FieldRootContext","useFieldRootContext","FormContext","useFormContext","LabelableContext","useLabelableContext","getCombinedFieldValidityData","validityData","invalid","useLabelableId","implicit","controlRef","controlId","setControlId","useField","commit","formRef","markedDirtyRef","setValidityData","getValue","initialValue","fields","FieldControl","nameProp","fieldState","fieldName","fieldDisabled","setTouched","setDirty","setFocused","setFilled","validationMode","validation","labelId","hasExternalValue","setValueUnwrapped","inputValue","Input","Field.Control","ALSInput","status","inputClassName","ALSMenu","ALSMenubar","ALSMeter","ALSNavigationMenu","ALSNumberField","PopoverRootContext","usePopoverRootContext","PopoverStore","initial","isHover","isKeyboardClick","isDismissClose","changeState","externalStore","PopoverRootComponent","defaultOpenProp","positionerElement","openReason","interactionTypeTriggerProps","createPopoverEventDetails","popoverContext","PopoverRoot","OPEN_DELAY","PopoverTrigger","openOnHover","isTriggerActive","hoverProps","localProps","preFocusGuardRef","handlePreFocusGuardFocus","handleFocusTargetFocus","nextTabbable","prevTabbable","PopoverPortalContext","usePopoverPortalContext","PopoverPortal","PopoverPositionerContext","usePopoverPositionerContext","baseArrow","arrowDimensions","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","center","shouldAddOffset","alignmentOffset","arrow","anchorHidden","nativeHide","DEFAULT_SIDES","adaptiveOrigin","rawX","rawY","floatRect","offsetDimensions","currentSide","sideX","sideY","getLogicalSide","sideParam","renderedSide","isLogicalSideParam","getOffsetData","useAnchorPositioning","anchor","positionMethod","sideOffset","align","alignOffset","collisionBoundary","collisionPaddingParam","sticky","arrowPadding","disableAnchorTracking","collisionAvoidance","shiftCrossAxis","lazyFlip","mountSide","setMountSide","collisionAvoidanceSide","collisionAvoidanceAlign","collisionAvoidanceFallbackAxisSide","anchorFn","anchorFnCallback","anchorDep","anchorValueRef","collisionPadding","bias","biasTop","biasBottom","biasLeft","biasRight","commonCollisionProps","arrowRef","sideOffsetRef","alignOffsetRef","alignAxis","shiftDisabled","crossAxisShiftEnabled","flipMiddleware","shiftMiddleware","limitData","arrowSize","offsetAmount","renderedPlacement","currentRenderedSide","currentRenderedAxis","arrowEl","arrowX","arrowY","arrowWidth","arrowHeight","transformX","transformY","shiftY","halfAnchorHeight","sideOffsetValue","isOverlappingAnchor","adjacentTransformOrigin","overlapTransformOrigin","autoUpdateOptions","isPositioned","originalFloatingStyles","resolvedPosition","registeredPositionReferenceRef","anchorValue","resolvedAnchor","finalAnchor","isRef","logicalRenderedSide","renderedAlign","arrowStyles","arrowUncentered","getDisabledMountTransitionStyles","PopoverPositioner","instantType","prevTriggerElementRef","positioning","defaultProps","hiddenStyles","positioner","currentTriggerElement","prevTriggerElement","ac","setPositionerElement","supportsResizeObserver","DEFAULT_ENABLED","usePopupAutoResize","onMeasureLayoutParam","onMeasureLayoutCompleteParam","isInitialRender","previousDimensionsRef","onMeasureLayout","onMeasureLayoutComplete","observer","restorePopupPosition","overrideElementStyle","restorePopupTransform","restorePopupScale","restoreAvailableWidth","restoreAvailableHeight","dimensions","newDimensions","property","originalValue","ToolbarRootContext","useToolbarRootContext","PopoverPopup","insideToolbar","titleId","descriptionId","activeTriggerElement","setPopupElement","handleMeasureLayout","handleMeasureLayoutComplete","previousDimensions","anchoringStyles","isPhysicalLeft","PopoverArrow","PopoverBackdrop","PopoverTitle","PopoverDescription","PopoverClose","ALSPopoverRoot","Popover.Root","ALSPopoverTrigger","Popover.Trigger","ALSPopoverPortal","Popover.Portal","ALSPopoverPositioner","Popover.Positioner","ALSPopoverPopup","Popover.Popup","ALSPopoverArrow","Popover.Arrow","ALSPopoverTitle","Popover.Title","ALSPopoverDescription","Popover.Description","ALSPopoverClose","Popover.Close","ALSPopoverBackdrop","Popover.Backdrop","ALSPopover","ALSPreviewCard","getFormatter","locale","optionsString","cachedFormatter","formatter","formatNumber","ProgressRootContext","useProgressRootContext","ProgressRootDataAttributes","progressStateAttributesMapping","formatValue","format","getDefaultAriaValueText","formattedValue","ProgressRoot","getAriaValueText","setLabelId","formatOptionsRef","ProgressTrack","valueToPercent","ProgressIndicator","percentageValue","ProgressValue","formattedValueArg","formattedValueDisplay","ProgressLabel","o","clsx","ALSProgressRoot","Progress.Root","ALSProgressTrack","Progress.Track","ALSProgressIndicator","Progress.Indicator","ALSProgressLabel","Progress.Label","ALSProgressValue","Progress.Value","ALSProgress","ALSRadio","ALSScrollArea","useOnFirstRender","SelectRootContext","SelectFloatingContext","useSelectRootContext","useSelectFloatingContext","defaultItemEquality","compareItemEquality","comparer","itemIncludes","collection","findItemIndex","removeItem","serializeValue","isGroupedItems","items","stringifyAsLabel","itemToStringLabel","stringifyAsValue","itemToStringValue","resolveSelectedLabel","flatItems","g","nullItem","it","match","resolveMultipleLabels","storeValue","useValueChanged","onChange","valueRef","onChangeCallback","SelectRoot","readOnly","required","inputRef","isItemEqualToValue","clearErrors","shouldValidateOnChange","generatedId","setOpenUnwrapped","popupRef","scrollHandlerRef","scrollArrowsMountedCountRef","valuesRef","typingRef","keyboardActiveRef","selectedItemTextRef","selectionRef","alignItemWithTriggerActiveRef","serializedValue","initialValueRef","registry","currentValue","lastValue","activeOption","handleUnmount","handleScrollArrowVisibility","scroller","viewportTop","viewportBottom","shouldShowUp","shouldShowDown","nextActiveIndex","typeahead","typing","hasMultipleSelection","hiddenInputs","currentSerializedValue","handleChange","matchingValue","getPseudoElementBounds","elementRect","beforeStyles","afterStyles","beforeWidth","beforeHeight","afterWidth","afterHeight","totalWidth","totalHeight","widthDiff","heightDiff","BOUNDARY_OFFSET","SelectTrigger","selectDisabled","listElement","positionerRef","triggerRef","timeoutFocus","timeoutMouseDown","timeout1","timeout2","ariaControlsId","handleMouseUp","mouseEvent","mouseUpTarget","bounds","REASONS.cancelOpen","SelectValue","childrenProp","SelectIcon","SelectPortalContext","SelectPortal","forceMount","SelectPositionerContext","useSelectPositionerContext","clearStyles","originalStyles","LIST_FUNCTIONAL_STYLES","FIXED","SelectPositioner","alignItemWithTrigger","touchModality","scrollUpArrowRef","scrollDownArrowRef","controlledAlignItemWithTrigger","setControlledAlignItemWithTrigger","alignItemWithTriggerActive","positionerStyles","prevMapSizeRef","prevSize","stylesToClear","isMouseWithinBounds","targetRect","DISABLE_SCROLLBAR_CLASS_NAME","styleDisableScrollbar","SelectPopup","highlightTimeout","initialHeightRef","reachedMaxHeightRef","maxHeightRef","initialPlacedRef","originalPositionerStylesRef","scrollArrowFrame","handleScroll","isTopPositioned","isBottomPositioned","currentHeight","marginTop","marginBottom","viewportHeight","scrollHeight","clientHeight","maxScrollTop","nextPositionerHeight","nextScrollTop","setReachedMax","idealHeight","nextHeight","overshoot","popupStyles","triggerRect","positionerRect","triggerX","triggerHeight","borderBottom","minHeight","paddingLeft","paddingRight","triggerCollisionThreshold","viewportWidth","availableSpaceBeneathTrigger","textElement","valueElement","offsetX","offsetY","valueRect","textRect","valueLeftFromTriggerLeft","textLeftFromPositionerLeft","valueCenterFromPositionerTop","textCenterFromTriggerTop","maxHeight","maxRight","rightOverflow","fallbackToAlignPopupToTrigger","isPinchZoomed","topOffset","REASONS.windowResize","popup","SelectItemContext","useSelectItemContext","SelectItem","listItem","highlighted","selectedByFocus","hasRegistered","itemRef","selectedValue","rootProps","lastKeyRef","didPointerDownRef","commitSelection","REASONS.itemPress","disallowSelectedMouseUp","disallowUnselectedMouseUp","SelectItemIndicator","Inner","indicatorRef","SelectItemText","localRef","hasNoSelectedItemText","SelectGroupContext","useSelectGroupContext","SelectGroup","SelectGroupLabel","Separator","toKebabCase","toCamelCase","p1","p2","toPascalCase","camelCase","mergeClasses","classes","hasA11yProp","defaultAttributes","Icon","color","strokeWidth","absoluteStrokeWidth","iconNode","createElement","tag","attrs","createLucideIcon","iconName","Component","__iconNode","Check","ChevronDown","ALSSelectRoot","Select.Root","ALSSelectTrigger","placeholder","renderValue","defaultRender","valueProps","jsxs","Select.Trigger","Select.Value","Select.Icon","ALSSelectPortal","Select.Portal","ALSSelectPositioner","Select.Positioner","ALSSelectPopup","Select.Popup","ALSSelectItem","Select.Item","Select.ItemText","Select.ItemIndicator","ALSSelectGroup","Select.Group","ALSSelectLabel","Select.GroupLabel","ALSSelectSeparator","Select.Separator","ALSSelect","ALSSeparator","ALSSlider","ALSSwitch","TabsRootContext","useTabsRootContext","TabsRootDataAttributes","tabsStateAttributesMapping","TabsRoot","tabPanelRefs","tabPanelMap","setTabPanelMap","tabMap","setTabMap","tabActivationDirection","setTabActivationDirection","getTabPanelIdByTabValueOrIndex","tabValue","tabPanelMetadata","getTabIdByPanelValueOrIndex","tabPanelValue","tabMetadata","getTabElementBySelectedValue","tabElement","tabsContextValue","ACTIVE_COMPOSITE_ITEM","useCompositeItem","highlightItemOnHover","highlightedIndex","onHighlightedIndexChange","isHighlighted","TabsListContext","useTabsListContext","TabsTab","activeTabValue","activateOnFocus","highlightedTabIndex","onTabActivation","setHighlightedTabIndex","tabsListElement","compositeProps","compositeRef","isNavigatingRef","tabPanelId","isPressingRef","isMainButtonRef","handlePointerUp","script","TabsIndicatorCssVars","TabsIndicator","renderBeforeHydration","isMounted","setIsMounted","rerender","isTabSelected","activeTab","tabsListRect","tabLeft","tabTop","computedWidth","computedHeight","activeTabPosition","activeTabSize","displayIndicator","prehydrationScript","TabsPanelDataAttributes","TabsPanel","correspondingTabId","useCompositeRoot","externalHighlightedIndex","externalSetHighlightedIndex","enableHomeAndEndKeys","stopEventPropagation","modifierKeys","internalHighlightedIndex","internalSetHighlightedIndex","isGrid","rootRef","hasSetDefaultIndexRef","shouldScrollIntoView","newActiveItem","sortedElements","activeItem","compositeElement","RELEVANT_KEYS","isModifierKeySet","horizontalForwardKey","forwardKey","horizontalBackwardKey","backwardKey","selectionStart","selectionEnd","textContent","forwardKeys","backwardKeys","preventedKeys","ignoredModifierKeys","CompositeRoot","highlightedIndexProp","onHighlightedIndexChangeProp","onMapChangeUnwrapped","relayKeyboardEvent","TabsList","setTabsListElement","detectActivationDirection","useActivationDirectionDetector","activationDirection","tabsListContextValue","getInset","tab","tabsList","listLeft","listTop","getTabElement","previousTabEdge","setPreviousTabEdge","activeTabElement","ALSTabsContext","useALSTabsContext","ALSTabsRoot","Tabs.Root","ALSTabsList","listClassName","Tabs.List","ALSTabsTab","tabClassName","Tabs.Tab","ALSTabsIndicator","indicatorClassName","Tabs.Indicator","ALSTabsPanel","Tabs.Panel","ALSTabs","counter","generateId","ToastContext","useToastContext","resolvePromiseOptions","resolvedOptions","ToastProvider","limit","toastManager","toasts","setToasts","hovering","setHovering","focused","prevFocusElement","setPrevFocusElement","expanded","timersRef","viewportRef","windowFocusedRef","isPausedRef","handleFocusManagement","toastId","isFocusVisible","toast","nextToast","pauseTimers","timer","elapsed","remaining","resumeTimers","prevToasts","toastsWithEnding","activeToasts","isActiveToastLimited","remove","scheduleTimer","shouldStartActive","currentTimeout","add","toastToAdd","updatedToasts","excessCount","oldestActiveToasts","old","duration","updates","promise","promiseValue","loadingOptions","handledPromise","successOptions","successTimeout","errorOptions","errorTimeout","action","ToastViewportContext","ToastViewportCssVars","ToastViewport","handlingFocusGuardRef","markedReadyForMouseLeaveRef","numToasts","frontmostHeight","hasTransitioningToasts","handleGlobalKeyDown","handleWindowBlur","handleWindowFocus","viewportNode","handleFocusGuard","handleKeyDown","handleMouseEnter","handleMouseLeave","handleFocus","handleBlur","highPriorityToasts","ToastRootContext","useToastRootContext","ToastRootCssVars","SWIPE_THRESHOLD","REVERSE_CANCEL_THRESHOLD","OPPOSITE_DIRECTION_DAMPING_FACTOR","MIN_DRAG_THRESHOLD","getDisplacement","getElementTransform","translateX","translateY","matrix","ToastRoot","swipeDirection","isAnchored","swipeDirections","swipeEnabled","currentSwipeDirection","setCurrentSwipeDirection","isSwiping","setIsSwiping","isRealSwipe","setIsRealSwipe","dragDismissed","setDragDismissed","dragOffset","setDragOffset","initialTransform","setInitialTransform","setTitleId","setDescriptionId","lockedDirection","setLockedDirection","dragStartPosRef","initialTransformRef","intendedSwipeDirectionRef","maxSwipeDisplacementRef","cancelledSwipeRef","swipeCancelBaselineRef","isFirstPointerMoveRef","domIndex","visibleIndex","recalculateHeight","previousHeight","applyDirectionalDamping","newDeltaX","newDeltaY","handlePointerMove","movementX","movementY","cancelDeltaY","cancelDeltaX","hasHorizontal","hasVertical","absX","absY","currentDisplacement","dampedDelta","newOffsetX","newOffsetY","shouldClose","dismissDirection","preventDefaultTouchStart","getDragStyles","isHighPriority","toastRoot","ToastContent","contentRef","behind","ToastDescription","shouldRender","ToastTitle","ToastClose","ToastAction","computedChildren","FloatingPortalLite","ToastPortal","useToastManager","createToastManager","emit","ALSToastProvider","Toast.Provider","ALSToastPortal","Toast.Portal","ALSToastViewport","Toast.useToastManager","viewportClassName","Toast.Viewport","ALSToastRoot","ALSToastContent","ALSToastTitle","ALSToastDescription","ALSToastAction","ALSToastClose","Toast.Root","contentClassName","Toast.Content","Toast.Title","Toast.Description","actionClassName","Toast.Action","Toast.Close","ALSToast","Toast.createToastManager","ALSToggle","ALSToggleGroup","ALSToolbar","ALSTooltip","LayoutContext","useLayout","useScrollDirection","scrollDirection","setScrollDirection","scrollY","setScrollY","lastScrollY","currentScrollY","MainLayoutHeader","behavior","scrollThreshold","elevated","transparent","registerHeader","asideFullHeight","isElevated","setIsElevated","isTransparent","setIsTransparent","behaviorClass","MainLayoutAside","collapsed","collapsedWidth","resizable","minWidth","maxWidth","onWidthChange","overlay","onOverlayClose","collapsedContent","transitionDuration","fullHeight","registerAside","asidePosition","currentWidth","setCurrentWidth","isResizing","setIsResizing","isClosing","setIsClosing","asideRef","handleOverlayClose","useCallback","handleMouseDown","newWidth","clampedWidth","variantClass","contentClassNames","Fragment","MainLayoutMain","centered","asideHidden","mainRef","paddingClass","innerStyle","MainLayoutFooter","MainLayoutRoot","setAsideHidden","asideCollapsed","setAsideCollapsed","setAsideFullHeight","headerBehavior","setHeaderBehavior","layout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AER,EAGawsF,GAAa,OAAO,OAAO,CACpC,KAAMR,GACN,OAAQhD,GACR,MAAOY,GACP,KAAM6B,GACN,OAAQM,EACZ,CAAC","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,147,148,149,150,151,152,153,154,155,156,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,188,189,190,191,192,193,194,195,196,197,198,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277]}