@rpcbase/ui 0.230.0 → 0.231.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 (646) hide show
  1. package/dist/components/PhoneNumberInput/index.d.ts.map +1 -1
  2. package/dist/index100.js +5 -52
  3. package/dist/index100.js.map +1 -1
  4. package/dist/index101.js +7 -3
  5. package/dist/index101.js.map +1 -1
  6. package/dist/index102.js +5 -4
  7. package/dist/index102.js.map +1 -1
  8. package/dist/index103.js +4 -15
  9. package/dist/index103.js.map +1 -1
  10. package/dist/index104.js +4 -5
  11. package/dist/index104.js.map +1 -1
  12. package/dist/index105.js +6 -7
  13. package/dist/index105.js.map +1 -1
  14. package/dist/index106.js +145 -16
  15. package/dist/index106.js.map +1 -1
  16. package/dist/index107.js +39 -4
  17. package/dist/index107.js.map +1 -1
  18. package/dist/index108.js +4 -4
  19. package/dist/index108.js.map +1 -1
  20. package/dist/index109.js +7 -5
  21. package/dist/index109.js.map +1 -1
  22. package/dist/index110.js +13 -5
  23. package/dist/index110.js.map +1 -1
  24. package/dist/index111.js +13 -4
  25. package/dist/index111.js.map +1 -1
  26. package/dist/index112.js +7 -4
  27. package/dist/index112.js.map +1 -1
  28. package/dist/index113.js +31 -6
  29. package/dist/index113.js.map +1 -1
  30. package/dist/index114.js +10 -24
  31. package/dist/index114.js.map +1 -1
  32. package/dist/index115.js +10 -6
  33. package/dist/index115.js.map +1 -1
  34. package/dist/index116.js +8 -4
  35. package/dist/index116.js.map +1 -1
  36. package/dist/index117.js +13 -6
  37. package/dist/index117.js.map +1 -1
  38. package/dist/index118.js +101 -5
  39. package/dist/index118.js.map +1 -1
  40. package/dist/index119.js +20 -5
  41. package/dist/index119.js.map +1 -1
  42. package/dist/index120.js +53 -5
  43. package/dist/index120.js.map +1 -1
  44. package/dist/index121.js +72 -4
  45. package/dist/index121.js.map +1 -1
  46. package/dist/index122.js +9 -8
  47. package/dist/index122.js.map +1 -1
  48. package/dist/index123.js +20 -5
  49. package/dist/index123.js.map +1 -1
  50. package/dist/index124.js +16 -4
  51. package/dist/index124.js.map +1 -1
  52. package/dist/index125.js +23 -4
  53. package/dist/index125.js.map +1 -1
  54. package/dist/index126.js +6 -6
  55. package/dist/index126.js.map +1 -1
  56. package/dist/index127.js +4 -144
  57. package/dist/index127.js.map +1 -1
  58. package/dist/index128.js +23 -39
  59. package/dist/index128.js.map +1 -1
  60. package/dist/index129.js +35 -5
  61. package/dist/index129.js.map +1 -1
  62. package/dist/index130.js +16 -8
  63. package/dist/index130.js.map +1 -1
  64. package/dist/index131.js +6 -13
  65. package/dist/index131.js.map +1 -1
  66. package/dist/index132.js +4 -13
  67. package/dist/index132.js.map +1 -1
  68. package/dist/index133.js +4 -7
  69. package/dist/index133.js.map +1 -1
  70. package/dist/index134.js +4 -31
  71. package/dist/index134.js.map +1 -1
  72. package/dist/index135.js +4 -10
  73. package/dist/index135.js.map +1 -1
  74. package/dist/index136.js +3 -10
  75. package/dist/index136.js.map +1 -1
  76. package/dist/index137.js +6 -8
  77. package/dist/index137.js.map +1 -1
  78. package/dist/index138.js +24 -14
  79. package/dist/index138.js.map +1 -1
  80. package/dist/index139.js +7 -101
  81. package/dist/index139.js.map +1 -1
  82. package/dist/index140.js +7 -20
  83. package/dist/index140.js.map +1 -1
  84. package/dist/index141.js +5 -53
  85. package/dist/index141.js.map +1 -1
  86. package/dist/index142.js +3 -72
  87. package/dist/index142.js.map +1 -1
  88. package/dist/index143.js +3 -9
  89. package/dist/index143.js.map +1 -1
  90. package/dist/index144.js +4 -20
  91. package/dist/index144.js.map +1 -1
  92. package/dist/index145.js +3 -16
  93. package/dist/index145.js.map +1 -1
  94. package/dist/index146.js +4 -23
  95. package/dist/index146.js.map +1 -1
  96. package/dist/index147.js +3 -6
  97. package/dist/index147.js.map +1 -1
  98. package/dist/index148.js +3 -5
  99. package/dist/index148.js.map +1 -1
  100. package/dist/index149.js +3 -23
  101. package/dist/index149.js.map +1 -1
  102. package/dist/index150.js +6 -35
  103. package/dist/index150.js.map +1 -1
  104. package/dist/index151.js +69 -16
  105. package/dist/index151.js.map +1 -1
  106. package/dist/index152.js +2 -7
  107. package/dist/index152.js.map +1 -1
  108. package/dist/index153.js +363 -4
  109. package/dist/index153.js.map +1 -1
  110. package/dist/index154.js +261 -4
  111. package/dist/index154.js.map +1 -1
  112. package/dist/index155.js +60 -4
  113. package/dist/index155.js.map +1 -1
  114. package/dist/index156.js +46 -4
  115. package/dist/index156.js.map +1 -1
  116. package/dist/index157.js +169 -3
  117. package/dist/index157.js.map +1 -1
  118. package/dist/index158.js +109 -6
  119. package/dist/index158.js.map +1 -1
  120. package/dist/index159.js +25 -24
  121. package/dist/index159.js.map +1 -1
  122. package/dist/index160.js +8 -8
  123. package/dist/index160.js.map +1 -1
  124. package/dist/index161.js +4 -6
  125. package/dist/index161.js.map +1 -1
  126. package/dist/index162.js +5 -5
  127. package/dist/index162.js.map +1 -1
  128. package/dist/index163.js +4 -3
  129. package/dist/index163.js.map +1 -1
  130. package/dist/index164.js +466 -3
  131. package/dist/index164.js.map +1 -1
  132. package/dist/index165.js +185 -4
  133. package/dist/index165.js.map +1 -1
  134. package/dist/index166.js +107 -3
  135. package/dist/index166.js.map +1 -1
  136. package/dist/index167.js +262 -4
  137. package/dist/index167.js.map +1 -1
  138. package/dist/index168.js +9 -3
  139. package/dist/index168.js.map +1 -1
  140. package/dist/index169.js +42 -3
  141. package/dist/index169.js.map +1 -1
  142. package/dist/index170.js +4 -3
  143. package/dist/index170.js.map +1 -1
  144. package/dist/index171.js +11 -13
  145. package/dist/index171.js.map +1 -1
  146. package/dist/index172.js +62 -148
  147. package/dist/index172.js.map +1 -1
  148. package/dist/index173.js +37 -30
  149. package/dist/index173.js.map +1 -1
  150. package/dist/index174.js +14 -10
  151. package/dist/index174.js.map +1 -1
  152. package/dist/index175.js +23 -48
  153. package/dist/index175.js.map +1 -1
  154. package/dist/index176.js +109 -10
  155. package/dist/index176.js.map +1 -1
  156. package/dist/index177.js +13 -45
  157. package/dist/index177.js.map +1 -1
  158. package/dist/index178.js +4 -95
  159. package/dist/index178.js.map +1 -1
  160. package/dist/index179.js +4 -87
  161. package/dist/index179.js.map +1 -1
  162. package/dist/index18.js +247 -240
  163. package/dist/index18.js.map +1 -1
  164. package/dist/index180.js +5 -106
  165. package/dist/index180.js.map +1 -1
  166. package/dist/index181.js +11 -52
  167. package/dist/index181.js.map +1 -1
  168. package/dist/index182.js +19 -11
  169. package/dist/index182.js.map +1 -1
  170. package/dist/index183.js +13 -38
  171. package/dist/index183.js.map +1 -1
  172. package/dist/index184.js +261 -8
  173. package/dist/index184.js.map +1 -1
  174. package/dist/index185.js +4 -116
  175. package/dist/index185.js.map +1 -1
  176. package/dist/index186.js +28 -18
  177. package/dist/index186.js.map +1 -1
  178. package/dist/index187.js +126 -15
  179. package/dist/index187.js.map +1 -1
  180. package/dist/index188.js +5 -3
  181. package/dist/index188.js.map +1 -1
  182. package/dist/index189.js +76 -34
  183. package/dist/index189.js.map +1 -1
  184. package/dist/index190.js +65 -19
  185. package/dist/index190.js.map +1 -1
  186. package/dist/index191.js +8 -9
  187. package/dist/index191.js.map +1 -1
  188. package/dist/index192.js +15 -8
  189. package/dist/index192.js.map +1 -1
  190. package/dist/index193.js +91 -18
  191. package/dist/index193.js.map +1 -1
  192. package/dist/index194.js +63 -26
  193. package/dist/index194.js.map +1 -1
  194. package/dist/index195.js +44 -15
  195. package/dist/index195.js.map +1 -1
  196. package/dist/index200.js +1 -1
  197. package/dist/index203.js +1 -1
  198. package/dist/index205.js +2 -2
  199. package/dist/index206.js +2 -2
  200. package/dist/index209.js +3 -3
  201. package/dist/index210.js +1 -1
  202. package/dist/index211.js +2 -2
  203. package/dist/index212.js +2 -2
  204. package/dist/index214.js +1 -1
  205. package/dist/index215.js +2 -2
  206. package/dist/index216.js +1 -1
  207. package/dist/index217.js +7 -7
  208. package/dist/index218.js +3 -3
  209. package/dist/index219.js +1 -1
  210. package/dist/index220.js +1 -1
  211. package/dist/index221.js +3 -3
  212. package/dist/index222.js +1 -1
  213. package/dist/index223.js +1 -1
  214. package/dist/index225.js +1 -1
  215. package/dist/index226.js +1 -1
  216. package/dist/index227.js +1 -1
  217. package/dist/index228.js +2 -2
  218. package/dist/index229.js +2 -2
  219. package/dist/index230.js +3 -3
  220. package/dist/index231.js +2 -2
  221. package/dist/index232.js +1 -1
  222. package/dist/index234.js +1 -1
  223. package/dist/index235.js +2 -2
  224. package/dist/index236.js +1 -1
  225. package/dist/index247.js +1 -1
  226. package/dist/index248.js +1 -1
  227. package/dist/index250.js +1 -1
  228. package/dist/index252.js +1 -1
  229. package/dist/index253.js +1 -1
  230. package/dist/index254.js +3 -3
  231. package/dist/index255.js +2 -2
  232. package/dist/index259.js +11 -5
  233. package/dist/index259.js.map +1 -1
  234. package/dist/index260.js +50 -11
  235. package/dist/index260.js.map +1 -1
  236. package/dist/index261.js +4 -51
  237. package/dist/index261.js.map +1 -1
  238. package/dist/index262.js +30 -4
  239. package/dist/index262.js.map +1 -1
  240. package/dist/index263.js +12 -25
  241. package/dist/index263.js.map +1 -1
  242. package/dist/index264.js +5 -16
  243. package/dist/index264.js.map +1 -1
  244. package/dist/index265.js +21 -5
  245. package/dist/index265.js.map +1 -1
  246. package/dist/index266.js +51 -21
  247. package/dist/index266.js.map +1 -1
  248. package/dist/index267.js +25 -51
  249. package/dist/index267.js.map +1 -1
  250. package/dist/index268.js +40 -24
  251. package/dist/index268.js.map +1 -1
  252. package/dist/index269.js +37 -39
  253. package/dist/index269.js.map +1 -1
  254. package/dist/index270.js +45 -40
  255. package/dist/index270.js.map +1 -1
  256. package/dist/index271.js +21 -45
  257. package/dist/index271.js.map +1 -1
  258. package/dist/index272.js +70 -23
  259. package/dist/index272.js.map +1 -1
  260. package/dist/index273.js +17 -19
  261. package/dist/index273.js.map +1 -1
  262. package/dist/index274.js +11 -20
  263. package/dist/index274.js.map +1 -1
  264. package/dist/index275.js +26 -69
  265. package/dist/index275.js.map +1 -1
  266. package/dist/index276.js +12 -16
  267. package/dist/index276.js.map +1 -1
  268. package/dist/index277.js +17 -10
  269. package/dist/index277.js.map +1 -1
  270. package/dist/index278.js +35 -26
  271. package/dist/index278.js.map +1 -1
  272. package/dist/index279.js +261 -12
  273. package/dist/index279.js.map +1 -1
  274. package/dist/index280.js +275 -15
  275. package/dist/index280.js.map +1 -1
  276. package/dist/index281.js +68 -36
  277. package/dist/index281.js.map +1 -1
  278. package/dist/index282.js +96 -62
  279. package/dist/index282.js.map +1 -1
  280. package/dist/index283.js +77 -256
  281. package/dist/index283.js.map +1 -1
  282. package/dist/index284.js +3 -278
  283. package/dist/index284.js.map +1 -1
  284. package/dist/index285.js +29 -68
  285. package/dist/index285.js.map +1 -1
  286. package/dist/index286.js +16 -45
  287. package/dist/index286.js.map +1 -1
  288. package/dist/index287.js +34 -99
  289. package/dist/index287.js.map +1 -1
  290. package/dist/index288.js +16 -83
  291. package/dist/index288.js.map +1 -1
  292. package/dist/index289.js +4 -13
  293. package/dist/index289.js.map +1 -1
  294. package/dist/index290.js +26 -3
  295. package/dist/index290.js.map +1 -1
  296. package/dist/index291.js +26 -27
  297. package/dist/index291.js.map +1 -1
  298. package/dist/index292.js +4 -17
  299. package/dist/index292.js.map +1 -1
  300. package/dist/index293.js +79 -38
  301. package/dist/index293.js.map +1 -1
  302. package/dist/index294.js +268 -33
  303. package/dist/index294.js.map +1 -1
  304. package/dist/index295.js +11 -68
  305. package/dist/index295.js.map +1 -1
  306. package/dist/index296.js +10 -16
  307. package/dist/index296.js.map +1 -1
  308. package/dist/index297.js +25 -3
  309. package/dist/index297.js.map +1 -1
  310. package/dist/index298.js +14 -108
  311. package/dist/index298.js.map +1 -1
  312. package/dist/index299.js +119 -20
  313. package/dist/index299.js.map +1 -1
  314. package/dist/index300.js +5 -28
  315. package/dist/index300.js.map +1 -1
  316. package/dist/index301.js +41 -4
  317. package/dist/index301.js.map +1 -1
  318. package/dist/index302.js +64 -125
  319. package/dist/index302.js.map +1 -1
  320. package/dist/index303.js +14 -5
  321. package/dist/index303.js.map +1 -1
  322. package/dist/index304.js +7 -78
  323. package/dist/index304.js.map +1 -1
  324. package/dist/index305.js +5 -269
  325. package/dist/index305.js.map +1 -1
  326. package/dist/index306.js +3 -11
  327. package/dist/index306.js.map +1 -1
  328. package/dist/index307.js +11 -28
  329. package/dist/index307.js.map +1 -1
  330. package/dist/index308.js +8 -16
  331. package/dist/index308.js.map +1 -1
  332. package/dist/index309.js +134 -11
  333. package/dist/index309.js.map +1 -1
  334. package/dist/index31.js +24 -24
  335. package/dist/index310.js +398 -24
  336. package/dist/index310.js.map +1 -1
  337. package/dist/index311.js +51 -15
  338. package/dist/index311.js.map +1 -1
  339. package/dist/index312.js +11 -125
  340. package/dist/index312.js.map +1 -1
  341. package/dist/index313.js +11 -5
  342. package/dist/index313.js.map +1 -1
  343. package/dist/index314.js +12 -39
  344. package/dist/index314.js.map +1 -1
  345. package/dist/index315.js +148 -59
  346. package/dist/index315.js.map +1 -1
  347. package/dist/index316.js +30 -13
  348. package/dist/index316.js.map +1 -1
  349. package/dist/index317.js +10 -14
  350. package/dist/index317.js.map +1 -1
  351. package/dist/index318.js +48 -7
  352. package/dist/index318.js.map +1 -1
  353. package/dist/index319.js +12 -13
  354. package/dist/index319.js.map +1 -1
  355. package/dist/index32.js +3 -3
  356. package/dist/index320.js +44 -5
  357. package/dist/index320.js.map +1 -1
  358. package/dist/index321.js +95 -3
  359. package/dist/index321.js.map +1 -1
  360. package/dist/index322.js +86 -10
  361. package/dist/index322.js.map +1 -1
  362. package/dist/index323.js +105 -7
  363. package/dist/index323.js.map +1 -1
  364. package/dist/index324.js +48 -129
  365. package/dist/index324.js.map +1 -1
  366. package/dist/index325.js +11 -261
  367. package/dist/index325.js.map +1 -1
  368. package/dist/index326.js +29 -391
  369. package/dist/index326.js.map +1 -1
  370. package/dist/index327.js +8 -52
  371. package/dist/index327.js.map +1 -1
  372. package/dist/index328.js +3 -11
  373. package/dist/index328.js.map +1 -1
  374. package/dist/index329.js +9 -11
  375. package/dist/index329.js.map +1 -1
  376. package/dist/index330.js +116 -4
  377. package/dist/index330.js.map +1 -1
  378. package/dist/index331.js +17 -11
  379. package/dist/index331.js.map +1 -1
  380. package/dist/index332.js +16 -4
  381. package/dist/index332.js.map +1 -1
  382. package/dist/index333.js +37 -5
  383. package/dist/index333.js.map +1 -1
  384. package/dist/index334.js +20 -11
  385. package/dist/index334.js.map +1 -1
  386. package/dist/index335.js +8 -78
  387. package/dist/index335.js.map +1 -1
  388. package/dist/index336.js +16 -63
  389. package/dist/index336.js.map +1 -1
  390. package/dist/index337.js +27 -7
  391. package/dist/index337.js.map +1 -1
  392. package/dist/index338.js +15 -91
  393. package/dist/index338.js.map +1 -1
  394. package/dist/index339.js +7 -19
  395. package/dist/index339.js.map +1 -1
  396. package/dist/index34.js +4 -4
  397. package/dist/index340.js +11 -4
  398. package/dist/index340.js.map +1 -1
  399. package/dist/index341.js +8 -17
  400. package/dist/index341.js.map +1 -1
  401. package/dist/index342.js +13 -12
  402. package/dist/index342.js.map +1 -1
  403. package/dist/index343.js +3 -8
  404. package/dist/index343.js.map +1 -1
  405. package/dist/index344.js +3 -11
  406. package/dist/index344.js.map +1 -1
  407. package/dist/index345.js +16 -7
  408. package/dist/index345.js.map +1 -1
  409. package/dist/index346.js +50 -12
  410. package/dist/index346.js.map +1 -1
  411. package/dist/index347.js +5 -3
  412. package/dist/index347.js.map +1 -1
  413. package/dist/index348.js +122 -3
  414. package/dist/index348.js.map +1 -1
  415. package/dist/index349.js +33 -4
  416. package/dist/index349.js.map +1 -1
  417. package/dist/index35.js +5 -5
  418. package/dist/index350.js +74 -15
  419. package/dist/index350.js.map +1 -1
  420. package/dist/index351.js +141 -7
  421. package/dist/index351.js.map +1 -1
  422. package/dist/index352.js +61 -51
  423. package/dist/index352.js.map +1 -1
  424. package/dist/index353.js +49 -11
  425. package/dist/index353.js.map +1 -1
  426. package/dist/index354.js +15 -17
  427. package/dist/index354.js.map +1 -1
  428. package/dist/index355.js +8 -5
  429. package/dist/index355.js.map +1 -1
  430. package/dist/index356.js +4 -5
  431. package/dist/index356.js.map +1 -1
  432. package/dist/index357.js +11 -20
  433. package/dist/index357.js.map +1 -1
  434. package/dist/index358.js +21 -44
  435. package/dist/index358.js.map +1 -1
  436. package/dist/index359.js +5 -18
  437. package/dist/index359.js.map +1 -1
  438. package/dist/index36.js +10 -10
  439. package/dist/index360.js +17 -4
  440. package/dist/index360.js.map +1 -1
  441. package/dist/index361.js +12 -200
  442. package/dist/index361.js.map +1 -1
  443. package/dist/index362.js +4 -78
  444. package/dist/index362.js.map +1 -1
  445. package/dist/index363.js +10 -121
  446. package/dist/index363.js.map +1 -1
  447. package/dist/index364.js +16 -17
  448. package/dist/index364.js.map +1 -1
  449. package/dist/index365.js +5 -32
  450. package/dist/index365.js.map +1 -1
  451. package/dist/index366.js +20 -73
  452. package/dist/index366.js.map +1 -1
  453. package/dist/index367.js +45 -143
  454. package/dist/index367.js.map +1 -1
  455. package/dist/index368.js +17 -61
  456. package/dist/index368.js.map +1 -1
  457. package/dist/index369.js +4 -49
  458. package/dist/index369.js.map +1 -1
  459. package/dist/index37.js +3 -3
  460. package/dist/index370.js +200 -4
  461. package/dist/index370.js.map +1 -1
  462. package/dist/index371.js +77 -11
  463. package/dist/index371.js.map +1 -1
  464. package/dist/index372.js +20 -21
  465. package/dist/index372.js.map +1 -1
  466. package/dist/index373.js +8 -4
  467. package/dist/index373.js.map +1 -1
  468. package/dist/index374.js +26 -5
  469. package/dist/index374.js.map +1 -1
  470. package/dist/index375.js +27 -4
  471. package/dist/index375.js.map +1 -1
  472. package/dist/index376.js +136 -14
  473. package/dist/index376.js.map +1 -1
  474. package/dist/index377.js +12 -8
  475. package/dist/index377.js.map +1 -1
  476. package/dist/index378.js +226 -5
  477. package/dist/index378.js.map +1 -1
  478. package/dist/index379.js +3 -4
  479. package/dist/index379.js.map +1 -1
  480. package/dist/index38.js +4 -4
  481. package/dist/index380.js +19 -545
  482. package/dist/index380.js.map +1 -1
  483. package/dist/index381.js +77 -46
  484. package/dist/index381.js.map +1 -1
  485. package/dist/index382.js +12 -18
  486. package/dist/index382.js.map +1 -1
  487. package/dist/index383.js +3 -5
  488. package/dist/index383.js.map +1 -1
  489. package/dist/index384.js +71 -7
  490. package/dist/index384.js.map +1 -1
  491. package/dist/index385.js +9 -7
  492. package/dist/index385.js.map +1 -1
  493. package/dist/index386.js +15 -7
  494. package/dist/index386.js.map +1 -1
  495. package/dist/index387.js +4 -11
  496. package/dist/index387.js.map +1 -1
  497. package/dist/index388.js +4 -8
  498. package/dist/index388.js.map +1 -1
  499. package/dist/index389.js +4 -13
  500. package/dist/index389.js.map +1 -1
  501. package/dist/index39.js +5 -5
  502. package/dist/index390.js +16 -3
  503. package/dist/index390.js.map +1 -1
  504. package/dist/index391.js +9 -3
  505. package/dist/index391.js.map +1 -1
  506. package/dist/index392.js +5 -8
  507. package/dist/index392.js.map +1 -1
  508. package/dist/index393.js +5 -26
  509. package/dist/index393.js.map +1 -1
  510. package/dist/index394.js +543 -24
  511. package/dist/index394.js.map +1 -1
  512. package/dist/index395.js +44 -135
  513. package/dist/index395.js.map +1 -1
  514. package/dist/index396.js +16 -11
  515. package/dist/index396.js.map +1 -1
  516. package/dist/index397.js +5 -226
  517. package/dist/index397.js.map +1 -1
  518. package/dist/index398.js +7 -3
  519. package/dist/index398.js.map +1 -1
  520. package/dist/index399.js +6 -19
  521. package/dist/index399.js.map +1 -1
  522. package/dist/index40.js +3 -3
  523. package/dist/index400.js +7 -77
  524. package/dist/index400.js.map +1 -1
  525. package/dist/index401.js +12 -12
  526. package/dist/index401.js.map +1 -1
  527. package/dist/index402.js +8 -3
  528. package/dist/index402.js.map +1 -1
  529. package/dist/index403.js +12 -71
  530. package/dist/index403.js.map +1 -1
  531. package/dist/index404.js +3 -9
  532. package/dist/index404.js.map +1 -1
  533. package/dist/index405.js +3 -16
  534. package/dist/index405.js.map +1 -1
  535. package/dist/index406.js +14 -4
  536. package/dist/index406.js.map +1 -1
  537. package/dist/index407.js +490 -54
  538. package/dist/index407.js.map +1 -1
  539. package/dist/index408.js +5 -68
  540. package/dist/index408.js.map +1 -1
  541. package/dist/index409.js +55 -30
  542. package/dist/index409.js.map +1 -1
  543. package/dist/index41.js +10 -10
  544. package/dist/index410.js +68 -9
  545. package/dist/index410.js.map +1 -1
  546. package/dist/index411.js +26 -148
  547. package/dist/index411.js.map +1 -1
  548. package/dist/index412.js +9 -108
  549. package/dist/index412.js.map +1 -1
  550. package/dist/index413.js +153 -8
  551. package/dist/index413.js.map +1 -1
  552. package/dist/index414.js +108 -2
  553. package/dist/index414.js.map +1 -1
  554. package/dist/index415.js +7 -43
  555. package/dist/index415.js.map +1 -1
  556. package/dist/index416.js +2 -56
  557. package/dist/index416.js.map +1 -1
  558. package/dist/index417.js +43 -7
  559. package/dist/index417.js.map +1 -1
  560. package/dist/index418.js +56 -2
  561. package/dist/index418.js.map +1 -1
  562. package/dist/index419.js +7 -54
  563. package/dist/index419.js.map +1 -1
  564. package/dist/index420.js +2 -56
  565. package/dist/index420.js.map +1 -1
  566. package/dist/index421.js +54 -14
  567. package/dist/index421.js.map +1 -1
  568. package/dist/index422.js +51 -487
  569. package/dist/index422.js.map +1 -1
  570. package/dist/index423.js +2 -16
  571. package/dist/index423.js.map +1 -1
  572. package/dist/index424.js +2 -29
  573. package/dist/index424.js.map +1 -1
  574. package/dist/index425.js +2 -13
  575. package/dist/index425.js.map +1 -1
  576. package/dist/index426.js +2 -7
  577. package/dist/index426.js.map +1 -1
  578. package/dist/index427.js +16 -2
  579. package/dist/index427.js.map +1 -1
  580. package/dist/index428.js +29 -2
  581. package/dist/index428.js.map +1 -1
  582. package/dist/index429.js +13 -2
  583. package/dist/index429.js.map +1 -1
  584. package/dist/index430.js +7 -2
  585. package/dist/index430.js.map +1 -1
  586. package/dist/index48.js +2 -2
  587. package/dist/index49.js +31 -31
  588. package/dist/index50.js +29 -29
  589. package/dist/index51.js +2 -2
  590. package/dist/index52.js +12 -12
  591. package/dist/index53.js +4 -4
  592. package/dist/index54.js +1 -1
  593. package/dist/index55.js +21 -21
  594. package/dist/index56.js +5 -5
  595. package/dist/index57.js +5 -5
  596. package/dist/index58.js +8 -8
  597. package/dist/index59.js +5 -5
  598. package/dist/index60.js +17 -17
  599. package/dist/index61.js +5 -5
  600. package/dist/index62.js +3 -3
  601. package/dist/index74.js +1 -1
  602. package/dist/index75.js +2 -2
  603. package/dist/index76.js +2 -2
  604. package/dist/index79.js +52 -6
  605. package/dist/index79.js.map +1 -1
  606. package/dist/index80.js +4 -68
  607. package/dist/index80.js.map +1 -1
  608. package/dist/index81.js +5 -2
  609. package/dist/index81.js.map +1 -1
  610. package/dist/index82.js +15 -363
  611. package/dist/index82.js.map +1 -1
  612. package/dist/index83.js +5 -261
  613. package/dist/index83.js.map +1 -1
  614. package/dist/index84.js +7 -60
  615. package/dist/index84.js.map +1 -1
  616. package/dist/index85.js +16 -46
  617. package/dist/index85.js.map +1 -1
  618. package/dist/index86.js +4 -169
  619. package/dist/index86.js.map +1 -1
  620. package/dist/index87.js +4 -109
  621. package/dist/index87.js.map +1 -1
  622. package/dist/index88.js +5 -24
  623. package/dist/index88.js.map +1 -1
  624. package/dist/index89.js +6 -8
  625. package/dist/index89.js.map +1 -1
  626. package/dist/index90.js +4 -4
  627. package/dist/index90.js.map +1 -1
  628. package/dist/index91.js +4 -5
  629. package/dist/index91.js.map +1 -1
  630. package/dist/index92.js +6 -4
  631. package/dist/index92.js.map +1 -1
  632. package/dist/index93.js +24 -466
  633. package/dist/index93.js.map +1 -1
  634. package/dist/index94.js +6 -185
  635. package/dist/index94.js.map +1 -1
  636. package/dist/index95.js +4 -107
  637. package/dist/index95.js.map +1 -1
  638. package/dist/index96.js +6 -262
  639. package/dist/index96.js.map +1 -1
  640. package/dist/index97.js +5 -9
  641. package/dist/index97.js.map +1 -1
  642. package/dist/index98.js +4 -42
  643. package/dist/index98.js.map +1 -1
  644. package/dist/index99.js +5 -4
  645. package/dist/index99.js.map +1 -1
  646. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index18.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 COMMON_IDD_PREFIXES,\n DEFAULT_COUNTRY,\n buildFallbackSelectedCountry,\n getCachedCountryOptions,\n getLocaleCacheKey,\n getValidCountry,\n normalizeSearchValue,\n optionMatchIndex,\n parseLocaleCacheKey,\n toSelectedCountry,\n} from \"./country-options\"\nimport {\n formatWithAsYouType,\n getLengthIssue,\n sanitizeDigits,\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\nconst INVISIBLE_FORMATTING_CHARACTERS =\n /[\\u061C\\u200B-\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]/g\n\ntype ParsedInput = Omit<PhoneNumberChangeDetails, \"selectedCountry\"> & {\n displayValue: string\n lengthIssue: LengthIssue | null\n}\n\nfunction stripInvisibleFormatting(value: string) {\n return value.replace(INVISIBLE_FORMATTING_CHARACTERS, \"\")\n}\n\nfunction stripIddPrefix(digits: string) {\n for (const prefix of COMMON_IDD_PREFIXES) {\n if (digits.startsWith(prefix)) {\n return digits.slice(prefix.length)\n }\n }\n return digits\n}\n\nfunction normalizeImplicitInternationalInput(digits: string) {\n const candidate = `+${digits}`\n const { phoneNumber, detectedCountry } = formatWithAsYouType(candidate)\n\n if (phoneNumber?.isValid() && detectedCountry) {\n return candidate\n }\n\n return null\n}\n\nfunction normalizeExplicitInternationalInput(value: string) {\n const cleaned = stripInvisibleFormatting(value).trim()\n if (!cleaned) {\n return null\n }\n\n if (cleaned.startsWith(\"+\")) {\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return \"+\"\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n if (digitsWithoutIdd !== digits) {\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n return null\n}\n\nfunction normalizeInternationalInput(value: string) {\n const explicitInternational = normalizeExplicitInternationalInput(value)\n if (explicitInternational != null) {\n return explicitInternational\n }\n\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n return normalizeImplicitInternationalInput(digits)\n}\n\nfunction getDialCode(country: CountryCode | null, parsedDialCode: string | undefined) {\n if (parsedDialCode) {\n return parsedDialCode\n }\n return country ? getCountryCallingCode(country) : null\n}\n\nfunction getInputValueForSelectedCountry(\n value: string,\n option: Pick<CountryOption, \"dialCode\" | \"value\">,\n options?: { allowImplicitInternational?: boolean }\n) {\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n\n if (!digits) {\n return `+${option.dialCode}`\n }\n\n const normalizedInternational =\n options?.allowImplicitInternational === false\n ? normalizeExplicitInternationalInput(cleaned)\n : normalizeInternationalInput(cleaned)\n if (normalizedInternational) {\n const normalizedDigits = sanitizeDigits(normalizedInternational)\n if (normalizedDigits.startsWith(option.dialCode)) {\n return normalizedInternational\n }\n\n const { phoneNumber } = formatWithAsYouType(normalizedInternational)\n const currentDialCode = phoneNumber?.countryCallingCode\n const nationalDigits =\n currentDialCode && normalizedDigits.startsWith(currentDialCode)\n ? normalizedDigits.slice(currentDialCode.length)\n : phoneNumber?.nationalNumber ?? normalizedDigits\n\n return `+${option.dialCode}${nationalDigits}`\n }\n\n const { phoneNumber } = formatWithAsYouType(cleaned, option.value)\n return `+${option.dialCode}${phoneNumber?.nationalNumber ?? digits}`\n}\n\nfunction preferSelectedCountry(\n parsed: ParsedInput,\n option: Pick<CountryOption, \"dialCode\" | \"value\">\n): ParsedInput {\n return {\n ...parsed,\n country: option.value,\n countryCallingCode: option.dialCode,\n lengthIssue: getLengthIssue(parsed.rawInput, option.value),\n }\n}\n\nfunction parsePhoneInput(rawValue: string | undefined, baseCountry?: CountryCode): ParsedInput {\n const cleaned = stripInvisibleFormatting(rawValue ?? \"\").trim()\n\n if (!cleaned) {\n const country = baseCountry ?? null\n const countryCallingCode = country ? getCountryCallingCode(country) : null\n\n return {\n displayValue: \"\",\n formattedInternational: \"\",\n formattedNational: \"\",\n e164: null,\n country,\n countryCallingCode,\n nationalNumber: \"\",\n rawInput: \"\",\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalizedInternational = normalizeInternationalInput(cleaned)\n const shouldFormat = normalizedInternational != null || baseCountry != null\n\n if (!shouldFormat) {\n return {\n displayValue: cleaned,\n formattedInternational: cleaned,\n formattedNational: cleaned,\n e164: null,\n country: null,\n countryCallingCode: null,\n nationalNumber: sanitizeDigits(cleaned),\n rawInput: cleaned,\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalized = normalizedInternational ?? cleaned\n const {\n international,\n national,\n formatted,\n phoneNumber,\n detectedCountry,\n } = formatWithAsYouType(normalized, baseCountry)\n const hasInternationalPrefix = normalizedInternational != null\n const country = hasInternationalPrefix\n ? detectedCountry ?? baseCountry ?? null\n : baseCountry ?? detectedCountry ?? null\n const countryCallingCode = getDialCode(country, phoneNumber?.countryCallingCode)\n const normalizedDigits = sanitizeDigits(normalized)\n const nationalNumber =\n phoneNumber?.nationalNumber ??\n (countryCallingCode && normalized.startsWith(\"+\")\n ? stripPrefix(normalizedDigits, countryCallingCode)\n : sanitizeDigits(cleaned))\n const displayValue = hasInternationalPrefix ? international : formatted\n\n return {\n displayValue,\n formattedInternational: phoneNumber?.formatInternational() ?? international,\n formattedNational: phoneNumber?.formatNational() ?? national,\n e164: phoneNumber?.number ?? null,\n country,\n countryCallingCode,\n nationalNumber,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n lengthIssue: country ? getLengthIssue(normalized, country) : null,\n }\n}\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 controlledCountry = typeof countryProp === \"string\" ? countryProp : null\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 menuPriorityCountry = 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 initialStateRef = React.useRef<ParsedInput | null>(null)\n\n if (!initialStateRef.current) {\n const initialState = parsePhoneInput(value, controlledCountry ?? undefined)\n initialStateRef.current = initialState\n }\n\n const initialState = initialStateRef.current\n\n const [uncontrolledCountry, setUncontrolledCountry] = React.useState<CountryCode | null>(\n controlledCountry ? null : initialState.country\n )\n const [inputValueState, setInputValueState] = React.useState(initialState.displayValue)\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>(\n initialState.lengthIssue\n )\n\n const manualSelectionCountryRef = React.useRef<CountryCode | null>(null)\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 hasNotifiedCountryRef = React.useRef(false)\n const lastNotifiedCountryRef = React.useRef<CountryCode | null>(null)\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n const activeCountry = controlledCountry ?? uncontrolledCountry\n const explicitFormattingCountry = controlledCountry ?? manualSelectionCountryRef.current ?? undefined\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 menuPortalTarget: userMenuPortalTarget,\n menuPosition: userMenuPosition,\n ...forwardedSelectProps\n } = selectOverrides\n const { noOptionsMessage, ...restForwardedSelectProps } = forwardedSelectProps\n const [defaultMenuPortalTarget, setDefaultMenuPortalTarget] =\n React.useState<HTMLElement | null>(null)\n const hasUserMenuPortalTarget = \"menuPortalTarget\" in selectOverrides\n const menuPortalTarget = hasUserMenuPortalTarget\n ? userMenuPortalTarget\n : defaultMenuPortalTarget\n\n const mergedSelectStyles = React.useMemo<StylesConfig<CountryOption, false>>(\n () => {\n const userMenuPortal = userSelectStyles?.menuPortal\n\n return {\n ...suggestionSelectStyles,\n ...(userSelectStyles ?? {}),\n menuPortal: (provided, state) => {\n const base = {\n ...provided,\n zIndex: 1300,\n }\n\n return userMenuPortal ? userMenuPortal(base, state) : base\n },\n }\n },\n [userSelectStyles]\n )\n\n React.useLayoutEffect(() => {\n if (hasUserMenuPortalTarget || typeof document === \"undefined\") {\n return\n }\n\n const portalTarget =\n inputRef.current?.closest<HTMLElement>(\n \"[data-slot='dialog-content'], [data-slot='sheet-content'], [role='dialog']\"\n ) ?? document.body\n setDefaultMenuPortalTarget(portalTarget)\n }, [hasUserMenuPortalTarget])\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 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 parsed = parsePhoneInput(value, explicitFormattingCountry)\n keyboardBufferRef.current = \"\"\n\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n }, [controlledCountry, explicitFormattingCountry, uncontrolledCountry, value])\n\n React.useEffect(() => {\n const country = activeCountry ?? null\n if (!hasNotifiedCountryRef.current && country == null) {\n return\n }\n\n if (hasNotifiedCountryRef.current && lastNotifiedCountryRef.current === country) {\n return\n }\n\n hasNotifiedCountryRef.current = true\n lastNotifiedCountryRef.current = country\n onCountryChange?.(country, country ? resolveSelectedCountry(country) : null)\n }, [activeCountry, onCountryChange, resolveSelectedCountry])\n\n const emitChange = React.useCallback(\n (details: Omit<PhoneNumberChangeDetails, \"selectedCountry\">) => {\n onChange?.({\n ...details,\n selectedCountry: details.country ? resolveSelectedCountry(details.country) : null,\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 applyParsedInput = React.useCallback(\n (parsed: ParsedInput, snapshot: ReturnType<typeof captureSelectionSnapshot> | null) => {\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n\n if (snapshot) {\n pendingSelectionRef.current = resolveSelection(snapshot, parsed.displayValue)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n },\n [controlledCountry, emitChange, uncontrolledCountry]\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 normalizedExplicitInternational = normalizeExplicitInternationalInput(raw)\n const manualCountry = manualSelectionCountryRef.current\n if (normalizedExplicitInternational != null && manualCountry) {\n const manualDialCode = getCountryCallingCode(manualCountry)\n if (!sanitizeDigits(normalizedExplicitInternational).startsWith(manualDialCode)) {\n manualSelectionCountryRef.current = null\n }\n } else if (normalizedExplicitInternational != null) {\n manualSelectionCountryRef.current = null\n }\n\n const activeManualCountry = manualSelectionCountryRef.current\n const rawDigits = sanitizeDigits(raw)\n if (\n !controlledCountry &&\n activeManualCountry &&\n normalizedExplicitInternational == null &&\n rawDigits\n ) {\n const manualOption = {\n value: activeManualCountry,\n dialCode: getCountryCallingCode(activeManualCountry),\n }\n const parsed = preferSelectedCountry(\n parsePhoneInput(\n getInputValueForSelectedCountry(\n raw,\n {\n value: manualOption.value,\n dialCode: manualOption.dialCode,\n },\n { allowImplicitInternational: false }\n ),\n activeManualCountry\n ),\n manualOption\n )\n applyParsedInput(parsed, snapshot)\n return\n }\n\n const baseCountry = controlledCountry ?? activeManualCountry ?? undefined\n const parsed = parsePhoneInput(raw, baseCountry)\n applyParsedInput(parsed, snapshot)\n },\n [applyParsedInput, controlledCountry]\n )\n\n const handleCountrySelect = React.useCallback(\n (option: SingleValue<CountryOption>) => {\n if (!option) {\n return\n }\n\n manualSelectionCountryRef.current = option.value\n const nextInputValue = getInputValueForSelectedCountry(inputValueState, option)\n const parsed = preferSelectedCountry(\n parsePhoneInput(nextInputValue, option.value),\n option\n )\n\n setInputValueState(parsed.displayValue)\n pendingSelectionRef.current = {\n start: parsed.displayValue.length,\n end: parsed.displayValue.length,\n }\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry) {\n setUncontrolledCountry(option.value)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n },\n [controlledCountry, emitChange, inputValueState]\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 | undefined) => {\n if (option && !results.some((existing) => existing.value === option.value)) {\n results.push(option)\n }\n }\n\n const priorityOption = countryOptions.find((option) => option.value === menuPriorityCountry)\n const currentOption = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const query = countryQuery.trim()\n const digitQuery = sanitizeDigits(query)\n const normalizedQuery = normalizeSearchValue(query)\n\n if (!digitQuery && !normalizedQuery) {\n pushUnique(currentOption)\n pushUnique(priorityOption)\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 pushUnique(currentOption)\n pushUnique(priorityOption)\n if (results.length === 0) {\n countryOptions.forEach(pushUnique)\n }\n\n return results\n }, [activeCountry, countryOptions, countryQuery, menuPriorityCountry, 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\n React.useEffect(() => {\n if (highlightedIndex < 0) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [highlightedIndex])\n\n const consumeScrollBehavior = React.useCallback(() => {\n const behavior = scrollBehaviorRef.current\n scrollBehaviorRef.current = \"smooth\"\n return behavior\n }, [])\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 = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const activeFlag = activeOption?.flag ?? \"\"\n const inlineFlagLabel = activeCountry\n ? resolvedMessages.selectedCountryLabel(activeOption?.name ?? activeCountry)\n : resolvedMessages.selectCountryLabel\n const hasInlineFlag = Boolean(activeCountry && 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 targetOption = highlightedOption ?? filteredOptions[0]\n handleCountrySelect(targetOption)\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 menuPortalTarget={menuPortalTarget}\n menuPosition={userMenuPosition ?? (menuPortalTarget ? \"fixed\" : \"absolute\")}\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":["INVISIBLE_FORMATTING_CHARACTERS","stripInvisibleFormatting","value","replace","stripIddPrefix","digits","prefix","COMMON_IDD_PREFIXES","startsWith","slice","length","normalizeImplicitInternationalInput","candidate","phoneNumber","detectedCountry","formatWithAsYouType","isValid","normalizeExplicitInternationalInput","cleaned","trim","sanitizeDigits","digitsWithoutIdd","normalizeInternationalInput","explicitInternational","getDialCode","country","parsedDialCode","getCountryCallingCode","getInputValueForSelectedCountry","option","options","dialCode","normalizedInternational","allowImplicitInternational","normalizedDigits","currentDialCode","countryCallingCode","nationalDigits","nationalNumber","preferSelectedCountry","parsed","lengthIssue","getLengthIssue","rawInput","parsePhoneInput","rawValue","baseCountry","displayValue","formattedInternational","formattedNational","e164","normalized","international","national","formatted","hasInternationalPrefix","stripPrefix","formatInternational","formatNational","number","PhoneNumberInput","React","forwardRef","props","forwardedRef","defaultCountry","countryProp","locale","onChange","onCountryChange","className","inputClassName","disabled","readOnly","selectProps","autofillShimName","messages","messagesProp","renderValidationMessage","restProps","onFocus","onInputFocus","onBlur","onInputBlur","onKeyDown","onInputKeyDown","name","inputName","autoComplete","inputAutoComplete","restInputProps","controlledCountry","localeCacheKey","getLocaleCacheKey","localeForBuild","useMemo","parseLocaleCacheKey","resolvedMessages","resolveMessages","countryOptions","getCachedCountryOptions","resolveSelectedCountry","useCallback","match","find","toSelectedCountry","buildFallbackSelectedCountry","menuPriorityCountry","getValidCountry","DEFAULT_COUNTRY","some","initialStateRef","useRef","current","initialState","undefined","uncontrolledCountry","setUncontrolledCountry","useState","inputValueState","setInputValueState","countryQuery","setCountryQuery","showSuggestions","setShowSuggestions","highlightedIndex","setHighlightedIndex","isFocused","setIsFocused","setLengthIssue","manualSelectionCountryRef","keyboardBufferRef","bufferTimeoutRef","scrollBehaviorRef","pendingSelectionRef","hasNotifiedCountryRef","lastNotifiedCountryRef","inputRef","activeCountry","explicitFormattingCountry","useImperativeHandle","useLayoutEffect","selection","input","start","end","setSelectionRange","selectOverrides","styles","userSelectStyles","components","userSelectComponents","classNamePrefix","userClassNamePrefix","formatOptionLabel","userFormatOptionLabel","menuPortalTarget","userMenuPortalTarget","menuPosition","userMenuPosition","forwardedSelectProps","noOptionsMessage","restForwardedSelectProps","defaultMenuPortalTarget","setDefaultMenuPortalTarget","hasUserMenuPortalTarget","mergedSelectStyles","userMenuPortal","menuPortal","suggestionSelectStyles","provided","state","base","zIndex","document","portalTarget","closest","body","mergedSelectComponents","baseComponents","Control","HiddenControl","IndicatorsContainer","NullComponent","DropdownIndicator","IndicatorSeparator","ValueContainer","overrides","Option","SuggestionOption","useEffect","window","clearTimeout","emitChange","details","selectedCountry","scheduleBufferReset","setTimeout","applyParsedInput","snapshot","resolveSelection","handleInputChange","event","target","captureSelectionSnapshot","raw","normalizedExplicitInternational","manualCountry","manualDialCode","activeManualCountry","rawDigits","manualOption","handleCountrySelect","nextInputValue","requestAnimationFrame","focus","filteredOptions","results","pushUnique","existing","push","priorityOption","currentOption","query","digitQuery","normalizedQuery","normalizeSearchValue","forEach","filter","sort","a","b","aExact","bExact","normalizedSearchableTokens","token","includes","aIndex","optionMatchIndex","bIndex","localeCompare","suggestionMenuIsOpen","highlightedOption","consumeScrollBehavior","behavior","updateHighlightedOption","index","findIndex","selectFormatOptionLabel","meta","formatCountryOption","optionLabelRenderer","context","inputValue","selectValue","highlightContextValue","highlightedValue","setHighlightedOption","renderOptionLabel","activeOption","activeFlag","flag","inlineFlagLabel","selectedCountryLabel","selectCountryLabel","hasInlineFlag","Boolean","lengthHint","lengthTooLong","countryName","validationNode","rendered","message","code","jsx","appendToBuffer","char","popBuffer","handleKeyDown","defaultPrevented","key","metaKey","ctrlKey","altKey","currentTarget","selectionStart","selectionEnd","isCollapsedSelection","nextStart","skipFormattingCharactersLeft","preventDefault","skipFormattingCharactersRight","repeat","test","toLowerCase","targetOption","handleFocus","handleBlur","openCountryMenu","shimName","cn","jsxs","pointerEvents","width","SuggestionContext","Select","noMatches","displayName"],"mappings":";;;;;;;;;;AA+DA,MAAMA,KACJ;AAOF,SAASC,GAAyBC,GAAe;AAC/C,SAAOA,EAAMC,QAAQH,IAAiC,EAAE;AAC1D;AAEA,SAASI,GAAeC,GAAgB;AACtC,aAAWC,KAAUC;AACnB,QAAIF,EAAOG,WAAWF,CAAM;AAC1B,aAAOD,EAAOI,MAAMH,EAAOI,MAAM;AAGrC,SAAOL;AACT;AAEA,SAASM,GAAoCN,GAAgB;AAC3D,QAAMO,IAAY,IAAIP,CAAM,IACtB;AAAA,IAAEQ,aAAAA;AAAAA,IAAaC,iBAAAA;AAAAA,EAAAA,IAAoBC,GAAoBH,CAAS;AAEtE,SAAIC,GAAaG,QAAAA,KAAaF,IACrBF,IAGF;AACT;AAEA,SAASK,GAAoCf,GAAe;AAC1D,QAAMgB,IAAUjB,GAAyBC,CAAK,EAAEiB,KAAAA;AAChD,MAAI,CAACD;AACH,WAAO;AAGT,MAAIA,EAAQV,WAAW,GAAG,GAAG;AAC3B,UAAMH,IAASe,EAAeF,CAAO;AACrC,QAAI,CAACb;AACH,aAAO;AAGT,UAAMgB,IAAmBjB,GAAeC,CAAM;AAC9C,WAAOgB,IAAmB,IAAIA,CAAgB,KAAK;AAAA,EACrD;AAEA,QAAMhB,IAASe,EAAeF,CAAO;AACrC,MAAI,CAACb;AACH,WAAO;AAGT,QAAMgB,IAAmBjB,GAAeC,CAAM;AAC9C,SAAIgB,MAAqBhB,IAChBgB,IAAmB,IAAIA,CAAgB,KAAK,MAG9C;AACT;AAEA,SAASC,GAA4BpB,GAAe;AAClD,QAAMqB,IAAwBN,GAAoCf,CAAK;AACvE,MAAIqB,KAAyB;AAC3B,WAAOA;A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,MAAuB,4BACxC,aAAY,IACZ,mBAAmB+F,IACnB,kBACEvF,OAAqB,MAAMhE,EAAiBiN,WAAAA,CAC7C,EAAA,CAEL,EAAA,CACF;AAAA,IAECpC;AAAAA,EAAAA,GACH;AAEJ,CACF;AAEAlN,GAAiBuP,cAAc;"}
