@rpcbase/ui 0.243.0 → 0.244.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 (618) hide show
  1. package/dist/index105.js +36 -36
  2. package/dist/index117.js +6 -6
  3. package/dist/index120.js +10 -10
  4. package/dist/index122.js +2 -2
  5. package/dist/index123.js +3 -3
  6. package/dist/index124.js +1 -1
  7. package/dist/index126.js +2 -2
  8. package/dist/index128.js +2 -2
  9. package/dist/index149.js.map +1 -1
  10. package/dist/index150.js +3 -3
  11. package/dist/index150.js.map +1 -1
  12. package/dist/index151.js.map +1 -1
  13. package/dist/index152.js.map +1 -1
  14. package/dist/index153.js.map +1 -1
  15. package/dist/index154.js.map +1 -1
  16. package/dist/index155.js.map +1 -1
  17. package/dist/index156.js +1 -1
  18. package/dist/index156.js.map +1 -1
  19. package/dist/index157.js.map +1 -1
  20. package/dist/index158.js.map +1 -1
  21. package/dist/index159.js.map +1 -1
  22. package/dist/index160.js.map +1 -1
  23. package/dist/index161.js.map +1 -1
  24. package/dist/index162.js.map +1 -1
  25. package/dist/index163.js +2 -2
  26. package/dist/index163.js.map +1 -1
  27. package/dist/index164.js +7 -7
  28. package/dist/index164.js.map +1 -1
  29. package/dist/index165.js.map +1 -1
  30. package/dist/index166.js.map +1 -1
  31. package/dist/index167.js +4 -4
  32. package/dist/index167.js.map +1 -1
  33. package/dist/index168.js.map +1 -1
  34. package/dist/index169.js +1 -1
  35. package/dist/index169.js.map +1 -1
  36. package/dist/index170.js.map +1 -1
  37. package/dist/index171.js +58 -14
  38. package/dist/index171.js.map +1 -1
  39. package/dist/index172.js +8 -68
  40. package/dist/index172.js.map +1 -1
  41. package/dist/index173.js +87 -37
  42. package/dist/index173.js.map +1 -1
  43. package/dist/index174.js +19 -13
  44. package/dist/index174.js.map +1 -1
  45. package/dist/index175.js +16 -23
  46. package/dist/index175.js.map +1 -1
  47. package/dist/index176.js +5 -111
  48. package/dist/index176.js.map +1 -1
  49. package/dist/index177.js +6 -13
  50. package/dist/index177.js.map +1 -1
  51. package/dist/index178.js +6 -4
  52. package/dist/index178.js.map +1 -1
  53. package/dist/index179.js +5 -4
  54. package/dist/index179.js.map +1 -1
  55. package/dist/index180.js +7 -5
  56. package/dist/index180.js.map +1 -1
  57. package/dist/index181.js +16 -11
  58. package/dist/index181.js.map +1 -1
  59. package/dist/index182.js +4 -19
  60. package/dist/index182.js.map +1 -1
  61. package/dist/index183.js +5 -11
  62. package/dist/index183.js.map +1 -1
  63. package/dist/index184.js +12 -176
  64. package/dist/index184.js.map +1 -1
  65. package/dist/index185.js +9 -279
  66. package/dist/index185.js.map +1 -1
  67. package/dist/index186.js +13 -4
  68. package/dist/index186.js.map +1 -1
  69. package/dist/index187.js +14 -28
  70. package/dist/index187.js.map +1 -1
  71. package/dist/index188.js +4 -126
  72. package/dist/index188.js.map +1 -1
  73. package/dist/index189.js +5 -63
  74. package/dist/index189.js.map +1 -1
  75. package/dist/index190.js +6 -8
  76. package/dist/index190.js.map +1 -1
  77. package/dist/index191.js +6 -16
  78. package/dist/index191.js.map +1 -1
  79. package/dist/index192.js +53 -29
  80. package/dist/index192.js.map +1 -1
  81. package/dist/index193.js +8 -69
  82. package/dist/index193.js.map +1 -1
  83. package/dist/index194.js +4 -58
  84. package/dist/index194.js.map +1 -1
  85. package/dist/index195.js +4 -8
  86. package/dist/index195.js.map +1 -1
  87. package/dist/index196.js +8 -87
  88. package/dist/index196.js.map +1 -1
  89. package/dist/index197.js +4 -19
  90. package/dist/index197.js.map +1 -1
  91. package/dist/index198.js +4 -16
  92. package/dist/index198.js.map +1 -1
  93. package/dist/index199.js +3 -5
  94. package/dist/index199.js.map +1 -1
  95. package/dist/index200.js +10 -5
  96. package/dist/index200.js.map +1 -1
  97. package/dist/index201.js +9 -6
  98. package/dist/index201.js.map +1 -1
  99. package/dist/index202.js +9 -4
  100. package/dist/index202.js.map +1 -1
  101. package/dist/index203.js +10 -6
  102. package/dist/index203.js.map +1 -1
  103. package/dist/index204.js +10 -16
  104. package/dist/index204.js.map +1 -1
  105. package/dist/index205.js +9 -4
  106. package/dist/index205.js.map +1 -1
  107. package/dist/index206.js +6 -4
  108. package/dist/index206.js.map +1 -1
  109. package/dist/index207.js +5 -12
  110. package/dist/index207.js.map +1 -1
  111. package/dist/index208.js +4 -9
  112. package/dist/index208.js.map +1 -1
  113. package/dist/index209.js +5 -13
  114. package/dist/index209.js.map +1 -1
  115. package/dist/index210.js +6 -13
  116. package/dist/index210.js.map +1 -1
  117. package/dist/index211.js +5 -4
  118. package/dist/index211.js.map +1 -1
  119. package/dist/index212.js +16 -5
  120. package/dist/index212.js.map +1 -1
  121. package/dist/index213.js +7 -6
  122. package/dist/index213.js.map +1 -1
  123. package/dist/index214.js +10 -5
  124. package/dist/index214.js.map +1 -1
  125. package/dist/index215.js +10 -54
  126. package/dist/index215.js.map +1 -1
  127. package/dist/index216.js +21 -8
  128. package/dist/index216.js.map +1 -1
  129. package/dist/index217.js +8 -4
  130. package/dist/index217.js.map +1 -1
  131. package/dist/index218.js +9 -4
  132. package/dist/index218.js.map +1 -1
  133. package/dist/index219.js +9 -8
  134. package/dist/index219.js.map +1 -1
  135. package/dist/index220.js +4 -4
  136. package/dist/index220.js.map +1 -1
  137. package/dist/index221.js +5 -4
  138. package/dist/index221.js.map +1 -1
  139. package/dist/index222.js +16 -3
  140. package/dist/index222.js.map +1 -1
  141. package/dist/index223.js +9 -10
  142. package/dist/index223.js.map +1 -1
  143. package/dist/index224.js +18 -9
  144. package/dist/index224.js.map +1 -1
  145. package/dist/index225.js +20 -9
  146. package/dist/index225.js.map +1 -1
  147. package/dist/index226.js +12 -10
  148. package/dist/index226.js.map +1 -1
  149. package/dist/index227.js +29 -10
  150. package/dist/index227.js.map +1 -1
  151. package/dist/index228.js +12 -9
  152. package/dist/index228.js.map +1 -1
  153. package/dist/index229.js +25 -6
  154. package/dist/index229.js.map +1 -1
  155. package/dist/index230.js +5 -5
  156. package/dist/index230.js.map +1 -1
  157. package/dist/index231.js +20 -5
  158. package/dist/index231.js.map +1 -1
  159. package/dist/index232.js +66 -5
  160. package/dist/index232.js.map +1 -1
  161. package/dist/index233.js +6 -6
  162. package/dist/index233.js.map +1 -1
  163. package/dist/index234.js +5 -5
  164. package/dist/index234.js.map +1 -1
  165. package/dist/index235.js +11 -16
  166. package/dist/index235.js.map +1 -1
  167. package/dist/index236.js +3 -7
  168. package/dist/index236.js.map +1 -1
  169. package/dist/index237.js +49 -9
  170. package/dist/index237.js.map +1 -1
  171. package/dist/index238.js +4 -11
  172. package/dist/index238.js.map +1 -1
  173. package/dist/index239.js +28 -20
  174. package/dist/index239.js.map +1 -1
  175. package/dist/index240.js +16 -8
  176. package/dist/index240.js.map +1 -1
  177. package/dist/index241.js +5 -9
  178. package/dist/index241.js.map +1 -1
  179. package/dist/index242.js +21 -9
  180. package/dist/index242.js.map +1 -1
  181. package/dist/index243.js +53 -4
  182. package/dist/index243.js.map +1 -1
  183. package/dist/index244.js +20 -5
  184. package/dist/index244.js.map +1 -1
  185. package/dist/index245.js +41 -16
  186. package/dist/index245.js.map +1 -1
  187. package/dist/index246.js +39 -9
  188. package/dist/index246.js.map +1 -1
  189. package/dist/index247.js +46 -19
  190. package/dist/index247.js.map +1 -1
  191. package/dist/index248.js +20 -17
  192. package/dist/index248.js.map +1 -1
  193. package/dist/index249.js +19 -12
  194. package/dist/index249.js.map +1 -1
  195. package/dist/index250.js +19 -28
  196. package/dist/index250.js.map +1 -1
  197. package/dist/index251.js +68 -10
  198. package/dist/index251.js.map +1 -1
  199. package/dist/index252.js +17 -25
  200. package/dist/index252.js.map +1 -1
  201. package/dist/index253.js +3 -5
  202. package/dist/index253.js.map +1 -1
  203. package/dist/index254.js +11 -154
  204. package/dist/index254.js.map +1 -1
  205. package/dist/index255.js +29 -31
  206. package/dist/index255.js.map +1 -1
  207. package/dist/index256.js +13 -11
  208. package/dist/index256.js.map +1 -1
  209. package/dist/index257.js +15 -46
  210. package/dist/index257.js.map +1 -1
  211. package/dist/index258.js +36 -9
  212. package/dist/index258.js.map +1 -1
  213. package/dist/index259.js +69 -11
  214. package/dist/index259.js.map +1 -1
  215. package/dist/index260.js +238 -42
  216. package/dist/index260.js.map +1 -1
  217. package/dist/index261.js +245 -90
  218. package/dist/index261.js.map +1 -1
  219. package/dist/index262.js +66 -84
  220. package/dist/index262.js.map +1 -1
  221. package/dist/index263.js +86 -92
  222. package/dist/index263.js.map +1 -1
  223. package/dist/index264.js +175 -51
  224. package/dist/index264.js.map +1 -1
  225. package/dist/index265.js +83 -11
  226. package/dist/index265.js.map +1 -1
  227. package/dist/index266.js +13 -5
  228. package/dist/index266.js.map +1 -1
  229. package/dist/index267.js +3 -37
  230. package/dist/index267.js.map +1 -1
  231. package/dist/index268.js +29 -8
  232. package/dist/index268.js.map +1 -1
  233. package/dist/index269.js +16 -135
  234. package/dist/index269.js.map +1 -1
  235. package/dist/index270.js +38 -18
  236. package/dist/index270.js.map +1 -1
  237. package/dist/index271.js +34 -15
  238. package/dist/index271.js.map +1 -1
  239. package/dist/index272.js +68 -3
  240. package/dist/index272.js.map +1 -1
  241. package/dist/index273.js +15 -34
  242. package/dist/index273.js.map +1 -1
  243. package/dist/index274.js +3 -20
  244. package/dist/index274.js.map +1 -1
  245. package/dist/index275.js +111 -8
  246. package/dist/index275.js.map +1 -1
  247. package/dist/index276.js +26 -9
  248. package/dist/index276.js.map +1 -1
  249. package/dist/index277.js +27 -23
  250. package/dist/index277.js.map +1 -1
  251. package/dist/index278.js +4 -29
  252. package/dist/index278.js.map +1 -1
  253. package/dist/index279.js +125 -15
  254. package/dist/index279.js.map +1 -1
  255. package/dist/index280.js +5 -20
  256. package/dist/index280.js.map +1 -1
  257. package/dist/index281.js +75 -63
  258. package/dist/index281.js.map +1 -1
  259. package/dist/index282.js +272 -6
  260. package/dist/index282.js.map +1 -1
  261. package/dist/index283.js +10 -4
  262. package/dist/index283.js.map +1 -1
  263. package/dist/index284.js +27 -11
  264. package/dist/index284.js.map +1 -1
  265. package/dist/index285.js +16 -4
  266. package/dist/index285.js.map +1 -1
  267. package/dist/index286.js +10 -50
  268. package/dist/index286.js.map +1 -1
  269. package/dist/index287.js +26 -4
  270. package/dist/index287.js.map +1 -1
  271. package/dist/index288.js +15 -28
  272. package/dist/index288.js.map +1 -1
  273. package/dist/index289.js +124 -15
  274. package/dist/index289.js.map +1 -1
  275. package/dist/index290.js +5 -5
  276. package/dist/index290.js.map +1 -1
  277. package/dist/index291.js +64 -20
  278. package/dist/index291.js.map +1 -1
  279. package/dist/index292.js +13 -53
  280. package/dist/index292.js.map +1 -1
  281. package/dist/index293.js +14 -21
  282. package/dist/index293.js.map +1 -1
  283. package/dist/index294.js +7 -41
  284. package/dist/index294.js.map +1 -1
  285. package/dist/index295.js +11 -40
  286. package/dist/index295.js.map +1 -1
  287. package/dist/index296.js +6 -46
  288. package/dist/index296.js.map +1 -1
  289. package/dist/index297.js +3 -20
  290. package/dist/index297.js.map +1 -1
  291. package/dist/index298.js +10 -70
  292. package/dist/index298.js.map +1 -1
  293. package/dist/index299.js +7 -17
  294. package/dist/index299.js.map +1 -1
  295. package/dist/index300.js +133 -3
  296. package/dist/index300.js.map +1 -1
  297. package/dist/index301.js +279 -11
  298. package/dist/index301.js.map +1 -1
  299. package/dist/index302.js +398 -12
  300. package/dist/index302.js.map +1 -1
  301. package/dist/index303.js +5 -19
  302. package/dist/index303.js.map +1 -1
  303. package/dist/index304.js +51 -35
  304. package/dist/index304.js.map +1 -1
  305. package/dist/index305.js +11 -239
  306. package/dist/index305.js.map +1 -1
  307. package/dist/index306.js +22 -247
  308. package/dist/index306.js.map +1 -1
  309. package/dist/index307.js +11 -68
  310. package/dist/index307.js.map +1 -1
  311. package/dist/index308.js +4 -99
  312. package/dist/index308.js.map +1 -1
  313. package/dist/index309.js +14 -83
  314. package/dist/index309.js.map +1 -1
  315. package/dist/index310.js +4 -4
  316. package/dist/index310.js.map +1 -1
  317. package/dist/index311.js +5 -30
  318. package/dist/index311.js.map +1 -1
  319. package/dist/index312.js +10 -15
  320. package/dist/index312.js.map +1 -1
  321. package/dist/index313.js +64 -35
  322. package/dist/index313.js.map +1 -1
  323. package/dist/index314.js +7 -16
  324. package/dist/index314.js.map +1 -1
  325. package/dist/index315.js +154 -3
  326. package/dist/index315.js.map +1 -1
  327. package/dist/index316.js +31 -25
  328. package/dist/index316.js.map +1 -1
  329. package/dist/index317.js +11 -28
  330. package/dist/index317.js.map +1 -1
  331. package/dist/index318.js +50 -4
  332. package/dist/index318.js.map +1 -1
  333. package/dist/index319.js +9 -78
  334. package/dist/index319.js.map +1 -1
  335. package/dist/index320.js +10 -271
  336. package/dist/index320.js.map +1 -1
  337. package/dist/index321.js +43 -11
  338. package/dist/index321.js.map +1 -1
  339. package/dist/index322.js +97 -10
  340. package/dist/index322.js.map +1 -1
  341. package/dist/index323.js +86 -25
  342. package/dist/index323.js.map +1 -1
  343. package/dist/index324.js +104 -15
  344. package/dist/index324.js.map +1 -1
  345. package/dist/index325.js +50 -123
  346. package/dist/index325.js.map +1 -1
  347. package/dist/index326.js +11 -5
  348. package/dist/index326.js.map +1 -1
  349. package/dist/index327.js +4 -65
  350. package/dist/index327.js.map +1 -1
  351. package/dist/index328.js +37 -13
  352. package/dist/index328.js.map +1 -1
  353. package/dist/index329.js +8 -7
  354. package/dist/index329.js.map +1 -1
  355. package/dist/index330.js +135 -5
  356. package/dist/index330.js.map +1 -1
  357. package/dist/index331.js +17 -3
  358. package/dist/index331.js.map +1 -1
  359. package/dist/index332.js +15 -10
  360. package/dist/index332.js.map +1 -1
  361. package/dist/index333.js +3 -7
  362. package/dist/index333.js.map +1 -1
  363. package/dist/index334.js +32 -129
  364. package/dist/index334.js.map +1 -1
  365. package/dist/index335.js +18 -397
  366. package/dist/index335.js.map +1 -1
  367. package/dist/index336.js +10 -5
  368. package/dist/index336.js.map +1 -1
  369. package/dist/index337.js +8 -52
  370. package/dist/index337.js.map +1 -1
  371. package/dist/index338.js +24 -11
  372. package/dist/index338.js.map +1 -1
  373. package/dist/index339.js +28 -27
  374. package/dist/index339.js.map +1 -1
  375. package/dist/index34.js +2 -2
  376. package/dist/index34.js.map +1 -1
  377. package/dist/index340.js +16 -11
  378. package/dist/index340.js.map +1 -1
  379. package/dist/index341.js +4 -8
  380. package/dist/index341.js.map +1 -1
  381. package/dist/index342.js +18 -12
  382. package/dist/index342.js.map +1 -1
  383. package/dist/index343.js +12 -8
  384. package/dist/index343.js.map +1 -1
  385. package/dist/index344.js +8 -13
  386. package/dist/index344.js.map +1 -1
  387. package/dist/index345.js +11 -3
  388. package/dist/index345.js.map +1 -1
  389. package/dist/index346.js +8 -3
  390. package/dist/index346.js.map +1 -1
  391. package/dist/index347.js +12 -16
  392. package/dist/index347.js.map +1 -1
  393. package/dist/index348.js +3 -61
  394. package/dist/index348.js.map +1 -1
  395. package/dist/index349.js +3 -66
  396. package/dist/index349.js.map +1 -1
  397. package/dist/index35.js +5 -5
  398. package/dist/index35.js.map +1 -1
  399. package/dist/index350.js +4 -52
  400. package/dist/index350.js.map +1 -1
  401. package/dist/index351.js +15 -6
  402. package/dist/index351.js.map +1 -1
  403. package/dist/index352.js +10 -7
  404. package/dist/index352.js.map +1 -1
  405. package/dist/index353.js +6 -5
  406. package/dist/index353.js.map +1 -1
  407. package/dist/index354.js +4 -11
  408. package/dist/index354.js.map +1 -1
  409. package/dist/index355.js +3 -22
  410. package/dist/index355.js.map +1 -1
  411. package/dist/index356.js +8 -16
  412. package/dist/index356.js.map +1 -1
  413. package/dist/index357.js +52 -8
  414. package/dist/index357.js.map +1 -1
  415. package/dist/index358.js +15 -143
  416. package/dist/index358.js.map +1 -1
  417. package/dist/index359.js +8 -80
  418. package/dist/index359.js.map +1 -1
  419. package/dist/index36.js +11 -11
  420. package/dist/index36.js.map +1 -1
  421. package/dist/index360.js +5 -61
  422. package/dist/index360.js.map +1 -1
  423. package/dist/index361.js +21 -15
  424. package/dist/index361.js.map +1 -1
  425. package/dist/index362.js +45 -5
  426. package/dist/index362.js.map +1 -1
  427. package/dist/index363.js +16 -16
  428. package/dist/index363.js.map +1 -1
  429. package/dist/index364.js +5 -13
  430. package/dist/index364.js.map +1 -1
  431. package/dist/index365.js +200 -4
  432. package/dist/index365.js.map +1 -1
  433. package/dist/index366.js +73 -20
  434. package/dist/index366.js.map +1 -1
  435. package/dist/index367.js +124 -4
  436. package/dist/index367.js.map +1 -1
  437. package/dist/index368.js +16 -10
  438. package/dist/index368.js.map +1 -1
  439. package/dist/index369.js +61 -5
  440. package/dist/index369.js.map +1 -1
  441. package/dist/index37.js +3 -3
  442. package/dist/index37.js.map +1 -1
  443. package/dist/index370.js +67 -3
  444. package/dist/index370.js.map +1 -1
  445. package/dist/index371.js +11 -20
  446. package/dist/index371.js.map +1 -1
  447. package/dist/index372.js +21 -44
  448. package/dist/index372.js.map +1 -1
  449. package/dist/index373.js +143 -16
  450. package/dist/index373.js.map +1 -1
  451. package/dist/index374.js +79 -4
  452. package/dist/index374.js.map +1 -1
  453. package/dist/index375.js +59 -198
  454. package/dist/index375.js.map +1 -1
  455. package/dist/index376.js +4 -73
  456. package/dist/index376.js.map +1 -1
  457. package/dist/index377.js +19 -122
  458. package/dist/index377.js.map +1 -1
  459. package/dist/index378.js +4 -8
  460. package/dist/index378.js.map +1 -1
  461. package/dist/index379.js +5 -27
  462. package/dist/index379.js.map +1 -1
  463. package/dist/index38.js +4 -4
  464. package/dist/index38.js.map +1 -1
  465. package/dist/index380.js +4 -138
  466. package/dist/index380.js.map +1 -1
  467. package/dist/index381.js +15 -12
  468. package/dist/index381.js.map +1 -1
  469. package/dist/index382.js +8 -46
  470. package/dist/index382.js.map +1 -1
  471. package/dist/index383.js +5 -3
  472. package/dist/index383.js.map +1 -1
  473. package/dist/index384.js +4 -21
  474. package/dist/index384.js.map +1 -1
  475. package/dist/index385.js +542 -72
  476. package/dist/index385.js.map +1 -1
  477. package/dist/index386.js +46 -11
  478. package/dist/index386.js.map +1 -1
  479. package/dist/index387.js +17 -3
  480. package/dist/index387.js.map +1 -1
  481. package/dist/index388.js +5 -71
  482. package/dist/index388.js.map +1 -1
  483. package/dist/index389.js +7 -35
  484. package/dist/index389.js.map +1 -1
  485. package/dist/index39.js +5 -5
  486. package/dist/index39.js.map +1 -1
  487. package/dist/index390.js +7 -7
  488. package/dist/index390.js.map +1 -1
  489. package/dist/index391.js +7 -15
  490. package/dist/index391.js.map +1 -1
  491. package/dist/index392.js +11 -4
  492. package/dist/index392.js.map +1 -1
  493. package/dist/index393.js +8 -4
  494. package/dist/index393.js.map +1 -1
  495. package/dist/index394.js +13 -4
  496. package/dist/index394.js.map +1 -1
  497. package/dist/index395.js +3 -16
  498. package/dist/index395.js.map +1 -1
  499. package/dist/index396.js +3 -9
  500. package/dist/index396.js.map +1 -1
  501. package/dist/index397.js +7 -6
  502. package/dist/index397.js.map +1 -1
  503. package/dist/index398.js +12 -4
  504. package/dist/index398.js.map +1 -1
  505. package/dist/index399.js +44 -543
  506. package/dist/index399.js.map +1 -1
  507. package/dist/index40.js +3 -3
  508. package/dist/index40.js.map +1 -1
  509. package/dist/index400.js +135 -44
  510. package/dist/index400.js.map +1 -1
  511. package/dist/index401.js +8 -17
  512. package/dist/index401.js.map +1 -1
  513. package/dist/index402.js +27 -6
  514. package/dist/index402.js.map +1 -1
  515. package/dist/index403.js +3 -7
  516. package/dist/index403.js.map +1 -1
  517. package/dist/index404.js +21 -6
  518. package/dist/index404.js.map +1 -1
  519. package/dist/index405.js +75 -7
  520. package/dist/index405.js.map +1 -1
  521. package/dist/index406.js +12 -12
  522. package/dist/index406.js.map +1 -1
  523. package/dist/index407.js +3 -8
  524. package/dist/index407.js.map +1 -1
  525. package/dist/index408.js +71 -12
  526. package/dist/index408.js.map +1 -1
  527. package/dist/index409.js +36 -3
  528. package/dist/index409.js.map +1 -1
  529. package/dist/index41.js +10 -10
  530. package/dist/index41.js.map +1 -1
  531. package/dist/index410.js +16 -3
  532. package/dist/index410.js.map +1 -1
  533. package/dist/index411.js +4 -14
  534. package/dist/index411.js.map +1 -1
  535. package/dist/index412.js +56 -3
  536. package/dist/index412.js.map +1 -1
  537. package/dist/index413.js +66 -490
  538. package/dist/index413.js.map +1 -1
  539. package/dist/index414.js +30 -67
  540. package/dist/index414.js.map +1 -1
  541. package/dist/index415.js +9 -31
  542. package/dist/index415.js.map +1 -1
  543. package/dist/index416.js +153 -9
  544. package/dist/index416.js.map +1 -1
  545. package/dist/index417.js +97 -142
  546. package/dist/index417.js.map +1 -1
  547. package/dist/index418.js +8 -108
  548. package/dist/index418.js.map +1 -1
  549. package/dist/index419.js +2 -5
  550. package/dist/index419.js.map +1 -1
  551. package/dist/index420.js +42 -54
  552. package/dist/index420.js.map +1 -1
  553. package/dist/index421.js +55 -7
  554. package/dist/index421.js.map +1 -1
  555. package/dist/index422.js +8 -2
  556. package/dist/index422.js.map +1 -1
  557. package/dist/index423.js +2 -44
  558. package/dist/index423.js.map +1 -1
  559. package/dist/index424.js +54 -55
  560. package/dist/index424.js.map +1 -1
  561. package/dist/index425.js +55 -7
  562. package/dist/index425.js.map +1 -1
  563. package/dist/index426.js +3 -2
  564. package/dist/index426.js.map +1 -1
  565. package/dist/index427.js +14 -54
  566. package/dist/index427.js.map +1 -1
  567. package/dist/index428.js +487 -51
  568. package/dist/index428.js.map +1 -1
  569. package/dist/index429.js.map +1 -1
  570. package/dist/index430.js +2 -16
  571. package/dist/index430.js.map +1 -1
  572. package/dist/index431.js +2 -29
  573. package/dist/index431.js.map +1 -1
  574. package/dist/index432.js +2 -13
  575. package/dist/index432.js.map +1 -1
  576. package/dist/index433.js +2 -7
  577. package/dist/index433.js.map +1 -1
  578. package/dist/index434.js +16 -2
  579. package/dist/index434.js.map +1 -1
  580. package/dist/index435.js +29 -2
  581. package/dist/index435.js.map +1 -1
  582. package/dist/index436.js +13 -2
  583. package/dist/index436.js.map +1 -1
  584. package/dist/index437.js +7 -2
  585. package/dist/index437.js.map +1 -1
  586. package/dist/index44.js.map +1 -1
  587. package/dist/index48.js.map +1 -1
  588. package/dist/index49.js +36 -36
  589. package/dist/index49.js.map +1 -1
  590. package/dist/index50.js +29 -29
  591. package/dist/index50.js.map +1 -1
  592. package/dist/index51.js +2 -2
  593. package/dist/index51.js.map +1 -1
  594. package/dist/index52.js +12 -12
  595. package/dist/index52.js.map +1 -1
  596. package/dist/index53.js +4 -4
  597. package/dist/index53.js.map +1 -1
  598. package/dist/index54.js +1 -1
  599. package/dist/index54.js.map +1 -1
  600. package/dist/index55.js +21 -21
  601. package/dist/index55.js.map +1 -1
  602. package/dist/index56.js +5 -5
  603. package/dist/index56.js.map +1 -1
  604. package/dist/index57.js +5 -5
  605. package/dist/index57.js.map +1 -1
  606. package/dist/index58.js +8 -8
  607. package/dist/index58.js.map +1 -1
  608. package/dist/index59.js +5 -5
  609. package/dist/index59.js.map +1 -1
  610. package/dist/index60.js +17 -17
  611. package/dist/index60.js.map +1 -1
  612. package/dist/index61.js +5 -5
  613. package/dist/index61.js.map +1 -1
  614. package/dist/index62.js +3 -3
  615. package/dist/index62.js.map +1 -1
  616. package/dist/index77.js.map +1 -1
  617. package/dist/index78.js.map +1 -1
  618. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index49.js","sources":["../node_modules/@base-ui/react/select/root/SelectRoot.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';\nimport { usePreviousValue } from '@base-ui/utils/usePreviousValue';\nimport { isElementDisabled } from '@base-ui/utils/isElementDisabled';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStore, Store } from '@base-ui/utils/store';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useClick, useDismiss, useFloatingRootContext, useListNavigation, useTypeahead } from \"../../floating-ui-react/index.mjs\";\nimport { SelectRootContext, SelectFloatingContext } from \"./SelectRootContext.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useRegisterFieldControl } from \"../../internals/field-register-control/useRegisterFieldControl.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useFormContext } from \"../../internals/form-context/FormContext.mjs\";\nimport { stringifyAsLabel, stringifyAsValue } from \"../../internals/resolveValueLabel.mjs\";\nimport { compareItemEquality, defaultItemEquality, findItemIndex } from \"../../internals/itemEquality.mjs\";\nimport { areArraysEqual } from \"../../internals/areArraysEqual.mjs\";\nimport { useValueChanged } from \"../../internals/useValueChanged.mjs\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.mjs\";\nimport { getMaxScrollOffset, normalizeScrollOffset } from \"../../utils/scrollEdges.mjs\";\nimport { FOCUSABLE_POPUP_PROPS } from \"../../utils/popups/index.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\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 form,\n autoComplete,\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 highlightItemOnHover = true,\n children\n } = props;\n const {\n clearErrors\n } = useFormContext();\n const {\n setDirty,\n setTouched,\n setFocused,\n validityData,\n setFilled,\n name: fieldName,\n disabled: fieldDisabled,\n validation,\n validationMode\n } = useFieldRootContext();\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 firstItemTextRef = React.useRef(null);\n const selectedItemTextRef = React.useRef(null);\n const selectionRef = React.useRef({\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false,\n dragY: 0\n });\n const alignItemWithTriggerActiveRef = React.useRef(false);\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open);\n const {\n openMethod,\n triggerProps: interactionTypeProps\n } = useOpenInteractionType(open);\n const store = useRefWithInit(() => new Store({\n id: generatedId,\n labelId: undefined,\n modal,\n multiple,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue,\n value,\n open,\n mounted,\n transitionStatus,\n items,\n forceMount: false,\n openMethod: null,\n activeIndex: null,\n selectedIndex: null,\n popupProps: {},\n triggerProps: {},\n triggerElement: null,\n positionerElement: null,\n listElement: null,\n popupSide: 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 previousOpenMethod = usePreviousValue(openMethod);\n const renderedOpenMethod = openMethod ?? previousOpenMethod ?? null;\n const serializedValue = React.useMemo(() => {\n // In multiple mode the shared input is nameless; per-value entries are submitted via\n // `hiddenInputs`. Its value is therefore irrelevant, and passing the whole array to\n // `stringifyAsValue` would invoke a user `itemToStringValue` with an array it doesn't expect.\n if (multiple) {\n return '';\n }\n return stringifyAsValue(value, itemToStringValue);\n }, [multiple, value, itemToStringValue]);\n const fieldStringValue = React.useMemo(() => {\n if (multiple && Array.isArray(value)) {\n return value.map(currentValue => stringifyAsValue(currentValue, itemToStringValue));\n }\n return stringifyAsValue(value, itemToStringValue);\n }, [multiple, value, itemToStringValue]);\n const controlRef = useValueAsRef(store.state.triggerElement);\n const getStringifiedValueForForm = useStableCallback(() => fieldStringValue);\n useRegisterFieldControl(controlRef, generatedId, value, getStringifiedValueForForm, !disabled, nameProp);\n const initialValueRef = React.useRef(value);\n // Mirror the `hasSelectedValue` store selector so the Field's filled state agrees with the\n // trigger/value placeholder semantics (a value serializing to `''` counts as empty).\n const hasSelectedValue = multiple ? Array.isArray(value) && value.length > 0 : value != null && stringifyAsValue(value, itemToStringValue) !== '';\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(hasSelectedValue);\n }, [hasSelectedValue, setFilled]);\n useIsoLayoutEffect(function syncSelectedIndex() {\n const registry = valuesRef.current;\n let nextIndex;\n if (multiple) {\n const currentValue = Array.isArray(value) ? value : [];\n if (currentValue.length === 0) {\n nextIndex = null;\n } else {\n const lastValue = currentValue[currentValue.length - 1];\n const lastIndex = findItemIndex(registry, lastValue, isItemEqualToValue);\n nextIndex = lastIndex === -1 ? null : lastIndex;\n }\n } else {\n const index = findItemIndex(registry, value, isItemEqualToValue);\n nextIndex = index === -1 ? null : index;\n }\n if (nextIndex === null) {\n selectedItemTextRef.current = null;\n }\n if (open) {\n return;\n }\n store.set('selectedIndex', nextIndex);\n }, [hasSelectedValue, multiple, open, value, valuesRef, isItemEqualToValue, store, selectedItemTextRef]);\n function isSelectedValueDirty(currentValue) {\n const initialValue = validityData.initialValue;\n if (Array.isArray(currentValue) && Array.isArray(initialValue)) {\n return !areArraysEqual(currentValue, initialValue, (itemValue, initialItemValue) => compareItemEquality(itemValue, initialItemValue, isItemEqualToValue));\n }\n return currentValue !== initialValue;\n }\n useValueChanged(value, () => {\n clearErrors(name);\n setDirty(isSelectedValueDirty(value));\n validation.change(value);\n });\n const setOpen = useStableCallback((nextOpen, eventDetails) => {\n onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setOpenUnwrapped(nextOpen);\n if (!nextOpen && (eventDetails.reason === REASONS.focusOut || eventDetails.reason === REASONS.outsidePress)) {\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(value);\n }\n }\n });\n const handleUnmount = useStableCallback(() => {\n setMounted(false);\n store.update({\n activeIndex: null,\n openMethod: null\n });\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 maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop);\n const shouldShowUp = scrollTop > 0;\n const shouldShowDown = scrollTop < maxScrollTop;\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 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 focusItemOnHover: highlightItemOnHover\n });\n const typeahead = useTypeahead(floatingContext, {\n enabled: !readOnly && !disabled && (open || !multiple),\n listRef: labelsRef,\n activeIndex,\n selectedIndex,\n // Skip disabled items while matching so typeahead advances to the next selectable item\n // (a click can never select a disabled item and native `<select>` skips them too). Resolve\n // the disabled state from the element via the attribute-only `isElementDisabled` so the\n // hidden, force-mounted items used for closed-trigger typeahead aren't dropped by the\n // `elementsRef`/visibility filter that `disabledIndices` deliberately sidesteps.\n disabledIndices: index => isElementDisabled(listRef.current[index]),\n onMatch(index) {\n if (open) {\n store.set('activeIndex', index);\n } else {\n setValue(valuesRef.current[index], createChangeEventDetails('none'));\n }\n },\n onTyping(typing) {\n typingRef.current = typing;\n }\n });\n const mergedTriggerProps = React.useMemo(() => {\n const triggerInteractionProps = mergeProps(typeahead.reference, listNavigation.reference, dismiss.reference, click.reference, interactionTypeProps);\n if (generatedId) {\n triggerInteractionProps.id = generatedId;\n }\n return triggerInteractionProps;\n }, [click.reference, typeahead.reference, listNavigation.reference, dismiss.reference, interactionTypeProps, generatedId]);\n const popupProps = React.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, typeahead.floating, listNavigation.floating, dismiss.floating), [typeahead.floating, listNavigation.floating, dismiss.floating]);\n const itemProps = listNavigation.item ?? EMPTY_OBJECT;\n useOnFirstRender(() => {\n store.update({\n popupProps,\n triggerProps: mergedTriggerProps\n });\n });\n useIsoLayoutEffect(() => {\n store.update({\n id: generatedId,\n modal,\n multiple,\n value,\n open,\n mounted,\n transitionStatus,\n popupProps,\n triggerProps: mergedTriggerProps,\n items,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue,\n openMethod: renderedOpenMethod\n });\n }, [store, generatedId, modal, multiple, value, open, mounted, transitionStatus, popupProps, mergedTriggerProps, items, itemToStringLabel, itemToStringValue, isItemEqualToValue, renderedOpenMethod]);\n const contextValue = React.useMemo(() => ({\n store,\n name,\n required,\n disabled,\n readOnly,\n multiple,\n highlightItemOnHover,\n setValue,\n setOpen,\n listRef,\n popupRef,\n scrollHandlerRef,\n handleScrollArrowVisibility,\n scrollArrowsMountedCountRef,\n itemProps,\n valueRef,\n valuesRef,\n labelsRef,\n typingRef,\n selectionRef,\n firstItemTextRef,\n selectedItemTextRef,\n validation,\n onOpenChangeComplete,\n alignItemWithTriggerActiveRef,\n initialValueRef\n }), [store, name, required, disabled, readOnly, multiple, highlightItemOnHover, setValue, setOpen, itemProps, validation, onOpenChangeComplete, handleScrollArrowVisibility]);\n const ref = useMergedRefs(inputRef, validation.inputRef);\n const hasMultipleSelection = multiple && Array.isArray(value) && value.length > 0;\n const hiddenInputName = multiple ? undefined : name;\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 form: form,\n name: name,\n value: currentSerializedValue,\n disabled: disabled\n }, currentSerializedValue);\n });\n }, [multiple, value, form, name, itemToStringValue, disabled]);\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.getValidationProps(disabled, {\n onFocus() {\n // Move focus to the trigger element when the hidden input is focused.\n store.state.triggerElement?.focus({\n // Supported in Chrome from 144 (January 2026)\n focusVisible: true\n });\n },\n // Handle browser autofill.\n onChange(event) {\n // Workaround for https://github.com/facebook/react/issues/9023\n if (event.nativeEvent.defaultPrevented || disabled || readOnly) {\n return;\n }\n const nextValue = event.currentTarget.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 // Preserve the original serialized matching, then fall back to rendered text,\n // which browsers can autofill for primitive values like `value=\"US\">United States`.\n const nextValueLower = nextValue.toLowerCase();\n let matchingIndex = valuesRef.current.findIndex(candidate => stringifyAsValue(candidate, itemToStringValue).toLowerCase() === nextValueLower || stringifyAsLabel(candidate, itemToStringLabel).toLowerCase() === nextValueLower);\n if (matchingIndex === -1) {\n matchingIndex = valuesRef.current.findIndex((_, index) => {\n const renderedLabel = labelsRef.current[index];\n return renderedLabel != null && renderedLabel.toLowerCase() === nextValueLower;\n });\n }\n const matchingValue = matchingIndex === -1 ? undefined : valuesRef.current[matchingIndex];\n if (matchingValue != null) {\n // `setValue` may be canceled by `onValueChange`; rely on `useValueChanged` to\n // mark the field dirty and run validation only when the value actually changes.\n setValue(matchingValue, details);\n }\n }\n store.set('forceMount', true);\n queueMicrotask(handleChange);\n }\n }),\n id: generatedId && hiddenInputName == null ? `${generatedId}-hidden-input` : undefined,\n form: form,\n name: hiddenInputName,\n autoComplete: autoComplete,\n value: serializedValue,\n disabled: disabled,\n required: required && !hasMultipleSelection,\n readOnly: readOnly,\n ref: ref,\n style: name ? visuallyHiddenInput : visuallyHidden,\n tabIndex: -1,\n \"aria-hidden\": true,\n suppressHydrationWarning: true\n }), hiddenInputs]\n })\n });\n}"],"names":["SelectRoot","props","id","valueProp","defaultValue","onValueChange","openProp","defaultOpen","onOpenChange","nameProp","form","autoComplete","disabledProp","readOnly","required","modal","actionsRef","inputRef","onOpenChangeComplete","items","multiple","itemToStringLabel","itemToStringValue","isItemEqualToValue","defaultItemEquality","highlightItemOnHover","children","clearErrors","useFormContext","setDirty","setTouched","setFocused","validityData","setFilled","fieldName","fieldDisabled","validation","validationMode","useFieldRootContext","generatedId","useLabelableId","disabled","name","value","setValueUnwrapped","useControlled","EMPTY_ARRAY","open","setOpenUnwrapped","listRef","React","labelsRef","popupRef","scrollHandlerRef","scrollArrowsMountedCountRef","valueRef","valuesRef","typingRef","firstItemTextRef","selectedItemTextRef","selectionRef","alignItemWithTriggerActiveRef","mounted","setMounted","transitionStatus","useTransitionStatus","openMethod","interactionTypeProps","useOpenInteractionType","store","useRefWithInit","Store","activeIndex","useStore","selectors","selectedIndex","triggerElement","positionerElement","previousOpenMethod","usePreviousValue","renderedOpenMethod","serializedValue","stringifyAsValue","fieldStringValue","currentValue","controlRef","useValueAsRef","getStringifiedValueForForm","useStableCallback","useRegisterFieldControl","initialValueRef","hasSelectedValue","useIsoLayoutEffect","registry","nextIndex","lastValue","lastIndex","findItemIndex","index","isSelectedValueDirty","initialValue","areArraysEqual","itemValue","initialItemValue","compareItemEquality","useValueChanged","setOpen","nextOpen","eventDetails","REASONS.focusOut","REASONS.outsidePress","handleUnmount","useOpenChangeComplete","setValue","nextValue","handleScrollArrowVisibility","scroller","maxScrollTop","getMaxScrollOffset","scrollTop","normalizeScrollOffset","shouldShowUp","shouldShowDown","floatingContext","useFloatingRootContext","click","useClick","dismiss","useDismiss","listNavigation","useListNavigation","nextActiveIndex","typeahead","useTypeahead","isElementDisabled","createChangeEventDetails","typing","mergedTriggerProps","triggerInteractionProps","mergeProps","popupProps","FOCUSABLE_POPUP_PROPS","itemProps","EMPTY_OBJECT","useOnFirstRender","contextValue","ref","useMergedRefs","hasMultipleSelection","hiddenInputName","hiddenInputs","v","currentSerializedValue","_jsx","SelectRootContext","_jsxs","SelectFloatingContext","event","details","REASONS.none","handleChange","nextValueLower","matchingIndex","candidate","stringifyAsLabel","_","renderedLabel","matchingValue","visuallyHiddenInput","visuallyHidden"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CO,SAASA,GAAWC,IAAO;AAChC,QAAM;AAAA,IACJ,IAAAC;AAAA,IACA,OAAOC;AAAA,IACP,cAAAC,IAAe;AAAA,IACf,eAAAC;AAAA,IACA,MAAMC;AAAA,IACN,aAAAC,KAAc;AAAA,IACd,cAAAC;AAAA,IACA,MAAMC;AAAA,IACN,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAUC,KAAe;AAAA,IACzB,UAAAC,IAAW;AAAA,IACX,UAAAC,IAAW;AAAA,IACX,OAAAC,IAAQ;AAAA,IACR,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,mBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,oBAAAC,IAAqBC;AAAA,IACrB,sBAAAC,IAAuB;AAAA,IACvB,UAAAC;AAAA,EACJ,IAAMzB,IACE;AAAA,IACJ,aAAA0B;AAAA,EACJ,IAAMC,GAAc,GACZ;AAAA,IACJ,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAMC;AAAA,IACN,UAAUC;AAAA,IACV,YAAAC;AAAA,IACA,gBAAAC;AAAA,EACJ,IAAMC,GAAmB,GACjBC,IAAcC,GAAe;AAAA,IACjC,IAAAtC;AAAA,EACJ,CAAG,GACKuC,IAAWN,MAAiBvB,IAC5B8B,IAAOR,MAAazB,GACpB,CAACkC,GAAOC,EAAiB,IAAIC,GAAc;AA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ignoreList":[0]}
