@rpcbase/ui 0.238.0 → 0.239.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 (299) hide show
  1. package/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -1
  2. package/dist/helpers/useMapsLibrary.d.ts.map +1 -1
  3. package/dist/index121.js +10 -10
  4. package/dist/index123.js +2 -2
  5. package/dist/index124.js +3 -3
  6. package/dist/index151.js +4 -4
  7. package/dist/index156.js +1 -1
  8. package/dist/index157.js +1 -1
  9. package/dist/index164.js +1 -1
  10. package/dist/index165.js +6 -6
  11. package/dist/index167.js +1 -1
  12. package/dist/index169.js +1 -1
  13. package/dist/index172.js +3 -3
  14. package/dist/index175.js +1 -1
  15. package/dist/index176.js +4 -4
  16. package/dist/index182.js +1 -1
  17. package/dist/index184.js +12 -12
  18. package/dist/index185.js +1 -1
  19. package/dist/index187.js +5 -5
  20. package/dist/index189.js +6 -6
  21. package/dist/index190.js +5 -5
  22. package/dist/index193.js +3 -3
  23. package/dist/index194.js +5 -5
  24. package/dist/index22.js.map +1 -1
  25. package/dist/index237.js +14 -27
  26. package/dist/index237.js.map +1 -1
  27. package/dist/index238.js +7 -12
  28. package/dist/index238.js.map +1 -1
  29. package/dist/index239.js +9 -24
  30. package/dist/index239.js.map +1 -1
  31. package/dist/index240.js +10 -5
  32. package/dist/index240.js.map +1 -1
  33. package/dist/index241.js +20 -15
  34. package/dist/index241.js.map +1 -1
  35. package/dist/index242.js +10 -7
  36. package/dist/index242.js.map +1 -1
  37. package/dist/index243.js +9 -10
  38. package/dist/index243.js.map +1 -1
  39. package/dist/index244.js +9 -10
  40. package/dist/index244.js.map +1 -1
  41. package/dist/index245.js +4 -21
  42. package/dist/index245.js.map +1 -1
  43. package/dist/index246.js +5 -10
  44. package/dist/index246.js.map +1 -1
  45. package/dist/index247.js +16 -9
  46. package/dist/index247.js.map +1 -1
  47. package/dist/index248.js +8 -8
  48. package/dist/index248.js.map +1 -1
  49. package/dist/index249.js +18 -4
  50. package/dist/index249.js.map +1 -1
  51. package/dist/index250.js +15 -5
  52. package/dist/index250.js.map +1 -1
  53. package/dist/index251.js +12 -16
  54. package/dist/index251.js.map +1 -1
  55. package/dist/index252.js +29 -9
  56. package/dist/index252.js.map +1 -1
  57. package/dist/index253.js +12 -18
  58. package/dist/index253.js.map +1 -1
  59. package/dist/index254.js +25 -15
  60. package/dist/index254.js.map +1 -1
  61. package/dist/index255.js +5 -12
  62. package/dist/index255.js.map +1 -1
  63. package/dist/index256.js +14 -20
  64. package/dist/index256.js.map +1 -1
  65. package/dist/index257.js +146 -58
  66. package/dist/index257.js.map +1 -1
  67. package/dist/index258.js +30 -6
  68. package/dist/index258.js.map +1 -1
  69. package/dist/index259.js +9 -11
  70. package/dist/index259.js.map +1 -1
  71. package/dist/index260.js +44 -46
  72. package/dist/index260.js.map +1 -1
  73. package/dist/index261.js +12 -4
  74. package/dist/index261.js.map +1 -1
  75. package/dist/index262.js +43 -28
  76. package/dist/index262.js.map +1 -1
  77. package/dist/index263.js +93 -14
  78. package/dist/index263.js.map +1 -1
  79. package/dist/index264.js +86 -5
  80. package/dist/index264.js.map +1 -1
  81. package/dist/index265.js +105 -21
  82. package/dist/index265.js.map +1 -1
  83. package/dist/index266.js +51 -50
  84. package/dist/index266.js.map +1 -1
  85. package/dist/index267.js +11 -25
  86. package/dist/index267.js.map +1 -1
  87. package/dist/index268.js +37 -41
  88. package/dist/index268.js.map +1 -1
  89. package/dist/index269.js +8 -39
  90. package/dist/index269.js.map +1 -1
  91. package/dist/index270.js +117 -45
  92. package/dist/index270.js.map +1 -1
  93. package/dist/index271.js +17 -20
  94. package/dist/index271.js.map +1 -1
  95. package/dist/index272.js +14 -69
  96. package/dist/index272.js.map +1 -1
  97. package/dist/index273.js +3 -17
  98. package/dist/index273.js.map +1 -1
  99. package/dist/index274.js +36 -11
  100. package/dist/index274.js.map +1 -1
  101. package/dist/index275.js +20 -27
  102. package/dist/index275.js.map +1 -1
  103. package/dist/index276.js +9 -13
  104. package/dist/index276.js.map +1 -1
  105. package/dist/index277.js +8 -18
  106. package/dist/index277.js.map +1 -1
  107. package/dist/index278.js +20 -37
  108. package/dist/index278.js.map +1 -1
  109. package/dist/index279.js +59 -255
  110. package/dist/index279.js.map +1 -1
  111. package/dist/index280.js +6 -278
  112. package/dist/index280.js.map +1 -1
  113. package/dist/index281.js +10 -67
  114. package/dist/index281.js.map +1 -1
  115. package/dist/index282.js +47 -96
  116. package/dist/index282.js.map +1 -1
  117. package/dist/index283.js +4 -84
  118. package/dist/index283.js.map +1 -1
  119. package/dist/index284.js +29 -3
  120. package/dist/index284.js.map +1 -1
  121. package/dist/index285.js +15 -28
  122. package/dist/index285.js.map +1 -1
  123. package/dist/index286.js +5 -16
  124. package/dist/index286.js.map +1 -1
  125. package/dist/index287.js +22 -35
  126. package/dist/index287.js.map +1 -1
  127. package/dist/index288.js +51 -16
  128. package/dist/index288.js.map +1 -1
  129. package/dist/index289.js +25 -3
  130. package/dist/index289.js.map +1 -1
  131. package/dist/index290.js +41 -26
  132. package/dist/index290.js.map +1 -1
  133. package/dist/index291.js +38 -27
  134. package/dist/index291.js.map +1 -1
  135. package/dist/index292.js +45 -4
  136. package/dist/index292.js.map +1 -1
  137. package/dist/index293.js +20 -78
  138. package/dist/index293.js.map +1 -1
  139. package/dist/index294.js +65 -264
  140. package/dist/index294.js.map +1 -1
  141. package/dist/index295.js +17 -11
  142. package/dist/index295.js.map +1 -1
  143. package/dist/index296.js +11 -10
  144. package/dist/index296.js.map +1 -1
  145. package/dist/index297.js +26 -24
  146. package/dist/index297.js.map +1 -1
  147. package/dist/index298.js +13 -16
  148. package/dist/index298.js.map +1 -1
  149. package/dist/index299.js +15 -122
  150. package/dist/index299.js.map +1 -1
  151. package/dist/index3.js.map +1 -1
  152. package/dist/index300.js +36 -5
  153. package/dist/index300.js.map +1 -1
  154. package/dist/index301.js +260 -38
  155. package/dist/index301.js.map +1 -1
  156. package/dist/index302.js +275 -62
  157. package/dist/index302.js.map +1 -1
  158. package/dist/index303.js +68 -13
  159. package/dist/index303.js.map +1 -1
  160. package/dist/index304.js +99 -7
  161. package/dist/index304.js.map +1 -1
  162. package/dist/index305.js +83 -5
  163. package/dist/index305.js.map +1 -1
  164. package/dist/index306.js +3 -3
  165. package/dist/index306.js.map +1 -1
  166. package/dist/index307.js +29 -10
  167. package/dist/index307.js.map +1 -1
  168. package/dist/index308.js +15 -6
  169. package/dist/index308.js.map +1 -1
  170. package/dist/index309.js +34 -133
  171. package/dist/index309.js.map +1 -1
  172. package/dist/index310.js +15 -398
  173. package/dist/index310.js.map +1 -1
  174. package/dist/index311.js +3 -52
  175. package/dist/index311.js.map +1 -1
  176. package/dist/index312.js +26 -11
  177. package/dist/index312.js.map +1 -1
  178. package/dist/index313.js +27 -10
  179. package/dist/index313.js.map +1 -1
  180. package/dist/index314.js +4 -14
  181. package/dist/index314.js.map +1 -1
  182. package/dist/index315.js +75 -151
  183. package/dist/index315.js.map +1 -1
  184. package/dist/index316.js +267 -28
  185. package/dist/index316.js.map +1 -1
  186. package/dist/index317.js +11 -9
  187. package/dist/index317.js.map +1 -1
  188. package/dist/index318.js +11 -49
  189. package/dist/index318.js.map +1 -1
  190. package/dist/index319.js +25 -11
  191. package/dist/index319.js.map +1 -1
  192. package/dist/index320.js +15 -43
  193. package/dist/index320.js.map +1 -1
  194. package/dist/index321.js +119 -89
  195. package/dist/index321.js.map +1 -1
  196. package/dist/index322.js +5 -86
  197. package/dist/index322.js.map +1 -1
  198. package/dist/index323.js +39 -104
  199. package/dist/index323.js.map +1 -1
  200. package/dist/index324.js +60 -47
  201. package/dist/index324.js.map +1 -1
  202. package/dist/index325.js +13 -11
  203. package/dist/index325.js.map +1 -1
  204. package/dist/index326.js +7 -37
  205. package/dist/index326.js.map +1 -1
  206. package/dist/index327.js +5 -8
  207. package/dist/index327.js.map +1 -1
  208. package/dist/index328.js +3 -116
  209. package/dist/index328.js.map +1 -1
  210. package/dist/index329.js +10 -17
  211. package/dist/index329.js.map +1 -1
  212. package/dist/index330.js +7 -15
  213. package/dist/index330.js.map +1 -1
  214. package/dist/index331.js +133 -3
  215. package/dist/index331.js.map +1 -1
  216. package/dist/index332.js +398 -35
  217. package/dist/index332.js.map +1 -1
  218. package/dist/index333.js +52 -20
  219. package/dist/index333.js.map +1 -1
  220. package/dist/index334.js +11 -9
  221. package/dist/index334.js.map +1 -1
  222. package/dist/index335.js +11 -8
  223. package/dist/index335.js.map +1 -1
  224. package/dist/index336.js +3 -3
  225. package/dist/index339.js +1 -1
  226. package/dist/index346.js +2 -2
  227. package/dist/index347.js +5 -122
  228. package/dist/index347.js.map +1 -1
  229. package/dist/index348.js +121 -31
  230. package/dist/index348.js.map +1 -1
  231. package/dist/index349.js +31 -72
  232. package/dist/index349.js.map +1 -1
  233. package/dist/index350.js +70 -139
  234. package/dist/index350.js.map +1 -1
  235. package/dist/index351.js +116 -35
  236. package/dist/index351.js.map +1 -1
  237. package/dist/index352.js +56 -44
  238. package/dist/index352.js.map +1 -1
  239. package/dist/index353.js +49 -14
  240. package/dist/index353.js.map +1 -1
  241. package/dist/index354.js +15 -6
  242. package/dist/index354.js.map +1 -1
  243. package/dist/index362.js +19 -10
  244. package/dist/index362.js.map +1 -1
  245. package/dist/index363.js +4 -17
  246. package/dist/index363.js.map +1 -1
  247. package/dist/index365.js +12 -4
  248. package/dist/index365.js.map +1 -1
  249. package/dist/index366.js +15 -19
  250. package/dist/index366.js.map +1 -1
  251. package/dist/index367.js +19 -43
  252. package/dist/index367.js.map +1 -1
  253. package/dist/index368.js +40 -13
  254. package/dist/index368.js.map +1 -1
  255. package/dist/index369.js +17 -4
  256. package/dist/index369.js.map +1 -1
  257. package/dist/index370.js +4 -200
  258. package/dist/index370.js.map +1 -1
  259. package/dist/index371.js +197 -74
  260. package/dist/index371.js.map +1 -1
  261. package/dist/index372.js +77 -20
  262. package/dist/index372.js.map +1 -1
  263. package/dist/index374.js +3 -3
  264. package/dist/index375.js +1 -1
  265. package/dist/index376.js +3 -3
  266. package/dist/index378.js +2 -2
  267. package/dist/index380.js +1 -1
  268. package/dist/index381.js +2 -2
  269. package/dist/index384.js +2 -2
  270. package/dist/index386.js +1 -1
  271. package/dist/index407.js +1 -1
  272. package/dist/index44.js +1 -1
  273. package/dist/index45.js +2 -2
  274. package/dist/index49.js +28 -28
  275. package/dist/index50.js +21 -21
  276. package/dist/index51.js +1 -1
  277. package/dist/index52.js +8 -8
  278. package/dist/index53.js +2 -2
  279. package/dist/index55.js +17 -17
  280. package/dist/index56.js +4 -4
  281. package/dist/index57.js +3 -3
  282. package/dist/index58.js +7 -7
  283. package/dist/index59.js +4 -4
  284. package/dist/index60.js +12 -12
  285. package/dist/index61.js +2 -2
  286. package/dist/index62.js +2 -2
  287. package/dist/index70.js +1 -1
  288. package/dist/index71.js +1 -1
  289. package/dist/index74.js +6 -2
  290. package/dist/index74.js.map +1 -1
  291. package/dist/index75.js +8 -2
  292. package/dist/index75.js.map +1 -1
  293. package/dist/index76.js +5 -5
  294. package/dist/index76.js.map +1 -1
  295. package/dist/index77.js +2 -8
  296. package/dist/index77.js.map +1 -1
  297. package/dist/index78.js +2 -6
  298. package/dist/index78.js.map +1 -1
  299. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AddressAutocompleteInput/index.tsx"],"names":[],"mappings":"AAqJA,eAAO,MAAM,wBAAwB,GAAI,qJAatC;IACD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAA;IAChF,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;CAChC,4CAmVA,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AddressAutocompleteInput/index.tsx"],"names":[],"mappings":"AAuJA,eAAO,MAAM,wBAAwB,GAAI,qJAatC;IACD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAA;IAChF,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;CAChC,4CAmVA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMapsLibrary.d.ts","sourceRoot":"","sources":["../../src/helpers/useMapsLibrary.ts"],"names":[],"mappings":"AAIA,KAAK,qBAAqB,GACtB,MAAM,GACN,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,WAAW,GACX,YAAY,GACZ,gBAAgB,GAChB,SAAS,GACT,eAAe,GACf,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEjB,KAAK,uBAAuB,CAAC,CAAC,SAAS,qBAAqB,IAC1D,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,GACtC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,GACxC,CAAC,SAAS,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,GAC5C,CAAC,SAAS,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,GAC5C,CAAC,SAAS,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,GAChD,CAAC,SAAS,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,GAClD,CAAC,SAAS,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAiB,GACpD,CAAC,SAAS,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,qBAAqB,GAC5D,CAAC,SAAS,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,GAC9C,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,GAC1D,CAAC,SAAS,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,GAC5C,CAAC,SAAS,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,GAC5C,CAAC,SAAS,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,GAClD,OAAO,CAAA;AA+DrC,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,qBAAqB,EAC5D,SAAS,CAAC,EACV,SAAS,MAAM,sCA+BhB,CAAA;AAED,YAAY,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,CAAA"}
