@anoki/fse-ui 1.0.743 → 1.0.745

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 (393) hide show
  1. package/dist/index.cjs121.js +1 -1
  2. package/dist/index.cjs121.js.map +1 -1
  3. package/dist/index.cjs217.js +1 -1
  4. package/dist/index.cjs224.js +1 -1
  5. package/dist/index.cjs244.js +1 -1
  6. package/dist/index.cjs248.js +1 -1
  7. package/dist/index.cjs255.js +1 -1
  8. package/dist/index.cjs265.js +1 -1
  9. package/dist/index.cjs271.js +1 -1
  10. package/dist/index.cjs298.js +1 -1
  11. package/dist/index.cjs337.js +1 -1
  12. package/dist/index.cjs350.js +1 -1
  13. package/dist/index.cjs364.js +1 -1
  14. package/dist/index.cjs365.js +1 -1
  15. package/dist/index.cjs366.js +1 -1
  16. package/dist/index.cjs383.js +27 -1
  17. package/dist/index.cjs383.js.map +1 -1
  18. package/dist/index.cjs384.js +1 -2
  19. package/dist/index.cjs384.js.map +1 -1
  20. package/dist/index.cjs386.js +1 -1
  21. package/dist/index.cjs386.js.map +1 -1
  22. package/dist/index.cjs387.js +1 -1
  23. package/dist/index.cjs387.js.map +1 -1
  24. package/dist/index.cjs388.js +2 -0
  25. package/dist/index.cjs388.js.map +1 -0
  26. package/dist/index.cjs389.js +2 -0
  27. package/dist/index.cjs389.js.map +1 -0
  28. package/dist/index.cjs390.js +2 -0
  29. package/dist/index.cjs390.js.map +1 -0
  30. package/dist/index.cjs391.js +1 -1
  31. package/dist/index.cjs391.js.map +1 -1
  32. package/dist/index.cjs392.js +1 -1
  33. package/dist/index.cjs392.js.map +1 -1
  34. package/dist/index.cjs393.js +1 -1
  35. package/dist/index.cjs393.js.map +1 -1
  36. package/dist/index.cjs394.js +1 -1
  37. package/dist/index.cjs394.js.map +1 -1
  38. package/dist/index.cjs396.js +1 -1
  39. package/dist/index.cjs396.js.map +1 -1
  40. package/dist/index.cjs397.js +1 -1
  41. package/dist/index.cjs397.js.map +1 -1
  42. package/dist/index.cjs398.js +1 -1
  43. package/dist/index.cjs398.js.map +1 -1
  44. package/dist/index.cjs399.js +1 -1
  45. package/dist/index.cjs408.js +1 -1
  46. package/dist/index.cjs408.js.map +1 -1
  47. package/dist/index.cjs409.js +1 -1
  48. package/dist/index.cjs409.js.map +1 -1
  49. package/dist/index.cjs410.js +1 -1
  50. package/dist/index.cjs410.js.map +1 -1
  51. package/dist/index.cjs411.js +1 -1
  52. package/dist/index.cjs411.js.map +1 -1
  53. package/dist/index.cjs412.js +2 -1
  54. package/dist/index.cjs412.js.map +1 -1
  55. package/dist/index.cjs413.js +1 -1
  56. package/dist/index.cjs413.js.map +1 -1
  57. package/dist/index.cjs414.js +1 -1
  58. package/dist/index.cjs414.js.map +1 -1
  59. package/dist/index.cjs415.js +1 -1
  60. package/dist/index.cjs415.js.map +1 -1
  61. package/dist/index.cjs416.js +1 -1
  62. package/dist/index.cjs416.js.map +1 -1
  63. package/dist/index.cjs417.js +1 -1
  64. package/dist/index.cjs417.js.map +1 -1
  65. package/dist/index.cjs418.js +1 -1
  66. package/dist/index.cjs418.js.map +1 -1
  67. package/dist/index.cjs419.js +1 -1
  68. package/dist/index.cjs419.js.map +1 -1
  69. package/dist/index.cjs420.js +1 -1
  70. package/dist/index.cjs420.js.map +1 -1
  71. package/dist/index.cjs423.js +2 -0
  72. package/dist/index.cjs423.js.map +1 -0
  73. package/dist/index.cjs424.js +2 -0
  74. package/dist/index.cjs424.js.map +1 -0
  75. package/dist/index.cjs425.js +2 -0
  76. package/dist/index.cjs425.js.map +1 -0
  77. package/dist/index.cjs426.js +5 -0
  78. package/dist/index.cjs426.js.map +1 -0
  79. package/dist/index.cjs427.js +1 -1
  80. package/dist/index.cjs427.js.map +1 -1
  81. package/dist/index.cjs428.js +1 -1
  82. package/dist/index.cjs428.js.map +1 -1
  83. package/dist/index.cjs429.js +1 -1
  84. package/dist/index.cjs429.js.map +1 -1
  85. package/dist/index.cjs430.js +1 -4
  86. package/dist/index.cjs430.js.map +1 -1
  87. package/dist/index.cjs431.js +1 -1
  88. package/dist/index.cjs431.js.map +1 -1
  89. package/dist/index.cjs432.js +38 -1
  90. package/dist/index.cjs432.js.map +1 -1
  91. package/dist/index.cjs433.js +1 -1
  92. package/dist/index.cjs433.js.map +1 -1
  93. package/dist/index.cjs434.js +1 -1
  94. package/dist/index.cjs434.js.map +1 -1
  95. package/dist/index.cjs435.js +2 -0
  96. package/dist/index.cjs435.js.map +1 -0
  97. package/dist/{index.cjs444.js → index.cjs436.js} +2 -2
  98. package/dist/{index.cjs444.js.map → index.cjs436.js.map} +1 -1
  99. package/dist/index.cjs437.js +2 -0
  100. package/dist/index.cjs437.js.map +1 -0
  101. package/dist/index.cjs438.js +2 -0
  102. package/dist/index.cjs438.js.map +1 -0
  103. package/dist/index.cjs439.js +2 -0
  104. package/dist/index.cjs439.js.map +1 -0
  105. package/dist/index.cjs440.js +2 -0
  106. package/dist/index.cjs440.js.map +1 -0
  107. package/dist/index.cjs441.js +2 -0
  108. package/dist/index.cjs441.js.map +1 -0
  109. package/dist/index.cjs446.js +1 -1
  110. package/dist/index.cjs446.js.map +1 -1
  111. package/dist/index.cjs447.js +1 -1
  112. package/dist/index.cjs447.js.map +1 -1
  113. package/dist/index.cjs448.js +1 -1
  114. package/dist/index.cjs448.js.map +1 -1
  115. package/dist/{index.cjs455.js → index.cjs449.js} +1 -1
  116. package/dist/{index.cjs455.js.map → index.cjs449.js.map} +1 -1
  117. package/dist/index.cjs450.js +1 -1
  118. package/dist/index.cjs450.js.map +1 -1
  119. package/dist/index.cjs451.js +1 -1
  120. package/dist/index.cjs451.js.map +1 -1
  121. package/dist/index.cjs452.js +1 -1
  122. package/dist/index.cjs452.js.map +1 -1
  123. package/dist/index.cjs458.js +1 -1
  124. package/dist/index.cjs458.js.map +1 -1
  125. package/dist/index.cjs459.js +1 -1
  126. package/dist/index.cjs459.js.map +1 -1
  127. package/dist/index.cjs460.js +1 -1
  128. package/dist/index.cjs460.js.map +1 -1
  129. package/dist/index.cjs461.js +1 -1
  130. package/dist/index.cjs461.js.map +1 -1
  131. package/dist/index.cjs462.js +1 -1
  132. package/dist/index.cjs462.js.map +1 -1
  133. package/dist/index.cjs463.js +1 -1
  134. package/dist/index.cjs463.js.map +1 -1
  135. package/dist/index.cjs464.js +1 -1
  136. package/dist/index.cjs464.js.map +1 -1
  137. package/dist/index.cjs465.js +1 -1
  138. package/dist/index.cjs465.js.map +1 -1
  139. package/dist/index.cjs466.js +1 -1
  140. package/dist/index.cjs466.js.map +1 -1
  141. package/dist/index.cjs467.js +1 -1
  142. package/dist/index.cjs467.js.map +1 -1
  143. package/dist/index.cjs468.js +1 -1
  144. package/dist/index.cjs468.js.map +1 -1
  145. package/dist/index.cjs469.js +5 -1
  146. package/dist/index.cjs469.js.map +1 -1
  147. package/dist/index.cjs470.js +1 -1
  148. package/dist/index.cjs470.js.map +1 -1
  149. package/dist/index.cjs471.js +1 -1
  150. package/dist/index.cjs471.js.map +1 -1
  151. package/dist/index.cjs472.js +1 -1
  152. package/dist/index.cjs472.js.map +1 -1
  153. package/dist/index.cjs473.js +1 -5
  154. package/dist/index.cjs473.js.map +1 -1
  155. package/dist/index.cjs474.js +1 -1
  156. package/dist/index.cjs474.js.map +1 -1
  157. package/dist/index.cjs475.js +1 -1
  158. package/dist/index.cjs475.js.map +1 -1
  159. package/dist/index.cjs476.js +1 -1
  160. package/dist/index.cjs476.js.map +1 -1
  161. package/dist/index.cjs477.js +1 -1
  162. package/dist/index.cjs477.js.map +1 -1
  163. package/dist/index.cjs478.js +1 -1
  164. package/dist/index.cjs478.js.map +1 -1
  165. package/dist/index.cjs479.js +1 -1
  166. package/dist/index.cjs479.js.map +1 -1
  167. package/dist/index.cjs480.js +1 -1
  168. package/dist/index.cjs480.js.map +1 -1
  169. package/dist/index.cjs481.js +1 -1
  170. package/dist/index.cjs481.js.map +1 -1
  171. package/dist/index.es121.js +14 -14
  172. package/dist/index.es121.js.map +1 -1
  173. package/dist/index.es217.js +1 -1
  174. package/dist/index.es224.js +1 -1
  175. package/dist/index.es244.js +6 -6
  176. package/dist/index.es248.js +1 -1
  177. package/dist/index.es255.js +7 -7
  178. package/dist/index.es265.js +1 -1
  179. package/dist/index.es271.js +12 -12
  180. package/dist/index.es298.js +6 -6
  181. package/dist/index.es337.js +3 -3
  182. package/dist/index.es350.js +8 -8
  183. package/dist/index.es364.js +3 -3
  184. package/dist/index.es365.js +2 -2
  185. package/dist/index.es366.js +3 -3
  186. package/dist/index.es383.js +3674 -5
  187. package/dist/index.es383.js.map +1 -1
  188. package/dist/index.es384.js +2 -521
  189. package/dist/index.es384.js.map +1 -1
  190. package/dist/index.es386.js +7 -2
  191. package/dist/index.es386.js.map +1 -1
  192. package/dist/index.es387.js +27 -15
  193. package/dist/index.es387.js.map +1 -1
  194. package/dist/index.es388.js +71 -0
  195. package/dist/index.es388.js.map +1 -0
  196. package/dist/index.es389.js +14 -0
  197. package/dist/index.es389.js.map +1 -0
  198. package/dist/index.es390.js +33 -0
  199. package/dist/index.es390.js.map +1 -0
  200. package/dist/index.es391.js +123 -5
  201. package/dist/index.es391.js.map +1 -1
  202. package/dist/index.es392.js +130 -22
  203. package/dist/index.es392.js.map +1 -1
  204. package/dist/index.es393.js +14 -68
  205. package/dist/index.es393.js.map +1 -1
  206. package/dist/index.es394.js +66 -27
  207. package/dist/index.es394.js.map +1 -1
  208. package/dist/index.es396.js +11 -618
  209. package/dist/index.es396.js.map +1 -1
  210. package/dist/index.es397.js +9 -11
  211. package/dist/index.es397.js.map +1 -1
  212. package/dist/index.es398.js +50 -11
  213. package/dist/index.es398.js.map +1 -1
  214. package/dist/index.es399.js +1 -1
  215. package/dist/index.es408.js +3 -177
  216. package/dist/index.es408.js.map +1 -1
  217. package/dist/index.es409.js +11 -50
  218. package/dist/index.es409.js.map +1 -1
  219. package/dist/index.es410.js +11 -8
  220. package/dist/index.es410.js.map +1 -1
  221. package/dist/index.es411.js +6 -4
  222. package/dist/index.es411.js.map +1 -1
  223. package/dist/index.es412.js +520 -5
  224. package/dist/index.es412.js.map +1 -1
  225. package/dist/index.es413.js +14 -24
  226. package/dist/index.es413.js.map +1 -1
  227. package/dist/index.es414.js +5 -11
  228. package/dist/index.es414.js.map +1 -1
  229. package/dist/index.es415.js +24 -204
  230. package/dist/index.es415.js.map +1 -1
  231. package/dist/index.es416.js +24 -21
  232. package/dist/index.es416.js.map +1 -1
  233. package/dist/index.es417.js +27 -391
  234. package/dist/index.es417.js.map +1 -1
  235. package/dist/index.es418.js +5 -25
  236. package/dist/index.es418.js.map +1 -1
  237. package/dist/index.es419.js +620 -27
  238. package/dist/index.es419.js.map +1 -1
  239. package/dist/index.es420.js +15 -5
  240. package/dist/index.es420.js.map +1 -1
  241. package/dist/index.es423.js +8 -0
  242. package/dist/index.es423.js.map +1 -0
  243. package/dist/index.es424.js +6 -0
  244. package/dist/index.es424.js.map +1 -0
  245. package/dist/index.es425.js +27 -0
  246. package/dist/index.es425.js.map +1 -0
  247. package/dist/index.es426.js +113 -0
  248. package/dist/index.es426.js.map +1 -0
  249. package/dist/index.es427.js +16 -5
  250. package/dist/index.es427.js.map +1 -1
  251. package/dist/index.es428.js +46 -3
  252. package/dist/index.es428.js.map +1 -1
  253. package/dist/index.es429.js +7 -23
  254. package/dist/index.es429.js.map +1 -1
  255. package/dist/index.es430.js +213 -105
  256. package/dist/index.es430.js.map +1 -1
  257. package/dist/index.es431.js +176 -14
  258. package/dist/index.es431.js.map +1 -1
  259. package/dist/index.es432.js +64 -518
  260. package/dist/index.es432.js.map +1 -1
  261. package/dist/index.es433.js +8 -126
  262. package/dist/index.es433.js.map +1 -1
  263. package/dist/index.es434.js +13 -128
  264. package/dist/index.es434.js.map +1 -1
  265. package/dist/index.es435.js +65 -0
  266. package/dist/index.es435.js.map +1 -0
  267. package/dist/{index.es444.js → index.es436.js} +2 -2
  268. package/dist/{index.es444.js.map → index.es436.js.map} +1 -1
  269. package/dist/index.es437.js +208 -0
  270. package/dist/index.es437.js.map +1 -0
  271. package/dist/index.es438.js +25 -0
  272. package/dist/index.es438.js.map +1 -0
  273. package/dist/index.es439.js +396 -0
  274. package/dist/index.es439.js.map +1 -0
  275. package/dist/index.es440.js +7 -0
  276. package/dist/index.es440.js.map +1 -0
  277. package/dist/index.es441.js +26 -0
  278. package/dist/index.es441.js.map +1 -0
  279. package/dist/index.es446.js +21 -7
  280. package/dist/index.es446.js.map +1 -1
  281. package/dist/index.es447.js +13 -14
  282. package/dist/index.es447.js.map +1 -1
  283. package/dist/index.es448.js +26 -60
  284. package/dist/index.es448.js.map +1 -1
  285. package/dist/{index.es455.js → index.es449.js} +1 -1
  286. package/dist/{index.es455.js.map → index.es449.js.map} +1 -1
  287. package/dist/index.es450.js +522 -3
  288. package/dist/index.es450.js.map +1 -1
  289. package/dist/index.es451.js +126 -22
  290. package/dist/index.es451.js.map +1 -1
  291. package/dist/index.es452.js +128 -22
  292. package/dist/index.es452.js.map +1 -1
  293. package/dist/index.es458.js +5 -2032
  294. package/dist/index.es458.js.map +1 -1
  295. package/dist/index.es459.js +4 -60
  296. package/dist/index.es459.js.map +1 -1
  297. package/dist/index.es460.js +4 -188
  298. package/dist/index.es460.js.map +1 -1
  299. package/dist/index.es461.js +10 -5
  300. package/dist/index.es461.js.map +1 -1
  301. package/dist/index.es462.js +56 -4
  302. package/dist/index.es462.js.map +1 -1
  303. package/dist/index.es463.js +7 -4
  304. package/dist/index.es463.js.map +1 -1
  305. package/dist/index.es464.js +5 -9
  306. package/dist/index.es464.js.map +1 -1
  307. package/dist/index.es465.js +524 -47
  308. package/dist/index.es465.js.map +1 -1
  309. package/dist/index.es466.js +2031 -7
  310. package/dist/index.es466.js.map +1 -1
  311. package/dist/index.es467.js +59 -5
  312. package/dist/index.es467.js.map +1 -1
  313. package/dist/index.es468.js +180 -524
  314. package/dist/index.es468.js.map +1 -1
  315. package/dist/index.es469.js +39 -9
  316. package/dist/index.es469.js.map +1 -1
  317. package/dist/index.es470.js +2 -178
  318. package/dist/index.es470.js.map +1 -1
  319. package/dist/index.es471.js +2 -4
  320. package/dist/index.es471.js.map +1 -1
  321. package/dist/index.es472.js +2 -135
  322. package/dist/index.es472.js.map +1 -1
  323. package/dist/index.es473.js +2 -40
  324. package/dist/index.es473.js.map +1 -1
  325. package/dist/index.es474.js +3 -2
  326. package/dist/index.es474.js.map +1 -1
  327. package/dist/index.es475.js +2 -2
  328. package/dist/index.es475.js.map +1 -1
  329. package/dist/index.es476.js +6 -2
  330. package/dist/index.es476.js.map +1 -1
  331. package/dist/index.es477.js +5 -2
  332. package/dist/index.es477.js.map +1 -1
  333. package/dist/index.es478.js +10 -3
  334. package/dist/index.es478.js.map +1 -1
  335. package/dist/index.es479.js +178 -2
  336. package/dist/index.es479.js.map +1 -1
  337. package/dist/index.es480.js +3 -3
  338. package/dist/index.es480.js.map +1 -1
  339. package/dist/index.es481.js +132 -4
  340. package/dist/index.es481.js.map +1 -1
  341. package/package.json +1 -1
  342. package/dist/index.cjs385.js +0 -28
  343. package/dist/index.cjs385.js.map +0 -1
  344. package/dist/index.cjs400.js +0 -2
  345. package/dist/index.cjs400.js.map +0 -1
  346. package/dist/index.cjs401.js +0 -2
  347. package/dist/index.cjs401.js.map +0 -1
  348. package/dist/index.cjs402.js +0 -2
  349. package/dist/index.cjs402.js.map +0 -1
  350. package/dist/index.cjs403.js +0 -2
  351. package/dist/index.cjs403.js.map +0 -1
  352. package/dist/index.cjs404.js +0 -2
  353. package/dist/index.cjs404.js.map +0 -1
  354. package/dist/index.cjs405.js +0 -2
  355. package/dist/index.cjs405.js.map +0 -1
  356. package/dist/index.cjs406.js +0 -2
  357. package/dist/index.cjs406.js.map +0 -1
  358. package/dist/index.cjs407.js +0 -2
  359. package/dist/index.cjs407.js.map +0 -1
  360. package/dist/index.cjs421.js +0 -2
  361. package/dist/index.cjs421.js.map +0 -1
  362. package/dist/index.cjs445.js +0 -39
  363. package/dist/index.cjs445.js.map +0 -1
  364. package/dist/index.cjs453.js +0 -2
  365. package/dist/index.cjs453.js.map +0 -1
  366. package/dist/index.cjs454.js +0 -2
  367. package/dist/index.cjs454.js.map +0 -1
  368. package/dist/index.es385.js +0 -3678
  369. package/dist/index.es385.js.map +0 -1
  370. package/dist/index.es400.js +0 -49
  371. package/dist/index.es400.js.map +0 -1
  372. package/dist/index.es401.js +0 -11
  373. package/dist/index.es401.js.map +0 -1
  374. package/dist/index.es402.js +0 -128
  375. package/dist/index.es402.js.map +0 -1
  376. package/dist/index.es403.js +0 -18
  377. package/dist/index.es403.js.map +0 -1
  378. package/dist/index.es404.js +0 -138
  379. package/dist/index.es404.js.map +0 -1
  380. package/dist/index.es405.js +0 -221
  381. package/dist/index.es405.js.map +0 -1
  382. package/dist/index.es406.js +0 -17
  383. package/dist/index.es406.js.map +0 -1
  384. package/dist/index.es407.js +0 -72
  385. package/dist/index.es407.js.map +0 -1
  386. package/dist/index.es421.js +0 -18
  387. package/dist/index.es421.js.map +0 -1
  388. package/dist/index.es445.js +0 -72
  389. package/dist/index.es445.js.map +0 -1
  390. package/dist/index.es453.js +0 -16
  391. package/dist/index.es453.js.map +0 -1
  392. package/dist/index.es454.js +0 -31
  393. package/dist/index.es454.js.map +0 -1
