@rpcbase/ui 0.182.0 → 0.184.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (652) hide show
  1. package/dist/helpers/index.d.ts +1 -0
  2. package/dist/helpers/index.d.ts.map +1 -1
  3. package/dist/helpers/useScrollPagination.d.ts +23 -0
  4. package/dist/helpers/useScrollPagination.d.ts.map +1 -0
  5. package/dist/helpers/useScrollPagination.test.d.ts +2 -0
  6. package/dist/helpers/useScrollPagination.test.d.ts.map +1 -0
  7. package/dist/index.js +62 -60
  8. package/dist/index.js.map +1 -1
  9. package/dist/index10.js +24 -69
  10. package/dist/index10.js.map +1 -1
  11. package/dist/index100.js +4 -3
  12. package/dist/index100.js.map +1 -1
  13. package/dist/index101.js +5 -4
  14. package/dist/index101.js.map +1 -1
  15. package/dist/index102.js +4 -6
  16. package/dist/index102.js.map +1 -1
  17. package/dist/index103.js +4 -145
  18. package/dist/index103.js.map +1 -1
  19. package/dist/index104.js +6 -39
  20. package/dist/index104.js.map +1 -1
  21. package/dist/index105.js +24 -4
  22. package/dist/index105.js.map +1 -1
  23. package/dist/index106.js +6 -7
  24. package/dist/index106.js.map +1 -1
  25. package/dist/index107.js +4 -13
  26. package/dist/index107.js.map +1 -1
  27. package/dist/index108.js +6 -13
  28. package/dist/index108.js.map +1 -1
  29. package/dist/index109.js +5 -7
  30. package/dist/index109.js.map +1 -1
  31. package/dist/index11.js +38 -552
  32. package/dist/index11.js.map +1 -1
  33. package/dist/index110.js +4 -31
  34. package/dist/index110.js.map +1 -1
  35. package/dist/index111.js +5 -10
  36. package/dist/index111.js.map +1 -1
  37. package/dist/index112.js +4 -10
  38. package/dist/index112.js.map +1 -1
  39. package/dist/index113.js +8 -8
  40. package/dist/index113.js.map +1 -1
  41. package/dist/index114.js +5 -13
  42. package/dist/index114.js.map +1 -1
  43. package/dist/index115.js +4 -101
  44. package/dist/index115.js.map +1 -1
  45. package/dist/index116.js +5 -20
  46. package/dist/index116.js.map +1 -1
  47. package/dist/index117.js +6 -53
  48. package/dist/index117.js.map +1 -1
  49. package/dist/index118.js +145 -72
  50. package/dist/index118.js.map +1 -1
  51. package/dist/index119.js +39 -9
  52. package/dist/index119.js.map +1 -1
  53. package/dist/index12.js +571 -115
  54. package/dist/index12.js.map +1 -1
  55. package/dist/index120.js +4 -20
  56. package/dist/index120.js.map +1 -1
  57. package/dist/index121.js +7 -16
  58. package/dist/index121.js.map +1 -1
  59. package/dist/index122.js +13 -23
  60. package/dist/index122.js.map +1 -1
  61. package/dist/index123.js +13 -6
  62. package/dist/index123.js.map +1 -1
  63. package/dist/index124.js +7 -5
  64. package/dist/index124.js.map +1 -1
  65. package/dist/index125.js +31 -23
  66. package/dist/index125.js.map +1 -1
  67. package/dist/index126.js +11 -35
  68. package/dist/index126.js.map +1 -1
  69. package/dist/index127.js +11 -16
  70. package/dist/index127.js.map +1 -1
  71. package/dist/index128.js +8 -6
  72. package/dist/index128.js.map +1 -1
  73. package/dist/index129.js +13 -4
  74. package/dist/index129.js.map +1 -1
  75. package/dist/index13.js +137 -76
  76. package/dist/index13.js.map +1 -1
  77. package/dist/index130.js +101 -4
  78. package/dist/index130.js.map +1 -1
  79. package/dist/index131.js +20 -5
  80. package/dist/index131.js.map +1 -1
  81. package/dist/index132.js +53 -4
  82. package/dist/index132.js.map +1 -1
  83. package/dist/index133.js +72 -3
  84. package/dist/index133.js.map +1 -1
  85. package/dist/index134.js +9 -6
  86. package/dist/index134.js.map +1 -1
  87. package/dist/index135.js +21 -24
  88. package/dist/index135.js.map +1 -1
  89. package/dist/index136.js +16 -7
  90. package/dist/index136.js.map +1 -1
  91. package/dist/index137.js +23 -6
  92. package/dist/index137.js.map +1 -1
  93. package/dist/index138.js +6 -5
  94. package/dist/index138.js.map +1 -1
  95. package/dist/index139.js +5 -3
  96. package/dist/index139.js.map +1 -1
  97. package/dist/index14.js +74 -730
  98. package/dist/index14.js.map +1 -1
  99. package/dist/index140.js +23 -3
  100. package/dist/index140.js.map +1 -1
  101. package/dist/index141.js +35 -5
  102. package/dist/index141.js.map +1 -1
  103. package/dist/index142.js +16 -4
  104. package/dist/index142.js.map +1 -1
  105. package/dist/index143.js +6 -4
  106. package/dist/index143.js.map +1 -1
  107. package/dist/index144.js +4 -3
  108. package/dist/index144.js.map +1 -1
  109. package/dist/index145.js +4 -3
  110. package/dist/index145.js.map +1 -1
  111. package/dist/index146.js +4 -3
  112. package/dist/index146.js.map +1 -1
  113. package/dist/index147.js +4 -46
  114. package/dist/index147.js.map +1 -1
  115. package/dist/index148.js +3 -46
  116. package/dist/index148.js.map +1 -1
  117. package/dist/index149.js +6 -205
  118. package/dist/index149.js.map +1 -1
  119. package/dist/index15.js +870 -22
  120. package/dist/index15.js.map +1 -1
  121. package/dist/index150.js +24 -22
  122. package/dist/index150.js.map +1 -1
  123. package/dist/index151.js +7 -24
  124. package/dist/index151.js.map +1 -1
  125. package/dist/index152.js +6 -399
  126. package/dist/index152.js.map +1 -1
  127. package/dist/index153.js +5 -5
  128. package/dist/index153.js.map +1 -1
  129. package/dist/index154.js +3 -68
  130. package/dist/index154.js.map +1 -1
  131. package/dist/index155.js +4 -2
  132. package/dist/index155.js.map +1 -1
  133. package/dist/index156.js +4 -363
  134. package/dist/index156.js.map +1 -1
  135. package/dist/index157.js +3 -261
  136. package/dist/index157.js.map +1 -1
  137. package/dist/index158.js +4 -60
  138. package/dist/index158.js.map +1 -1
  139. package/dist/index159.js +3 -46
  140. package/dist/index159.js.map +1 -1
  141. package/dist/index16.js +20 -17
  142. package/dist/index16.js.map +1 -1
  143. package/dist/index160.js +3 -169
  144. package/dist/index160.js.map +1 -1
  145. package/dist/index161.js +3 -109
  146. package/dist/index161.js.map +1 -1
  147. package/dist/index162.js +5 -24
  148. package/dist/index162.js.map +1 -1
  149. package/dist/index163.js +69 -8
  150. package/dist/index163.js.map +1 -1
  151. package/dist/index164.js +2 -5
  152. package/dist/index164.js.map +1 -1
  153. package/dist/index165.js +363 -5
  154. package/dist/index165.js.map +1 -1
  155. package/dist/index166.js +261 -4
  156. package/dist/index166.js.map +1 -1
  157. package/dist/index167.js +52 -458
  158. package/dist/index167.js.map +1 -1
  159. package/dist/index168.js +42 -181
  160. package/dist/index168.js.map +1 -1
  161. package/dist/index169.js +156 -94
  162. package/dist/index169.js.map +1 -1
  163. package/dist/index17.js +18 -387
  164. package/dist/index17.js.map +1 -1
  165. package/dist/index170.js +102 -255
  166. package/dist/index170.js.map +1 -1
  167. package/dist/index171.js +24 -9
  168. package/dist/index171.js.map +1 -1
  169. package/dist/index172.js +8 -43
  170. package/dist/index172.js.map +1 -1
  171. package/dist/index173.js +4 -4
  172. package/dist/index173.js.map +1 -1
  173. package/dist/index174.js +5 -605
  174. package/dist/index174.js.map +1 -1
  175. package/dist/index175.js +4 -58
  176. package/dist/index175.js.map +1 -1
  177. package/dist/index176.js +466 -8
  178. package/dist/index176.js.map +1 -1
  179. package/dist/index177.js +178 -59
  180. package/dist/index177.js.map +1 -1
  181. package/dist/index178.js +105 -17
  182. package/dist/index178.js.map +1 -1
  183. package/dist/index179.js +260 -14
  184. package/dist/index179.js.map +1 -1
  185. package/dist/index18.js +431 -693
  186. package/dist/index18.js.map +1 -1
  187. package/dist/index180.js +9 -5
  188. package/dist/index180.js.map +1 -1
  189. package/dist/index181.js +41 -4
  190. package/dist/index181.js.map +1 -1
  191. package/dist/index182.js +4 -6
  192. package/dist/index182.js.map +1 -1
  193. package/dist/index183.js +24 -4
  194. package/dist/index183.js.map +1 -1
  195. package/dist/index184.js +29 -8
  196. package/dist/index184.js.map +1 -1
  197. package/dist/index185.js +5 -18
  198. package/dist/index185.js.map +1 -1
  199. package/dist/index186.js +67 -5
  200. package/dist/index186.js.map +1 -1
  201. package/dist/index187.js +180 -5
  202. package/dist/index187.js.map +1 -1
  203. package/dist/index188.js +46 -13
  204. package/dist/index188.js.map +1 -1
  205. package/dist/index189.js +58 -10
  206. package/dist/index189.js.map +1 -1
  207. package/dist/index19.js +661 -634
  208. package/dist/index19.js.map +1 -1
  209. package/dist/index190.js +8 -14
  210. package/dist/index190.js.map +1 -1
  211. package/dist/index191.js +66 -14
  212. package/dist/index191.js.map +1 -1
  213. package/dist/index192.js +19 -5
  214. package/dist/index192.js.map +1 -1
  215. package/dist/index193.js +16 -6
  216. package/dist/index193.js.map +1 -1
  217. package/dist/index194.js +5 -7
  218. package/dist/index194.js.map +1 -1
  219. package/dist/index195.js +5 -6
  220. package/dist/index195.js.map +1 -1
  221. package/dist/index196.js +6 -9
  222. package/dist/index196.js.map +1 -1
  223. package/dist/index197.js +4 -5
  224. package/dist/index197.js.map +1 -1
  225. package/dist/index198.js +7 -5
  226. package/dist/index198.js.map +1 -1
  227. package/dist/index199.js +17 -9
  228. package/dist/index199.js.map +1 -1
  229. package/dist/index2.js +2 -2
  230. package/dist/index20.js +455 -198
  231. package/dist/index20.js.map +1 -1
  232. package/dist/index200.js +5 -5
  233. package/dist/index200.js.map +1 -1
  234. package/dist/index201.js +5 -5
  235. package/dist/index201.js.map +1 -1
  236. package/dist/index202.js +13 -4
  237. package/dist/index202.js.map +1 -1
  238. package/dist/index203.js +9 -10
  239. package/dist/index203.js.map +1 -1
  240. package/dist/index204.js +14 -10
  241. package/dist/index204.js.map +1 -1
  242. package/dist/index205.js +14 -10
  243. package/dist/index205.js.map +1 -1
  244. package/dist/index206.js +5 -11
  245. package/dist/index206.js.map +1 -1
  246. package/dist/index207.js +6 -11
  247. package/dist/index207.js.map +1 -1
  248. package/dist/index208.js +6 -9
  249. package/dist/index208.js.map +1 -1
  250. package/dist/index209.js +6 -7
  251. package/dist/index209.js.map +1 -1
  252. package/dist/index21.js +263 -5
  253. package/dist/index21.js.map +1 -1
  254. package/dist/index210.js +9 -6
  255. package/dist/index210.js.map +1 -1
  256. package/dist/index211.js +5 -5
  257. package/dist/index211.js.map +1 -1
  258. package/dist/index212.js +5 -6
  259. package/dist/index212.js.map +1 -1
  260. package/dist/index213.js +9 -7
  261. package/dist/index213.js.map +1 -1
  262. package/dist/index214.js +5 -6
  263. package/dist/index214.js.map +1 -1
  264. package/dist/index215.js +5 -55
  265. package/dist/index215.js.map +1 -1
  266. package/dist/index216.js +4 -16
  267. package/dist/index216.js.map +1 -1
  268. package/dist/index217.js +11 -7
  269. package/dist/index217.js.map +1 -1
  270. package/dist/index218.js +10 -10
  271. package/dist/index218.js.map +1 -1
  272. package/dist/index219.js +10 -10
  273. package/dist/index219.js.map +1 -1
  274. package/dist/index22.js +5 -35
  275. package/dist/index22.js.map +1 -1
  276. package/dist/index220.js +11 -21
  277. package/dist/index220.js.map +1 -1
  278. package/dist/index221.js +11 -10
  279. package/dist/index221.js.map +1 -1
  280. package/dist/index222.js +10 -9
  281. package/dist/index222.js.map +1 -1
  282. package/dist/index223.js +7 -9
  283. package/dist/index223.js.map +1 -1
  284. package/dist/index224.js +6 -4
  285. package/dist/index224.js.map +1 -1
  286. package/dist/index225.js +5 -5
  287. package/dist/index225.js.map +1 -1
  288. package/dist/index226.js +6 -16
  289. package/dist/index226.js.map +1 -1
  290. package/dist/index227.js +7 -9
  291. package/dist/index227.js.map +1 -1
  292. package/dist/index228.js +6 -18
  293. package/dist/index228.js.map +1 -1
  294. package/dist/index229.js +54 -14
  295. package/dist/index229.js.map +1 -1
  296. package/dist/index23.js +27 -268
  297. package/dist/index23.js.map +1 -1
  298. package/dist/index230.js +16 -12
  299. package/dist/index230.js.map +1 -1
  300. package/dist/index231.js +7 -29
  301. package/dist/index231.js.map +1 -1
  302. package/dist/index232.js +9 -11
  303. package/dist/index232.js.map +1 -1
  304. package/dist/index233.js +9 -24
  305. package/dist/index233.js.map +1 -1
  306. package/dist/index234.js +21 -5
  307. package/dist/index234.js.map +1 -1
  308. package/dist/index235.js +10 -24
  309. package/dist/index235.js.map +1 -1
  310. package/dist/index236.js +10 -29
  311. package/dist/index236.js.map +1 -1
  312. package/dist/index237.js +10 -5
  313. package/dist/index237.js.map +1 -1
  314. package/dist/index238.js +4 -13
  315. package/dist/index238.js.map +1 -1
  316. package/dist/index239.js +5 -154
  317. package/dist/index239.js.map +1 -1
  318. package/dist/index24.js +251 -166
  319. package/dist/index24.js.map +1 -1
  320. package/dist/index240.js +15 -29
  321. package/dist/index240.js.map +1 -1
  322. package/dist/index241.js +9 -9
  323. package/dist/index241.js.map +1 -1
  324. package/dist/index242.js +18 -47
  325. package/dist/index242.js.map +1 -1
  326. package/dist/index243.js +15 -11
  327. package/dist/index243.js.map +1 -1
  328. package/dist/index244.js +12 -44
  329. package/dist/index244.js.map +1 -1
  330. package/dist/index245.js +28 -94
  331. package/dist/index245.js.map +1 -1
  332. package/dist/index246.js +11 -85
  333. package/dist/index246.js.map +1 -1
  334. package/dist/index247.js +23 -103
  335. package/dist/index247.js.map +1 -1
  336. package/dist/index248.js +5 -52
  337. package/dist/index248.js.map +1 -1
  338. package/dist/index249.js +13 -11
  339. package/dist/index249.js.map +1 -1
  340. package/dist/index25.js +176 -14
  341. package/dist/index25.js.map +1 -1
  342. package/dist/index250.js +149 -32
  343. package/dist/index250.js.map +1 -1
  344. package/dist/index251.js +30 -8
  345. package/dist/index251.js.map +1 -1
  346. package/dist/index252.js +9 -116
  347. package/dist/index252.js.map +1 -1
  348. package/dist/index253.js +46 -16
  349. package/dist/index253.js.map +1 -1
  350. package/dist/index254.js +11 -15
  351. package/dist/index254.js.map +1 -1
  352. package/dist/index255.js +44 -3
  353. package/dist/index255.js.map +1 -1
  354. package/dist/index256.js +91 -32
  355. package/dist/index256.js.map +1 -1
  356. package/dist/index257.js +85 -19
  357. package/dist/index257.js.map +1 -1
  358. package/dist/index258.js +105 -9
  359. package/dist/index258.js.map +1 -1
  360. package/dist/index259.js +52 -8
  361. package/dist/index259.js.map +1 -1
  362. package/dist/index26.js +15 -2763
  363. package/dist/index26.js.map +1 -1
  364. package/dist/index260.js +10 -18
  365. package/dist/index260.js.map +1 -1
  366. package/dist/index261.js +36 -27
  367. package/dist/index261.js.map +1 -1
  368. package/dist/index262.js +8 -16
  369. package/dist/index262.js.map +1 -1
  370. package/dist/index263.js +3 -67
  371. package/dist/index263.js.map +1 -1
  372. package/dist/index264.js +9 -180
  373. package/dist/index264.js.map +1 -1
  374. package/dist/index265.js +110 -40
  375. package/dist/index265.js.map +1 -1
  376. package/dist/index266.js +17 -4
  377. package/dist/index266.js.map +1 -1
  378. package/dist/index267.js +15 -18
  379. package/dist/index267.js.map +1 -1
  380. package/dist/index268.js +36 -12
  381. package/dist/index268.js.map +1 -1
  382. package/dist/index269.js +21 -5
  383. package/dist/index269.js.map +1 -1
  384. package/dist/index27.js +2761 -35
  385. package/dist/index27.js.map +1 -1
  386. package/dist/index270.js +9 -3
  387. package/dist/index270.js.map +1 -1
  388. package/dist/index271.js +19 -23
  389. package/dist/index271.js.map +1 -1
  390. package/dist/index272.js +26 -110
  391. package/dist/index272.js.map +1 -1
  392. package/dist/index273.js +16 -15
  393. package/dist/index273.js.map +1 -1
  394. package/dist/index274.js +5 -525
  395. package/dist/index274.js.map +1 -1
  396. package/dist/index275.js +3 -128
  397. package/dist/index275.js.map +1 -1
  398. package/dist/index276.js +22 -132
  399. package/dist/index276.js.map +1 -1
  400. package/dist/index277.js +111 -19
  401. package/dist/index277.js.map +1 -1
  402. package/dist/index278.js +15 -5
  403. package/dist/index278.js.map +1 -1
  404. package/dist/index279.js +524 -5
  405. package/dist/index279.js.map +1 -1
  406. package/dist/index28.js +2 -2
  407. package/dist/index280.js +128 -4
  408. package/dist/index280.js.map +1 -1
  409. package/dist/index281.js +132 -14
  410. package/dist/index281.js.map +1 -1
  411. package/dist/index282.js +4 -8
  412. package/dist/index282.js.map +1 -1
  413. package/dist/index283.js +19 -6
  414. package/dist/index283.js.map +1 -1
  415. package/dist/index284.js +12 -4
  416. package/dist/index284.js.map +1 -1
  417. package/dist/index285.js +19 -544
  418. package/dist/index285.js.map +1 -1
  419. package/dist/index286.js +65 -43
  420. package/dist/index286.js.map +1 -1
  421. package/dist/index287.js +9 -18
  422. package/dist/index287.js.map +1 -1
  423. package/dist/index288.js +14 -7
  424. package/dist/index288.js.map +1 -1
  425. package/dist/index289.js +66 -9
  426. package/dist/index289.js.map +1 -1
  427. package/dist/index29.js +33 -121
  428. package/dist/index29.js.map +1 -1
  429. package/dist/index290.js +64 -7
  430. package/dist/index290.js.map +1 -1
  431. package/dist/index291.js +5 -8
  432. package/dist/index291.js.map +1 -1
  433. package/dist/index292.js +5 -12
  434. package/dist/index292.js.map +1 -1
  435. package/dist/index293.js +4 -10
  436. package/dist/index293.js.map +1 -1
  437. package/dist/index294.js +15 -13
  438. package/dist/index294.js.map +1 -1
  439. package/dist/index295.js +8 -64
  440. package/dist/index295.js.map +1 -1
  441. package/dist/index296.js +6 -69
  442. package/dist/index296.js.map +1 -1
  443. package/dist/index297.js +5 -9
  444. package/dist/index297.js.map +1 -1
  445. package/dist/index298.js +545 -13
  446. package/dist/index298.js.map +1 -1
  447. package/dist/index299.js +45 -64
  448. package/dist/index299.js.map +1 -1
  449. package/dist/index3.js.map +1 -1
  450. package/dist/index30.js +3 -232
  451. package/dist/index30.js.map +1 -1
  452. package/dist/index300.js +17 -4
  453. package/dist/index300.js.map +1 -1
  454. package/dist/index301.js +7 -56
  455. package/dist/index301.js.map +1 -1
  456. package/dist/index302.js +9 -68
  457. package/dist/index302.js.map +1 -1
  458. package/dist/index303.js +8 -31
  459. package/dist/index303.js.map +1 -1
  460. package/dist/index304.js +9 -9
  461. package/dist/index304.js.map +1 -1
  462. package/dist/index305.js +13 -153
  463. package/dist/index305.js.map +1 -1
  464. package/dist/index306.js +10 -108
  465. package/dist/index306.js.map +1 -1
  466. package/dist/index307.js +13 -3
  467. package/dist/index307.js.map +1 -1
  468. package/dist/index308.js +3 -22
  469. package/dist/index308.js.map +1 -1
  470. package/dist/index309.js +22 -15
  471. package/dist/index309.js.map +1 -1
  472. package/dist/index31.js +123 -22
  473. package/dist/index31.js.map +1 -1
  474. package/dist/index310.js +4 -28
  475. package/dist/index310.js.map +1 -1
  476. package/dist/index311.js +56 -13
  477. package/dist/index311.js.map +1 -1
  478. package/dist/index312.js +68 -7
  479. package/dist/index312.js.map +1 -1
  480. package/dist/index313.js +30 -22
  481. package/dist/index313.js.map +1 -1
  482. package/dist/index314.js +9 -13
  483. package/dist/index314.js.map +1 -1
  484. package/dist/index315.js +151 -26
  485. package/dist/index315.js.map +1 -1
  486. package/dist/index316.js +107 -4
  487. package/dist/index316.js.map +1 -1
  488. package/dist/index317.js +26 -0
  489. package/dist/index317.js.map +1 -0
  490. package/dist/index318.js +16 -0
  491. package/dist/index318.js.map +1 -0
  492. package/dist/index319.js +31 -0
  493. package/dist/index319.js.map +1 -0
  494. package/dist/index32.js +230 -49
  495. package/dist/index32.js.map +1 -1
  496. package/dist/index320.js +8 -0
  497. package/dist/index320.js.map +1 -0
  498. package/dist/index321.js +19 -0
  499. package/dist/index321.js.map +1 -0
  500. package/dist/index322.js +32 -0
  501. package/dist/index322.js.map +1 -0
  502. package/dist/index323.js +16 -0
  503. package/dist/index323.js.map +1 -0
  504. package/dist/index324.js +10 -0
  505. package/dist/index324.js.map +1 -0
  506. package/dist/index33.js +20 -2637
  507. package/dist/index33.js.map +1 -1
  508. package/dist/index34.js +47 -390
  509. package/dist/index34.js.map +1 -1
  510. package/dist/index35.js +2604 -196
  511. package/dist/index35.js.map +1 -1
  512. package/dist/index36.js +390 -18
  513. package/dist/index36.js.map +1 -1
  514. package/dist/index37.js +222 -131
  515. package/dist/index37.js.map +1 -1
  516. package/dist/index38.js +18 -183
  517. package/dist/index38.js.map +1 -1
  518. package/dist/index39.js +118 -65
  519. package/dist/index39.js.map +1 -1
  520. package/dist/index4.js +17 -15
  521. package/dist/index4.js.map +1 -1
  522. package/dist/index40.js +216 -93
  523. package/dist/index40.js.map +1 -1
  524. package/dist/index41.js +90 -5
  525. package/dist/index41.js.map +1 -1
  526. package/dist/index42.js +115 -840
  527. package/dist/index42.js.map +1 -1
  528. package/dist/index43.js +6 -66
  529. package/dist/index43.js.map +1 -1
  530. package/dist/index44.js +843 -7
  531. package/dist/index44.js.map +1 -1
  532. package/dist/index45.js +57 -2
  533. package/dist/index45.js.map +1 -1
  534. package/dist/index46.js +7 -23
  535. package/dist/index46.js.map +1 -1
  536. package/dist/index47.js +2 -234
  537. package/dist/index47.js.map +1 -1
  538. package/dist/index48.js +11 -6
  539. package/dist/index48.js.map +1 -1
  540. package/dist/index49.js +18 -33
  541. package/dist/index49.js.map +1 -1
  542. package/dist/index5.js +34 -34
  543. package/dist/index5.js.map +1 -1
  544. package/dist/index50.js +7 -26
  545. package/dist/index50.js.map +1 -1
  546. package/dist/index51.js +2 -8
  547. package/dist/index51.js.map +1 -1
  548. package/dist/index52.js +22 -10
  549. package/dist/index52.js.map +1 -1
  550. package/dist/index53.js +233 -3
  551. package/dist/index53.js.map +1 -1
  552. package/dist/index54.js +201 -44
  553. package/dist/index54.js.map +1 -1
  554. package/dist/index55.js +3 -50
  555. package/dist/index55.js.map +1 -1
  556. package/dist/index56.js +6 -7
  557. package/dist/index56.js.map +1 -1
  558. package/dist/index57.js +47 -14
  559. package/dist/index57.js.map +1 -1
  560. package/dist/index58.js +22 -129
  561. package/dist/index58.js.map +1 -1
  562. package/dist/index59.js +50 -10
  563. package/dist/index59.js.map +1 -1
  564. package/dist/index6.js +172 -25
  565. package/dist/index6.js.map +1 -1
  566. package/dist/index60.js +7 -216
  567. package/dist/index60.js.map +1 -1
  568. package/dist/index61.js +15 -13
  569. package/dist/index61.js.map +1 -1
  570. package/dist/index62.js +128 -41
  571. package/dist/index62.js.map +1 -1
  572. package/dist/index63.js +9 -48
  573. package/dist/index63.js.map +1 -1
  574. package/dist/index64.js +216 -3
  575. package/dist/index64.js.map +1 -1
  576. package/dist/index65.js +13 -6
  577. package/dist/index65.js.map +1 -1
  578. package/dist/index66.js +34 -28
  579. package/dist/index66.js.map +1 -1
  580. package/dist/index67.js +46 -49
  581. package/dist/index67.js.map +1 -1
  582. package/dist/index68.js +8 -9
  583. package/dist/index68.js.map +1 -1
  584. package/dist/index69.js +50 -2
  585. package/dist/index69.js.map +1 -1
  586. package/dist/index7.js +31 -29
  587. package/dist/index7.js.map +1 -1
  588. package/dist/index70.js +4 -2
  589. package/dist/index70.js.map +1 -1
  590. package/dist/index71.js +6 -205
  591. package/dist/index71.js.map +1 -1
  592. package/dist/index72.js +28 -54
  593. package/dist/index72.js.map +1 -1
  594. package/dist/index73.js +50 -6
  595. package/dist/index73.js.map +1 -1
  596. package/dist/index74.js +9 -8
  597. package/dist/index74.js.map +1 -1
  598. package/dist/index75.js +2 -6
  599. package/dist/index75.js.map +1 -1
  600. package/dist/index76.js +2 -52
  601. package/dist/index76.js.map +1 -1
  602. package/dist/index77.js +11 -4
  603. package/dist/index77.js.map +1 -1
  604. package/dist/index78.js +5 -4
  605. package/dist/index78.js.map +1 -1
  606. package/dist/index79.js +7 -15
  607. package/dist/index79.js.map +1 -1
  608. package/dist/index8.js +25 -222
  609. package/dist/index8.js.map +1 -1
  610. package/dist/index80.js +5 -5
  611. package/dist/index80.js.map +1 -1
  612. package/dist/index81.js +2 -8
  613. package/dist/index81.js.map +1 -1
  614. package/dist/index82.js +2 -17
  615. package/dist/index82.js.map +1 -1
  616. package/dist/index83.js +53 -4
  617. package/dist/index83.js.map +1 -1
  618. package/dist/index84.js +46 -4
  619. package/dist/index84.js.map +1 -1
  620. package/dist/index85.js +205 -5
  621. package/dist/index85.js.map +1 -1
  622. package/dist/index86.js +22 -6
  623. package/dist/index86.js.map +1 -1
  624. package/dist/index87.js +24 -4
  625. package/dist/index87.js.map +1 -1
  626. package/dist/index88.js +399 -4
  627. package/dist/index88.js.map +1 -1
  628. package/dist/index89.js +46 -6
  629. package/dist/index89.js.map +1 -1
  630. package/dist/index9.js +177 -23
  631. package/dist/index9.js.map +1 -1
  632. package/dist/index90.js +604 -23
  633. package/dist/index90.js.map +1 -1
  634. package/dist/index91.js +52 -7
  635. package/dist/index91.js.map +1 -1
  636. package/dist/index92.js +3 -3
  637. package/dist/index92.js.map +1 -1
  638. package/dist/index93.js +4 -6
  639. package/dist/index93.js.map +1 -1
  640. package/dist/index94.js +15 -5
  641. package/dist/index94.js.map +1 -1
  642. package/dist/index95.js +5 -4
  643. package/dist/index95.js.map +1 -1
  644. package/dist/index96.js +7 -5
  645. package/dist/index96.js.map +1 -1
  646. package/dist/index97.js +16 -4
  647. package/dist/index97.js.map +1 -1
  648. package/dist/index98.js +4 -8
  649. package/dist/index98.js.map +1 -1
  650. package/dist/index99.js +4 -5
  651. package/dist/index99.js.map +1 -1
  652. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index261.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js"],"sourcesContent":["/**\r\n * Strips any national prefix (such as 0, 1) present in a\r\n * (possibly incomplete) number provided.\r\n * \"Carrier codes\" are only used in Colombia and Brazil,\r\n * and only when dialing within those countries from a mobile phone to a fixed line number.\r\n * Sometimes it won't actually strip national prefix\r\n * and will instead prepend some digits to the `number`:\r\n * for example, when number `2345678` is passed with `VI` country selected,\r\n * it will return `{ number: \"3402345678\" }`, because `340` area code is prepended.\r\n * @param {string} number National number digits.\r\n * @param {object} metadata Metadata with country selected.\r\n * @return {object} `{ nationalNumber: string, nationalPrefix: string? carrierCode: string? }`. Even if a national prefix was extracted, it's not necessarily present in the returned object, so don't rely on its presence in the returned object in order to find out whether a national prefix has been extracted or not.\r\n */\nexport default function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {\n if (number && metadata.numberingPlan.nationalPrefixForParsing()) {\n // See METADATA.md for the description of\n // `national_prefix_for_parsing` and `national_prefix_transform_rule`.\n // Attempt to parse the first digits as a national prefix.\n var prefixPattern = new RegExp('^(?:' + metadata.numberingPlan.nationalPrefixForParsing() + ')');\n var prefixMatch = prefixPattern.exec(number);\n if (prefixMatch) {\n var nationalNumber;\n var carrierCode;\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n // If a `national_prefix_for_parsing` has any \"capturing groups\"\n // then it means that the national (significant) number is equal to\n // those \"capturing groups\" transformed via `national_prefix_transform_rule`,\n // and nothing could be said about the actual national prefix:\n // what is it and was it even there.\n // If a `national_prefix_for_parsing` doesn't have any \"capturing groups\",\n // then everything it matches is a national prefix.\n // To determine whether `national_prefix_for_parsing` matched any\n // \"capturing groups\", the value of the result of calling `.exec()`\n // is looked at, and if it has non-undefined values where there're\n // \"capturing groups\" in the regular expression, then it means\n // that \"capturing groups\" have been matched.\n // It's not possible to tell whether there'll be any \"capturing gropus\"\n // before the matching process, because a `national_prefix_for_parsing`\n // could exhibit both behaviors.\n var capturedGroupsCount = prefixMatch.length - 1;\n var hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount];\n if (metadata.nationalPrefixTransformRule() && hasCapturedGroups) {\n nationalNumber = number.replace(prefixPattern, metadata.nationalPrefixTransformRule());\n // If there's more than one captured group,\n // then carrier code is the second one.\n if (capturedGroupsCount > 1) {\n carrierCode = prefixMatch[1];\n }\n }\n // If there're no \"capturing groups\",\n // or if there're \"capturing groups\" but no\n // `national_prefix_transform_rule`,\n // then just strip the national prefix from the number,\n // and possibly a carrier code.\n // Seems like there could be more.\n else {\n // `prefixBeforeNationalNumber` is the whole substring matched by\n // the `national_prefix_for_parsing` regular expression.\n // There seem to be no guarantees that it's just a national prefix.\n // For example, if there's a carrier code, it's gonna be a\n // part of `prefixBeforeNationalNumber` too.\n var prefixBeforeNationalNumber = prefixMatch[0];\n nationalNumber = number.slice(prefixBeforeNationalNumber.length);\n // If there's at least one captured group,\n // then carrier code is the first one.\n if (hasCapturedGroups) {\n carrierCode = prefixMatch[1];\n }\n }\n // Tries to guess whether a national prefix was present in the input.\n // This is not something copy-pasted from Google's library:\n // they don't seem to have an equivalent for that.\n // So this isn't an \"officially approved\" way of doing something like that.\n // But since there seems no other existing method, this library uses it.\n var nationalPrefix;\n if (hasCapturedGroups) {\n var possiblePositionOfTheFirstCapturedGroup = number.indexOf(prefixMatch[1]);\n var possibleNationalPrefix = number.slice(0, possiblePositionOfTheFirstCapturedGroup);\n // Example: an Argentinian (AR) phone number `0111523456789`.\n // `prefixMatch[0]` is `01115`, and `$1` is `11`,\n // and the rest of the phone number is `23456789`.\n // The national number is transformed via `9$1` to `91123456789`.\n // National prefix `0` is detected being present at the start.\n // if (possibleNationalPrefix.indexOf(metadata.numberingPlan.nationalPrefix()) === 0) {\n if (possibleNationalPrefix === metadata.numberingPlan.nationalPrefix()) {\n nationalPrefix = metadata.numberingPlan.nationalPrefix();\n }\n } else {\n nationalPrefix = prefixMatch[0];\n }\n return {\n nationalNumber: nationalNumber,\n nationalPrefix: nationalPrefix,\n carrierCode: carrierCode\n };\n }\n }\n return {\n nationalNumber: number\n };\n}\n//# sourceMappingURL=extractNationalNumberFromPossiblyIncompleteNumber.js.map"],"names":["extractNationalNumberFromPossiblyIncompleteNumber","number","metadata","prefixPattern","prefixMatch","nationalNumber","carrierCode","capturedGroupsCount","hasCapturedGroups","prefixBeforeNationalNumber","nationalPrefix","possiblePositionOfTheFirstCapturedGroup","possibleNationalPrefix"],"mappings":"AAae,SAASA,EAAkDC,GAAQC,GAAU;AAC1F,MAAID,KAAUC,EAAS,cAAc,yBAAwB,GAAI;AAI/D,QAAIC,IAAgB,IAAI,OAAO,SAASD,EAAS,cAAc,yBAAwB,IAAK,GAAG,GAC3FE,IAAcD,EAAc,KAAKF,CAAM;AAC3C,QAAIG,GAAa;AACf,UAAIC,GACAC,GAiBAC,IAAsBH,EAAY,SAAS,GAC3CI,IAAoBD,IAAsB,KAAKH,EAAYG,CAAmB;AAClF,UAAIL,EAAS,4BAA2B,KAAMM;AAC5C,QAAAH,IAAiBJ,EAAO,QAAQE,GAAeD,EAAS,4BAA2B,CAAE,GAGjFK,IAAsB,MACxBD,IAAcF,EAAY,CAAC;AAAA,WAS1B;AAMH,YAAIK,IAA6BL,EAAY,CAAC;AAC9C,QAAAC,IAAiBJ,EAAO,MAAMQ,EAA2B,MAAM,GAG3DD,MACFF,IAAcF,EAAY,CAAC;AAAA,MAE/B;AAMA,UAAIM;AACJ,UAAIF,GAAmB;AACrB,YAAIG,IAA0CV,EAAO,QAAQG,EAAY,CAAC,CAAC,GACvEQ,IAAyBX,EAAO,MAAM,GAAGU,CAAuC;AAOpF,QAAIC,MAA2BV,EAAS,cAAc,eAAc,MAClEQ,IAAiBR,EAAS,cAAc,eAAc;AAAA,MAE1D;AACE,QAAAQ,IAAiBN,EAAY,CAAC;AAEhC,aAAO;AAAA,QACL,gBAAgBC;AAAA,QAChB,gBAAgBK;AAAA,QAChB,aAAaJ;AAAA,MACrB;AAAA,IACI;AAAA,EACF;AACA,SAAO;AAAA,IACL,gBAAgBL;AAAA,EACpB;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index261.js","sources":["../../../node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js"],"sourcesContent":["function _createForOfIteratorHelperLoose(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError(\"Invalid attempt to iterate 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; }\nimport { parseDigit } from './helpers/parseDigits.js';\n\n/**\r\n * Parses phone number characters from a string.\r\n * Drops all punctuation leaving only digits and the leading `+` sign (if any).\r\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\r\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\r\n * @param {string} string\r\n * @return {string}\r\n * @example\r\n * ```js\r\n * // Outputs '8800555'.\r\n * parseIncompletePhoneNumber('8 (800) 555')\r\n * // Outputs '+7800555'.\r\n * parseIncompletePhoneNumber('+7 800 555')\r\n * ```\r\n */\nexport default function parseIncompletePhoneNumber(string) {\n var result = '';\n // Using `.split('')` here instead of normal `for ... of`\n // because the importing application doesn't neccessarily include an ES6 polyfill.\n // The `.split('')` approach discards \"exotic\" UTF-8 characters\n // (the ones consisting of four bytes) but digits\n // (including non-European ones) don't fall into that range\n // so such \"exotic\" characters would be discarded anyway.\n for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n result += parsePhoneNumberCharacter(character, result) || '';\n }\n return result;\n}\n\n/**\r\n * Parses next character while parsing phone number digits (including a `+`)\r\n * from text: discards everything except `+` and digits, and `+` is only allowed\r\n * at the start of a phone number.\r\n * For example, is used in `react-phone-number-input` where it uses\r\n * [`input-format`](https://gitlab.com/catamphetamine/input-format).\r\n * @param {string} character - Yet another character from raw input string.\r\n * @param {string?} prevParsedCharacters - Previous parsed characters.\r\n * @param {function?} eventListener - An optional \"on event\" function.\r\n * @return {string?} The parsed character.\r\n */\nexport function parsePhoneNumberCharacter(character, prevParsedCharacters, eventListener) {\n // Only allow a leading `+`.\n if (character === '+') {\n // If this `+` is not the first parsed character\n // then discard it.\n if (prevParsedCharacters) {\n // `eventListener` argument was added to this `export`ed function on Dec 26th, 2023.\n // Any 3rd-party code that used to `import` and call this function before that\n // won't be passing any `eventListener` argument.\n //\n // The addition of the `eventListener` argument was to fix the slightly-weird behavior\n // of parsing an input string when the user inputs something like `\"2+7\"\n // https://github.com/catamphetamine/react-phone-number-input/issues/437\n //\n // If the parser encounters an unexpected `+` in a string being parsed\n // then it simply discards that out-of-place `+` and any following characters.\n //\n if (typeof eventListener === 'function') {\n eventListener('end');\n }\n return;\n }\n return '+';\n }\n // Allow digits.\n return parseDigit(character);\n}\n//# sourceMappingURL=parseIncompletePhoneNumber.js.map"],"names":["_createForOfIteratorHelperLoose","r","e","t","_unsupportedIterableToArray","o","a","_arrayLikeToArray","parseIncompletePhoneNumber","string","result","_iterator","_step","character","parsePhoneNumberCharacter","prevParsedCharacters","eventListener","parseDigit"],"mappings":";AAAA,SAASA,EAAgCC,GAAGC,GAAG;AAAE,MAAIC,IAAmB,OAAO,SAAtB,OAAgCF,EAAE,OAAO,QAAQ,KAAKA,EAAE,YAAY;AAAG,MAAIE,EAAG,SAAQA,IAAIA,EAAE,KAAKF,CAAC,GAAG,KAAK,KAAKE,CAAC;AAAG,MAAI,MAAM,QAAQF,CAAC,MAAME,IAAIC,EAA4BH,CAAC,MAAMC,GAAuC;AAAE,IAAAC,MAAMF,IAAIE;AAAI,QAAIE,IAAI;AAAG,WAAO,WAAY;AAAE,aAAOA,KAAKJ,EAAE,SAAS,EAAE,MAAM,GAAE,IAAK,EAAE,MAAM,IAAI,OAAOA,EAAEI,GAAG,EAAC;AAAA,IAAI;AAAA,EAAG;AAAE,QAAM,IAAI,UAAU;AAAA,mFAAuI;AAAG;AACziB,SAASD,EAA4BH,GAAGK,GAAG;AAAE,MAAIL,GAAG;AAAE,QAAgB,OAAOA,KAAnB,SAAsB,QAAOM,EAAkBN,GAAGK,CAAC;AAAG,QAAIH,IAAI,CAAA,EAAG,SAAS,KAAKF,CAAC,EAAE,MAAM,GAAG,EAAE;AAAG,WAAoBE,MAAb,YAAkBF,EAAE,gBAAgBE,IAAIF,EAAE,YAAY,OAAiBE,MAAV,SAAyBA,MAAV,QAAc,MAAM,KAAKF,CAAC,IAAoBE,MAAhB,eAAqB,2CAA2C,KAAKA,CAAC,IAAII,EAAkBN,GAAGK,CAAC,IAAI;AAAA,EAAQ;AAAE;AACzX,SAASC,EAAkBN,GAAGK,GAAG;AAAE,GAASA,KAAR,QAAaA,IAAIL,EAAE,YAAYK,IAAIL,EAAE;AAAS,WAASC,IAAI,GAAG,IAAI,MAAMI,CAAC,GAAGJ,IAAII,GAAGJ,IAAK,GAAEA,CAAC,IAAID,EAAEC,CAAC;AAAG,SAAO;AAAG;AAkBpI,SAASM,EAA2BC,GAAQ;AAQzD,WAPIC,IAAS,IAOJC,IAAYX,EAAgCS,EAAO,MAAM,EAAE,CAAC,GAAGG,GAAO,EAAEA,IAAQD,EAAS,GAAI,QAAO;AAC3G,QAAIE,IAAYD,EAAM;AACtB,IAAAF,KAAUI,EAA0BD,GAAWH,CAAM,KAAK;AAAA,EAC5D;AACA,SAAOA;AACT;AAaO,SAASI,EAA0BD,GAAWE,GAAsBC,GAAe;AAExF,SAAIH,MAAc,MAGZE,IAeF,SAEK,MAGFE,EAAWJ,CAAS;AAC7B;","x_google_ignoreList":[0]}
package/dist/index262.js CHANGED
@@ -1,20 +1,12 @@
1
- import I from "./index167.js";
2
- import { VALID_DIGITS as l } from "./index163.js";
3
- var c = new RegExp("([" + l + "])");
4
- function D(t, r, f, n) {
5
- if (r) {
6
- var a = new I(n);
7
- a.selectNumberingPlan(r, f);
8
- var i = new RegExp(a.IDDPrefix());
9
- if (t.search(i) === 0) {
10
- t = t.slice(t.match(i)[0].length);
11
- var e = t.match(c);
12
- if (!(e && e[1] != null && e[1].length > 0 && e[1] === "0"))
13
- return t;
14
- }
15
- }
1
+ function n(r) {
2
+ var t = r.number, e = r.ext;
3
+ if (!t)
4
+ return "";
5
+ if (t[0] !== "+")
6
+ throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');
7
+ return "tel:".concat(t).concat(e ? ";ext=" + e : "");
16
8
  }
17
9
  export {
18
- D as default
10
+ n as formatRFC3966
19
11
  };
20
12
  //# sourceMappingURL=index262.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index262.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js"],"sourcesContent":["import Metadata from '../metadata.js';\nimport { VALID_DIGITS } from '../constants.js';\nvar CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])');\nexport default function stripIddPrefix(number, country, callingCode, metadata) {\n if (!country) {\n return;\n }\n // Check if the number is IDD-prefixed.\n var countryMetadata = new Metadata(metadata);\n countryMetadata.selectNumberingPlan(country, callingCode);\n var IDDPrefixPattern = new RegExp(countryMetadata.IDDPrefix());\n if (number.search(IDDPrefixPattern) !== 0) {\n return;\n }\n // Strip IDD prefix.\n number = number.slice(number.match(IDDPrefixPattern)[0].length);\n // If there're any digits after an IDD prefix,\n // then those digits are a country calling code.\n // Since no country code starts with a `0`,\n // the code below validates that the next digit (if present) is not `0`.\n var matchedGroups = number.match(CAPTURING_DIGIT_PATTERN);\n if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {\n if (matchedGroups[1] === '0') {\n return;\n }\n }\n return number;\n}\n//# sourceMappingURL=stripIddPrefix.js.map"],"names":["CAPTURING_DIGIT_PATTERN","VALID_DIGITS","stripIddPrefix","number","country","callingCode","metadata","countryMetadata","Metadata","IDDPrefixPattern","matchedGroups"],"mappings":";;AAEA,IAAIA,IAA0B,IAAI,OAAO,OAAOC,IAAe,IAAI;AACpD,SAASC,EAAeC,GAAQC,GAASC,GAAaC,GAAU;AAC7E,MAAKF,GAIL;AAAA,QAAIG,IAAkB,IAAIC,EAASF,CAAQ;AAC3C,IAAAC,EAAgB,oBAAoBH,GAASC,CAAW;AACxD,QAAII,IAAmB,IAAI,OAAOF,EAAgB,UAAS,CAAE;AAC7D,QAAIJ,EAAO,OAAOM,CAAgB,MAAM,GAIxC;AAAA,MAAAN,IAASA,EAAO,MAAMA,EAAO,MAAMM,CAAgB,EAAE,CAAC,EAAE,MAAM;AAK9D,UAAIC,IAAgBP,EAAO,MAAMH,CAAuB;AACxD,UAAI,EAAAU,KAAiBA,EAAc,CAAC,KAAK,QAAQA,EAAc,CAAC,EAAE,SAAS,KACrEA,EAAc,CAAC,MAAM;AAI3B,eAAOP;AAAA;AAAA;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index262.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/RFC3966.js"],"sourcesContent":["function _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 _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; }\nfunction _createForOfIteratorHelperLoose(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError(\"Invalid attempt to iterate 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; }\nimport isViablePhoneNumber from './isViablePhoneNumber.js';\n\n// https://www.ietf.org/rfc/rfc3966.txt\n\n/**\r\n * @param {string} text - Phone URI (RFC 3966).\r\n * @return {object} `{ ?number, ?ext }`.\r\n */\nexport function parseRFC3966(text) {\n var number;\n var ext;\n\n // Replace \"tel:\" with \"tel=\" for parsing convenience.\n text = text.replace(/^tel:/, 'tel=');\n for (var _iterator = _createForOfIteratorHelperLoose(text.split(';')), _step; !(_step = _iterator()).done;) {\n var part = _step.value;\n var _part$split = part.split('='),\n _part$split2 = _slicedToArray(_part$split, 2),\n name = _part$split2[0],\n value = _part$split2[1];\n switch (name) {\n case 'tel':\n number = value;\n break;\n case 'ext':\n ext = value;\n break;\n case 'phone-context':\n // Only \"country contexts\" are supported.\n // \"Domain contexts\" are ignored.\n if (value[0] === '+') {\n number = value + number;\n }\n break;\n }\n }\n\n // If the phone number is not viable, then abort.\n if (!isViablePhoneNumber(number)) {\n return {};\n }\n var result = {\n number: number\n };\n if (ext) {\n result.ext = ext;\n }\n return result;\n}\n\n/**\r\n * @param {object} - `{ ?number, ?extension }`.\r\n * @return {string} Phone URI (RFC 3966).\r\n */\nexport function formatRFC3966(_ref) {\n var number = _ref.number,\n ext = _ref.ext;\n if (!number) {\n return '';\n }\n if (number[0] !== '+') {\n throw new Error(\"\\\"formatRFC3966()\\\" expects \\\"number\\\" to be in E.164 format.\");\n }\n return \"tel:\".concat(number).concat(ext ? ';ext=' + ext : '');\n}\n//# sourceMappingURL=RFC3966.js.map"],"names":["formatRFC3966","_ref","number","ext"],"mappings":"AA6DO,SAASA,EAAcC,GAAM;AAClC,MAAIC,IAASD,EAAK,QAChBE,IAAMF,EAAK;AACb,MAAI,CAACC;AACH,WAAO;AAET,MAAIA,EAAO,CAAC,MAAM;AAChB,UAAM,IAAI,MAAM,2DAA+D;AAEjF,SAAO,OAAO,OAAOA,CAAM,EAAE,OAAOC,IAAM,UAAUA,IAAM,EAAE;AAC9D;","x_google_ignoreList":[0]}
package/dist/index263.js CHANGED
@@ -1,71 +1,7 @@
1
- import * as i from "react";
2
- import { useComposedRefs as O } from "./index50.js";
3
- import { useLayoutEffect as A } from "./index64.js";
4
- function E(n, e) {
5
- return i.useReducer((t, r) => e[t][r] ?? t, n);
6
- }
7
- var T = (n) => {
8
- const { present: e, children: t } = n, r = R(e), a = typeof t == "function" ? t({ present: r.isPresent }) : i.Children.only(t), c = O(r.ref, v(a));
9
- return typeof t == "function" || r.isPresent ? i.cloneElement(a, { ref: c }) : null;
10
- };
11
- T.displayName = "Presence";
12
- function R(n) {
13
- const [e, t] = i.useState(), r = i.useRef(null), a = i.useRef(n), c = i.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
14
- mounted: {
15
- UNMOUNT: "unmounted",
16
- ANIMATION_OUT: "unmountSuspended"
17
- },
18
- unmountSuspended: {
19
- MOUNT: "mounted",
20
- ANIMATION_END: "unmounted"
21
- },
22
- unmounted: {
23
- MOUNT: "mounted"
24
- }
25
- });
26
- return i.useEffect(() => {
27
- const o = l(r.current);
28
- c.current = N === "mounted" ? o : "none";
29
- }, [N]), A(() => {
30
- const o = r.current, m = a.current;
31
- if (m !== n) {
32
- const f = c.current, u = l(o);
33
- n ? s("MOUNT") : u === "none" || o?.display === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
34
- }
35
- }, [n, s]), A(() => {
36
- if (e) {
37
- let o;
38
- const m = e.ownerDocument.defaultView ?? window, d = (u) => {
39
- const g = l(r.current).includes(CSS.escape(u.animationName));
40
- if (u.target === e && g && (s("ANIMATION_END"), !a.current)) {
41
- const y = e.style.animationFillMode;
42
- e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
43
- e.style.animationFillMode === "forwards" && (e.style.animationFillMode = y);
44
- });
45
- }
46
- }, f = (u) => {
47
- u.target === e && (c.current = l(r.current));
48
- };
49
- return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
50
- m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
51
- };
52
- } else
53
- s("ANIMATION_END");
54
- }, [e, s]), {
55
- isPresent: ["mounted", "unmountSuspended"].includes(N),
56
- ref: i.useCallback((o) => {
57
- r.current = o ? getComputedStyle(o) : null, t(o);
58
- }, [])
59
- };
60
- }
61
- function l(n) {
62
- return n?.animationName || "none";
63
- }
64
- function v(n) {
65
- let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
66
- return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
1
+ function r(e, n) {
2
+ return e = e || "", new RegExp("^(?:" + n + ")$").test(e);
67
3
  }
68
4
  export {
69
- T as Presence
5
+ r as default
70
6
  };
71
7
  //# sourceMappingURL=index263.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index263.js","sources":["../../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useStateMachine","initialState","machine","React","state","event","Presence","props","present","children","presence","usePresence","child","React2","ref","useComposedRefs","getElementRef","node","setNode","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","timeoutId","ownerWindow","handleAnimationEnd","isCurrentAnimation","currentFillMode","handleAnimationStart","node2","element","getter","mayWarn"],"mappings":";;;AASA,SAASA,EAAgBC,GAAcC,GAAS;AAC9C,SAAOC,EAAM,WAAW,CAACC,GAAOC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B,EAAE,SAASlB,CAAK;AAAA,IACzD,KAAKS,EAAO,YAAY,CAACsB,MAAU;AACjC,MAAAhB,EAAU,UAAUgB,IAAQ,iBAAiBA,CAAK,IAAI,MACtDjB,EAAQiB,CAAK;AAAA,IACf,GAAG,CAAA,CAAE;AAAA,EACT;AACA;AACA,SAASX,EAAiBE,GAAQ;AAChC,SAAOA,GAAQ,iBAAiB;AAClC;AACA,SAASV,EAAcoB,GAAS;AAC9B,MAAIC,IAAS,OAAO,yBAAyBD,EAAQ,OAAO,KAAK,GAAG,KAChEE,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO;AAC7D,SAAIC,IACKF,EAAQ,OAEjBC,IAAS,OAAO,yBAAyBD,GAAS,KAAK,GAAG,KAC1DE,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO,gBACrDC,IACKF,EAAQ,MAAM,MAEhBA,EAAQ,MAAM,OAAOA,EAAQ;AACtC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index263.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js"],"sourcesContent":["/**\r\n * Checks whether the entire input sequence can be matched\r\n * against the regular expression.\r\n * @return {boolean}\r\n */\nexport default function matchesEntirely(text, regularExpressionText) {\n // If the assigning of the `''` default value is moved to the arguments above,\n // the code coverage would decrease for some weird reason.\n text = text || '';\n return new RegExp('^(?:' + regularExpressionText + ')$').test(text);\n}\n//# sourceMappingURL=matchesEntirely.js.map"],"names":["matchesEntirely","text","regularExpressionText"],"mappings":"AAKe,SAASA,EAAgBC,GAAMC,GAAuB;AAGnE,SAAAD,IAAOA,KAAQ,IACR,IAAI,OAAO,SAASC,IAAwB,IAAI,EAAE,KAAKD,CAAI;AACpE;","x_google_ignoreList":[0]}
package/dist/index264.js CHANGED
@@ -1,184 +1,13 @@
1
- import * as s from "react";
2
- import { composeEventHandlers as p } from "./index48.js";
3
- import { createCollection as H } from "./index54.js";
4
- import { useComposedRefs as V } from "./index50.js";
5
- import { createContextScope as z } from "./index55.js";
6
- import { useId as q } from "./index59.js";
7
- import { Primitive as G } from "./index49.js";
8
- import { useCallbackRef as J } from "./index51.js";
9
- import { useControllableState as Q } from "./index63.js";
10
- import { useDirection as W } from "./index56.js";
11
- import { j as d } from "./index28.js";
12
- var _ = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, I = "RovingFocusGroup", [y, N, Z] = H(I), [$, Fe] = z(
13
- I,
14
- [Z]
15
- ), [ee, oe] = $(I), O = s.forwardRef(
16
- (e, r) => /* @__PURE__ */ d.jsx(y.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(y.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(te, { ...e, ref: r }) }) })
17
- );
18
- O.displayName = I;
19
- var te = s.forwardRef((e, r) => {
20
- const {
21
- __scopeRovingFocusGroup: c,
22
- orientation: o,
23
- loop: T = !1,
24
- dir: w,
25
- currentTabStopId: v,
26
- defaultCurrentTabStopId: C,
27
- onCurrentTabStopIdChange: S,
28
- onEntryFocus: m,
29
- preventScrollOnEntryFocus: u = !1,
30
- ...b
31
- } = e, F = s.useRef(null), g = V(r, F), R = W(w), [E, t] = Q({
32
- prop: v,
33
- defaultProp: C ?? null,
34
- onChange: S,
35
- caller: I
36
- }), [i, h] = s.useState(!1), a = J(m), l = N(c), x = s.useRef(!1), [k, D] = s.useState(0);
37
- return s.useEffect(() => {
38
- const n = F.current;
39
- if (n)
40
- return n.addEventListener(_, a), () => n.removeEventListener(_, a);
41
- }, [a]), /* @__PURE__ */ d.jsx(
42
- ee,
43
- {
44
- scope: c,
45
- orientation: o,
46
- dir: R,
47
- loop: T,
48
- currentTabStopId: E,
49
- onItemFocus: s.useCallback(
50
- (n) => t(n),
51
- [t]
52
- ),
53
- onItemShiftTab: s.useCallback(() => h(!0), []),
54
- onFocusableItemAdd: s.useCallback(
55
- () => D((n) => n + 1),
56
- []
57
- ),
58
- onFocusableItemRemove: s.useCallback(
59
- () => D((n) => n - 1),
60
- []
61
- ),
62
- children: /* @__PURE__ */ d.jsx(
63
- G.div,
64
- {
65
- tabIndex: i || k === 0 ? -1 : 0,
66
- "data-orientation": o,
67
- ...b,
68
- ref: g,
69
- style: { outline: "none", ...e.style },
70
- onMouseDown: p(e.onMouseDown, () => {
71
- x.current = !0;
72
- }),
73
- onFocus: p(e.onFocus, (n) => {
74
- const L = !x.current;
75
- if (n.target === n.currentTarget && L && !i) {
76
- const P = new CustomEvent(_, X);
77
- if (n.currentTarget.dispatchEvent(P), !P.defaultPrevented) {
78
- const A = l().filter((f) => f.focusable), U = A.find((f) => f.active), B = A.find((f) => f.id === E), Y = [U, B, ...A].filter(
79
- Boolean
80
- ).map((f) => f.ref.current);
81
- M(Y, u);
82
- }
83
- }
84
- x.current = !1;
85
- }),
86
- onBlur: p(e.onBlur, () => h(!1))
87
- }
88
- )
89
- }
90
- );
91
- }), K = "RovingFocusGroupItem", j = s.forwardRef(
92
- (e, r) => {
93
- const {
94
- __scopeRovingFocusGroup: c,
95
- focusable: o = !0,
96
- active: T = !1,
97
- tabStopId: w,
98
- children: v,
99
- ...C
100
- } = e, S = q(), m = w || S, u = oe(K, c), b = u.currentTabStopId === m, F = N(c), { onFocusableItemAdd: g, onFocusableItemRemove: R, currentTabStopId: E } = u;
101
- return s.useEffect(() => {
102
- if (o)
103
- return g(), () => R();
104
- }, [o, g, R]), /* @__PURE__ */ d.jsx(
105
- y.ItemSlot,
106
- {
107
- scope: c,
108
- id: m,
109
- focusable: o,
110
- active: T,
111
- children: /* @__PURE__ */ d.jsx(
112
- G.span,
113
- {
114
- tabIndex: b ? 0 : -1,
115
- "data-orientation": u.orientation,
116
- ...C,
117
- ref: r,
118
- onMouseDown: p(e.onMouseDown, (t) => {
119
- o ? u.onItemFocus(m) : t.preventDefault();
120
- }),
121
- onFocus: p(e.onFocus, () => u.onItemFocus(m)),
122
- onKeyDown: p(e.onKeyDown, (t) => {
123
- if (t.key === "Tab" && t.shiftKey) {
124
- u.onItemShiftTab();
125
- return;
126
- }
127
- if (t.target !== t.currentTarget) return;
128
- const i = se(t, u.orientation, u.dir);
129
- if (i !== void 0) {
130
- if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey) return;
131
- t.preventDefault();
132
- let a = F().filter((l) => l.focusable).map((l) => l.ref.current);
133
- if (i === "last") a.reverse();
134
- else if (i === "prev" || i === "next") {
135
- i === "prev" && a.reverse();
136
- const l = a.indexOf(t.currentTarget);
137
- a = u.loop ? ce(a, l + 1) : a.slice(l + 1);
138
- }
139
- setTimeout(() => M(a));
140
- }
141
- }),
142
- children: typeof v == "function" ? v({ isCurrentTabStop: b, hasTabStop: E != null }) : v
143
- }
144
- )
145
- }
146
- );
147
- }
148
- );
149
- j.displayName = K;
150
- var re = {
151
- ArrowLeft: "prev",
152
- ArrowUp: "prev",
153
- ArrowRight: "next",
154
- ArrowDown: "next",
155
- PageUp: "first",
156
- Home: "first",
157
- PageDown: "last",
158
- End: "last"
159
- };
160
- function ne(e, r) {
161
- return r !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
162
- }
163
- function se(e, r, c) {
164
- const o = ne(e.key, c);
165
- if (!(r === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(r === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
166
- return re[o];
167
- }
168
- function M(e, r = !1) {
169
- const c = document.activeElement;
170
- for (const o of e)
171
- if (o === c || (o.focus({ preventScroll: r }), document.activeElement !== c)) return;
172
- }
173
- function ce(e, r) {
174
- return e.map((c, o) => e[(r + o) % e.length]);
1
+ import f from "./index176.js";
2
+ var u = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
3
+ function D(t, r, a) {
4
+ var e = new f(a);
5
+ if (e.selectNumberingPlan(t, r), e.defaultIDDPrefix())
6
+ return e.defaultIDDPrefix();
7
+ if (u.test(e.IDDPrefix()))
8
+ return e.IDDPrefix();
175
9
  }
176
- var ge = O, Re = j;
177
10
  export {
178
- Re as Item,
179
- ge as Root,
180
- O as RovingFocusGroup,
181
- j as RovingFocusGroupItem,
182
- Fe as createRovingFocusGroupScope
11
+ D as default
183
12
  };
184
13
  //# sourceMappingURL=index264.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index264.js","sources":["../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","props","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","ref","composedRefs","useComposedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","node","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","children","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":";;;;;;;;;;;AAcA,IAAIA,IAAc,iCACdC,IAAgB,EAAE,SAAS,IAAO,YAAY,GAAI,GAClDC,IAAa,oBACb,CAACC,GAAYC,GAAeC,CAAqB,IAAIC,EAAiBJ,CAAU,GAChF,CAACK,GAA+BC,EA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,YACF,CAAC;AAAA,YACD,UAAU,OAAOM,KAAa,aAAaA,EAAS,EAAE,kBAAAM,GAAkB,YAAYnC,KAAoB,KAAI,CAAE,IAAI6B;AAAA,UAC9H;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACE;AACF;AACAH,EAAqB,cAAcD;AACnC,IAAIiB,KAA0B;AAAA,EAC5B,WAAW;AAAA,EACX,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AAAA,EACV,KAAK;AACP;AACA,SAASC,GAAqBC,GAAKxD,GAAK;AACtC,SAAIA,MAAQ,QAAcwD,IACnBA,MAAQ,cAAc,eAAeA,MAAQ,eAAe,cAAcA;AACnF;AACA,SAASL,GAAevB,GAAO9B,GAAaE,GAAK;AAC/C,QAAMwD,IAAMD,GAAqB3B,EAAM,KAAK5B,CAAG;AAC/C,MAAI,EAAAF,MAAgB,cAAc,CAAC,aAAa,YAAY,EAAE,SAAS0D,CAAG,MACtE,EAAA1D,MAAgB,gBAAgB,CAAC,WAAW,WAAW,EAAE,SAAS0D,CAAG;AACzE,WAAOF,GAAwBE,CAAG;AACpC;AACA,SAASpB,EAAWqB,GAAYC,IAAgB,IAAO;AACrD,QAAMC,IAA6B,SAAS;AAC5C,aAAWC,KAAaH;AAGtB,QAFIG,MAAcD,MAClBC,EAAU,MAAM,EAAE,eAAAF,GAAe,GAC7B,SAAS,kBAAkBC,GAA4B;AAE/D;AACA,SAASN,GAAUQ,GAAOC,GAAY;AACpC,SAAOD,EAAM,IAAI,CAACE,GAAGC,MAAUH,GAAOC,IAAaE,KAASH,EAAM,MAAM,CAAC;AAC3E;AACG,IAACI,KAAO1E,GACP2E,KAAO5B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index264.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js"],"sourcesContent":["import Metadata from '../metadata.js';\n\n/**\r\n * Pattern that makes it easy to distinguish whether a region has a single\r\n * international dialing prefix or not. If a region has a single international\r\n * prefix (e.g. 011 in USA), it will be represented as a string that contains\r\n * a sequence of ASCII digits, and possibly a tilde, which signals waiting for\r\n * the tone. If there are multiple available international prefixes in a\r\n * region, they will be represented as a regex string that always contains one\r\n * or more characters that are not ASCII digits or a tilde.\r\n */\nvar SINGLE_IDD_PREFIX_REG_EXP = /^[\\d]+(?:[~\\u2053\\u223C\\uFF5E][\\d]+)?$/;\n\n// If the `country` supports IDD calling, it returns a preferred IDD prefix.\n// If the `country` doesn't support IDD calling, it returns `undefined`.\nexport default function getIddPrefix(country, callingCode, metadata) {\n var countryMetadata = new Metadata(metadata);\n countryMetadata.selectNumberingPlan(country, callingCode);\n if (countryMetadata.defaultIDDPrefix()) {\n return countryMetadata.defaultIDDPrefix();\n }\n if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {\n return countryMetadata.IDDPrefix();\n }\n}\n//# sourceMappingURL=getIddPrefix.js.map"],"names":["SINGLE_IDD_PREFIX_REG_EXP","getIddPrefix","country","callingCode","metadata","countryMetadata","Metadata"],"mappings":";AAWA,IAAIA,IAA4B;AAIjB,SAASC,EAAaC,GAASC,GAAaC,GAAU;AACnE,MAAIC,IAAkB,IAAIC,EAASF,CAAQ;AAE3C,MADAC,EAAgB,oBAAoBH,GAASC,CAAW,GACpDE,EAAgB;AAClB,WAAOA,EAAgB,iBAAgB;AAEzC,MAAIL,EAA0B,KAAKK,EAAgB,UAAS,CAAE;AAC5D,WAAOA,EAAgB,UAAS;AAEpC;","x_google_ignoreList":[0]}
package/dist/index265.js CHANGED
@@ -1,50 +1,120 @@
1
- import * as l from "react";
2
- import { composeRefs as m } from "./index50.js";
3
- import { j as u } from "./index28.js";
4
- // @__NO_SIDE_EFFECTS__
5
- function x(e) {
6
- const r = /* @__PURE__ */ y(e), t = l.forwardRef((o, n) => {
7
- const { children: i, ...c } = o, s = l.Children.toArray(i), a = s.find(g);
8
- if (a) {
9
- const f = a.props.children, d = s.map((p) => p === a ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
10
- return /* @__PURE__ */ u.jsx(r, { ...c, ref: n, children: l.isValidElement(f) ? l.cloneElement(f, void 0, d) : null });
1
+ import { MIN_LENGTH_FOR_NSN as g, MAX_LENGTH_FOR_NSN as h, PLUS_CHARS as P, VALID_DIGITS as d } from "./index172.js";
2
+ import m from "./index257.js";
3
+ import T, { getCountryCallingCode as O } from "./index176.js";
4
+ import s, { isViablePhoneNumberStart as v } from "./index266.js";
5
+ import w from "./index267.js";
6
+ import y from "./index261.js";
7
+ import { isPossibleNumber as S } from "./index251.js";
8
+ import x from "./index177.js";
9
+ import R from "./index263.js";
10
+ import E from "./index255.js";
11
+ import I from "./index268.js";
12
+ import A from "./index180.js";
13
+ import p from "./index269.js";
14
+ var H = 250, L = new RegExp("[" + P + d + "]"), U = new RegExp("[^" + d + "#]+$");
15
+ function Z(t, r, n) {
16
+ if (r = r || {}, n = new T(n), r.defaultCountry && !n.hasCountry(r.defaultCountry))
17
+ throw r.v2 ? new m("INVALID_COUNTRY") : new Error("Unknown country: ".concat(r.defaultCountry));
18
+ var e = G(t, r.v2, r.extract), l = e.number, c = e.ext, i = e.error;
19
+ if (!l) {
20
+ if (r.v2)
21
+ throw i === "TOO_SHORT" ? new m("TOO_SHORT") : new m("NOT_A_NUMBER");
22
+ return {};
23
+ }
24
+ var a = D(l, r.defaultCountry, r.defaultCallingCode, n), o = a.country, u = a.nationalNumber, N = a.countryCallingCode, _ = a.countryCallingCodeSource, f = a.carrierCode;
25
+ if (!n.hasSelectedNumberingPlan()) {
26
+ if (r.v2)
27
+ throw new m("INVALID_COUNTRY");
28
+ return {};
29
+ }
30
+ if (!u || u.length < g) {
31
+ if (r.v2)
32
+ throw new m("TOO_SHORT");
33
+ return {};
34
+ }
35
+ if (u.length > h) {
36
+ if (r.v2)
37
+ throw new m("TOO_LONG");
38
+ return {};
39
+ }
40
+ if (r.v2) {
41
+ var C = new x(N, u, n.metadata);
42
+ return o && (C.country = o), f && (C.carrierCode = f), c && (C.ext = c), C.__countryCallingCodeSource = _, C;
43
+ }
44
+ var b = (r.extended ? n.hasSelectedNumberingPlan() : o) ? R(u, n.nationalNumberPattern()) : !1;
45
+ return r.extended ? {
46
+ country: o,
47
+ countryCallingCode: N,
48
+ carrierCode: f,
49
+ valid: b,
50
+ possible: b ? !0 : !!(r.extended === !0 && n.possibleLengths() && S(u, o, n)),
51
+ phone: u,
52
+ ext: c
53
+ } : b ? M(o, u, c) : {};
54
+ }
55
+ function F(t, r, n) {
56
+ if (t) {
57
+ if (t.length > H) {
58
+ if (n)
59
+ throw new m("TOO_LONG");
60
+ return;
11
61
  }
12
- return /* @__PURE__ */ u.jsx(r, { ...c, ref: n, children: i });
13
- });
14
- return t.displayName = `${e}.Slot`, t;
62
+ if (r === !1)
63
+ return t;
64
+ var e = t.search(L);
65
+ if (!(e < 0))
66
+ return t.slice(e).replace(U, "");
67
+ }
15
68
  }
16
- // @__NO_SIDE_EFFECTS__
17
- function y(e) {
18
- const r = l.forwardRef((t, o) => {
19
- const { children: n, ...i } = t;
20
- if (l.isValidElement(n)) {
21
- const c = R(n), s = C(i, n.props);
22
- return n.type !== l.Fragment && (s.ref = o ? m(o, c) : c), l.cloneElement(n, s);
69
+ function G(t, r, n) {
70
+ var e = p(t, {
71
+ extractFormattedPhoneNumber: function(i) {
72
+ return F(i, n, r);
23
73
  }
24
- return l.Children.count(n) > 1 ? l.Children.only(null) : null;
25
74
  });
26
- return r.displayName = `${e}.SlotClone`, r;
75
+ if (!e)
76
+ return {};
77
+ if (!s(e))
78
+ return v(e) ? {
79
+ error: "TOO_SHORT"
80
+ } : {};
81
+ var l = w(e);
82
+ return l.ext ? l : {
83
+ number: e
84
+ };
27
85
  }
28
- var E = /* @__PURE__ */ Symbol("radix.slottable");
29
- function g(e) {
30
- return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === E;
86
+ function M(t, r, n) {
87
+ var e = {
88
+ country: t,
89
+ phone: r
90
+ };
91
+ return n && (e.ext = n), e;
31
92
  }
32
- function C(e, r) {
33
- const t = { ...r };
34
- for (const o in r) {
35
- const n = e[o], i = r[o];
36
- /^on[A-Z]/.test(o) ? n && i ? t[o] = (...s) => {
37
- const a = i(...s);
38
- return n(...s), a;
39
- } : n && (t[o] = n) : o === "style" ? t[o] = { ...n, ...i } : o === "className" && (t[o] = [n, i].filter(Boolean).join(" "));
40
- }
41
- return { ...e, ...t };
42
- }
43
- function R(e) {
44
- let r = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning;
45
- return t ? e.ref : (r = Object.getOwnPropertyDescriptor(e, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
93
+ function D(t, r, n, e) {
94
+ var l = E(y(t), void 0, r, n, e.metadata), c = l.countryCallingCodeSource, i = l.countryCallingCode, a = l.number, o;
95
+ if (i)
96
+ e.selectNumberingPlan(i);
97
+ else if (a && (r || n))
98
+ e.selectNumberingPlan(r, n), r && (o = r), i = n || O(r, e.metadata);
99
+ else return {};
100
+ if (!a)
101
+ return {
102
+ countryCallingCodeSource: c,
103
+ countryCallingCode: i
104
+ };
105
+ var u = I(y(a), o, e), N = u.nationalNumber, _ = u.carrierCode, f = A(i, {
106
+ nationalNumber: N,
107
+ metadata: e
108
+ });
109
+ return f && (o = f, f === "001" || e.selectNumberingPlan(o)), {
110
+ country: o,
111
+ countryCallingCode: i,
112
+ countryCallingCodeSource: c,
113
+ nationalNumber: N,
114
+ carrierCode: _
115
+ };
46
116
  }
47
117
  export {
48
- x as createSlot
118
+ Z as default
49
119
  };
50
120
  //# sourceMappingURL=index265.js.map