1
+ {"version":3,"file":"useMapsLibrary.d.ts","sourceRoot":"","sources":["../../src/helpers/useMapsLibrary.ts"],"names":[],"mappings":"AAMA,KAAK,qBAAqB,GACtB,MAAM,GACN,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,WAAW,GACX,YAAY,GACZ,gBAAgB,GAChB,SAAS,GACT,eAAe,GACf,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAEjB,KAAK,uBAAuB,CAAC,CAAC,SAAS,qBAAqB,IAC1D,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,GACtC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,GACxC,CAAC,SAAS,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,GAC5C,CAAC,SAAS,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,GAC5C,CAAC,SAAS,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,GAChD,CAAC,SAAS,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,GAClD,CAAC,SAAS,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAiB,GACpD,CAAC,SAAS,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,qBAAqB,GAC5D,CAAC,SAAS,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,GAC9C,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,GAC1D,CAAC,SAAS,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,GAC5C,CAAC,SAAS,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,GAC5C,CAAC,SAAS,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,GAClD,OAAO,CAAA;AA+DrC,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,qBAAqB,EAC5D,SAAS,CAAC,EACV,SAAS,MAAM,sCA+BhB,CAAA;AAED,YAAY,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,CAAA"}
package/dist/index121.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { useEffect as D, useMemo as S } from "react";
2
- import { getDates as N } from "./index241.js";
3
- import { getDays as w } from "./index242.js";
4
- import { getDisplayMonths as E } from "./index243.js";
5
- import { getInitialMonth as c } from "./index244.js";
6
- import { getMonths as b } from "./index245.js";
7
- import { getNavMonths as q } from "./index246.js";
8
- import { getNextMonth as F } from "./index247.js";
9
- import { getPreviousMonth as P } from "./index248.js";
10
- import { getWeeks as V } from "./index249.js";
11
- import { useControlledValue as Z } from "./index250.js";
2
+ import { getDates as N } from "./index237.js";
3
+ import { getDays as w } from "./index238.js";
4
+ import { getDisplayMonths as E } from "./index239.js";
5
+ import { getInitialMonth as c } from "./index240.js";
6
+ import { getMonths as b } from "./index241.js";
7
+ import { getNavMonths as q } from "./index242.js";
8
+ import { getNextMonth as F } from "./index243.js";
9
+ import { getPreviousMonth as P } from "./index244.js";
10
+ import { getWeeks as V } from "./index245.js";
11
+ import { useControlledValue as Z } from "./index246.js";
12
12
  function _(e, n) {
13
13
  const [s, a] = q(e, n), { startOfMonth: i, endOfMonth: g } = n, h = c(e, s, a, n), [m, f] = Z(
14
14
  h,
package/dist/index123.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { useState as a } from "react";
2
- import { calculateFocusTarget as T } from "./index251.js";
3
- import { getNextFocus as v } from "./index252.js";
2
+ import { calculateFocusTarget as T } from "./index247.js";
3
+ import { getNextFocus as v } from "./index248.js";
4
4
  function I(e, o, r, i, f) {
5
5
  const { autoFocus: F } = e, [d, m] = a(), c = T(o.days, r, i || (() => !1), d), [s, u] = a(F ? c : void 0);
6
6
  return {
package/dist/index124.js CHANGED
@@ -1,6 +1,6 @@
1
- import { useMulti as i } from "./index253.js";
2
- import { useRange as o } from "./index254.js";
3
- import { useSingle as s } from "./index255.js";
1
+ import { useMulti as i } from "./index249.js";
2
+ import { useRange as o } from "./index250.js";
3
+ import { useSingle as s } from "./index251.js";
4
4
  function f(e, n) {
5
5
  const t = s(e, n), r = i(e, n), u = o(e, n);
6
6
  switch (e.mode) {
package/dist/index151.js CHANGED
@@ -1,8 +1,8 @@
1
- import m from "./index323.js";
2
- import p from "./index324.js";
3
- import y from "./index322.js";
1
+ import m from "./index265.js";
2
+ import p from "./index266.js";
3
+ import y from "./index264.js";
4
4
  import b from "./index164.js";
5
- import l from "./index314.js";
5
+ import l from "./index256.js";
6
6
  function i(e) {
7
7
  "@babel/helpers - typeof";
8
8
  return i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
package/dist/index156.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index314.js";
1
+ import f from "./index256.js";
2
2
  import u from "./index158.js";
3
3
  import m from "./index159.js";
4
4
  function p(a, t, r) {
package/dist/index157.js CHANGED
@@ -1,4 +1,4 @@
1
- import w from "./index315.js";
1
+ import w from "./index257.js";
2
2
  function p(r, e) {
3
3
  var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
4
4
  if (t) return (t = t.call(r)).next.bind(t);
package/dist/index164.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index325.js";
1
+ import f from "./index267.js";
2
2
  import l from "./index170.js";
3
3
  function a(n) {
4
4
  "@babel/helpers - typeof";
package/dist/index165.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import l, { validateMetadata as h } from "./index164.js";
2
- import d from "./index316.js";
3
- import v from "./index317.js";
4
- import w from "./index318.js";
5
- import P from "./index319.js";
6
- import C from "./index320.js";
2
+ import d from "./index258.js";
3
+ import v from "./index259.js";
4
+ import w from "./index260.js";
5
+ import P from "./index261.js";
6
+ import C from "./index262.js";
7
7
  import s from "./index170.js";
8
- import E from "./index321.js";
8
+ import E from "./index263.js";
9
9
  function o(r) {
10
10
  "@babel/helpers - typeof";
11
11
  return o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
package/dist/index167.js CHANGED
@@ -1,4 +1,4 @@
1
- import b from "./index320.js";
1
+ import b from "./index262.js";
2
2
  import y from "./index336.js";
3
3
  import m from "./index337.js";
4
4
  import C from "./index338.js";
package/dist/index169.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import l from "./index164.js";
2
- import f from "./index318.js";
2
+ import f from "./index260.js";
3
3
  function d(e, r) {
4
4
  var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
5
5
  if (t) return (t = t.call(e)).next.bind(t);
package/dist/index172.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import b from "./index191.js";
2
2
  import * as c from "react";
3
3
  import { createElement as p } from "react";
4
- import { useMergedRefs as E, useMergedRefsN as g } from "./index257.js";
4
+ import { useMergedRefs as E, useMergedRefsN as g } from "./index279.js";
5
5
  import { getReactElementRef as y } from "./index339.js";
6
6
  import { mergeObjects as R } from "./index340.js";
7
7
  import { warn as v } from "./index341.js";
8
- import { EMPTY_OBJECT as f } from "./index264.js";
8
+ import { EMPTY_OBJECT as f } from "./index286.js";
9
9
  import { getStateAttributesProps as w } from "./index342.js";
10
10
  import { resolveClassName as C } from "./index343.js";
11
11
  import { resolveStyle as T } from "./index344.js";
12
- import { mergeClassNames as _, mergeProps as h, mergePropsN as k } from "./index282.js";
12
+ import { mergeClassNames as _, mergeProps as h, mergePropsN as k } from "./index304.js";
13
13
  function q(r, e, t = {}) {
14
14
  const a = e.render, s = I(e, t);
15
15
  if (t.enabled === !1)
package/dist/index175.js CHANGED
@@ -1,4 +1,4 @@
1
- import { EMPTY_OBJECT as l } from "./index264.js";
1
+ import { EMPTY_OBJECT as l } from "./index286.js";
2
2
  function u(a, n, o, s) {
3
3
  let e = !1, t = !1;
4
4
  const r = l;
package/dist/index176.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import * as l from "react";
2
- import { isHTMLElement as M } from "./index309.js";
3
- import { useStableCallback as H } from "./index262.js";
2
+ import { isHTMLElement as M } from "./index331.js";
3
+ import { useStableCallback as H } from "./index284.js";
4
4
  import { error as y } from "./index355.js";
5
5
  import { SafeReact as B } from "./index356.js";
6
- import { useIsoLayoutEffect as A } from "./index261.js";
6
+ import { useIsoLayoutEffect as A } from "./index283.js";
7
7
  import { useCompositeRootContext as L } from "./index357.js";
8
8
  import { useFocusableWhenDisabled as W } from "./index358.js";
9
- import { mergeProps as $, makeEventPreventable as x } from "./index282.js";
9
+ import { mergeProps as $, makeEventPreventable as x } from "./index304.js";
10
10
  function Y(a = {}) {
11
11
  const {
12
12
  disabled: o = !1,
package/dist/index182.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as l from "react";
2
- import { useStableCallback as m } from "./index262.js";
2
+ import { useStableCallback as m } from "./index284.js";
3
3
  import { useAnimationsFinished as f } from "./index346.js";
4
4
  function c(a) {
5
5
  const {
package/dist/index184.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import * as p from "react";
2
- import { isHTMLElement as G, getNodeName as We, getWindow as _e } from "./index309.js";
3
- import { addEventListener as I } from "./index300.js";
2
+ import { isHTMLElement as G, getNodeName as We, getWindow as _e } from "./index331.js";
3
+ import { addEventListener as I } from "./index322.js";
4
4
  import { mergeCleanups as Te } from "./index373.js";
5
- import { useMergedRefs as Fe } from "./index257.js";
6
- import { useValueAsRef as te } from "./index263.js";
7
- import { useStableCallback as ne } from "./index262.js";
8
- import { useIsoLayoutEffect as _ } from "./index261.js";
9
- import { useTimeout as ye } from "./index285.js";
10
- import { isWebKit as Ue } from "./index301.js";
11
- import { useAnimationFrame as $e } from "./index302.js";
12
- import { ownerDocument as O } from "./index284.js";
5
+ import { useMergedRefs as Fe } from "./index279.js";
6
+ import { useValueAsRef as te } from "./index285.js";
7
+ import { useStableCallback as ne } from "./index284.js";
8
+ import { useIsoLayoutEffect as _ } from "./index283.js";
9
+ import { useTimeout as ye } from "./index307.js";
10
+ import { isWebKit as Ue } from "./index323.js";
11
+ import { useAnimationFrame as $e } from "./index324.js";
12
+ import { ownerDocument as O } from "./index306.js";
13
13
  import { FocusGuard as xe } from "./index374.js";
14
- import { isTypeableCombobox as Ie, getFloatingFocusElement as he, isTypeableElement as Be } from "./index290.js";
14
+ import { isTypeableCombobox as Ie, getFloatingFocusElement as he, isTypeableElement as Be } from "./index312.js";
15
15
  import { isVirtualClick as ze, isVirtualPointerEvent as Je, stopEvent as Qe } from "./index375.js";
16
16
  import { isOutsideEvent as ve, getNextTabbable as Xe, getPreviousTabbable as Ye, tabbable as Se, isTabbable as ue, focusable as Ze } from "./index376.js";
17
17
  import { getNodeAncestors as Ce, getNodeChildren as ke } from "./index377.js";
@@ -25,7 +25,7 @@ import { useFloatingTree as rt } from "./index382.js";
25
25
  import { CLICK_TRIGGER_IDENTIFIER as ot } from "./index192.js";
26
26
  import { resolveRef as w } from "./index383.js";
27
27
  import { j as oe } from "./index30.js";
28
- import { activeElement as V, contains as a, getTarget as B } from "./index291.js";
28
+ import { activeElement as V, contains as a, getTarget as B } from "./index313.js";
29
29
  import { triggerHover as st, outsidePress as ut, focusOut as it } from "./index177.js";
30
30
  function ct(t, h) {
31
31
  const D = _e(B(t));
package/dist/index185.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isReactVersionAtLeast as r } from "./index354.js";
1
+ import { isReactVersionAtLeast as r } from "./index347.js";
2
2
  function n(e) {
3
3
  return r(19) ? e : e ? "true" : void 0;
4
4
  }
package/dist/index187.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import * as o from "react";
2
2
  import * as I from "react-dom";
3
- import { isNode as V } from "./index309.js";
4
- import { addEventListener as O } from "./index300.js";
3
+ import { isNode as V } from "./index331.js";
4
+ import { addEventListener as O } from "./index322.js";
5
5
  import { mergeCleanups as w } from "./index373.js";
6
6
  import { useId as G } from "./index345.js";
7
- import { useIsoLayoutEffect as _ } from "./index261.js";
8
- import { useStableCallback as L } from "./index262.js";
9
- import { EMPTY_OBJECT as k } from "./index264.js";
7
+ import { useIsoLayoutEffect as _ } from "./index283.js";
8
+ import { useStableCallback as L } from "./index284.js";
9
+ import { EMPTY_OBJECT as k } from "./index286.js";
10
10
  import { FocusGuard as S } from "./index374.js";
11
11
  import { enableFocusInside as T, isOutsideEvent as C, getPreviousTabbable as q, getNextTabbable as A, disableFocusInside as B } from "./index376.js";
12
12
  import { createChangeEventDetails as H } from "./index175.js";
package/dist/index189.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as t from "react";
2
- import { useScrollLock as v } from "./index347.js";
3
- import { useOpenInteractionType as I } from "./index275.js";
2
+ import { useScrollLock as v } from "./index348.js";
3
+ import { useOpenInteractionType as I } from "./index297.js";
4
4
  import { createChangeEventDetails as A } from "./index175.js";
5
5
  import { useImplicitActiveTrigger as M, useOpenStateTransitions as B } from "./index193.js";
6
- import { useSyncedFloatingRootContext as F } from "./index348.js";
7
- import { useRole as H } from "./index349.js";
8
- import { useDismiss as K } from "./index279.js";
6
+ import { useSyncedFloatingRootContext as F } from "./index349.js";
7
+ import { useRole as H } from "./index350.js";
8
+ import { useDismiss as K } from "./index301.js";
9
9
  import { useInteractions as L } from "./index195.js";
10
- import { getTarget as U, contains as V } from "./index291.js";
10
+ import { getTarget as U, contains as V } from "./index313.js";
11
11
  import { imperativeAction as j } from "./index177.js";
12
12
  function $(P) {
13
13
  const {
package/dist/index190.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as i from "react";
2
- import { useRefWithInit as d } from "./index258.js";
3
- import { ReactStore as a } from "./index350.js";
4
- import { PopupTriggerMap as p } from "./index351.js";
5
- import { popupStoreSelectors as u, createInitialPopupStoreState as c } from "./index352.js";
6
- import { createSelector as n } from "./index353.js";
2
+ import { useRefWithInit as d } from "./index280.js";
3
+ import { ReactStore as a } from "./index351.js";
4
+ import { PopupTriggerMap as p } from "./index352.js";
5
+ import { popupStoreSelectors as u, createInitialPopupStoreState as c } from "./index353.js";
6
+ import { createSelector as n } from "./index354.js";
7
7
  const m = {
8
8
  ...u,
9
9
  modal: n((e) => e.modal),
package/dist/index193.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as l from "react";
2
- import { useStableCallback as a } from "./index262.js";
3
- import { useIsoLayoutEffect as s } from "./index261.js";
4
- import { useTransitionStatus as f } from "./index269.js";
2
+ import { useStableCallback as a } from "./index284.js";
3
+ import { useIsoLayoutEffect as s } from "./index283.js";
4
+ import { useTransitionStatus as f } from "./index291.js";
5
5
  import { useOpenChangeComplete as m } from "./index182.js";
6
6
  function d(e, n) {
7
7
  const t = l.useRef(null), r = l.useRef(null);
package/dist/index194.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as k from "react";
2
- import { useAnimationFrame as b } from "./index302.js";
3
- import { useTimeout as I } from "./index285.js";
4
- import { EMPTY_OBJECT as x } from "./index264.js";
5
- import { isTypeableElement as L } from "./index290.js";
2
+ import { useAnimationFrame as b } from "./index324.js";
3
+ import { useTimeout as I } from "./index307.js";
4
+ import { EMPTY_OBJECT as x } from "./index286.js";
5
+ import { isTypeableElement as L } from "./index312.js";
6
6
  import { isMouseLikePointerType as M, isClickLikeEvent as S } from "./index375.js";
7
7
  import { createChangeEventDetails as y } from "./index175.js";
8
- import { getTarget as q } from "./index291.js";
8
+ import { getTarget as q } from "./index313.js";
9
9
  import { triggerPress as A } from "./index177.js";
10
10
  function G(T, D = {}) {
11
11
  const e = "rootStore" in T ? T.rootStore : T, g = e.context.dataRef, {
@@ -1 +1 @@
1
- {"version":3,"file":"index22.js","sources":["../src/helpers/useMapsLibrary.ts"],"sourcesContent":["import { useEffect, useState } from \"react\"\nimport { setOptions, importLibrary } from \"@googlemaps/js-api-loader\"\n\n\ntype GoogleMapsLibraryName =\n | \"core\"\n | \"maps\"\n | \"maps3d\"\n | \"routes\"\n | \"geometry\"\n | \"elevation\"\n | \"streetView\"\n | \"journeySharing\"\n | \"drawing\"\n | \"visualization\"\n | \"marker\"\n | \"places\"\n | \"geocoding\"\n | (string & {})\n\ntype GoogleMapsLibraryModule<T extends GoogleMapsLibraryName> =\n T extends \"core\" ? google.maps.CoreLibrary\n : T extends \"maps\" ? google.maps.MapsLibrary\n : T extends \"maps3d\" ? google.maps.Maps3DLibrary\n : T extends \"routes\" ? google.maps.RoutesLibrary\n : T extends \"geometry\" ? google.maps.GeometryLibrary\n : T extends \"elevation\" ? google.maps.ElevationLibrary\n : T extends \"streetView\" ? google.maps.StreetViewLibrary\n : T extends \"journeySharing\" ? google.maps.JourneySharingLibrary\n : T extends \"drawing\" ? google.maps.DrawingLibrary\n : T extends \"visualization\" ? google.maps.VisualizationLibrary\n : T extends \"marker\" ? google.maps.MarkerLibrary\n : T extends \"places\" ? google.maps.PlacesLibrary\n : T extends \"geocoding\" ? google.maps.GeocodingLibrary\n : unknown\n\n\nlet initPromise: Promise<void> | null = null\nlet configuredKey: string | null = null\n\nconst libraryPromises = new Map<string, Promise<unknown>>()\n\nconst ensureGoogle = (apiKey?: string) => {\n if (!apiKey) {\n const error = new Error(\"useMapsLibrary: missing Google Maps API key\")\n console.error(error.message)\n return Promise.reject(error)\n }\n\n if (!initPromise) {\n configuredKey = apiKey\n setOptions({\n key: apiKey,\n v: \"weekly\",\n })\n initPromise = importLibrary(\"core\")\n .then(() => {})\n .catch(error => {\n initPromise = null\n throw error\n })\n } else if (configuredKey !== apiKey) {\n console.warn(\n \"useMapsLibrary: ignoring attempt to re-initialize Google Maps with a different API key than the one already in use.\"\n )\n }\n\n return initPromise\n}\n\nconst loadLibrary = <T extends GoogleMapsLibraryName>(\n library: T,\n apiKey?: string\n) => {\n const cacheKey = String(library)\n const cached = libraryPromises.get(cacheKey)\n if (cached) {\n return cached as Promise<GoogleMapsLibraryModule<T>>\n }\n\n const promise = ensureGoogle(apiKey)\n .then(() => {\n if (typeof window === \"undefined\" || !window.google?.maps?.importLibrary) {\n throw new Error(\"useMapsLibrary: google.maps.importLibrary is not available.\")\n }\n return window.google.maps.importLibrary(cacheKey)\n })\n .then(module => module as GoogleMapsLibraryModule<T>)\n .catch(error => {\n libraryPromises.delete(cacheKey)\n throw error\n })\n\n libraryPromises.set(cacheKey, promise as Promise<unknown>)\n return promise\n}\n\nexport const useMapsLibrary = <T extends GoogleMapsLibraryName>(\n library: T,\n apiKey?: string\n) => {\n const [module, setModule] =\n useState<GoogleMapsLibraryModule<T> | null>(null)\n\n useEffect(() => {\n if (typeof window === \"undefined\") {\n return\n }\n\n let cancelled = false\n\n loadLibrary(library, apiKey)\n .then(loadedModule => {\n if (!cancelled) {\n setModule(loadedModule)\n }\n })\n .catch(error => {\n if (!cancelled) {\n console.error(`useMapsLibrary: failed to load ${String(library)} library`, error)\n setModule(null)\n }\n })\n\n return () => {\n cancelled = true\n }\n }, [library, apiKey])\n\n return module\n}\n\nexport type { GoogleMapsLibraryName, GoogleMapsLibraryModule }\n"],"names":["initPromise","configuredKey","libraryPromises","Map","ensureGoogle","apiKey","error","Error","console","message","Promise","reject","warn","setOptions","key","v","importLibrary","then","catch","loadLibrary","library","cacheKey","String","cached","get","promise","window","google","maps","module","delete","set","useMapsLibrary","$","_c","setModule","useState","t0","t1","cancelled","loadedModule","useEffect"],"mappings":";;;AAqCA,IAAIA,IAAoC,MACpCC,IAA+B;AAEnC,MAAMC,wBAAsBC,IAAAA,GAEtBC,IAAeA,CAACC,MAAoB;AACxC,MAAI,CAACA,GAAQ;AACX,UAAMC,IAAQ,IAAIC,MAAM,6CAA6C;AACrEC,mBAAQF,MAAMA,EAAMG,OAAO,GACpBC,QAAQC,OAAOL,CAAK;AAAA,EAC7B;AAEA,SAAKN,IAYMC,MAAkBI,KAC3BG,QAAQI,KACN,qHACF,KAdAX,IAAgBI,GAChBQ,EAAW;AAAA,IACTC,KAAKT;AAAAA,IACLU,GAAG;AAAA,EAAA,CACJ,GACDf,IAAcgB,EAAc,MAAM,EAC/BC,KAAK,MAAM;AAAA,EAAC,CAAC,EACbC,MAAMZ,CAAAA,MAAS;AACdN,UAAAA,IAAc,MACRM;AAAAA,EACR,CAAC,IAOEN;AACT,GAEMmB,IAAc,CAClBC,GACAf,MACG;AACH,QAAMgB,IAAWC,OAAOF,CAAO,GACzBG,IAASrB,EAAgBsB,IAAIH,CAAQ;AAC3C,MAAIE;AACF,WAAOA;AAGT,QAAME,IAAUrB,EAAaC,CAAM,EAChCY,KAAK,MAAM;AACV,QAAI,OAAOS,SAAW,OAAe,CAACA,OAAOC,QAAQC,MAAMZ;AACzD,YAAM,IAAIT,MAAM,6DAA6D;AAE/E,WAAOmB,OAAOC,OAAOC,KAAKZ,cAAcK,CAAQ;AAAA,EAClD,CAAC,EACAJ,KAAKY,OAAUA,CAAoC,EACnDX,MAAMZ,CAAAA,MAAS;AACdJ,UAAAA,EAAgB4B,OAAOT,CAAQ,GACzBf;AAAAA,EACR,CAAC;AAEHJ,SAAAA,EAAgB6B,IAAIV,GAAUI,CAA2B,GAClDA;AACT,GAEaO,IAAiBA,CAAAZ,GAAAf,MAAA;AAAA,QAAA4B,IAAAC,EAAAA,EAAA,CAAA,GAI5B,CAAAL,GAAAM,CAAA,IACEC,EAA4C,IAAI;AAAC,MAAAC,GAAAC;AAAA,SAAAL,EAAA,CAAA,MAAA5B,KAAA4B,SAAAb,KAEzCiB,IAAAA,MAAA;AACR,QAAI,OAAOX,SAAW;AAAW;AAIjC,QAAAa,IAAgB;AAEhBpB,WAAAA,EAAYC,GAASf,CAAM,EAACY,KACpBuB,CAAAA,MAAA;AACJ,MAAKD,KACHJ,EAAUK,CAAY;AAAA,IACvB,CACF,EAACtB,MACKZ,CAAAA,MAAA;AACL,MAAKiC,MACH/B,QAAOF,MAAO,kCAAkCgB,OAAOF,CAAO,CAAC,YAAYd,CAAK,GAChF6B,EAAU,IAAI;AAAA,IACf,CACF,GAEI,MAAA;AACLI,MAAAA,IAAYA;AAAAA,IAAH;AAAA,EACV,GACAD,IAAA,CAAClB,GAASf,CAAM,GAAC4B,OAAA5B,GAAA4B,OAAAb,GAAAa,OAAAI,GAAAJ,OAAAK,MAAAD,IAAAJ,EAAA,CAAA,GAAAK,IAAAL,EAAA,CAAA,IAvBpBQ,EAAUJ,GAuBPC,CAAiB,GAEbT;AAAM;"}
1
+ {"version":3,"file":"index22.js","sources":["../src/helpers/useMapsLibrary.ts"],"sourcesContent":["/// <reference types=\"google.maps\" />\n\nimport { useEffect, useState } from \"react\"\nimport { setOptions, importLibrary } from \"@googlemaps/js-api-loader\"\n\n\ntype GoogleMapsLibraryName =\n | \"core\"\n | \"maps\"\n | \"maps3d\"\n | \"routes\"\n | \"geometry\"\n | \"elevation\"\n | \"streetView\"\n | \"journeySharing\"\n | \"drawing\"\n | \"visualization\"\n | \"marker\"\n | \"places\"\n | \"geocoding\"\n | (string & {})\n\ntype GoogleMapsLibraryModule<T extends GoogleMapsLibraryName> =\n T extends \"core\" ? google.maps.CoreLibrary\n : T extends \"maps\" ? google.maps.MapsLibrary\n : T extends \"maps3d\" ? google.maps.Maps3DLibrary\n : T extends \"routes\" ? google.maps.RoutesLibrary\n : T extends \"geometry\" ? google.maps.GeometryLibrary\n : T extends \"elevation\" ? google.maps.ElevationLibrary\n : T extends \"streetView\" ? google.maps.StreetViewLibrary\n : T extends \"journeySharing\" ? google.maps.JourneySharingLibrary\n : T extends \"drawing\" ? google.maps.DrawingLibrary\n : T extends \"visualization\" ? google.maps.VisualizationLibrary\n : T extends \"marker\" ? google.maps.MarkerLibrary\n : T extends \"places\" ? google.maps.PlacesLibrary\n : T extends \"geocoding\" ? google.maps.GeocodingLibrary\n : unknown\n\n\nlet initPromise: Promise<void> | null = null\nlet configuredKey: string | null = null\n\nconst libraryPromises = new Map<string, Promise<unknown>>()\n\nconst ensureGoogle = (apiKey?: string) => {\n if (!apiKey) {\n const error = new Error(\"useMapsLibrary: missing Google Maps API key\")\n console.error(error.message)\n return Promise.reject(error)\n }\n\n if (!initPromise) {\n configuredKey = apiKey\n setOptions({\n key: apiKey,\n v: \"weekly\",\n })\n initPromise = importLibrary(\"core\")\n .then(() => {})\n .catch(error => {\n initPromise = null\n throw error\n })\n } else if (configuredKey !== apiKey) {\n console.warn(\n \"useMapsLibrary: ignoring attempt to re-initialize Google Maps with a different API key than the one already in use.\"\n )\n }\n\n return initPromise\n}\n\nconst loadLibrary = <T extends GoogleMapsLibraryName>(\n library: T,\n apiKey?: string\n) => {\n const cacheKey = String(library)\n const cached = libraryPromises.get(cacheKey)\n if (cached) {\n return cached as Promise<GoogleMapsLibraryModule<T>>\n }\n\n const promise = ensureGoogle(apiKey)\n .then(() => {\n if (typeof window === \"undefined\" || !window.google?.maps?.importLibrary) {\n throw new Error(\"useMapsLibrary: google.maps.importLibrary is not available.\")\n }\n return window.google.maps.importLibrary(cacheKey)\n })\n .then(module => module as GoogleMapsLibraryModule<T>)\n .catch(error => {\n libraryPromises.delete(cacheKey)\n throw error\n })\n\n libraryPromises.set(cacheKey, promise as Promise<unknown>)\n return promise\n}\n\nexport const useMapsLibrary = <T extends GoogleMapsLibraryName>(\n library: T,\n apiKey?: string\n) => {\n const [module, setModule] =\n useState<GoogleMapsLibraryModule<T> | null>(null)\n\n useEffect(() => {\n if (typeof window === \"undefined\") {\n return\n }\n\n let cancelled = false\n\n loadLibrary(library, apiKey)\n .then(loadedModule => {\n if (!cancelled) {\n setModule(loadedModule)\n }\n })\n .catch(error => {\n if (!cancelled) {\n console.error(`useMapsLibrary: failed to load ${String(library)} library`, error)\n setModule(null)\n }\n })\n\n return () => {\n cancelled = true\n }\n }, [library, apiKey])\n\n return module\n}\n\nexport type { GoogleMapsLibraryName, GoogleMapsLibraryModule }\n"],"names":["initPromise","configuredKey","libraryPromises","Map","ensureGoogle","apiKey","error","Error","console","message","Promise","reject","warn","setOptions","key","v","importLibrary","then","catch","loadLibrary","library","cacheKey","String","cached","get","promise","window","google","maps","module","delete","set","useMapsLibrary","$","_c","setModule","useState","t0","t1","cancelled","loadedModule","useEffect"],"mappings":";;;AAuCA,IAAIA,IAAoC,MACpCC,IAA+B;AAEnC,MAAMC,wBAAsBC,IAAAA,GAEtBC,IAAeA,CAACC,MAAoB;AACxC,MAAI,CAACA,GAAQ;AACX,UAAMC,IAAQ,IAAIC,MAAM,6CAA6C;AACrEC,mBAAQF,MAAMA,EAAMG,OAAO,GACpBC,QAAQC,OAAOL,CAAK;AAAA,EAC7B;AAEA,SAAKN,IAYMC,MAAkBI,KAC3BG,QAAQI,KACN,qHACF,KAdAX,IAAgBI,GAChBQ,EAAW;AAAA,IACTC,KAAKT;AAAAA,IACLU,GAAG;AAAA,EAAA,CACJ,GACDf,IAAcgB,EAAc,MAAM,EAC/BC,KAAK,MAAM;AAAA,EAAC,CAAC,EACbC,MAAMZ,CAAAA,MAAS;AACdN,UAAAA,IAAc,MACRM;AAAAA,EACR,CAAC,IAOEN;AACT,GAEMmB,IAAc,CAClBC,GACAf,MACG;AACH,QAAMgB,IAAWC,OAAOF,CAAO,GACzBG,IAASrB,EAAgBsB,IAAIH,CAAQ;AAC3C,MAAIE;AACF,WAAOA;AAGT,QAAME,IAAUrB,EAAaC,CAAM,EAChCY,KAAK,MAAM;AACV,QAAI,OAAOS,SAAW,OAAe,CAACA,OAAOC,QAAQC,MAAMZ;AACzD,YAAM,IAAIT,MAAM,6DAA6D;AAE/E,WAAOmB,OAAOC,OAAOC,KAAKZ,cAAcK,CAAQ;AAAA,EAClD,CAAC,EACAJ,KAAKY,OAAUA,CAAoC,EACnDX,MAAMZ,CAAAA,MAAS;AACdJ,UAAAA,EAAgB4B,OAAOT,CAAQ,GACzBf;AAAAA,EACR,CAAC;AAEHJ,SAAAA,EAAgB6B,IAAIV,GAAUI,CAA2B,GAClDA;AACT,GAEaO,IAAiBA,CAAAZ,GAAAf,MAAA;AAAA,QAAA4B,IAAAC,EAAAA,EAAA,CAAA,GAI5B,CAAAL,GAAAM,CAAA,IACEC,EAA4C,IAAI;AAAC,MAAAC,GAAAC;AAAA,SAAAL,EAAA,CAAA,MAAA5B,KAAA4B,SAAAb,KAEzCiB,IAAAA,MAAA;AACR,QAAI,OAAOX,SAAW;AAAW;AAIjC,QAAAa,IAAgB;AAEhBpB,WAAAA,EAAYC,GAASf,CAAM,EAACY,KACpBuB,CAAAA,MAAA;AACJ,MAAKD,KACHJ,EAAUK,CAAY;AAAA,IACvB,CACF,EAACtB,MACKZ,CAAAA,MAAA;AACL,MAAKiC,MACH/B,QAAOF,MAAO,kCAAkCgB,OAAOF,CAAO,CAAC,YAAYd,CAAK,GAChF6B,EAAU,IAAI;AAAA,IACf,CACF,GAEI,MAAA;AACLI,MAAAA,IAAYA;AAAAA,IAAH;AAAA,EACV,GACAD,IAAA,CAAClB,GAASf,CAAM,GAAC4B,OAAA5B,GAAA4B,OAAAb,GAAAa,OAAAI,GAAAJ,OAAAK,MAAAD,IAAAJ,EAAA,CAAA,GAAAK,IAAAL,EAAA,CAAA,IAvBpBQ,EAAUJ,GAuBPC,CAAiB,GAEbT;AAAM;"}
package/dist/index237.js CHANGED
@@ -1,33 +1,20 @@
1
- import { defaultDateLib as D } from "./index106.js";
2
- function w(f, g, n = 0, s = 0, l = !1, u = D) {
3
- const { from: o, to: i } = g || {}, { isSameDay: r, isAfter: m, isBefore: c } = u;
4
- let e;
5
- if (!o && !i)
6
- e = { from: f, to: n > 0 ? void 0 : f };
7
- else if (o && !i)
8
- r(o, f) ? n === 0 ? e = { from: o, to: f } : l ? e = { from: o, to: void 0 } : e = void 0 : c(f, o) ? e = { from: f, to: o } : e = { from: o, to: f };
9
- else if (o && i)
10
- if (r(o, f) && r(i, f))
11
- l ? e = { from: o, to: i } : e = void 0;
12
- else if (r(o, f))
13
- e = { from: o, to: n > 0 ? void 0 : f };
14
- else if (r(i, f))
15
- e = { from: f, to: n > 0 ? void 0 : f };
16
- else if (c(f, o))
17
- e = { from: f, to: i };
18
- else if (m(f, o))
19
- e = { from: o, to: f };
20
- else if (m(f, i))
21
- e = { from: o, to: f };
22
- else
23
- throw new Error("Invalid range");
24
- if (e?.from && e?.to) {
25
- const t = u.differenceInCalendarDays(e.to, e.from);
26
- s > 0 && t > s ? e = { from: f, to: void 0 } : n > 1 && t < n && (e = { from: f, to: void 0 });
1
+ function j(r, n, I, W) {
2
+ const s = r[0], o = r[r.length - 1], { ISOWeek: c, fixedWeeks: u, broadcastCalendar: a } = I ?? {}, { addDays: i, differenceInCalendarDays: M, differenceInCalendarMonths: C, endOfBroadcastWeek: O, endOfISOWeek: k, endOfMonth: h, endOfWeek: l, isAfter: E, startOfBroadcastWeek: F, startOfISOWeek: S, startOfWeek: p } = W, g = a ? F(s, W) : c ? S(s) : p(s), D = a ? O(o) : c ? k(h(o)) : l(h(o)), f = n && (a ? O(n) : c ? k(n) : l(n)), x = f && E(D, f) ? f : D, A = M(x, g), B = C(o, s) + 1, e = [];
3
+ for (let t = 0; t <= A; t++) {
4
+ const d = i(g, t);
5
+ e.push(d);
6
+ }
7
+ const y = (a ? 35 : 42) * B;
8
+ if (u && e.length < y) {
9
+ const t = y - e.length;
10
+ for (let d = 0; d < t; d++) {
11
+ const T = i(e[e.length - 1], 1);
12
+ e.push(T);
13
+ }
27
14
  }
28
15
  return e;
29
16
  }
30
17
  export {
31
- w as addToRange
18
+ j as getDates
32
19
  };
33
20
  //# sourceMappingURL=index237.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index237.js","sources":["../../../node_modules/react-day-picker/dist/esm/utils/addToRange.js"],"sourcesContent":["import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Adds a date to an existing range, considering constraints like minimum and\n * maximum range size.\n *\n * @param date - The date to add to the range.\n * @param initialRange - The initial range to which the date will be added.\n * @param min - The minimum number of days in the range.\n * @param max - The maximum number of days in the range.\n * @param required - Whether the range must always include at least one date.\n * @param dateLib - The date utility library instance.\n * @returns The updated date range, or `undefined` if the range is cleared.\n * @group Utilities\n */\nexport function addToRange(date, initialRange, min = 0, max = 0, required = false, dateLib = defaultDateLib) {\n const { from, to } = initialRange || {};\n const { isSameDay, isAfter, isBefore } = dateLib;\n let range;\n if (!from && !to) {\n // the range is empty, add the date\n range = { from: date, to: min > 0 ? undefined : date };\n }\n else if (from && !to) {\n // adding date to an incomplete range\n if (isSameDay(from, date)) {\n // adding a date equal to the start of the range\n if (min === 0) {\n range = { from, to: date };\n }\n else if (required) {\n range = { from, to: undefined };\n }\n else {\n range = undefined;\n }\n }\n else if (isBefore(date, from)) {\n // adding a date before the start of the range\n range = { from: date, to: from };\n }\n else {\n // adding a date after the start of the range\n range = { from, to: date };\n }\n }\n else if (from && to) {\n // adding date to a complete range\n if (isSameDay(from, date) && isSameDay(to, date)) {\n // adding a date that is equal to both start and end of the range\n if (required) {\n range = { from, to };\n }\n else {\n range = undefined;\n }\n }\n else if (isSameDay(from, date)) {\n // adding a date equal to the the start of the range\n range = { from, to: min > 0 ? undefined : date };\n }\n else if (isSameDay(to, date)) {\n // adding a dare equal to the end of the range\n range = { from: date, to: min > 0 ? undefined : date };\n }\n else if (isBefore(date, from)) {\n // adding a date before the start of the range\n range = { from: date, to: to };\n }\n else if (isAfter(date, from)) {\n // adding a date after the start of the range\n range = { from, to: date };\n }\n else if (isAfter(date, to)) {\n // adding a date after the end of the range\n range = { from, to: date };\n }\n else {\n throw new Error(\"Invalid range\");\n }\n }\n // check for min / max\n if (range?.from && range?.to) {\n const diff = dateLib.differenceInCalendarDays(range.to, range.from);\n if (max > 0 && diff > max) {\n range = { from: date, to: undefined };\n }\n else if (min > 1 && diff < min) {\n range = { from: date, to: undefined };\n }\n }\n return range;\n}\n"],"names":["addToRange","date","initialRange","min","max","required","dateLib","defaultDateLib","from","to","isSameDay","isAfter","isBefore","range","diff"],"mappings":";AAcO,SAASA,EAAWC,GAAMC,GAAcC,IAAM,GAAGC,IAAM,GAAGC,IAAW,IAAOC,IAAUC,GAAgB;AACzG,QAAM,EAAE,MAAAC,GAAM,IAAAC,EAAE,IAAKP,KAAgB,CAAA,GAC/B,EAAE,WAAAQ,GAAW,SAAAC,GAAS,UAAAC,EAAQ,IAAKN;AACzC,MAAIO;AACJ,MAAI,CAACL,KAAQ,CAACC;AAEV,IAAAI,IAAQ,EAAE,MAAMZ,GAAM,IAAIE,IAAM,IAAI,SAAYF,EAAI;AAAA,WAE/CO,KAAQ,CAACC;AAEd,IAAIC,EAAUF,GAAMP,CAAI,IAEhBE,MAAQ,IACRU,IAAQ,EAAE,MAAAL,GAAM,IAAIP,EAAI,IAEnBI,IACLQ,IAAQ,EAAE,MAAAL,GAAM,IAAI,OAAS,IAG7BK,IAAQ,SAGPD,EAASX,GAAMO,CAAI,IAExBK,IAAQ,EAAE,MAAMZ,GAAM,IAAIO,EAAI,IAI9BK,IAAQ,EAAE,MAAAL,GAAM,IAAIP,EAAI;AAAA,WAGvBO,KAAQC;AAEb,QAAIC,EAAUF,GAAMP,CAAI,KAAKS,EAAUD,GAAIR,CAAI;AAE3C,MAAII,IACAQ,IAAQ,EAAE,MAAAL,GAAM,IAAAC,EAAE,IAGlBI,IAAQ;AAAA,aAGPH,EAAUF,GAAMP,CAAI;AAEzB,MAAAY,IAAQ,EAAE,MAAAL,GAAM,IAAIL,IAAM,IAAI,SAAYF,EAAI;AAAA,aAEzCS,EAAUD,GAAIR,CAAI;AAEvB,MAAAY,IAAQ,EAAE,MAAMZ,GAAM,IAAIE,IAAM,IAAI,SAAYF,EAAI;AAAA,aAE/CW,EAASX,GAAMO,CAAI;AAExB,MAAAK,IAAQ,EAAE,MAAMZ,GAAM,IAAIQ,EAAE;AAAA,aAEvBE,EAAQV,GAAMO,CAAI;AAEvB,MAAAK,IAAQ,EAAE,MAAAL,GAAM,IAAIP,EAAI;AAAA,aAEnBU,EAAQV,GAAMQ,CAAE;AAErB,MAAAI,IAAQ,EAAE,MAAAL,GAAM,IAAIP,EAAI;AAAA;AAGxB,YAAM,IAAI,MAAM,eAAe;AAIvC,MAAIY,GAAO,QAAQA,GAAO,IAAI;AAC1B,UAAMC,IAAOR,EAAQ,yBAAyBO,EAAM,IAAIA,EAAM,IAAI;AAClE,IAAIT,IAAM,KAAKU,IAAOV,IAClBS,IAAQ,EAAE,MAAMZ,GAAM,IAAI,OAAS,IAE9BE,IAAM,KAAKW,IAAOX,MACvBU,IAAQ,EAAE,MAAMZ,GAAM,IAAI,OAAS;AAAA,EAE3C;AACA,SAAOY;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index237.js","sources":["../../../node_modules/react-day-picker/dist/esm/helpers/getDates.js"],"sourcesContent":["/**\n * Returns all the dates to display in the calendar.\n *\n * This function calculates the range of dates to display based on the provided\n * display months, constraints, and calendar configuration.\n *\n * @param displayMonths The months to display in the calendar.\n * @param maxDate The maximum date to include in the range.\n * @param props The DayPicker props, including calendar configuration options.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of dates to display in the calendar.\n */\nexport function getDates(displayMonths, maxDate, props, dateLib) {\n const firstMonth = displayMonths[0];\n const lastMonth = displayMonths[displayMonths.length - 1];\n const { ISOWeek, fixedWeeks, broadcastCalendar } = props ?? {};\n const { addDays, differenceInCalendarDays, differenceInCalendarMonths, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, isAfter, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;\n const startWeekFirstDate = broadcastCalendar\n ? startOfBroadcastWeek(firstMonth, dateLib)\n : ISOWeek\n ? startOfISOWeek(firstMonth)\n : startOfWeek(firstMonth);\n const displayMonthsWeekEnd = broadcastCalendar\n ? endOfBroadcastWeek(lastMonth)\n : ISOWeek\n ? endOfISOWeek(endOfMonth(lastMonth))\n : endOfWeek(endOfMonth(lastMonth));\n // If maxDate is set, clamp the grid to the end of that week.\n const constraintWeekEnd = maxDate &&\n (broadcastCalendar\n ? endOfBroadcastWeek(maxDate)\n : ISOWeek\n ? endOfISOWeek(maxDate)\n : endOfWeek(maxDate));\n // Pick the earliest week end between the displayed months and the constraint.\n const gridEndDate = constraintWeekEnd && isAfter(displayMonthsWeekEnd, constraintWeekEnd)\n ? constraintWeekEnd\n : displayMonthsWeekEnd;\n const nOfDays = differenceInCalendarDays(gridEndDate, startWeekFirstDate);\n const nOfMonths = differenceInCalendarMonths(lastMonth, firstMonth) + 1;\n const dates = [];\n for (let i = 0; i <= nOfDays; i++) {\n const date = addDays(startWeekFirstDate, i);\n dates.push(date);\n }\n // If fixed weeks is enabled, add the extra dates to the array\n const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;\n const extraDates = nrOfDaysWithFixedWeeks * nOfMonths;\n if (fixedWeeks && dates.length < extraDates) {\n const daysToAdd = extraDates - dates.length;\n for (let i = 0; i < daysToAdd; i++) {\n const date = addDays(dates[dates.length - 1], 1);\n dates.push(date);\n }\n }\n return dates;\n}\n"],"names":["getDates","displayMonths","maxDate","props","dateLib","firstMonth","lastMonth","ISOWeek","fixedWeeks","broadcastCalendar","addDays","differenceInCalendarDays","differenceInCalendarMonths","endOfBroadcastWeek","endOfISOWeek","endOfMonth","endOfWeek","isAfter","startOfBroadcastWeek","startOfISOWeek","startOfWeek","startWeekFirstDate","displayMonthsWeekEnd","constraintWeekEnd","gridEndDate","nOfDays","nOfMonths","dates","i","date","extraDates","daysToAdd"],"mappings":"AAYO,SAASA,EAASC,GAAeC,GAASC,GAAOC,GAAS;AAC7D,QAAMC,IAAaJ,EAAc,CAAC,GAC5BK,IAAYL,EAAcA,EAAc,SAAS,CAAC,GAClD,EAAE,SAAAM,GAAS,YAAAC,GAAY,mBAAAC,EAAiB,IAAKN,KAAS,CAAA,GACtD,EAAE,SAAAO,GAAS,0BAAAC,GAA0B,4BAAAC,GAA4B,oBAAAC,GAAoB,cAAAC,GAAc,YAAAC,GAAY,WAAAC,GAAW,SAAAC,GAAS,sBAAAC,GAAsB,gBAAAC,GAAgB,aAAAC,EAAW,IAAMhB,GAC1LiB,IAAqBZ,IACrBS,EAAqBb,GAAYD,CAAO,IACxCG,IACIY,EAAed,CAAU,IACzBe,EAAYf,CAAU,GAC1BiB,IAAuBb,IACvBI,EAAmBP,CAAS,IAC5BC,IACIO,EAAaC,EAAWT,CAAS,CAAC,IAClCU,EAAUD,EAAWT,CAAS,CAAC,GAEnCiB,IAAoBrB,MACrBO,IACKI,EAAmBX,CAAO,IAC1BK,IACIO,EAAaZ,CAAO,IACpBc,EAAUd,CAAO,IAEzBsB,IAAcD,KAAqBN,EAAQK,GAAsBC,CAAiB,IAClFA,IACAD,GACAG,IAAUd,EAAyBa,GAAaH,CAAkB,GAClEK,IAAYd,EAA2BN,GAAWD,CAAU,IAAI,GAChEsB,IAAQ,CAAA;AACd,WAASC,IAAI,GAAGA,KAAKH,GAASG,KAAK;AAC/B,UAAMC,IAAOnB,EAAQW,GAAoBO,CAAC;AAC1C,IAAAD,EAAM,KAAKE,CAAI;AAAA,EACnB;AAGA,QAAMC,KADyBrB,IAAoB,KAAK,MACZiB;AAC5C,MAAIlB,KAAcmB,EAAM,SAASG,GAAY;AACzC,UAAMC,IAAYD,IAAaH,EAAM;AACrC,aAASC,IAAI,GAAGA,IAAIG,GAAWH,KAAK;AAChC,YAAMC,IAAOnB,EAAQiB,EAAMA,EAAM,SAAS,CAAC,GAAG,CAAC;AAC/C,MAAAA,EAAM,KAAKE,CAAI;AAAA,IACnB;AAAA,EACJ;AACA,SAAOF;AACX;","x_google_ignoreList":[0]}
package/dist/index238.js CHANGED
@@ -1,16 +1,11 @@
1
- import { defaultDateLib as f } from "./index106.js";
2
- function y(t, r, e = f) {
3
- const n = Array.isArray(r) ? r : [r];
4
- let a = t.from;
5
- const i = e.differenceInCalendarDays(t.to, t.from), s = Math.min(i, 6);
6
- for (let o = 0; o <= s; o++) {
7
- if (n.includes(a.getDay()))
8
- return !0;
9
- a = e.addDays(a, 1);
10
- }
11
- return !1;
1
+ function a(c) {
2
+ const e = [];
3
+ return c.reduce((s, t) => {
4
+ const n = t.weeks.reduce((r, i) => r.concat(i.days.slice()), e.slice());
5
+ return s.concat(n.slice());
6
+ }, e.slice());
12
7
  }
13
8
  export {
14
- y as rangeContainsDayOfWeek
9
+ a as getDays
15
10
  };
16
11
  //# sourceMappingURL=index238.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index238.js","sources":["../../../node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js"],"sourcesContent":["import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Checks if a date range contains one or more specified days of the week.\n *\n * @since 9.2.2\n * @param range - The date range to check.\n * @param dayOfWeek - The day(s) of the week to check for (`0-6`, where `0` is\n * Sunday).\n * @param dateLib - The date utility library instance.\n * @returns `true` if the range contains the specified day(s) of the week,\n * otherwise `false`.\n * @group Utilities\n */\nexport function rangeContainsDayOfWeek(range, dayOfWeek, dateLib = defaultDateLib) {\n const dayOfWeekArr = !Array.isArray(dayOfWeek) ? [dayOfWeek] : dayOfWeek;\n let date = range.from;\n const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);\n // iterate at maximum one week or the total days if the range is shorter than one week\n const totalDaysLimit = Math.min(totalDays, 6);\n for (let i = 0; i <= totalDaysLimit; i++) {\n if (dayOfWeekArr.includes(date.getDay())) {\n return true;\n }\n date = dateLib.addDays(date, 1);\n }\n return false;\n}\n"],"names":["rangeContainsDayOfWeek","range","dayOfWeek","dateLib","defaultDateLib","dayOfWeekArr","date","totalDays","totalDaysLimit","i"],"mappings":";AAaO,SAASA,EAAuBC,GAAOC,GAAWC,IAAUC,GAAgB;AAC/E,QAAMC,IAAgB,MAAM,QAAQH,CAAS,IAAkBA,IAAd,CAACA,CAAS;AAC3D,MAAII,IAAOL,EAAM;AACjB,QAAMM,IAAYJ,EAAQ,yBAAyBF,EAAM,IAAIA,EAAM,IAAI,GAEjEO,IAAiB,KAAK,IAAID,GAAW,CAAC;AAC5C,WAASE,IAAI,GAAGA,KAAKD,GAAgBC,KAAK;AACtC,QAAIJ,EAAa,SAASC,EAAK,OAAM,CAAE;AACnC,aAAO;AAEX,IAAAA,IAAOH,EAAQ,QAAQG,GAAM,CAAC;AAAA,EAClC;AACA,SAAO;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index238.js","sources":["../../../node_modules/react-day-picker/dist/esm/helpers/getDays.js"],"sourcesContent":["/**\n * Returns all the days belonging to the calendar by merging the days in the\n * weeks for each month.\n *\n * @param calendarMonths The array of calendar months.\n * @returns An array of `CalendarDay` objects representing all the days in the\n * calendar.\n */\nexport function getDays(calendarMonths) {\n const initialDays = [];\n return calendarMonths.reduce((days, month) => {\n const weekDays = month.weeks.reduce((weekDays, week) => {\n return weekDays.concat(week.days.slice());\n }, initialDays.slice());\n return days.concat(weekDays.slice());\n }, initialDays.slice());\n}\n"],"names":["getDays","calendarMonths","initialDays","days","month","weekDays","week"],"mappings":"AAQO,SAASA,EAAQC,GAAgB;AACpC,QAAMC,IAAc,CAAA;AACpB,SAAOD,EAAe,OAAO,CAACE,GAAMC,MAAU;AAC1C,UAAMC,IAAWD,EAAM,MAAM,OAAO,CAACC,GAAUC,MACpCD,EAAS,OAAOC,EAAK,KAAK,MAAK,CAAE,GACzCJ,EAAY,OAAO;AACtB,WAAOC,EAAK,OAAOE,EAAS,MAAK,CAAE;AAAA,EACvC,GAAGH,EAAY,OAAO;AAC1B;","x_google_ignoreList":[0]}
package/dist/index239.js CHANGED
@@ -1,29 +1,14 @@
1
- import { defaultDateLib as p } from "./index106.js";
2
- import { dateMatchModifiers as s } from "./index32.js";
3
- import { rangeContainsDayOfWeek as M } from "./index238.js";
4
- import { rangeIncludesDate as l } from "./index126.js";
5
- import { rangeOverlaps as y } from "./index240.js";
6
- import { isDatesArray as a, isDateRange as A, isDayOfWeekType as C, isDateInterval as I, isDateAfterType as v, isDateBeforeType as F } from "./index128.js";
7
- function d(n, t, f = p) {
8
- const e = Array.isArray(t) ? t : [t];
9
- if (e.filter((o) => typeof o != "function").some((o) => typeof o == "boolean" ? o : f.isDate(o) ? l(n, o, !1, f) : a(o, f) ? o.some((r) => l(n, r, !1, f)) : A(o) ? o.from && o.to ? y(n, { from: o.from, to: o.to }, f) : !1 : C(o) ? M(n, o.dayOfWeek, f) : I(o) ? f.isAfter(o.before, o.after) ? y(n, {
10
- from: f.addDays(o.after, 1),
11
- to: f.addDays(o.before, -1)
12
- }, f) : s(n.from, o, f) || s(n.to, o, f) : v(o) || F(o) ? s(n.from, o, f) || s(n.to, o, f) : !1))
13
- return !0;
14
- const i = e.filter((o) => typeof o == "function");
15
- if (i.length) {
16
- let o = n.from;
17
- const r = f.differenceInCalendarDays(n.to, n.from);
18
- for (let u = 0; u <= r; u++) {
19
- if (i.some((D) => D(o)))
20
- return !0;
21
- o = f.addDays(o, 1);
22
- }
1
+ function i(e, o, h, r) {
2
+ const { numberOfMonths: f = 1 } = h, n = [];
3
+ for (let t = 0; t < f; t++) {
4
+ const s = r.addMonths(e, t);
5
+ if (o && s > o)
6
+ break;
7
+ n.push(s);
23
8
  }
24
- return !1;
9
+ return n;
25
10
  }
26
11
  export {
27
- d as rangeContainsModifiers
12
+ i as getDisplayMonths
28
13
  };
29
14
  //# sourceMappingURL=index239.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index239.js","sources":["../../../node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js"],"sourcesContent":["import { defaultDateLib } from \"../classes/DateLib.js\";\nimport { dateMatchModifiers } from \"./dateMatchModifiers.js\";\nimport { rangeContainsDayOfWeek } from \"./rangeContainsDayOfWeek.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\nimport { rangeOverlaps } from \"./rangeOverlaps.js\";\nimport { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDatesArray, isDayOfWeekType, } from \"./typeguards.js\";\n/**\n * Checks if a date range contains dates that match the given modifiers.\n *\n * @since 9.2.2\n * @param range - The date range to check.\n * @param modifiers - The modifiers to match against.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the range contains matching dates, otherwise `false`.\n * @group Utilities\n */\nexport function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {\n const matchers = Array.isArray(modifiers) ? modifiers : [modifiers];\n // Defer function matchers evaluation as they are the least performant.\n const nonFunctionMatchers = matchers.filter((matcher) => typeof matcher !== \"function\");\n const nonFunctionMatchersResult = nonFunctionMatchers.some((matcher) => {\n if (typeof matcher === \"boolean\")\n return matcher;\n if (dateLib.isDate(matcher)) {\n return rangeIncludesDate(range, matcher, false, dateLib);\n }\n if (isDatesArray(matcher, dateLib)) {\n return matcher.some((date) => rangeIncludesDate(range, date, false, dateLib));\n }\n if (isDateRange(matcher)) {\n if (matcher.from && matcher.to) {\n return rangeOverlaps(range, { from: matcher.from, to: matcher.to }, dateLib);\n }\n return false;\n }\n if (isDayOfWeekType(matcher)) {\n return rangeContainsDayOfWeek(range, matcher.dayOfWeek, dateLib);\n }\n if (isDateInterval(matcher)) {\n const isClosedInterval = dateLib.isAfter(matcher.before, matcher.after);\n if (isClosedInterval) {\n return rangeOverlaps(range, {\n from: dateLib.addDays(matcher.after, 1),\n to: dateLib.addDays(matcher.before, -1),\n }, dateLib);\n }\n return (dateMatchModifiers(range.from, matcher, dateLib) ||\n dateMatchModifiers(range.to, matcher, dateLib));\n }\n if (isDateAfterType(matcher) || isDateBeforeType(matcher)) {\n return (dateMatchModifiers(range.from, matcher, dateLib) ||\n dateMatchModifiers(range.to, matcher, dateLib));\n }\n return false;\n });\n if (nonFunctionMatchersResult) {\n return true;\n }\n const functionMatchers = matchers.filter((matcher) => typeof matcher === \"function\");\n if (functionMatchers.length) {\n let date = range.from;\n const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);\n for (let i = 0; i <= totalDays; i++) {\n if (functionMatchers.some((matcher) => matcher(date))) {\n return true;\n }\n date = dateLib.addDays(date, 1);\n }\n }\n return false;\n}\n"],"names":["rangeContainsModifiers","range","modifiers","dateLib","defaultDateLib","matchers","matcher","rangeIncludesDate","isDatesArray","date","isDateRange","rangeOverlaps","isDayOfWeekType","rangeContainsDayOfWeek","isDateInterval","dateMatchModifiers","isDateAfterType","isDateBeforeType","functionMatchers","totalDays","i"],"mappings":";;;;;;AAgBO,SAASA,EAAuBC,GAAOC,GAAWC,IAAUC,GAAgB;AAC/E,QAAMC,IAAW,MAAM,QAAQH,CAAS,IAAIA,IAAY,CAACA,CAAS;AAsClE,MApC4BG,EAAS,OAAO,CAACC,MAAY,OAAOA,KAAY,UAAU,EAChC,KAAK,CAACA,MACpD,OAAOA,KAAY,YACZA,IACPH,EAAQ,OAAOG,CAAO,IACfC,EAAkBN,GAAOK,GAAS,IAAOH,CAAO,IAEvDK,EAAaF,GAASH,CAAO,IACtBG,EAAQ,KAAK,CAACG,MAASF,EAAkBN,GAAOQ,GAAM,IAAON,CAAO,CAAC,IAE5EO,EAAYJ,CAAO,IACfA,EAAQ,QAAQA,EAAQ,KACjBK,EAAcV,GAAO,EAAE,MAAMK,EAAQ,MAAM,IAAIA,EAAQ,GAAE,GAAIH,CAAO,IAExE,KAEPS,EAAgBN,CAAO,IAChBO,EAAuBZ,GAAOK,EAAQ,WAAWH,CAAO,IAE/DW,EAAeR,CAAO,IACGH,EAAQ,QAAQG,EAAQ,QAAQA,EAAQ,KAAK,IAE3DK,EAAcV,GAAO;AAAA,IACxB,MAAME,EAAQ,QAAQG,EAAQ,OAAO,CAAC;AAAA,IACtC,IAAIH,EAAQ,QAAQG,EAAQ,QAAQ,EAAE;AAAA,EAC1D,GAAmBH,CAAO,IAENY,EAAmBd,EAAM,MAAMK,GAASH,CAAO,KACnDY,EAAmBd,EAAM,IAAIK,GAASH,CAAO,IAEjDa,EAAgBV,CAAO,KAAKW,EAAiBX,CAAO,IAC5CS,EAAmBd,EAAM,MAAMK,GAASH,CAAO,KACnDY,EAAmBd,EAAM,IAAIK,GAASH,CAAO,IAE9C,EACV;AAEG,WAAO;AAEX,QAAMe,IAAmBb,EAAS,OAAO,CAACC,MAAY,OAAOA,KAAY,UAAU;AACnF,MAAIY,EAAiB,QAAQ;AACzB,QAAIT,IAAOR,EAAM;AACjB,UAAMkB,IAAYhB,EAAQ,yBAAyBF,EAAM,IAAIA,EAAM,IAAI;AACvE,aAASmB,IAAI,GAAGA,KAAKD,GAAWC,KAAK;AACjC,UAAIF,EAAiB,KAAK,CAACZ,MAAYA,EAAQG,CAAI,CAAC;AAChD,eAAO;AAEX,MAAAA,IAAON,EAAQ,QAAQM,GAAM,CAAC;AAAA,IAClC;AAAA,EACJ;AACA,SAAO;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index239.js","sources":["../../../node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js"],"sourcesContent":["/**\n * Returns the months to display in the calendar.\n *\n * @param firstDisplayedMonth The first month currently displayed in the\n * calendar.\n * @param calendarEndMonth The latest month the user can navigate to.\n * @param props The DayPicker props, including `numberOfMonths`.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of dates representing the months to display.\n */\nexport function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib) {\n const { numberOfMonths = 1 } = props;\n const months = [];\n for (let i = 0; i < numberOfMonths; i++) {\n const month = dateLib.addMonths(firstDisplayedMonth, i);\n if (calendarEndMonth && month > calendarEndMonth) {\n break;\n }\n months.push(month);\n }\n return months;\n}\n"],"names":["getDisplayMonths","firstDisplayedMonth","calendarEndMonth","props","dateLib","numberOfMonths","months","i","month"],"mappings":"AAUO,SAASA,EAAiBC,GAAqBC,GAAkBC,GAAOC,GAAS;AACpF,QAAM,EAAE,gBAAAC,IAAiB,EAAC,IAAKF,GACzBG,IAAS,CAAA;AACf,WAASC,IAAI,GAAGA,IAAIF,GAAgBE,KAAK;AACrC,UAAMC,IAAQJ,EAAQ,UAAUH,GAAqBM,CAAC;AACtD,QAAIL,KAAoBM,IAAQN;AAC5B;AAEJ,IAAAI,EAAO,KAAKE,CAAK;AAAA,EACrB;AACA,SAAOF;AACX;","x_google_ignoreList":[0]}
package/dist/index240.js CHANGED
@@ -1,9 +1,14 @@
1
- import { rangeIncludesDate as m } from "./index126.js";
2
- import { defaultDateLib as r } from "./index106.js";
3
- function u(o, f, l = r) {
4
- return m(o, f.from, !1, l) || m(o, f.to, !1, l) || m(f, o.from, !1, l) || m(f, o.to, !1, l);
1
+ function u(i, o, n, e) {
2
+ const { month: s, defaultMonth: M, today: c = e.today(), numberOfMonths: f = 1 } = i;
3
+ let t = s || M || c;
4
+ const { differenceInCalendarMonths: h, addMonths: l, startOfMonth: r } = e;
5
+ if (n && h(n, t) < f - 1) {
6
+ const d = -1 * (f - 1);
7
+ t = l(n, d);
8
+ }
9
+ return o && h(t, o) < 0 && (t = o), r(t);
5
10
  }
6
11
  export {
7
- u as rangeOverlaps
12
+ u as getInitialMonth
8
13
  };
9
14
  //# sourceMappingURL=index240.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index240.js","sources":["../../../node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js"],"sourcesContent":["import { defaultDateLib } from \"../classes/index.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\n/**\n * Determines if two date ranges overlap.\n *\n * @since 9.2.2\n * @param rangeLeft - The first date range.\n * @param rangeRight - The second date range.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the ranges overlap, otherwise `false`.\n * @group Utilities\n */\nexport function rangeOverlaps(rangeLeft, rangeRight, dateLib = defaultDateLib) {\n return (rangeIncludesDate(rangeLeft, rangeRight.from, false, dateLib) ||\n rangeIncludesDate(rangeLeft, rangeRight.to, false, dateLib) ||\n rangeIncludesDate(rangeRight, rangeLeft.from, false, dateLib) ||\n rangeIncludesDate(rangeRight, rangeLeft.to, false, dateLib));\n}\n"],"names":["rangeOverlaps","rangeLeft","rangeRight","dateLib","defaultDateLib","rangeIncludesDate"],"mappings":";;AAYO,SAASA,EAAcC,GAAWC,GAAYC,IAAUC,GAAgB;AAC3E,SAAQC,EAAkBJ,GAAWC,EAAW,MAAM,IAAOC,CAAO,KAChEE,EAAkBJ,GAAWC,EAAW,IAAI,IAAOC,CAAO,KAC1DE,EAAkBH,GAAYD,EAAU,MAAM,IAAOE,CAAO,KAC5DE,EAAkBH,GAAYD,EAAU,IAAI,IAAOE,CAAO;AAClE;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index240.js","sources":["../../../node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js"],"sourcesContent":["/**\n * Determines the initial month to display in the calendar based on the provided\n * props.\n *\n * This function calculates the starting month, considering constraints such as\n * `startMonth`, `endMonth`, and the number of months to display.\n *\n * @param props The DayPicker props, including navigation and date constraints.\n * @param dateLib The date library to use for date manipulation.\n * @returns The initial month to display.\n */\nexport function getInitialMonth(props, navStart, navEnd, dateLib) {\n const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1, } = props;\n let initialMonth = month || defaultMonth || today;\n const { differenceInCalendarMonths, addMonths, startOfMonth } = dateLib;\n if (navEnd &&\n differenceInCalendarMonths(navEnd, initialMonth) < numberOfMonths - 1) {\n const offset = -1 * (numberOfMonths - 1);\n initialMonth = addMonths(navEnd, offset);\n }\n if (navStart && differenceInCalendarMonths(initialMonth, navStart) < 0) {\n initialMonth = navStart;\n }\n return startOfMonth(initialMonth);\n}\n"],"names":["getInitialMonth","props","navStart","navEnd","dateLib","month","defaultMonth","today","numberOfMonths","initialMonth","differenceInCalendarMonths","addMonths","startOfMonth","offset"],"mappings":"AAWO,SAASA,EAAgBC,GAAOC,GAAUC,GAAQC,GAAS;AAC9D,QAAM,EAAE,OAAAC,GAAO,cAAAC,GAAc,OAAAC,IAAQH,EAAQ,SAAS,gBAAAI,IAAiB,EAAC,IAAMP;AAC9E,MAAIQ,IAAeJ,KAASC,KAAgBC;AAC5C,QAAM,EAAE,4BAAAG,GAA4B,WAAAC,GAAW,cAAAC,EAAY,IAAKR;AAChE,MAAID,KACAO,EAA2BP,GAAQM,CAAY,IAAID,IAAiB,GAAG;AACvE,UAAMK,IAAS,MAAML,IAAiB;AACtC,IAAAC,IAAeE,EAAUR,GAAQU,CAAM;AAAA,EAC3C;AACA,SAAIX,KAAYQ,EAA2BD,GAAcP,CAAQ,IAAI,MACjEO,IAAeP,IAEZU,EAAaH,CAAY;AACpC;","x_google_ignoreList":[0]}