@rpcbase/ui 0.210.0 → 0.212.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 (641) hide show
  1. package/dist/index.js +73 -25
  2. package/dist/index.js.map +1 -0
  3. package/dist/index10.js +666 -18
  4. package/dist/index10.js.map +1 -1
  5. package/dist/index100.js +46 -9
  6. package/dist/index100.js.map +1 -1
  7. package/dist/index101.js +7 -14
  8. package/dist/index101.js.map +1 -1
  9. package/dist/index102.js +50 -10
  10. package/dist/index102.js.map +1 -1
  11. package/dist/index103.js +233 -15
  12. package/dist/index103.js.map +1 -1
  13. package/dist/index104.js +25 -21
  14. package/dist/index104.js.map +1 -1
  15. package/dist/index105.js +27 -27
  16. package/dist/index105.js.map +1 -1
  17. package/dist/index106.js +404 -9
  18. package/dist/index106.js.map +1 -1
  19. package/dist/index107.js +609 -9
  20. package/dist/index107.js.map +1 -1
  21. package/dist/index108.js +55 -10
  22. package/dist/index108.js.map +1 -1
  23. package/dist/index109.js +6 -8
  24. package/dist/index109.js.map +1 -1
  25. package/dist/index11.js +459 -1673
  26. package/dist/index11.js.map +1 -1
  27. package/dist/index110.js +7 -8
  28. package/dist/index110.js.map +1 -1
  29. package/dist/index111.js +17 -7
  30. package/dist/index111.js.map +1 -1
  31. package/dist/index112.js +8 -11
  32. package/dist/index112.js.map +1 -1
  33. package/dist/index113.js +10 -10
  34. package/dist/index113.js.map +1 -1
  35. package/dist/index114.js +19 -37
  36. package/dist/index114.js.map +1 -1
  37. package/dist/index115.js +6 -9
  38. package/dist/index115.js.map +1 -1
  39. package/dist/index116.js +7 -8
  40. package/dist/index116.js.map +1 -1
  41. package/dist/index117.js +8 -10
  42. package/dist/index117.js.map +1 -1
  43. package/dist/index118.js +8 -12
  44. package/dist/index118.js.map +1 -1
  45. package/dist/index119.js +6 -7
  46. package/dist/index119.js.map +1 -1
  47. package/dist/index12.js +79 -10
  48. package/dist/index12.js.map +1 -1
  49. package/dist/index120.js +6 -8
  50. package/dist/index120.js.map +1 -1
  51. package/dist/index121.js +8 -7
  52. package/dist/index121.js.map +1 -1
  53. package/dist/index122.js +27 -8
  54. package/dist/index122.js.map +1 -1
  55. package/dist/index123.js +9 -9
  56. package/dist/index123.js.map +1 -1
  57. package/dist/index124.js +6 -7
  58. package/dist/index124.js.map +1 -1
  59. package/dist/index125.js +8 -7
  60. package/dist/index125.js.map +1 -1
  61. package/dist/index126.js +8 -10
  62. package/dist/index126.js.map +1 -1
  63. package/dist/index127.js +8 -60
  64. package/dist/index127.js.map +1 -1
  65. package/dist/index128.js +8 -9
  66. package/dist/index128.js.map +1 -1
  67. package/dist/index129.js +8 -23
  68. package/dist/index129.js.map +1 -1
  69. package/dist/index13.js +23 -21
  70. package/dist/index13.js.map +1 -1
  71. package/dist/index130.js +11 -22
  72. package/dist/index130.js.map +1 -1
  73. package/dist/index131.js +8 -37
  74. package/dist/index131.js.map +1 -1
  75. package/dist/index132.js +7 -8
  76. package/dist/index132.js.map +1 -1
  77. package/dist/index133.js +7 -11
  78. package/dist/index133.js.map +1 -1
  79. package/dist/index134.js +9 -17
  80. package/dist/index134.js.map +1 -1
  81. package/dist/index135.js +148 -13
  82. package/dist/index135.js.map +1 -1
  83. package/dist/index136.js +42 -9
  84. package/dist/index136.js.map +1 -1
  85. package/dist/index137.js +7 -8
  86. package/dist/index137.js.map +1 -1
  87. package/dist/index138.js +10 -8
  88. package/dist/index138.js.map +1 -1
  89. package/dist/index139.js +16 -8
  90. package/dist/index139.js.map +1 -1
  91. package/dist/index14.js +20 -194
  92. package/dist/index14.js.map +1 -1
  93. package/dist/index140.js +16 -8
  94. package/dist/index140.js.map +1 -1
  95. package/dist/index141.js +10 -7
  96. package/dist/index141.js.map +1 -1
  97. package/dist/index142.js +34 -9
  98. package/dist/index142.js.map +1 -1
  99. package/dist/index143.js +14 -24
  100. package/dist/index143.js.map +1 -1
  101. package/dist/index144.js +13 -11
  102. package/dist/index144.js.map +1 -1
  103. package/dist/index145.js +11 -10
  104. package/dist/index145.js.map +1 -1
  105. package/dist/index146.js +16 -9
  106. package/dist/index146.js.map +1 -1
  107. package/dist/index147.js +104 -9
  108. package/dist/index147.js.map +1 -1
  109. package/dist/index148.js +23 -8
  110. package/dist/index148.js.map +1 -1
  111. package/dist/index149.js +56 -7
  112. package/dist/index149.js.map +1 -1
  113. package/dist/index15.js +30 -33
  114. package/dist/index15.js.map +1 -1
  115. package/dist/index150.js +75 -8
  116. package/dist/index150.js.map +1 -1
  117. package/dist/index151.js +12 -7
  118. package/dist/index151.js.map +1 -1
  119. package/dist/index152.js +23 -8
  120. package/dist/index152.js.map +1 -1
  121. package/dist/index153.js +19 -7
  122. package/dist/index153.js.map +1 -1
  123. package/dist/index154.js +26 -7
  124. package/dist/index154.js.map +1 -1
  125. package/dist/index155.js +9 -7
  126. package/dist/index155.js.map +1 -1
  127. package/dist/index156.js +9 -32
  128. package/dist/index156.js.map +1 -1
  129. package/dist/index157.js +26 -35
  130. package/dist/index157.js.map +1 -1
  131. package/dist/index158.js +38 -19
  132. package/dist/index158.js.map +1 -1
  133. package/dist/index159.js +19 -15
  134. package/dist/index159.js.map +1 -1
  135. package/dist/index16.js +268 -57
  136. package/dist/index16.js.map +1 -1
  137. package/dist/index160.js +9 -12
  138. package/dist/index160.js.map +1 -1
  139. package/dist/index161.js +7 -19
  140. package/dist/index161.js.map +1 -1
  141. package/dist/index162.js +7 -89
  142. package/dist/index162.js.map +1 -1
  143. package/dist/index163.js +7 -50
  144. package/dist/index163.js.map +1 -1
  145. package/dist/index164.js +7 -20
  146. package/dist/index164.js.map +1 -1
  147. package/dist/index165.js +6 -11
  148. package/dist/index165.js.map +1 -1
  149. package/dist/index166.js +9 -13
  150. package/dist/index166.js.map +1 -1
  151. package/dist/index167.js +27 -9
  152. package/dist/index167.js.map +1 -1
  153. package/dist/index168.js +10 -25
  154. package/dist/index168.js.map +1 -1
  155. package/dist/index169.js +9 -10
  156. package/dist/index169.js.map +1 -1
  157. package/dist/index17.js +179 -9
  158. package/dist/index17.js.map +1 -1
  159. package/dist/index170.js +8 -9
  160. package/dist/index170.js.map +1 -1
  161. package/dist/index171.js +6 -9
  162. package/dist/index171.js.map +1 -1
  163. package/dist/index172.js +6 -7
  164. package/dist/index172.js.map +1 -1
  165. package/dist/index173.js +7 -9
  166. package/dist/index173.js.map +1 -1
  167. package/dist/index174.js +6 -70
  168. package/dist/index174.js.map +1 -1
  169. package/dist/index175.js +7 -20
  170. package/dist/index175.js.map +1 -1
  171. package/dist/index176.js +6 -15
  172. package/dist/index176.js.map +1 -1
  173. package/dist/index177.js +6 -12
  174. package/dist/index177.js.map +1 -1
  175. package/dist/index178.js +6 -23
  176. package/dist/index178.js.map +1 -1
  177. package/dist/index179.js +16 -20
  178. package/dist/index179.js.map +1 -1
  179. package/dist/index18.js +469 -27
  180. package/dist/index18.js.map +1 -1
  181. package/dist/index180.js +158 -59
  182. package/dist/index180.js.map +1 -1
  183. package/dist/index181.js +33 -13
  184. package/dist/index181.js.map +1 -1
  185. package/dist/index182.js +12 -9
  186. package/dist/index182.js.map +1 -1
  187. package/dist/index183.js +51 -29
  188. package/dist/index183.js.map +1 -1
  189. package/dist/index184.js +14 -29
  190. package/dist/index184.js.map +1 -1
  191. package/dist/index185.js +47 -16
  192. package/dist/index185.js.map +1 -1
  193. package/dist/index186.js +98 -16
  194. package/dist/index186.js.map +1 -1
  195. package/dist/index187.js +90 -10
  196. package/dist/index187.js.map +1 -1
  197. package/dist/index188.js +109 -27
  198. package/dist/index188.js.map +1 -1
  199. package/dist/index189.js +55 -388
  200. package/dist/index189.js.map +1 -1
  201. package/dist/index19.js +266 -65
  202. package/dist/index19.js.map +1 -1
  203. package/dist/index190.js +15 -499
  204. package/dist/index190.js.map +1 -1
  205. package/dist/index191.js +39 -132
  206. package/dist/index191.js.map +1 -1
  207. package/dist/index192.js +11 -55
  208. package/dist/index192.js.map +1 -1
  209. package/dist/index193.js +6 -80
  210. package/dist/index193.js.map +1 -1
  211. package/dist/index194.js +12 -902
  212. package/dist/index194.js.map +1 -1
  213. package/dist/index195.js +119 -22
  214. package/dist/index195.js.map +1 -1
  215. package/dist/index196.js +21 -452
  216. package/dist/index196.js.map +1 -1
  217. package/dist/index197.js +18 -7
  218. package/dist/index197.js.map +1 -1
  219. package/dist/index198.js +38 -59
  220. package/dist/index198.js.map +1 -1
  221. package/dist/index199.js +23 -64
  222. package/dist/index199.js.map +1 -1
  223. package/dist/index2.js +8 -10
  224. package/dist/index2.js.map +1 -0
  225. package/dist/index20.js +5 -43
  226. package/dist/index20.js.map +1 -1
  227. package/dist/index200.js +11 -63
  228. package/dist/index200.js.map +1 -1
  229. package/dist/index201.js +22 -11
  230. package/dist/index201.js.map +1 -1
  231. package/dist/index202.js +31 -19
  232. package/dist/index202.js.map +1 -1
  233. package/dist/index203.js +20 -148
  234. package/dist/index203.js.map +1 -1
  235. package/dist/index204.js +28 -7
  236. package/dist/index204.js.map +1 -1
  237. package/dist/index205.js +32 -14
  238. package/dist/index205.js.map +1 -1
  239. package/dist/index206.js +7 -107
  240. package/dist/index206.js.map +1 -1
  241. package/dist/index207.js +65 -355
  242. package/dist/index207.js.map +1 -1
  243. package/dist/index208.js +184 -99
  244. package/dist/index208.js.map +1 -1
  245. package/dist/index209.js +49 -329
  246. package/dist/index209.js.map +1 -1
  247. package/dist/index21.js +28 -11
  248. package/dist/index21.js.map +1 -1
  249. package/dist/index210.js +60 -212
  250. package/dist/index210.js.map +1 -1
  251. package/dist/index211.js +12 -22
  252. package/dist/index211.js.map +1 -1
  253. package/dist/index212.js +69 -30
  254. package/dist/index212.js.map +1 -1
  255. package/dist/index213.js +21 -189
  256. package/dist/index213.js.map +1 -1
  257. package/dist/index214.js +20 -21
  258. package/dist/index214.js.map +1 -1
  259. package/dist/index215.js +9 -65
  260. package/dist/index215.js.map +1 -1
  261. package/dist/index216.js +8 -46
  262. package/dist/index216.js.map +1 -1
  263. package/dist/index217.js +9 -12
  264. package/dist/index217.js.map +1 -1
  265. package/dist/index218.js +8 -28
  266. package/dist/index218.js.map +1 -1
  267. package/dist/index219.js +9 -47
  268. package/dist/index219.js.map +1 -1
  269. package/dist/index22.js +48 -16
  270. package/dist/index22.js.map +1 -1
  271. package/dist/index220.js +19 -20
  272. package/dist/index220.js.map +1 -1
  273. package/dist/index221.js +8 -6
  274. package/dist/index221.js.map +1 -1
  275. package/dist/index222.js +7 -7
  276. package/dist/index222.js.map +1 -1
  277. package/dist/index223.js +15 -23
  278. package/dist/index223.js.map +1 -1
  279. package/dist/index224.js +12 -27
  280. package/dist/index224.js.map +1 -1
  281. package/dist/index225.js +16 -70
  282. package/dist/index225.js.map +1 -1
  283. package/dist/index226.js +16 -17
  284. package/dist/index226.js.map +1 -1
  285. package/dist/index227.js +8 -7
  286. package/dist/index227.js.map +1 -1
  287. package/dist/index228.js +8 -53
  288. package/dist/index228.js.map +1 -1
  289. package/dist/index229.js +9 -8
  290. package/dist/index229.js.map +1 -1
  291. package/dist/index23.js +37 -109
  292. package/dist/index23.js.map +1 -1
  293. package/dist/index230.js +7 -28
  294. package/dist/index230.js.map +1 -1
  295. package/dist/index231.js +57 -16
  296. package/dist/index231.js.map +1 -1
  297. package/dist/index232.js +11 -12
  298. package/dist/index232.js.map +1 -1
  299. package/dist/index233.js +8 -3
  300. package/dist/index233.js.map +1 -0
  301. package/dist/index234.js +7 -28
  302. package/dist/index234.js.map +1 -1
  303. package/dist/index235.js +11 -71
  304. package/dist/index235.js.map +1 -1
  305. package/dist/index236.js +8 -3
  306. package/dist/index236.js.map +1 -0
  307. package/dist/index237.js +7 -14
  308. package/dist/index237.js.map +1 -1
  309. package/dist/index238.js +6 -53
  310. package/dist/index238.js.map +1 -1
  311. package/dist/index239.js +13 -117
  312. package/dist/index239.js.map +1 -1
  313. package/dist/index24.js +227 -11
  314. package/dist/index24.js.map +1 -1
  315. package/dist/index240.js +13 -9
  316. package/dist/index240.js.map +1 -1
  317. package/dist/index241.js +13 -16
  318. package/dist/index241.js.map +1 -1
  319. package/dist/index242.js +13 -689
  320. package/dist/index242.js.map +1 -1
  321. package/dist/index243.js +14 -256
  322. package/dist/index243.js.map +1 -1
  323. package/dist/index244.js +13 -704
  324. package/dist/index244.js.map +1 -1
  325. package/dist/index245.js +9 -7433
  326. package/dist/index245.js.map +1 -1
  327. package/dist/index246.js +8 -9
  328. package/dist/index246.js.map +1 -1
  329. package/dist/index247.js +7 -15
  330. package/dist/index247.js.map +1 -1
  331. package/dist/index248.js +8 -8
  332. package/dist/index248.js.map +1 -1
  333. package/dist/index249.js +9 -462
  334. package/dist/index249.js.map +1 -1
  335. package/dist/index25.js +32 -23
  336. package/dist/index25.js.map +1 -1
  337. package/dist/index250.js +9 -41
  338. package/dist/index250.js.map +1 -1
  339. package/dist/index251.js +19 -22
  340. package/dist/index251.js.map +1 -1
  341. package/dist/index252.js +10 -30
  342. package/dist/index252.js.map +1 -1
  343. package/dist/index253.js +13 -7
  344. package/dist/index253.js.map +1 -1
  345. package/dist/index254.js +14 -62
  346. package/dist/index254.js.map +1 -1
  347. package/dist/index255.js +24 -10
  348. package/dist/index255.js.map +1 -1
  349. package/dist/index256.js +13 -15
  350. package/dist/index256.js.map +1 -1
  351. package/dist/index257.js +13 -6
  352. package/dist/index257.js.map +1 -1
  353. package/dist/index258.js +12 -19
  354. package/dist/index258.js.map +1 -1
  355. package/dist/index259.js +7 -28
  356. package/dist/index259.js.map +1 -1
  357. package/dist/index26.js +16 -60
  358. package/dist/index26.js.map +1 -1
  359. package/dist/index260.js +9 -47
  360. package/dist/index260.js.map +1 -1
  361. package/dist/index261.js +19 -16
  362. package/dist/index261.js.map +1 -1
  363. package/dist/index262.js +12 -28
  364. package/dist/index262.js.map +1 -1
  365. package/dist/index263.js +21 -20
  366. package/dist/index263.js.map +1 -1
  367. package/dist/index264.js +18 -38
  368. package/dist/index264.js.map +1 -1
  369. package/dist/index265.js +15 -8
  370. package/dist/index265.js.map +1 -1
  371. package/dist/index266.js +32 -12
  372. package/dist/index266.js.map +1 -1
  373. package/dist/index267.js +15 -11
  374. package/dist/index267.js.map +1 -1
  375. package/dist/index268.js +28 -12
  376. package/dist/index268.js.map +1 -1
  377. package/dist/index269.js +8 -13
  378. package/dist/index269.js.map +1 -1
  379. package/dist/index27.js +2924 -58
  380. package/dist/index27.js.map +1 -1
  381. package/dist/index270.js +23 -10
  382. package/dist/index270.js.map +1 -1
  383. package/dist/index271.js +8 -77
  384. package/dist/index271.js.map +1 -1
  385. package/dist/index272.js +5 -174
  386. package/dist/index272.js.map +1 -1
  387. package/dist/index273.js +27 -118
  388. package/dist/index273.js.map +1 -1
  389. package/dist/index274.js +115 -17
  390. package/dist/index274.js.map +1 -1
  391. package/dist/index275.js +17 -82
  392. package/dist/index275.js.map +1 -1
  393. package/dist/index276.js +528 -45
  394. package/dist/index276.js.map +1 -1
  395. package/dist/index277.js +129 -17
  396. package/dist/index277.js.map +1 -1
  397. package/dist/index278.js +137 -20
  398. package/dist/index278.js.map +1 -1
  399. package/dist/index279.js +8 -103
  400. package/dist/index279.js.map +1 -1
  401. package/dist/index28.js +6 -1
  402. package/dist/index28.js.map +1 -0
  403. package/dist/index280.js +21 -60
  404. package/dist/index280.js.map +1 -1
  405. package/dist/index281.js +16 -112
  406. package/dist/index281.js.map +1 -1
  407. package/dist/index282.js +65 -72
  408. package/dist/index282.js.map +1 -1
  409. package/dist/index283.js +72 -117
  410. package/dist/index283.js.map +1 -1
  411. package/dist/index284.js +12 -59
  412. package/dist/index284.js.map +1 -1
  413. package/dist/index285.js +17 -47
  414. package/dist/index285.js.map +1 -1
  415. package/dist/index286.js +69 -146
  416. package/dist/index286.js.map +1 -1
  417. package/dist/index287.js +8 -143
  418. package/dist/index287.js.map +1 -1
  419. package/dist/index288.js +8 -258
  420. package/dist/index288.js.map +1 -1
  421. package/dist/index289.js +7 -244
  422. package/dist/index289.js.map +1 -1
  423. package/dist/index29.js +40 -5
  424. package/dist/index29.js.map +1 -0
  425. package/dist/index290.js +19 -302
  426. package/dist/index290.js.map +1 -1
  427. package/dist/index291.js +11 -8
  428. package/dist/index291.js.map +1 -1
  429. package/dist/index292.js +8 -9
  430. package/dist/index292.js.map +1 -1
  431. package/dist/index293.js +7 -10
  432. package/dist/index293.js.map +1 -1
  433. package/dist/index294.js +548 -9
  434. package/dist/index294.js.map +1 -1
  435. package/dist/index295.js +50 -10
  436. package/dist/index295.js.map +1 -1
  437. package/dist/index296.js +20 -24
  438. package/dist/index296.js.map +1 -1
  439. package/dist/index297.js +8 -13
  440. package/dist/index297.js.map +1 -1
  441. package/dist/index298.js +11 -130
  442. package/dist/index298.js.map +1 -1
  443. package/dist/index299.js +9 -167
  444. package/dist/index299.js.map +1 -1
  445. package/dist/index3.js +181 -6
  446. package/dist/index3.js.map +1 -1
  447. package/dist/index30.js +6 -8
  448. package/dist/index30.js.map +1 -1
  449. package/dist/index300.js +11 -72
  450. package/dist/index300.js.map +1 -1
  451. package/dist/index301.js +14 -112
  452. package/dist/index301.js.map +1 -1
  453. package/dist/index302.js +12 -495
  454. package/dist/index302.js.map +1 -1
  455. package/dist/index303.js +15 -65
  456. package/dist/index303.js.map +1 -1
  457. package/dist/index304.js +7 -7
  458. package/dist/index304.js.map +1 -1
  459. package/dist/index305.js +25 -30
  460. package/dist/index305.js.map +1 -1
  461. package/dist/index306.js +6 -67
  462. package/dist/index306.js.map +1 -1
  463. package/dist/index307.js +58 -155
  464. package/dist/index307.js.map +1 -1
  465. package/dist/index308.js +71 -65
  466. package/dist/index308.js.map +1 -1
  467. package/dist/index309.js +32 -563
  468. package/dist/index309.js.map +1 -1
  469. package/dist/index31.js +128 -9
  470. package/dist/index31.js.map +1 -1
  471. package/dist/index310.js +11 -213
  472. package/dist/index310.js.map +1 -1
  473. package/dist/index311.js +156 -335
  474. package/dist/index311.js.map +1 -1
  475. package/dist/index312.js +110 -271
  476. package/dist/index312.js.map +1 -1
  477. package/dist/index313.js +26 -0
  478. package/dist/index313.js.map +1 -0
  479. package/dist/index314.js +16 -0
  480. package/dist/index314.js.map +1 -0
  481. package/dist/index315.js +31 -0
  482. package/dist/index315.js.map +1 -0
  483. package/dist/index316.js +8 -0
  484. package/dist/index316.js.map +1 -0
  485. package/dist/index317.js +19 -0
  486. package/dist/index317.js.map +1 -0
  487. package/dist/index318.js +32 -0
  488. package/dist/index318.js.map +1 -0
  489. package/dist/index319.js +16 -0
  490. package/dist/index319.js.map +1 -0
  491. package/dist/index32.js +234 -8
  492. package/dist/index32.js.map +1 -1
  493. package/dist/index320.js +10 -0
  494. package/dist/index320.js.map +1 -0
  495. package/dist/index33.js +26 -10
  496. package/dist/index33.js.map +1 -1
  497. package/dist/index34.js +54 -14
  498. package/dist/index34.js.map +1 -1
  499. package/dist/index35.js +24 -8
  500. package/dist/index35.js.map +1 -1
  501. package/dist/index36.js +133 -11
  502. package/dist/index36.js.map +1 -1
  503. package/dist/index37.js +225 -12
  504. package/dist/index37.js.map +1 -1
  505. package/dist/index38.js +94 -16
  506. package/dist/index38.js.map +1 -1
  507. package/dist/index39.js +121 -9
  508. package/dist/index39.js.map +1 -1
  509. package/dist/index4.js +28 -25
  510. package/dist/index4.js.map +1 -1
  511. package/dist/index40.js +8 -9
  512. package/dist/index40.js.map +1 -1
  513. package/dist/index41.js +847 -10
  514. package/dist/index41.js.map +1 -1
  515. package/dist/index42.js +60 -13
  516. package/dist/index42.js.map +1 -1
  517. package/dist/index43.js +10 -11
  518. package/dist/index43.js.map +1 -1
  519. package/dist/index44.js +5 -9
  520. package/dist/index44.js.map +1 -1
  521. package/dist/index45.js +14 -8
  522. package/dist/index45.js.map +1 -1
  523. package/dist/index46.js +21 -14
  524. package/dist/index46.js.map +1 -1
  525. package/dist/index47.js +10 -14
  526. package/dist/index47.js.map +1 -1
  527. package/dist/index48.js +5 -11
  528. package/dist/index48.js.map +1 -1
  529. package/dist/index49.js +26 -7
  530. package/dist/index49.js.map +1 -1
  531. package/dist/index5.js +41 -34
  532. package/dist/index5.js.map +1 -1
  533. package/dist/index50.js +236 -9
  534. package/dist/index50.js.map +1 -1
  535. package/dist/index51.js +9 -9
  536. package/dist/index51.js.map +1 -1
  537. package/dist/index52.js +36 -9
  538. package/dist/index52.js.map +1 -1
  539. package/dist/index53.js +29 -12
  540. package/dist/index53.js.map +1 -1
  541. package/dist/index54.js +10 -16
  542. package/dist/index54.js.map +1 -1
  543. package/dist/index55.js +14 -9
  544. package/dist/index55.js.map +1 -1
  545. package/dist/index56.js +5 -10
  546. package/dist/index56.js.map +1 -1
  547. package/dist/index57.js +5 -10
  548. package/dist/index57.js.map +1 -1
  549. package/dist/index58.js +5 -17
  550. package/dist/index58.js.map +1 -1
  551. package/dist/index59.js +5 -11
  552. package/dist/index59.js.map +1 -1
  553. package/dist/index6.js +469 -42
  554. package/dist/index6.js.map +1 -1
  555. package/dist/index60.js +208 -12
  556. package/dist/index60.js.map +1 -1
  557. package/dist/index61.js +8 -70
  558. package/dist/index61.js.map +1 -1
  559. package/dist/index62.js +10 -10
  560. package/dist/index62.js.map +1 -1
  561. package/dist/index63.js +8 -33
  562. package/dist/index63.js.map +1 -1
  563. package/dist/index64.js +7 -13
  564. package/dist/index64.js.map +1 -1
  565. package/dist/index65.js +50 -18
  566. package/dist/index65.js.map +1 -1
  567. package/dist/index66.js +53 -203
  568. package/dist/index66.js.map +1 -1
  569. package/dist/index67.js +10 -23
  570. package/dist/index67.js.map +1 -1
  571. package/dist/index68.js +17 -19
  572. package/dist/index68.js.map +1 -1
  573. package/dist/index69.js +136 -125
  574. package/dist/index69.js.map +1 -1
  575. package/dist/index7.js +138 -224
  576. package/dist/index7.js.map +1 -1
  577. package/dist/index70.js +13 -21
  578. package/dist/index70.js.map +1 -1
  579. package/dist/index71.js +219 -11
  580. package/dist/index71.js.map +1 -1
  581. package/dist/index72.js +16 -13
  582. package/dist/index72.js.map +1 -1
  583. package/dist/index73.js +49 -16
  584. package/dist/index73.js.map +1 -1
  585. package/dist/index74.js +52 -12
  586. package/dist/index74.js.map +1 -1
  587. package/dist/index75.js +7 -13
  588. package/dist/index75.js.map +1 -1
  589. package/dist/index76.js +8 -7
  590. package/dist/index76.js.map +1 -1
  591. package/dist/index77.js +30 -44
  592. package/dist/index77.js.map +1 -1
  593. package/dist/index78.js +52 -383
  594. package/dist/index78.js.map +1 -1
  595. package/dist/index79.js +11 -41
  596. package/dist/index79.js.map +1 -1
  597. package/dist/index8.js +875 -37
  598. package/dist/index8.js.map +1 -1
  599. package/dist/index80.js +46 -21
  600. package/dist/index80.js.map +1 -1
  601. package/dist/index81.js +8 -60
  602. package/dist/index81.js.map +1 -1
  603. package/dist/index82.js +72 -11
  604. package/dist/index82.js.map +1 -1
  605. package/dist/index83.js +5 -9
  606. package/dist/index83.js.map +1 -1
  607. package/dist/index84.js +367 -9
  608. package/dist/index84.js.map +1 -1
  609. package/dist/index85.js +265 -9
  610. package/dist/index85.js.map +1 -1
  611. package/dist/index86.js +64 -9
  612. package/dist/index86.js.map +1 -1
  613. package/dist/index87.js +50 -10
  614. package/dist/index87.js.map +1 -1
  615. package/dist/index88.js +173 -10
  616. package/dist/index88.js.map +1 -1
  617. package/dist/index89.js +113 -14
  618. package/dist/index89.js.map +1 -1
  619. package/dist/index9.js +8 -33
  620. package/dist/index9.js.map +1 -1
  621. package/dist/index90.js +27 -10
  622. package/dist/index90.js.map +1 -1
  623. package/dist/index91.js +11 -10
  624. package/dist/index91.js.map +1 -1
  625. package/dist/index92.js +7 -8
  626. package/dist/index92.js.map +1 -1
  627. package/dist/index93.js +8 -10
  628. package/dist/index93.js.map +1 -1
  629. package/dist/index94.js +7 -50
  630. package/dist/index94.js.map +1 -1
  631. package/dist/index95.js +469 -108
  632. package/dist/index95.js.map +1 -1
  633. package/dist/index96.js +188 -13
  634. package/dist/index96.js.map +1 -1
  635. package/dist/index97.js +110 -9
  636. package/dist/index97.js.map +1 -1
  637. package/dist/index98.js +265 -9
  638. package/dist/index98.js.map +1 -1
  639. package/dist/index99.js +12 -8
  640. package/dist/index99.js.map +1 -1
  641. package/package.json +7 -7
