@rpcbase/ui 0.182.0 → 0.184.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 (652) hide show
  1. package/dist/helpers/index.d.ts +1 -0
  2. package/dist/helpers/index.d.ts.map +1 -1
  3. package/dist/helpers/useScrollPagination.d.ts +23 -0
  4. package/dist/helpers/useScrollPagination.d.ts.map +1 -0
  5. package/dist/helpers/useScrollPagination.test.d.ts +2 -0
  6. package/dist/helpers/useScrollPagination.test.d.ts.map +1 -0
  7. package/dist/index.js +62 -60
  8. package/dist/index.js.map +1 -1
  9. package/dist/index10.js +24 -69
  10. package/dist/index10.js.map +1 -1
  11. package/dist/index100.js +4 -3
  12. package/dist/index100.js.map +1 -1
  13. package/dist/index101.js +5 -4
  14. package/dist/index101.js.map +1 -1
  15. package/dist/index102.js +4 -6
  16. package/dist/index102.js.map +1 -1
  17. package/dist/index103.js +4 -145
  18. package/dist/index103.js.map +1 -1
  19. package/dist/index104.js +6 -39
  20. package/dist/index104.js.map +1 -1
  21. package/dist/index105.js +24 -4
  22. package/dist/index105.js.map +1 -1
  23. package/dist/index106.js +6 -7
  24. package/dist/index106.js.map +1 -1
  25. package/dist/index107.js +4 -13
  26. package/dist/index107.js.map +1 -1
  27. package/dist/index108.js +6 -13
  28. package/dist/index108.js.map +1 -1
  29. package/dist/index109.js +5 -7
  30. package/dist/index109.js.map +1 -1
  31. package/dist/index11.js +38 -552
  32. package/dist/index11.js.map +1 -1
  33. package/dist/index110.js +4 -31
  34. package/dist/index110.js.map +1 -1
  35. package/dist/index111.js +5 -10
  36. package/dist/index111.js.map +1 -1
  37. package/dist/index112.js +4 -10
  38. package/dist/index112.js.map +1 -1
  39. package/dist/index113.js +8 -8
  40. package/dist/index113.js.map +1 -1
  41. package/dist/index114.js +5 -13
  42. package/dist/index114.js.map +1 -1
  43. package/dist/index115.js +4 -101
  44. package/dist/index115.js.map +1 -1
  45. package/dist/index116.js +5 -20
  46. package/dist/index116.js.map +1 -1
  47. package/dist/index117.js +6 -53
  48. package/dist/index117.js.map +1 -1
  49. package/dist/index118.js +145 -72
  50. package/dist/index118.js.map +1 -1
  51. package/dist/index119.js +39 -9
  52. package/dist/index119.js.map +1 -1
  53. package/dist/index12.js +571 -115
  54. package/dist/index12.js.map +1 -1
  55. package/dist/index120.js +4 -20
  56. package/dist/index120.js.map +1 -1
  57. package/dist/index121.js +7 -16
  58. package/dist/index121.js.map +1 -1
  59. package/dist/index122.js +13 -23
  60. package/dist/index122.js.map +1 -1
  61. package/dist/index123.js +13 -6
  62. package/dist/index123.js.map +1 -1
  63. package/dist/index124.js +7 -5
  64. package/dist/index124.js.map +1 -1
  65. package/dist/index125.js +31 -23
  66. package/dist/index125.js.map +1 -1
  67. package/dist/index126.js +11 -35
  68. package/dist/index126.js.map +1 -1
  69. package/dist/index127.js +11 -16
  70. package/dist/index127.js.map +1 -1
  71. package/dist/index128.js +8 -6
  72. package/dist/index128.js.map +1 -1
  73. package/dist/index129.js +13 -4
  74. package/dist/index129.js.map +1 -1
  75. package/dist/index13.js +137 -76
  76. package/dist/index13.js.map +1 -1
  77. package/dist/index130.js +101 -4
  78. package/dist/index130.js.map +1 -1
  79. package/dist/index131.js +20 -5
  80. package/dist/index131.js.map +1 -1
  81. package/dist/index132.js +53 -4
  82. package/dist/index132.js.map +1 -1
  83. package/dist/index133.js +72 -3
  84. package/dist/index133.js.map +1 -1
  85. package/dist/index134.js +9 -6
  86. package/dist/index134.js.map +1 -1
  87. package/dist/index135.js +21 -24
  88. package/dist/index135.js.map +1 -1
  89. package/dist/index136.js +16 -7
  90. package/dist/index136.js.map +1 -1
  91. package/dist/index137.js +23 -6
  92. package/dist/index137.js.map +1 -1
  93. package/dist/index138.js +6 -5
  94. package/dist/index138.js.map +1 -1
  95. package/dist/index139.js +5 -3
  96. package/dist/index139.js.map +1 -1
  97. package/dist/index14.js +74 -730
  98. package/dist/index14.js.map +1 -1
  99. package/dist/index140.js +23 -3
  100. package/dist/index140.js.map +1 -1
  101. package/dist/index141.js +35 -5
  102. package/dist/index141.js.map +1 -1
  103. package/dist/index142.js +16 -4
  104. package/dist/index142.js.map +1 -1
  105. package/dist/index143.js +6 -4
  106. package/dist/index143.js.map +1 -1
  107. package/dist/index144.js +4 -3
  108. package/dist/index144.js.map +1 -1
  109. package/dist/index145.js +4 -3
  110. package/dist/index145.js.map +1 -1
  111. package/dist/index146.js +4 -3
  112. package/dist/index146.js.map +1 -1
  113. package/dist/index147.js +4 -46
  114. package/dist/index147.js.map +1 -1
  115. package/dist/index148.js +3 -46
  116. package/dist/index148.js.map +1 -1
  117. package/dist/index149.js +6 -205
  118. package/dist/index149.js.map +1 -1
  119. package/dist/index15.js +870 -22
  120. package/dist/index15.js.map +1 -1
  121. package/dist/index150.js +24 -22
  122. package/dist/index150.js.map +1 -1
  123. package/dist/index151.js +7 -24
  124. package/dist/index151.js.map +1 -1
  125. package/dist/index152.js +6 -399
  126. package/dist/index152.js.map +1 -1
  127. package/dist/index153.js +5 -5
  128. package/dist/index153.js.map +1 -1
  129. package/dist/index154.js +3 -68
  130. package/dist/index154.js.map +1 -1
  131. package/dist/index155.js +4 -2
  132. package/dist/index155.js.map +1 -1
  133. package/dist/index156.js +4 -363
  134. package/dist/index156.js.map +1 -1
  135. package/dist/index157.js +3 -261
  136. package/dist/index157.js.map +1 -1
  137. package/dist/index158.js +4 -60
  138. package/dist/index158.js.map +1 -1
  139. package/dist/index159.js +3 -46
  140. package/dist/index159.js.map +1 -1
  141. package/dist/index16.js +20 -17
  142. package/dist/index16.js.map +1 -1
  143. package/dist/index160.js +3 -169
  144. package/dist/index160.js.map +1 -1
  145. package/dist/index161.js +3 -109
  146. package/dist/index161.js.map +1 -1
  147. package/dist/index162.js +5 -24
  148. package/dist/index162.js.map +1 -1
  149. package/dist/index163.js +69 -8
  150. package/dist/index163.js.map +1 -1
  151. package/dist/index164.js +2 -5
  152. package/dist/index164.js.map +1 -1
  153. package/dist/index165.js +363 -5
  154. package/dist/index165.js.map +1 -1
  155. package/dist/index166.js +261 -4
  156. package/dist/index166.js.map +1 -1
  157. package/dist/index167.js +52 -458
  158. package/dist/index167.js.map +1 -1
  159. package/dist/index168.js +42 -181
  160. package/dist/index168.js.map +1 -1
  161. package/dist/index169.js +156 -94
  162. package/dist/index169.js.map +1 -1
  163. package/dist/index17.js +18 -387
  164. package/dist/index17.js.map +1 -1
  165. package/dist/index170.js +102 -255
  166. package/dist/index170.js.map +1 -1
  167. package/dist/index171.js +24 -9
  168. package/dist/index171.js.map +1 -1
  169. package/dist/index172.js +8 -43
  170. package/dist/index172.js.map +1 -1
  171. package/dist/index173.js +4 -4
  172. package/dist/index173.js.map +1 -1
  173. package/dist/index174.js +5 -605
  174. package/dist/index174.js.map +1 -1
  175. package/dist/index175.js +4 -58
  176. package/dist/index175.js.map +1 -1
  177. package/dist/index176.js +466 -8
  178. package/dist/index176.js.map +1 -1
  179. package/dist/index177.js +178 -59
  180. package/dist/index177.js.map +1 -1
  181. package/dist/index178.js +105 -17
  182. package/dist/index178.js.map +1 -1
  183. package/dist/index179.js +260 -14
  184. package/dist/index179.js.map +1 -1
  185. package/dist/index18.js +431 -693
  186. package/dist/index18.js.map +1 -1
  187. package/dist/index180.js +9 -5
  188. package/dist/index180.js.map +1 -1
  189. package/dist/index181.js +41 -4
  190. package/dist/index181.js.map +1 -1
  191. package/dist/index182.js +4 -6
  192. package/dist/index182.js.map +1 -1
  193. package/dist/index183.js +24 -4
  194. package/dist/index183.js.map +1 -1
  195. package/dist/index184.js +29 -8
  196. package/dist/index184.js.map +1 -1
  197. package/dist/index185.js +5 -18
  198. package/dist/index185.js.map +1 -1
  199. package/dist/index186.js +67 -5
  200. package/dist/index186.js.map +1 -1
  201. package/dist/index187.js +180 -5
  202. package/dist/index187.js.map +1 -1
  203. package/dist/index188.js +46 -13
  204. package/dist/index188.js.map +1 -1
  205. package/dist/index189.js +58 -10
  206. package/dist/index189.js.map +1 -1
  207. package/dist/index19.js +661 -634
  208. package/dist/index19.js.map +1 -1
  209. package/dist/index190.js +8 -14
  210. package/dist/index190.js.map +1 -1
  211. package/dist/index191.js +66 -14
  212. package/dist/index191.js.map +1 -1
  213. package/dist/index192.js +19 -5
  214. package/dist/index192.js.map +1 -1
  215. package/dist/index193.js +16 -6
  216. package/dist/index193.js.map +1 -1
  217. package/dist/index194.js +5 -7
  218. package/dist/index194.js.map +1 -1
  219. package/dist/index195.js +5 -6
  220. package/dist/index195.js.map +1 -1
  221. package/dist/index196.js +6 -9
  222. package/dist/index196.js.map +1 -1
  223. package/dist/index197.js +4 -5
  224. package/dist/index197.js.map +1 -1
  225. package/dist/index198.js +7 -5
  226. package/dist/index198.js.map +1 -1
  227. package/dist/index199.js +17 -9
  228. package/dist/index199.js.map +1 -1
  229. package/dist/index2.js +2 -2
  230. package/dist/index20.js +455 -198
  231. package/dist/index20.js.map +1 -1
  232. package/dist/index200.js +5 -5
  233. package/dist/index200.js.map +1 -1
  234. package/dist/index201.js +5 -5
  235. package/dist/index201.js.map +1 -1
  236. package/dist/index202.js +13 -4
  237. package/dist/index202.js.map +1 -1
  238. package/dist/index203.js +9 -10
  239. package/dist/index203.js.map +1 -1
  240. package/dist/index204.js +14 -10
  241. package/dist/index204.js.map +1 -1
  242. package/dist/index205.js +14 -10
  243. package/dist/index205.js.map +1 -1
  244. package/dist/index206.js +5 -11
  245. package/dist/index206.js.map +1 -1
  246. package/dist/index207.js +6 -11
  247. package/dist/index207.js.map +1 -1
  248. package/dist/index208.js +6 -9
  249. package/dist/index208.js.map +1 -1
  250. package/dist/index209.js +6 -7
  251. package/dist/index209.js.map +1 -1
  252. package/dist/index21.js +263 -5
  253. package/dist/index21.js.map +1 -1
  254. package/dist/index210.js +9 -6
  255. package/dist/index210.js.map +1 -1
  256. package/dist/index211.js +5 -5
  257. package/dist/index211.js.map +1 -1
  258. package/dist/index212.js +5 -6
  259. package/dist/index212.js.map +1 -1
  260. package/dist/index213.js +9 -7
  261. package/dist/index213.js.map +1 -1
  262. package/dist/index214.js +5 -6
  263. package/dist/index214.js.map +1 -1
  264. package/dist/index215.js +5 -55
  265. package/dist/index215.js.map +1 -1
  266. package/dist/index216.js +4 -16
  267. package/dist/index216.js.map +1 -1
  268. package/dist/index217.js +11 -7
  269. package/dist/index217.js.map +1 -1
  270. package/dist/index218.js +10 -10
  271. package/dist/index218.js.map +1 -1
  272. package/dist/index219.js +10 -10
  273. package/dist/index219.js.map +1 -1
  274. package/dist/index22.js +5 -35
  275. package/dist/index22.js.map +1 -1
  276. package/dist/index220.js +11 -21
  277. package/dist/index220.js.map +1 -1
  278. package/dist/index221.js +11 -10
  279. package/dist/index221.js.map +1 -1
  280. package/dist/index222.js +10 -9
  281. package/dist/index222.js.map +1 -1
  282. package/dist/index223.js +7 -9
  283. package/dist/index223.js.map +1 -1
  284. package/dist/index224.js +6 -4
  285. package/dist/index224.js.map +1 -1
  286. package/dist/index225.js +5 -5
  287. package/dist/index225.js.map +1 -1
  288. package/dist/index226.js +6 -16
  289. package/dist/index226.js.map +1 -1
  290. package/dist/index227.js +7 -9
  291. package/dist/index227.js.map +1 -1
  292. package/dist/index228.js +6 -18
  293. package/dist/index228.js.map +1 -1
  294. package/dist/index229.js +54 -14
  295. package/dist/index229.js.map +1 -1
  296. package/dist/index23.js +27 -268
  297. package/dist/index23.js.map +1 -1
  298. package/dist/index230.js +16 -12
  299. package/dist/index230.js.map +1 -1
  300. package/dist/index231.js +7 -29
  301. package/dist/index231.js.map +1 -1
  302. package/dist/index232.js +9 -11
  303. package/dist/index232.js.map +1 -1
  304. package/dist/index233.js +9 -24
  305. package/dist/index233.js.map +1 -1
  306. package/dist/index234.js +21 -5
  307. package/dist/index234.js.map +1 -1
  308. package/dist/index235.js +10 -24
  309. package/dist/index235.js.map +1 -1
  310. package/dist/index236.js +10 -29
  311. package/dist/index236.js.map +1 -1
  312. package/dist/index237.js +10 -5
  313. package/dist/index237.js.map +1 -1
  314. package/dist/index238.js +4 -13
  315. package/dist/index238.js.map +1 -1
  316. package/dist/index239.js +5 -154
  317. package/dist/index239.js.map +1 -1
  318. package/dist/index24.js +251 -166
  319. package/dist/index24.js.map +1 -1
  320. package/dist/index240.js +15 -29
  321. package/dist/index240.js.map +1 -1
  322. package/dist/index241.js +9 -9
  323. package/dist/index241.js.map +1 -1
  324. package/dist/index242.js +18 -47
  325. package/dist/index242.js.map +1 -1
  326. package/dist/index243.js +15 -11
  327. package/dist/index243.js.map +1 -1
  328. package/dist/index244.js +12 -44
  329. package/dist/index244.js.map +1 -1
  330. package/dist/index245.js +28 -94
  331. package/dist/index245.js.map +1 -1
  332. package/dist/index246.js +11 -85
  333. package/dist/index246.js.map +1 -1
  334. package/dist/index247.js +23 -103
  335. package/dist/index247.js.map +1 -1
  336. package/dist/index248.js +5 -52
  337. package/dist/index248.js.map +1 -1
  338. package/dist/index249.js +13 -11
  339. package/dist/index249.js.map +1 -1
  340. package/dist/index25.js +176 -14
  341. package/dist/index25.js.map +1 -1
  342. package/dist/index250.js +149 -32
  343. package/dist/index250.js.map +1 -1
  344. package/dist/index251.js +30 -8
  345. package/dist/index251.js.map +1 -1
  346. package/dist/index252.js +9 -116
  347. package/dist/index252.js.map +1 -1
  348. package/dist/index253.js +46 -16
  349. package/dist/index253.js.map +1 -1
  350. package/dist/index254.js +11 -15
  351. package/dist/index254.js.map +1 -1
  352. package/dist/index255.js +44 -3
  353. package/dist/index255.js.map +1 -1
  354. package/dist/index256.js +91 -32
  355. package/dist/index256.js.map +1 -1
  356. package/dist/index257.js +85 -19
  357. package/dist/index257.js.map +1 -1
  358. package/dist/index258.js +105 -9
  359. package/dist/index258.js.map +1 -1
  360. package/dist/index259.js +52 -8
  361. package/dist/index259.js.map +1 -1
  362. package/dist/index26.js +15 -2763
  363. package/dist/index26.js.map +1 -1
  364. package/dist/index260.js +10 -18
  365. package/dist/index260.js.map +1 -1
  366. package/dist/index261.js +36 -27
  367. package/dist/index261.js.map +1 -1
  368. package/dist/index262.js +8 -16
  369. package/dist/index262.js.map +1 -1
  370. package/dist/index263.js +3 -67
  371. package/dist/index263.js.map +1 -1
  372. package/dist/index264.js +9 -180
  373. package/dist/index264.js.map +1 -1
  374. package/dist/index265.js +110 -40
  375. package/dist/index265.js.map +1 -1
  376. package/dist/index266.js +17 -4
  377. package/dist/index266.js.map +1 -1
  378. package/dist/index267.js +15 -18
  379. package/dist/index267.js.map +1 -1
  380. package/dist/index268.js +36 -12
  381. package/dist/index268.js.map +1 -1
  382. package/dist/index269.js +21 -5
  383. package/dist/index269.js.map +1 -1
  384. package/dist/index27.js +2761 -35
  385. package/dist/index27.js.map +1 -1
  386. package/dist/index270.js +9 -3
  387. package/dist/index270.js.map +1 -1
  388. package/dist/index271.js +19 -23
  389. package/dist/index271.js.map +1 -1
  390. package/dist/index272.js +26 -110
  391. package/dist/index272.js.map +1 -1
  392. package/dist/index273.js +16 -15
  393. package/dist/index273.js.map +1 -1
  394. package/dist/index274.js +5 -525
  395. package/dist/index274.js.map +1 -1
  396. package/dist/index275.js +3 -128
  397. package/dist/index275.js.map +1 -1
  398. package/dist/index276.js +22 -132
  399. package/dist/index276.js.map +1 -1
  400. package/dist/index277.js +111 -19
  401. package/dist/index277.js.map +1 -1
  402. package/dist/index278.js +15 -5
  403. package/dist/index278.js.map +1 -1
  404. package/dist/index279.js +524 -5
  405. package/dist/index279.js.map +1 -1
  406. package/dist/index28.js +2 -2
  407. package/dist/index280.js +128 -4
  408. package/dist/index280.js.map +1 -1
  409. package/dist/index281.js +132 -14
  410. package/dist/index281.js.map +1 -1
  411. package/dist/index282.js +4 -8
  412. package/dist/index282.js.map +1 -1
  413. package/dist/index283.js +19 -6
  414. package/dist/index283.js.map +1 -1
  415. package/dist/index284.js +12 -4
  416. package/dist/index284.js.map +1 -1
  417. package/dist/index285.js +19 -544
  418. package/dist/index285.js.map +1 -1
  419. package/dist/index286.js +65 -43
  420. package/dist/index286.js.map +1 -1
  421. package/dist/index287.js +9 -18
  422. package/dist/index287.js.map +1 -1
  423. package/dist/index288.js +14 -7
  424. package/dist/index288.js.map +1 -1
  425. package/dist/index289.js +66 -9
  426. package/dist/index289.js.map +1 -1
  427. package/dist/index29.js +33 -121
  428. package/dist/index29.js.map +1 -1
  429. package/dist/index290.js +64 -7
  430. package/dist/index290.js.map +1 -1
  431. package/dist/index291.js +5 -8
  432. package/dist/index291.js.map +1 -1
  433. package/dist/index292.js +5 -12
  434. package/dist/index292.js.map +1 -1
  435. package/dist/index293.js +4 -10
  436. package/dist/index293.js.map +1 -1
  437. package/dist/index294.js +15 -13
  438. package/dist/index294.js.map +1 -1
  439. package/dist/index295.js +8 -64
  440. package/dist/index295.js.map +1 -1
  441. package/dist/index296.js +6 -69
  442. package/dist/index296.js.map +1 -1
  443. package/dist/index297.js +5 -9
  444. package/dist/index297.js.map +1 -1
  445. package/dist/index298.js +545 -13
  446. package/dist/index298.js.map +1 -1
  447. package/dist/index299.js +45 -64
  448. package/dist/index299.js.map +1 -1
  449. package/dist/index3.js.map +1 -1
  450. package/dist/index30.js +3 -232
  451. package/dist/index30.js.map +1 -1
  452. package/dist/index300.js +17 -4
  453. package/dist/index300.js.map +1 -1
  454. package/dist/index301.js +7 -56
  455. package/dist/index301.js.map +1 -1
  456. package/dist/index302.js +9 -68
  457. package/dist/index302.js.map +1 -1
  458. package/dist/index303.js +8 -31
  459. package/dist/index303.js.map +1 -1
  460. package/dist/index304.js +9 -9
  461. package/dist/index304.js.map +1 -1
  462. package/dist/index305.js +13 -153
  463. package/dist/index305.js.map +1 -1
  464. package/dist/index306.js +10 -108
  465. package/dist/index306.js.map +1 -1
  466. package/dist/index307.js +13 -3
  467. package/dist/index307.js.map +1 -1
  468. package/dist/index308.js +3 -22
  469. package/dist/index308.js.map +1 -1
  470. package/dist/index309.js +22 -15
  471. package/dist/index309.js.map +1 -1
  472. package/dist/index31.js +123 -22
  473. package/dist/index31.js.map +1 -1
  474. package/dist/index310.js +4 -28
  475. package/dist/index310.js.map +1 -1
  476. package/dist/index311.js +56 -13
  477. package/dist/index311.js.map +1 -1
  478. package/dist/index312.js +68 -7
  479. package/dist/index312.js.map +1 -1
  480. package/dist/index313.js +30 -22
  481. package/dist/index313.js.map +1 -1
  482. package/dist/index314.js +9 -13
  483. package/dist/index314.js.map +1 -1
  484. package/dist/index315.js +151 -26
  485. package/dist/index315.js.map +1 -1
  486. package/dist/index316.js +107 -4
  487. package/dist/index316.js.map +1 -1
  488. package/dist/index317.js +26 -0
  489. package/dist/index317.js.map +1 -0
  490. package/dist/index318.js +16 -0
  491. package/dist/index318.js.map +1 -0
  492. package/dist/index319.js +31 -0
  493. package/dist/index319.js.map +1 -0
  494. package/dist/index32.js +230 -49
  495. package/dist/index32.js.map +1 -1
  496. package/dist/index320.js +8 -0
  497. package/dist/index320.js.map +1 -0
  498. package/dist/index321.js +19 -0
  499. package/dist/index321.js.map +1 -0
  500. package/dist/index322.js +32 -0
  501. package/dist/index322.js.map +1 -0
  502. package/dist/index323.js +16 -0
  503. package/dist/index323.js.map +1 -0
  504. package/dist/index324.js +10 -0
  505. package/dist/index324.js.map +1 -0
  506. package/dist/index33.js +20 -2637
  507. package/dist/index33.js.map +1 -1
  508. package/dist/index34.js +47 -390
  509. package/dist/index34.js.map +1 -1
  510. package/dist/index35.js +2604 -196
  511. package/dist/index35.js.map +1 -1
  512. package/dist/index36.js +390 -18
  513. package/dist/index36.js.map +1 -1
  514. package/dist/index37.js +222 -131
  515. package/dist/index37.js.map +1 -1
  516. package/dist/index38.js +18 -183
  517. package/dist/index38.js.map +1 -1
  518. package/dist/index39.js +118 -65
  519. package/dist/index39.js.map +1 -1
  520. package/dist/index4.js +17 -15
  521. package/dist/index4.js.map +1 -1
  522. package/dist/index40.js +216 -93
  523. package/dist/index40.js.map +1 -1
  524. package/dist/index41.js +90 -5
  525. package/dist/index41.js.map +1 -1
  526. package/dist/index42.js +115 -840
  527. package/dist/index42.js.map +1 -1
  528. package/dist/index43.js +6 -66
  529. package/dist/index43.js.map +1 -1
  530. package/dist/index44.js +843 -7
  531. package/dist/index44.js.map +1 -1
  532. package/dist/index45.js +57 -2
  533. package/dist/index45.js.map +1 -1
  534. package/dist/index46.js +7 -23
  535. package/dist/index46.js.map +1 -1
  536. package/dist/index47.js +2 -234
  537. package/dist/index47.js.map +1 -1
  538. package/dist/index48.js +11 -6
  539. package/dist/index48.js.map +1 -1
  540. package/dist/index49.js +18 -33
  541. package/dist/index49.js.map +1 -1
  542. package/dist/index5.js +34 -34
  543. package/dist/index5.js.map +1 -1
  544. package/dist/index50.js +7 -26
  545. package/dist/index50.js.map +1 -1
  546. package/dist/index51.js +2 -8
  547. package/dist/index51.js.map +1 -1
  548. package/dist/index52.js +22 -10
  549. package/dist/index52.js.map +1 -1
  550. package/dist/index53.js +233 -3
  551. package/dist/index53.js.map +1 -1
  552. package/dist/index54.js +201 -44
  553. package/dist/index54.js.map +1 -1
  554. package/dist/index55.js +3 -50
  555. package/dist/index55.js.map +1 -1
  556. package/dist/index56.js +6 -7
  557. package/dist/index56.js.map +1 -1
  558. package/dist/index57.js +47 -14
  559. package/dist/index57.js.map +1 -1
  560. package/dist/index58.js +22 -129
  561. package/dist/index58.js.map +1 -1
  562. package/dist/index59.js +50 -10
  563. package/dist/index59.js.map +1 -1
  564. package/dist/index6.js +172 -25
  565. package/dist/index6.js.map +1 -1
  566. package/dist/index60.js +7 -216
  567. package/dist/index60.js.map +1 -1
  568. package/dist/index61.js +15 -13
  569. package/dist/index61.js.map +1 -1
  570. package/dist/index62.js +128 -41
  571. package/dist/index62.js.map +1 -1
  572. package/dist/index63.js +9 -48
  573. package/dist/index63.js.map +1 -1
  574. package/dist/index64.js +216 -3
  575. package/dist/index64.js.map +1 -1
  576. package/dist/index65.js +13 -6
  577. package/dist/index65.js.map +1 -1
  578. package/dist/index66.js +34 -28
  579. package/dist/index66.js.map +1 -1
  580. package/dist/index67.js +46 -49
  581. package/dist/index67.js.map +1 -1
  582. package/dist/index68.js +8 -9
  583. package/dist/index68.js.map +1 -1
  584. package/dist/index69.js +50 -2
  585. package/dist/index69.js.map +1 -1
  586. package/dist/index7.js +31 -29
  587. package/dist/index7.js.map +1 -1
  588. package/dist/index70.js +4 -2
  589. package/dist/index70.js.map +1 -1
  590. package/dist/index71.js +6 -205
  591. package/dist/index71.js.map +1 -1
  592. package/dist/index72.js +28 -54
  593. package/dist/index72.js.map +1 -1
  594. package/dist/index73.js +50 -6
  595. package/dist/index73.js.map +1 -1
  596. package/dist/index74.js +9 -8
  597. package/dist/index74.js.map +1 -1
  598. package/dist/index75.js +2 -6
  599. package/dist/index75.js.map +1 -1
  600. package/dist/index76.js +2 -52
  601. package/dist/index76.js.map +1 -1
  602. package/dist/index77.js +11 -4
  603. package/dist/index77.js.map +1 -1
  604. package/dist/index78.js +5 -4
  605. package/dist/index78.js.map +1 -1
  606. package/dist/index79.js +7 -15
  607. package/dist/index79.js.map +1 -1
  608. package/dist/index8.js +25 -222
  609. package/dist/index8.js.map +1 -1
  610. package/dist/index80.js +5 -5
  611. package/dist/index80.js.map +1 -1
  612. package/dist/index81.js +2 -8
  613. package/dist/index81.js.map +1 -1
  614. package/dist/index82.js +2 -17
  615. package/dist/index82.js.map +1 -1
  616. package/dist/index83.js +53 -4
  617. package/dist/index83.js.map +1 -1
  618. package/dist/index84.js +46 -4
  619. package/dist/index84.js.map +1 -1
  620. package/dist/index85.js +205 -5
  621. package/dist/index85.js.map +1 -1
  622. package/dist/index86.js +22 -6
  623. package/dist/index86.js.map +1 -1
  624. package/dist/index87.js +24 -4
  625. package/dist/index87.js.map +1 -1
  626. package/dist/index88.js +399 -4
  627. package/dist/index88.js.map +1 -1
  628. package/dist/index89.js +46 -6
  629. package/dist/index89.js.map +1 -1
  630. package/dist/index9.js +177 -23
  631. package/dist/index9.js.map +1 -1
  632. package/dist/index90.js +604 -23
  633. package/dist/index90.js.map +1 -1
  634. package/dist/index91.js +52 -7
  635. package/dist/index91.js.map +1 -1
  636. package/dist/index92.js +3 -3
  637. package/dist/index92.js.map +1 -1
  638. package/dist/index93.js +4 -6
  639. package/dist/index93.js.map +1 -1
  640. package/dist/index94.js +15 -5
  641. package/dist/index94.js.map +1 -1
  642. package/dist/index95.js +5 -4
  643. package/dist/index95.js.map +1 -1
  644. package/dist/index96.js +7 -5
  645. package/dist/index96.js.map +1 -1
  646. package/dist/index97.js +16 -4
  647. package/dist/index97.js.map +1 -1
  648. package/dist/index98.js +4 -8
  649. package/dist/index98.js.map +1 -1
  650. package/dist/index99.js +4 -5
  651. package/dist/index99.js.map +1 -1
  652. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index19.js","sources":["../src/components/PhoneNumberInput/index.tsx"],"sourcesContent":["import * as React from \"react\"\nimport type { CountryCode } from \"libphonenumber-js\"\nimport { getCountryCallingCode } from \"libphonenumber-js\"\nimport Select, {\n type Props as SelectProps,\n type SingleValue,\n type StylesConfig,\n} from \"react-select\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputProps,\n PhoneNumberSelectedCountry,\n} from \"./types\"\nimport { resolveMessages } from \"./messages\"\nimport {\n DEFAULT_COUNTRY,\n COMMON_IDD_PREFIXES,\n buildFallbackSelectedCountry,\n getCachedCountryOptions,\n getLocaleCacheKey,\n getValidCountry,\n normalizeSearchValue,\n optionMatchIndex,\n parseLocaleCacheKey,\n toSelectedCountry,\n} from \"./country-options\"\nimport {\n detectNationalPrefixForDisplay,\n formatWithAsYouType,\n getLengthIssue,\n getSuggestionState,\n injectNationalPrefixDisplay,\n normalizeInputValue,\n sanitizeDigits,\n shouldDisplayExplicitCountrySelection,\n stripPrefix,\n type LengthIssue,\n} from \"./normalization\"\nimport {\n captureSelectionSnapshot,\n resolveSelection,\n skipFormattingCharactersLeft,\n skipFormattingCharactersRight,\n} from \"./selection\"\nimport {\n HiddenControl,\n NullComponent,\n SuggestionContext,\n SuggestionOption,\n formatCountryOption,\n suggestionSelectStyles,\n type SuggestionContextValue,\n} from \"./suggestions\"\n\n\nexport type {\n CountryOption,\n PhoneNumberChangeDetails,\n PhoneNumberInputMessages,\n PhoneNumberInputProps,\n PhoneNumberInputValidationCode,\n PhoneNumberSelectedCountry,\n} from \"./types\"\n\nexport const PhoneNumberInput = React.forwardRef<HTMLInputElement, PhoneNumberInputProps>(\n function PhoneNumberInput(props, forwardedRef) {\n const {\n value,\n defaultCountry,\n country: countryProp,\n locale,\n onChange,\n onCountryChange,\n className,\n inputClassName,\n disabled,\n readOnly,\n selectProps,\n autofillShimName,\n messages: messagesProp,\n renderValidationMessage,\n ...restProps\n } = props\n\n const {\n onFocus: onInputFocus,\n onBlur: onInputBlur,\n onKeyDown: onInputKeyDown,\n name: inputName,\n autoComplete: inputAutoComplete,\n ...restInputProps\n } = restProps\n\n const hasConfiguredCountry =\n typeof defaultCountry === \"string\" || typeof countryProp === \"string\"\n\n const localeCacheKey = getLocaleCacheKey(locale)\n const localeForBuild = React.useMemo(\n () => parseLocaleCacheKey(localeCacheKey),\n [localeCacheKey]\n )\n const resolvedMessages = React.useMemo(\n () => resolveMessages(localeForBuild, messagesProp),\n [localeForBuild, messagesProp]\n )\n const countryOptions = React.useMemo(\n () => getCachedCountryOptions(localeForBuild, localeCacheKey),\n [localeCacheKey, localeForBuild]\n )\n const resolveSelectedCountry = React.useCallback(\n (country: CountryCode): PhoneNumberSelectedCountry => {\n const match = countryOptions.find((candidate) => candidate.value === country)\n if (match) {\n return toSelectedCountry(match)\n }\n return buildFallbackSelectedCountry(country)\n },\n [countryOptions]\n )\n const fallbackCountry = React.useMemo(() => {\n const candidate = getValidCountry(defaultCountry ?? countryProp ?? DEFAULT_COUNTRY)\n if (countryOptions.some((option) => option.value === candidate)) {\n return candidate\n }\n return countryOptions[0]?.value ?? DEFAULT_COUNTRY\n }, [countryOptions, countryProp, defaultCountry])\n\n const hasResolvedCountryRef = React.useRef<boolean>(hasConfiguredCountry)\n\n const initialStateRef = React.useRef<{\n country: CountryCode\n inputValue: string\n normalizedValue: string\n hasExplicitCountrySelection: boolean\n } | null>(null)\n const lastNormalizedRef = React.useRef<string>(\"\")\n\n if (!initialStateRef.current) {\n if (!value) {\n initialStateRef.current = {\n country: fallbackCountry,\n inputValue: \"\",\n normalizedValue: \"\",\n hasExplicitCountrySelection: false,\n }\n lastNormalizedRef.current = \"\"\n } else {\n const baseCountryForInit = hasConfiguredCountry ? fallbackCountry : undefined\n const normalized = normalizeInputValue(value, baseCountryForInit, { allowJustPlus: true })\n if (!normalized) {\n initialStateRef.current = {\n country: fallbackCountry,\n inputValue: \"\",\n normalizedValue: \"\",\n hasExplicitCountrySelection: false,\n }\n lastNormalizedRef.current = \"\"\n } else {\n const {\n international,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForInit)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let resolvedCountry = canonicalDetectedCountry ?? fallbackCountry\n const rawDigits = sanitizeDigits(value ?? \"\")\n const hasExplicitPlus = typeof value === \"string\" ? /^\\s*\\+/.test(value) : false\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(resolvedCountry)\n const initialHasPrefix = detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForInit,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasPrefix,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n\n\n if (inferredCountryToApply) {\n resolvedCountry = inferredCountryToApply\n }\n\n const resolvedFromValue =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromValue) {\n hasResolvedCountryRef.current = true\n }\n\n const nextDialCode = getCountryCallingCode(resolvedCountry)\n const finalHasPrefix = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasPrefix\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: finalHasPrefix,\n })\n\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n const allowInlineFlag = hasResolvedCountryRef.current\n initialStateRef.current = {\n country: resolvedCountry,\n inputValue: displayValue,\n normalizedValue: normalized,\n hasExplicitCountrySelection:\n allowInlineFlag &&\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n }),\n }\n lastNormalizedRef.current = normalized\n }\n }\n }\n\n const initialState = initialStateRef.current\n\n const [uncontrolledCountry, setUncontrolledCountry] = React.useState(initialState.country)\n const [inputValueState, setInputValueState] = React.useState(initialState.inputValue)\n const [countryQuery, setCountryQuery] = React.useState(\"\")\n const [showSuggestions, setShowSuggestions] = React.useState(false)\n const [highlightedIndex, setHighlightedIndex] = React.useState<number>(-1)\n const [isFocused, setIsFocused] = React.useState(false)\n const [lengthIssue, setLengthIssue] = React.useState<LengthIssue | null>(null)\n const [hasExplicitCountrySelection, setHasExplicitCountrySelection] = React.useState(\n initialState.hasExplicitCountrySelection\n )\n const manualSelectionCountryRef = React.useRef<CountryCode | null>(null)\n\n const keyboardBufferRef = React.useRef(\"\")\n const bufferTimeoutRef = React.useRef<number | null>(null)\n const scrollBehaviorRef = React.useRef<ScrollBehavior>(\"smooth\")\n const pendingSelectionRef = React.useRef<{ start: number; end: number } | null>(null)\n const consumeScrollBehavior = React.useCallback(() => {\n const behavior = scrollBehaviorRef.current\n scrollBehaviorRef.current = \"smooth\"\n return behavior\n }, [])\n\n const isCountryControlled = typeof countryProp === \"string\"\n const selectedCountry = isCountryControlled ? countryProp : uncontrolledCountry\n const activeCountry = selectedCountry ?? fallbackCountry\n\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n React.useImperativeHandle(forwardedRef, () => inputRef.current as HTMLInputElement, [])\n\n React.useLayoutEffect(() => {\n const selection = pendingSelectionRef.current\n if (!selection) {\n return\n }\n\n const input = inputRef.current\n pendingSelectionRef.current = null\n if (!input) {\n return\n }\n\n const { start, end } = selection\n input.setSelectionRange(start, end)\n }, [inputValueState])\n\n const selectOverrides = selectProps ?? {}\n const {\n styles: userSelectStyles,\n components: userSelectComponents,\n classNamePrefix: userClassNamePrefix,\n formatOptionLabel: userFormatOptionLabel,\n ...forwardedSelectProps\n } = selectOverrides\n const { noOptionsMessage, ...restForwardedSelectProps } = forwardedSelectProps\n\n const mergedSelectStyles = React.useMemo<StylesConfig<CountryOption, false>>(\n () => ({\n ...suggestionSelectStyles,\n ...(userSelectStyles ?? {}),\n }),\n [userSelectStyles]\n )\n\n const mergedSelectComponents = React.useMemo(() => {\n const baseComponents = {\n Control: HiddenControl,\n IndicatorsContainer: NullComponent,\n DropdownIndicator: NullComponent,\n IndicatorSeparator: NullComponent,\n ValueContainer: NullComponent,\n }\n\n const overrides = userSelectComponents ?? {}\n\n if (!overrides.Option) {\n return {\n ...baseComponents,\n ...overrides,\n Option: SuggestionOption,\n }\n }\n\n return {\n ...baseComponents,\n ...overrides,\n }\n }, [userSelectComponents])\n\n const hasAnnouncedCountryRef = React.useRef(false)\n\n const notifyCountryChange = React.useCallback(\n (country: CountryCode) => {\n hasAnnouncedCountryRef.current = true\n const selection = resolveSelectedCountry(country)\n onCountryChange?.(country, selection)\n return selection\n },\n [onCountryChange, resolveSelectedCountry]\n )\n\n React.useEffect(() => () => {\n if (bufferTimeoutRef.current != null && typeof window !== \"undefined\") {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n }, [])\n\n React.useEffect(() => {\n if (value == null) {\n return\n }\n\n const baseCountryForSync = hasResolvedCountryRef.current ? activeCountry : undefined\n const previousNormalized = lastNormalizedRef.current\n const normalized = normalizeInputValue(value, baseCountryForSync, {\n allowJustPlus: true,\n previousValue: previousNormalized,\n })\n lastNormalizedRef.current = normalized\n keyboardBufferRef.current = \"\"\n\n if (!normalized) {\n setInputValueState(\"\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n return\n }\n\n if (normalized === \"0\") {\n setInputValueState(\"0\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n return\n }\n\n if (normalized === \"+\") {\n setInputValueState(\"+\")\n setShowSuggestions(true)\n setCountryQuery(\"\")\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n return\n }\n\n const {\n international,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForSync)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let nextCountry = canonicalDetectedCountry ?? baseCountryForSync ?? activeCountry\n const rawDigits = sanitizeDigits(value ?? \"\")\n const hasExplicitPlus = typeof value === \"string\" ? /^\\s*\\+/.test(value) : false\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(nextCountry)\n const initialHasTypedTrunk = detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForSync,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasTypedTrunk,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n const finalCountry = inferredCountryToApply ?? nextCountry\n\n const resolvedFromValue =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromValue) {\n hasResolvedCountryRef.current = true\n }\n\n if (!isCountryControlled && finalCountry !== uncontrolledCountry) {\n setUncontrolledCountry(finalCountry)\n notifyCountryChange(finalCountry)\n }\n\n nextCountry = finalCountry\n\n if (\n manualSelectionCountryRef.current &&\n manualSelectionCountryRef.current !== nextCountry\n ) {\n manualSelectionCountryRef.current = null\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n const hasTypedTrunk = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n rawDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasTypedTrunk\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: hasTypedTrunk,\n })\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n const manualSelectionActive = manualSelectionCountryRef.current != null\n const shouldShowInlineFlag =\n manualSelectionActive ||\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n })\n\n setInputValueState(displayValue)\n setShowSuggestions(suggestion.shouldSuggest)\n setCountryQuery(suggestion.query)\n setLengthIssue(hasResolvedCountryRef.current ? getLengthIssue(normalized, nextCountry) : null)\n setHasExplicitCountrySelection(hasResolvedCountryRef.current && shouldShowInlineFlag)\n }, [\n value,\n activeCountry,\n fallbackCountry,\n hasConfiguredCountry,\n isCountryControlled,\n notifyCountryChange,\n uncontrolledCountry,\n ])\n\n React.useEffect(() => {\n if (hasAnnouncedCountryRef.current) {\n return\n }\n if (!hasResolvedCountryRef.current) {\n return\n }\n const current = selectedCountry ?? fallbackCountry\n if (!current) {\n return\n }\n notifyCountryChange(current)\n }, [fallbackCountry, notifyCountryChange, selectedCountry])\n\n React.useEffect(() => {\n if (isCountryControlled && countryProp && countryProp !== uncontrolledCountry) {\n setUncontrolledCountry(countryProp)\n }\n }, [countryProp, isCountryControlled, uncontrolledCountry])\n\n const emitChange = React.useCallback(\n (details: Omit<PhoneNumberChangeDetails, \"selectedCountry\">) => {\n const selection = resolveSelectedCountry(details.country)\n onChange?.({\n ...details,\n selectedCountry: selection,\n })\n },\n [onChange, resolveSelectedCountry]\n )\n\n const scheduleBufferReset = React.useCallback(() => {\n if (typeof window === \"undefined\") {\n return\n }\n\n if (bufferTimeoutRef.current != null) {\n window.clearTimeout(bufferTimeoutRef.current)\n }\n\n bufferTimeoutRef.current = window.setTimeout(() => {\n keyboardBufferRef.current = \"\"\n bufferTimeoutRef.current = null\n }, 800)\n }, [])\n\n const handleInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const target = event.target\n const snapshot = captureSelectionSnapshot(target)\n const raw = target.value\n keyboardBufferRef.current = \"\"\n\n const baseCountryForInput = hasResolvedCountryRef.current ? activeCountry : undefined\n const dialCode = baseCountryForInput ? getCountryCallingCode(baseCountryForInput) : \"\"\n const typedDigits = sanitizeDigits(raw)\n const hasExplicitPlus = raw.trim().startsWith(\"+\")\n const startsWithDialCode = dialCode ? typedDigits.startsWith(dialCode) : false\n const hasLeadingZero = typedDigits.startsWith(\"0\")\n const isIddPrefix = COMMON_IDD_PREFIXES.some((prefix) => typedDigits.startsWith(prefix))\n\n const shouldRemoveNationalPrefix =\n Boolean(baseCountryForInput) &&\n !isIddPrefix &&\n ((startsWithDialCode && typedDigits.slice(dialCode.length).startsWith(\"0\")) ||\n (!hasExplicitPlus && hasLeadingZero && typedDigits.length > 1) ||\n (hasExplicitPlus && hasLeadingZero && typedDigits.length > 1 && !startsWithDialCode))\n\n const previousNormalized = lastNormalizedRef.current\n const normalized = normalizeInputValue(raw, baseCountryForInput, {\n allowJustPlus: true,\n removeNationalPrefix: shouldRemoveNationalPrefix,\n previousValue: previousNormalized,\n })\n lastNormalizedRef.current = normalized\n\n if (!normalized) {\n setInputValueState(\"\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"\",\n formattedNational: \"\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"\",\n rawInput: \"\",\n isValid: false,\n })\n return\n }\n\n if (normalized === \"0\") {\n setInputValueState(\"0\")\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"0\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"0\",\n formattedNational: \"0\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"0\",\n rawInput: \"0\",\n isValid: false,\n })\n return\n }\n\n if (normalized === \"+\") {\n setInputValueState(\"+\")\n setShowSuggestions(true)\n setCountryQuery(\"\")\n setHighlightedIndex(0)\n setLengthIssue(null)\n manualSelectionCountryRef.current = null\n setHasExplicitCountrySelection(false)\n pendingSelectionRef.current = resolveSelection(snapshot, \"+\")\n\n const nextCountry = hasConfiguredCountry ? fallbackCountry : activeCountry\n\n if (!isCountryControlled && uncontrolledCountry !== nextCountry) {\n setUncontrolledCountry(nextCountry)\n notifyCountryChange(nextCountry)\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n emitChange({\n formattedInternational: \"+\",\n formattedNational: \"\",\n e164: null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: \"\",\n rawInput: \"+\",\n isValid: false,\n })\n return\n }\n\n const {\n international,\n national,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n } = formatWithAsYouType(normalized, baseCountryForInput)\n const canonicalDetectedCountry = detectedCountry ?? undefined\n let nextCountry = canonicalDetectedCountry ?? baseCountryForInput ?? activeCountry\n\n const internationalDigits = sanitizeDigits(international)\n const initialDialCode = getCountryCallingCode(nextCountry)\n const initialHasTypedTrunk = detectNationalPrefixForDisplay(\n typedDigits,\n internationalDigits,\n initialDialCode,\n hasExplicitPlus\n )\n\n const suggestion = getSuggestionState(\n normalized,\n baseCountryForInput,\n phoneNumber ?? undefined,\n {\n hasRemovedNationalPrefix: initialHasTypedTrunk,\n detectedCountry: canonicalDetectedCountry,\n hasExplicitInternationalPrefix,\n }\n )\n\n const inferredCountryToApply =\n !suggestion.shouldSuggest && !canonicalDetectedCountry ? inferredCountry : undefined\n const finalCountry = inferredCountryToApply ?? nextCountry\n\n const resolvedFromInput =\n Boolean(canonicalDetectedCountry) || Boolean(inferredCountryToApply)\n if (resolvedFromInput) {\n hasResolvedCountryRef.current = true\n }\n\n if (!isCountryControlled && finalCountry !== uncontrolledCountry) {\n setUncontrolledCountry(finalCountry)\n notifyCountryChange(finalCountry)\n }\n\n nextCountry = finalCountry\n\n if (\n manualSelectionCountryRef.current &&\n manualSelectionCountryRef.current !== nextCountry\n ) {\n manualSelectionCountryRef.current = null\n }\n\n const nextDialCode = getCountryCallingCode(nextCountry)\n const normalizedDigits = sanitizeDigits(normalized)\n const nationalDigits = stripPrefix(normalizedDigits, nextDialCode)\n const hasTypedTrunk = inferredCountryToApply\n ? detectNationalPrefixForDisplay(\n typedDigits,\n internationalDigits,\n nextDialCode,\n hasExplicitPlus\n )\n : initialHasTypedTrunk\n\n const displayValue = injectNationalPrefixDisplay(international, nextDialCode, {\n force: hasTypedTrunk,\n })\n\n const displayDetectedCountry = canonicalDetectedCountry ?? undefined\n\n pendingSelectionRef.current = resolveSelection(snapshot, displayValue)\n setInputValueState(displayValue)\n setShowSuggestions(suggestion.shouldSuggest)\n setCountryQuery(suggestion.query)\n setHighlightedIndex(suggestion.shouldSuggest ? 0 : -1)\n setLengthIssue(hasResolvedCountryRef.current ? getLengthIssue(normalized, nextCountry) : null)\n const manualSelectionActive = manualSelectionCountryRef.current != null\n const shouldShowInlineFlag =\n manualSelectionActive ||\n shouldDisplayExplicitCountrySelection(suggestion, {\n detectedCountry: displayDetectedCountry,\n hasExplicitInternationalPrefix,\n })\n setHasExplicitCountrySelection(hasResolvedCountryRef.current && shouldShowInlineFlag)\n emitChange({\n formattedInternational: international,\n formattedNational: national,\n e164: phoneNumber?.number ?? null,\n country: nextCountry,\n countryCallingCode: nextDialCode,\n nationalNumber: nationalDigits,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n })\n },\n [\n activeCountry,\n emitChange,\n fallbackCountry,\n hasConfiguredCountry,\n isCountryControlled,\n notifyCountryChange,\n uncontrolledCountry,\n ]\n )\n\n const handleCountrySelect = React.useCallback(\n (option: SingleValue<CountryOption>) => {\n if (!option) {\n return\n }\n\n const previousDigits = sanitizeDigits(lastNormalizedRef.current || inputValueState)\n const currentDial = getCountryCallingCode(activeCountry)\n const digitsWithoutCurrentDial = previousDigits.startsWith(currentDial)\n ? previousDigits.slice(currentDial.length)\n : previousDigits\n let rebasedDigits = digitsWithoutCurrentDial\n if (!rebasedDigits) {\n rebasedDigits = option.dialCode\n } else if (!rebasedDigits.startsWith(option.dialCode)) {\n rebasedDigits = `${option.dialCode}${rebasedDigits}`\n }\n const normalized = `+${rebasedDigits}`\n lastNormalizedRef.current = normalized\n const { international, national, phoneNumber } = formatWithAsYouType(\n normalized,\n option.value\n )\n const nextCountry = option.value\n manualSelectionCountryRef.current = nextCountry\n hasResolvedCountryRef.current = true\n\n setInputValueState(international)\n pendingSelectionRef.current = {\n start: international.length,\n end: international.length,\n }\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(getLengthIssue(normalized, nextCountry))\n\n if (!isCountryControlled && nextCountry !== uncontrolledCountry) {\n setUncontrolledCountry(nextCountry)\n }\n\n notifyCountryChange(nextCountry)\n\n const normalizedDigits = sanitizeDigits(normalized)\n const dialCode = phoneNumber?.countryCallingCode ?? option.dialCode\n const nationalDigits = stripPrefix(normalizedDigits, dialCode)\n setHasExplicitCountrySelection(true)\n emitChange({\n formattedInternational: international,\n formattedNational: national,\n e164: phoneNumber?.number ?? null,\n country: nextCountry,\n countryCallingCode: dialCode,\n nationalNumber: nationalDigits,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n })\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n },\n [activeCountry, emitChange, inputValueState, isCountryControlled, notifyCountryChange, uncontrolledCountry]\n )\n\n const filteredOptions = React.useMemo(() => {\n if (!showSuggestions) {\n return [] as CountryOption[]\n }\n\n const results: CountryOption[] = []\n\n const pushUnique = (option: CountryOption) => {\n if (!results.some((existing) => existing.value === option.value)) {\n results.push(option)\n }\n }\n\n const fallbackOption = countryOptions.find((option) => option.value === fallbackCountry)\n const currentOption = countryOptions.find((option) => option.value === activeCountry)\n const query = countryQuery.trim()\n const digitQuery = sanitizeDigits(query)\n const normalizedQuery = normalizeSearchValue(query)\n\n if (!digitQuery && !normalizedQuery) {\n if (fallbackOption) {\n pushUnique(fallbackOption)\n }\n if (currentOption) {\n pushUnique(currentOption)\n }\n countryOptions.forEach(pushUnique)\n return results\n }\n\n if (digitQuery) {\n const dialMatches = countryOptions\n .filter((option) => option.dialCode.startsWith(digitQuery))\n .sort((a, b) => {\n const aExact = a.dialCode === digitQuery\n const bExact = b.dialCode === digitQuery\n if (aExact && !bExact) {\n return -1\n }\n if (!aExact && bExact) {\n return 1\n }\n return a.dialCode.length - b.dialCode.length\n })\n dialMatches.forEach(pushUnique)\n }\n\n if (normalizedQuery) {\n const nameMatches = countryOptions\n .filter((option) =>\n option.normalizedSearchableTokens.some((token) => token.includes(normalizedQuery))\n )\n .sort((a, b) => {\n const aIndex = optionMatchIndex(a.normalizedSearchableTokens, normalizedQuery)\n const bIndex = optionMatchIndex(b.normalizedSearchableTokens, normalizedQuery)\n if (aIndex !== bIndex) {\n return aIndex - bIndex\n }\n return a.name.localeCompare(b.name)\n })\n nameMatches.forEach(pushUnique)\n }\n\n if (currentOption) {\n pushUnique(currentOption)\n }\n if (fallbackOption) {\n pushUnique(fallbackOption)\n }\n if (results.length === 0) {\n countryOptions.forEach(pushUnique)\n }\n\n return results\n }, [activeCountry, countryOptions, countryQuery, fallbackCountry, showSuggestions])\n\n const suggestionMenuIsOpen = isFocused && showSuggestions && filteredOptions.length > 0\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [suggestionMenuIsOpen])\n\n React.useEffect(() => {\n if (!suggestionMenuIsOpen) {\n setHighlightedIndex(-1)\n return\n }\n\n if (filteredOptions.length === 0) {\n setHighlightedIndex(-1)\n return\n }\n\n setHighlightedIndex((current) => {\n if (current < 0 || current >= filteredOptions.length) {\n return 0\n }\n return current\n })\n }, [filteredOptions, suggestionMenuIsOpen])\n\n const highlightedOption =\n highlightedIndex >= 0 ? filteredOptions[highlightedIndex] ?? null : null\n React.useEffect(() => {\n if (highlightedIndex < 0) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [highlightedIndex])\n\n const updateHighlightedOption = React.useCallback(\n (option: CountryOption) => {\n const index = filteredOptions.findIndex((candidate) => candidate.value === option.value)\n if (index !== -1) {\n setHighlightedIndex(index)\n }\n },\n [filteredOptions]\n )\n\n const selectFormatOptionLabel = React.useCallback<\n NonNullable<SelectProps<CountryOption, false>[\"formatOptionLabel\"]>\n >(\n (option, meta) => {\n if (userFormatOptionLabel) {\n return userFormatOptionLabel(option, meta)\n }\n return formatCountryOption(option)\n },\n [userFormatOptionLabel]\n )\n\n const optionLabelRenderer = React.useCallback(\n (option: CountryOption) =>\n selectFormatOptionLabel(option, {\n context: \"menu\",\n inputValue: countryQuery,\n selectValue: [],\n }),\n [countryQuery, selectFormatOptionLabel]\n )\n\n const highlightContextValue = React.useMemo<SuggestionContextValue>(\n () => ({\n highlightedValue: highlightedOption?.value ?? null,\n setHighlightedOption: updateHighlightedOption,\n renderOptionLabel: optionLabelRenderer,\n consumeScrollBehavior,\n }),\n [consumeScrollBehavior, highlightedOption, optionLabelRenderer, updateHighlightedOption]\n )\n\n const activeOption = countryOptions.find((option) => option.value === activeCountry)\n const activeFlag = activeOption?.flag ?? \"\"\n const inlineFlagLabel = hasExplicitCountrySelection\n ? resolvedMessages.selectedCountryLabel(activeOption?.name ?? activeCountry ?? null)\n : resolvedMessages.selectCountryLabel\n const hasInlineFlag = hasExplicitCountrySelection && Boolean(activeFlag)\n const lengthHint =\n lengthIssue === \"TOO_LONG\"\n ? resolvedMessages.lengthTooLong(activeOption?.name ?? activeCountry ?? null)\n : null\n const countryName = activeOption?.name ?? activeCountry ?? null\n\n let validationNode: React.ReactNode = null\n if (lengthHint) {\n const rendered = renderValidationMessage?.({\n message: lengthHint,\n code: \"TOO_LONG\",\n countryName,\n })\n validationNode =\n rendered === undefined ? (\n <p className=\"mt-1 text-xs text-destructive\">\n <span>{lengthHint}</span>\n </p>\n ) : (\n rendered\n )\n }\n\n const appendToBuffer = React.useCallback(\n (char: string) => {\n keyboardBufferRef.current = `${keyboardBufferRef.current}${char}`.slice(-12)\n setCountryQuery(keyboardBufferRef.current)\n setShowSuggestions(true)\n scheduleBufferReset()\n },\n [scheduleBufferReset]\n )\n\n const popBuffer = React.useCallback(() => {\n const current = keyboardBufferRef.current\n if (!current) {\n return\n }\n keyboardBufferRef.current = current.slice(0, -1)\n setCountryQuery(keyboardBufferRef.current)\n if (keyboardBufferRef.current) {\n scheduleBufferReset()\n }\n }, [scheduleBufferReset])\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n onInputKeyDown?.(event)\n if (event.defaultPrevented) {\n return\n }\n\n const key = event.key\n\n if (event.metaKey || event.ctrlKey || event.altKey) {\n return\n }\n\n const target = event.currentTarget\n const value = target.value\n const selectionStart = target.selectionStart ?? 0\n const selectionEnd = target.selectionEnd ?? selectionStart\n const isCollapsedSelection = selectionStart === selectionEnd\n\n if (key === \"Backspace\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n target.setSelectionRange(nextStart, nextStart)\n }\n } else if (key === \"ArrowLeft\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersLeft(value, selectionStart)\n if (nextStart !== selectionStart) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n } else if (key === \"ArrowRight\" && isCollapsedSelection) {\n const nextStart = skipFormattingCharactersRight(value, selectionEnd)\n if (nextStart !== selectionEnd) {\n event.preventDefault()\n target.setSelectionRange(nextStart, nextStart)\n return\n }\n }\n\n if (key === \"ArrowDown\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n const next = current < 0 ? 0 : (current + 1) % filteredOptions.length\n return next\n })\n }\n return\n }\n\n if (key === \"ArrowUp\") {\n scrollBehaviorRef.current = event.repeat ? \"auto\" : \"smooth\"\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? filteredOptions.length - 1 : -1)\n return\n }\n\n if (filteredOptions.length > 0) {\n setHighlightedIndex((current) => {\n if (current < 0) {\n return filteredOptions.length - 1\n }\n return (current - 1 + filteredOptions.length) % filteredOptions.length\n })\n }\n return\n }\n\n if (/^[a-z]$/i.test(key)) {\n event.preventDefault()\n if (!showSuggestions) {\n setShowSuggestions(true)\n setHighlightedIndex(filteredOptions.length > 0 ? 0 : -1)\n }\n appendToBuffer(key.toLowerCase())\n return\n }\n\n if (suggestionMenuIsOpen) {\n if (key === \"Backspace\" && keyboardBufferRef.current) {\n event.preventDefault()\n popBuffer()\n return\n }\n\n if (key === \"Escape\") {\n event.preventDefault()\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(false)\n return\n }\n\n if (key === \"Enter\" && filteredOptions.length > 0) {\n event.preventDefault()\n const target = highlightedOption ?? filteredOptions[0]\n handleCountrySelect(target)\n return\n }\n }\n },\n [\n appendToBuffer,\n filteredOptions,\n handleCountrySelect,\n highlightedOption,\n onInputKeyDown,\n popBuffer,\n showSuggestions,\n suggestionMenuIsOpen,\n ]\n )\n\n const handleFocus = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true)\n onInputFocus?.(event)\n },\n [onInputFocus]\n )\n\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(false)\n setShowSuggestions(false)\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n onInputBlur?.(event)\n },\n [onInputBlur]\n )\n\n const openCountryMenu = React.useCallback(() => {\n if (disabled || readOnly) {\n return\n }\n\n keyboardBufferRef.current = \"\"\n setCountryQuery(\"\")\n setShowSuggestions(true)\n setHighlightedIndex((current) => (current < 0 ? 0 : current))\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n }, [disabled, readOnly])\n\n const shimName = autofillShimName ?? (inputName ? `${inputName}_shim` : undefined)\n\n return (\n <div className={cn(\"relative flex flex-col\", className)}>\n <div className=\"relative\">\n <input\n {...restInputProps}\n ref={inputRef}\n type=\"tel\"\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background py-2 text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"pl-11 pr-3\",\n inputClassName\n )}\n name={inputName}\n value={inputValueState}\n onChange={handleInputChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n readOnly={readOnly}\n autoComplete={inputAutoComplete ?? \"off\"}\n />\n <button\n type=\"button\"\n className={cn(\n \"absolute left-3 top-1/2 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded border text-lg leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n hasInlineFlag\n ? \"border-transparent\"\n : \"border-dashed border-border text-muted-foreground\",\n disabled\n ? \"cursor-not-allowed opacity-50\"\n : readOnly\n ? \"cursor-default\"\n : \"cursor-pointer hover:bg-muted\"\n )}\n aria-label={inlineFlagLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={openCountryMenu}\n tabIndex={-1}\n disabled={disabled}\n >\n <span aria-hidden=\"true\">\n {hasInlineFlag ? activeFlag : \"?\"}\n </span>\n </button>\n </div>\n\n {shimName ? (\n <input\n tabIndex={-1}\n autoComplete=\"tel\"\n name={shimName}\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0\"\n />\n ) : null}\n\n <div\n className=\"absolute left-0 top-full z-30 mt-1\"\n style={{\n pointerEvents: suggestionMenuIsOpen ? \"auto\" : \"none\",\n width: \"min(260px, 100%)\",\n }}\n onMouseDown={(event) => event.preventDefault()}\n >\n <SuggestionContext.Provider value={highlightContextValue}>\n <Select<CountryOption, false>\n {...restForwardedSelectProps}\n menuIsOpen={suggestionMenuIsOpen}\n options={filteredOptions}\n value={null}\n components={mergedSelectComponents}\n styles={mergedSelectStyles}\n isClearable={false}\n isSearchable={false}\n backspaceRemovesValue={false}\n tabSelectsValue={false}\n menuShouldScrollIntoView={false}\n onChange={handleCountrySelect}\n classNamePrefix={userClassNamePrefix ?? \"phone-number-suggestions\"}\n placeholder=\"\"\n formatOptionLabel={selectFormatOptionLabel}\n noOptionsMessage={\n noOptionsMessage ?? (() => resolvedMessages.noMatches)\n }\n />\n </SuggestionContext.Provider>\n </div>\n\n {validationNode}\n </div>\n )\n }\n)\n\nPhoneNumberInput.displayName = \"PhoneNumberInput\"\n"],"names":["PhoneNumberInput","React","props","forwardedRef","value","defaultCountry","countryProp","locale","onChange","onCountryChange","className","inputClassName","disabled","readOnly","selectProps","autofillShimName","messagesProp","renderValidationMessage","restProps","onInputFocus","onInputBlur","onInputKeyDown","inputName","inputAutoComplete","restInputProps","hasConfiguredCountry","localeCacheKey","getLocaleCacheKey","localeForBuild","parseLocaleCacheKey","resolvedMessages","resolveMessages","countryOptions","getCachedCountryOptions","resolveSelectedCountry","country","match","candidate","toSelectedCountry","buildFallbackSelectedCountry","fallbackCountry","getValidCountry","DEFAULT_COUNTRY","option","hasResolvedCountryRef","initialStateRef","lastNormalizedRef","baseCountryForInit","normalized","normalizeInputValue","international","phoneNumber","detectedCountry","inferredCountry","hasExplicitInternationalPrefix","formatWithAsYouType","canonicalDetectedCountry","resolvedCountry","rawDigits","sanitizeDigits","hasExplicitPlus","internationalDigits","initialDialCode","getCountryCallingCode","initialHasPrefix","detectNationalPrefixForDisplay","suggestion","getSuggestionState","inferredCountryToApply","nextDialCode","finalHasPrefix","displayValue","injectNationalPrefixDisplay","displayDetectedCountry","allowInlineFlag","shouldDisplayExplicitCountrySelection","initialState","uncontrolledCountry","setUncontrolledCountry","inputValueState","setInputValueState","countryQuery","setCountryQuery","showSuggestions","setShowSuggestions","highlightedIndex","setHighlightedIndex","isFocused","setIsFocused","lengthIssue","setLengthIssue","hasExplicitCountrySelection","setHasExplicitCountrySelection","manualSelectionCountryRef","keyboardBufferRef","bufferTimeoutRef","scrollBehaviorRef","pendingSelectionRef","consumeScrollBehavior","behavior","isCountryControlled","selectedCountry","activeCountry","inputRef","selection","input","start","end","selectOverrides","userSelectStyles","userSelectComponents","userClassNamePrefix","userFormatOptionLabel","forwardedSelectProps","noOptionsMessage","restForwardedSelectProps","mergedSelectStyles","suggestionSelectStyles","mergedSelectComponents","baseComponents","HiddenControl","NullComponent","overrides","SuggestionOption","hasAnnouncedCountryRef","notifyCountryChange","baseCountryForSync","previousNormalized","nextCountry","initialHasTypedTrunk","finalCountry","hasTypedTrunk","shouldShowInlineFlag","getLengthIssue","current","emitChange","details","scheduleBufferReset","handleInputChange","event","target","snapshot","captureSelectionSnapshot","raw","baseCountryForInput","dialCode","typedDigits","startsWithDialCode","hasLeadingZero","isIddPrefix","COMMON_IDD_PREFIXES","prefix","shouldRemoveNationalPrefix","resolveSelection","national","normalizedDigits","nationalDigits","stripPrefix","handleCountrySelect","previousDigits","currentDial","rebasedDigits","filteredOptions","results","pushUnique","existing","fallbackOption","currentOption","query","digitQuery","normalizedQuery","normalizeSearchValue","a","b","aExact","bExact","token","aIndex","optionMatchIndex","bIndex","suggestionMenuIsOpen","highlightedOption","updateHighlightedOption","index","selectFormatOptionLabel","meta","formatCountryOption","optionLabelRenderer","highlightContextValue","activeOption","activeFlag","inlineFlagLabel","hasInlineFlag","lengthHint","countryName","validationNode","rendered","jsx","appendToBuffer","char","popBuffer","handleKeyDown","key","selectionStart","selectionEnd","isCollapsedSelection","nextStart","skipFormattingCharactersLeft","skipFormattingCharactersRight","handleFocus","handleBlur","openCountryMenu","shimName","cn","jsxs","SuggestionContext","Select"],"mappings":";;;;;;;;;;AAoEO,MAAMA,KAAmBC,EAAM;AAAA,EACpC,SAA0BC,IAAOC,IAAc;AAC7C,UAAM;AAAA,MACJ,OAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,SAASC;AAAA,MACT,QAAAC;AAAA,MACA,UAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,WAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAC;AAAA,MACA,UAAAC;AAAA,MACA,aAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,UAAUC;AAAA,MACV,yBAAAC;AAAA,MACA,G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AuB;AAAA,cACxC,aAAY;AAAA,cACZ,mBAAmByE;AAAA,cACnB,kBACAtE,OAAqB,MAAMpF,GAAiB;AAAA,YAAA;AAAA,UAAA,EAEhD,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,MAGCqK;AAAA,IAAA,GACH;AAAA,EAEJ;AACF;AAEAnM,GAAiB,cAAc;"}