1
+ {"version":3,"file":"index18.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 COMMON_IDD_PREFIXES,\n DEFAULT_COUNTRY,\n buildFallbackSelectedCountry,\n getCachedCountryOptions,\n getLocaleCacheKey,\n getValidCountry,\n normalizeSearchValue,\n optionMatchIndex,\n parseLocaleCacheKey,\n toSelectedCountry,\n} from \"./country-options\"\nimport {\n formatWithAsYouType,\n getLengthIssue,\n sanitizeDigits,\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\nconst INVISIBLE_FORMATTING_CHARACTERS =\n /[\\u061C\\u200B-\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]/g\n\ntype ParsedInput = Omit<PhoneNumberChangeDetails, \"selectedCountry\"> & {\n displayValue: string\n lengthIssue: LengthIssue | null\n}\n\nfunction stripInvisibleFormatting(value: string) {\n return value.replace(INVISIBLE_FORMATTING_CHARACTERS, \"\")\n}\n\nfunction stripIddPrefix(digits: string) {\n for (const prefix of COMMON_IDD_PREFIXES) {\n if (digits.startsWith(prefix)) {\n return digits.slice(prefix.length)\n }\n }\n return digits\n}\n\nfunction normalizeImplicitInternationalInput(digits: string) {\n const candidate = `+${digits}`\n const { phoneNumber, detectedCountry } = formatWithAsYouType(candidate)\n\n if (phoneNumber?.isValid() && detectedCountry) {\n return candidate\n }\n\n return null\n}\n\nfunction normalizeExplicitInternationalInput(value: string) {\n const cleaned = stripInvisibleFormatting(value).trim()\n if (!cleaned) {\n return null\n }\n\n if (cleaned.startsWith(\"+\")) {\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return \"+\"\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n const digitsWithoutIdd = stripIddPrefix(digits)\n if (digitsWithoutIdd !== digits) {\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : \"+\"\n }\n\n return null\n}\n\nfunction normalizeInternationalInput(value: string) {\n const explicitInternational = normalizeExplicitInternationalInput(value)\n if (explicitInternational != null) {\n return explicitInternational\n }\n\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n if (!digits) {\n return null\n }\n\n return normalizeImplicitInternationalInput(digits)\n}\n\nfunction getDialCode(country: CountryCode | null, parsedDialCode: string | undefined) {\n if (parsedDialCode) {\n return parsedDialCode\n }\n return country ? getCountryCallingCode(country) : null\n}\n\nfunction getInputValueForSelectedCountry(\n value: string,\n option: Pick<CountryOption, \"dialCode\" | \"value\">,\n options?: { allowImplicitInternational?: boolean }\n) {\n const cleaned = stripInvisibleFormatting(value).trim()\n const digits = sanitizeDigits(cleaned)\n\n if (!digits) {\n return `+${option.dialCode}`\n }\n\n const normalizedInternational =\n options?.allowImplicitInternational === false\n ? normalizeExplicitInternationalInput(cleaned)\n : normalizeInternationalInput(cleaned)\n if (normalizedInternational) {\n const normalizedDigits = sanitizeDigits(normalizedInternational)\n if (normalizedDigits.startsWith(option.dialCode)) {\n return normalizedInternational\n }\n\n const { phoneNumber } = formatWithAsYouType(normalizedInternational)\n const currentDialCode = phoneNumber?.countryCallingCode\n const nationalDigits =\n currentDialCode && normalizedDigits.startsWith(currentDialCode)\n ? normalizedDigits.slice(currentDialCode.length)\n : phoneNumber?.nationalNumber ?? normalizedDigits\n\n return `+${option.dialCode}${nationalDigits}`\n }\n\n const { phoneNumber } = formatWithAsYouType(cleaned, option.value)\n return `+${option.dialCode}${phoneNumber?.nationalNumber ?? digits}`\n}\n\nfunction preferSelectedCountry(\n parsed: ParsedInput,\n option: Pick<CountryOption, \"dialCode\" | \"value\">\n): ParsedInput {\n return {\n ...parsed,\n country: option.value,\n countryCallingCode: option.dialCode,\n lengthIssue: getLengthIssue(parsed.rawInput, option.value),\n }\n}\n\nfunction parsePhoneInput(rawValue: string | undefined, baseCountry?: CountryCode): ParsedInput {\n const cleaned = stripInvisibleFormatting(rawValue ?? \"\").trim()\n\n if (!cleaned) {\n const country = baseCountry ?? null\n const countryCallingCode = country ? getCountryCallingCode(country) : null\n\n return {\n displayValue: \"\",\n formattedInternational: \"\",\n formattedNational: \"\",\n e164: null,\n country,\n countryCallingCode,\n nationalNumber: \"\",\n rawInput: \"\",\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalizedInternational = normalizeInternationalInput(cleaned)\n const shouldFormat = normalizedInternational != null || baseCountry != null\n\n if (!shouldFormat) {\n return {\n displayValue: cleaned,\n formattedInternational: cleaned,\n formattedNational: cleaned,\n e164: null,\n country: null,\n countryCallingCode: null,\n nationalNumber: sanitizeDigits(cleaned),\n rawInput: cleaned,\n isValid: false,\n lengthIssue: null,\n }\n }\n\n const normalized = normalizedInternational ?? cleaned\n const {\n international,\n national,\n formatted,\n phoneNumber,\n detectedCountry,\n } = formatWithAsYouType(normalized, baseCountry)\n const hasInternationalPrefix = normalizedInternational != null\n const country = hasInternationalPrefix\n ? detectedCountry ?? baseCountry ?? null\n : baseCountry ?? detectedCountry ?? null\n const countryCallingCode = getDialCode(country, phoneNumber?.countryCallingCode)\n const normalizedDigits = sanitizeDigits(normalized)\n const nationalNumber =\n phoneNumber?.nationalNumber ??\n (countryCallingCode && normalized.startsWith(\"+\")\n ? stripPrefix(normalizedDigits, countryCallingCode)\n : sanitizeDigits(cleaned))\n const displayValue = hasInternationalPrefix ? international : formatted\n\n return {\n displayValue,\n formattedInternational: phoneNumber?.formatInternational() ?? international,\n formattedNational: phoneNumber?.formatNational() ?? national,\n e164: phoneNumber?.number ?? null,\n country,\n countryCallingCode,\n nationalNumber,\n rawInput: normalized,\n isValid: phoneNumber?.isValid() ?? false,\n lengthIssue: country ? getLengthIssue(normalized, country) : null,\n }\n}\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 controlledCountry = typeof countryProp === \"string\" ? countryProp : null\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 menuPriorityCountry = 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 initialStateRef = React.useRef<ParsedInput | null>(null)\n\n if (!initialStateRef.current) {\n const initialState = parsePhoneInput(value, controlledCountry ?? undefined)\n initialStateRef.current = initialState\n }\n\n const initialState = initialStateRef.current\n\n const [uncontrolledCountry, setUncontrolledCountry] = React.useState<CountryCode | null>(\n controlledCountry ? null : initialState.country\n )\n const [inputValueState, setInputValueState] = React.useState(initialState.displayValue)\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>(\n initialState.lengthIssue\n )\n\n const manualSelectionCountryRef = React.useRef<CountryCode | null>(null)\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 hasNotifiedCountryRef = React.useRef(false)\n const lastNotifiedCountryRef = React.useRef<CountryCode | null>(null)\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n\n const activeCountry = controlledCountry ?? uncontrolledCountry\n const explicitFormattingCountry = controlledCountry ?? manualSelectionCountryRef.current ?? undefined\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 menuPortalTarget: userMenuPortalTarget,\n menuPosition: userMenuPosition,\n ...forwardedSelectProps\n } = selectOverrides\n const { noOptionsMessage, ...restForwardedSelectProps } = forwardedSelectProps\n const [defaultMenuPortalTarget, setDefaultMenuPortalTarget] =\n React.useState<HTMLElement | null>(null)\n const hasUserMenuPortalTarget = \"menuPortalTarget\" in selectOverrides\n const menuPortalTarget = hasUserMenuPortalTarget\n ? userMenuPortalTarget\n : defaultMenuPortalTarget\n\n const mergedSelectStyles = React.useMemo<StylesConfig<CountryOption, false>>(\n () => {\n const userMenuPortal = userSelectStyles?.menuPortal\n\n return {\n ...suggestionSelectStyles,\n ...(userSelectStyles ?? {}),\n menuPortal: (provided, state) => {\n const baseWithZIndex = {\n ...provided,\n zIndex: 1300,\n }\n const base = userMenuPortal ? userMenuPortal(baseWithZIndex, state) : baseWithZIndex\n\n if (typeof document === \"undefined\" || !menuPortalTarget || menuPortalTarget === document.body) {\n return base\n }\n\n const portalRect = menuPortalTarget.getBoundingClientRect()\n return {\n ...base,\n left: typeof base.left === \"number\" ? base.left - portalRect.left : base.left,\n top: typeof base.top === \"number\" ? base.top - portalRect.top : base.top,\n }\n },\n }\n },\n [menuPortalTarget, userSelectStyles]\n )\n\n React.useLayoutEffect(() => {\n if (hasUserMenuPortalTarget || typeof document === \"undefined\") {\n return\n }\n\n const portalTarget =\n inputRef.current?.closest<HTMLElement>(\n \"[data-slot='dialog-content'], [data-slot='sheet-content'], [role='dialog']\"\n ) ?? document.body\n setDefaultMenuPortalTarget(portalTarget)\n }, [hasUserMenuPortalTarget])\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 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 parsed = parsePhoneInput(value, explicitFormattingCountry)\n keyboardBufferRef.current = \"\"\n\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n }, [controlledCountry, explicitFormattingCountry, uncontrolledCountry, value])\n\n React.useEffect(() => {\n const country = activeCountry ?? null\n if (!hasNotifiedCountryRef.current && country == null) {\n return\n }\n\n if (hasNotifiedCountryRef.current && lastNotifiedCountryRef.current === country) {\n return\n }\n\n hasNotifiedCountryRef.current = true\n lastNotifiedCountryRef.current = country\n onCountryChange?.(country, country ? resolveSelectedCountry(country) : null)\n }, [activeCountry, onCountryChange, resolveSelectedCountry])\n\n const emitChange = React.useCallback(\n (details: Omit<PhoneNumberChangeDetails, \"selectedCountry\">) => {\n onChange?.({\n ...details,\n selectedCountry: details.country ? resolveSelectedCountry(details.country) : null,\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 applyParsedInput = React.useCallback(\n (parsed: ParsedInput, snapshot: ReturnType<typeof captureSelectionSnapshot> | null) => {\n setInputValueState(parsed.displayValue)\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry && parsed.country !== uncontrolledCountry) {\n setUncontrolledCountry(parsed.country)\n }\n\n if (snapshot) {\n pendingSelectionRef.current = resolveSelection(snapshot, parsed.displayValue)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n },\n [controlledCountry, emitChange, uncontrolledCountry]\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 normalizedExplicitInternational = normalizeExplicitInternationalInput(raw)\n const manualCountry = manualSelectionCountryRef.current\n if (normalizedExplicitInternational != null && manualCountry) {\n const manualDialCode = getCountryCallingCode(manualCountry)\n if (!sanitizeDigits(normalizedExplicitInternational).startsWith(manualDialCode)) {\n manualSelectionCountryRef.current = null\n }\n } else if (normalizedExplicitInternational != null) {\n manualSelectionCountryRef.current = null\n }\n\n const activeManualCountry = manualSelectionCountryRef.current\n const rawDigits = sanitizeDigits(raw)\n if (\n !controlledCountry &&\n activeManualCountry &&\n normalizedExplicitInternational == null &&\n rawDigits\n ) {\n const manualOption = {\n value: activeManualCountry,\n dialCode: getCountryCallingCode(activeManualCountry),\n }\n const parsed = preferSelectedCountry(\n parsePhoneInput(\n getInputValueForSelectedCountry(\n raw,\n {\n value: manualOption.value,\n dialCode: manualOption.dialCode,\n },\n { allowImplicitInternational: false }\n ),\n activeManualCountry\n ),\n manualOption\n )\n applyParsedInput(parsed, snapshot)\n return\n }\n\n const baseCountry = controlledCountry ?? activeManualCountry ?? undefined\n const parsed = parsePhoneInput(raw, baseCountry)\n applyParsedInput(parsed, snapshot)\n },\n [applyParsedInput, controlledCountry]\n )\n\n const handleCountrySelect = React.useCallback(\n (option: SingleValue<CountryOption>) => {\n if (!option) {\n return\n }\n\n manualSelectionCountryRef.current = option.value\n const nextInputValue = getInputValueForSelectedCountry(inputValueState, option)\n const parsed = preferSelectedCountry(\n parsePhoneInput(nextInputValue, option.value),\n option\n )\n\n setInputValueState(parsed.displayValue)\n pendingSelectionRef.current = {\n start: parsed.displayValue.length,\n end: parsed.displayValue.length,\n }\n setShowSuggestions(false)\n setCountryQuery(\"\")\n setHighlightedIndex(-1)\n setLengthIssue(parsed.lengthIssue)\n\n if (!controlledCountry) {\n setUncontrolledCountry(option.value)\n }\n\n emitChange({\n formattedInternational: parsed.formattedInternational,\n formattedNational: parsed.formattedNational,\n e164: parsed.e164,\n country: parsed.country,\n countryCallingCode: parsed.countryCallingCode,\n nationalNumber: parsed.nationalNumber,\n rawInput: parsed.rawInput,\n isValid: parsed.isValid,\n })\n\n requestAnimationFrame(() => {\n inputRef.current?.focus()\n })\n },\n [controlledCountry, emitChange, inputValueState]\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 | undefined) => {\n if (option && !results.some((existing) => existing.value === option.value)) {\n results.push(option)\n }\n }\n\n const priorityOption = countryOptions.find((option) => option.value === menuPriorityCountry)\n const currentOption = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const query = countryQuery.trim()\n const digitQuery = sanitizeDigits(query)\n const normalizedQuery = normalizeSearchValue(query)\n\n if (!digitQuery && !normalizedQuery) {\n pushUnique(currentOption)\n pushUnique(priorityOption)\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 pushUnique(currentOption)\n pushUnique(priorityOption)\n if (results.length === 0) {\n countryOptions.forEach(pushUnique)\n }\n\n return results\n }, [activeCountry, countryOptions, countryQuery, menuPriorityCountry, 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\n React.useEffect(() => {\n if (highlightedIndex < 0) {\n scrollBehaviorRef.current = \"smooth\"\n }\n }, [highlightedIndex])\n\n const consumeScrollBehavior = React.useCallback(() => {\n const behavior = scrollBehaviorRef.current\n scrollBehaviorRef.current = \"smooth\"\n return behavior\n }, [])\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 = activeCountry\n ? countryOptions.find((option) => option.value === activeCountry)\n : undefined\n const activeFlag = activeOption?.flag ?? \"\"\n const inlineFlagLabel = activeCountry\n ? resolvedMessages.selectedCountryLabel(activeOption?.name ?? activeCountry)\n : resolvedMessages.selectCountryLabel\n const hasInlineFlag = Boolean(activeCountry && 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 targetOption = highlightedOption ?? filteredOptions[0]\n handleCountrySelect(targetOption)\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 menuPortalTarget={menuPortalTarget}\n menuPosition={userMenuPosition ?? (menuPortalTarget ? \"fixed\" : \"absolute\")}\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":["INVISIBLE_FORMATTING_CHARACTERS","stripInvisibleFormatting","value","replace","stripIddPrefix","digits","prefix","COMMON_IDD_PREFIXES","startsWith","slice","length","normalizeImplicitInternationalInput","candidate","phoneNumber","detectedCountry","formatWithAsYouType","isValid","normalizeExplicitInternationalInput","cleaned","trim","sanitizeDigits","digitsWithoutIdd","normalizeInternationalInput","explicitInternational","getDialCode","country","parsedDialCode","getCountryCallingCode","getInputValueForSelectedCountry","option","options","dialCode","normalizedInternational","allowImplicitInternational","normalizedDigits","currentDialCode","countryCallingCode","nationalDigits","nationalNumber","preferSelectedCountry","parsed","lengthIssue","getLengthIssue","rawInput","parsePhoneInput","rawValue","baseCountry","displayValue","formattedInternational","formattedNational","e164","normalized","international","national","formatted","hasInternationalPrefix","stripPrefix","formatInternational","formatNational","number","PhoneNumberInput","React","forwardRef","props","forwardedRef","defaultCountry","countryProp","locale","onChange","onCountryChange","className","inputClassName","disabled","readOnly","selectProps","autofillShimName","messages","messagesProp","renderValidationMessage","restProps","onFocus","onInputFocus","onBlur","onInputBlur","onKeyDown","onInputKeyDown","name","inputName","autoComplete","inputAutoComplete","restInputProps","controlledCountry","localeCacheKey","getLocaleCacheKey","localeForBuild","useMemo","parseLocaleCacheKey","resolvedMessages","resolveMessages","countryOptions","getCachedCountryOptions","resolveSelectedCountry","useCallback","match","find","toSelectedCountry","buildFallbackSelectedCountry","menuPriorityCountry","getValidCountry","DEFAULT_COUNTRY","some","initialStateRef","useRef","current","initialState","undefined","uncontrolledCountry","setUncontrolledCountry","useState","inputValueState","setInputValueState","countryQuery","setCountryQuery","showSuggestions","setShowSuggestions","highlightedIndex","setHighlightedIndex","isFocused","setIsFocused","setLengthIssue","manualSelectionCountryRef","keyboardBufferRef","bufferTimeoutRef","scrollBehaviorRef","pendingSelectionRef","hasNotifiedCountryRef","lastNotifiedCountryRef","inputRef","activeCountry","explicitFormattingCountry","useImperativeHandle","useLayoutEffect","selection","input","start","end","setSelectionRange","selectOverrides","styles","userSelectStyles","components","userSelectComponents","classNamePrefix","userClassNamePrefix","formatOptionLabel","userFormatOptionLabel","menuPortalTarget","userMenuPortalTarget","menuPosition","userMenuPosition","forwardedSelectProps","noOptionsMessage","restForwardedSelectProps","defaultMenuPortalTarget","setDefaultMenuPortalTarget","hasUserMenuPortalTarget","mergedSelectStyles","userMenuPortal","menuPortal","suggestionSelectStyles","provided","state","baseWithZIndex","zIndex","base","document","body","portalRect","getBoundingClientRect","left","top","portalTarget","closest","mergedSelectComponents","baseComponents","Control","HiddenControl","IndicatorsContainer","NullComponent","DropdownIndicator","IndicatorSeparator","ValueContainer","overrides","Option","SuggestionOption","useEffect","window","clearTimeout","emitChange","details","selectedCountry","scheduleBufferReset","setTimeout","applyParsedInput","snapshot","resolveSelection","handleInputChange","event","target","captureSelectionSnapshot","raw","normalizedExplicitInternational","manualCountry","manualDialCode","activeManualCountry","rawDigits","manualOption","handleCountrySelect","nextInputValue","requestAnimationFrame","focus","filteredOptions","results","pushUnique","existing","push","priorityOption","currentOption","query","digitQuery","normalizedQuery","normalizeSearchValue","forEach","filter","sort","a","b","aExact","bExact","normalizedSearchableTokens","token","includes","aIndex","optionMatchIndex","bIndex","localeCompare","suggestionMenuIsOpen","highlightedOption","consumeScrollBehavior","behavior","updateHighlightedOption","index","findIndex","selectFormatOptionLabel","meta","formatCountryOption","optionLabelRenderer","context","inputValue","selectValue","highlightContextValue","highlightedValue","setHighlightedOption","renderOptionLabel","activeOption","activeFlag","flag","inlineFlagLabel","selectedCountryLabel","selectCountryLabel","hasInlineFlag","Boolean","lengthHint","lengthTooLong","countryName","validationNode","rendered","message","code","jsx","appendToBuffer","char","popBuffer","handleKeyDown","defaultPrevented","key","metaKey","ctrlKey","altKey","currentTarget","selectionStart","selectionEnd","isCollapsedSelection","nextStart","skipFormattingCharactersLeft","preventDefault","skipFormattingCharactersRight","repeat","test","toLowerCase","targetOption","handleFocus","handleBlur","openCountryMenu","shimName","cn","jsxs","pointerEvents","width","SuggestionContext","Select","noMatches","displayName"],"mappings":";;;;;;;;;;AA+DA,MAAMA,KACJ;AAOF,SAASC,GAAyBC,GAAe;AAC/C,SAAOA,EAAMC,QAAQH,IAAiC,EAAE;AAC1D;AAEA,SAASI,GAAeC,GAAgB;AACtC,aAAWC,KAAUC;AACnB,QAAIF,EAAOG,WAAWF,CAAM;AAC1B,aAAOD,EAAOI,MAAMH,EAAOI,MAAM;AAGrC,SAAOL;AACT;AAEA,SAASM,GAAoCN,GAAgB;AAC3D,QAAMO,IAAY,IAAIP,CAAM,IACtB;AAAA,IAAEQ,aAAAA;AAAAA,IAAaC,iBAAAA;AAAAA,EAAAA,IAAoBC,GAAoBH,CAAS;AAEtE,SAAIC,GAAaG,QAAAA,KAAaF,IACrBF,IAGF;AACT;AAEA,SAASK,GAAoCf,GAAe;AAC1D,QAAMgB,IAAUjB,GAAyBC,CAAK,EAAEiB,KAAAA;AAChD,MAAI,CAACD;AACH,WAAO;AAGT,MAAIA,EAAQV,WAAW,GAAG,GAAG;AAC3B,UAAMH,IAASe,EAAeF,CAAO;AACrC,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UAAAvO,GAEA,UAAA+M,gBAAAA,EAAAA,IAAC,UAAK,eAAY,QACfT,UAAAA,KAAgBL,KAAa,KAChC,EAAA,CACF;AAAA,IAAA,GACF;AAAA,IAECuC,KACCzB,gBAAAA,EAAAA,IAAC,SAAA,EACC,UAAU,IACV,cAAa,OACb,MAAMyB,IACN,eAAY,QACZ,WAAU,+DAA6D,IAEvE;AAAA,IAEJzB,gBAAAA,EAAAA,IAAC,OAAA,EACC,WAAU,sCACV,OAAO;AAAA,MACL4B,eAAe7D,IAAuB,SAAS;AAAA,MAC/C8D,OAAO;AAAA,IAAA,GAET,aAAcrG,CAAAA,MAAUA,EAAMwF,eAAAA,GAE9B,UAAAhB,gBAAAA,MAAC8B,GAAkB,UAAlB,EAA2B,OAAOjD,IACjC,UAAAmB,gBAAAA,EAAAA,IAAC+B,MACC,GAAIpJ,IACJ,YAAYoF,GACZ,SAASzB,GACT,OAAO,MACP,YAAYtC,IACZ,QAAQjB,IACR,aAAa,IACb,cAAc,IACd,uBAAuB,IACvB,iBAAiB,IACjB,0BAA0B,IAC1B,kBAAAV,GACA,cAAcG,OAAqBH,IAAmB,UAAU,aAChE,UAAU6D,IACV,iBAAiBhE,MAAuB,4BACxC,aAAY,IACZ,mBAAmBoG,IACnB,kBACE5F,OAAqB,MAAMhE,EAAiBsN,WAAAA,CAC7C,EAAA,CAEL,EAAA,CACF;AAAA,IAECpC;AAAAA,EAAAA,GACH;AAEJ,CACF;AAEAvN,GAAiB4P,cAAc;"}
package/dist/index180.js CHANGED
@@ -1,109 +1,8 @@
1
- import b from "./index99.js";
2
- function f(r) {
3
- "@babel/helpers - typeof";
4
- return f = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
5
- return typeof t;
6
- } : function(t) {
7
- return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
8
- }, f(r);
9
- }
10
- function y(r, t) {
11
- var e = Object.keys(r);
12
- if (Object.getOwnPropertySymbols) {
13
- var n = Object.getOwnPropertySymbols(r);
14
- t && (n = n.filter(function(o) {
15
- return Object.getOwnPropertyDescriptor(r, o).enumerable;
16
- })), e.push.apply(e, n);
17
- }
18
- return e;
19
- }
20
- function m(r) {
21
- for (var t = 1; t < arguments.length; t++) {
22
- var e = arguments[t] != null ? arguments[t] : {};
23
- t % 2 ? y(Object(e), !0).forEach(function(n) {
24
- g(r, n, e[n]);
25
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(e)) : y(Object(e)).forEach(function(n) {
26
- Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(e, n));
27
- });
28
- }
29
- return r;
30
- }
31
- function g(r, t, e) {
32
- return (t = v(t)) in r ? Object.defineProperty(r, t, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : r[t] = e, r;
33
- }
34
- function v(r) {
35
- var t = d(r, "string");
36
- return f(t) == "symbol" ? t : t + "";
37
- }
38
- function d(r, t) {
39
- if (f(r) != "object" || !r) return r;
40
- var e = r[Symbol.toPrimitive];
41
- if (e !== void 0) {
42
- var n = e.call(r, t);
43
- if (f(n) != "object") return n;
44
- throw new TypeError("@@toPrimitive must return a primitive value.");
45
- }
46
- return (t === "string" ? String : Number)(r);
47
- }
48
- function O(r, t) {
49
- return _(r) || w(r, t) || h(r, t) || j();
50
- }
51
- function j() {
52
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
53
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
54
- }
55
- function h(r, t) {
56
- if (r) {
57
- if (typeof r == "string") return s(r, t);
58
- var e = {}.toString.call(r).slice(8, -1);
59
- return e === "Object" && r.constructor && (e = r.constructor.name), e === "Map" || e === "Set" ? Array.from(r) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? s(r, t) : void 0;
60
- }
61
- }
62
- function s(r, t) {
63
- (t == null || t > r.length) && (t = r.length);
64
- for (var e = 0, n = Array(t); e < t; e++) n[e] = r[e];
65
- return n;
66
- }
67
- function w(r, t) {
68
- var e = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
69
- if (e != null) {
70
- var n, o, u, l, c = [], i = !0, a = !1;
71
- try {
72
- if (u = (e = e.call(r)).next, t !== 0) for (; !(i = (n = u.call(e)).done) && (c.push(n.value), c.length !== t); i = !0) ;
73
- } catch (p) {
74
- a = !0, o = p;
75
- } finally {
76
- try {
77
- if (!i && e.return != null && (l = e.return(), Object(l) !== l)) return;
78
- } finally {
79
- if (a) throw o;
80
- }
81
- }
82
- return c;
83
- }
84
- }
85
- function _(r) {
86
- if (Array.isArray(r)) return r;
87
- }
88
- function S(r) {
89
- var t = Array.prototype.slice.call(r), e = O(t, 4), n = e[0], o = e[1], u = e[2], l = e[3], c, i, a;
90
- if (typeof n == "string")
91
- c = n;
92
- else throw new TypeError("A text for parsing must be a string.");
93
- if (!o || typeof o == "string")
94
- l ? (i = u, a = l) : (i = void 0, a = u), o && (i = m({
95
- defaultCountry: o
96
- }, i));
97
- else if (b(o))
98
- u ? (i = o, a = u) : a = o;
99
- else throw new Error("Invalid second argument: ".concat(o));
100
- return {
101
- text: c,
102
- options: i,
103
- metadata: a
104
- };
105
- }
1
+ import { CommonPopupDataAttributes as e } from "./index173.js";
2
+ let y = (function(n) {
3
+ return n[n.open = e.open] = "open", n[n.closed = e.closed] = "closed", n[n.startingStyle = e.startingStyle] = "startingStyle", n[n.endingStyle = e.endingStyle] = "endingStyle", n.nested = "data-nested", n.nestedDialogOpen = "data-nested-dialog-open", n;
4
+ })({});
106
5
  export {
107
- S as default
6
+ y as DialogPopupDataAttributes
108
7
  };
109
8
  //# sourceMappingURL=index180.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index180.js","sources":["../../../node_modules/libphonenumber-js/es6/normalizeArguments.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\nimport isObject from './helpers/isObject.js';\n\n// Extracts the following properties from function arguments:\n// * input `text`\n// * `options` object\n// * `metadata` JSON\nexport default function normalizeArguments(args) {\n var _Array$prototype$slic = Array.prototype.slice.call(args),\n _Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4),\n arg_1 = _Array$prototype$slic2[0],\n arg_2 = _Array$prototype$slic2[1],\n arg_3 = _Array$prototype$slic2[2],\n arg_4 = _Array$prototype$slic2[3];\n var text;\n var options;\n var metadata;\n\n // If the phone number is passed as a string.\n // `parsePhoneNumber('88005553535', ...)`.\n if (typeof arg_1 === 'string') {\n text = arg_1;\n } else throw new TypeError('A text for parsing must be a string.');\n\n // If \"default country\" argument is being passed then move it to `options`.\n // `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.\n if (!arg_2 || typeof arg_2 === 'string') {\n if (arg_4) {\n options = arg_3;\n metadata = arg_4;\n } else {\n options = undefined;\n metadata = arg_3;\n }\n if (arg_2) {\n options = _objectSpread({\n defaultCountry: arg_2\n }, options);\n }\n }\n // `defaultCountry` is not passed.\n // Example: `parsePhoneNumber('+78005553535', [options], metadata)`.\n else if (isObject(arg_2)) {\n if (arg_3) {\n options = arg_2;\n metadata = arg_3;\n } else {\n metadata = arg_2;\n }\n } else throw new Error(\"Invalid second argument: \".concat(arg_2));\n return {\n text: text,\n options: options,\n metadata: metadata\n };\n}\n//# sourceMappingURL=normalizeArguments.js.map"],"names":["_typeof","o","ownKeys","e","r","t","_objectSpread","_defineProperty","_toPropertyKey","i","_toPrimitive","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","a","_arrayLikeToArray","l","n","u","f","normalizeArguments","args","_Array$prototype$slic","_Array$prototype$slic2","arg_1","arg_2","arg_3","arg_4","text","options","metadata","isObject"],"mappings":";AAAA,SAASA,EAAQC,GAAG;AAAE;AAA2B,SAAOD,IAAwB,OAAO,UAArB,cAA2C,OAAO,OAAO,YAA1B,WAAqC,SAAUC,GAAG;AAAE,WAAO,OAAOA;AAAA,EAAG,IAAI,SAAUA,GAAG;AAAE,WAAOA,KAAmB,OAAO,UAArB,cAA+BA,EAAE,gBAAgB,UAAUA,MAAM,OAAO,YAAY,WAAW,OAAOA;AAAA,EAAG,GAAGD,EAAQC,CAAC;AAAG;AAC7T,SAASC,EAAQC,GAAGC,GAAG;AAAE,MAAIC,IAAI,OAAO,KAAKF,CAAC;AAAG,MAAI,OAAO,uBAAuB;AAAE,QAAIF,IAAI,OAAO,sBAAsBE,CAAC;AAAG,IAAAC,MAAMH,IAAIA,EAAE,OAAO,SAAUG,GAAG;AAAE,aAAO,OAAO,yBAAyBD,GAAGC,CAAC,EAAE;AAAA,IAAY,CAAC,IAAIC,EAAE,KAAK,MAAMA,GAAGJ,CAAC;AAAA,EAAG;AAAE,SAAOI;AAAG;AAC9P,SAASC,EAAcH,GAAG;AAAE,WAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAAE,QAAIC,IAAY,UAAUD,CAAC,KAAnB,OAAuB,UAAUA,CAAC,IAAI,CAAA;AAAI,IAAAA,IAAI,IAAIF,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,IAAIf,EAAE,OAAS,GAAI,OAAOe,CAAC,MAAMA,GAAI;AAAA,MAAQ,UAAC;AAAW,YAAInB,EAAG,OAAMkB;AAAA,MAAG;AAAA,IAAE;AAAE,WAAOH;AAAA,EAAG;AAAE;AACzhB,SAASJ,EAAgB,GAAG;AAAE,MAAI,MAAM,QAAQ,CAAC,EAAG,QAAO;AAAG;AAO/C,SAASU,EAAmBC,GAAM;AAC/C,MAAIC,IAAwB,MAAM,UAAU,MAAM,KAAKD,CAAI,GACzDE,IAAyBd,EAAea,GAAuB,CAAC,GAChEE,IAAQD,EAAuB,CAAC,GAChCE,IAAQF,EAAuB,CAAC,GAChCG,IAAQH,EAAuB,CAAC,GAChCI,IAAQJ,EAAuB,CAAC,GAC9BK,GACAC,GACAC;AAIJ,MAAI,OAAON,KAAU;AACnB,IAAAI,IAAOJ;AAAA,MACF,OAAM,IAAI,UAAU,sCAAsC;AAIjE,MAAI,CAACC,KAAS,OAAOA,KAAU;AAC7B,IAAIE,KACFE,IAAUH,GACVI,IAAWH,MAEXE,IAAU,QACVC,IAAWJ,IAETD,MACFI,IAAUzB,EAAc;AAAA,MACtB,gBAAgBqB;AAAA,IACxB,GAASI,CAAO;AAAA,WAKLE,EAASN,CAAK;AACrB,IAAIC,KACFG,IAAUJ,GACVK,IAAWJ,KAEXI,IAAWL;AAAA,MAER,OAAM,IAAI,MAAM,4BAA4B,OAAOA,CAAK,CAAC;AAChE,SAAO;AAAA,IACL,MAAMG;AAAA,IACN,SAASC;AAAA,IACT,UAAUC;AAAA,EACd;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index180.js","sources":["../../../node_modules/@base-ui/react/esm/dialog/popup/DialogPopupDataAttributes.js"],"sourcesContent":["import { CommonPopupDataAttributes } from \"../../utils/popupStateMapping.js\";\nexport let DialogPopupDataAttributes = function (DialogPopupDataAttributes) {\n /**\n * Present when the dialog is open.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"open\"] = CommonPopupDataAttributes.open] = \"open\";\n /**\n * Present when the dialog is closed.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"closed\"] = CommonPopupDataAttributes.closed] = \"closed\";\n /**\n * Present when the dialog is animating in.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"startingStyle\"] = CommonPopupDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the dialog is animating out.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"endingStyle\"] = CommonPopupDataAttributes.endingStyle] = \"endingStyle\";\n /**\n * Present when the dialog is nested within another dialog.\n */\n DialogPopupDataAttributes[\"nested\"] = \"data-nested\";\n /**\n * Present when the dialog has other open dialogs nested within it.\n */\n DialogPopupDataAttributes[\"nestedDialogOpen\"] = \"data-nested-dialog-open\";\n return DialogPopupDataAttributes;\n}({});"],"names":["DialogPopupDataAttributes","CommonPopupDataAttributes"],"mappings":";AACU,IAACA,KAA4B,SAAUA,GAA2B;AAI1E,SAAAA,EAA0BA,EAA0B,OAAUC,EAA0B,IAAI,IAAI,QAIhGD,EAA0BA,EAA0B,SAAYC,EAA0B,MAAM,IAAI,UAIpGD,EAA0BA,EAA0B,gBAAmBC,EAA0B,aAAa,IAAI,iBAIlHD,EAA0BA,EAA0B,cAAiBC,EAA0B,WAAW,IAAI,eAI9GD,EAA0B,SAAY,eAItCA,EAA0B,mBAAsB,2BACzCA;AACT,GAAE,CAAA,CAAE;","x_google_ignoreList":[0]}
package/dist/index181.js CHANGED
@@ -1,56 +1,15 @@
1
- import f from "./index185.js";
2
- function o(r) {
3
- "@babel/helpers - typeof";
4
- return o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
5
- return typeof e;
6
- } : function(e) {
7
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
8
- }, o(r);
9
- }
10
- function i(r, e) {
11
- var t = Object.keys(r);
12
- if (Object.getOwnPropertySymbols) {
13
- var n = Object.getOwnPropertySymbols(r);
14
- e && (n = n.filter(function(c) {
15
- return Object.getOwnPropertyDescriptor(r, c).enumerable;
16
- })), t.push.apply(t, n);
17
- }
18
- return t;
19
- }
20
- function u(r) {
21
- for (var e = 1; e < arguments.length; e++) {
22
- var t = arguments[e] != null ? arguments[e] : {};
23
- e % 2 ? i(Object(t), !0).forEach(function(n) {
24
- p(r, n, t[n]);
25
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : i(Object(t)).forEach(function(n) {
26
- Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n));
27
- });
28
- }
29
- return r;
30
- }
31
- function p(r, e, t) {
32
- return (e = b(e)) in r ? Object.defineProperty(r, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = t, r;
33
- }
34
- function b(r) {
35
- var e = y(r, "string");
36
- return o(e) == "symbol" ? e : e + "";
37
- }
38
- function y(r, e) {
39
- if (o(r) != "object" || !r) return r;
40
- var t = r[Symbol.toPrimitive];
41
- if (t !== void 0) {
42
- var n = t.call(r, e);
43
- if (o(n) != "object") return n;
44
- throw new TypeError("@@toPrimitive must return a primitive value.");
45
- }
46
- return (e === "string" ? String : Number)(r);
47
- }
48
- function l(r, e, t) {
49
- return f(r, u(u({}, e), {}, {
50
- v2: !0
51
- }), t);
1
+ import r from "./index191.js";
2
+ import * as t from "react";
3
+ const e = /* @__PURE__ */ t.createContext(void 0);
4
+ process.env.NODE_ENV !== "production" && (e.displayName = "DialogPortalContext");
5
+ function a() {
6
+ const o = t.useContext(e);
7
+ if (o === void 0)
8
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <Dialog.Portal> is missing." : r(26));
9
+ return o;
52
10
  }
53
11
  export {
54
- l as default
12
+ e as DialogPortalContext,
13
+ a as useDialogPortalContext
55
14
  };
56
15
  //# sourceMappingURL=index181.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index181.js","sources":["../../../node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport parse from './parse.js';\nexport default function parsePhoneNumberWithError(text, options, metadata) {\n return parse(text, _objectSpread(_objectSpread({}, options), {}, {\n v2: true\n }), metadata);\n}\n//# sourceMappingURL=parsePhoneNumberWithError_.js.map"],"names":["_typeof","o","ownKeys","e","r","_objectSpread","_defineProperty","_toPropertyKey","t","i","_toPrimitive","parsePhoneNumberWithError","text","options","metadata","parse"],"mappings":";AAAA,S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AAMD,IAAI,OAAO,eAAeA,GAAGC,GAAG,EAAE,OAAO,GAAG,YAAY,IAAI,cAAc,IAAI,UAAU,GAAE,CAAE,IAAID,EAAEC,CAAC,IAAI,GAAGD;AAAG;AACnL,SAASI,EAAeC,GAAG;AAAE,MAAIC,IAAIC,EAAaF,GAAG,QAAQ;AAAG,SAAmBR,EAAQS,CAAC,KAArB,WAAyBA,IAAIA,IAAI;AAAI;AAC5G,SAASC,EAAaF,GAAGJ,GAAG;AAAE,MAAgBJ,EAAQQ,CAAC,KAArB,YAA0B,CAACA,EAAG,QAAOA;AAAG,MAAIL,IAAIK,EAAE,OAAO,WAAW;AAAG,MAAeL,MAAX,QAAc;AAAE,QAAIM,IAAIN,EAAE,KAAKK,GAAGJ,CAAc;AAAG,QAAgBJ,EAAQS,CAAC,KAArB,SAAwB,QAAOA;AAAG,UAAM,IAAI,UAAU,8CAA8C;AAAA,EAAG;AAAE,UAAqBL,MAAb,WAAiB,SAAS,QAAQI,CAAC;AAAG;AAE5S,SAASG,EAA0BC,GAAMC,GAASC,GAAU;AACzE,SAAOC,EAAMH,GAAMP,EAAcA,EAAc,IAAIQ,CAAO,GAAG,IAAI;AAAA,IAC/D,IAAI;AAAA,EACR,CAAG,GAAGC,CAAQ;AACd;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index181.js","sources":["../../../node_modules/@base-ui/react/esm/dialog/portal/DialogPortalContext.js"],"sourcesContent":["'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const DialogPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DialogPortalContext.displayName = \"DialogPortalContext\";\nexport function useDialogPortalContext() {\n const value = React.useContext(DialogPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Dialog.Portal> is missing.' : _formatErrorMessage(26));\n }\n return value;\n}"],"names":["DialogPortalContext","React","useDialogPortalContext","value","_formatErrorMessage"],"mappings":";;AAIY,MAACA,IAAmC,gBAAAC,EAAM,cAAc,MAAS;AACzE,QAAQ,IAAI,aAAa,iBAAcD,EAAoB,cAAc;AACtE,SAASE,IAAyB;AACvC,QAAMC,IAAQF,EAAM,WAAWD,CAAmB;AAClD,MAAIG,MAAU;AACZ,UAAM,IAAI,MAAM,QAAQ,IAAI,aAAa,eAAe,yCAAyCC,EAAoB,EAAE,CAAC;AAE1H,SAAOD;AACT;","x_google_ignoreList":[0]}
package/dist/index182.js CHANGED
@@ -1,15 +1,23 @@
1
- function f(r, t) {
2
- r = r.split("-"), t = t.split("-");
3
- for (var N = r[0].split("."), s = t[0].split("."), e = 0; e < 3; e++) {
4
- var i = Number(N[e]), u = Number(s[e]);
5
- if (i > u) return 1;
6
- if (u > i) return -1;
7
- if (!isNaN(i) && isNaN(u)) return 1;
8
- if (isNaN(i) && !isNaN(u)) return -1;
9
- }
10
- return r[1] && t[1] ? r[1] > t[1] ? 1 : r[1] < t[1] ? -1 : 0 : !r[1] && t[1] ? 1 : r[1] && !t[1] ? -1 : 0;
1
+ import * as l from "react";
2
+ import { useStableCallback as m } from "./index262.js";
3
+ import { useAnimationsFinished as f } from "./index346.js";
4
+ function c(a) {
5
+ const {
6
+ enabled: e = !0,
7
+ open: n,
8
+ ref: i,
9
+ onComplete: s
10
+ } = a, o = m(s), t = f(i, n, !1);
11
+ l.useEffect(() => {
12
+ if (!e)
13
+ return;
14
+ const r = new AbortController();
15
+ return t(o, r.signal), () => {
16
+ r.abort();
17
+ };
18
+ }, [e, n, o, t]);
11
19
  }
12
20
  export {
13
- f as default
21
+ c as useOpenChangeComplete
14
22
  };
15
23
  //# sourceMappingURL=index182.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index182.js","sources":["../../../node_modules/libphonenumber-js/es6/tools/semver-compare.js"],"sourcesContent":["// Copy-pasted from:\n// https://github.com/substack/semver-compare/blob/master/index.js\n//\n// Inlining this function because some users reported issues with\n// importing from `semver-compare` in a browser with ES6 \"native\" modules.\n//\n// Fixes `semver-compare` not being able to compare versions with alpha/beta/etc \"tags\".\n// https://github.com/catamphetamine/libphonenumber-js/issues/381\nexport default function (a, b) {\n a = a.split('-');\n b = b.split('-');\n var pa = a[0].split('.');\n var pb = b[0].split('.');\n for (var i = 0; i < 3; i++) {\n var na = Number(pa[i]);\n var nb = Number(pb[i]);\n if (na > nb) return 1;\n if (nb > na) return -1;\n if (!isNaN(na) && isNaN(nb)) return 1;\n if (isNaN(na) && !isNaN(nb)) return -1;\n }\n if (a[1] && b[1]) {\n return a[1] > b[1] ? 1 : a[1] < b[1] ? -1 : 0;\n }\n return !a[1] && b[1] ? 1 : a[1] && !b[1] ? -1 : 0;\n}\n//# sourceMappingURL=semver-compare.js.map"],"names":["compare","a","b","pa","pb","i","na","nb"],"mappings":"AAQe,SAAAA,EAAUC,GAAGC,GAAG;AAC7B,EAAAD,IAAIA,EAAE,MAAM,GAAG,GACfC,IAAIA,EAAE,MAAM,GAAG;AAGf,WAFIC,IAAKF,EAAE,CAAC,EAAE,MAAM,GAAG,GACnBG,IAAKF,EAAE,CAAC,EAAE,MAAM,GAAG,GACdG,IAAI,GAAGA,IAAI,GAAGA,KAAK;AAC1B,QAAIC,IAAK,OAAOH,EAAGE,CAAC,CAAC,GACjBE,IAAK,OAAOH,EAAGC,CAAC,CAAC;AACrB,QAAIC,IAAKC,EAAI,QAAO;AACpB,QAAIA,IAAKD,EAAI,QAAO;AACpB,QAAI,CAAC,MAAMA,CAAE,KAAK,MAAMC,CAAE,EAAG,QAAO;AACpC,QAAI,MAAMD,CAAE,KAAK,CAAC,MAAMC,CAAE,EAAG,QAAO;AAAA,EACtC;AACA,SAAIN,EAAE,CAAC,KAAKC,EAAE,CAAC,IACND,EAAE,CAAC,IAAIC,EAAE,CAAC,IAAI,IAAID,EAAE,CAAC,IAAIC,EAAE,CAAC,IAAI,KAAK,IAEvC,CAACD,EAAE,CAAC,KAAKC,EAAE,CAAC,IAAI,IAAID,EAAE,CAAC,KAAK,CAACC,EAAE,CAAC,IAAI,KAAK;AAClD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index182.js","sources":["../../../node_modules/@base-ui/react/esm/internals/useOpenChangeComplete.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useAnimationsFinished } from \"./useAnimationsFinished.js\";\n\n/**\n * Calls the provided function when the CSS open/close animation or transition completes.\n */\nexport function useOpenChangeComplete(parameters) {\n const {\n enabled = true,\n open,\n ref,\n onComplete: onCompleteParam\n } = parameters;\n const onComplete = useStableCallback(onCompleteParam);\n const runOnceAnimationsFinish = useAnimationsFinished(ref, open, false);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n const abortController = new AbortController();\n runOnceAnimationsFinish(onComplete, abortController.signal);\n return () => {\n abortController.abort();\n };\n }, [enabled, open, onComplete, runOnceAnimationsFinish]);\n}"],"names":["useOpenChangeComplete","parameters","enabled","open","ref","onCompleteParam","onComplete","useStableCallback","runOnceAnimationsFinish","useAnimationsFinished","React","abortController"],"mappings":";;;AASO,SAASA,EAAsBC,GAAY;AAChD,QAAM;AAAA,IACJ,SAAAC,IAAU;AAAA,IACV,MAAAC;AAAA,IACA,KAAAC;AAAA,IACA,YAAYC;AAAA,EAChB,IAAMJ,GACEK,IAAaC,EAAkBF,CAAe,GAC9CG,IAA0BC,EAAsBL,GAAKD,GAAM,EAAK;AACtE,EAAAO,EAAM,UAAU,MAAM;AACpB,QAAI,CAACR;AACH;AAEF,UAAMS,IAAkB,IAAI,gBAAe;AAC3C,WAAAH,EAAwBF,GAAYK,EAAgB,MAAM,GACnD,MAAM;AACX,MAAAA,EAAgB,MAAK;AAAA,IACvB;AAAA,EACF,GAAG,CAACT,GAASC,GAAMG,GAAYE,CAAuB,CAAC;AACzD;","x_google_ignoreList":[0]}