@@ -1,221 +0,0 @@
1
- import * as s from "react";
2
- import { useFloating as xe, offset as Pe, shift as ye, flip as Ae, size as ve, arrow as Ce, hide as be, limitShift as Se } from "./index.es415.js";
3
- import { Root as Oe } from "./index.es416.js";
4
- import { useComposedRefs as T } from "./index.es392.js";
5
- import { createContextScope as Re } from "./index.es393.js";
6
- import { Primitive as z } from "./index.es395.js";
7
- import { useCallbackRef as Ee } from "./index.es398.js";
8
- import { useLayoutEffect as B } from "./index.es411.js";
9
- import { useSize as Ne } from "./index.es413.js";
10
- import { j as f } from "./index.es212.js";
11
- import { autoUpdate as _e } from "./index.es417.js";
12
- var N = "Popper", [L, Ue] = Re(N), [$e, Z] = L(N), U = (e) => {
13
- const { __scopePopper: i, children: n } = e, [t, a] = s.useState(null);
14
- return /* @__PURE__ */ f.jsx($e, { scope: i, anchor: t, onAnchorChange: a, children: n });
15
- };
16
- U.displayName = N;
17
- var q = "PopperAnchor", G = s.forwardRef(
18
- (e, i) => {
19
- const { __scopePopper: n, virtualRef: t, ...a } = e, r = Z(q, n), o = s.useRef(null), w = T(i, o);
20
- return s.useEffect(() => {
21
- r.onAnchorChange((t == null ? void 0 : t.current) || o.current);
22
- }), t ? null : /* @__PURE__ */ f.jsx(z.div, { ...a, ref: w });
23
- }
24
- );
25
- G.displayName = q;
26
- var _ = "PopperContent", [je, He] = L(_), J = s.forwardRef(
27
- (e, i) => {
28
- var I, Y, M, X, D, F;
29
- const {
30
- __scopePopper: n,
31
- side: t = "bottom",
32
- sideOffset: a = 0,
33
- align: r = "center",
34
- alignOffset: o = 0,
35
- arrowPadding: w = 0,
36
- avoidCollisions: p = !0,
37
- collisionBoundary: c = [],
38
- collisionPadding: x = 0,
39
- sticky: m = "partial",
40
- hideWhenDetached: y = !1,
41
- updatePositionStrategy: A = "optimized",
42
- onPlaced: l,
43
- ...d
44
- } = e, v = Z(_, n), [h, C] = s.useState(null), ee = T(i, (P) => C(P)), [E, te] = s.useState(null), g = Ne(E), re = (g == null ? void 0 : g.width) ?? 0, $ = (g == null ? void 0 : g.height) ?? 0, oe = t + (r !== "center" ? "-" + r : ""), ne = typeof x == "number" ? x : { top: 0, right: 0, bottom: 0, left: 0, ...x }, j = Array.isArray(c) ? c : [c], ae = j.length > 0, b = {
45
- padding: ne,
46
- boundary: j.filter(Ie),
47
- // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
48
- altBoundary: ae
49
- }, { refs: ie, floatingStyles: H, placement: se, isPositioned: S, middlewareData: u } = xe({
50
- // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
51
- strategy: "fixed",
52
- placement: oe,
53
- whileElementsMounted: (...P) => _e(...P, {
54
- animationFrame: A === "always"
55
- }),
56
- elements: {
57
- reference: v.anchor
58
- },
59
- middleware: [
60
- Pe({ mainAxis: a + $, alignmentAxis: o }),
61
- p && ye({
62
- mainAxis: !0,
63
- crossAxis: !1,
64
- limiter: m === "partial" ? Se() : void 0,
65
- ...b
66
- }),
67
- p && Ae({ ...b }),
68
- ve({
69
- ...b,
70
- apply: ({ elements: P, rects: k, availableWidth: he, availableHeight: ge }) => {
71
- const { width: ue, height: we } = k.reference, R = P.floating.style;
72
- R.setProperty("--radix-popper-available-width", `${he}px`), R.setProperty("--radix-popper-available-height", `${ge}px`), R.setProperty("--radix-popper-anchor-width", `${ue}px`), R.setProperty("--radix-popper-anchor-height", `${we}px`);
73
- }
74
- }),
75
- E && Ce({ element: E, padding: w }),
76
- Ye({ arrowWidth: re, arrowHeight: $ }),
77
- y && be({ strategy: "referenceHidden", ...b })
78
- ]
79
- }), [W, pe] = V(se), O = Ee(l);
80
- B(() => {
81
- S && (O == null || O());
82
- }, [S, O]);
83
- const ce = (I = u.arrow) == null ? void 0 : I.x, de = (Y = u.arrow) == null ? void 0 : Y.y, le = ((M = u.arrow) == null ? void 0 : M.centerOffset) !== 0, [fe, me] = s.useState();
84
- return B(() => {
85
- h && me(window.getComputedStyle(h).zIndex);
86
- }, [h]), /* @__PURE__ */ f.jsx(
87
- "div",
88
- {
89
- ref: ie.setFloating,
90
- "data-radix-popper-content-wrapper": "",
91
- style: {
92
- ...H,
93
- transform: S ? H.transform : "translate(0, -200%)",
94
- // keep off the page when measuring
95
- minWidth: "max-content",
96
- zIndex: fe,
97
- "--radix-popper-transform-origin": [
98
- (X = u.transformOrigin) == null ? void 0 : X.x,
99
- (D = u.transformOrigin) == null ? void 0 : D.y
100
- ].join(" "),
101
- // hide the content if using the hide middleware and should be hidden
102
- // set visibility to hidden and disable pointer events so the UI behaves
103
- // as if the PopperContent isn't there at all
104
- ...((F = u.hide) == null ? void 0 : F.referenceHidden) && {
105
- visibility: "hidden",
106
- pointerEvents: "none"
107
- }
108
- },
109
- dir: e.dir,
110
- children: /* @__PURE__ */ f.jsx(
111
- je,
112
- {
113
- scope: n,
114
- placedSide: W,
115
- onArrowChange: te,
116
- arrowX: ce,
117
- arrowY: de,
118
- shouldHideArrow: le,
119
- children: /* @__PURE__ */ f.jsx(
120
- z.div,
121
- {
122
- "data-side": W,
123
- "data-align": pe,
124
- ...d,
125
- ref: ee,
126
- style: {
127
- ...d.style,
128
- // if the PopperContent hasn't been placed yet (not all measurements done)
129
- // we prevent animations so that users's animation don't kick in too early referring wrong sides
130
- animation: S ? void 0 : "none"
131
- }
132
- }
133
- )
134
- }
135
- )
136
- }
137
- );
138
- }
139
- );
140
- J.displayName = _;
141
- var K = "PopperArrow", We = {
142
- top: "bottom",
143
- right: "left",
144
- bottom: "top",
145
- left: "right"
146
- }, Q = s.forwardRef(function(i, n) {
147
- const { __scopePopper: t, ...a } = i, r = He(K, t), o = We[r.placedSide];
148
- return (
149
- // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
150
- // doesn't report size as we'd expect on SVG elements.
151
- // it reports their bounding box which is effectively the largest path inside the SVG.
152
- /* @__PURE__ */ f.jsx(
153
- "span",
154
- {
155
- ref: r.onArrowChange,
156
- style: {
157
- position: "absolute",
158
- left: r.arrowX,
159
- top: r.arrowY,
160
- [o]: 0,
161
- transformOrigin: {
162
- top: "",
163
- right: "0 0",
164
- bottom: "center 0",
165
- left: "100% 0"
166
- }[r.placedSide],
167
- transform: {
168
- top: "translateY(100%)",
169
- right: "translateY(50%) rotate(90deg) translateX(-50%)",
170
- bottom: "rotate(180deg)",
171
- left: "translateY(50%) rotate(-90deg) translateX(50%)"
172
- }[r.placedSide],
173
- visibility: r.shouldHideArrow ? "hidden" : void 0
174
- },
175
- children: /* @__PURE__ */ f.jsx(
176
- Oe,
177
- {
178
- ...a,
179
- ref: n,
180
- style: {
181
- ...a.style,
182
- // ensures the element can be measured correctly (mostly for if SVG)
183
- display: "block"
184
- }
185
- }
186
- )
187
- }
188
- )
189
- );
190
- });
191
- Q.displayName = K;
192
- function Ie(e) {
193
- return e !== null;
194
- }
195
- var Ye = (e) => ({
196
- name: "transformOrigin",
197
- options: e,
198
- fn(i) {
199
- var v, h, C;
200
- const { placement: n, rects: t, middlewareData: a } = i, o = ((v = a.arrow) == null ? void 0 : v.centerOffset) !== 0, w = o ? 0 : e.arrowWidth, p = o ? 0 : e.arrowHeight, [c, x] = V(n), m = { start: "0%", center: "50%", end: "100%" }[x], y = (((h = a.arrow) == null ? void 0 : h.x) ?? 0) + w / 2, A = (((C = a.arrow) == null ? void 0 : C.y) ?? 0) + p / 2;
201
- let l = "", d = "";
202
- return c === "bottom" ? (l = o ? m : `${y}px`, d = `${-p}px`) : c === "top" ? (l = o ? m : `${y}px`, d = `${t.floating.height + p}px`) : c === "right" ? (l = `${-p}px`, d = o ? m : `${A}px`) : c === "left" && (l = `${t.floating.width + p}px`, d = o ? m : `${A}px`), { data: { x: l, y: d } };
203
- }
204
- });
205
- function V(e) {
206
- const [i, n = "center"] = e.split("-");
207
- return [i, n];
208
- }
209
- var qe = U, Ge = G, Je = J, Ke = Q;
210
- export {
211
- Ge as Anchor,
212
- Ke as Arrow,
213
- Je as Content,
214
- U as Popper,
215
- G as PopperAnchor,
216
- Q as PopperArrow,
217
- J as PopperContent,
218
- qe as Root,
219
- Ue as createPopperScope
220
- };
221
- //# sourceMappingURL=index.es405.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es405.js","sources":["../node_modules/@radix-ui/react-popper/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/popper/src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n context.onAnchorChange(virtualRef?.current || ref.current);\n });\n return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n [\"--radix-popper-transform-origin\"]: [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["POPPER_NAME","createPopperContext","createPopperScope","createContextScope","PopperProvider","usePopperContext","Popper","props","__scopePopper","children","anchor","setAnchor","React","jsx","ANCHOR_NAME","PopperAnchor","forwardedRef","virtualRef","anchorProps","context","ref","composedRefs","useComposedRefs","Primitive","CONTENT_NAME","PopperContentProvider","useContentContext","PopperContent","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPaddingProp","sticky","hideWhenDetached","updatePositionStrategy","onPlaced","contentProps","content","setContent","node","arrow","setArrow","arrowSize","useSize","arrowWidth","arrowHeight","desiredPlacement","collisionPadding","boundary","hasExplicitBoundaries","detectOverflowOptions","isNotNull","refs","floatingStyles","placement","isPositioned","middlewareData","useFloating","args","autoUpdate","offset","shift","limitShift","flip","size","elements","rects","availableWidth","availableHeight","anchorWidth","anchorHeight","contentStyle","floatingUIarrow","transformOrigin","hide","placedSide","placedAlign","getSideAndAlignFromPlacement","handlePlaced","useCallbackRef","useLayoutEffect","arrowX","_a","arrowY","_b","cannotCenterArrow","_c","contentZIndex","setContentZIndex","_d","_e","_f","ARROW_NAME","OPPOSITE_SIDE","PopperArrow","arrowProps","contentContext","baseSide","ArrowPrimitive.Root","value","options","data","isArrowHidden","noArrowAlign","arrowXCenter","arrowYCenter","x","y","Root2","Anchor","Content","Arrow"],"mappings":";;;;;;;;;;;AAyBA,IAAIA,IAAc,UACd,CAACC,GAAqBC,EAAiB,IAAIC,GAAmBH,CAAW,GACzE,CAACI,IAAgBC,CAAgB,IAAIJ,EAAoBD,CAAW,GACpEM,IAAS,CAACC,MAAU;AACtB,QAAM,EAAE,eAAAC,GAAe,UAAAC,EAAQ,IAAKF,GAC9B,CAACG,GAAQC,CAAS,IAAIC,EAAM,SAAS,IAAI;AAC/C,SAAuBC,gBAAAA,EAAG,IAACT,IAAgB,EAAE,OAAOI,GAAe,QAAAE,GAAQ,gBAAgBC,GAAW,UAAAF,GAAU;AAClH;AACAH,EAAO,cAAcN;AACrB,IAAIc,IAAc,gBACdC,IAAeH,EAAM;AAAA,EACvB,CAACL,GAAOS,MAAiB;AACvB,UAAM,EAAE,eAAAR,GAAe,YAAAS,GAAY,GAAGC,EAAa,IAAGX,GAChDY,IAAUd,EAAiBS,GAAaN,CAAa,GACrDY,IAAMR,EAAM,OAAO,IAAI,GACvBS,IAAeC,EAAgBN,GAAcI,CAAG;AACtD,WAAAR,EAAM,UAAU,MAAM;AACpB,MAAAO,EAAQ,gBAAeF,KAAA,gBAAAA,EAAY,YAAWG,EAAI,OAAO;AAAA,IAC/D,CAAK,GACMH,IAAa,OAAuBJ,gBAAAA,EAAAA,IAAIU,EAAU,KAAK,EAAE,GAAGL,GAAa,KAAKG,GAAc;AAAA,EACvG;AACA;AACAN,EAAa,cAAcD;AAC3B,IAAIU,IAAe,iBACf,CAACC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C,EAAC,EAAI;AAAA,EAC7B;AACA;AACA,SAAS9B,EAA6BvB,GAAW;AAC/C,QAAM,CAAC9B,GAAME,IAAQ,QAAQ,IAAI4B,EAAU,MAAM,GAAG;AACpD,SAAO,CAAC9B,GAAME,CAAK;AACrB;AACG,IAACkF,KAAQ1G,GACR2G,KAASlG,GACTmG,KAAUvF,GACVwF,KAAQjB;","x_google_ignoreList":[0]}
@@ -1,17 +0,0 @@
1
- import * as r from "react";
2
- import f from "react-dom";
3
- import { Primitive as u } from "./index.es395.js";
4
- import { useLayoutEffect as c } from "./index.es411.js";
5
- import { j as l } from "./index.es212.js";
6
- var p = "Portal", d = r.forwardRef((e, a) => {
7
- var o;
8
- const { container: s, ...i } = e, [m, n] = r.useState(!1);
9
- c(() => n(!0), []);
10
- const t = s || m && ((o = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : o.body);
11
- return t ? f.createPortal(/* @__PURE__ */ l.jsx(u.div, { ...i, ref: a }), t) : null;
12
- });
13
- d.displayName = p;
14
- export {
15
- d as Portal
16
- };
17
- //# sourceMappingURL=index.es406.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es406.js","sources":["../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/portal/src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["PORTAL_NAME","Portal","React","props","forwardedRef","containerProp","portalProps","mounted","setMounted","useLayoutEffect","container","_a","ReactDOM","jsx","Primitive"],"mappings":";;;;;AAQA,IAAIA,IAAc,UACdC,IAASC,EAAM,WAAW,CAACC,GAAOC,MAAiB;;AACrD,QAAM,EAAE,WAAWC,GAAe,GAAGC,EAAa,IAAGH,GAC/C,CAACI,GAASC,CAAU,IAAIN,EAAM,SAAS,EAAK;AAClDO,EAAAA,EAAgB,MAAMD,EAAW,EAAI,GAAG,CAAA,CAAE;AAC1C,QAAME,IAAYL,KAAiBE,OAAWI,IAAA,yCAAY,aAAZ,gBAAAA,EAAsB;AACpE,SAAOD,IAAYE,EAAS,aAA6BC,gBAAAA,EAAG,IAACC,EAAU,KAAK,EAAE,GAAGR,GAAa,KAAKF,EAAc,CAAA,GAAGM,CAAS,IAAI;AACnI,CAAC;AACDT,EAAO,cAAcD;","x_google_ignoreList":[0]}
@@ -1,72 +0,0 @@
1
- import * as a from "react";
2
- import { useComposedRefs as E } from "./index.es392.js";
3
- import { useLayoutEffect as A } from "./index.es411.js";
4
- function T(n, e) {
5
- return a.useReducer((r, t) => e[r][t] ?? r, n);
6
- }
7
- var R = (n) => {
8
- const { present: e, children: r } = n, t = v(e), i = typeof r == "function" ? r({ present: t.isPresent }) : a.Children.only(r), c = E(t.ref, P(i));
9
- return typeof r == "function" || t.isPresent ? a.cloneElement(i, { ref: c }) : null;
10
- };
11
- R.displayName = "Presence";
12
- function v(n) {
13
- const [e, r] = a.useState(), t = a.useRef({}), i = a.useRef(n), c = a.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = T(p, {
14
- mounted: {
15
- UNMOUNT: "unmounted",
16
- ANIMATION_OUT: "unmountSuspended"
17
- },
18
- unmountSuspended: {
19
- MOUNT: "mounted",
20
- ANIMATION_END: "unmounted"
21
- },
22
- unmounted: {
23
- MOUNT: "mounted"
24
- }
25
- });
26
- return a.useEffect(() => {
27
- const o = l(t.current);
28
- c.current = N === "mounted" ? o : "none";
29
- }, [N]), A(() => {
30
- const o = t.current, m = i.current;
31
- if (m !== n) {
32
- const f = c.current, u = l(o);
33
- n ? s("MOUNT") : u === "none" || (o == null ? void 0 : o.display) === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), i.current = n;
34
- }
35
- }, [n, s]), A(() => {
36
- if (e) {
37
- let o;
38
- const m = e.ownerDocument.defaultView ?? window, d = (u) => {
39
- const g = l(t.current).includes(u.animationName);
40
- if (u.target === e && g && (s("ANIMATION_END"), !i.current)) {
41
- const O = e.style.animationFillMode;
42
- e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
43
- e.style.animationFillMode === "forwards" && (e.style.animationFillMode = O);
44
- });
45
- }
46
- }, f = (u) => {
47
- u.target === e && (c.current = l(t.current));
48
- };
49
- return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
50
- m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
51
- };
52
- } else
53
- s("ANIMATION_END");
54
- }, [e, s]), {
55
- isPresent: ["mounted", "unmountSuspended"].includes(N),
56
- ref: a.useCallback((o) => {
57
- o && (t.current = getComputedStyle(o)), r(o);
58
- }, [])
59
- };
60
- }
61
- function l(n) {
62
- return (n == null ? void 0 : n.animationName) || "none";
63
- }
64
- function P(n) {
65
- var t, i;
66
- let e = (t = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : t.get, r = e && "isReactWarning" in e && e.isReactWarning;
67
- return r ? n.ref : (e = (i = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : i.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
68
- }
69
- export {
70
- R as Presence
71
- };
72
- //# sourceMappingURL=index.es407.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es407.js","sources":["../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/presence/src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// packages/react/presence/src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/presence/src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef({});\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n if (node2) stylesRef.current = getComputedStyle(node2);\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useStateMachine","initialState","machine","React","state","event","Presence","props","present","children","presence","usePresence","child","React2","ref","useComposedRefs","getElementRef","node","setNode","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","timeoutId","ownerWindow","handleAnimationEnd","isCurrentAnimation","currentFillMode","handleAnimationStart","node2","element","getter","_a","mayWarn","_b"],"mappings":";;;AASA,SAASA,EAAgBC,GAAcC,GAAS;AAC9C,SAAOC,EAAM,WAAW,CAACC,GAAOC,MACZH,EAAQE,CAAK,EAAEC,CAAK,KAClBD,GACnBH,CAAY;AACjB;AAGG,IAACK,IAAW,CAACC,MAAU;AACxB,QAAM,EAAE,SAAAC,GAAS,UAAAC,EAAQ,IAAKF,GACxBG,IAAWC,EAAYH,CAAO,GAC9BI,IAAQ,OAAOH,KAAa,aAAaA,EAAS,EAAE,SAASC,EAAS,UAAW,CAAA,IAAIG,EAAO,SAAS,KAAKJ,CAAQ,GAClHK,IAAMC,EAAgBL,EAAS,KAAKM,EAAcJ,CAAK,CAAC;AAE9D,SADmB,OAAOH,KAAa,cAClBC,EAAS,YAAYG,EAAO,aAAaD,GAAO,EAAE,KAAAE,EAAK,CAAA,IAAI;AAClF;AACAR,EAAS,cAAc;AACvB,SAASK,EAAYH,GAAS;AAC5B,QAAM,CAACS,GAAMC,CAAO,IAAIL,EAAO,SAAU,GACnCM,IAAYN,EAAO,OAAO,EAAE,GAC5BO,IAAiBP,EAAO,OAAOL,CAAO,GACtCa,IAAuBR,EAAO,OAAO,MAAM,GAC3CZ,IAAeO,IAAU,YAAY,aACrC,CAACJ,GAAOkB,CAAI,IAAItB,EAAgBC,GAAc;AAAA,IAClD,SAAS;AAAA,MACP,SAAS;AAAA,MACT,eAAe;AAAA,IAChB;AAAA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,OAAO;AAAA,MAEpE;AACD,aAAAF,EAAK,iBAAiB,kBAAkBiB,CAAoB,GAC5DjB,EAAK,iBAAiB,mBAAmBc,CAAkB,GAC3Dd,EAAK,iBAAiB,gBAAgBc,CAAkB,GACjD,MAAM;AACX,QAAAD,EAAY,aAAaD,CAAS,GAClCZ,EAAK,oBAAoB,kBAAkBiB,CAAoB,GAC/DjB,EAAK,oBAAoB,mBAAmBc,CAAkB,GAC9Dd,EAAK,oBAAoB,gBAAgBc,CAAkB;AAAA,MAC5D;AAAA,IACP;AACM,MAAAT,EAAK,eAAe;AAAA,EAE1B,GAAK,CAACL,GAAMK,CAAI,CAAC,GACR;AAAA,IACL,WAAW,CAAC,WAAW,kBAAkB,EAAE,SAASlB,CAAK;AAAA,IACzD,KAAKS,EAAO,YAAY,CAACsB,MAAU;AACjC,MAAIA,MAAOhB,EAAU,UAAU,iBAAiBgB,CAAK,IACrDjB,EAAQiB,CAAK;AAAA,IACnB,GAAO,CAAE,CAAA;AAAA,EACN;AACH;AACA,SAASX,EAAiBE,GAAQ;AAChC,UAAOA,KAAA,gBAAAA,EAAQ,kBAAiB;AAClC;AACA,SAASV,EAAcoB,GAAS;;AAC9B,MAAIC,KAASC,IAAA,OAAO,yBAAyBF,EAAQ,OAAO,KAAK,MAApD,gBAAAE,EAAuD,KAChEC,IAAUF,KAAU,oBAAoBA,KAAUA,EAAO;AAC7D,SAAIE,IACKH,EAAQ,OAEjBC,KAASG,IAAA,OAAO,yBAAyBJ,GAAS,KAAK,MAA9C,gBAAAI,EAAiD,KAC1DD,IAAUF,KAAU,oBAAoBA,KAAUA,EAAO,gBACrDE,IACKH,EAAQ,MAAM,MAEhBA,EAAQ,MAAM,OAAOA,EAAQ;AACtC;","x_google_ignoreList":[0]}
@@ -1,18 +0,0 @@
1
- import { useState as n, useCallback as i } from "react";
2
- import "./index.es476.js";
3
- function c() {
4
- const [t, o] = n(null), e = i(async (r) => {
5
- if (!(navigator != null && navigator.clipboard))
6
- return console.warn("Clipboard not supported"), !1;
7
- try {
8
- return await navigator.clipboard.writeText(r), o(r), !0;
9
- } catch (a) {
10
- return console.warn("Copy failed", a), o(null), !1;
11
- }
12
- }, []);
13
- return [t, e];
14
- }
15
- export {
16
- c as useCopyToClipboard
17
- };
18
- //# sourceMappingURL=index.es421.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es421.js","sources":["../node_modules/usehooks-ts/dist/index.js"],"sourcesContent":["import { useState, useCallback, useLayoutEffect, useEffect, useRef, useMemo } from 'react';\nimport debounce from 'lodash.debounce';\n\n// src/useBoolean/useBoolean.ts\nfunction useBoolean(defaultValue = false) {\n if (typeof defaultValue !== \"boolean\") {\n throw new Error(\"defaultValue must be `true` or `false`\");\n }\n const [value, setValue] = useState(defaultValue);\n const setTrue = useCallback(() => {\n setValue(true);\n }, []);\n const setFalse = useCallback(() => {\n setValue(false);\n }, []);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return { value, setValue, setTrue, setFalse, toggle };\n}\nvar useIsomorphicLayoutEffect = typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\n// src/useEventListener/useEventListener.ts\nfunction useEventListener(eventName, handler, element, options) {\n const savedHandler = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n useEffect(() => {\n const targetElement = (element == null ? void 0 : element.current) ?? window;\n if (!(targetElement && targetElement.addEventListener))\n return;\n const listener = (event) => {\n savedHandler.current(event);\n };\n targetElement.addEventListener(eventName, listener, options);\n return () => {\n targetElement.removeEventListener(eventName, listener, options);\n };\n }, [eventName, element, options]);\n}\n\n// src/useClickAnyWhere/useClickAnyWhere.ts\nfunction useClickAnyWhere(handler) {\n useEventListener(\"click\", (event) => {\n handler(event);\n });\n}\nfunction useCopyToClipboard() {\n const [copiedText, setCopiedText] = useState(null);\n const copy = useCallback(async (text) => {\n if (!(navigator == null ? void 0 : navigator.clipboard)) {\n console.warn(\"Clipboard not supported\");\n return false;\n }\n try {\n await navigator.clipboard.writeText(text);\n setCopiedText(text);\n return true;\n } catch (error) {\n console.warn(\"Copy failed\", error);\n setCopiedText(null);\n return false;\n }\n }, []);\n return [copiedText, copy];\n}\nfunction useCounter(initialValue) {\n const [count, setCount] = useState(initialValue ?? 0);\n const increment = useCallback(() => {\n setCount((x) => x + 1);\n }, []);\n const decrement = useCallback(() => {\n setCount((x) => x - 1);\n }, []);\n const reset = useCallback(() => {\n setCount(initialValue ?? 0);\n }, [initialValue]);\n return {\n count,\n increment,\n decrement,\n reset,\n setCount\n };\n}\nfunction useInterval(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (delay === null) {\n return;\n }\n const id = setInterval(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearInterval(id);\n };\n }, [delay]);\n}\n\n// src/useCountdown/useCountdown.ts\nfunction useCountdown({\n countStart,\n countStop = 0,\n intervalMs = 1e3,\n isIncrement = false\n}) {\n const {\n count,\n increment,\n decrement,\n reset: resetCounter\n } = useCounter(countStart);\n const {\n value: isCountdownRunning,\n setTrue: startCountdown,\n setFalse: stopCountdown\n } = useBoolean(false);\n const resetCountdown = useCallback(() => {\n stopCountdown();\n resetCounter();\n }, [stopCountdown, resetCounter]);\n const countdownCallback = useCallback(() => {\n if (count === countStop) {\n stopCountdown();\n return;\n }\n if (isIncrement) {\n increment();\n } else {\n decrement();\n }\n }, [count, countStop, decrement, increment, isIncrement, stopCountdown]);\n useInterval(countdownCallback, isCountdownRunning ? intervalMs : null);\n return [count, { startCountdown, stopCountdown, resetCountdown }];\n}\nfunction useEventCallback(fn) {\n const ref = useRef(() => {\n throw new Error(\"Cannot call an event handler while rendering.\");\n });\n useIsomorphicLayoutEffect(() => {\n ref.current = fn;\n }, [fn]);\n return useCallback((...args) => {\n var _a;\n return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);\n }, [ref]);\n}\n\n// src/useLocalStorage/useLocalStorage.ts\nvar IS_SERVER = typeof window === \"undefined\";\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER) {\n return initialValueToUse;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER) {\n console.warn(\n `Tried setting localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.localStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting localStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n const removeValue = useEventCallback(() => {\n if (IS_SERVER) {\n console.warn(\n `Tried removing localStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n window.localStorage.removeItem(key);\n setStoredValue(defaultValue);\n window.dispatchEvent(new StorageEvent(\"local-storage\", { key }));\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return [storedValue, setValue, removeValue];\n}\nvar IS_SERVER2 = typeof window === \"undefined\";\nfunction useMediaQuery(query, {\n defaultValue = false,\n initializeWithValue = true\n} = {}) {\n const getMatches = (query2) => {\n if (IS_SERVER2) {\n return defaultValue;\n }\n return window.matchMedia(query2).matches;\n };\n const [matches, setMatches] = useState(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n function handleChange() {\n setMatches(getMatches(query));\n }\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n handleChange();\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener(\"change\", handleChange);\n }\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener(\"change\", handleChange);\n }\n };\n }, [query]);\n return matches;\n}\n\n// src/useDarkMode/useDarkMode.ts\nvar COLOR_SCHEME_QUERY = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY = \"usehooks-ts-dark-mode\";\nfunction useDarkMode(options = {}) {\n const {\n defaultValue,\n localStorageKey = LOCAL_STORAGE_KEY,\n initializeWithValue = true\n } = options;\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY, {\n initializeWithValue,\n defaultValue\n });\n const [isDarkMode, setDarkMode] = useLocalStorage(\n localStorageKey,\n defaultValue ?? isDarkOS ?? false,\n { initializeWithValue }\n );\n useIsomorphicLayoutEffect(() => {\n if (isDarkOS !== isDarkMode) {\n setDarkMode(isDarkOS);\n }\n }, [isDarkOS]);\n return {\n isDarkMode,\n toggle: () => {\n setDarkMode((prev) => !prev);\n },\n enable: () => {\n setDarkMode(true);\n },\n disable: () => {\n setDarkMode(false);\n },\n set: (value) => {\n setDarkMode(value);\n }\n };\n}\nfunction useUnmount(func) {\n const funcRef = useRef(func);\n funcRef.current = func;\n useEffect(\n () => () => {\n funcRef.current();\n },\n []\n );\n}\n\n// src/useDebounceCallback/useDebounceCallback.ts\nfunction useDebounceCallback(func, delay = 500, options) {\n const debouncedFunc = useRef();\n useUnmount(() => {\n if (debouncedFunc.current) {\n debouncedFunc.current.cancel();\n }\n });\n const debounced = useMemo(() => {\n const debouncedFuncInstance = debounce(func, delay, options);\n const wrappedFunc = (...args) => {\n return debouncedFuncInstance(...args);\n };\n wrappedFunc.cancel = () => {\n debouncedFuncInstance.cancel();\n };\n wrappedFunc.isPending = () => {\n return !!debouncedFunc.current;\n };\n wrappedFunc.flush = () => {\n return debouncedFuncInstance.flush();\n };\n return wrappedFunc;\n }, [func, delay, options]);\n useEffect(() => {\n debouncedFunc.current = debounce(func, delay, options);\n }, [func, delay, options]);\n return debounced;\n}\nfunction useDebounceValue(initialValue, delay, options) {\n const eq = (options == null ? void 0 : options.equalityFn) ?? ((left, right) => left === right);\n const unwrappedInitialValue = initialValue instanceof Function ? initialValue() : initialValue;\n const [debouncedValue, setDebouncedValue] = useState(unwrappedInitialValue);\n const previousValueRef = useRef(unwrappedInitialValue);\n const updateDebouncedValue = useDebounceCallback(\n setDebouncedValue,\n delay,\n options\n );\n if (!eq(previousValueRef.current, unwrappedInitialValue)) {\n updateDebouncedValue(unwrappedInitialValue);\n previousValueRef.current = unwrappedInitialValue;\n }\n return [debouncedValue, updateDebouncedValue];\n}\nfunction useDocumentTitle(title, options = {}) {\n const { preserveTitleOnUnmount = true } = options;\n const defaultTitle = useRef(null);\n useIsomorphicLayoutEffect(() => {\n defaultTitle.current = window.document.title;\n }, []);\n useIsomorphicLayoutEffect(() => {\n window.document.title = title;\n }, [title]);\n useUnmount(() => {\n if (!preserveTitleOnUnmount && defaultTitle.current) {\n window.document.title = defaultTitle.current;\n }\n });\n}\nfunction useHover(elementRef) {\n const [value, setValue] = useState(false);\n const handleMouseEnter = () => {\n setValue(true);\n };\n const handleMouseLeave = () => {\n setValue(false);\n };\n useEventListener(\"mouseenter\", handleMouseEnter, elementRef);\n useEventListener(\"mouseleave\", handleMouseLeave, elementRef);\n return value;\n}\nfunction useIntersectionObserver({\n threshold = 0,\n root = null,\n rootMargin = \"0%\",\n freezeOnceVisible = false,\n initialIsIntersecting = false,\n onChange\n} = {}) {\n var _a;\n const [ref, setRef] = useState(null);\n const [state, setState] = useState(() => ({\n isIntersecting: initialIsIntersecting,\n entry: void 0\n }));\n const callbackRef = useRef();\n callbackRef.current = onChange;\n const frozen = ((_a = state.entry) == null ? void 0 : _a.isIntersecting) && freezeOnceVisible;\n useEffect(() => {\n if (!ref)\n return;\n if (!(\"IntersectionObserver\" in window))\n return;\n if (frozen)\n return;\n let unobserve;\n const observer = new IntersectionObserver(\n (entries) => {\n const thresholds = Array.isArray(observer.thresholds) ? observer.thresholds : [observer.thresholds];\n entries.forEach((entry) => {\n const isIntersecting = entry.isIntersecting && thresholds.some((threshold2) => entry.intersectionRatio >= threshold2);\n setState({ isIntersecting, entry });\n if (callbackRef.current) {\n callbackRef.current(isIntersecting, entry);\n }\n if (isIntersecting && freezeOnceVisible && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n });\n },\n { threshold, root, rootMargin }\n );\n observer.observe(ref);\n return () => {\n observer.disconnect();\n };\n }, [\n ref,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold),\n root,\n rootMargin,\n frozen,\n freezeOnceVisible\n ]);\n const prevRef = useRef(null);\n useEffect(() => {\n var _a2;\n if (!ref && ((_a2 = state.entry) == null ? void 0 : _a2.target) && !freezeOnceVisible && !frozen && prevRef.current !== state.entry.target) {\n prevRef.current = state.entry.target;\n setState({ isIntersecting: initialIsIntersecting, entry: void 0 });\n }\n }, [ref, state.entry, freezeOnceVisible, frozen, initialIsIntersecting]);\n const result = [\n setRef,\n !!state.isIntersecting,\n state.entry\n ];\n result.ref = result[0];\n result.isIntersecting = result[1];\n result.entry = result[2];\n return result;\n}\nfunction useIsClient() {\n const [isClient, setClient] = useState(false);\n useEffect(() => {\n setClient(true);\n }, []);\n return isClient;\n}\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return useCallback(() => isMounted.current, []);\n}\nfunction useMap(initialState = /* @__PURE__ */ new Map()) {\n const [map, setMap] = useState(new Map(initialState));\n const actions = {\n set: useCallback((key, value) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.set(key, value);\n return copy;\n });\n }, []),\n setAll: useCallback((entries) => {\n setMap(() => new Map(entries));\n }, []),\n remove: useCallback((key) => {\n setMap((prev) => {\n const copy = new Map(prev);\n copy.delete(key);\n return copy;\n });\n }, []),\n reset: useCallback(() => {\n setMap(() => /* @__PURE__ */ new Map());\n }, [])\n };\n return [map, actions];\n}\n\n// src/useOnClickOutside/useOnClickOutside.ts\nfunction useOnClickOutside(ref, handler, eventType = \"mousedown\", eventListenerOptions = {}) {\n useEventListener(\n eventType,\n (event) => {\n const target = event.target;\n if (!target || !target.isConnected) {\n return;\n }\n const isOutside = Array.isArray(ref) ? ref.filter((r) => Boolean(r.current)).every((r) => r.current && !r.current.contains(target)) : ref.current && !ref.current.contains(target);\n if (isOutside) {\n handler(event);\n }\n },\n void 0,\n eventListenerOptions\n );\n}\nvar IS_SERVER3 = typeof window === \"undefined\";\nfunction useReadLocalStorage(key, options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER3) {\n initializeWithValue = false;\n }\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return null;\n }\n return parsed;\n },\n [options]\n );\n const readValue = useCallback(() => {\n if (IS_SERVER3) {\n return null;\n }\n try {\n const raw = window.localStorage.getItem(key);\n return raw ? deserializer(raw) : null;\n } catch (error) {\n console.warn(`Error reading localStorage key \\u201C${key}\\u201D:`, error);\n return null;\n }\n }, [key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return void 0;\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"local-storage\", handleStorageChange);\n return storedValue;\n}\nvar initialSize = {\n width: void 0,\n height: void 0\n};\nfunction useResizeObserver(options) {\n const { ref, box = \"content-box\" } = options;\n const [{ width, height }, setSize] = useState(initialSize);\n const isMounted = useIsMounted();\n const previousSize = useRef({ ...initialSize });\n const onResize = useRef(void 0);\n onResize.current = options.onResize;\n useEffect(() => {\n if (!ref.current)\n return;\n if (typeof window === \"undefined\" || !(\"ResizeObserver\" in window))\n return;\n const observer = new ResizeObserver(([entry]) => {\n const boxProp = box === \"border-box\" ? \"borderBoxSize\" : box === \"device-pixel-content-box\" ? \"devicePixelContentBoxSize\" : \"contentBoxSize\";\n const newWidth = extractSize(entry, boxProp, \"inlineSize\");\n const newHeight = extractSize(entry, boxProp, \"blockSize\");\n const hasChanged = previousSize.current.width !== newWidth || previousSize.current.height !== newHeight;\n if (hasChanged) {\n const newSize = { width: newWidth, height: newHeight };\n previousSize.current.width = newWidth;\n previousSize.current.height = newHeight;\n if (onResize.current) {\n onResize.current(newSize);\n } else {\n if (isMounted()) {\n setSize(newSize);\n }\n }\n }\n });\n observer.observe(ref.current, { box });\n return () => {\n observer.disconnect();\n };\n }, [box, ref, isMounted]);\n return { width, height };\n}\nfunction extractSize(entry, box, sizeType) {\n if (!entry[box]) {\n if (box === \"contentBoxSize\") {\n return entry.contentRect[sizeType === \"inlineSize\" ? \"width\" : \"height\"];\n }\n return void 0;\n }\n return Array.isArray(entry[box]) ? entry[box][0][sizeType] : (\n // @ts-ignore Support Firefox's non-standard behavior\n entry[box][sizeType]\n );\n}\nvar IS_SERVER4 = typeof window === \"undefined\";\nfunction useScreen(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER4) {\n initializeWithValue = false;\n }\n const readScreen = () => {\n if (IS_SERVER4) {\n return void 0;\n }\n return window.screen;\n };\n const [screen, setScreen] = useState(() => {\n if (initializeWithValue) {\n return readScreen();\n }\n return void 0;\n });\n const debouncedSetScreen = useDebounceCallback(\n setScreen,\n options.debounceDelay\n );\n function handleSize() {\n const newScreen = readScreen();\n const setSize = options.debounceDelay ? debouncedSetScreen : setScreen;\n if (newScreen) {\n const {\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n } = newScreen;\n setSize({\n width,\n height,\n availHeight,\n availWidth,\n colorDepth,\n orientation,\n pixelDepth\n });\n }\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return screen;\n}\nvar cachedScriptStatuses = /* @__PURE__ */ new Map();\nfunction getScriptNode(src) {\n const node = document.querySelector(\n `script[src=\"${src}\"]`\n );\n const status = node == null ? void 0 : node.getAttribute(\"data-status\");\n return {\n node,\n status\n };\n}\nfunction useScript(src, options) {\n const [status, setStatus] = useState(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return \"idle\";\n }\n if (typeof window === \"undefined\") {\n return \"loading\";\n }\n return cachedScriptStatuses.get(src) ?? \"loading\";\n });\n useEffect(() => {\n if (!src || (options == null ? void 0 : options.shouldPreventLoad)) {\n return;\n }\n const cachedScriptStatus = cachedScriptStatuses.get(src);\n if (cachedScriptStatus === \"ready\" || cachedScriptStatus === \"error\") {\n setStatus(cachedScriptStatus);\n return;\n }\n const script = getScriptNode(src);\n let scriptNode = script.node;\n if (!scriptNode) {\n scriptNode = document.createElement(\"script\");\n scriptNode.src = src;\n scriptNode.async = true;\n if (options == null ? void 0 : options.id) {\n scriptNode.id = options.id;\n }\n scriptNode.setAttribute(\"data-status\", \"loading\");\n document.body.appendChild(scriptNode);\n const setAttributeFromEvent = (event) => {\n const scriptStatus = event.type === \"load\" ? \"ready\" : \"error\";\n scriptNode == null ? void 0 : scriptNode.setAttribute(\"data-status\", scriptStatus);\n };\n scriptNode.addEventListener(\"load\", setAttributeFromEvent);\n scriptNode.addEventListener(\"error\", setAttributeFromEvent);\n } else {\n setStatus(script.status ?? cachedScriptStatus ?? \"loading\");\n }\n const setStateFromEvent = (event) => {\n const newStatus = event.type === \"load\" ? \"ready\" : \"error\";\n setStatus(newStatus);\n cachedScriptStatuses.set(src, newStatus);\n };\n scriptNode.addEventListener(\"load\", setStateFromEvent);\n scriptNode.addEventListener(\"error\", setStateFromEvent);\n return () => {\n if (scriptNode) {\n scriptNode.removeEventListener(\"load\", setStateFromEvent);\n scriptNode.removeEventListener(\"error\", setStateFromEvent);\n }\n if (scriptNode && (options == null ? void 0 : options.removeOnUnmount)) {\n scriptNode.remove();\n cachedScriptStatuses.delete(src);\n }\n };\n }, [src, options == null ? void 0 : options.shouldPreventLoad, options == null ? void 0 : options.removeOnUnmount, options == null ? void 0 : options.id]);\n return status;\n}\nvar IS_SERVER5 = typeof window === \"undefined\";\nfunction useScrollLock(options = {}) {\n const { autoLock = true, lockTarget, widthReflow = true } = options;\n const [isLocked, setIsLocked] = useState(false);\n const target = useRef(null);\n const originalStyle = useRef(null);\n const lock = () => {\n if (target.current) {\n const { overflow, paddingRight } = target.current.style;\n originalStyle.current = { overflow, paddingRight };\n if (widthReflow) {\n const offsetWidth = target.current === document.body ? window.innerWidth : target.current.offsetWidth;\n const currentPaddingRight = parseInt(window.getComputedStyle(target.current).paddingRight, 10) || 0;\n const scrollbarWidth = offsetWidth - target.current.scrollWidth;\n target.current.style.paddingRight = `${scrollbarWidth + currentPaddingRight}px`;\n }\n target.current.style.overflow = \"hidden\";\n setIsLocked(true);\n }\n };\n const unlock = () => {\n if (target.current && originalStyle.current) {\n target.current.style.overflow = originalStyle.current.overflow;\n if (widthReflow) {\n target.current.style.paddingRight = originalStyle.current.paddingRight;\n }\n }\n setIsLocked(false);\n };\n useIsomorphicLayoutEffect(() => {\n if (IS_SERVER5)\n return;\n if (lockTarget) {\n target.current = typeof lockTarget === \"string\" ? document.querySelector(lockTarget) : lockTarget;\n }\n if (!target.current) {\n target.current = document.body;\n }\n if (autoLock) {\n lock();\n }\n return () => {\n unlock();\n };\n }, [autoLock, lockTarget, widthReflow]);\n return { isLocked, lock, unlock };\n}\nvar IS_SERVER6 = typeof window === \"undefined\";\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { initializeWithValue = true } = options;\n const serializer = useCallback(\n (value) => {\n if (options.serializer) {\n return options.serializer(value);\n }\n return JSON.stringify(value);\n },\n [options]\n );\n const deserializer = useCallback(\n (value) => {\n if (options.deserializer) {\n return options.deserializer(value);\n }\n if (value === \"undefined\") {\n return void 0;\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n let parsed;\n try {\n parsed = JSON.parse(value);\n } catch (error) {\n console.error(\"Error parsing JSON:\", error);\n return defaultValue;\n }\n return parsed;\n },\n [options, initialValue]\n );\n const readValue = useCallback(() => {\n const initialValueToUse = initialValue instanceof Function ? initialValue() : initialValue;\n if (IS_SERVER6) {\n return initialValueToUse;\n }\n try {\n const raw = window.sessionStorage.getItem(key);\n return raw ? deserializer(raw) : initialValueToUse;\n } catch (error) {\n console.warn(`Error reading sessionStorage key \\u201C${key}\\u201D:`, error);\n return initialValueToUse;\n }\n }, [initialValue, key, deserializer]);\n const [storedValue, setStoredValue] = useState(() => {\n if (initializeWithValue) {\n return readValue();\n }\n return initialValue instanceof Function ? initialValue() : initialValue;\n });\n const setValue = useEventCallback((value) => {\n if (IS_SERVER6) {\n console.warn(\n `Tried setting sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n try {\n const newValue = value instanceof Function ? value(readValue()) : value;\n window.sessionStorage.setItem(key, serializer(newValue));\n setStoredValue(newValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n } catch (error) {\n console.warn(`Error setting sessionStorage key \\u201C${key}\\u201D:`, error);\n }\n });\n const removeValue = useEventCallback(() => {\n if (IS_SERVER6) {\n console.warn(\n `Tried removing sessionStorage key \\u201C${key}\\u201D even though environment is not a client`\n );\n }\n const defaultValue = initialValue instanceof Function ? initialValue() : initialValue;\n window.sessionStorage.removeItem(key);\n setStoredValue(defaultValue);\n window.dispatchEvent(new StorageEvent(\"session-storage\", { key }));\n });\n useEffect(() => {\n setStoredValue(readValue());\n }, [key]);\n const handleStorageChange = useCallback(\n (event) => {\n if (event.key && event.key !== key) {\n return;\n }\n setStoredValue(readValue());\n },\n [key, readValue]\n );\n useEventListener(\"storage\", handleStorageChange);\n useEventListener(\"session-storage\", handleStorageChange);\n return [storedValue, setValue, removeValue];\n}\nfunction useStep(maxStep) {\n const [currentStep, setCurrentStep] = useState(1);\n const canGoToNextStep = currentStep + 1 <= maxStep;\n const canGoToPrevStep = currentStep - 1 > 0;\n const setStep = useCallback(\n (step) => {\n const newStep = step instanceof Function ? step(currentStep) : step;\n if (newStep >= 1 && newStep <= maxStep) {\n setCurrentStep(newStep);\n return;\n }\n throw new Error(\"Step not valid\");\n },\n [maxStep, currentStep]\n );\n const goToNextStep = useCallback(() => {\n if (canGoToNextStep) {\n setCurrentStep((step) => step + 1);\n }\n }, [canGoToNextStep]);\n const goToPrevStep = useCallback(() => {\n if (canGoToPrevStep) {\n setCurrentStep((step) => step - 1);\n }\n }, [canGoToPrevStep]);\n const reset = useCallback(() => {\n setCurrentStep(1);\n }, []);\n return [\n currentStep,\n {\n goToNextStep,\n goToPrevStep,\n canGoToNextStep,\n canGoToPrevStep,\n setStep,\n reset\n }\n ];\n}\n\n// src/useTernaryDarkMode/useTernaryDarkMode.ts\nvar COLOR_SCHEME_QUERY2 = \"(prefers-color-scheme: dark)\";\nvar LOCAL_STORAGE_KEY2 = \"usehooks-ts-ternary-dark-mode\";\nfunction useTernaryDarkMode({\n defaultValue = \"system\",\n localStorageKey = LOCAL_STORAGE_KEY2,\n initializeWithValue = true\n} = {}) {\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY2, { initializeWithValue });\n const [mode, setMode] = useLocalStorage(localStorageKey, defaultValue, {\n initializeWithValue\n });\n const isDarkMode = mode === \"dark\" || mode === \"system\" && isDarkOS;\n const toggleTernaryDarkMode = () => {\n const modes = [\"light\", \"system\", \"dark\"];\n setMode((prevMode) => {\n const nextIndex = (modes.indexOf(prevMode) + 1) % modes.length;\n return modes[nextIndex];\n });\n };\n return {\n isDarkMode,\n ternaryDarkMode: mode,\n setTernaryDarkMode: setMode,\n toggleTernaryDarkMode\n };\n}\nfunction useTimeout(callback, delay) {\n const savedCallback = useRef(callback);\n useIsomorphicLayoutEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n useEffect(() => {\n if (!delay && delay !== 0) {\n return;\n }\n const id = setTimeout(() => {\n savedCallback.current();\n }, delay);\n return () => {\n clearTimeout(id);\n };\n }, [delay]);\n}\nfunction useToggle(defaultValue) {\n const [value, setValue] = useState(!!defaultValue);\n const toggle = useCallback(() => {\n setValue((x) => !x);\n }, []);\n return [value, toggle, setValue];\n}\nvar IS_SERVER7 = typeof window === \"undefined\";\nfunction useWindowSize(options = {}) {\n let { initializeWithValue = true } = options;\n if (IS_SERVER7) {\n initializeWithValue = false;\n }\n const [windowSize, setWindowSize] = useState(() => {\n if (initializeWithValue) {\n return {\n width: window.innerWidth,\n height: window.innerHeight\n };\n }\n return {\n width: void 0,\n height: void 0\n };\n });\n const debouncedSetWindowSize = useDebounceCallback(\n setWindowSize,\n options.debounceDelay\n );\n function handleSize() {\n const setSize = options.debounceDelay ? debouncedSetWindowSize : setWindowSize;\n setSize({\n width: window.innerWidth,\n height: window.innerHeight\n });\n }\n useEventListener(\"resize\", handleSize);\n useIsomorphicLayoutEffect(() => {\n handleSize();\n }, []);\n return windowSize;\n}\n\nexport { useBoolean, useClickAnyWhere, useCopyToClipboard, useCountdown, useCounter, useDarkMode, useDebounceCallback, useDebounceValue, useDocumentTitle, useEventCallback, useEventListener, useHover, useIntersectionObserver, useInterval, useIsClient, useIsMounted, useIsomorphicLayoutEffect, useLocalStorage, useMap, useMediaQuery, useOnClickOutside, useReadLocalStorage, useResizeObserver, useScreen, useScript, useScrollLock, useSessionStorage, useStep, useTernaryDarkMode, useTimeout, useToggle, useUnmount, useWindowSize };\n"],"names":["useCopyToClipboard","copiedText","setCopiedText","useState","copy","useCallback","text","error"],"mappings":";;AAgDA,SAASA,IAAqB;AAC5B,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAS,IAAI,GAC3CC,IAAOC,EAAY,OAAOC,MAAS;AACvC,QAAI,EAAE,aAAa,QAAgB,UAAU;AAC3C,qBAAQ,KAAK,yBAAyB,GAC/B;AAET,QAAI;AACF,mBAAM,UAAU,UAAU,UAAUA,CAAI,GACxCJ,EAAcI,CAAI,GACX;AAAA,IACR,SAAQC,GAAO;AACd,qBAAQ,KAAK,eAAeA,CAAK,GACjCL,EAAc,IAAI,GACX;AAAA,IACb;AAAA,EACG,GAAE,EAAE;AACL,SAAO,CAACD,GAAYG,CAAI;AAC1B;","x_google_ignoreList":[0]}
@@ -1,72 +0,0 @@
1
- import * as d from "react";
2
- import { styleSingleton as f } from "./index.es446.js";
3
- import { noScrollbarsClassName as p, zeroRightClassName as g, fullWidthClassName as l, removedBarSizeVariable as v } from "./index.es427.js";
4
- import { getGapWidth as m } from "./index.es452.js";
5
- var b = f(), e = "data-scroll-locked", h = function(n, a, o, t) {
6
- var r = n.left, i = n.top, s = n.right, c = n.gap;
7
- return o === void 0 && (o = "margin"), `
8
- .`.concat(p, ` {
9
- overflow: hidden `).concat(t, `;
10
- padding-right: `).concat(c, "px ").concat(t, `;
11
- }
12
- body[`).concat(e, `] {
13
- overflow: hidden `).concat(t, `;
14
- overscroll-behavior: contain;
15
- `).concat([
16
- a && "position: relative ".concat(t, ";"),
17
- o === "margin" && `
18
- padding-left: `.concat(r, `px;
19
- padding-top: `).concat(i, `px;
20
- padding-right: `).concat(s, `px;
21
- margin-left:0;
22
- margin-top:0;
23
- margin-right: `).concat(c, "px ").concat(t, `;
24
- `),
25
- o === "padding" && "padding-right: ".concat(c, "px ").concat(t, ";")
26
- ].filter(Boolean).join(""), `
27
- }
28
-
29
- .`).concat(g, ` {
30
- right: `).concat(c, "px ").concat(t, `;
31
- }
32
-
33
- .`).concat(l, ` {
34
- margin-right: `).concat(c, "px ").concat(t, `;
35
- }
36
-
37
- .`).concat(g, " .").concat(g, ` {
38
- right: 0 `).concat(t, `;
39
- }
40
-
41
- .`).concat(l, " .").concat(l, ` {
42
- margin-right: 0 `).concat(t, `;
43
- }
44
-
45
- body[`).concat(e, `] {
46
- `).concat(v, ": ").concat(c, `px;
47
- }
48
- `);
49
- }, u = function() {
50
- var n = parseInt(document.body.getAttribute(e) || "0", 10);
51
- return isFinite(n) ? n : 0;
52
- }, x = function() {
53
- d.useEffect(function() {
54
- return document.body.setAttribute(e, (u() + 1).toString()), function() {
55
- var n = u() - 1;
56
- n <= 0 ? document.body.removeAttribute(e) : document.body.setAttribute(e, n.toString());
57
- };
58
- }, []);
59
- }, C = function(n) {
60
- var a = n.noRelative, o = n.noImportant, t = n.gapMode, r = t === void 0 ? "margin" : t;
61
- x();
62
- var i = d.useMemo(function() {
63
- return m(r);
64
- }, [r]);
65
- return d.createElement(b, { styles: h(i, !a, r, o ? "" : "!important") });
66
- };
67
- export {
68
- C as RemoveScrollBar,
69
- e as lockAttribute,
70
- x as useLockAttribute
71
- };
72
- //# sourceMappingURL=index.es445.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es445.js","sources":["../node_modules/react-remove-scroll-bar/dist/es2015/component.js"],"sourcesContent":["import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body[\").concat(lockAttribute, \"] {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(zeroRightClassName, \" .\").concat(zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" .\").concat(fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body[\").concat(lockAttribute, \"] {\\n \").concat(removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n"],"names":["Style","styleSingleton","lockAttribute","getStyles","_a","allowRelative","gapMode","important","left","top","right","gap","noScrollbarsClassName","zeroRightClassName","fullWidthClassName","removedBarSizeVariable","getCurrentUseCounter","counter","useLockAttribute","React","newCounter","RemoveScrollBar","noRelative","noImportant","_b","getGapWidth"],"mappings":";;;;AAIA,IAAIA,IAAQC,EAAgB,GACjBC,IAAgB,sBAIvBC,IAAY,SAAUC,GAAIC,GAAeC,GAASC,GAAW;AAC7D,MAAIC,IAAOJ,EAAG,MAAMK,IAAML,EAAG,KAAKM,IAAQN,EAAG,OAAOO,IAAMP,EAAG;AAC7D,SAAIE,MAAY,WAAUA,IAAU,WAC7B;AAAA,KAAQ,OAAOM,GAAuB;AAAA,qBAA0B,EAAE,OAAOL,GAAW;AAAA,mBAAuB,EAAE,OAAOI,GAAK,KAAK,EAAE,OAAOJ,GAAW;AAAA;AAAA,QAAiB,EAAE,OAAOL,GAAe;AAAA,sBAA4B,EAAE,OAAOK,GAAW;AAAA;AAAA,KAA4C,EAAE,OAAO;AAAA,IACnSF,KAAiB,sBAAsB,OAAOE,GAAW,GAAG;AAAA,IAC5DD,MAAY,YACR;AAAA,oBAAuB,OAAOE,GAAM;AAAA,kBAAwB,EAAE,OAAOC,GAAK;AAAA,oBAA0B,EAAE,OAAOC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;AACvC,MAAIkB,IAAalB,EAAG,YAAYmB,IAAcnB,EAAG,aAAaoB,IAAKpB,EAAG,SAASE,IAAUkB,MAAO,SAAS,WAAWA;AACpH,EAAAN,EAAkB;AAMlB,MAAIP,IAAMQ,EAAM,QAAQ,WAAY;AAAE,WAAOM,EAAYnB,CAAO;AAAA,EAAE,GAAI,CAACA,CAAO,CAAC;AAC/E,SAAOa,EAAM,cAAcnB,GAAO,EAAE,QAAQG,EAAUQ,GAAK,CAACW,GAAYhB,GAAUiB,IAA6B,KAAf,YAAiB,EAAC,CAAE;AACxH;","x_google_ignoreList":[0]}
@@ -1,16 +0,0 @@
1
- import * as o from "react";
2
- import { stylesheetSingleton as r } from "./index.es454.js";
3
- var i = function() {
4
- var t = r();
5
- return function(e, n) {
6
- o.useEffect(function() {
7
- return t.add(e), function() {
8
- t.remove();
9
- };
10
- }, [e && n]);
11
- };
12
- };
13
- export {
14
- i as styleHookSingleton
15
- };
16
- //# sourceMappingURL=index.es453.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es453.js","sources":["../node_modules/react-style-singleton/dist/es2015/hook.js"],"sourcesContent":["import * as React from 'react';\nimport { stylesheetSingleton } from './singleton';\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nexport var styleHookSingleton = function () {\n var sheet = stylesheetSingleton();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\n"],"names":["styleHookSingleton","sheet","stylesheetSingleton","styles","isDynamic","React"],"mappings":";;AAWU,IAACA,IAAqB,WAAY;AACxC,MAAIC,IAAQC,EAAqB;AACjC,SAAO,SAAUC,GAAQC,GAAW;AAChC,IAAAC,EAAM,UAAU,WAAY;AACxB,aAAAJ,EAAM,IAAIE,CAAM,GACT,WAAY;AACf,QAAAF,EAAM,OAAQ;AAAA,MACjB;AAAA,IACb,GAAW,CAACE,KAAUC,CAAS,CAAC;AAAA,EAC3B;AACL;","x_google_ignoreList":[0]}
@@ -1,31 +0,0 @@
1
- import { getNonce as o } from "./index.es455.js";
2
- function r() {
3
- if (!document)
4
- return null;
5
- var t = document.createElement("style");
6
- t.type = "text/css";
7
- var e = o();
8
- return e && t.setAttribute("nonce", e), t;
9
- }
10
- function l(t, e) {
11
- t.styleSheet ? t.styleSheet.cssText = e : t.appendChild(document.createTextNode(e));
12
- }
13
- function a(t) {
14
- var e = document.head || document.getElementsByTagName("head")[0];
15
- e.appendChild(t);
16
- }
17
- var c = function() {
18
- var t = 0, e = null;
19
- return {
20
- add: function(n) {
21
- t == 0 && (e = r()) && (l(e, n), a(e)), t++;
22
- },
23
- remove: function() {
24
- t--, !t && e && (e.parentNode && e.parentNode.removeChild(e), e = null);
25
- }
26
- };
27
- };
28
- export {
29
- c as stylesheetSingleton
30
- };
31
- //# sourceMappingURL=index.es454.js.map