1
+ {"version":3,"file":"index19.js","sources":["../src/components/HourPickerField/index.tsx"],"sourcesContent":["import { Check, ChevronDown, ChevronUp } from \"lucide-react\"\nimport * as React from \"react\"\nimport { DismissableLayerBranch } from \"@radix-ui/react-dismissable-layer\"\nimport { createPortal } from \"react-dom\"\nimport { IMaskInput } from \"react-imask\"\nimport IMask, { InputMask } from \"imask\"\n\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@/components/Select\"\nimport { useIsTouchDevice } from \"@/helpers/useIsTouchDevice\"\nimport { cn } from \"@/lib/utils\"\n\n\n// WARNING: used to preserve input mask even with tree shaking\n// DO NOT REMOVE THIS CODE OR THIS COMMENT\nconst imaskAny = IMask as any\nif (typeof imaskAny.InputMask !== \"function\") {\n imaskAny.InputMask = InputMask\n}\n\n\nexport type HourPickerOption = {\n value: string\n label: string\n disabled?: boolean\n description?: React.ReactNode\n}\n\nfunction pad2(value: number) {\n return String(value).padStart(2, \"0\")\n}\n\nfunction parseTimeInput(raw: string) {\n const trimmed = raw.trim()\n if (!trimmed) return null\n\n const match = /^(\\d{1,2}):(\\d{2})$/.exec(trimmed)\n if (!match) {\n return null\n }\n\n const hours = Number(match[1])\n const minutes = Number(match[2])\n if (!Number.isFinite(hours) || !Number.isFinite(minutes)) {\n return null\n }\n\n if (hours < 0 || hours > 23 || minutes < 0 || minutes > 59) {\n return null\n }\n\n return `${pad2(hours)}:${pad2(minutes)}`\n}\n\ntype ParsedTimeInputResult = {\n parsed: string\n selectableValue: string | null\n}\n\nfunction parseTimeInputWithSelectableOption(raw: string, options: HourPickerOption[]): ParsedTimeInputResult | null {\n const parsed = parseTimeInput(raw)\n if (!parsed) return null\n\n const parsedOption = options.find((option) => option.value === parsed)\n if (isOptionSelectable(parsedOption)) {\n return { parsed, selectableValue: parsed }\n }\n\n return { parsed, selectableValue: null }\n}\n\nfunction timeStringToMinutes(value: string) {\n const match = /^(\\d{2}):(\\d{2})$/.exec(value)\n if (!match) {\n return null\n }\n\n const hours = Number(match[1])\n const minutes = Number(match[2])\n\n if (!Number.isFinite(hours) || !Number.isFinite(minutes)) {\n return null\n }\n\n return hours * 60 + minutes\n}\n\nfunction isOptionSelectable(option: HourPickerOption | undefined) {\n if (!option) return false\n return !option.disabled\n}\n\nfunction findClosestSelectableOption(targetMinutes: number, options: HourPickerOption[]) {\n let bestOption: HourPickerOption | null = null\n let bestDiff = Number.POSITIVE_INFINITY\n let bestMinutes = Number.NEGATIVE_INFINITY\n\n for (const option of options) {\n if (!isOptionSelectable(option)) continue\n const optionMinutes = timeStringToMinutes(option.value)\n if (optionMinutes == null) continue\n\n const diff = Math.abs(optionMinutes - targetMinutes)\n if (diff < bestDiff || (diff === bestDiff && optionMinutes > bestMinutes)) {\n bestOption = option\n bestDiff = diff\n bestMinutes = optionMinutes\n }\n }\n\n return bestOption\n}\n\ntype HourPickerScrollButtonDirection = \"up\" | \"down\"\n\ntype HourPickerScrollButtonProps = {\n direction: HourPickerScrollButtonDirection\n viewportRef: React.RefObject<HTMLElement | null>\n speed?: number\n className?: string\n}\n\nfunction HourPickerScrollButton({\n direction,\n viewportRef,\n speed = 400,\n className,\n}: HourPickerScrollButtonProps) {\n const [disabled, setDisabled] = React.useState(true)\n const animationRef = React.useRef<number | undefined>(undefined)\n const lastTimeRef = React.useRef<number | undefined>(undefined)\n const isScrollingRef = React.useRef(false)\n\n const checkScrollability = React.useCallback(() => {\n const viewport = viewportRef.current\n if (!viewport) {\n setDisabled(true)\n return\n }\n\n const { scrollTop, scrollHeight, clientHeight } = viewport\n const tolerance = 2\n\n const canScrollUp = scrollTop > tolerance\n const canScrollDown = scrollTop < (scrollHeight - clientHeight - tolerance)\n const hasScrollableContent = scrollHeight > clientHeight + tolerance\n\n if (!hasScrollableContent) {\n setDisabled(true)\n return\n }\n\n const shouldDisable = direction === \"up\" ? !canScrollUp : !canScrollDown\n setDisabled(shouldDisable)\n }, [direction, viewportRef])\n\n React.useEffect(() => {\n const viewport = viewportRef.current\n if (!viewport) return\n\n checkScrollability()\n\n const handleScroll = () => checkScrollability()\n const handleResize = () => checkScrollability()\n\n viewport.addEventListener(\"scroll\", handleScroll, { passive: true })\n\n const resizeObserver = new ResizeObserver(handleResize)\n resizeObserver.observe(viewport)\n\n const mutationObserver = new MutationObserver(handleResize)\n mutationObserver.observe(viewport, { childList: true, subtree: true })\n\n return () => {\n viewport.removeEventListener(\"scroll\", handleScroll)\n resizeObserver.disconnect()\n mutationObserver.disconnect()\n }\n }, [viewportRef, checkScrollability])\n\n const stopScrolling = React.useCallback(() => {\n if (animationRef.current) {\n cancelAnimationFrame(animationRef.current)\n animationRef.current = undefined\n }\n isScrollingRef.current = false\n lastTimeRef.current = undefined\n }, [])\n\n const smoothScroll = React.useCallback(\n (currentTime: number) => {\n const viewport = viewportRef.current\n if (!viewport || disabled || !isScrollingRef.current) {\n stopScrolling()\n return\n }\n\n if (!lastTimeRef.current) {\n lastTimeRef.current = currentTime\n }\n\n const deltaTime = currentTime - lastTimeRef.current\n const distance = (speed * deltaTime) / 1000\n\n if (distance < 0.1) {\n animationRef.current = requestAnimationFrame(smoothScroll)\n return\n }\n\n const oldScrollTop = viewport.scrollTop\n const maxScroll = viewport.scrollHeight - viewport.clientHeight\n\n let newScrollTop: number\n if (direction === \"up\") {\n newScrollTop = Math.max(0, oldScrollTop - distance)\n } else {\n newScrollTop = Math.min(maxScroll, oldScrollTop + distance)\n }\n\n viewport.scrollTo({ top: newScrollTop })\n\n lastTimeRef.current = currentTime\n\n const tolerance = 1\n const canContinue =\n direction === \"up\"\n ? newScrollTop > tolerance\n : newScrollTop < (maxScroll - tolerance)\n\n if (canContinue && Math.abs(newScrollTop - oldScrollTop) > 0.01) {\n animationRef.current = requestAnimationFrame(smoothScroll)\n } else {\n stopScrolling()\n setTimeout(checkScrollability, 16)\n }\n },\n [checkScrollability, direction, disabled, speed, stopScrolling, viewportRef],\n )\n\n const startScrolling = React.useCallback(() => {\n if (disabled || !viewportRef.current || isScrollingRef.current) return\n\n isScrollingRef.current = true\n lastTimeRef.current = undefined\n animationRef.current = requestAnimationFrame(smoothScroll)\n }, [disabled, smoothScroll, viewportRef])\n\n React.useEffect(() => stopScrolling, [stopScrolling])\n\n return (\n <div\n className={cn(\n \"flex items-center justify-center py-1 select-none\",\n disabled ? \"cursor-default opacity-40\" : \"cursor-pointer opacity-100 hover:bg-accent/20\",\n className\n )}\n onPointerEnter={() => {\n if (!disabled) startScrolling()\n }}\n onPointerMove={() => {\n if (!disabled && !isScrollingRef.current) startScrolling()\n }}\n onPointerLeave={() => {\n stopScrolling()\n }}\n >\n {direction === \"up\"\n ? <ChevronUp aria-hidden className=\"h-4 w-4 opacity-50\" />\n : <ChevronDown aria-hidden className=\"h-4 w-4 opacity-50\" />}\n </div>\n )\n}\n\nexport type HourPickerInputProps = {\n id?: string\n value: string | null\n onChange: (value: string | null) => void\n onValueUpdate?: (value: string | null) => void\n options: HourPickerOption[]\n placeholder?: string\n className?: string\n inputClassName?: string\n disabled?: boolean\n readOnly?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n triggerTestId?: string\n contentTestId?: string\n isHydrated?: boolean\n}\n\nexport function HourPickerInput({\n id,\n value,\n onChange,\n onValueUpdate,\n options,\n placeholder = \"Select time\",\n className,\n inputClassName,\n disabled,\n readOnly,\n open: openProp,\n onOpenChange,\n triggerTestId,\n contentTestId,\n isHydrated,\n}: HourPickerInputProps) {\n const reactId = React.useId()\n const triggerId = id ?? `hours-picker-${reactId}`\n const triggerInputRef = React.useRef<HTMLInputElement | null>(null)\n const setTriggerDraftValueRef = React.useRef<((value: string) => void) | null>(null)\n const setTriggerDraftValueHandler = React.useCallback((handler: ((value: string) => void) | null) => {\n setTriggerDraftValueRef.current = handler\n }, [])\n const highlightedValueRef = React.useRef<string | null>(null)\n const keyboardNavigationActiveRef = React.useRef(false)\n const [highlightedValue, setHighlightedValue] = React.useState<string | null>(null)\n const containerRef = React.useRef<HTMLDivElement | null>(null)\n const desktopPopoverRef = React.useRef<HTMLDivElement | null>(null)\n const desktopContentRef = React.useRef<HTMLDivElement | null>(null)\n const [desktopPopoverPosition, setDesktopPopoverPosition] = React.useState(() => ({\n left: 0,\n top: 0,\n width: 0,\n }))\n\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false)\n const open = openProp ?? uncontrolledOpen\n const setOpen = onOpenChange ?? setUncontrolledOpen\n\n React.useEffect(() => {\n if (!open) {\n return\n }\n if (disabled || readOnly) {\n return\n }\n\n const input = triggerInputRef.current\n if (!(input instanceof HTMLInputElement)) {\n return\n }\n if (typeof document !== \"undefined\" && document.activeElement === input) {\n return\n }\n\n input.focus({ preventScroll: true })\n }, [disabled, open, readOnly])\n\n const updateHighlightedValue = React.useCallback((next: string | null) => {\n highlightedValueRef.current = next\n setHighlightedValue(next)\n }, [])\n\n const markKeyboardNavigation = React.useCallback(() => {\n keyboardNavigationActiveRef.current = true\n }, [])\n\n React.useEffect(() => {\n if (!open) return\n\n const currentOption = options.find((option) => option.value === value)\n if (currentOption && isOptionSelectable(currentOption)) {\n updateHighlightedValue(currentOption.value)\n return\n }\n\n const firstEnabled = options.find((option) => isOptionSelectable(option))\n updateHighlightedValue(firstEnabled?.value ?? null)\n }, [open, options, updateHighlightedValue, value])\n\n const updateValue = React.useCallback(\n (next: string | null) => {\n if (next === null) {\n if (onValueUpdate) {\n onValueUpdate(null)\n }\n return\n }\n\n const matchingOption = options.find((option) => option.value === next)\n if (!isOptionSelectable(matchingOption)) {\n return\n }\n\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n },\n [onValueUpdate, options],\n )\n\n const commitValue = React.useCallback(\n (next: string | null) => {\n if (next === null) {\n if (onValueUpdate) {\n onValueUpdate(null)\n }\n onChange(null)\n return\n }\n\n const matchingOption = options.find((option) => option.value === next)\n if (!isOptionSelectable(matchingOption)) {\n return\n }\n\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n\n onChange(next)\n },\n [onChange, onValueUpdate, options],\n )\n\n React.useEffect(() => {\n if (!open) return\n\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target\n if (!(target instanceof Node)) {\n return\n }\n\n const container = containerRef.current\n if (!container) {\n return\n }\n\n if (container.contains(target)) {\n return\n }\n\n const popover = desktopPopoverRef.current\n if (popover?.contains(target)) {\n return\n }\n\n setOpen(false)\n }\n\n document.addEventListener(\"pointerdown\", handlePointerDown, true)\n return () => {\n document.removeEventListener(\"pointerdown\", handlePointerDown, true)\n }\n }, [open, setOpen])\n\n React.useEffect(() => {\n if (!open) {\n return\n }\n\n const popover = desktopPopoverRef.current\n if (!popover) {\n return\n }\n\n const handleWheel = (event: WheelEvent) => {\n const viewport = desktopContentRef.current\n if (!viewport) {\n return\n }\n\n const deltaY = event.deltaY\n if (deltaY === 0) {\n return\n }\n\n const maxScrollTop = Math.max(0, viewport.scrollHeight - viewport.clientHeight)\n const atTop = viewport.scrollTop <= 0\n const atBottom = viewport.scrollTop >= maxScrollTop\n\n const target = event.target\n const isWheelOverViewport = target instanceof Node && viewport.contains(target)\n\n if (isWheelOverViewport) {\n if ((deltaY < 0 && atTop) || (deltaY > 0 && atBottom)) {\n event.preventDefault()\n }\n return\n }\n\n event.preventDefault()\n const nextScrollTop = Math.min(maxScrollTop, Math.max(0, viewport.scrollTop + deltaY))\n viewport.scrollTop = nextScrollTop\n }\n\n popover.addEventListener(\"wheel\", handleWheel, { passive: false })\n return () => {\n popover.removeEventListener(\"wheel\", handleWheel)\n }\n }, [open])\n\n React.useEffect(() => {\n if (!open) {\n return\n }\n if (openProp !== undefined && !onOpenChange) {\n return\n }\n if (typeof window === \"undefined\") {\n return\n }\n if (!(\"IntersectionObserver\" in window)) {\n return\n }\n\n const trigger = triggerInputRef.current\n if (!(trigger instanceof HTMLElement)) {\n return\n }\n\n let isActive = true\n const observer = new IntersectionObserver(entries => {\n if (!isActive) {\n return\n }\n const entry = entries[0]\n if (entry && !entry.isIntersecting) {\n setOpen(false)\n }\n })\n observer.observe(trigger)\n return () => {\n isActive = false\n observer.disconnect()\n }\n }, [onOpenChange, open, openProp, setOpen])\n\n const updateDesktopPopoverPosition = React.useCallback(() => {\n if (typeof window === \"undefined\") return\n\n const trigger = triggerInputRef.current\n const popover = desktopPopoverRef.current\n if (!(trigger instanceof HTMLElement) || !popover) return\n\n const rect = trigger.getBoundingClientRect()\n const popoverHeight = popover.offsetHeight\n const viewportWidth = window.innerWidth ?? 0\n const viewportHeight = window.innerHeight ?? 0\n const padding = 8\n\n const width = rect.width\n\n let left = rect.left\n if (left + width > viewportWidth - padding) {\n left = Math.max(padding, viewportWidth - width - padding)\n }\n if (left < padding) {\n left = padding\n }\n\n let top = rect.bottom + padding\n const overflowBottom = top + popoverHeight > viewportHeight - padding\n const aboveTop = rect.top - popoverHeight - padding\n if (overflowBottom && aboveTop >= padding) {\n top = aboveTop\n }\n\n if (top < padding) {\n top = padding\n }\n if (top + popoverHeight > viewportHeight - padding) {\n top = Math.max(padding, viewportHeight - popoverHeight - padding)\n }\n\n setDesktopPopoverPosition({ left, top, width })\n }, [])\n\n // React Compiler rejects hook aliasing (useIsomorphicLayoutEffect pattern), so we\n // call useLayoutEffect directly and keep the SSR guard inside the effect.\n React.useLayoutEffect(() => {\n if (!open || disabled) return\n if (typeof window === \"undefined\") return\n\n updateDesktopPopoverPosition()\n const rafId = window.requestAnimationFrame(updateDesktopPopoverPosition)\n\n window.addEventListener(\"scroll\", updateDesktopPopoverPosition, true)\n window.addEventListener(\"resize\", updateDesktopPopoverPosition)\n return () => {\n window.cancelAnimationFrame(rafId)\n window.removeEventListener(\"scroll\", updateDesktopPopoverPosition, true)\n window.removeEventListener(\"resize\", updateDesktopPopoverPosition)\n }\n }, [disabled, open, updateDesktopPopoverPosition])\n\n React.useEffect(() => {\n if (!open) return\n\n const viewport = desktopContentRef.current\n if (!viewport) return\n\n const run = () => {\n const selected = viewport.querySelector(\"[role=\\\"option\\\"][data-state=\\\"checked\\\"]\")\n if (selected instanceof HTMLElement) {\n const padding = 8\n const targetTop = selected.offsetTop - padding\n const targetBottom = selected.offsetTop + selected.offsetHeight + padding\n\n if (targetTop < viewport.scrollTop) {\n viewport.scrollTop = Math.max(0, targetTop)\n return\n }\n\n const viewportBottom = viewport.scrollTop + viewport.clientHeight\n if (targetBottom > viewportBottom) {\n viewport.scrollTop = Math.max(0, targetBottom - viewport.clientHeight)\n }\n return\n }\n\n const all = Array.from(viewport.querySelectorAll(\"[role=\\\"option\\\"]\")) as HTMLElement[]\n if (!all.length) return\n\n let firstEnabled: HTMLElement | undefined\n let lastDisabledBefore: HTMLElement | undefined\n\n for (const el of all) {\n const isDisabled = el.hasAttribute(\"data-disabled\")\n if (!isDisabled) {\n firstEnabled = el\n break\n }\n lastDisabledBefore = el\n }\n\n if (!firstEnabled) return\n\n const target = lastDisabledBefore ? lastDisabledBefore : firstEnabled\n\n const offset = Math.max(0, target.offsetTop - 8)\n viewport.scrollTop = offset\n }\n\n const raf = requestAnimationFrame(run)\n return () => cancelAnimationFrame(raf)\n }, [open, options])\n\n React.useEffect(() => {\n if (!open) return\n if (!highlightedValue) return\n if (!keyboardNavigationActiveRef.current) return\n\n const viewport = desktopContentRef.current\n if (!viewport) return\n\n const target = viewport.querySelector(`[role=\"option\"][data-value=\"${highlightedValue}\"]`)\n if (!(target instanceof HTMLElement)) return\n\n const padding = 8\n const targetTop = target.offsetTop - padding\n const targetBottom = target.offsetTop + target.offsetHeight + padding\n\n if (targetTop < viewport.scrollTop) {\n viewport.scrollTop = Math.max(0, targetTop)\n return\n }\n\n const viewportBottom = viewport.scrollTop + viewport.clientHeight\n if (targetBottom > viewportBottom) {\n viewport.scrollTop = Math.max(0, targetBottom - viewport.clientHeight)\n }\n }, [highlightedValue, open])\n\n return (\n <div\n data-slot=\"hours-picker-input\"\n className={cn(\"w-[150px]\", className)}\n ref={containerRef}\n >\n <div className=\"relative\">\n <HourPickerMaskedSelectTrigger\n id={triggerId}\n placeholder={placeholder}\n value={value}\n onValueUpdate={updateValue}\n onCommit={commitValue}\n options={options}\n disabled={disabled}\n readOnly={readOnly}\n open={open}\n setOpen={setOpen}\n inputClassName={inputClassName}\n triggerTestId={triggerTestId}\n isHydrated={isHydrated}\n highlightedValueRef={highlightedValueRef}\n setHighlightedValue={updateHighlightedValue}\n markKeyboardNavigation={markKeyboardNavigation}\n inputRef={(node) => {\n triggerInputRef.current = node\n }}\n onDraftValueHandlerChange={setTriggerDraftValueHandler}\n />\n\n {open ? (() => {\n const popover = (\n <DismissableLayerBranch>\n <div\n ref={desktopPopoverRef}\n data-testid={contentTestId}\n data-state=\"open\"\n className={cn(\n \"pointer-events-auto fixed z-[60] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n )}\n style={{\n left: desktopPopoverPosition.left,\n top: desktopPopoverPosition.top,\n width: desktopPopoverPosition.width,\n }}\n >\n <HourPickerScrollButton\n direction=\"up\"\n viewportRef={desktopContentRef}\n />\n\n <div\n ref={desktopContentRef}\n role=\"listbox\"\n className=\"max-h-64 overflow-y-auto p-1 [overscroll-behavior:contain] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\"\n >\n {options.map((option) => {\n const isChecked = option.value === value\n\n return (\n <div\n key={option.value}\n role=\"option\"\n aria-selected={isChecked}\n data-value={option.value}\n data-state={isChecked ? \"checked\" : \"unchecked\"}\n data-disabled={option.disabled ? \"\" : undefined}\n className={cn(\n \"relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none cursor-pointer\",\n option.disabled && \"pointer-events-none opacity-50\",\n highlightedValue === option.value && \"bg-accent text-accent-foreground\",\n )}\n onMouseDown={(event) => {\n event.preventDefault()\n }}\n onClick={() => {\n if (option.disabled) return\n\n setTriggerDraftValueRef.current?.(option.value)\n updateHighlightedValue(option.value)\n triggerInputRef.current?.focus({ preventScroll: true })\n commitValue(option.value)\n setOpen(false)\n }}\n onPointerEnter={() => {\n if (keyboardNavigationActiveRef.current) return\n keyboardNavigationActiveRef.current = false\n updateHighlightedValue(option.value)\n }}\n onPointerMove={(event) => {\n if (keyboardNavigationActiveRef.current && event.movementX === 0 && event.movementY === 0) {\n return\n }\n keyboardNavigationActiveRef.current = false\n updateHighlightedValue(option.value)\n }}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n {isChecked ? <Check aria-hidden className=\"h-4 w-4\" /> : null}\n </span>\n\n <div className=\"flex flex-col\">\n <span>{option.label}</span>\n {option.description != null ? (\n <span data-slot=\"description\" className=\"text-xs text-muted-foreground\">\n {option.description}\n </span>\n ) : null}\n </div>\n </div>\n )\n })}\n </div>\n\n <HourPickerScrollButton\n direction=\"down\"\n viewportRef={desktopContentRef}\n />\n </div>\n </DismissableLayerBranch>\n )\n\n if (typeof document === \"undefined\") return popover\n return createPortal(popover, document.body)\n })() : null}\n </div>\n </div>\n )\n}\n\nHourPickerInput.displayName = \"HourPickerInput\"\n\nexport type HourPickerFieldProps = HourPickerInputProps\n\nfunction HourPickerSelectField({\n id,\n value,\n onChange,\n onValueUpdate,\n options,\n placeholder = \"Select time\",\n className,\n inputClassName,\n disabled,\n open,\n onOpenChange,\n triggerTestId,\n contentTestId,\n isHydrated,\n}: HourPickerFieldProps) {\n const commitValue = React.useCallback(\n (next: string) => {\n const matchingOption = options.find((option) => option.value === next)\n if (!isOptionSelectable(matchingOption)) {\n return\n }\n\n if (onValueUpdate) {\n onValueUpdate(next)\n }\n onChange(next)\n },\n [onChange, onValueUpdate, options],\n )\n\n return (\n <div data-slot=\"hours-picker-field\" className={cn(\"w-[150px]\", className)}>\n <Select\n disabled={disabled}\n open={open}\n onOpenChange={onOpenChange}\n value={value ?? \"\"}\n onValueChange={(next) => commitValue(next)}\n >\n <SelectTrigger\n id={id}\n data-testid={triggerTestId}\n data-hydrated={isHydrated ? \"true\" : undefined}\n className={cn(\n \"transition-colors hover:bg-accent hover:text-accent-foreground\",\n !value && \"text-muted-foreground\",\n open && \"ring-2 ring-primary ring-offset-2\",\n \"[&_[data-slot='description']]:hidden\",\n inputClassName,\n )}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n\n <SelectContent\n data-testid={contentTestId}\n autoScroll={\"firstEnabledWithContext\"}\n className=\"max-h-64 overflow-y-auto\"\n >\n {options.map((option) => (\n <SelectItem\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n >\n <span>{option.label}</span>\n {option.description != null ? (\n <span data-slot=\"description\" className=\"block text-xs text-muted-foreground\">\n {option.description}\n </span>\n ) : null}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n )\n}\n\nexport function HourPickerField(props: HourPickerFieldProps) {\n const isTouchDevice = useIsTouchDevice()\n\n if (isTouchDevice) {\n return <HourPickerSelectField {...props} />\n }\n\n return <HourPickerInput {...props} />\n}\n\nHourPickerField.displayName = \"HourPickerField\"\n\ntype HourPickerMaskedSelectTriggerProps = {\n id: string\n placeholder: string\n value: string | null\n onValueUpdate: (value: string | null) => void\n onCommit: (value: string | null) => void\n options: HourPickerOption[]\n disabled?: boolean\n readOnly?: boolean\n open: boolean\n setOpen: (open: boolean) => void\n inputClassName?: string\n triggerTestId?: string\n isHydrated?: boolean\n highlightedValueRef: React.MutableRefObject<string | null>\n setHighlightedValue: (value: string | null) => void\n markKeyboardNavigation: () => void\n inputRef: (node: HTMLInputElement | null) => void\n onDraftValueHandlerChange: (handler: ((value: string) => void) | null) => void\n}\n\nfunction HourPickerMaskedSelectTrigger({\n id,\n placeholder,\n value,\n onValueUpdate,\n onCommit,\n options,\n disabled,\n readOnly,\n open,\n setOpen,\n inputClassName,\n triggerTestId,\n isHydrated,\n highlightedValueRef,\n setHighlightedValue,\n markKeyboardNavigation,\n inputRef,\n onDraftValueHandlerChange,\n}: HourPickerMaskedSelectTriggerProps) {\n const isEditingRef = React.useRef(false)\n const pointerDownOnInputRef = React.useRef(false)\n const inputWasFocusedOnPointerDownRef = React.useRef(false)\n const ignoreNextMaskCommitValueRef = React.useRef<string | null>(null)\n\n const [draft, setDraft] = React.useState(() => (value ? value : \"\"))\n\n React.useEffect(() => {\n onDraftValueHandlerChange((nextValue) => {\n setDraft(nextValue)\n })\n return () => {\n onDraftValueHandlerChange(null)\n }\n }, [onDraftValueHandlerChange])\n\n const moveSelection = React.useCallback(\n (direction: -1 | 1) => {\n const base = highlightedValueRef.current ?? value ?? \"\"\n\n let baseIndex = options.findIndex((option) => option.value === base)\n if (baseIndex === -1) {\n baseIndex = direction === 1 ? -1 : options.length\n }\n\n for (let nextIndex = baseIndex + direction; nextIndex >= 0 && nextIndex < options.length; nextIndex += direction) {\n const nextOption = options[nextIndex]\n if (!isOptionSelectable(nextOption)) continue\n\n setHighlightedValue(nextOption.value)\n ignoreNextMaskCommitValueRef.current = nextOption.value\n setDraft(nextOption.value)\n onValueUpdate(nextOption.value)\n return\n }\n },\n [highlightedValueRef, onValueUpdate, options, setHighlightedValue, value],\n )\n\n React.useEffect(() => {\n if (isEditingRef.current) return\n setDraft(value ? value : \"\")\n }, [value])\n\n const triggerClassName = cn(\n \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"transition-colors group-hover:bg-accent group-hover:text-accent-foreground\",\n !draft && \"text-muted-foreground\",\n open && \"ring-2 ring-primary ring-offset-2\",\n \"[&_[data-slot='description']]:hidden\",\n inputClassName,\n )\n\n return (\n <div className=\"relative group\">\n <IMaskInput\n id={id}\n data-testid={triggerTestId}\n data-hydrated={isHydrated ? \"true\" : undefined}\n type=\"text\"\n disabled={disabled}\n readOnly={readOnly}\n inputRef={inputRef}\n autoComplete={\"off\"}\n mask={[\n { mask: \"00:00\", lazy: true },\n { mask: \"0:00\", lazy: true },\n ]}\n dispatch={(appended, dynamicMasked) => {\n const digits = (dynamicMasked.value + appended).replace(/\\D/g, \"\")\n if (digits.length <= 2) return dynamicMasked.compiledMasks[0]\n if (digits.length >= 4) return dynamicMasked.compiledMasks[0]\n\n const hourPrefix = pad2(Number(digits.slice(0, 2)))\n const hasTwoDigitHour = options.some((option) => option.value.startsWith(`${hourPrefix}:`))\n if (hasTwoDigitHour) return dynamicMasked.compiledMasks[0]\n\n return dynamicMasked.compiledMasks[1]\n }}\n placeholder={placeholder}\n value={draft}\n className={triggerClassName}\n onAccept={(accepted) => {\n const nextText = typeof accepted === \"string\" ? accepted : String(accepted ?? \"\")\n setDraft(nextText)\n\n if (nextText.replace(/\\D/g, \"\").length !== 0) {\n return\n }\n\n if (value) {\n onCommit(null)\n }\n }}\n onComplete={(completed) => {\n const nextText = typeof completed === \"string\" ? completed : String(completed ?? \"\")\n if (ignoreNextMaskCommitValueRef.current === nextText) {\n ignoreNextMaskCommitValueRef.current = null\n return\n }\n\n const resolved = parseTimeInputWithSelectableOption(nextText, options)\n if (!resolved) {\n return\n }\n\n if (resolved.selectableValue) {\n setHighlightedValue(resolved.selectableValue)\n setDraft(resolved.selectableValue)\n\n if (value === resolved.selectableValue) {\n return\n }\n\n onCommit(resolved.selectableValue)\n return\n }\n\n const targetMinutes = timeStringToMinutes(resolved.parsed)\n if (targetMinutes == null) {\n return\n }\n\n const closestOption = findClosestSelectableOption(targetMinutes, options)\n if (!closestOption) {\n return\n }\n\n setHighlightedValue(closestOption.value)\n }}\n onPointerDown={() => {\n pointerDownOnInputRef.current = true\n if (disabled) return\n if (!open) {\n setOpen(true)\n }\n }}\n onMouseDown={(event) => {\n pointerDownOnInputRef.current = true\n inputWasFocusedOnPointerDownRef.current = typeof document !== \"undefined\" && document.activeElement === event.currentTarget\n if (disabled) return\n if (!open) {\n setOpen(true)\n }\n }}\n onClick={() => {\n if (disabled) return\n if (!open) {\n setOpen(true)\n }\n }}\n onKeyDown={(event) => {\n if (disabled) {\n return\n }\n\n if (event.key === \"Tab\" && open && !event.defaultPrevented) {\n setOpen(false)\n return\n }\n\n if (event.key === \"Escape\") {\n if (!open) {\n return\n }\n event.preventDefault()\n setOpen(false)\n return\n }\n\n if (!open && !event.defaultPrevented) {\n const shouldReopen =\n (event.key.length === 1 || event.key === \"Backspace\" || event.key === \"Delete\") &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n\n if (shouldReopen) {\n setOpen(true)\n }\n }\n\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n markKeyboardNavigation()\n event.preventDefault()\n\n if (!open) {\n setOpen(true)\n return\n }\n\n moveSelection(event.key === \"ArrowDown\" ? 1 : -1)\n return\n }\n\n if (event.key === \"Enter\") {\n markKeyboardNavigation()\n const resolved = parseTimeInputWithSelectableOption(draft, options)\n if (!resolved) {\n if (!open) {\n return\n }\n\n if (draft.trim() !== \"\") {\n return\n }\n\n const highlightedOption = options.find((option) => option.value === highlightedValueRef.current)\n const fallbackValue =\n (isOptionSelectable(highlightedOption) ? highlightedOption?.value : undefined) ??\n options.find((option) => isOptionSelectable(option))?.value\n\n if (!fallbackValue) {\n return\n }\n\n event.preventDefault()\n setHighlightedValue(fallbackValue)\n setDraft(fallbackValue)\n onCommit(fallbackValue)\n setOpen(false)\n return\n }\n\n if (resolved.selectableValue) {\n event.preventDefault()\n setHighlightedValue(resolved.selectableValue)\n setDraft(resolved.selectableValue)\n onCommit(resolved.selectableValue)\n setOpen(false)\n return\n }\n\n const targetMinutes = timeStringToMinutes(resolved.parsed)\n if (targetMinutes == null) {\n return\n }\n\n const closestOption = findClosestSelectableOption(targetMinutes, options)\n if (!closestOption) {\n return\n }\n\n event.preventDefault()\n setHighlightedValue(closestOption.value)\n setDraft(closestOption.value)\n onCommit(closestOption.value)\n setOpen(false)\n return\n }\n }}\n onFocus={(event) => {\n const shouldSelectAll = !pointerDownOnInputRef.current || !inputWasFocusedOnPointerDownRef.current\n pointerDownOnInputRef.current = false\n inputWasFocusedOnPointerDownRef.current = false\n isEditingRef.current = true\n if (shouldSelectAll) {\n const element = event.currentTarget\n requestAnimationFrame(() => element.select())\n }\n\n if (disabled) {\n return\n }\n\n if (open) {\n return\n }\n\n setOpen(true)\n }}\n onBlur={() => {\n isEditingRef.current = false\n\n const trimmed = draft.trim()\n if (!trimmed) {\n setDraft(value ? value : \"\")\n return\n }\n\n const resolved = parseTimeInputWithSelectableOption(trimmed, options)\n if (!resolved) {\n setDraft(value ? value : \"\")\n return\n }\n\n if (!resolved.selectableValue) {\n setDraft(value ? value : \"\")\n return\n }\n\n setDraft(resolved.selectableValue)\n if (value !== resolved.selectableValue) {\n onCommit(resolved.selectableValue)\n }\n }}\n />\n\n <button\n type=\"button\"\n tabIndex={-1}\n disabled={disabled}\n data-slot=\"hours-picker-input-toggle\"\n className={cn(\n \"absolute right-1 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n )}\n aria-label={open ? \"Close time picker\" : \"Open time picker\"}\n onPointerDown={(event) => {\n event.preventDefault()\n }}\n onMouseDown={(event) => {\n event.preventDefault()\n }}\n onClick={() => {\n if (disabled) return\n setOpen(!open)\n }}\n >\n <ChevronDown aria-hidden className=\"size-4\" />\n </button>\n </div>\n )\n}\n"],"names":["imaskAny","IMask","InputMask","pad2","value","String","padStart","parseTimeInput","raw","trimmed","trim","match","exec","hours","Number","minutes","isFinite","parseTimeInputWithSelectableOption","options","parsed","parsedOption","find","option","isOptionSelectable","selectableValue","timeStringToMinutes","disabled","findClosestSelectableOption","targetMinutes","bestOption","bestDiff","POSITIVE_INFINITY","bestMinutes","NEGATIVE_INFINITY","optionMinutes","diff","Math","abs","HourPickerScrollButton","direction","viewportRef","speed","className","setDisabled","React","useState","animationRef","useRef","undefined","lastTimeRef","isScrollingRef","checkScrollability","useCallback","viewport","current","scrollTop","scrollHeight","clientHeight","tolerance","canScrollUp","canScrollDown","useEffect","handleScroll","handleResize","addEventListener","passive","resizeObserver","ResizeObserver","observe","mutationObserver","MutationObserver","childList","subtree","removeEventListener","disconnect","stopScrolling","cancelAnimationFrame","smoothScroll","currentTime","deltaTime","distance","requestAnimationFrame","oldScrollTop","maxScroll","newScrollTop","max","min","scrollTo","top","setTimeout","startScrolling","jsx","cn","ChevronUp","ChevronDown","HourPickerInput","t0","$","_c","id","onChange","onValueUpdate","placeholder","t1","inputClassName","readOnly","open","openProp","onOpenChange","triggerTestId","contentTestId","isHydrated","reactId","useId","triggerId","triggerInputRef","setTriggerDraftValueRef","t2","Symbol","for","handler","setTriggerDraftValueHandler","highlightedValueRef","keyboardNavigationActiveRef","highlightedValue","setHighlightedValue","containerRef","desktopPopoverRef","desktopContentRef","desktopPopoverPosition","setDesktopPopoverPosition","_temp","uncontrolledOpen","setUncontrolledOpen","setOpen","t3","t4","input","HTMLInputElement","document","activeElement","focus","preventScroll","t5","next","updateHighlightedValue","t6","markKeyboardNavigation","t7","t8","currentOption","firstEnabled","_temp2","t9","next_0","matchingOption","option_1","updateValue","t10","next_1","matchingOption_0","option_2","commitValue","t11","t12","handlePointerDown","event","target","Node","container","contains","t13","t14","popover_0","popover","handleWheel","event_0","deltaY","maxScrollTop","atTop","atBottom","target_0","preventDefault","nextScrollTop","t15","t16","window","trigger","HTMLElement","isActive","observer","IntersectionObserver","entries","entry","isIntersecting","t17","trigger_0","popover_1","rect","getBoundingClientRect","popoverHeight","offsetHeight","viewportWidth","innerWidth","viewportHeight","innerHeight","width","left","bottom","overflowBottom","aboveTop","updateDesktopPopoverPosition","t18","t19","rafId","useLayoutEffect","t20","viewport_0","raf","run","selected","querySelector","targetTop","offsetTop","targetBottom","viewportBottom","all","Array","from","querySelectorAll","length","lastDisabledBefore","el","hasAttribute","offset","firstEnabled_0","t21","t22","t23","viewport_1","target_2","targetTop_0","targetBottom_0","viewportBottom_0","t24","t25","node","t26","HourPickerMaskedSelectTrigger","t27","popover_2","DismissableLayerBranch","jsxs","map","option_3","isChecked","_temp3","event_2","movementX","movementY","Check","label","description","createPortal","body","t28","t29","event_1","option_0","displayName","HourPickerSelectField","SelectValue","SelectTrigger","_temp4","SelectContent","Select","SelectItem","HourPickerField","props","useIsTouchDevice","onCommit","inputRef","onDraftValueHandlerChange","isEditingRef","pointerDownOnInputRef","inputWasFocusedOnPointerDownRef","ignoreNextMaskCommitValueRef","draft","setDraft","nextValue","base","baseIndex","findIndex","nextIndex","nextOption","moveSelection","triggerClassName","mask","lazy","appended","dynamicMasked","digits","replace","compiledMasks","hourPrefix","slice","some","startsWith","accepted","nextText","completed","nextText_0","resolved","closestOption","currentTarget","key","defaultPrevented","ctrlKey","metaKey","altKey","resolved_0","highlightedOption","fallbackValue","_temp5","targetMinutes_0","closestOption_0","shouldSelectAll","element","select","resolved_1","IMaskInput","_temp6","_temp7","event_3"],"mappings":";;;;;;;;;;;AAcA,MAAMA,KAAWC;AACb,OAAOD,GAASE,aAAc,eAChCF,GAASE,YAAYA;AAWvB,SAASC,GAAKC,GAAe;AAC3B,SAAOC,OAAOD,CAAK,EAAEE,SAAS,GAAG,GAAG;AACtC;AAEA,SAASC,GAAeC,GAAa;AACnC,QAAMC,IAAUD,EAAIE,KAAAA;AACpB,MAAI,CAACD,EAAS,QAAO;AAErB,QAAME,IAAQ,sBAAsBC,KAAKH,CAAO;AAChD,MAAI,CAACE;AACH,WAAO;AAGT,QAAME,IAAQC,OAAOH,EAAM,CAAC,CAAC,GACvBI,IAAUD,OAAOH,EAAM,CAAC,CAAC;AAK/B,SAJI,CAACG,OAAOE,SAASH,CAAK,KAAK,CAACC,OAA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G,eAAA6F,IAGF,aAAAC,IAGJ,SAAAxF,IAKTC,UAAAA,GAAAA,CACF,GAASpJ,QAAAvE,GAAAuE,QAAA6I,IAAA7I,QAAAmJ,IAAAnJ,QAAAsJ,MAAAA,KAAAtJ,EAAA,EAAA;AAAA,MAAAwJ;AAAA,SAAAxJ,EAAA,EAAA,MAAA2I,KAAA3I,UAAAsJ,MAzQXE,KAAAG,gBAAAA,EAAAA,KAAA,OAAA,EAAe,WAAA,kBACbhB,UAAAA;AAAAA,IAAAA;AAAAA,IAmPAW;AAAAA,EAAAA,GAsBF,GAAMtJ,QAAA2I,GAAA3I,QAAAsJ,IAAAtJ,QAAAwJ,MAAAA,KAAAxJ,EAAA,EAAA,GA1QNwJ;AA0QM;AApVV,SAAAmF,GAAAC,GAAA;AA2UUvK,EAAAA,EAAKgB,eAAAA;AAAiB;AA3UhC,SAAAqJ,GAAA1E,GAAA;AAwUU3F,EAAAA,EAAKgB,eAAAA;AAAiB;AAxUhC,SAAA6I,GAAAlK,GAAA;AAAA,SAsOyC1I,GAAmBD,CAAM;AAAC;"}
package/dist/index190.js CHANGED
@@ -1,18 +1,12 @@
1
- import { normalizeInterval as l } from "./index283.js";
2
- import { constructFrom as m } from "./index278.js";
3
- function u(s, a) {
4
- const { start: e, end: r } = l(a?.in, s);
5
- let n = +e > +r;
6
- const c = n ? +e : +r, t = n ? r : e;
7
- t.setHours(0, 0, 0, 0), t.setDate(1);
8
- let i = 1;
9
- const o = [];
10
- for (; +t <= c; )
11
- o.push(m(e, t)), t.setMonth(t.getMonth() + i);
12
- return n ? o.reverse() : o;
1
+ function o(e, n, t = "long") {
2
+ return new Intl.DateTimeFormat("en-US", {
3
+ // Enforces engine to render the time. Without the option JavaScriptCore omits it.
4
+ hour: "numeric",
5
+ timeZone: e,
6
+ timeZoneName: t
7
+ }).format(n).split(/\s/g).slice(2).join(" ");
13
8
  }
14
9
  export {
15
- u as default,
16
- u as eachMonthOfInterval
10
+ o as tzName
17
11
  };
18
12
  //# sourceMappingURL=index190.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index190.js","sources":["../../../node_modules/date-fns/eachMonthOfInterval.js"],"sourcesContent":["import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachMonthOfInterval} function options.\n */\n\n/**\n * The {@link eachMonthOfInterval} function result type. It resolves the proper data type.\n */\n\n/**\n * @name eachMonthOfInterval\n * @category Interval Helpers\n * @summary Return the array of months within the specified time interval.\n *\n * @description\n * Return the array of months within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of months from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each month between 6 February 2014 and 10 August 2014:\n * const result = eachMonthOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2014, 7, 10)\n * })\n * //=> [\n * // Sat Feb 01 2014 00:00:00,\n * // Sat Mar 01 2014 00:00:00,\n * // Tue Apr 01 2014 00:00:00,\n * // Thu May 01 2014 00:00:00,\n * // Sun Jun 01 2014 00:00:00,\n * // Tue Jul 01 2014 00:00:00,\n * // Fri Aug 01 2014 00:00:00\n * // ]\n */\nexport function eachMonthOfInterval(interval, options) {\n const { start, end } = normalizeInterval(options?.in, interval);\n\n let reversed = +start > +end;\n const endTime = reversed ? +start : +end;\n const date = reversed ? end : start;\n date.setHours(0, 0, 0, 0);\n date.setDate(1);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+date <= endTime) {\n dates.push(constructFrom(start, date));\n date.setMonth(date.getMonth() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachMonthOfInterval;\n"],"names":["eachMonthOfInterval","interval","options","start","end","normalizeInterval","reversed","endTime","date","step","dates","constructFrom"],"mappings":";;AA2CO,SAASA,EAAoBC,GAAUC,GAAS;AACrD,QAAM,EAAE,OAAAC,GAAO,KAAAC,EAAG,IAAKC,EAAkBH,GAAS,IAAID,CAAQ;AAE9D,MAAIK,IAAW,CAACH,IAAQ,CAACC;AACzB,QAAMG,IAAUD,IAAW,CAACH,IAAQ,CAACC,GAC/BI,IAAOF,IAAWF,IAAMD;AAC9B,EAAAK,EAAK,SAAS,GAAG,GAAG,GAAG,CAAC,GACxBA,EAAK,QAAQ,CAAC;AAEd,MAAIC,IAAwB;AAO5B,QAAMC,IAAQ,CAAA;AAEd,SAAO,CAACF,KAAQD;AACd,IAAAG,EAAM,KAAKC,EAAcR,GAAOK,CAAI,CAAC,GACrCA,EAAK,SAASA,EAAK,SAAQ,IAAKC,CAAI;AAGtC,SAAOH,IAAWI,EAAM,QAAO,IAAKA;AACtC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index190.js","sources":["../../../node_modules/@date-fns/tz/tzName/index.js"],"sourcesContent":["/**\n * Time zone name format.\n */\n\n/**\n * The function returns the time zone name for the given date in the specified\n * time zone.\n *\n * It uses the `Intl.DateTimeFormat` API and by default outputs the time zone\n * name in a long format, e.g. \"Pacific Standard Time\" or\n * \"Singapore Standard Time\".\n *\n * It is possible to specify the format as the third argument using one of the following options\n *\n * - \"short\": e.g. \"EDT\" or \"GMT+8\".\n * - \"long\": e.g. \"Eastern Daylight Time\".\n * - \"shortGeneric\": e.g. \"ET\" or \"Singapore Time\".\n * - \"longGeneric\": e.g. \"Eastern Time\" or \"Singapore Standard Time\".\n *\n * These options correspond to TR35 tokens `z..zzz`, `zzzz`, `v`, and `vvvv` respectively: https://www.unicode.org/reports/tr35/tr35-dates.html#dfst-zone\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date object to get the time zone name for\n * @param format - Optional format of the time zone name. Defaults to \"long\". Can be \"short\", \"long\", \"shortGeneric\", or \"longGeneric\".\n *\n * @returns Time zone name (e.g. \"Singapore Standard Time\")\n */\nexport function tzName(timeZone, date, format = \"long\") {\n return new Intl.DateTimeFormat(\"en-US\", {\n // Enforces engine to render the time. Without the option JavaScriptCore omits it.\n hour: \"numeric\",\n timeZone: timeZone,\n timeZoneName: format\n }).format(date).split(/\\s/g) // Format.JS uses non-breaking spaces\n .slice(2) // Skip the hour and AM/PM parts\n .join(\" \");\n}"],"names":["tzName","timeZone","date","format"],"mappings":"AA2BO,SAASA,EAAOC,GAAUC,GAAMC,IAAS,QAAQ;AACtD,SAAO,IAAI,KAAK,eAAe,SAAS;AAAA;AAAA,IAEtC,MAAM;AAAA,IACN,UAAUF;AAAA,IACV,cAAcE;AAAA,EAClB,CAAG,EAAE,OAAOD,CAAI,EAAE,MAAM,KAAK,EAC1B,MAAM,CAAC,EACP,KAAK,GAAG;AACX;","x_google_ignoreList":[0]}
package/dist/index191.js CHANGED
@@ -1,18 +1,70 @@
1
- import { normalizeInterval as u } from "./index283.js";
2
- import { constructFrom as i } from "./index278.js";
3
- function f(o, a) {
4
- const { start: t, end: r } = u(a?.in, o);
5
- let s = +t > +r;
6
- const l = s ? +t : +r, e = s ? r : t;
7
- e.setHours(0, 0, 0, 0), e.setMonth(0, 1);
8
- let c = 1;
9
- const n = [];
10
- for (; +e <= l; )
11
- n.push(i(t, e)), e.setFullYear(e.getFullYear() + c);
12
- return s ? n.reverse() : n;
1
+ import { tzOffset as s } from "./index192.js";
2
+ class n extends Date {
3
+ //#region static
4
+ constructor(...e) {
5
+ super(), e.length > 1 && typeof e[e.length - 1] == "string" && (this.timeZone = e.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(s(this.timeZone, this)) ? this.setTime(NaN) : e.length ? typeof e[0] == "number" && (e.length === 1 || e.length === 2 && typeof e[1] != "number") ? this.setTime(e[0]) : typeof e[0] == "string" ? this.setTime(+new Date(e[0])) : e[0] instanceof Date ? this.setTime(+e[0]) : (this.setTime(+new Date(...e)), U(this), a(this)) : this.setTime(Date.now());
6
+ }
7
+ static tz(e, ...o) {
8
+ return o.length ? new n(...o, e) : new n(Date.now(), e);
9
+ }
10
+ //#endregion
11
+ //#region time zone
12
+ withTimeZone(e) {
13
+ return new n(+this, e);
14
+ }
15
+ getTimezoneOffset() {
16
+ const e = -s(this.timeZone, this);
17
+ return e > 0 ? Math.floor(e) : Math.ceil(e);
18
+ }
19
+ //#endregion
20
+ //#region time
21
+ setTime(e) {
22
+ return Date.prototype.setTime.apply(this, arguments), a(this), +this;
23
+ }
24
+ //#endregion
25
+ //#region date-fns integration
26
+ [/* @__PURE__ */ Symbol.for("constructDateFrom")](e) {
27
+ return new n(+new Date(e), this.timeZone);
28
+ }
29
+ //#endregion
30
+ }
31
+ const D = /^(get|set)(?!UTC)/;
32
+ Object.getOwnPropertyNames(Date.prototype).forEach((t) => {
33
+ if (!D.test(t)) return;
34
+ const e = t.replace(D, "$1UTC");
35
+ n.prototype[e] && (t.startsWith("get") ? n.prototype[t] = function() {
36
+ return this.internal[e]();
37
+ } : (n.prototype[t] = function() {
38
+ return Date.prototype[e].apply(this.internal, arguments), H(this), +this;
39
+ }, n.prototype[e] = function() {
40
+ return Date.prototype[e].apply(this, arguments), a(this), +this;
41
+ }));
42
+ });
43
+ function a(t) {
44
+ t.internal.setTime(+t), t.internal.setUTCSeconds(t.internal.getUTCSeconds() - Math.round(-s(t.timeZone, t) * 60));
45
+ }
46
+ function H(t) {
47
+ Date.prototype.setFullYear.call(t, t.internal.getUTCFullYear(), t.internal.getUTCMonth(), t.internal.getUTCDate()), Date.prototype.setHours.call(t, t.internal.getUTCHours(), t.internal.getUTCMinutes(), t.internal.getUTCSeconds(), t.internal.getUTCMilliseconds()), U(t);
48
+ }
49
+ function U(t) {
50
+ const e = s(t.timeZone, t), o = e > 0 ? Math.floor(e) : Math.ceil(e), i = /* @__PURE__ */ new Date(+t);
51
+ i.setUTCHours(i.getUTCHours() - 1);
52
+ const r = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset(), g = -(/* @__PURE__ */ new Date(+i)).getTimezoneOffset(), m = r - g, M = Date.prototype.getHours.apply(t) !== t.internal.getUTCHours();
53
+ m && M && t.internal.setUTCMinutes(t.internal.getUTCMinutes() + m);
54
+ const f = r - o;
55
+ f && Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + f);
56
+ const l = /* @__PURE__ */ new Date(+t);
57
+ l.setUTCSeconds(0);
58
+ const y = r > 0 ? l.getSeconds() : (l.getSeconds() - 60) % 60, c = Math.round(-(s(t.timeZone, t) * 60)) % 60;
59
+ (c || y) && (t.internal.setUTCSeconds(t.internal.getUTCSeconds() + c), Date.prototype.setUTCSeconds.call(t, Date.prototype.getUTCSeconds.call(t) + c + y));
60
+ const p = s(t.timeZone, t), u = p > 0 ? Math.floor(p) : Math.ceil(p), w = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset() - u, O = u !== o, C = w - f;
61
+ if (O && C) {
62
+ Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + C);
63
+ const h = s(t.timeZone, t), S = h > 0 ? Math.floor(h) : Math.ceil(h), T = u - S;
64
+ T && (t.internal.setUTCMinutes(t.internal.getUTCMinutes() + T), Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + T));
65
+ }
13
66
  }