1
+ {"version":3,"file":"index49.js","sources":["../../../node_modules/@base-ui/react/select/root/SelectRoot.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { visuallyHidden, visuallyHiddenInput } from '@base-ui/utils/visuallyHidden';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useOnFirstRender } from '@base-ui/utils/useOnFirstRender';\nimport { usePreviousValue } from '@base-ui/utils/usePreviousValue';\nimport { isElementDisabled } from '@base-ui/utils/isElementDisabled';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStore, Store } from '@base-ui/utils/store';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { useClick, useDismiss, useFloatingRootContext, useListNavigation, useTypeahead } from \"../../floating-ui-react/index.mjs\";\nimport { SelectRootContext, SelectFloatingContext } from \"./SelectRootContext.mjs\";\nimport { useFieldRootContext } from \"../../internals/field-root-context/FieldRootContext.mjs\";\nimport { useRegisterFieldControl } from \"../../internals/field-register-control/useRegisterFieldControl.mjs\";\nimport { useLabelableId } from \"../../internals/labelable-provider/useLabelableId.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useFormContext } from \"../../internals/form-context/FormContext.mjs\";\nimport { stringifyAsLabel, stringifyAsValue } from \"../../internals/resolveValueLabel.mjs\";\nimport { compareItemEquality, defaultItemEquality, findItemIndex } from \"../../internals/itemEquality.mjs\";\nimport { areArraysEqual } from \"../../internals/areArraysEqual.mjs\";\nimport { useValueChanged } from \"../../internals/useValueChanged.mjs\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.mjs\";\nimport { getMaxScrollOffset, normalizeScrollOffset } from \"../../utils/scrollEdges.mjs\";\nimport { FOCUSABLE_POPUP_PROPS } from \"../../utils/popups/index.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\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 form,\n autoComplete,\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 highlightItemOnHover = true,\n children\n } = props;\n const {\n clearErrors\n } = useFormContext();\n const {\n setDirty,\n setTouched,\n setFocused,\n validityData,\n setFilled,\n name: fieldName,\n disabled: fieldDisabled,\n validation,\n validationMode\n } = useFieldRootContext();\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 firstItemTextRef = React.useRef(null);\n const selectedItemTextRef = React.useRef(null);\n const selectionRef = React.useRef({\n allowSelectedMouseUp: false,\n allowUnselectedMouseUp: false,\n dragY: 0\n });\n const alignItemWithTriggerActiveRef = React.useRef(false);\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open);\n const {\n openMethod,\n triggerProps: interactionTypeProps\n } = useOpenInteractionType(open);\n const store = useRefWithInit(() => new Store({\n id: generatedId,\n labelId: undefined,\n modal,\n multiple,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue,\n value,\n open,\n mounted,\n transitionStatus,\n items,\n forceMount: false,\n openMethod: null,\n activeIndex: null,\n selectedIndex: null,\n popupProps: {},\n triggerProps: {},\n triggerElement: null,\n positionerElement: null,\n listElement: null,\n popupSide: 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 previousOpenMethod = usePreviousValue(openMethod);\n const renderedOpenMethod = openMethod ?? previousOpenMethod ?? null;\n const serializedValue = React.useMemo(() => {\n // In multiple mode the shared input is nameless; per-value entries are submitted via\n // `hiddenInputs`. Its value is therefore irrelevant, and passing the whole array to\n // `stringifyAsValue` would invoke a user `itemToStringValue` with an array it doesn't expect.\n if (multiple) {\n return '';\n }\n return stringifyAsValue(value, itemToStringValue);\n }, [multiple, value, itemToStringValue]);\n const fieldStringValue = React.useMemo(() => {\n if (multiple && Array.isArray(value)) {\n return value.map(currentValue => stringifyAsValue(currentValue, itemToStringValue));\n }\n return stringifyAsValue(value, itemToStringValue);\n }, [multiple, value, itemToStringValue]);\n const controlRef = useValueAsRef(store.state.triggerElement);\n const getStringifiedValueForForm = useStableCallback(() => fieldStringValue);\n useRegisterFieldControl(controlRef, generatedId, value, getStringifiedValueForForm, !disabled, nameProp);\n const initialValueRef = React.useRef(value);\n // Mirror the `hasSelectedValue` store selector so the Field's filled state agrees with the\n // trigger/value placeholder semantics (a value serializing to `''` counts as empty).\n const hasSelectedValue = multiple ? Array.isArray(value) && value.length > 0 : value != null && stringifyAsValue(value, itemToStringValue) !== '';\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(hasSelectedValue);\n }, [hasSelectedValue, setFilled]);\n useIsoLayoutEffect(function syncSelectedIndex() {\n const registry = valuesRef.current;\n let nextIndex;\n if (multiple) {\n const currentValue = Array.isArray(value) ? value : [];\n if (currentValue.length === 0) {\n nextIndex = null;\n } else {\n const lastValue = currentValue[currentValue.length - 1];\n const lastIndex = findItemIndex(registry, lastValue, isItemEqualToValue);\n nextIndex = lastIndex === -1 ? null : lastIndex;\n }\n } else {\n const index = findItemIndex(registry, value, isItemEqualToValue);\n nextIndex = index === -1 ? null : index;\n }\n if (nextIndex === null) {\n selectedItemTextRef.current = null;\n }\n if (open) {\n return;\n }\n store.set('selectedIndex', nextIndex);\n }, [hasSelectedValue, multiple, open, value, valuesRef, isItemEqualToValue, store, selectedItemTextRef]);\n function isSelectedValueDirty(currentValue) {\n const initialValue = validityData.initialValue;\n if (Array.isArray(currentValue) && Array.isArray(initialValue)) {\n return !areArraysEqual(currentValue, initialValue, (itemValue, initialItemValue) => compareItemEquality(itemValue, initialItemValue, isItemEqualToValue));\n }\n return currentValue !== initialValue;\n }\n useValueChanged(value, () => {\n clearErrors(name);\n setDirty(isSelectedValueDirty(value));\n validation.change(value);\n });\n const setOpen = useStableCallback((nextOpen, eventDetails) => {\n onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setOpenUnwrapped(nextOpen);\n if (!nextOpen && (eventDetails.reason === REASONS.focusOut || eventDetails.reason === REASONS.outsidePress)) {\n setTouched(true);\n setFocused(false);\n if (validationMode === 'onBlur') {\n validation.commit(value);\n }\n }\n });\n const handleUnmount = useStableCallback(() => {\n setMounted(false);\n store.update({\n activeIndex: null,\n openMethod: null\n });\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 maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop);\n const shouldShowUp = scrollTop > 0;\n const shouldShowDown = scrollTop < maxScrollTop;\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 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 focusItemOnHover: highlightItemOnHover\n });\n const typeahead = useTypeahead(floatingContext, {\n enabled: !readOnly && !disabled && (open || !multiple),\n listRef: labelsRef,\n activeIndex,\n selectedIndex,\n // Skip disabled items while matching so typeahead advances to the next selectable item\n // (a click can never select a disabled item and native `<select>` skips them too). Resolve\n // the disabled state from the element via the attribute-only `isElementDisabled` so the\n // hidden, force-mounted items used for closed-trigger typeahead aren't dropped by the\n // `elementsRef`/visibility filter that `disabledIndices` deliberately sidesteps.\n disabledIndices: index => isElementDisabled(listRef.current[index]),\n onMatch(index) {\n if (open) {\n store.set('activeIndex', index);\n } else {\n setValue(valuesRef.current[index], createChangeEventDetails('none'));\n }\n },\n onTyping(typing) {\n typingRef.current = typing;\n }\n });\n const mergedTriggerProps = React.useMemo(() => {\n const triggerInteractionProps = mergeProps(typeahead.reference, listNavigation.reference, dismiss.reference, click.reference, interactionTypeProps);\n if (generatedId) {\n triggerInteractionProps.id = generatedId;\n }\n return triggerInteractionProps;\n }, [click.reference, typeahead.reference, listNavigation.reference, dismiss.reference, interactionTypeProps, generatedId]);\n const popupProps = React.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, typeahead.floating, listNavigation.floating, dismiss.floating), [typeahead.floating, listNavigation.floating, dismiss.floating]);\n const itemProps = listNavigation.item ?? EMPTY_OBJECT;\n useOnFirstRender(() => {\n store.update({\n popupProps,\n triggerProps: mergedTriggerProps\n });\n });\n useIsoLayoutEffect(() => {\n store.update({\n id: generatedId,\n modal,\n multiple,\n value,\n open,\n mounted,\n transitionStatus,\n popupProps,\n triggerProps: mergedTriggerProps,\n items,\n itemToStringLabel,\n itemToStringValue,\n isItemEqualToValue,\n openMethod: renderedOpenMethod\n });\n }, [store, generatedId, modal, multiple, value, open, mounted, transitionStatus, popupProps, mergedTriggerProps, items, itemToStringLabel, itemToStringValue, isItemEqualToValue, renderedOpenMethod]);\n const contextValue = React.useMemo(() => ({\n store,\n name,\n required,\n disabled,\n readOnly,\n multiple,\n highlightItemOnHover,\n setValue,\n setOpen,\n listRef,\n popupRef,\n scrollHandlerRef,\n handleScrollArrowVisibility,\n scrollArrowsMountedCountRef,\n itemProps,\n valueRef,\n valuesRef,\n labelsRef,\n typingRef,\n selectionRef,\n firstItemTextRef,\n selectedItemTextRef,\n validation,\n onOpenChangeComplete,\n alignItemWithTriggerActiveRef,\n initialValueRef\n }), [store, name, required, disabled, readOnly, multiple, highlightItemOnHover, setValue, setOpen, itemProps, validation, onOpenChangeComplete, handleScrollArrowVisibility]);\n const ref = useMergedRefs(inputRef, validation.inputRef);\n const hasMultipleSelection = multiple && Array.isArray(value) && value.length > 0;\n const hiddenInputName = multiple ? undefined : name;\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 form: form,\n name: name,\n value: currentSerializedValue,\n disabled: disabled\n }, currentSerializedValue);\n });\n }, [multiple, value, form, name, itemToStringValue, disabled]);\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.getValidationProps(disabled, {\n onFocus() {\n // Move focus to the trigger element when the hidden input is focused.\n store.state.triggerElement?.focus({\n // Supported in Chrome from 144 (January 2026)\n focusVisible: true\n });\n },\n // Handle browser autofill.\n onChange(event) {\n // Workaround for https://github.com/facebook/react/issues/9023\n if (event.nativeEvent.defaultPrevented || disabled || readOnly) {\n return;\n }\n const nextValue = event.currentTarget.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 // Preserve the original serialized matching, then fall back to rendered text,\n // which browsers can autofill for primitive values like `value=\"US\">United States`.\n const nextValueLower = nextValue.toLowerCase();\n let matchingIndex = valuesRef.current.findIndex(candidate => stringifyAsValue(candidate, itemToStringValue).toLowerCase() === nextValueLower || stringifyAsLabel(candidate, itemToStringLabel).toLowerCase() === nextValueLower);\n if (matchingIndex === -1) {\n matchingIndex = valuesRef.current.findIndex((_, index) => {\n const renderedLabel = labelsRef.current[index];\n return renderedLabel != null && renderedLabel.toLowerCase() === nextValueLower;\n });\n }\n const matchingValue = matchingIndex === -1 ? undefined : valuesRef.current[matchingIndex];\n if (matchingValue != null) {\n // `setValue` may be canceled by `onValueChange`; rely on `useValueChanged` to\n // mark the field dirty and run validation only when the value actually changes.\n setValue(matchingValue, details);\n }\n }\n store.set('forceMount', true);\n queueMicrotask(handleChange);\n }\n }),\n id: generatedId && hiddenInputName == null ? `${generatedId}-hidden-input` : undefined,\n form: form,\n name: hiddenInputName,\n autoComplete: autoComplete,\n value: serializedValue,\n disabled: disabled,\n required: required && !hasMultipleSelection,\n readOnly: readOnly,\n ref: ref,\n style: name ? visuallyHiddenInput : visuallyHidden,\n tabIndex: -1,\n \"aria-hidden\": true,\n suppressHydrationWarning: true\n }), hiddenInputs]\n })\n });\n}"],"names":["SelectRoot","props","id","valueProp","defaultValue","onValueChange","openProp","defaultOpen","onOpenChange","nameProp","form","autoComplete","disabledProp","readOnly","required","modal","actionsRef","inputRef","onOpenChangeComplete","items","multiple","itemToStringLabel","itemToStringValue","isItemEqualToValue","defaultItemEquality","highlightItemOnHover","children","clearErrors","useFormContext","setDirty","setTouched","setFocused","validityData","setFilled","fieldName","fieldDisabled","validation","validationMode","useFieldRootContext","generatedId","useLabelableId","disabled","name","value","setValueUnwrapped","useControlled","EMPTY_ARRAY","open","setOpenUnwrapped","listRef","React","labelsRef","popupRef","scrollHandlerRef","scrollArrowsMountedCountRef","valueRef","valuesRef","typingRef","firstItemTextRef","selectedItemTextRef","selectionRef","alignItemWithTriggerActiveRef","mounted","setMounted","transitionStatus","useTransitionStatus","openMethod","interactionTypeProps","useOpenInteractionType","store","useRefWithInit","Store","activeIndex","useStore","selectors","selectedIndex","triggerElement","positionerElement","previousOpenMethod","usePreviousValue","renderedOpenMethod","serializedValue","stringifyAsValue","fieldStringValue","currentValue","controlRef","useValueAsRef","getStringifiedValueForForm","useStableCallback","useRegisterFieldControl","initialValueRef","hasSelectedValue","useIsoLayoutEffect","registry","nextIndex","lastValue","lastIndex","findItemIndex","index","isSelectedValueDirty","initialValue","areArraysEqual","itemValue","initialItemValue","compareItemEquality","useValueChanged","setOpen","nextOpen","eventDetails","REASONS.focusOut","REASONS.outsidePress","handleUnmount","useOpenChangeComplete","setValue","nextValue","handleScrollArrowVisibility","scroller","maxScrollTop","getMaxScrollOffset","scrollTop","normalizeScrollOffset","shouldShowUp","shouldShowDown","floatingContext","useFloatingRootContext","click","useClick","dismiss","useDismiss","listNavigation","useListNavigation","nextActiveIndex","typeahead","useTypeahead","isElementDisabled","createChangeEventDetails","typing","mergedTriggerProps","triggerInteractionProps","mergeProps","popupProps","FOCUSABLE_POPUP_PROPS","itemProps","EMPTY_OBJECT","useOnFirstRender","contextValue","ref","useMergedRefs","hasMultipleSelection","hiddenInputName","hiddenInputs","v","currentSerializedValue","_jsx","SelectRootContext","_jsxs","SelectFloatingContext","event","details","REASONS.none","handleChange","nextValueLower","matchingIndex","candidate","stringifyAsLabel","_","renderedLabel","matchingValue","visuallyHiddenInput","visuallyHidden"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CO,SAASA,GAAWC,IAAO;AAChC,QAAM;AAAA,IACJ,IAAAC;AAAA,IACA,OAAOC;AAAA,IACP,cAAAC,IAAe;AAAA,IACf,eAAAC;AAAA,IACA,MAAMC;AAAA,IACN,aAAAC,KAAc;AAAA,IACd,cAAAC;AAAA,IACA,MAAMC;AAAA,IACN,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAUC,KAAe;AAAA,IACzB,UAAAC,IAAW;AAAA,IACX,UAAAC,IAAW;AAAA,IACX,OAAAC,IAAQ;AAAA,IACR,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IAC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sD,IAAeT,CAAO;AAAA,YAEnC;AACA,YAAAzF,EAAM,IAAI,cAAc,EAAI,GAC5B,eAAe2F,CAAY;AAAA,UAC7B;AAAA,QACV,CAAS;AAAA,QACD,IAAIzH,KAAe8G,MAAmB,OAAO,GAAG9G,CAAW,kBAAkB;AAAA,QAC7E,MAAM7B;AAAA,QACN,MAAM2I;AAAA,QACN,cAAc1I;AAAA,QACd,OAAOsE;AAAA,QACP,UAAUxC;AAAA,QACV,UAAU3B,KAAY,CAACsI;AAAA,QACvB,UAAUvI;AAAA,QACV,KAAKqI;AAAA,QACL,OAAOxG,IAAO8H,KAAsBC;AAAA,QACpC,UAAU;AAAA,QACV,eAAe;AAAA,QACf,0BAA0B;AAAA,MAClC,CAAO,GAAGnB,EAAY;AAAA,IACtB,CAAK;AAAA,EACL,CAAG;AACH;","x_google_ignoreList":[0]}
package/dist/index50.js CHANGED
@@ -1,34 +1,34 @@
1
1
  import * as M from "react";
2
- import { rectToClientRect as Jt } from "./index325.js";
3
- import { addEventListener as Qt } from "./index326.js";
4
- import { useStableCallback as te } from "./index288.js";
5
- import { ownerDocument as Tt } from "./index310.js";
6
- import { useIsoLayoutEffect as rt } from "./index287.js";
7
- import { useAnimationFrame as ee } from "./index327.js";
8
- import { useSelectRootContext as oe, useSelectFloatingContext as ne } from "./index291.js";
9
- import { popupStateMapping as re } from "./index173.js";
10
- import { useSelectPositionerContext as ie } from "./index321.js";
11
- import { styleDisableScrollbar as Rt } from "./index328.js";
12
- import { transitionStatusMapping as se } from "./index174.js";
13
- import { useOpenChangeComplete as le } from "./index182.js";
14
- import { useRenderElement as ce } from "./index172.js";
15
- import { selectors as a } from "./index296.js";
16
- import { clearStyles as Ct, LIST_FUNCTIONAL_STYLES as ae } from "./index322.js";
17
- import { createChangeEventDetails as pe } from "./index175.js";
18
- import { useToolbarRootContext as me } from "./index329.js";
19
- import { COMPOSITE_KEYS as ue } from "./index183.js";
20
- import { getDisabledMountTransitionStyles as ge } from "./index330.js";
21
- import { clamp as U } from "./index331.js";
22
- import { SCROLL_EDGE_TOLERANCE_PX as v, getMaxScrollOffset as fe } from "./index302.js";
23
- import { useCSPContext as he } from "./index332.js";
24
- import { useDirection as de } from "./index333.js";
2
+ import { rectToClientRect as Jt } from "./index289.js";
3
+ import { addEventListener as Qt } from "./index290.js";
4
+ import { useStableCallback as te } from "./index239.js";
5
+ import { ownerDocument as Tt } from "./index267.js";
6
+ import { useIsoLayoutEffect as rt } from "./index238.js";
7
+ import { useAnimationFrame as ee } from "./index291.js";
8
+ import { useSelectRootContext as oe, useSelectFloatingContext as ne } from "./index242.js";
9
+ import { popupStateMapping as re } from "./index270.js";
10
+ import { useSelectPositionerContext as ie } from "./index283.js";
11
+ import { styleDisableScrollbar as Rt } from "./index292.js";
12
+ import { transitionStatusMapping as se } from "./index293.js";
13
+ import { useOpenChangeComplete as le } from "./index249.js";
14
+ import { useRenderElement as ce } from "./index272.js";
15
+ import { selectors as a } from "./index247.js";
16
+ import { clearStyles as Ct, LIST_FUNCTIONAL_STYLES as ae } from "./index286.js";
17
+ import { createChangeEventDetails as pe } from "./index248.js";
18
+ import { useToolbarRootContext as me } from "./index294.js";
19
+ import { COMPOSITE_KEYS as ue } from "./index295.js";
20
+ import { getDisabledMountTransitionStyles as ge } from "./index296.js";
21
+ import { clamp as U } from "./index297.js";
22
+ import { SCROLL_EDGE_TOLERANCE_PX as v, getMaxScrollOffset as fe } from "./index256.js";
23
+ import { useCSPContext as he } from "./index298.js";
24
+ import { useDirection as de } from "./index299.js";
25
25
  import { j as Ht } from "./index30.js";
26
- import { useStore as d } from "./index303.js";
27
- import { getWindow as it } from "./index334.js";
28
- import { FloatingFocusManager as ye } from "./index185.js";
29
- import { platform as xe } from "./index335.js";
30
- import { webkit as Se } from "./index336.js";
31
- import { windowResize as Te } from "./index177.js";
26
+ import { useStore as d } from "./index257.js";
27
+ import { getWindow as it } from "./index300.js";
28
+ import { FloatingFocusManager as ye } from "./index301.js";
29
+ import { platform as xe } from "./index302.js";
30
+ import { webkit as Se } from "./index303.js";
31
+ import { windowResize as Te } from "./index266.js";
32
32
  const Re = {
33
33
  ...re,
34
34
  ...se
@@ -1 +1 @@
1
- {"version":3,"file":"index50.js","sources":["../node_modules/@base-ui/react/select/popup/SelectPopup.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { rectToClientRect } from '@floating-ui/utils';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { platform } from '@base-ui/utils/platform';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { FloatingFocusManager, platform as floatingPlatform } from \"../../floating-ui-react/index.mjs\";\nimport { useSelectFloatingContext, useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { styleDisableScrollbar } from \"../../utils/styles.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { clearStyles, LIST_FUNCTIONAL_STYLES } from \"./utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../utils/getDisabledMountTransitionStyles.mjs\";\nimport { clamp } from \"../../internals/clamp.mjs\";\nimport { getMaxScrollOffset, SCROLL_EDGE_TOLERANCE_PX } from \"../../utils/scrollEdges.mjs\";\nimport { useCSPContext } from \"../../internals/csp-context/CSPContext.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\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 style,\n finalFocus,\n ...elementProps\n } = componentProps;\n const {\n store,\n popupRef,\n onOpenChangeComplete,\n setOpen,\n valueRef,\n firstItemTextRef,\n selectedItemTextRef,\n multiple,\n handleScrollArrowVisibility,\n scrollHandlerRef,\n listRef,\n highlightItemOnHover\n } = useSelectRootContext();\n const {\n side,\n align,\n alignItemWithTriggerActive,\n isPositioned,\n setControlledAlignItemWithTrigger\n } = useSelectPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const floatingRootContext = useSelectFloatingContext();\n const direction = useDirection();\n const {\n nonce,\n disableStyleElements\n } = useCSPContext();\n const id = useStore(store, selectors.id);\n const open = useStore(store, selectors.open);\n const openMethod = useStore(store, selectors.openMethod);\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 reachedMaxHeightRef = React.useRef(false);\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 if (!isTopPositioned && !isBottomPositioned) {\n handleScrollArrowVisibility();\n return;\n }\n const scale = getScale(positionerElement);\n const currentHeight = normalizeSize(positionerElement.getBoundingClientRect().height, 'y', scale);\n const doc = ownerDocument(positionerElement);\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const marginTop = parseFloat(positionerStyles.marginTop);\n const marginBottom = parseFloat(positionerStyles.marginBottom);\n const maxPopupHeight = getMaxPopupHeight(win.getComputedStyle(popupRef.current));\n const maxAvailableHeight = Math.min(doc.documentElement.clientHeight - marginTop - marginBottom, maxPopupHeight);\n const scrollTop = scroller.scrollTop;\n const maxScrollTop = getMaxScrollTop(scroller);\n let nextPositionerHeight = 0;\n let nextScrollTop = null;\n let setReachedMax = false;\n let scrollToMax = false;\n const setHeight = height => {\n positionerElement.style.height = `${height}px`;\n };\n const handleSmallDiff = (diff, targetScrollTop) => {\n const heightDelta = clamp(diff, 0, maxAvailableHeight - currentHeight);\n if (heightDelta > 0) {\n // Consume the remaining scroll in height.\n setHeight(currentHeight + heightDelta);\n }\n scroller.scrollTop = targetScrollTop;\n if (maxAvailableHeight - (currentHeight + heightDelta) <= SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n };\n const diff = isTopPositioned ? maxScrollTop - scrollTop : scrollTop;\n const nextHeight = Math.min(currentHeight + diff, maxAvailableHeight);\n nextPositionerHeight = nextHeight;\n if (diff <= SCROLL_EDGE_TOLERANCE_PX) {\n handleSmallDiff(diff, isTopPositioned ? maxScrollTop : 0);\n return;\n }\n if (maxAvailableHeight - nextHeight > SCROLL_EDGE_TOLERANCE_PX) {\n if (isTopPositioned) {\n scrollToMax = true;\n } else {\n nextScrollTop = 0;\n }\n } else {\n setReachedMax = true;\n if (isBottomPositioned && scrollTop < maxScrollTop) {\n const overshoot = currentHeight + diff - maxAvailableHeight;\n nextScrollTop = scrollTop - (diff - overshoot);\n }\n }\n nextPositionerHeight = Math.ceil(nextPositionerHeight);\n if (nextPositionerHeight !== 0) {\n setHeight(nextPositionerHeight);\n }\n if (scrollToMax || nextScrollTop != null) {\n // Recompute bounds after resizing (clientHeight likely changed).\n const nextMaxScrollTop = getMaxScrollTop(scroller);\n const target = scrollToMax ? nextMaxScrollTop : clamp(nextScrollTop, 0, nextMaxScrollTop);\n\n // Avoid adjustments that re-trigger scroll events forever.\n if (Math.abs(scroller.scrollTop - target) > SCROLL_EDGE_TOLERANCE_PX) {\n scroller.scrollTop = target;\n }\n }\n if (setReachedMax || nextPositionerHeight >= maxAvailableHeight - SCROLL_EDGE_TOLERANCE_PX) {\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 = {\n open,\n transitionStatus,\n side,\n align\n };\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 (open || alignItemWithTriggerActive) {\n return;\n }\n initialPlacedRef.current = false;\n reachedMaxHeightRef.current = false;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n }, [open, alignItemWithTriggerActive, positionerElement, popupRef]);\n useIsoLayoutEffect(() => {\n const popupElement = popupRef.current;\n\n // Wait for Floating UI's first positioning pass before reading DOM geometry.\n // We replace the final coordinates for aligned selects, but still need middleware\n // like `size()` to set CSS variables such as `--anchor-width`.\n if (!open || !triggerElement || !positionerElement || !popupElement || alignItemWithTriggerActive && !isPositioned || store.state.transitionStatus === 'ending') {\n return;\n }\n if (!alignItemWithTriggerActive) {\n initialPlacedRef.current = true;\n scrollArrowFrame.request(handleScrollArrowVisibility);\n popupElement.style.removeProperty('--transform-origin');\n return;\n }\n\n // Ensure we remove any transforms that can affect the location of the popup\n // and therefore the calculations.\n const restoreTransformStyles = unsetTransformStyles(popupElement);\n popupElement.style.removeProperty('--transform-origin');\n try {\n let textElement = selectedItemTextRef.current;\n if (!textElement?.isConnected) {\n const hasSelectedValue = selectors.hasSelectedValue(store.state);\n textElement = !hasSelectedValue && firstItemTextRef.current?.isConnected ? firstItemTextRef.current : null;\n }\n const valueElement = valueRef.current;\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const popupStyles = win.getComputedStyle(popupElement);\n const doc = ownerDocument(triggerElement);\n const scale = getScale(triggerElement);\n const triggerRect = normalizeRect(triggerElement.getBoundingClientRect(), scale);\n const positionerRect = normalizeRect(positionerElement.getBoundingClientRect(), scale);\n const triggerHeight = triggerRect.height;\n const scroller = listElement || popupElement;\n const scrollHeight = scroller.scrollHeight;\n const borderBottom = parseFloat(popupStyles.borderBottomWidth);\n // The `|| N` fallbacks cover an unset/`auto` value (parses to `NaN`). Note a literal `0`\n // also resolves to the fallback, so an explicit `margin: 0` or `min-height: 0` still takes\n // the default below.\n const marginTop = parseFloat(positionerStyles.marginTop) || 10;\n const marginBottom = parseFloat(positionerStyles.marginBottom) || 10;\n const minHeight = parseFloat(positionerStyles.minHeight) || 100;\n const maxPopupHeight = getMaxPopupHeight(popupStyles);\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 let textRect;\n let alignedLeft = direction === 'rtl' ? triggerRect.right - positionerRect.width : triggerRect.left;\n let offsetY = 0;\n if (textElement && valueElement) {\n const valueRect = normalizeRect(valueElement.getBoundingClientRect(), scale);\n textRect = normalizeRect(textElement.getBoundingClientRect(), scale);\n alignedLeft = positionerRect.left + (direction === 'rtl' ? valueRect.right - textRect.right : valueRect.left - textRect.left);\n const valueCenterFromTriggerTop = valueRect.top - triggerRect.top + valueRect.height / 2;\n const textCenterFromPositionerTop = textRect.top - positionerRect.top + textRect.height / 2;\n offsetY = textCenterFromPositionerTop - valueCenterFromTriggerTop;\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 maxRight = viewportWidth - paddingRight;\n positionerElement.style.left = `${clamp(alignedLeft, paddingLeft, maxRight - positionerRect.width)}px`;\n positionerElement.style.height = `${height}px`;\n // `none` (not the invalid `auto`) so the explicit height governs in align mode and isn't\n // clamped by a `max-height` from user CSS.\n positionerElement.style.maxHeight = 'none';\n positionerElement.style.marginTop = `${marginTop}px`;\n positionerElement.style.marginBottom = `${marginBottom}px`;\n popupElement.style.height = '100%';\n const maxScrollTop = getMaxScrollTop(scroller);\n const isTopPositioned = scrollTop >= maxScrollTop - SCROLL_EDGE_TOLERANCE_PX;\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 || Math.ceil(height) + SCROLL_EDGE_TOLERANCE_PX < Math.min(scrollHeight, minHeight);\n\n // Safari doesn't position the popup correctly when pinch-zoomed.\n const isPinchZoomed = (win.visualViewport?.scale ?? 1) !== 1 && platform.engine.webkit;\n if (fallbackToAlignPopupToTrigger || isPinchZoomed) {\n initialPlacedRef.current = true;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n setControlledAlignItemWithTrigger(false);\n return;\n }\n const initialHeight = Math.max(minHeight, height);\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 = getMaxScrollTop(scroller);\n } else {\n positionerElement.style.bottom = '0';\n scroller.scrollTop = scrollTop;\n }\n if (textRect) {\n const popupTop = positionerRect.top;\n const popupHeight = positionerRect.height;\n const textCenterY = textRect.top + textRect.height / 2;\n const transformOriginY = popupHeight > 0 ? (textCenterY - popupTop) / popupHeight * 100 : 50;\n const clampedY = clamp(transformOriginY, 0, 100);\n popupElement.style.setProperty('--transform-origin', `50% ${clampedY}%`);\n }\n if (initialHeight === viewportHeight || height >= maxPopupHeight) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n if (highlightItemOnHover && store.state.selectedIndex === null && store.state.activeIndex === null && listRef.current[0] != null) {\n store.set('activeIndex', 0);\n }\n initialPlacedRef.current = true;\n } finally {\n restoreTransformStyles();\n }\n }, [store, open, positionerElement, triggerElement, valueRef, firstItemTextRef, selectedItemTextRef, popupRef, handleScrollArrowVisibility, alignItemWithTriggerActive, setControlledAlignItemWithTrigger, scrollArrowFrame, listElement, listRef, highlightItemOnHover, direction, isPositioned]);\n React.useEffect(() => {\n if (!alignItemWithTriggerActive || !positionerElement || !open) {\n return undefined;\n }\n const win = ownerWindow(positionerElement);\n function handleResize(event) {\n setOpen(false, createChangeEventDetails(REASONS.windowResize, event));\n }\n return addEventListener(win, 'resize', handleResize);\n }, [setOpen, alignItemWithTriggerActive, positionerElement, open]);\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 if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n onScroll(event) {\n if (listElement) {\n return;\n }\n handleScroll(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: [!disableStyleElements && styleDisableScrollbar.getElement(nonce), /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n modal: false,\n disabled: !mounted,\n openInteractionType: openMethod,\n returnFocus: finalFocus,\n restoreFocus: true,\n children: element\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPopup.displayName = \"SelectPopup\";\nfunction getMaxPopupHeight(popupStyles) {\n const maxHeightStyle = popupStyles.maxHeight || '';\n return maxHeightStyle.endsWith('px') ? parseFloat(maxHeightStyle) || Infinity : Infinity;\n}\nfunction getMaxScrollTop(scroller) {\n return getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n}\nfunction getScale(element) {\n // The platform API is async-capable, but the DOM platform returns a plain scale object.\n return floatingPlatform.getScale(element);\n}\nfunction normalizeSize(size, axis, scale) {\n return size / scale[axis];\n}\nfunction normalizeRect(rect, scale) {\n return rectToClientRect({\n x: normalizeSize(rect.x, 'x', scale),\n y: normalizeSize(rect.y, 'y', scale),\n width: normalizeSize(rect.width, 'x', scale),\n height: normalizeSize(rect.height, 'y', scale)\n });\n}\nconst TRANSFORM_STYLE_RESETS = [['transform', 'none'], ['scale', '1'], ['translate', '0 0']];\nfunction unsetTransformStyles(popupElement) {\n const {\n style\n } = popupElement;\n const originalStyles = {};\n for (const [property, value] of TRANSFORM_STYLE_RESETS) {\n originalStyles[property] = style.getPropertyValue(property);\n style.setProperty(property, value, 'important');\n }\n return () => {\n for (const [property] of TRANSFORM_STYLE_RESETS) {\n const originalValue = originalStyles[property];\n if (originalValue) {\n style.setProperty(property, originalValue);\n } else {\n style.removeProperty(property);\n }\n }\n };\n}"],"names":["stateAttributesMapping","popupStateMapping","transitionStatusMapping","SelectPopup","React","componentProps","forwardedRef","render","className","style","finalFocus","elementProps","store","popupRef","onOpenChangeComplete","setOpen","valueRef","firstItemTextRef","selectedItemTextRef","multiple","handleScrollArrowVisibility","scrollHandlerRef","listRef","highlightItemOnHover","useSelectRootContext","side","align","alignItemWithTriggerActive","isPositioned","setControlledAlignItemWithTrigger","useSelectPositionerContext","insideToolbar","useToolbarRootContext","floatingRootContext","useSelectFloatingContext","direction","useDirection","nonce","disableStyleElements","useCSPContext","id","useStore","selectors","open","openMethod","mounted","popupProps","transitionStatus","triggerElement","positionerElement","listElement","reachedMaxHeightRef","initialPlacedRef","originalPositionerStylesRef","scrollArrowFrame","useAnimationFrame","handleScroll","useStableCallback","scroller","isTopPositioned","isBottomPositioned","scale","getScale","currentHeight","normalizeSize","doc","ownerDocument","win","ownerWindow","positionerStyles","marginTop","marginBottom","maxPopupHeight","getMaxPopupHeight","maxAvailableHeight","scrollTop","maxScrollTop","getMaxScrollTop","nextPositionerHeight","nextScrollTop","setReachedMax","scrollToMax","setHeight","height","handleSmallDiff","diff","targetScrollTop","heightDelta","clamp","SCROLL_EDGE_TOLERANCE_PX","nextHeight","overshoot","nextMaxScrollTop","target","useOpenChangeComplete","state","useIsoLayoutEffect","clearStyles","popupElement","restoreTransformStyles","unsetTransformStyles","textElement","valueElement","popupStyles","triggerRect","normalizeRect","positionerRect","triggerHeight","scrollHeight","borderBottom","minHeight","paddingLeft","paddingRight","triggerCollisionThreshold","viewportHeight","viewportWidth","availableSpaceBeneathTrigger","textRect","alignedLeft","offsetY","valueRect","valueCenterFromTriggerTop","idealHeight","maxHeight","maxRight","fallbackToAlignPopupToTrigger","isPinchZoomed","platform.engine.webkit","initialHeight","topOffset","popupTop","popupHeight","textCenterY","transformOriginY","clampedY","handleResize","event","createChangeEventDetails","REASONS.windowResize","addEventListener","defaultProps","COMPOSITE_KEYS","LIST_FUNCTIONAL_STYLES","element","useRenderElement","getDisabledMountTransitionStyles","styleDisableScrollbar","_jsxs","_jsx","FloatingFocusManager","maxHeightStyle","getMaxScrollOffset","floatingPlatform","size","axis","rect","rectToClientRect","TRANSFORM_STYLE_RESETS","originalStyles","property","value","originalValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAMA,KAAyB;AAAA,EAC7B,GAAGC;AAAA,EACH,GAAGC;AACL,GAQaC,KAA2B,gBAAAC,EAAM,WAAW,SAAqBC,GAAgBC,GAAc;AAC1G,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAMN,GACE;AAAA,IACJ,OAAAO;AAAA,IACA,UAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,sBAAAC;AAAA,EACJ,IAAMC,GAAoB,GAClB;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,4BAAAC;AAAA,IACA,cAAAC;AAAA,IACA,mCAAAC;AAAA,EACJ,IAAMC,GAA0B,GACxBC,KAAgBC,GAA0B,KAAK,MAC/CC,KAAsBC,GAAwB,GAC9CC,IAAYC,GAAY,GACxB;AAAA,IACJ,OAAAC;AAAA,IACA,sBAAAC;AAAA,EACJ,IAAMC,GAAa,GACXC,KAAKC,EAAS7B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Q;AAC7C,MAAIE,IACFxJ,EAAM,YAAYsJ,GAAUE,CAAa,IAEzCxJ,EAAM,eAAesJ,CAAQ;AAAA,IAEjC;AAAA,EACF;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index50.js","sources":["../../../node_modules/@base-ui/react/select/popup/SelectPopup.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { rectToClientRect } from '@floating-ui/utils';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { platform } from '@base-ui/utils/platform';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { FloatingFocusManager, platform as floatingPlatform } from \"../../floating-ui-react/index.mjs\";\nimport { useSelectFloatingContext, useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { popupStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useSelectPositionerContext } from \"../positioner/SelectPositionerContext.mjs\";\nimport { styleDisableScrollbar } from \"../../utils/styles.mjs\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { clearStyles, LIST_FUNCTIONAL_STYLES } from \"./utils.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../utils/getDisabledMountTransitionStyles.mjs\";\nimport { clamp } from \"../../internals/clamp.mjs\";\nimport { getMaxScrollOffset, SCROLL_EDGE_TOLERANCE_PX } from \"../../utils/scrollEdges.mjs\";\nimport { useCSPContext } from \"../../internals/csp-context/CSPContext.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\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 style,\n finalFocus,\n ...elementProps\n } = componentProps;\n const {\n store,\n popupRef,\n onOpenChangeComplete,\n setOpen,\n valueRef,\n firstItemTextRef,\n selectedItemTextRef,\n multiple,\n handleScrollArrowVisibility,\n scrollHandlerRef,\n listRef,\n highlightItemOnHover\n } = useSelectRootContext();\n const {\n side,\n align,\n alignItemWithTriggerActive,\n isPositioned,\n setControlledAlignItemWithTrigger\n } = useSelectPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const floatingRootContext = useSelectFloatingContext();\n const direction = useDirection();\n const {\n nonce,\n disableStyleElements\n } = useCSPContext();\n const id = useStore(store, selectors.id);\n const open = useStore(store, selectors.open);\n const openMethod = useStore(store, selectors.openMethod);\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 reachedMaxHeightRef = React.useRef(false);\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 if (!isTopPositioned && !isBottomPositioned) {\n handleScrollArrowVisibility();\n return;\n }\n const scale = getScale(positionerElement);\n const currentHeight = normalizeSize(positionerElement.getBoundingClientRect().height, 'y', scale);\n const doc = ownerDocument(positionerElement);\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const marginTop = parseFloat(positionerStyles.marginTop);\n const marginBottom = parseFloat(positionerStyles.marginBottom);\n const maxPopupHeight = getMaxPopupHeight(win.getComputedStyle(popupRef.current));\n const maxAvailableHeight = Math.min(doc.documentElement.clientHeight - marginTop - marginBottom, maxPopupHeight);\n const scrollTop = scroller.scrollTop;\n const maxScrollTop = getMaxScrollTop(scroller);\n let nextPositionerHeight = 0;\n let nextScrollTop = null;\n let setReachedMax = false;\n let scrollToMax = false;\n const setHeight = height => {\n positionerElement.style.height = `${height}px`;\n };\n const handleSmallDiff = (diff, targetScrollTop) => {\n const heightDelta = clamp(diff, 0, maxAvailableHeight - currentHeight);\n if (heightDelta > 0) {\n // Consume the remaining scroll in height.\n setHeight(currentHeight + heightDelta);\n }\n scroller.scrollTop = targetScrollTop;\n if (maxAvailableHeight - (currentHeight + heightDelta) <= SCROLL_EDGE_TOLERANCE_PX) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n };\n const diff = isTopPositioned ? maxScrollTop - scrollTop : scrollTop;\n const nextHeight = Math.min(currentHeight + diff, maxAvailableHeight);\n nextPositionerHeight = nextHeight;\n if (diff <= SCROLL_EDGE_TOLERANCE_PX) {\n handleSmallDiff(diff, isTopPositioned ? maxScrollTop : 0);\n return;\n }\n if (maxAvailableHeight - nextHeight > SCROLL_EDGE_TOLERANCE_PX) {\n if (isTopPositioned) {\n scrollToMax = true;\n } else {\n nextScrollTop = 0;\n }\n } else {\n setReachedMax = true;\n if (isBottomPositioned && scrollTop < maxScrollTop) {\n const overshoot = currentHeight + diff - maxAvailableHeight;\n nextScrollTop = scrollTop - (diff - overshoot);\n }\n }\n nextPositionerHeight = Math.ceil(nextPositionerHeight);\n if (nextPositionerHeight !== 0) {\n setHeight(nextPositionerHeight);\n }\n if (scrollToMax || nextScrollTop != null) {\n // Recompute bounds after resizing (clientHeight likely changed).\n const nextMaxScrollTop = getMaxScrollTop(scroller);\n const target = scrollToMax ? nextMaxScrollTop : clamp(nextScrollTop, 0, nextMaxScrollTop);\n\n // Avoid adjustments that re-trigger scroll events forever.\n if (Math.abs(scroller.scrollTop - target) > SCROLL_EDGE_TOLERANCE_PX) {\n scroller.scrollTop = target;\n }\n }\n if (setReachedMax || nextPositionerHeight >= maxAvailableHeight - SCROLL_EDGE_TOLERANCE_PX) {\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 = {\n open,\n transitionStatus,\n side,\n align\n };\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 (open || alignItemWithTriggerActive) {\n return;\n }\n initialPlacedRef.current = false;\n reachedMaxHeightRef.current = false;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n }, [open, alignItemWithTriggerActive, positionerElement, popupRef]);\n useIsoLayoutEffect(() => {\n const popupElement = popupRef.current;\n\n // Wait for Floating UI's first positioning pass before reading DOM geometry.\n // We replace the final coordinates for aligned selects, but still need middleware\n // like `size()` to set CSS variables such as `--anchor-width`.\n if (!open || !triggerElement || !positionerElement || !popupElement || alignItemWithTriggerActive && !isPositioned || store.state.transitionStatus === 'ending') {\n return;\n }\n if (!alignItemWithTriggerActive) {\n initialPlacedRef.current = true;\n scrollArrowFrame.request(handleScrollArrowVisibility);\n popupElement.style.removeProperty('--transform-origin');\n return;\n }\n\n // Ensure we remove any transforms that can affect the location of the popup\n // and therefore the calculations.\n const restoreTransformStyles = unsetTransformStyles(popupElement);\n popupElement.style.removeProperty('--transform-origin');\n try {\n let textElement = selectedItemTextRef.current;\n if (!textElement?.isConnected) {\n const hasSelectedValue = selectors.hasSelectedValue(store.state);\n textElement = !hasSelectedValue && firstItemTextRef.current?.isConnected ? firstItemTextRef.current : null;\n }\n const valueElement = valueRef.current;\n const win = ownerWindow(positionerElement);\n const positionerStyles = win.getComputedStyle(positionerElement);\n const popupStyles = win.getComputedStyle(popupElement);\n const doc = ownerDocument(triggerElement);\n const scale = getScale(triggerElement);\n const triggerRect = normalizeRect(triggerElement.getBoundingClientRect(), scale);\n const positionerRect = normalizeRect(positionerElement.getBoundingClientRect(), scale);\n const triggerHeight = triggerRect.height;\n const scroller = listElement || popupElement;\n const scrollHeight = scroller.scrollHeight;\n const borderBottom = parseFloat(popupStyles.borderBottomWidth);\n // The `|| N` fallbacks cover an unset/`auto` value (parses to `NaN`). Note a literal `0`\n // also resolves to the fallback, so an explicit `margin: 0` or `min-height: 0` still takes\n // the default below.\n const marginTop = parseFloat(positionerStyles.marginTop) || 10;\n const marginBottom = parseFloat(positionerStyles.marginBottom) || 10;\n const minHeight = parseFloat(positionerStyles.minHeight) || 100;\n const maxPopupHeight = getMaxPopupHeight(popupStyles);\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 let textRect;\n let alignedLeft = direction === 'rtl' ? triggerRect.right - positionerRect.width : triggerRect.left;\n let offsetY = 0;\n if (textElement && valueElement) {\n const valueRect = normalizeRect(valueElement.getBoundingClientRect(), scale);\n textRect = normalizeRect(textElement.getBoundingClientRect(), scale);\n alignedLeft = positionerRect.left + (direction === 'rtl' ? valueRect.right - textRect.right : valueRect.left - textRect.left);\n const valueCenterFromTriggerTop = valueRect.top - triggerRect.top + valueRect.height / 2;\n const textCenterFromPositionerTop = textRect.top - positionerRect.top + textRect.height / 2;\n offsetY = textCenterFromPositionerTop - valueCenterFromTriggerTop;\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 maxRight = viewportWidth - paddingRight;\n positionerElement.style.left = `${clamp(alignedLeft, paddingLeft, maxRight - positionerRect.width)}px`;\n positionerElement.style.height = `${height}px`;\n // `none` (not the invalid `auto`) so the explicit height governs in align mode and isn't\n // clamped by a `max-height` from user CSS.\n positionerElement.style.maxHeight = 'none';\n positionerElement.style.marginTop = `${marginTop}px`;\n positionerElement.style.marginBottom = `${marginBottom}px`;\n popupElement.style.height = '100%';\n const maxScrollTop = getMaxScrollTop(scroller);\n const isTopPositioned = scrollTop >= maxScrollTop - SCROLL_EDGE_TOLERANCE_PX;\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 || Math.ceil(height) + SCROLL_EDGE_TOLERANCE_PX < Math.min(scrollHeight, minHeight);\n\n // Safari doesn't position the popup correctly when pinch-zoomed.\n const isPinchZoomed = (win.visualViewport?.scale ?? 1) !== 1 && platform.engine.webkit;\n if (fallbackToAlignPopupToTrigger || isPinchZoomed) {\n initialPlacedRef.current = true;\n clearStyles(positionerElement, originalPositionerStylesRef.current);\n setControlledAlignItemWithTrigger(false);\n return;\n }\n const initialHeight = Math.max(minHeight, height);\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 = getMaxScrollTop(scroller);\n } else {\n positionerElement.style.bottom = '0';\n scroller.scrollTop = scrollTop;\n }\n if (textRect) {\n const popupTop = positionerRect.top;\n const popupHeight = positionerRect.height;\n const textCenterY = textRect.top + textRect.height / 2;\n const transformOriginY = popupHeight > 0 ? (textCenterY - popupTop) / popupHeight * 100 : 50;\n const clampedY = clamp(transformOriginY, 0, 100);\n popupElement.style.setProperty('--transform-origin', `50% ${clampedY}%`);\n }\n if (initialHeight === viewportHeight || height >= maxPopupHeight) {\n reachedMaxHeightRef.current = true;\n }\n handleScrollArrowVisibility();\n if (highlightItemOnHover && store.state.selectedIndex === null && store.state.activeIndex === null && listRef.current[0] != null) {\n store.set('activeIndex', 0);\n }\n initialPlacedRef.current = true;\n } finally {\n restoreTransformStyles();\n }\n }, [store, open, positionerElement, triggerElement, valueRef, firstItemTextRef, selectedItemTextRef, popupRef, handleScrollArrowVisibility, alignItemWithTriggerActive, setControlledAlignItemWithTrigger, scrollArrowFrame, listElement, listRef, highlightItemOnHover, direction, isPositioned]);\n React.useEffect(() => {\n if (!alignItemWithTriggerActive || !positionerElement || !open) {\n return undefined;\n }\n const win = ownerWindow(positionerElement);\n function handleResize(event) {\n setOpen(false, createChangeEventDetails(REASONS.windowResize, event));\n }\n return addEventListener(win, 'resize', handleResize);\n }, [setOpen, alignItemWithTriggerActive, positionerElement, open]);\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 if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n onScroll(event) {\n if (listElement) {\n return;\n }\n handleScroll(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: [!disableStyleElements && styleDisableScrollbar.getElement(nonce), /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n modal: false,\n disabled: !mounted,\n openInteractionType: openMethod,\n returnFocus: finalFocus,\n restoreFocus: true,\n children: element\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") SelectPopup.displayName = \"SelectPopup\";\nfunction getMaxPopupHeight(popupStyles) {\n const maxHeightStyle = popupStyles.maxHeight || '';\n return maxHeightStyle.endsWith('px') ? parseFloat(maxHeightStyle) || Infinity : Infinity;\n}\nfunction getMaxScrollTop(scroller) {\n return getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight);\n}\nfunction getScale(element) {\n // The platform API is async-capable, but the DOM platform returns a plain scale object.\n return floatingPlatform.getScale(element);\n}\nfunction normalizeSize(size, axis, scale) {\n return size / scale[axis];\n}\nfunction normalizeRect(rect, scale) {\n return rectToClientRect({\n x: normalizeSize(rect.x, 'x', scale),\n y: normalizeSize(rect.y, 'y', scale),\n width: normalizeSize(rect.width, 'x', scale),\n height: normalizeSize(rect.height, 'y', scale)\n });\n}\nconst TRANSFORM_STYLE_RESETS = [['transform', 'none'], ['scale', '1'], ['translate', '0 0']];\nfunction unsetTransformStyles(popupElement) {\n const {\n style\n } = popupElement;\n const originalStyles = {};\n for (const [property, value] of TRANSFORM_STYLE_RESETS) {\n originalStyles[property] = style.getPropertyValue(property);\n style.setProperty(property, value, 'important');\n }\n return () => {\n for (const [property] of TRANSFORM_STYLE_RESETS) {\n const originalValue = originalStyles[property];\n if (originalValue) {\n style.setProperty(property, originalValue);\n } else {\n style.removeProperty(property);\n }\n }\n };\n}"],"names":["stateAttributesMapping","popupStateMapping","transitionStatusMapping","SelectPopup","React","componentProps","forwardedRef","render","className","style","finalFocus","elementProps","store","popupRef","onOpenChangeComplete","setOpen","valueRef","firstItemTextRef","selectedItemTextRef","multiple","handleScrollArrowVisibility","scrollHandlerRef","listRef","highlightItemOnHover","useSelectRootContext","side","align","alignItemWithTriggerActive","isPositioned","setControlledAlignItemWithTrigger","useSelectPositionerContext","insideToolbar","useToolbarRootContext","floatingRootContext","useSelectFloatingContext","direction","useDirection","nonce","disableStyleElements","useCSPContext","id","useStore","selectors","open","openMethod","mounted","popupProps","transitionStatus","triggerElement","positionerElement","listElement","reachedMaxHeightRef","initialPlacedRef","originalPositionerStylesRef","scrollArrowFrame","useAnimationFrame","handleScroll","useStableCallback","scroller","isTopPositioned","isBottomPositioned","scale","getScale","currentHeight","normalizeSize","doc","ownerDocument","win","ownerWindow","positionerStyles","marginTop","marginBottom","maxPopupHeight","getMaxPopupHeight","maxAvailableHeight","scrollTop","maxScrollTop","getMaxScrollTop","nextPositionerHeight","nextScrollTop","setReachedMax","scrollToMax","setHeight","height","handleSmallDiff","diff","targetScrollTop","heightDelta","clamp","SCROLL_EDGE_TOLERANCE_PX","nextHeight","overshoot","nextMaxScrollTop","target","useOpenChangeComplete","state","useIsoLayoutEffect","clearStyles","popupElement","restoreTransformStyles","unsetTransformStyles","textElement","valueElement","popupStyles","triggerRect","normalizeRect","positionerRect","triggerHeight","scrollHeight","borderBottom","minHeight","paddingLeft","paddingRight","triggerCollisionThreshold","viewportHeight","viewportWidth","availableSpaceBeneathTrigger","textRect","alignedLeft","offsetY","valueRect","valueCenterFromTriggerTop","idealHeight","maxHeight","maxRight","fallbackToAlignPopupToTrigger","isPinchZoomed","platform.engine.webkit","initialHeight","topOffset","popupTop","popupHeight","textCenterY","transformOriginY","clampedY","handleResize","event","createChangeEventDetails","REASONS.windowResize","addEventListener","defaultProps","COMPOSITE_KEYS","LIST_FUNCTIONAL_STYLES","element","useRenderElement","getDisabledMountTransitionStyles","styleDisableScrollbar","_jsxs","_jsx","FloatingFocusManager","maxHeightStyle","getMaxScrollOffset","floatingPlatform","size","axis","rect","rectToClientRect","TRANSFORM_STYLE_RESETS","originalStyles","property","value","originalValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAMA,KAAyB;AAAA,EAC7B,GAAGC;AAAA,EACH,GAAGC;AACL,GAQaC,KAA2B,gBAAAC,EAAM,WAAW,SAAqBC,GAAgBC,GAAc;AAC1G,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAMN,GACE;AAAA,IACJ,OAAAO;AAAA,IACA,UAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,sBAAAC;AAAA,EACJ,IAAMC,GAAoB,GAClB;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,4BAAAC;AAAA,IACA,cAAAC;AAAA,IACA,mCAAAC;AAAA,EACJ,IAAMC,GAA0B,GACxBC,KAAgBC,GAA0B,KAAK,MAC/CC,KAAsBC,GAAwB,GAC9CC,IAAYC,GAAY,GACxB;AAAA,IACJ,OAAAC;AAAA,IACA,sBAAAC;AAAA,EACJ,IAAMC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,YAAMI,IAAgBH,EAAeC,CAAQ;AAC7C,MAAIE,IACFxJ,EAAM,YAAYsJ,GAAUE,CAAa,IAEzCxJ,EAAM,eAAesJ,CAAQ;AAAA,IAEjC;AAAA,EACF;AACF;","x_google_ignoreList":[0]}
package/dist/index51.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as r from "react";
2
- import { SelectGroupContext as c } from "./index340.js";
3
- import { useRenderElement as p } from "./index172.js";
2
+ import { SelectGroupContext as c } from "./index307.js";
3
+ import { useRenderElement as p } from "./index272.js";
4
4
  import { j as m } from "./index30.js";
5
5
  const u = /* @__PURE__ */ r.forwardRef(function(t, s) {
6
6
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"index51.js","sources":["../node_modules/@base-ui/react/select/group/SelectGroup.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { SelectGroupContext } from \"./SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\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 render,\n className,\n style,\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\";"],"names":["SelectGroup","React","componentProps","forwardedRef","render","className","style","elementProps","labelId","setLabelId","contextValue","element","useRenderElement","_jsx","SelectGroupContext"],"mappings":";;;;AAaY,MAACA,IAA2B,gBAAAC,EAAM,WAAW,SAAqBC,GAAgBC,GAAc;AAC1G,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAML,GACE,CAACM,GAASC,CAAU,IAAIR,EAAM,SAAQ,GACtCS,IAAeT,EAAM,QAAQ,OAAO;AAAA,IACxC,SAAAO;AAAA,IACA,YAAAC;AAAA,EACJ,IAAM,CAACD,GAASC,CAAU,CAAC,GACnBE,IAAUC,EAAiB,OAAOV,GAAgB;AAAA,IACtD,KAAKC;AAAA,IACL,OAAO,CAAC;AAAA,MACN,MAAM;AAAA,MACN,mBAAmBK;AAAA,IACzB,GAAOD,CAAY;AAAA,EACnB,CAAG;AACD,SAAoBM,gBAAAA,EAAAA,IAAKC,EAAmB,UAAU;AAAA,IACpD,OAAOJ;AAAA,IACP,UAAUC;AAAA,EACd,CAAG;AACH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcX,EAAY,cAAc;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index51.js","sources":["../../../node_modules/@base-ui/react/select/group/SelectGroup.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { SelectGroupContext } from \"./SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\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 render,\n className,\n style,\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\";"],"names":["SelectGroup","React","componentProps","forwardedRef","render","className","style","elementProps","labelId","setLabelId","contextValue","element","useRenderElement","_jsx","SelectGroupContext"],"mappings":";;;;AAaY,MAACA,IAA2B,gBAAAC,EAAM,WAAW,SAAqBC,GAAgBC,GAAc;AAC1G,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAML,GACE,CAACM,GAASC,CAAU,IAAIR,EAAM,SAAQ,GACtCS,IAAeT,EAAM,QAAQ,OAAO;AAAA,IACxC,SAAAO;AAAA,IACA,YAAAC;AAAA,EACJ,IAAM,CAACD,GAASC,CAAU,CAAC,GACnBE,IAAUC,EAAiB,OAAOV,GAAgB;AAAA,IACtD,KAAKC;AAAA,IACL,OAAO,CAAC;AAAA,MACN,MAAM;AAAA,MACN,mBAAmBK;AAAA,IACzB,GAAOD,CAAY;AAAA,EACnB,CAAG;AACD,SAAoBM,gBAAAA,EAAAA,IAAKC,EAAmB,UAAU;AAAA,IACpD,OAAOJ;AAAA,IACP,UAAUC;AAAA,EACd,CAAG;AACH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcX,EAAY,cAAc;","x_google_ignoreList":[0]}
package/dist/index52.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import * as s from "react";
2
- import { useIsoLayoutEffect as U } from "./index287.js";
3
- import { useSelectRootContext as Q } from "./index291.js";
4
- import { useCompositeListItem as X, IndexGuessBehavior as Z } from "./index337.js";
5
- import { useRenderElement as $ } from "./index172.js";
6
- import { SelectItemContext as ee } from "./index338.js";
7
- import { selectors as a } from "./index296.js";
8
- import { createChangeEventDetails as M } from "./index175.js";
9
- import { compareItemEquality as te, removeItem as re } from "./index299.js";
10
- import { isVirtualClick as oe } from "./index339.js";
2
+ import { useIsoLayoutEffect as U } from "./index238.js";
3
+ import { useSelectRootContext as Q } from "./index242.js";
4
+ import { useCompositeListItem as X, IndexGuessBehavior as Z } from "./index304.js";
5
+ import { useRenderElement as $ } from "./index272.js";
6
+ import { SelectItemContext as ee } from "./index305.js";
7
+ import { selectors as a } from "./index247.js";
8
+ import { createChangeEventDetails as M } from "./index248.js";
9
+ import { compareItemEquality as te, removeItem as re } from "./index252.js";
10
+ import { isVirtualClick as oe } from "./index306.js";
11
11
  import { j as ne } from "./index30.js";
12
- import { useStore as f } from "./index303.js";
13
- import { useButton as se } from "./index176.js";
14
- import { itemPress as g } from "./index177.js";
12
+ import { useStore as f } from "./index257.js";
13
+ import { useButton as se } from "./index275.js";
14
+ import { itemPress as g } from "./index266.js";
15
15
  const ie = /* @__PURE__ */ s.memo(/* @__PURE__ */ s.forwardRef(function(k, D) {
16
16
  const {
17
17
  render: ce,
@@ -1 +1 @@
1
- {"version":3,"file":"index52.js","sources":["../node_modules/@base-ui/react/select/item/SelectItem.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useCompositeListItem, IndexGuessBehavior } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { SelectItemContext } from \"./SelectItemContext.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { compareItemEquality, removeItem } from \"../../internals/itemEquality.mjs\";\nimport { isVirtualClick } from \"../../floating-ui-react/utils/event.mjs\";\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 style,\n value: itemValue = 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 itemProps,\n setOpen,\n setValue,\n selectionRef,\n typingRef,\n valuesRef,\n multiple,\n selectedItemTextRef,\n disabled: selectDisabled,\n readOnly\n } = useSelectRootContext();\n const highlighted = useStore(store, selectors.isActive, listItem.index);\n const open = useStore(store, selectors.open);\n const selected = useStore(store, selectors.isSelected, itemValue);\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 useIsoLayoutEffect(() => {\n if (!hasRegistered) {\n return undefined;\n }\n const values = valuesRef.current;\n values[index] = itemValue;\n return () => {\n delete values[index];\n };\n }, [hasRegistered, index, itemValue, valuesRef]);\n useIsoLayoutEffect(() => {\n if (!hasRegistered) {\n return;\n }\n const selectedValue = store.state.value;\n let selectedCandidate = selectedValue;\n if (multiple && Array.isArray(selectedValue)) {\n // Compare against the last selected item, or `undefined` when nothing is selected — never\n // the raw array, which a custom `isItemEqualToValue` isn't expected to receive.\n selectedCandidate = selectedValue.length > 0 ? selectedValue[selectedValue.length - 1] : undefined;\n }\n if (selectedCandidate !== undefined && compareItemEquality(itemValue, selectedCandidate, isItemEqualToValue)) {\n store.set('selectedIndex', index);\n // Make sure SelectPopup can measure the selected item on first open.\n // SelectItemText can still update this ref later when focus moves.\n if (textRef.current) {\n selectedItemTextRef.current = textRef.current;\n }\n }\n }, [hasRegistered, index, multiple, isItemEqualToValue, store, itemValue, selectedItemTextRef]);\n const lastKeyRef = React.useRef(null);\n const pointerTypeRef = React.useRef('mouse');\n const allowMouseSelectionRef = React.useRef(false);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton,\n composite: true\n });\n const state = {\n disabled,\n selected,\n highlighted\n };\n function commitSelection(event) {\n // A forced-open select (`open`/`defaultOpen`) can still receive item activations even\n // when the root is disabled or read-only, so guard the commit here too.\n if (selectDisabled || readOnly) {\n return;\n }\n const selectedValue = store.state.value;\n if (multiple) {\n const currentValue = Array.isArray(selectedValue) ? selectedValue : [];\n const nextValue = selected ? removeItem(currentValue, itemValue, isItemEqualToValue) : [...currentValue, itemValue];\n setValue(nextValue, createChangeEventDetails(REASONS.itemPress, event));\n } else {\n setValue(itemValue, createChangeEventDetails(REASONS.itemPress, event));\n setOpen(false, createChangeEventDetails(REASONS.itemPress, event));\n }\n }\n function resetDragMovement() {\n selectionRef.current.dragY = 0;\n }\n const defaultProps = {\n role: 'option',\n 'aria-selected': selected,\n tabIndex: open && highlighted ? 0 : -1,\n onKeyDown(event) {\n lastKeyRef.current = event.key;\n store.set('activeIndex', index);\n if (event.key === ' ' && typingRef.current) {\n event.preventDefault();\n }\n },\n onClick(event) {\n const isMouseClick = event.type === 'click' && pointerTypeRef.current !== 'touch';\n const clickPointerType = event.nativeEvent.pointerType;\n const isVirtualMouseClick = isMouseClick && isVirtualClick(event.nativeEvent) && (\n // Generic no-pointer `detail === 0` clicks stay tied to highlight state. Virtual\n // clicks that carry browser pointer data, including an empty string from assistive\n // technology, can activate unhighlighted items.\n clickPointerType !== undefined || highlighted);\n // With alignItemWithTrigger, opening can place an item under the cursor. Real mouse\n // clicks must start on the item, while virtual clicks represent explicit keyboard or\n // assistive technology activation.\n const isInvalidMouseClick = isMouseClick && !isVirtualMouseClick && !allowMouseSelectionRef.current;\n allowMouseSelectionRef.current = false;\n\n // Prevent double commit on {Enter}\n if (event.type === 'keydown' && lastKeyRef.current === null) {\n return;\n }\n if (disabled || event.type === 'keydown' && lastKeyRef.current === ' ' && typingRef.current || isInvalidMouseClick) {\n return;\n }\n lastKeyRef.current = null;\n commitSelection(event.nativeEvent);\n },\n onPointerEnter(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onPointerMove(event) {\n if (event.pointerType === 'mouse' && event.buttons === 1) {\n const selection = selectionRef.current;\n selection.dragY += event.movementY;\n if (selection.dragY ** 2 >= 64) {\n selection.allowUnselectedMouseUp = true;\n }\n }\n },\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n allowMouseSelectionRef.current = true;\n resetDragMovement();\n },\n onMouseUp() {\n resetDragMovement();\n if (disabled || pointerTypeRef.current === 'touch') {\n return;\n }\n\n // Regular clicks are committed by the click event.\n if (allowMouseSelectionRef.current) {\n return;\n }\n const disallowSelectedMouseUp = !selectionRef.current.allowSelectedMouseUp && selected;\n const disallowUnselectedMouseUp = !selectionRef.current.allowUnselectedMouseUp && !selected;\n if (disallowSelectedMouseUp || disallowUnselectedMouseUp) {\n return;\n }\n allowMouseSelectionRef.current = true;\n itemRef.current?.click();\n allowMouseSelectionRef.current = false;\n }\n };\n const element = useRenderElement('div', componentProps, {\n ref: [buttonRef, forwardedRef, listItem.ref, itemRef],\n state,\n props: [itemProps, defaultProps, elementProps, getButtonProps]\n });\n const contextValue = React.useMemo(() => ({\n selected,\n index,\n textRef,\n selectedByFocus,\n hasRegistered\n }), [selected, index, 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\";"],"names":["SelectItem","React","componentProps","forwardedRef","render","className","style","itemValue","label","disabled","nativeButton","elementProps","textRef","listItem","useCompositeListItem","IndexGuessBehavior","store","itemProps","setOpen","setValue","selectionRef","typingRef","valuesRef","multiple","selectedItemTextRef","selectDisabled","readOnly","useSelectRootContext","highlighted","useStore","selectors","open","selected","selectedByFocus","isItemEqualToValue","index","hasRegistered","itemRef","useIsoLayoutEffect","values","selectedValue","selectedCandidate","compareItemEquality","lastKeyRef","pointerTypeRef","allowMouseSelectionRef","getButtonProps","buttonRef","useButton","state","commitSelection","event","currentValue","nextValue","removeItem","createChangeEventDetails","REASONS.itemPress","resetDragMovement","defaultProps","isMouseClick","clickPointerType","isVirtualMouseClick","isVirtualClick","isInvalidMouseClick","selection","disallowSelectedMouseUp","disallowUnselectedMouseUp","element","useRenderElement","contextValue","_jsx","SelectItemContext"],"mappings":";;;;;;;;;;;;;;AAuBY,MAACA,KAA0B,gBAAAC,EAAM,KAAkB,gBAAAA,EAAM,WAAW,SAAoBC,GAAgBC,GAAc;AAChI,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAOC,IAAY;AAAA,IACnB,OAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,cAAAC,IAAe;AAAA,IACf,GAAGC;AAAA,EACP,IAAMT,GACEU,IAAUX,EAAM,OAAO,IAAI,GAC3BY,IAAWC,EAAqB;AAAA,IACpC,OAAAN;AAAA,IACA,SAAAI;AAAA,IACA,oBAAoBG,EAAmB;AAAA,EAC3C,CAAG,GACK;AAAA,IACJ,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,UAAUC;AAAA,IACV,UAAAC;AAAA,EACJ,IAAMC,EAAoB,GAClBC,IAAcC,EAASb,GAAOc,EAAU,UAAUjB,EAAS,KAAK,GAChEkB,IAAOF,EAASb,GAAOc,EAAU,IAAI,GACrCE,IAAWH,EAASb,GAAOc,EAAU,YAAYvB,CAAS,GAC1D0B,IAAkBJ,EAASb,GAAOc,EAAU,mBAAmBjB,EAAS,KAAK,GAC7EqB,IAAqBL,EAASb,GAAOc,EAAU,kBAAkB,GACjEK,IAAQtB,EAAS,O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xD,cAAMa,IAAY5C,EAAa;AAC/B,QAAA4C,EAAU,SAASb,EAAM,WACrBa,EAAU,SAAS,KAAK,OAC1BA,EAAU,yBAAyB;AAAA,MAEvC;AAAA,IACF;AAAA,IACA,cAAcb,GAAO;AACnB,MAAAP,EAAe,UAAUO,EAAM,aAC/BN,EAAuB,UAAU,IACjCY,EAAiB;AAAA,IACnB;AAAA,IACA,YAAY;AAOV,UANAA,EAAiB,GACbhD,KAAYmC,EAAe,YAAY,WAKvCC,EAAuB;AACzB;AAEF,YAAMoB,IAA0B,CAAC7C,EAAa,QAAQ,wBAAwBY,GACxEkC,IAA4B,CAAC9C,EAAa,QAAQ,0BAA0B,CAACY;AACnF,MAAIiC,KAA2BC,MAG/BrB,EAAuB,UAAU,IACjCR,EAAQ,SAAS,MAAK,GACtBQ,EAAuB,UAAU;AAAA,IACnC;AAAA,EACJ,GACQsB,IAAUC,EAAiB,OAAOlE,GAAgB;AAAA,IACtD,KAAK,CAAC6C,GAAW5C,GAAcU,EAAS,KAAKwB,CAAO;AAAA,IACpD,OAAAY;AAAA,IACA,OAAO,CAAChC,GAAWyC,GAAc/C,GAAcmC,CAAc;AAAA,EACjE,CAAG,GACKuB,IAAepE,EAAM,QAAQ,OAAO;AAAA,IACxC,UAAA+B;AAAA,IACA,OAAAG;AAAA,IACA,SAAAvB;AAAA,IACA,iBAAAqB;AAAA,IACA,eAAAG;AAAA,EACJ,IAAM,CAACJ,GAAUG,GAAOvB,GAASqB,GAAiBG,CAAa,CAAC;AAC9D,SAAoBkC,gBAAAA,GAAAA,IAAKC,GAAkB,UAAU;AAAA,IACnD,OAAOF;AAAA,IACP,UAAUF;AAAA,EACd,CAAG;AACH,CAAC,CAAC;AACE,QAAQ,IAAI,aAAa,iBAAcnE,GAAW,cAAc;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index52.js","sources":["../../../node_modules/@base-ui/react/select/item/SelectItem.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStore } from '@base-ui/utils/store';\nimport { useSelectRootContext } from \"../root/SelectRootContext.mjs\";\nimport { useCompositeListItem, IndexGuessBehavior } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { SelectItemContext } from \"./SelectItemContext.mjs\";\nimport { selectors } from \"../store.mjs\";\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { compareItemEquality, removeItem } from \"../../internals/itemEquality.mjs\";\nimport { isVirtualClick } from \"../../floating-ui-react/utils/event.mjs\";\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 style,\n value: itemValue = 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 itemProps,\n setOpen,\n setValue,\n selectionRef,\n typingRef,\n valuesRef,\n multiple,\n selectedItemTextRef,\n disabled: selectDisabled,\n readOnly\n } = useSelectRootContext();\n const highlighted = useStore(store, selectors.isActive, listItem.index);\n const open = useStore(store, selectors.open);\n const selected = useStore(store, selectors.isSelected, itemValue);\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 useIsoLayoutEffect(() => {\n if (!hasRegistered) {\n return undefined;\n }\n const values = valuesRef.current;\n values[index] = itemValue;\n return () => {\n delete values[index];\n };\n }, [hasRegistered, index, itemValue, valuesRef]);\n useIsoLayoutEffect(() => {\n if (!hasRegistered) {\n return;\n }\n const selectedValue = store.state.value;\n let selectedCandidate = selectedValue;\n if (multiple && Array.isArray(selectedValue)) {\n // Compare against the last selected item, or `undefined` when nothing is selected — never\n // the raw array, which a custom `isItemEqualToValue` isn't expected to receive.\n selectedCandidate = selectedValue.length > 0 ? selectedValue[selectedValue.length - 1] : undefined;\n }\n if (selectedCandidate !== undefined && compareItemEquality(itemValue, selectedCandidate, isItemEqualToValue)) {\n store.set('selectedIndex', index);\n // Make sure SelectPopup can measure the selected item on first open.\n // SelectItemText can still update this ref later when focus moves.\n if (textRef.current) {\n selectedItemTextRef.current = textRef.current;\n }\n }\n }, [hasRegistered, index, multiple, isItemEqualToValue, store, itemValue, selectedItemTextRef]);\n const lastKeyRef = React.useRef(null);\n const pointerTypeRef = React.useRef('mouse');\n const allowMouseSelectionRef = React.useRef(false);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton,\n composite: true\n });\n const state = {\n disabled,\n selected,\n highlighted\n };\n function commitSelection(event) {\n // A forced-open select (`open`/`defaultOpen`) can still receive item activations even\n // when the root is disabled or read-only, so guard the commit here too.\n if (selectDisabled || readOnly) {\n return;\n }\n const selectedValue = store.state.value;\n if (multiple) {\n const currentValue = Array.isArray(selectedValue) ? selectedValue : [];\n const nextValue = selected ? removeItem(currentValue, itemValue, isItemEqualToValue) : [...currentValue, itemValue];\n setValue(nextValue, createChangeEventDetails(REASONS.itemPress, event));\n } else {\n setValue(itemValue, createChangeEventDetails(REASONS.itemPress, event));\n setOpen(false, createChangeEventDetails(REASONS.itemPress, event));\n }\n }\n function resetDragMovement() {\n selectionRef.current.dragY = 0;\n }\n const defaultProps = {\n role: 'option',\n 'aria-selected': selected,\n tabIndex: open && highlighted ? 0 : -1,\n onKeyDown(event) {\n lastKeyRef.current = event.key;\n store.set('activeIndex', index);\n if (event.key === ' ' && typingRef.current) {\n event.preventDefault();\n }\n },\n onClick(event) {\n const isMouseClick = event.type === 'click' && pointerTypeRef.current !== 'touch';\n const clickPointerType = event.nativeEvent.pointerType;\n const isVirtualMouseClick = isMouseClick && isVirtualClick(event.nativeEvent) && (\n // Generic no-pointer `detail === 0` clicks stay tied to highlight state. Virtual\n // clicks that carry browser pointer data, including an empty string from assistive\n // technology, can activate unhighlighted items.\n clickPointerType !== undefined || highlighted);\n // With alignItemWithTrigger, opening can place an item under the cursor. Real mouse\n // clicks must start on the item, while virtual clicks represent explicit keyboard or\n // assistive technology activation.\n const isInvalidMouseClick = isMouseClick && !isVirtualMouseClick && !allowMouseSelectionRef.current;\n allowMouseSelectionRef.current = false;\n\n // Prevent double commit on {Enter}\n if (event.type === 'keydown' && lastKeyRef.current === null) {\n return;\n }\n if (disabled || event.type === 'keydown' && lastKeyRef.current === ' ' && typingRef.current || isInvalidMouseClick) {\n return;\n }\n lastKeyRef.current = null;\n commitSelection(event.nativeEvent);\n },\n onPointerEnter(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onPointerMove(event) {\n if (event.pointerType === 'mouse' && event.buttons === 1) {\n const selection = selectionRef.current;\n selection.dragY += event.movementY;\n if (selection.dragY ** 2 >= 64) {\n selection.allowUnselectedMouseUp = true;\n }\n }\n },\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n allowMouseSelectionRef.current = true;\n resetDragMovement();\n },\n onMouseUp() {\n resetDragMovement();\n if (disabled || pointerTypeRef.current === 'touch') {\n return;\n }\n\n // Regular clicks are committed by the click event.\n if (allowMouseSelectionRef.current) {\n return;\n }\n const disallowSelectedMouseUp = !selectionRef.current.allowSelectedMouseUp && selected;\n const disallowUnselectedMouseUp = !selectionRef.current.allowUnselectedMouseUp && !selected;\n if (disallowSelectedMouseUp || disallowUnselectedMouseUp) {\n return;\n }\n allowMouseSelectionRef.current = true;\n itemRef.current?.click();\n allowMouseSelectionRef.current = false;\n }\n };\n const element = useRenderElement('div', componentProps, {\n ref: [buttonRef, forwardedRef, listItem.ref, itemRef],\n state,\n props: [itemProps, defaultProps, elementProps, getButtonProps]\n });\n const contextValue = React.useMemo(() => ({\n selected,\n index,\n textRef,\n selectedByFocus,\n hasRegistered\n }), [selected, index, 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\";"],"names":["SelectItem","React","componentProps","forwardedRef","render","className","style","itemValue","label","disabled","nativeButton","elementProps","textRef","listItem","useCompositeListItem","IndexGuessBehavior","store","itemProps","setOpen","setValue","selectionRef","typingRef","valuesRef","multiple","selectedItemTextRef","selectDisabled","readOnly","useSelectRootContext","highlighted","useStore","selectors","open","selected","selectedByFocus","isItemEqualToValue","index","hasRegistered","itemRef","useIsoLayoutEffect","values","selectedValue","selectedCandidate","compareItemEquality","lastKeyRef","pointerTypeRef","allowMouseSelectionRef","getButtonProps","buttonRef","useButton","state","commitSelection","event","currentValue","nextValue","removeItem","createChangeEventDetails","REASONS.itemPress","resetDragMovement","defaultProps","isMouseClick","clickPointerType","isVirtualMouseClick","isVirtualClick","isInvalidMouseClick","selection","disallowSelectedMouseUp","disallowUnselectedMouseUp","element","useRenderElement","contextValue","_jsx","SelectItemContext"],"mappings":";;;;;;;;;;;;;;AAuBY,MAACA,KAA0B,gBAAAC,EAAM,KAAkB,gBAAAA,EAAM,WAAW,SAAoBC,GAAgBC,GAAc;AAChI,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAOC,IAAY;AAAA,IACnB,OAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,cAAAC,IAAe;AAAA,IACf,GAAGC;AAAA,EACP,IAAMT,GACEU,IAAUX,EAAM,OAAO,IAAI,GAC3BY,IAAWC,EAAqB;AAAA,IACpC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D,OAAAY;AAAA,IACA,OAAO,CAAChC,GAAWyC,GAAc/C,GAAcmC,CAAc;AAAA,EACjE,CAAG,GACKuB,IAAepE,EAAM,QAAQ,OAAO;AAAA,IACxC,UAAA+B;AAAA,IACA,OAAAG;AAAA,IACA,SAAAvB;AAAA,IACA,iBAAAqB;AAAA,IACA,eAAAG;AAAA,EACJ,IAAM,CAACJ,GAAUG,GAAOvB,GAASqB,GAAiBG,CAAa,CAAC;AAC9D,SAAoBkC,gBAAAA,GAAAA,IAAKC,GAAkB,UAAU;AAAA,IACnD,OAAOF;AAAA,IACP,UAAUF;AAAA,EACd,CAAG;AACH,CAAC,CAAC;AACE,QAAQ,IAAI,aAAa,iBAAcnE,GAAW,cAAc;","x_google_ignoreList":[0]}
package/dist/index53.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as m from "react";
2
- import { useIsoLayoutEffect as n } from "./index287.js";
3
- import { useBaseUiId as p } from "./index178.js";
4
- import { useSelectGroupContext as c } from "./index340.js";
5
- import { useRenderElement as i } from "./index172.js";
2
+ import { useIsoLayoutEffect as n } from "./index238.js";
3
+ import { useBaseUiId as p } from "./index308.js";
4
+ import { useSelectGroupContext as c } from "./index307.js";
5
+ import { useRenderElement as i } from "./index272.js";
6
6
  const a = /* @__PURE__ */ m.forwardRef(function(o, r) {
7
7
  const {
8
8
  render: u,
@@ -1 +1 @@
1
- {"version":3,"file":"index53.js","sources":["../node_modules/@base-ui/react/select/group-label/SelectGroupLabel.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useSelectGroupContext } from \"../group/SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\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 render,\n className,\n style,\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\";"],"names":["SelectGroupLabel","React","componentProps","forwardedRef","render","className","style","idProp","elementProps","setLabelId","useSelectGroupContext","id","useBaseUiId","useIsoLayoutEffect","useRenderElement"],"mappings":";;;;;AAcY,MAACA,IAAgC,gBAAAC,EAAM,WAAW,SAA0BC,GAAgBC,GAAc;AACpH,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,IAAIC;AAAA,IACJ,GAAGC;AAAA,EACP,IAAMN,GACE;AAAA,IACJ,YAAAO;AAAA,EACJ,IAAMC,EAAqB,GACnBC,IAAKC,EAAYL,CAAM;AAC7B,SAAAM,EAAmB,MAAM;AACvB,IAAAJ,EAAWE,CAAE;AAAA,EACf,GAAG,CAACA,GAAIF,CAAU,CAAC,GACHK,EAAiB,OAAOZ,GAAgB;AAAA,IACtD,KAAKC;AAAA,IACL,OAAO,CAAC;AAAA,MACN,IAAAQ;AAAA,IACN,GAAOH,CAAY;AAAA,EACnB,CAAG;AAEH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcR,EAAiB,cAAc;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index53.js","sources":["../../../node_modules/@base-ui/react/select/group-label/SelectGroupLabel.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useSelectGroupContext } from \"../group/SelectGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\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 render,\n className,\n style,\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\";"],"names":["SelectGroupLabel","React","componentProps","forwardedRef","render","className","style","idProp","elementProps","setLabelId","useSelectGroupContext","id","useBaseUiId","useIsoLayoutEffect","useRenderElement"],"mappings":";;;;;AAcY,MAACA,IAAgC,gBAAAC,EAAM,WAAW,SAA0BC,GAAgBC,GAAc;AACpH,QAAM;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,IAAIC;AAAA,IACJ,GAAGC;AAAA,EACP,IAAMN,GACE;AAAA,IACJ,YAAAO;AAAA,EACJ,IAAMC,EAAqB,GACnBC,IAAKC,EAAYL,CAAM;AAC7B,SAAAM,EAAmB,MAAM;AACvB,IAAAJ,EAAWE,CAAE;AAAA,EACf,GAAG,CAACA,GAAIF,CAAU,CAAC,GACHK,EAAiB,OAAOZ,GAAgB;AAAA,IACtD,KAAKC;AAAA,IACL,OAAO,CAAC;AAAA,MACN,IAAAQ;AAAA,IACN,GAAOH,CAAY;AAAA,EACnB,CAAG;AAEH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcR,EAAiB,cAAc;","x_google_ignoreList":[0]}
package/dist/index54.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as a from "react";
2
- import { useRenderElement as n } from "./index172.js";
2
+ import { useRenderElement as n } from "./index272.js";
3
3
  const s = /* @__PURE__ */ a.forwardRef(function(e, t) {
4
4
  const {
5
5
  className: p,
@@ -1 +1 @@
1
- {"version":3,"file":"index54.js","sources":["../node_modules/@base-ui/react/separator/Separator.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\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 style,\n ...elementProps\n } = componentProps;\n const state = {\n orientation\n };\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\";"],"names":["Separator","React","componentProps","forwardedRef","className","render","orientation","style","elementProps","useRenderElement"],"mappings":";;AAWY,MAACA,IAAyB,gBAAAC,EAAM,WAAW,SAA4BC,GAAgBC,GAAc;AAC/G,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,OAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAMN;AAYJ,SARgBO,EAAiB,OAAOP,GAAgB;AAAA,IACtD,OAJY;AAAA,MACZ,aAAAI;AAAA,IACJ;AAAA,IAGI,KAAKH;AAAA,IACL,OAAO,CAAC;AAAA,MACN,MAAM;AAAA,MACN,oBAAoBG;AAAA,IAC1B,GAAOE,CAAY;AAAA,EACnB,CAAG;AAEH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcR,EAAU,cAAc;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index54.js","sources":["../../../node_modules/@base-ui/react/separator/Separator.mjs"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\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 style,\n ...elementProps\n } = componentProps;\n const state = {\n orientation\n };\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\";"],"names":["Separator","React","componentProps","forwardedRef","className","render","orientation","style","elementProps","useRenderElement"],"mappings":";;AAWY,MAACA,IAAyB,gBAAAC,EAAM,WAAW,SAA4BC,GAAgBC,GAAc;AAC/G,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,OAAAC;AAAA,IACA,GAAGC;AAAA,EACP,IAAMN;AAYJ,SARgBO,EAAiB,OAAOP,GAAgB;AAAA,IACtD,OAJY;AAAA,MACZ,aAAAI;AAAA,IACJ;AAAA,IAGI,KAAKH;AAAA,IACL,OAAO,CAAC;AAAA,MACN,MAAM;AAAA,MACN,oBAAoBG;AAAA,IAC1B,GAAOE,CAAY;AAAA,EACnB,CAAG;AAEH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcR,EAAU,cAAc;","x_google_ignoreList":[0]}