package/dist/index295.js CHANGED
@@ -1,10 +1,50 @@
1
- import e from "./index246.js";
2
- import { getCountryCallingCode as t } from "./index249.js";
3
- //#region ../../node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js
4
- function n() {
5
- return e(t, arguments);
6
- }
7
- //#endregion
8
- export { n as getCountryCallingCode };
9
-
10
- //# sourceMappingURL=index295.js.map
1
+ const s = (t, e) => {
2
+ switch (t) {
3
+ case "P":
4
+ return e.date({ width: "short" });
5
+ case "PP":
6
+ return e.date({ width: "medium" });
7
+ case "PPP":
8
+ return e.date({ width: "long" });
9
+ default:
10
+ return e.date({ width: "full" });
11
+ }
12
+ }, c = (t, e) => {
13
+ switch (t) {
14
+ case "p":
15
+ return e.time({ width: "short" });
16
+ case "pp":
17
+ return e.time({ width: "medium" });
18
+ case "ppp":
19
+ return e.time({ width: "long" });
20
+ default:
21
+ return e.time({ width: "full" });
22
+ }
23
+ }, P = (t, e) => {
24
+ const d = t.match(/(P+)(p+)?/) || [], a = d[1], r = d[2];
25
+ if (!r)
26
+ return s(t, e);
27
+ let i;
28
+ switch (a) {
29
+ case "P":
30
+ i = e.dateTime({ width: "short" });
31
+ break;
32
+ case "PP":
33
+ i = e.dateTime({ width: "medium" });
34
+ break;
35
+ case "PPP":
36
+ i = e.dateTime({ width: "long" });
37
+ break;
38
+ default:
39
+ i = e.dateTime({ width: "full" });
40
+ break;
41
+ }
42
+ return i.replace("{{date}}", s(a, e)).replace("{{time}}", c(r, e));
43
+ }, h = {
44
+ p: c,
45
+ P
46
+ };
47
+ export {
48
+ h as longFormatters
49
+ };
50
+ //# sourceMappingURL=index295.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index295.js","names":["_getCountryCallingCode"],"sources":["../../../node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js"],"sourcesContent":["import withMetadataArgument from './withMetadataArgument.js'\r\nimport { getCountryCallingCode as _getCountryCallingCode } from '../../core/index.js'\r\n\r\nexport function getCountryCallingCode() {\r\n\treturn withMetadataArgument(_getCountryCallingCode, arguments)\r\n}"],"x_google_ignoreList":[0],"mappings":";;;AAGA,SAAgB,IAAwB;AACvC,QAAO,EAAqBA,GAAwB,UAAU"}
1
+ {"version":3,"file":"index295.js","sources":["../../../node_modules/date-fns/_lib/format/longFormatters.js"],"sourcesContent":["const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n"],"names":["dateLongFormatter","pattern","formatLong","timeLongFormatter","dateTimeLongFormatter","matchResult","datePattern","timePattern","dateTimeFormat","longFormatters"],"mappings":"AAAA,MAAMA,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Q,YAAYR,EAAkBM,GAAaJ,CAAU,CAAC,EAC9D,QAAQ,YAAYC,EAAkBI,GAAaL,CAAU,CAAC;AACnE,GAEaO,IAAiB;AAAA,EAC5B,GAAGN;AAAA,EACHC;AACF;","x_google_ignoreList":[0]}
package/dist/index296.js CHANGED
@@ -1,25 +1,21 @@
1
- //#region src/components/PhoneNumberInput/messages.ts
2
- var e = {
3
- en: {
4
- lengthTooLong: (e) => e ? `This number looks too long for ${e}.` : "This number looks too long.",
5
- noMatches: "No matching countries",
6
- selectCountryLabel: "Select a country",
7
- selectedCountryLabel: (e) => e ? `${e} flag` : "Selected country"
8
- },
9
- fr: {
10
- lengthTooLong: (e) => e ? `This number looks too long for ${e}.` : "This number looks too long.",
11
- noMatches: "Aucun pays correspondant",
12
- selectCountryLabel: "Select a country",
13
- selectedCountryLabel: (e) => e ? `${e} flag` : "Selected country"
14
- }
15
- };
16
- function t(t, n) {
17
- return {
18
- ...e[(Array.isArray(t) ? t : t ? [t] : []).map((e) => e.split("-")[0]?.toLowerCase()).find((t) => t && e[t]) ?? "en"] ?? e.en,
19
- ...n ?? {}
20
- };
1
+ const r = /^D+$/, s = /^Y+$/, a = ["D", "DD", "YY", "YYYY"];
2
+ function i(e) {
3
+ return r.test(e);
4
+ }
5
+ function f(e) {
6
+ return s.test(e);
7
+ }
8
+ function d(e, o, n) {
9
+ const t = c(e, o, n);
10
+ if (console.warn(t), a.includes(e)) throw new RangeError(t);
21
11
  }
22
- //#endregion
23
- export { t as resolveMessages };
24
-
25
- //# sourceMappingURL=index296.js.map
12
+ function c(e, o, n) {
13
+ const t = e[0] === "Y" ? "years" : "days of the month";
14
+ return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${o}\`) for formatting ${t} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
15
+ }
16
+ export {
17
+ i as isProtectedDayOfYearToken,
18
+ f as isProtectedWeekYearToken,
19
+ d as warnOrThrowProtectedError
20
+ };
21
+ //# sourceMappingURL=index296.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index296.js","names":["PhoneNumberInputMessages","MESSAGE_DICTIONARY","Record","en","lengthTooLong","country","noMatches","selectCountryLabel","selectedCountryLabel","fr","resolveMessages","locale","overrides","Partial","locales","Array","isArray","preferred","map","entry","split","toLowerCase","find","code","base"],"sources":["../src/components/PhoneNumberInput/messages.ts"],"sourcesContent":["import type { PhoneNumberInputMessages } from \"./types\"\n\n\nconst MESSAGE_DICTIONARY: Record<string, PhoneNumberInputMessages> = {\n en: {\n lengthTooLong: (country) =>\n country ? `This number looks too long for ${country}.` : \"This number looks too long.\",\n noMatches: \"No matching countries\",\n selectCountryLabel: \"Select a country\",\n selectedCountryLabel: (country) => (country ? `${country} flag` : \"Selected country\"),\n },\n fr: {\n lengthTooLong: (country) =>\n country\n ? `This number looks too long for ${country}.`\n : \"This number looks too long.\",\n noMatches: \"Aucun pays correspondant\",\n selectCountryLabel: \"Select a country\",\n selectedCountryLabel: (country) => (country ? `${country} flag` : \"Selected country\"),\n },\n}\n\nexport function resolveMessages(\n locale: string | string[] | undefined,\n overrides?: Partial<PhoneNumberInputMessages>\n): PhoneNumberInputMessages {\n const locales = Array.isArray(locale) ? locale : locale ? [locale] : []\n const preferred = locales\n .map((entry) => entry.split(\"-\")[0]?.toLowerCase())\n .find((code) => code && MESSAGE_DICTIONARY[code])\n const base = MESSAGE_DICTIONARY[preferred ?? \"en\"] ?? MESSAGE_DICTIONARY.en\n return {\n ...base,\n ...(overrides ?? {}),\n }\n}\n\n"],"mappings":";AAGA,IAAMC,IAA+D;CACnEE,IAAI;EACFC,gBAAgBC,MACdA,IAAU,kCAAkCA,EAAO,KAAM;EAC3DC,WAAW;EACXC,oBAAoB;EACpBC,uBAAuBH,MAAaA,IAAU,GAAGA,EAAO,SAAU;EACnE;CACDI,IAAI;EACFL,gBAAgBC,MACdA,IACI,kCAAkCA,EAAO,KACzC;EACNC,WAAW;EACXC,oBAAoB;EACpBC,uBAAuBH,MAAaA,IAAU,GAAGA,EAAO,SAAU;EACpE;CACD;AAED,SAAgBK,EACdC,GACAC,GAC0B;AAM1B,QAAO;EACL,GAFWX,GAJGc,MAAMC,QAAQL,EAAO,GAAGA,IAASA,IAAS,CAACA,EAAO,GAAG,EAAE,EAEpEO,KAAKC,MAAUA,EAAMC,MAAM,IAAI,CAAC,IAAIC,aAAa,CAAC,CAClDC,MAAMC,MAASA,KAAQtB,EAAmBsB,GAAM,IACN,SAAStB,EAAmBE;EAGvE,GAAIS,KAAa,EAAE;EACpB"}
1
+ {"version":3,"file":"index296.js","sources":["../../../node_modules/date-fns/_lib/protectedTokens.js"],"sourcesContent":["const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n"],"names":["dayOfYearTokenRE","weekYearTokenRE","throwTokens","isProtectedDayOfYearToken","token","isProtectedWeekYearToken","warnOrThrowProtectedError","format","input","_message","message","subject"],"mappings":"AAAA,MAAMA,IAAmB,QACnBC,IAAkB,QAElBC,IAAc,CAAC,KAAK,MAAM,MAAM,MAAM;AAErC,SAASC,EAA0BC,GAAO;AAC/C,SAAOJ,EAAiB,KAAKI,CAAK;AACpC;AAEO,SAASC,EAAyBD,GAAO;AAC9C,SAAOH,EAAgB,KAAKG,CAAK;AACnC;AAEO,SAASE,EAA0BF,GAAOG,GAAQC,GAAO;AAC9D,QAAMC,IAAWC,EAAQN,GAAOG,GAAQC,CAAK;AAE7C,MADA,QAAQ,KAAKC,CAAQ,GACjBP,EAAY,SAASE,CAAK,EAAG,OAAM,IAAI,WAAWK,CAAQ;AAChE;AAEA,SAASC,EAAQN,GAAOG,GAAQC,GAAO;AACrC,QAAMG,IAAUP,EAAM,CAAC,MAAM,MAAM,UAAU;AAC7C,SAAO,SAASA,EAAM,YAAW,CAAE,mBAAmBA,CAAK,YAAYG,CAAM,sBAAsBI,CAAO,mBAAmBH,CAAK;AACpI;","x_google_ignoreList":[0]}
package/dist/index297.js CHANGED
@@ -1,14 +1,9 @@
1
- import { getCountries as e } from "./index294.js";
2
- //#region src/components/PhoneNumberInput/countries.ts
3
- var t = new Set([
4
- "IM",
5
- "GG",
6
- "JE"
7
- ]), n = e().filter((e) => !t.has(e));
8
- function r() {
9
- return n;
1
+ import { isDate as r } from "./index238.js";
2
+ import { toDate as i } from "./index288.js";
3
+ function e(o) {
4
+ return !(!r(o) && typeof o != "number" || isNaN(+i(o)));
10
5
  }
11
- //#endregion
12
- export { r as getCountryList };
13
-
14
- //# sourceMappingURL=index297.js.map
6
+ export {
7
+ e as isValid
8
+ };
9
+ //# sourceMappingURL=index297.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index297.js","names":["getCountries","CountryCode","EXCLUDED_COUNTRIES","EXCLUDED_SET","Set","FILTERED_COUNTRIES","filter","code","has","getCountryList"],"sources":["../src/components/PhoneNumberInput/countries.ts"],"sourcesContent":["import { getCountries } from \"libphonenumber-js\"\nimport type { CountryCode } from \"libphonenumber-js\"\n\n\nconst EXCLUDED_COUNTRIES: CountryCode[] = [\"IM\", \"GG\", \"JE\"]\nconst EXCLUDED_SET = new Set(EXCLUDED_COUNTRIES)\n\nconst FILTERED_COUNTRIES = getCountries().filter((code) => !EXCLUDED_SET.has(code))\n\nexport function getCountryList(): CountryCode[] {\n return FILTERED_COUNTRIES\n}\n"],"mappings":";;AAKA,IAAMG,IAAe,IAAIC,IADiB;CAAC;CAAM;CAAM;CAAK,CACZ,EAE1CC,IAAqBL,GAAc,CAACM,QAAQC,MAAS,CAACJ,EAAaK,IAAID,EAAK,CAAC;AAEnF,SAAgBE,IAAgC;AAC9C,QAAOJ"}
1
+ {"version":3,"file":"index297.js","sources":["../../../node_modules/date-fns/isValid.js"],"sourcesContent":["import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n"],"names":["isValid","date","isDate","toDate"],"mappings":";;AAkCO,SAASA,EAAQC,GAAM;AAC5B,SAAO,EAAG,CAACC,EAAOD,CAAI,KAAK,OAAOA,KAAS,YAAa,MAAM,CAACE,EAAOF,CAAI,CAAC;AAC7E;","x_google_ignoreList":[0]}
package/dist/index298.js CHANGED
@@ -1,130 +1,11 @@
1
- import { getCountryCallingCode as e } from "./index295.js";
2
- import { getCountryList as t } from "./index297.js";
3
- var n = t(), r = /* @__PURE__ */ new Map(), i = "__default_locale__", a = Array.from(new Set(n.map((t) => e(t)))).sort((e, t) => t.length - e.length), o = a.reduce((e, t) => Math.max(e, t.length), 0), s = [
4
- "0011",
5
- "001",
6
- "011",
7
- "00",
8
- "810"
9
- ];
10
- function c(e) {
11
- return e && n.includes(e) ? e : "US";
12
- }
13
- function l(e) {
14
- if (typeof Intl > "u" || Intl.DisplayNames === void 0) return null;
15
- try {
16
- let t = Array.isArray(e) ? e : e ? [e] : void 0;
17
- return new Intl.DisplayNames(t, { type: "region" });
18
- } catch {
19
- return null;
20
- }
21
- }
22
- function u(t) {
23
- let r = l(t), i = l("en");
24
- return n.map((t) => {
25
- let n = e(t), a = r?.of(t) ?? i?.of(t) ?? t, o = i?.of(t) ?? a, s = S(t), c = Array.from(new Set([
26
- a,
27
- o,
28
- t.toUpperCase(),
29
- t.toLowerCase(),
30
- ...s
31
- ].filter(Boolean)));
32
- return {
33
- value: t,
34
- name: a,
35
- dialCode: n,
36
- label: `${a} (+${n})`,
37
- flag: _(t),
38
- searchableTokens: c,
39
- normalizedSearchableTokens: c.map((e) => b(e))
40
- };
41
- }).sort((e, t) => {
42
- let n = d(e.value), r = d(t.value);
43
- return n === r ? e.name.localeCompare(t.name) : n - r;
44
- });
45
- }
46
- function d(t) {
47
- return t === "US" ? 0 : t === "CA" ? 1 : e(t) === "1" ? 2 : 3;
48
- }
49
- function f(e) {
50
- return e ? Array.isArray(e) ? e.join("\0") : e : i;
51
- }
52
- function p(e) {
53
- if (e !== i) {
54
- if (e.includes("\0")) {
55
- let t = e.split("\0").filter(Boolean);
56
- return t.length === 0 ? void 0 : t.length === 1 ? t[0] ?? void 0 : t;
57
- }
58
- return e;
59
- }
60
- }
61
- function m(e, t) {
62
- let n = r.get(t);
63
- if (n) return n;
64
- let i = u(e);
65
- return r.set(t, i), i;
66
- }
67
- function h(e) {
68
- return {
69
- code: e.value,
70
- name: e.name,
71
- dialCode: e.dialCode,
72
- flag: e.flag
73
- };
74
- }
75
- function g(t) {
76
- return {
77
- code: t,
78
- name: t,
79
- dialCode: e(t),
80
- flag: _(t)
81
- };
82
- }
83
- function _(e) {
84
- let t = e?.toUpperCase();
85
- if (!t || t.length !== 2 || /[^A-Z]/.test(t)) return "";
86
- let n = 127397;
87
- return String.fromCodePoint(t.charCodeAt(0) + n, t.charCodeAt(1) + n);
88
- }
89
- var v = /[\u0300-\u036f]/g;
90
- function y(e) {
91
- return e.normalize("NFD").replace(v, "");
92
- }
93
- function b(e) {
94
- return y(e).toLowerCase();
95
- }
96
- function x(e, t) {
97
- let n = 2 ** 53 - 1;
98
- for (let r of e) {
99
- let e = r.indexOf(t);
100
- e >= 0 && e < n && (n = e);
101
- }
102
- return n === 2 ** 53 - 1 ? 2 ** 53 - 1 : n;
103
- }
104
- function S(e) {
105
- switch (e) {
106
- case "US": return [
107
- "USA",
108
- "United States",
109
- "America",
110
- "United States of America"
111
- ];
112
- case "GB": return [
113
- "UK",
114
- "United Kingdom",
115
- "Great Britain",
116
- "England"
117
- ];
118
- case "AE": return ["UAE", "United Arab Emirates"];
119
- case "KR": return ["South Korea", "Korea"];
120
- case "CN": return ["China", "PRC"];
121
- case "CD": return ["DRC", "Congo-Kinshasa"];
122
- case "CG": return ["Congo-Brazzaville"];
123
- case "BR": return ["Brazil"];
124
- default: return [];
125
- }
126
- }
127
- //#endregion
128
- export { s as COMMON_IDD_PREFIXES, a as COUNTRY_DIAL_CODES, o as MAX_DIAL_CODE_LENGTH, g as buildFallbackSelectedCountry, m as getCachedCountryOptions, f as getLocaleCacheKey, c as getValidCountry, b as normalizeSearchValue, x as optionMatchIndex, p as parseLocaleCacheKey, h as toSelectedCountry };
129
-
130
- //# sourceMappingURL=index298.js.map
1
+ import { differenceInCalendarDays as a } from "./index223.js";
2
+ import { startOfYear as e } from "./index250.js";
3
+ import { toDate as o } from "./index288.js";
4
+ function s(t, f) {
5
+ const r = o(t, f?.in);
6
+ return a(r, e(r)) + 1;
7
+ }
8
+ export {
9
+ s as getDayOfYear
10
+ };
11
+ //# sourceMappingURL=index298.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index298.js","names":["CountryCode","getCountryCallingCode","CountryOption","PhoneNumberSelectedCountry","getCountryList","DEFAULT_COUNTRY","COUNTRY_OPTIONS","COUNTRY_OPTIONS_CACHE","Map","DEFAULT_LOCALE_CACHE_KEY","COUNTRY_DIAL_CODES","Array","from","Set","map","code","sort","a","b","length","MAX_DIAL_CODE_LENGTH","reduce","max","dial","Math","COMMON_IDD_PREFIXES","getValidCountry","input","includes","createDisplayNames","locale","Intl","DisplayNames","locales","isArray","undefined","type","buildCountryOptions","displayNames","englishDisplayNames","country","dialCode","localizedName","of","englishName","aliasTokens","getCountryAliases","searchableTokens","toUpperCase","toLowerCase","filter","Boolean","value","name","label","flag","countryCodeToFlagEmoji","normalizedSearchableTokens","token","normalizeSearchValue","priorityA","getCountryPriority","priorityB","localeCompare","getLocaleCacheKey","join","parseLocaleCacheKey","cacheKey","parts","split","getCachedCountryOptions","cached","get","built","set","toSelectedCountry","option","buildFallbackSelectedCountry","upper","test","base","String","fromCodePoint","charCodeAt","DIACRITICS_REGEX","stripDiacritics","normalize","replace","optionMatchIndex","tokens","query","best","Number","MAX_SAFE_INTEGER","index","indexOf"],"sources":["../src/components/PhoneNumberInput/country-options.ts"],"sourcesContent":["import type { CountryCode } from \"libphonenumber-js\"\nimport { getCountryCallingCode } from \"libphonenumber-js\"\n\nimport type { CountryOption, PhoneNumberSelectedCountry } from \"./types\"\nimport { getCountryList } from \"./countries\"\n\n\nexport const DEFAULT_COUNTRY: CountryCode = \"US\"\nconst COUNTRY_OPTIONS = getCountryList()\n\nconst COUNTRY_OPTIONS_CACHE = new Map<string, CountryOption[]>()\nconst DEFAULT_LOCALE_CACHE_KEY = \"__default_locale__\"\nexport const COUNTRY_DIAL_CODES = Array.from(\n new Set(COUNTRY_OPTIONS.map((code) => getCountryCallingCode(code)))\n).sort((a, b) => b.length - a.length)\nexport const MAX_DIAL_CODE_LENGTH = COUNTRY_DIAL_CODES.reduce(\n (max, dial) => Math.max(max, dial.length),\n 0\n)\nexport const COMMON_IDD_PREFIXES = [\"0011\", \"001\", \"011\", \"00\", \"810\"]\n\nexport function getValidCountry(input: CountryCode | undefined) {\n if (!input) {\n return DEFAULT_COUNTRY\n }\n\n return COUNTRY_OPTIONS.includes(input) ? input : DEFAULT_COUNTRY\n}\n\nfunction createDisplayNames(locale?: string | string[]) {\n if (typeof Intl === \"undefined\" || typeof Intl.DisplayNames === \"undefined\") {\n return null\n }\n\n try {\n const locales = Array.isArray(locale) ? locale : locale ? [locale] : undefined\n return new Intl.DisplayNames(locales, { type: \"region\" })\n } catch {\n return null\n }\n}\n\nfunction buildCountryOptions(locale?: string | string[]) {\n const displayNames = createDisplayNames(locale)\n const englishDisplayNames = createDisplayNames(\"en\")\n\n return COUNTRY_OPTIONS\n .map((country) => {\n const dialCode = getCountryCallingCode(country)\n const localizedName = displayNames?.of(country) ?? englishDisplayNames?.of(country) ?? country\n const englishName = englishDisplayNames?.of(country) ?? localizedName\n const aliasTokens = getCountryAliases(country)\n const searchableTokens = Array.from(\n new Set(\n [localizedName, englishName, country.toUpperCase(), country.toLowerCase(), ...aliasTokens].filter(\n Boolean\n )\n )\n ) as string[]\n return {\n value: country,\n name: localizedName,\n dialCode,\n label: `${localizedName} (+${dialCode})`,\n flag: countryCodeToFlagEmoji(country),\n searchableTokens,\n normalizedSearchableTokens: searchableTokens.map((token) => normalizeSearchValue(token)),\n }\n })\n .sort((a, b) => {\n const priorityA = getCountryPriority(a.value)\n const priorityB = getCountryPriority(b.value)\n if (priorityA !== priorityB) {\n return priorityA - priorityB\n }\n return a.name.localeCompare(b.name)\n })\n}\n\nfunction getCountryPriority(code: CountryCode) {\n if (code === \"US\") return 0\n if (code === \"CA\") return 1\n if (getCountryCallingCode(code) === \"1\") return 2\n return 3\n}\n\nexport function getLocaleCacheKey(locale?: string | string[]) {\n if (!locale) {\n return DEFAULT_LOCALE_CACHE_KEY\n }\n if (Array.isArray(locale)) {\n return locale.join(\"\\u0000\")\n }\n return locale\n}\n\nexport function parseLocaleCacheKey(cacheKey: string): string | string[] | undefined {\n if (cacheKey === DEFAULT_LOCALE_CACHE_KEY) {\n return undefined\n }\n\n if (cacheKey.includes(\"\\u0000\")) {\n const parts = cacheKey.split(\"\\u0000\").filter(Boolean)\n if (parts.length === 0) {\n return undefined\n }\n if (parts.length === 1) {\n return parts[0] ?? undefined\n }\n return parts\n }\n\n return cacheKey\n}\n\nexport function getCachedCountryOptions(locale: string | string[] | undefined, cacheKey: string) {\n const cached = COUNTRY_OPTIONS_CACHE.get(cacheKey)\n if (cached) {\n return cached\n }\n const built = buildCountryOptions(locale)\n COUNTRY_OPTIONS_CACHE.set(cacheKey, built)\n return built\n}\n\nexport function toSelectedCountry(option: CountryOption): PhoneNumberSelectedCountry {\n return {\n code: option.value,\n name: option.name,\n dialCode: option.dialCode,\n flag: option.flag,\n }\n}\n\nexport function buildFallbackSelectedCountry(country: CountryCode): PhoneNumberSelectedCountry {\n return {\n code: country,\n name: country,\n dialCode: getCountryCallingCode(country),\n flag: countryCodeToFlagEmoji(country),\n }\n}\n\nfunction countryCodeToFlagEmoji(country: CountryCode) {\n const upper = country?.toUpperCase()\n\n if (!upper || upper.length !== 2 || /[^A-Z]/.test(upper)) {\n return \"\"\n }\n\n const base = 127397\n return String.fromCodePoint(\n upper.charCodeAt(0) + base,\n upper.charCodeAt(1) + base\n )\n}\n\nconst DIACRITICS_REGEX = /[\\u0300-\\u036f]/g\n\nfunction stripDiacritics(value: string) {\n return value.normalize(\"NFD\").replace(DIACRITICS_REGEX, \"\")\n}\n\nexport function normalizeSearchValue(value: string) {\n return stripDiacritics(value).toLowerCase()\n}\n\nexport function optionMatchIndex(tokens: string[], query: string) {\n let best = Number.MAX_SAFE_INTEGER\n for (const token of tokens) {\n const index = token.indexOf(query)\n if (index >= 0 && index < best) {\n best = index\n }\n }\n return best === Number.MAX_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : best\n}\n\nfunction getCountryAliases(code: CountryCode): string[] {\n switch (code) {\n case \"US\":\n return [\"USA\", \"United States\", \"America\", \"United States of America\"]\n case \"GB\":\n return [\"UK\", \"United Kingdom\", \"Great Britain\", \"England\"]\n case \"AE\":\n return [\"UAE\", \"United Arab Emirates\"]\n case \"KR\":\n return [\"South Korea\", \"Korea\"]\n case \"CN\":\n return [\"China\", \"PRC\"]\n case \"CD\":\n return [\"DRC\", \"Congo-Kinshasa\"]\n case \"CG\":\n return [\"Congo-Brazzaville\"]\n case \"BR\":\n return [\"Brazil\"]\n default:\n return []\n }\n}\n\n"],"mappings":";;AAQA,IAAMM,IAAkBF,GAAgB,EAElCG,oBAAwB,IAAIC,KAA8B,EAC1DC,IAA2B,sBACpBC,IAAqBC,MAAMC,KACtC,IAAIC,IAAIP,EAAgBQ,KAAKC,MAASd,EAAsBc,EAAK,CAAC,CACpE,CAAC,CAACC,MAAMC,GAAGC,MAAMA,EAAEC,SAASF,EAAEE,OAAO,EACxBC,IAAuBV,EAAmBW,QACpDC,GAAKC,MAASC,KAAKF,IAAIA,GAAKC,EAAKJ,OAAO,EACzC,EACD,EACYM,IAAsB;CAAC;CAAQ;CAAO;CAAO;CAAM;CAAM;AAEtE,SAAgBC,EAAgBC,GAAgC;AAK9D,QAJKA,KAIErB,EAAgBsB,SAASD,EAAM,GAAGA,IAAAA;;AAG3C,SAASE,EAAmBC,GAA4B;AACtD,KAAI,OAAOC,OAAS,OAAsBA,KAAKC,iBAAiB,OAC9D,QAAO;AAGT,KAAI;EACF,IAAMC,IAAUtB,MAAMuB,QAAQJ,EAAO,GAAGA,IAASA,IAAS,CAACA,EAAO,GAAGK,KAAAA;AACrE,SAAO,IAAIJ,KAAKC,aAAaC,GAAS,EAAEG,MAAM,UAAU,CAAC;SACnD;AACN,SAAO;;;AAIX,SAASC,EAAoBP,GAA4B;CACvD,IAAMQ,IAAeT,EAAmBC,EAAO,EACzCS,IAAsBV,EAAmB,KAAK;AAEpD,QAAOvB,EACJQ,KAAK0B,MAAY;EAChB,IAAMC,IAAWxC,EAAsBuC,EAAQ,EACzCE,IAAgBJ,GAAcK,GAAGH,EAAQ,IAAID,GAAqBI,G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,CAAC,OAAO,uBAAuB;EACxC,KAAK,KACH,QAAO,CAAC,eAAe,QAAQ;EACjC,KAAK,KACH,QAAO,CAAC,SAAS,MAAM;EACzB,KAAK,KACH,QAAO,CAAC,OAAO,iBAAiB;EAClC,KAAK,KACH,QAAO,CAAC,oBAAoB;EAC9B,KAAK,KACH,QAAO,CAAC,SAAS;EACnB,QACE,QAAO,EAAE"}
1
+ {"version":3,"file":"index298.js","sources":["../../../node_modules/date-fns/getDayOfYear.js"],"sourcesContent":["import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n"],"names":["getDayOfYear","date","options","_date","toDate","differenceInCalendarDays","startOfYear"],"mappings":";;;AA0BO,SAASA,EAAaC,GAAMC,GAAS;AAC1C,QAAMC,IAAQC,EAAOH,GAAMC,GAAS,EAAE;AAGtC,SAFaG,EAAyBF,GAAOG,EAAYH,CAAK,CAAC,IACtC;AAE3B;","x_google_ignoreList":[0]}
package/dist/index299.js CHANGED
@@ -1,168 +1,10 @@
1
- import { validatePhoneNumberLength as e } from "./index292.js";
2
- import { AsYouType as t } from "./index293.js";
3
- import { getCountryCallingCode as n } from "./index295.js";
4
- import { COMMON_IDD_PREFIXES as r, COUNTRY_DIAL_CODES as i, MAX_DIAL_CODE_LENGTH as a } from "./index298.js";
5
- //#region src/components/PhoneNumberInput/normalization.ts
6
- function o(e) {
7
- return e.replace(/\D/g, "");
8
- }
9
- function s(e) {
10
- return e ? e.length > a ? !1 : i.some((t) => t.startsWith(e)) : !0;
11
- }
12
- var c = /[\u061C\u200B-\u200F\u202A-\u202E\u2066-\u2069\uFEFF]/g;
13
- function l(e) {
14
- return e.replace(c, "");
15
- }
16
- function u(e, t, n = {}) {
17
- let { force: r = !1 } = n, i = `+${t}`;
18
- if (!e.startsWith(i) || !r) return e;
19
- let a = e.slice(i.length).trimStart();
20
- if (a.startsWith("0")) return e;
21
- if (!a) return `${i} 0`;
22
- let [o, ...s] = a.split(" ");
23
- return `${i} ${`0${o ?? ""}`}${s.length > 0 ? ` ${s.join(" ")}` : ""}`.replace(/\s\s+/g, " ").trimEnd();
24
- }
25
- var d = {
26
- GG: "GB",
27
- JE: "GB",
28
- IM: "GB"
1
+ import { constructFrom as a } from "./index287.js";
2
+ import { toDate as c } from "./index288.js";
3
+ function l(e, n) {
4
+ const t = c(e, n?.in), r = t.getFullYear(), s = t.getMonth(), o = a(t, 0);
5
+ return o.setFullYear(r, s + 1, 0), o.setHours(0, 0, 0, 0), o.getDate();
6
+ }
7
+ export {
8
+ l as getDaysInMonth
29
9
  };
30
- function f(e) {
31
- if (e) return d[e] ?? e;
32
- }
33
- function p(e, t, n) {
34
- if (!e || !n || (e.nationalNumber ?? "").length < 4) return;
35
- let r = e.countryCallingCode;
36
- if (!r) return;
37
- let i = e.getMetadata, a = (typeof i == "function" ? i() : null)?.country_calling_codes?.[r];
38
- if (!a || a.length === 0) return;
39
- let o = [];
40
- for (let e of a) {
41
- let t = f(e);
42
- t && !o.includes(t) && o.push(t);
43
- }
44
- if (o.length !== 0) return t && o.includes(t) ? t : o.includes("US") ? "US" : o[0];
45
- }
46
- function m(e, t, n, r) {
47
- return e ? r ? !n || !e.startsWith(n) || !e.slice(n.length).startsWith("0") ? !1 : e.slice(n.length + 1) === (t.startsWith(n) ? t.slice(n.length) : t) : e.startsWith("0") : !1;
48
- }
49
- function h(e) {
50
- for (let t of r) if (e.startsWith(t)) return e.slice(t.length);
51
- return e;
52
- }
53
- function g(e, t, r = {}) {
54
- let { allowJustPlus: i = !1, removeNationalPrefix: s = !0, previousValue: c } = r, u = l(e).trim();
55
- if (!u) return "";
56
- if (u === "+") return i ? "+" : "";
57
- if (u.startsWith("+")) {
58
- let e = o(u);
59
- if (!e) return i ? "+" : "";
60
- let r = h(e);
61
- if (r !== e) return r ? `+${r}` : i ? "+" : "";
62
- if (s && t) {
63
- let r = n(t);
64
- if (e.startsWith(r) && e.slice(r.length).startsWith("0")) {
65
- let t = e.slice(r.length + 1);
66
- return t ? `+${r}${t}` : `+${r}`;
67
- }
68
- }
69
- return `+${e}`;
70
- }
71
- let d = o(u);
72
- if (!d) return "";
73
- let f = h(d);
74
- if (f !== d) return f ? `+${f}` : i ? "+" : "";
75
- let p = typeof c == "string" ? c : "", m = p && p.startsWith("+") ? o(p) : "";
76
- if (m && m.length > d.length && m.endsWith(d) && m.length - d.length <= a) return `+${d}`;
77
- if (d === "0") return "0";
78
- if (s && t && d.length > 1 && d.startsWith("0") && !d.startsWith("00")) {
79
- let e = n(t), r = d.slice(1);
80
- return r ? `+${e}${r}` : `+${e}`;
81
- }
82
- return t ? d.length <= 4 ? `+${d}` : `+${n(t)}${d}` : d;
83
- }
84
- function _(e, n) {
85
- if (e === "+") return {
86
- international: "+",
87
- national: "",
88
- formatted: "+",
89
- phoneNumber: null,
90
- detectedCountry: void 0,
91
- inferredCountry: void 0,
92
- hasExplicitInternationalPrefix: !0
93
- };
94
- let r = /^\s*\+/.test(e), i = n ? new t(n) : new t(), a = i.input(e), s = i.getNumber(), c = o(e), l = f(s?.country ?? i.country ?? void 0), u = l ?? !s ? void 0 : f(p(s, n, c)), d = s?.formatInternational() ?? a;
95
- return {
96
- international: d,
97
- national: s?.formatNational() ?? o(d),
98
- formatted: a,
99
- phoneNumber: s,
100
- detectedCountry: l,
101
- inferredCountry: u,
102
- hasExplicitInternationalPrefix: r
103
- };
104
- }
105
- function v(e, t) {
106
- return e.startsWith(t) ? e.slice(t.length) : e;
107
- }
108
- function y(t, n) {
109
- if (!n || !t) return null;
110
- try {
111
- return e(t, n) === "TOO_LONG" ? "TOO_LONG" : null;
112
- } catch {
113
- return null;
114
- }
115
- }
116
- function b(e, t, r, i = {}) {
117
- let { hasRemovedNationalPrefix: a = !1, detectedCountry: c, hasExplicitInternationalPrefix: l = !1 } = i;
118
- if (!e) return {
119
- shouldSuggest: !1,
120
- query: ""
121
- };
122
- if (e === "+") return {
123
- shouldSuggest: !0,
124
- query: ""
125
- };
126
- let u = o(e);
127
- if (!u) return {
128
- shouldSuggest: !0,
129
- query: ""
130
- };
131
- if (a) return {
132
- shouldSuggest: !1,
133
- query: ""
134
- };
135
- if (l && !c) return s(u) ? {
136
- shouldSuggest: !0,
137
- query: u
138
- } : {
139
- shouldSuggest: !1,
140
- query: ""
141
- };
142
- let d = r?.countryCallingCode ?? null;
143
- if (!d) {
144
- if (t) {
145
- let e = n(t);
146
- u.startsWith(e) && (d = e);
147
- } else if (!l) return {
148
- shouldSuggest: !1,
149
- query: ""
150
- };
151
- }
152
- return !d || v(u, d).length === 0 ? {
153
- shouldSuggest: !0,
154
- query: u
155
- } : {
156
- shouldSuggest: !1,
157
- query: ""
158
- };
159
- }
160
- function x(e, t) {
161
- if (e.shouldSuggest) return !1;
162
- let { hasExplicitInternationalPrefix: n = !1, detectedCountry: r } = t;
163
- return n ? !!r : !0;
164
- }
165
- //#endregion
166
- export { m as detectNationalPrefixForDisplay, _ as formatWithAsYouType, y as getLengthIssue, b as getSuggestionState, u as injectNationalPrefixDisplay, g as normalizeInputValue, o as sanitizeDigits, x as shouldDisplayExplicitCountrySelection, v as stripPrefix };
167
-
168
- //# sourceMappingURL=index299.js.map
10
+ //# sourceMappingURL=index299.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index299.js","names":["CountryCode","AsYouType","getCountryCallingCode","validatePhoneNumberLength","COMMON_IDD_PREFIXES","COUNTRY_DIAL_CODES","DEFAULT_COUNTRY","MAX_DIAL_CODE_LENGTH","LengthIssue","sanitizeDigits","value","replace","isDialCodeProgress","digits","length","some","dial","startsWith","INVISIBLE_FORMATTING_CHARACTERS","stripInvisibleFormatting","injectNationalPrefixDisplay","international","dialCode","options","force","prefix","remainder","slice","trimStart","alreadyHasTrunk","firstGroup","restGroups","split","rebuiltFirstGroup","rebuiltRemainder","join","trimEnd","DETECTED_COUNTRY_OVERRIDES","Partial","Record","GG","JE","IM","canonicalizeDetectedCountry","candidate","undefined","AsYouTypeNumber","ReturnType","inferCountryFromDialCode","phoneNumber","baseCountry","normalizedDigits","nationalDigits","nationalNumber","countryCallingCode","metadataGetter","getMetadata","metadata","country_calling_codes","candidates","canonicalCandidates","canonical","includes","push","detectNationalPrefixForDisplay","rawDigits","internationalDigits","hasExplicitInternationalPrefix","rawAfterTrunk","internationalAfterDial","stripIddPrefix","normalizeInputValue","rawValue","country","allowJustPlus","removeNationalPrefix","previousValue","cleaned","trimmed","trim","digitsWithoutIdd","withoutPrefix","digitsOnly","previousNormalized","previousDigits","endsWith","removedPrefixLength","formatWithAsYouType","national","formatted","detectedCountry","inferredCountry","test","formatter","input","getNumber","formatInternational","formatNational","stripPrefix","getLengthIssue","result","SuggestionState","shouldSuggest","query","getSuggestionState","normalized","hasRemovedNationalPrefix","baseDial","shouldDisplayExplicitCountrySelection","suggestion","Boolean"],"sources":["../src/components/PhoneNumberInput/normalization.ts"],"sourcesContent":["import type { CountryCode } from \"libphonenumber-js\"\nimport { AsYouType, getCountryCallingCode, validatePhoneNumberLength } from \"libphonenumber-js\"\n\nimport {\n COMMON_IDD_PREFIXES,\n COUNTRY_DIAL_CODES,\n DEFAULT_COUNTRY,\n MAX_DIAL_CODE_LENGTH,\n} from \"./country-options\"\n\n\nexport type LengthIssue = \"TOO_LONG\"\n\nexport function sanitizeDigits(value: string) {\n return value.replace(/\\D/g, \"\")\n}\n\nfunction isDialCodeProgress(digits: string) {\n if (!digits) {\n return true\n }\n\n if (digits.length > MAX_DIAL_CODE_LENGTH) {\n return false\n }\n\n return COUNTRY_DIAL_CODES.some((dial) => dial.startsWith(digits))\n}\n\nconst INVISIBLE_FORMATTING_CHARACTERS =\n /[\\u061C\\u200B-\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]/g\n\nfunction stripInvisibleFormatting(value: string) {\n return value.replace(INVISIBLE_FORMATTING_CHARACTERS, \"\")\n}\n\nexport function injectNationalPrefixDisplay(\n international: string,\n dialCode: string,\n options: { force?: boolean } = {}\n) {\n // Preserve a user-typed national trunk (e.g. the French \"0\") purely for display\n // so validation can continue to use the canonical E.164 representation internally.\n const { force = false } = options\n const prefix = `+${dialCode}`\n\n if (!international.startsWith(prefix)) {\n return international\n }\n\n if (!force) {\n return international\n }\n\n const remainder = international.slice(prefix.length).trimStart()\n const alreadyHasTrunk = remainder.startsWith(\"0\")\n\n if (alreadyHasTrunk) {\n return international\n }\n\n if (!remainder) {\n return `${prefix} 0`\n }\n\n const [firstGroup, ...restGroups] = remainder.split(\" \")\n const rebuiltFirstGroup = `0${firstGroup ?? \"\"}`\n const rebuiltRemainder = restGroups.length > 0 ? ` ${restGroups.join(\" \")}` : \"\"\n\n return `${prefix} ${rebuiltFirstGroup}${rebuiltRemainder}`.replace(/\\s\\s+/g, \" \").trimEnd()\n}\n\nconst DETECTED_COUNTRY_OVERRIDES: Partial<Record<CountryCode, CountryCode>> = {\n GG: \"GB\",\n JE: \"GB\",\n IM: \"GB\",\n}\n\nfunction canonicalizeDetectedCountry(candidate: CountryCode | undefined): CountryCode | undefined {\n if (!candidate) {\n return undefined\n }\n return DETECTED_COUNTRY_OVERRIDES[candidate] ?? candidate\n}\n\ntype AsYouTypeNumber = ReturnType<AsYouType[\"getNumber\"]>\n\nfunction inferCountryFromDialCode(\n phoneNumber: AsYouTypeNumber,\n baseCountry: CountryCode | undefined,\n normalizedDigits: string\n): CountryCode | undefined {\n if (!phoneNumber) {\n return undefined\n }\n\n if (!normalizedDigits) {\n return undefined\n }\n\n const nationalDigits = phoneNumber.nationalNumber ?? \"\"\n if (nationalDigits.length < 4) {\n return undefined\n }\n\n const dial = phoneNumber.countryCallingCode\n if (!dial) {\n return undefined\n }\n\n const metadataGetter = (phoneNumber as unknown as { getMetadata?: () => unknown }).getMetadata\n const metadata =\n typeof metadataGetter === \"function\"\n ? (metadataGetter() as {\n country_calling_codes?: Record<string, string[]>\n } | null)\n : null\n\n const candidates = metadata?.country_calling_codes?.[dial]\n if (!candidates || candidates.length === 0) {\n return undefined\n }\n\n const canonicalCandidates: CountryCode[] = []\n for (const candidate of candidates) {\n const canonical = canonicalizeDetectedCountry(candidate as CountryCode)\n if (canonical && !canonicalCandidates.includes(canonical)) {\n canonicalCandidates.push(canonical)\n }\n }\n\n if (canonicalCandidates.length === 0) {\n return undefined\n }\n\n if (baseCountry && canonicalCandidates.includes(baseCountry)) {\n return baseCountry\n }\n\n if (canonicalCandidates.includes(DEFAULT_COUNTRY)) {\n return DEFAULT_COUNTRY\n }\n\n return canonicalCandidates[0]\n}\n\nexport function detectNationalPrefixForDisplay(\n rawDigits: string,\n internationalDigits: string,\n dialCode: string,\n hasExplicitInternationalPrefix: boolean\n) {\n if (!rawDigits) {\n return false\n }\n\n if (!hasExplicitInternationalPrefix) {\n return rawDigits.startsWith(\"0\")\n }\n\n if (!dialCode) {\n return false\n }\n\n if (!rawDigits.startsWith(dialCode)) {\n return false\n }\n\n if (!rawDigits.slice(dialCode.length).startsWith(\"0\")) {\n return false\n }\n\n const rawAfterTrunk = rawDigits.slice(dialCode.length + 1)\n const internationalAfterDial = internationalDigits.startsWith(dialCode)\n ? internationalDigits.slice(dialCode.length)\n : internationalDigits\n\n return rawAfterTrunk === internationalAfterDial\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\nexport function normalizeInputValue(\n rawValue: string,\n country: CountryCode | undefined,\n options: {\n allowJustPlus?: boolean\n removeNationalPrefix?: boolean\n previousValue?: string\n } = {}\n) {\n const { allowJustPlus = false, removeNationalPrefix = true, previousValue } = options\n const cleaned = stripInvisibleFormatting(rawValue)\n const trimmed = cleaned.trim()\n\n if (!trimmed) {\n return \"\"\n }\n\n if (trimmed === \"+\") {\n return allowJustPlus ? \"+\" : \"\"\n }\n\n if (trimmed.startsWith(\"+\")) {\n const digits = sanitizeDigits(trimmed)\n if (!digits) {\n return allowJustPlus ? \"+\" : \"\"\n }\n const digitsWithoutIdd = stripIddPrefix(digits)\n if (digitsWithoutIdd !== digits) {\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : allowJustPlus ? \"+\" : \"\"\n }\n if (removeNationalPrefix && country) {\n const dial = getCountryCallingCode(country)\n if (digits.startsWith(dial) && digits.slice(dial.length).startsWith(\"0\")) {\n const withoutPrefix = digits.slice(dial.length + 1)\n return withoutPrefix ? `+${dial}${withoutPrefix}` : `+${dial}`\n }\n }\n return `+${digits}`\n }\n\n const digitsOnly = sanitizeDigits(trimmed)\n if (!digitsOnly) {\n return \"\"\n }\n\n const digitsWithoutIdd = stripIddPrefix(digitsOnly)\n if (digitsWithoutIdd !== digitsOnly) {\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : allowJustPlus ? \"+\" : \"\"\n }\n\n const previousNormalized = typeof previousValue === \"string\" ? previousValue : \"\"\n const previousDigits =\n previousNormalized && previousNormalized.startsWith(\"+\")\n ? sanitizeDigits(previousNormalized)\n : \"\"\n\n if (previousDigits && previousDigits.length > digitsOnly.length) {\n if (previousDigits.endsWith(digitsOnly)) {\n const removedPrefixLength = previousDigits.length - digitsOnly.length\n if (removedPrefixLength <= MAX_DIAL_CODE_LENGTH) {\n return `+${digitsOnly}`\n }\n }\n }\n\n if (digitsOnly === \"0\") {\n return \"0\"\n }\n\n if (\n removeNationalPrefix &&\n country &&\n digitsOnly.length > 1 &&\n digitsOnly.startsWith(\"0\") &&\n !digitsOnly.startsWith(\"00\")\n ) {\n const dial = getCountryCallingCode(country)\n const withoutPrefix = digitsOnly.slice(1)\n return withoutPrefix ? `+${dial}${withoutPrefix}` : `+${dial}`\n }\n\n if (!country) {\n return digitsOnly\n }\n\n if (digitsOnly.length <= 4) {\n return `+${digitsOnly}`\n }\n\n const dial = getCountryCallingCode(country)\n return `+${dial}${digitsOnly}`\n}\n\nexport function formatWithAsYouType(value: string, baseCountry?: CountryCode) {\n if (value === \"+\") {\n return {\n international: \"+\",\n national: \"\",\n formatted: \"+\",\n phoneNumber: null,\n detectedCountry: undefined,\n inferredCountry: undefined,\n hasExplicitInternationalPrefix: true,\n }\n }\n\n const hasExplicitInternationalPrefix = /^\\s*\\+/.test(value)\n const formatter = baseCountry ? new AsYouType(baseCountry) : new AsYouType()\n const formatted = formatter.input(value)\n const phoneNumber = formatter.getNumber()\n const digits = sanitizeDigits(value)\n const detectedCountry = canonicalizeDetectedCountry(\n (phoneNumber?.country ?? formatter.country ?? undefined) as CountryCode | undefined\n )\n const inferredCountry =\n detectedCountry ?? !phoneNumber\n ? undefined\n : canonicalizeDetectedCountry(\n inferCountryFromDialCode(phoneNumber, baseCountry, digits)\n )\n\n const international = phoneNumber?.formatInternational() ?? formatted\n const national = phoneNumber?.formatNational() ?? sanitizeDigits(international)\n\n return {\n international,\n national,\n formatted,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n }\n}\n\nexport function stripPrefix(value: string, prefix: string) {\n return value.startsWith(prefix) ? value.slice(prefix.length) : value\n}\n\nexport function getLengthIssue(value: string, country: CountryCode | undefined): LengthIssue | null {\n if (!country || !value) {\n return null\n }\n\n try {\n const result = validatePhoneNumberLength(value, country)\n return result === \"TOO_LONG\" ? \"TOO_LONG\" : null\n } catch {\n return null\n }\n}\n\ntype SuggestionState = {\n shouldSuggest: boolean\n query: string\n}\n\nexport function getSuggestionState(\n normalized: string,\n baseCountry: CountryCode | undefined,\n phoneNumber: ReturnType<AsYouType[\"getNumber\"]>,\n options: {\n hasRemovedNationalPrefix?: boolean\n detectedCountry?: CountryCode\n hasExplicitInternationalPrefix?: boolean\n } = {}\n): SuggestionState {\n const {\n hasRemovedNationalPrefix = false,\n detectedCountry,\n hasExplicitInternationalPrefix = false,\n } = options\n\n if (!normalized) {\n return { shouldSuggest: false, query: \"\" }\n }\n\n if (normalized === \"+\") {\n return { shouldSuggest: true, query: \"\" }\n }\n\n const digits = sanitizeDigits(normalized)\n if (!digits) {\n return { shouldSuggest: true, query: \"\" }\n }\n\n if (hasRemovedNationalPrefix) {\n return { shouldSuggest: false, query: \"\" }\n }\n\n if (hasExplicitInternationalPrefix && !detectedCountry) {\n if (!isDialCodeProgress(digits)) {\n return { shouldSuggest: false, query: \"\" }\n }\n return { shouldSuggest: true, query: digits }\n }\n\n let dial = phoneNumber?.countryCallingCode ?? null\n if (!dial) {\n if (baseCountry) {\n const baseDial = getCountryCallingCode(baseCountry)\n if (digits.startsWith(baseDial)) {\n dial = baseDial\n }\n } else if (!hasExplicitInternationalPrefix) {\n return { shouldSuggest: false, query: \"\" }\n }\n }\n\n if (!dial) {\n return { shouldSuggest: true, query: digits }\n }\n\n const nationalDigits = stripPrefix(digits, dial)\n if (nationalDigits.length === 0) {\n return { shouldSuggest: true, query: digits }\n }\n\n return { shouldSuggest: false, query: \"\" }\n}\n\nexport function shouldDisplayExplicitCountrySelection(\n suggestion: SuggestionState,\n options: { detectedCountry?: CountryCode; hasExplicitInternationalPrefix?: boolean }\n) {\n if (suggestion.shouldSuggest) {\n return false\n }\n\n const { hasExplicitInternationalPrefix = false, detectedCountry } = options\n\n if (!hasExplicitInternationalPrefix) {\n return true\n }\n\n return Boolean(detectedCountry)\n}\n"],"mappings":";;;;;AAaA,SAAgBS,EAAeC,GAAe;AAC5C,QAAOA,EAAMC,QAAQ,OAAO,GAAG;;AAGjC,SAASC,EAAmBC,GAAgB;AAS1C,QARKA,IAIDA,EAAOC,SAASP,IAC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AACuB,EAIrC,QAHK9E,EAAmBC,EAAO,GAGxB;EAAEyF,eAAe;EAAMC,OAAO1F;EAAQ,GAFpC;EAAEyF,eAAe;EAAOC,OAAO;EAAI;CAK9C,IAAIvF,IAAOiC,GAAaK,sBAAsB;AAC9C,KAAI,CAACtC;MACCkC,GAAa;GACf,IAAMyD,IAAWzG,EAAsBgD,EAAY;AACnD,GAAIrC,EAAOI,WAAW0F,EAAS,KAC7B3F,IAAO2F;aAEA,CAACxC,EACV,QAAO;GAAEmC,eAAe;GAAOC,OAAO;GAAI;;AAa9C,QATI,CAACvF,KAIkBkF,EAAYrF,GAAQG,EAAK,CAC7BF,WAAW,IACrB;EAAEwF,eAAe;EAAMC,OAAO1F;EAAQ,GAGxC;EAAEyF,eAAe;EAAOC,OAAO;EAAI;;AAG5C,SAAgBK,EACdC,GACAtF,GACA;AACA,KAAIsF,EAAWP,cACb,QAAO;CAGT,IAAM,EAAEnC,oCAAiC,IAAOuB,uBAAoBnE;AAMpE,QAJK4C,IAIE2C,EAAQpB,IAHN"}
1
+ {"version":3,"file":"index299.js","sources":["../../../node_modules/date-fns/getDaysInMonth.js"],"sourcesContent":["import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const monthIndex = _date.getMonth();\n const lastDayOfMonth = constructFrom(_date, 0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n"],"names":["getDaysInMonth","date","options","_date","toDate","year","monthIndex","lastDayOfMonth","constructFrom"],"mappings":";;AAyBO,SAASA,EAAeC,GAAMC,GAAS;AAC5C,QAAMC,IAAQC,EAAOH,GAAMC,GAAS,EAAE,GAChCG,IAAOF,EAAM,YAAW,GACxBG,IAAaH,EAAM,SAAQ,GAC3BI,IAAiBC,EAAcL,GAAO,CAAC;AAC7C,SAAAI,EAAe,YAAYF,GAAMC,IAAa,GAAG,CAAC,GAClDC,EAAe,SAAS,GAAG,GAAG,GAAG,CAAC,GAC3BA,EAAe,QAAO;AAC/B;","x_google_ignoreList":[0]}