14
67
  export {
15
- f as default,
16
- f as eachYearOfInterval
68
+ n as TZDateMini
17
69
  };
18
70
  //# sourceMappingURL=index191.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index191.js","sources":["../../../node_modules/date-fns/eachYearOfInterval.js"],"sourcesContent":["import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachYearOfInterval} function options.\n */\n\n/**\n * The {@link eachYearOfInterval} function result type. It resolves the proper data type.\n * It uses the first argument date object type, starting from the date argument,\n * then the start interval date, and finally the end interval date. If\n * a context function is passed, it uses the context function return type.\n */\n\n/**\n * @name eachYearOfInterval\n * @category Interval Helpers\n * @summary Return the array of yearly timestamps within the specified time interval.\n *\n * @description\n * Return the array of yearly timestamps within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of yearly timestamps from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each year between 6 February 2014 and 10 August 2017:\n * const result = eachYearOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2017, 7, 10)\n * })\n * //=> [\n * // Wed Jan 01 2014 00:00:00,\n * // Thu Jan 01 2015 00:00:00,\n * // Fri Jan 01 2016 00:00:00,\n * // Sun Jan 01 2017 00:00:00\n * // ]\n */\nexport function eachYearOfInterval(interval, options) {\n const { start, end } = normalizeInterval(options?.in, interval);\n\n let reversed = +start > +end;\n const endTime = reversed ? +start : +end;\n const date = reversed ? end : start;\n date.setHours(0, 0, 0, 0);\n date.setMonth(0, 1);\n\n let step = options?.step ?? 1;\n if (!step) return [];\n if (step < 0) {\n step = -step;\n reversed = !reversed;\n }\n\n const dates = [];\n\n while (+date <= endTime) {\n dates.push(constructFrom(start, date));\n date.setFullYear(date.getFullYear() + step);\n }\n\n return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachYearOfInterval;\n"],"names":["eachYearOfInterval","interval","options","start","end","normalizeInterval","reversed","endTime","date","step","dates","constructFrom"],"mappings":";;AA2CO,SAASA,EAAmBC,GAAUC,GAAS;AACpD,QAAM,EAAE,OAAAC,GAAO,KAAAC,EAAG,IAAKC,EAAkBH,GAAS,IAAID,CAAQ;AAE9D,MAAIK,IAAW,CAACH,IAAQ,CAACC;AACzB,QAAMG,IAAUD,IAAW,CAACH,IAAQ,CAACC,GAC/BI,IAAOF,IAAWF,IAAMD;AAC9B,EAAAK,EAAK,SAAS,GAAG,GAAG,GAAG,CAAC,GACxBA,EAAK,SAAS,GAAG,CAAC;AAElB,MAAIC,IAAwB;AAO5B,QAAMC,IAAQ,CAAA;AAEd,SAAO,CAACF,KAAQD;AACd,IAAAG,EAAM,KAAKC,EAAcR,GAAOK,CAAI,CAAC,GACrCA,EAAK,YAAYA,EAAK,YAAW,IAAKC,CAAI;AAG5C,SAAOH,IAAWI,EAAM,QAAO,IAAKA;AACtC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index191.js","sources":["../../../node_modules/@date-fns/tz/date/mini.js"],"sourcesContent":["import { tzOffset } from \"../tzOffset/index.js\";\nexport class TZDateMini extends Date {\n //#region static\n\n constructor(...args) {\n super();\n if (args.length > 1 && typeof args[args.length - 1] === \"string\") {\n this.timeZone = args.pop();\n }\n this.internal = new Date();\n if (isNaN(tzOffset(this.timeZone, this))) {\n this.setTime(NaN);\n } else {\n if (!args.length) {\n this.setTime(Date.now());\n } else if (typeof args[0] === \"number\" && (args.length === 1 || args.length === 2 && typeof args[1] !== \"number\")) {\n this.setTime(args[0]);\n } else if (typeof args[0] === \"string\") {\n this.setTime(+new Date(args[0]));\n } else if (args[0] instanceof Date) {\n this.setTime(+args[0]);\n } else {\n this.setTime(+new Date(...args));\n adjustToSystemTZ(this, NaN);\n syncToInternal(this);\n }\n }\n }\n static tz(tz, ...args) {\n return args.length ? new TZDateMini(...args, tz) : new TZDateMini(Date.now(), tz);\n }\n\n //#endregion\n\n //#region time zone\n\n withTimeZone(timeZone) {\n return new TZDateMini(+this, timeZone);\n }\n getTimezoneOffset() {\n const offset = -tzOffset(this.timeZone, this);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n return offset > 0 ? Math.floor(offset) : Math.ceil(offset);\n }\n\n //#endregion\n\n //#region time\n\n setTime(time) {\n Date.prototype.setTime.apply(this, arguments);\n syncToInternal(this);\n return +this;\n }\n\n //#endregion\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDateMini(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}\n\n// Assign getters and setters\nconst re = /^(get|set)(?!UTC)/;\nObject.getOwnPropertyNames(Date.prototype).forEach(method => {\n if (!re.test(method)) return;\n const utcMethod = method.replace(re, \"$1UTC\");\n // Filter out methods without UTC counterparts\n if (!TZDateMini.prototype[utcMethod]) return;\n if (method.startsWith(\"get\")) {\n // Delegate to internal date's UTC method\n TZDateMini.prototype[method] = function () {\n return this.internal[utcMethod]();\n };\n } else {\n // Assign regular setter\n TZDateMini.prototype[method] = function () {\n Date.prototype[utcMethod].apply(this.internal, arguments);\n syncFromInternal(this);\n return +this;\n };\n\n // Assign UTC setter\n TZDateMini.prototype[utcMethod] = function () {\n Date.prototype[utcMethod].apply(this, arguments);\n syncToInternal(this);\n return +this;\n };\n }\n});\n\n/**\n * Function syncs time to internal date, applying the time zone offset.\n *\n * @param {Date} date - Date to sync\n */\nfunction syncToInternal(date) {\n date.internal.setTime(+date);\n date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));\n}\n\n/**\n * Function syncs the internal date UTC values to the date. It allows to get\n * accurate timestamp value.\n *\n * @param {Date} date - The date to sync\n */\nfunction syncFromInternal(date) {\n // First we transpose the internal values\n Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());\n Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());\n\n // Now we have to adjust the date to the system time zone\n adjustToSystemTZ(date);\n}\n\n/**\n * Function adjusts the date to the system time zone. It uses the time zone\n * differences to calculate the offset and adjust the date.\n *\n * @param {Date} date - Date to adjust\n */\nfunction adjustToSystemTZ(date) {\n // Save the time zone offset before all the adjustments\n const baseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const offset = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);\n //#region System DST adjustment\n\n // The biggest problem with using the system time zone is that when we create\n // a date from internal values stored in UTC, the system time zone might end\n // up on the DST hour:\n //\n // $ TZ=America/New_York node\n // > new Date(2020, 2, 8, 1).toString()\n // 'Sun Mar 08 2020 01:00:00 GMT-0500 (Eastern Standard Time)'\n // > new Date(2020, 2, 8, 2).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 3).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 4).toString()\n // 'Sun Mar 08 2020 04:00:00 GMT-0400 (Eastern Daylight Time)'\n //\n // Here we get the same hour for both 2 and 3, because the system time zone\n // has DST beginning at 8 March 2020, 2 a.m. and jumps to 3 a.m. So we have\n // to adjust the internal date to reflect that.\n //\n // However we want to adjust only if that's the DST hour the change happenes,\n // not the hour where DST moves to.\n\n // We calculate the previous hour to see if the time zone offset has changed\n // and we have landed on the DST hour.\n const prevHour = new Date(+date);\n // We use UTC methods here as we don't want to land on the same hour again\n // in case of DST.\n prevHour.setUTCHours(prevHour.getUTCHours() - 1);\n\n // Calculate if we are on the system DST hour.\n const systemOffset = -new Date(+date).getTimezoneOffset();\n const prevHourSystemOffset = -new Date(+prevHour).getTimezoneOffset();\n const systemDSTChange = systemOffset - prevHourSystemOffset;\n // Detect the DST shift. System DST change will occur both on\n const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();\n\n // Move the internal date when we are on the system DST hour.\n if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);\n\n //#endregion\n\n //#region System diff adjustment\n\n // Now we need to adjust the date, since we just applied internal values.\n // We need to calculate the difference between the system and date time zones\n // and apply it to the date.\n\n const offsetDiff = systemOffset - offset;\n if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);\n\n //#endregion\n\n //#region Seconds System diff adjustment\n\n const systemDate = new Date(+date);\n // Set the UTC seconds to 0 to isolate the timezone offset in seconds.\n systemDate.setUTCSeconds(0);\n // For negative systemOffset, invert the seconds.\n const systemSecondsOffset = systemOffset > 0 ? systemDate.getSeconds() : (systemDate.getSeconds() - 60) % 60;\n\n // Calculate the seconds offset based on the timezone offset.\n const secondsOffset = Math.round(-(tzOffset(date.timeZone, date) * 60)) % 60;\n if (secondsOffset || systemSecondsOffset) {\n date.internal.setUTCSeconds(date.internal.getUTCSeconds() + secondsOffset);\n Date.prototype.setUTCSeconds.call(date, Date.prototype.getUTCSeconds.call(date) + secondsOffset + systemSecondsOffset);\n }\n\n //#endregion\n\n //#region Post-adjustment DST fix\n\n const postBaseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const postOffset = postBaseOffset > 0 ? Math.floor(postBaseOffset) : Math.ceil(postBaseOffset);\n const postSystemOffset = -new Date(+date).getTimezoneOffset();\n const postOffsetDiff = postSystemOffset - postOffset;\n const offsetChanged = postOffset !== offset;\n const postDiff = postOffsetDiff - offsetDiff;\n if (offsetChanged && postDiff) {\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);\n\n // Now we need to check if got offset change during the post-adjustment.\n // If so, we also need both dates to reflect that.\n\n const newBaseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);\n const offsetChange = postOffset - newOffset;\n if (offsetChange) {\n date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);\n }\n }\n\n //#endregion\n}"],"names":["TZDateMini","args","tzOffset","adjustToSystemTZ","syncToInternal","tz","timeZone","offset","time","date","re","method","utcMethod","syncFromInternal","baseOffset","prevHour","systemOffset","prevHourSystemOffset","systemDSTChange","dstShift","offsetDiff","systemDate","systemSecondsOffset","secondsOffset","postBaseOffset","postOffset","postOffsetD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KAAK,MAAMA,CAAc,IAAI,KAAK,KAAKA,CAAc,GAEvFE,IADmB,EAAC,oBAAI,KAAK,CAACjB,CAAI,GAAE,kBAAiB,IACjBgB,GACpCE,IAAgBF,MAAelB,GAC/BqB,IAAWF,IAAiBN;AAClC,MAAIO,KAAiBC,GAAU;AAC7B,SAAK,UAAU,cAAc,KAAKnB,GAAM,KAAK,UAAU,cAAc,KAAKA,CAAI,IAAImB,CAAQ;AAK1F,UAAMC,IAAgB3B,EAASO,EAAK,UAAUA,CAAI,GAG5CqB,IAAYD,IAAgB,IAAI,KAAK,MAAMA,CAAa,IAAI,KAAK,KAAKA,CAAa,GACnFE,IAAeN,IAAaK;AAClC,IAAIC,MACFtB,EAAK,SAAS,cAAcA,EAAK,SAAS,cAAa,IAAKsB,CAAY,GACxE,KAAK,UAAU,cAAc,KAAKtB,GAAM,KAAK,UAAU,cAAc,KAAKA,CAAI,IAAIsB,CAAY;AAAA,EAElG;AAGF;","x_google_ignoreList":[0]}
package/dist/index192.js CHANGED
@@ -1,9 +1,23 @@
1
- import { endOfWeek as n } from "./index194.js";
2
- function f(e, t) {
3
- return n(e, { ...t, weekStartsOn: 1 });
1
+ const e = {}, s = {};
2
+ function u(t, r) {
3
+ try {
4
+ const n = (e[t] ||= new Intl.DateTimeFormat("en-US", {
5
+ timeZone: t,
6
+ timeZoneName: "longOffset"
7
+ }).format)(r).split("GMT")[1];
8
+ return n in s ? s[n] : o(n, n.split(":"));
9
+ } catch {
10
+ if (t in s) return s[t];
11
+ const f = t?.match(a);
12
+ return f ? o(t, f.slice(1)) : NaN;
13
+ }
14
+ }
15
+ const a = /([+-]\d\d):?(\d\d)?/;
16
+ function o(t, r) {
17
+ const f = +(r[0] || 0), n = +(r[1] || 0), c = +(r[2] || 0) / 60;
18
+ return s[t] = f * 60 + n > 0 ? f * 60 + n + c : f * 60 - n - c;
4
19
  }
5
20
  export {
6
- f as default,
7
- f as endOfISOWeek
21
+ u as tzOffset
8
22
  };
9
23
  //# sourceMappingURL=index192.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index192.js","sources":["../../../node_modules/date-fns/endOfISOWeek.js"],"sourcesContent":["import { endOfWeek } from \"./endOfWeek.js\";\n\n/**\n * The {@link endOfISOWeek} function options.\n */\n\n/**\n * @name endOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the end of an ISO week for the given date.\n *\n * @description\n * Return the end of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of an ISO week\n *\n * @example\n * // The end of an ISO week for 2 September 2014 11:55:00:\n * const result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfISOWeek(date, options) {\n return endOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default endOfISOWeek;\n"],"names":["endOfISOWeek","date","options","endOfWeek"],"mappings":";AA8BO,SAASA,EAAaC,GAAMC,GAAS;AAC1C,SAAOC,EAAUF,GAAM,EAAE,GAAGC,GAAS,cAAc,GAAG;AACxD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index192.js","sources":["../../../node_modules/@date-fns/tz/tzOffset/index.js"],"sourcesContent":["const offsetFormatCache = {};\nconst offsetCache = {};\n\n/**\n * The function extracts UTC offset in minutes from the given date in specified\n * time zone.\n *\n * Unlike `Date.prototype.getTimezoneOffset`, this function returns the value\n * mirrored to the sign of the offset in the time zone. For Asia/Singapore\n * (UTC+8), `tzOffset` returns 480, while `getTimezoneOffset` returns -480.\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date to check the offset for\n *\n * @returns UTC offset in minutes\n */\nexport function tzOffset(timeZone, date) {\n try {\n const format = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat(\"en-US\", {\n timeZone,\n timeZoneName: \"longOffset\"\n }).format;\n const offsetStr = format(date).split(\"GMT\")[1];\n if (offsetStr in offsetCache) return offsetCache[offsetStr];\n return calcOffset(offsetStr, offsetStr.split(\":\"));\n } catch {\n // Fallback to manual parsing if the runtime doesn't support ±HH:MM/±HHMM/±HH\n // See: https://github.com/nodejs/node/issues/53419\n if (timeZone in offsetCache) return offsetCache[timeZone];\n const captures = timeZone?.match(offsetRe);\n if (captures) return calcOffset(timeZone, captures.slice(1));\n return NaN;\n }\n}\nconst offsetRe = /([+-]\\d\\d):?(\\d\\d)?/;\nfunction calcOffset(cacheStr, values) {\n const hours = +(values[0] || 0);\n const minutes = +(values[1] || 0);\n // Convert seconds to minutes by dividing by 60 to keep the function return in minutes.\n const seconds = +(values[2] || 0) / 60;\n return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;\n}"],"names":["offsetFormatCache","offsetCache","tzOffset","timeZone","date","offsetStr","calcOffset","captures","offsetRe","cacheStr","values","hours","minutes","seconds"],"mappings":"AAAA,MAAMA,IAAoB,CAAA,GACpBC,IAAc,CAAA;AAeb,SAASC,EAASC,GAAUC,GAAM;AACvC,MAAI;AAKF,UAAMC,KAJSL,EAAkBG,CAAQ,MAAM,IAAI,KAAK,eAAe,SAAS;AAAA,MAC9E,UAAAA;AAAA,MACA,cAAc;AAAA,IACpB,CAAK,EAAE,QACsBC,CAAI,EAAE,MAAM,KAAK,EAAE,CAAC;AAC7C,WAAIC,KAAaJ,IAAoBA,EAAYI,CAAS,IACnDC,EAAWD,GAAWA,EAAU,MAAM,GAAG,CAAC;AAAA,EACnD,QAAQ;AAGN,QAAIF,KAAYF,EAAa,QAAOA,EAAYE,CAAQ;AACxD,UAAMI,IAAWJ,GAAU,MAAMK,CAAQ;AACzC,WAAID,IAAiBD,EAAWH,GAAUI,EAAS,MAAM,CAAC,CAAC,IACpD;AAAA,EACT;AACF;AACA,MAAMC,IAAW;AACjB,SAASF,EAAWG,GAAUC,GAAQ;AACpC,QAAMC,IAAQ,EAAED,EAAO,CAAC,KAAK,IACvBE,IAAU,EAAEF,EAAO,CAAC,KAAK,IAEzBG,IAAU,EAAEH,EAAO,CAAC,KAAK,KAAK;AACpC,SAAOT,EAAYQ,CAAQ,IAAIE,IAAQ,KAAKC,IAAU,IAAID,IAAQ,KAAKC,IAAUC,IAAUF,IAAQ,KAAKC,IAAUC;AACpH;","x_google_ignoreList":[0]}