@nasa-terra/components 0.0.182 → 0.0.184

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 (1238) hide show
  1. package/cdn/chunks/chunk.274VX5AI.js +33 -0
  2. package/cdn/chunks/chunk.2COOP2HT.js +92 -0
  3. package/cdn/chunks/chunk.2JHDT3OE.js +62 -0
  4. package/cdn/chunks/chunk.2OLW33RV.js +19 -0
  5. package/cdn/chunks/chunk.2OMBCMRU.js +224 -0
  6. package/cdn/chunks/chunk.2ON5K7RB.js +19 -0
  7. package/cdn/chunks/chunk.2PC4LFFX.js +278 -0
  8. package/cdn/chunks/chunk.3DJILR54.js +33 -0
  9. package/cdn/chunks/chunk.3E5GSH35.js +36 -0
  10. package/cdn/chunks/chunk.3GNT6KM3.js +19 -0
  11. package/cdn/chunks/chunk.3LCCHEEZ.js +658 -0
  12. package/cdn/chunks/chunk.3OKVMUEH.js +36 -0
  13. package/cdn/chunks/chunk.3OZZA454.js +29 -0
  14. package/cdn/chunks/chunk.3VJXEPK7.js +473 -0
  15. package/cdn/chunks/chunk.3Y7HZ5CS.js +110 -0
  16. package/cdn/chunks/chunk.44ST5MZM.js +19 -0
  17. package/cdn/chunks/chunk.4BYVM4PX.js +104 -0
  18. package/cdn/chunks/chunk.4IUQQZWR.js +19 -0
  19. package/cdn/chunks/chunk.52BSJECH.js +599 -0
  20. package/cdn/chunks/chunk.53TY2RNB.js +78 -0
  21. package/cdn/chunks/chunk.5A3NEGXS.js +37 -0
  22. package/cdn/chunks/chunk.5EE6IBHX.js +1214 -0
  23. package/cdn/chunks/chunk.5LGOTDRZ.js +29 -0
  24. package/cdn/chunks/chunk.5X5LSEUB.js +30 -0
  25. package/cdn/chunks/chunk.62PV6OSL.js +19 -0
  26. package/cdn/chunks/chunk.63OVZYG7.js +134 -0
  27. package/cdn/chunks/chunk.6DK7DS4M.js +19 -0
  28. package/cdn/chunks/chunk.6FVRJALX.js +472 -0
  29. package/cdn/chunks/chunk.6GWEFJWJ.js +32 -0
  30. package/cdn/chunks/chunk.6HCUGKE5.js +1975 -0
  31. package/cdn/chunks/chunk.6HMBO3QD.js +29 -0
  32. package/cdn/chunks/chunk.6PLVT3D2.js +19 -0
  33. package/cdn/chunks/chunk.6VE4J7SY.js +29 -0
  34. package/cdn/chunks/chunk.6YQGTQFL.js +610 -0
  35. package/cdn/chunks/chunk.7GNY4ZJJ.js +29 -0
  36. package/cdn/chunks/chunk.7PIPEENX.js +19 -0
  37. package/cdn/chunks/chunk.7WAQYDVX.js +524 -0
  38. package/cdn/chunks/chunk.AB6KJNJM.js +19 -0
  39. package/cdn/chunks/chunk.AFIJHX2X.js +32 -0
  40. package/cdn/chunks/chunk.AMT6MWBH.js +99 -0
  41. package/cdn/chunks/chunk.ASJLND3B.js +77 -0
  42. package/cdn/chunks/chunk.ATXIS4CA.js +259 -0
  43. package/cdn/chunks/chunk.B5RBVEDG.js +29 -0
  44. package/cdn/chunks/chunk.BDK4L4WK.js +29 -0
  45. package/cdn/chunks/chunk.BTEZPLI7.js +47 -0
  46. package/cdn/chunks/chunk.BXZ6O6V3.js +19 -0
  47. package/cdn/chunks/chunk.C2ZGHGK2.js +19 -0
  48. package/cdn/chunks/chunk.C32YXNVL.js +34 -0
  49. package/cdn/chunks/chunk.C3QNE7FJ.js +29 -0
  50. package/cdn/chunks/chunk.C3QXDFAH.js +19 -0
  51. package/cdn/chunks/chunk.CE3AARJN.js +29 -0
  52. package/cdn/chunks/chunk.CSHS47RP.js +132 -0
  53. package/cdn/chunks/chunk.CTSWDN2G.js +29 -0
  54. package/cdn/chunks/chunk.CUFMBAD2.js +19 -0
  55. package/cdn/chunks/chunk.CZTP7RAP.js +41 -0
  56. package/cdn/chunks/chunk.D5BXM7U5.js +83 -0
  57. package/cdn/chunks/chunk.DIP23AEI.js +37 -0
  58. package/cdn/chunks/chunk.DPIORTI4.js +285 -0
  59. package/cdn/chunks/chunk.DVD24B3N.js +915 -0
  60. package/cdn/chunks/chunk.E7SEBTAI.js +19 -0
  61. package/cdn/chunks/chunk.EEUIXTNL.js +19 -0
  62. package/cdn/chunks/chunk.EHCXCQGT.js +238 -0
  63. package/cdn/chunks/chunk.EIYQWVOJ.js +29 -0
  64. package/cdn/chunks/chunk.EKETYP36.js +29 -0
  65. package/cdn/chunks/chunk.EPGCAEJC.js +32 -0
  66. package/cdn/chunks/chunk.ET3OUNBN.js +443 -0
  67. package/cdn/chunks/chunk.EVJH7XI7.js +36 -0
  68. package/cdn/chunks/chunk.F5SBX6VV.js +134 -0
  69. package/cdn/chunks/chunk.F5SNOFIV.js +60 -0
  70. package/cdn/chunks/chunk.F7QE3QNK.js +93 -0
  71. package/cdn/chunks/chunk.FB3LJUBW.js +2547 -0
  72. package/cdn/chunks/chunk.FDZ5TH57.js +29 -0
  73. package/cdn/chunks/chunk.FGXBKEPR.js +29 -0
  74. package/cdn/chunks/chunk.FHWPE6NH.js +19 -0
  75. package/cdn/chunks/chunk.FMX64JFI.js +19 -0
  76. package/cdn/chunks/chunk.G2ARBBZQ.js +19 -0
  77. package/cdn/chunks/chunk.G2O2RQFY.js +35 -0
  78. package/cdn/chunks/chunk.G4TTYSEU.js +19 -0
  79. package/cdn/chunks/chunk.GAKHU2N3.js +19 -0
  80. package/cdn/chunks/chunk.GDM5LC5C.js +19 -0
  81. package/cdn/chunks/chunk.GKEFLWAI.js +276 -0
  82. package/cdn/chunks/chunk.GQGD7EUL.js +32 -0
  83. package/cdn/chunks/chunk.GW77754P.js +74 -0
  84. package/cdn/chunks/chunk.H62L42LE.js +36 -0
  85. package/cdn/chunks/chunk.HHA43ML3.js +93 -0
  86. package/cdn/chunks/chunk.HKDDZJ35.js +29 -0
  87. package/cdn/chunks/chunk.HNALPS6Z.js +897 -0
  88. package/cdn/chunks/chunk.HRQAMWT5.js +19 -0
  89. package/cdn/chunks/chunk.I4XIIXW7.js +113 -0
  90. package/cdn/chunks/chunk.I5LQG5RB.js +165 -0
  91. package/cdn/chunks/chunk.I6DEIO6Q.js +136 -0
  92. package/cdn/chunks/chunk.IFRWRZDM.js +662 -0
  93. package/cdn/chunks/chunk.IFZEC32K.js +19 -0
  94. package/cdn/chunks/chunk.IJS3GPFM.js +19 -0
  95. package/cdn/chunks/chunk.IS6BRYWN.js +151 -0
  96. package/cdn/chunks/chunk.ITBUKQE5.js +35 -0
  97. package/cdn/chunks/chunk.IUT6COGR.js +359 -0
  98. package/cdn/chunks/chunk.JGXOO23U.js +60 -0
  99. package/cdn/chunks/chunk.JMBLKEYF.js +32 -0
  100. package/cdn/chunks/chunk.JPJJZYRR.js +29 -0
  101. package/cdn/chunks/chunk.JS5OOQLY.js +125 -0
  102. package/cdn/chunks/chunk.JSGR2CDK.js +33 -0
  103. package/cdn/chunks/chunk.JYFFNFR3.js +514 -0
  104. package/cdn/chunks/chunk.KBS3WI6G.js +56075 -0
  105. package/cdn/chunks/chunk.KE6Y7CXX.js +19 -0
  106. package/cdn/chunks/chunk.KFLNDUMJ.js +34 -0
  107. package/cdn/chunks/chunk.KTAPQACH.js +329 -0
  108. package/cdn/chunks/chunk.KZ3GPG5T.js +32 -0
  109. package/cdn/chunks/chunk.LRZIT4M2.js +157 -0
  110. package/cdn/chunks/chunk.LZSXC3BB.js +19 -0
  111. package/cdn/chunks/chunk.M4GCODBW.js +82 -0
  112. package/cdn/chunks/chunk.M7T7VMI3.js +19 -0
  113. package/cdn/chunks/chunk.MAHUWVEN.js +279 -0
  114. package/cdn/chunks/chunk.MBBHTNRG.js +477 -0
  115. package/cdn/chunks/chunk.MCTEOASF.js +19 -0
  116. package/cdn/chunks/chunk.MGWUWXM3.js +189 -0
  117. package/cdn/chunks/chunk.MNFNXC6U.js +32 -0
  118. package/cdn/chunks/chunk.MPDZAAOU.js +49 -0
  119. package/cdn/chunks/chunk.MWZTSDCV.js +188 -0
  120. package/cdn/chunks/chunk.MZAPEWWP.js +234 -0
  121. package/cdn/chunks/chunk.N4WZUEQD.js +205 -0
  122. package/cdn/chunks/chunk.NC6VRDSJ.js +288 -0
  123. package/cdn/chunks/chunk.NNGRV4QU.js +493 -0
  124. package/cdn/chunks/chunk.NTFHUGMR.js +293 -0
  125. package/cdn/chunks/chunk.NZEB6X4P.js +123 -0
  126. package/cdn/chunks/chunk.O2NJI5V4.js +904 -0
  127. package/cdn/chunks/chunk.O2YB6XK5.js +29 -0
  128. package/cdn/chunks/chunk.O6DW6QFG.js +19 -0
  129. package/cdn/chunks/chunk.ODAEGFX3.js +29 -0
  130. package/cdn/chunks/chunk.OERYIF2J.js +19 -0
  131. package/cdn/chunks/chunk.OHN3HAHB.js +35 -0
  132. package/cdn/chunks/chunk.OKCVFWXM.js +29 -0
  133. package/cdn/chunks/chunk.PJ53QCHG.js +19 -0
  134. package/cdn/chunks/chunk.PMEE53UO.js +19 -0
  135. package/cdn/chunks/chunk.PWFN3WND.js +33 -0
  136. package/cdn/chunks/chunk.QBNRYJM2.js +34 -0
  137. package/cdn/chunks/chunk.QIOFTZRF.js +29 -0
  138. package/cdn/chunks/chunk.QKKAIJRP.js +3451 -0
  139. package/cdn/chunks/chunk.QO2AC2B6.js +29 -0
  140. package/cdn/chunks/chunk.QROOTROX.js +29 -0
  141. package/cdn/chunks/chunk.QWBMU2QG.js +2244 -0
  142. package/cdn/chunks/chunk.QZEPPLFA.js +19 -0
  143. package/cdn/chunks/chunk.R32NPMVI.js +19 -0
  144. package/cdn/chunks/chunk.RDDBI4SY.js +19 -0
  145. package/cdn/chunks/chunk.RF22GUSL.js +19 -0
  146. package/cdn/chunks/chunk.RIQ363XS.js +35 -0
  147. package/cdn/chunks/chunk.RISDH34C.js +350 -0
  148. package/cdn/chunks/chunk.RK6AG45O.js +86 -0
  149. package/cdn/chunks/chunk.RMBNJDJ4.js +19 -0
  150. package/cdn/chunks/chunk.RPFRSE2Z.js +29 -0
  151. package/cdn/chunks/chunk.RVVU4PMP.js +32 -0
  152. package/cdn/chunks/chunk.SELO7XG4.js +19 -0
  153. package/cdn/chunks/chunk.SG5IOVFZ.js +19 -0
  154. package/cdn/chunks/chunk.SLZNBYNJ.js +29 -0
  155. package/cdn/chunks/chunk.SOI2X32A.js +68 -0
  156. package/cdn/chunks/chunk.SRJ75TMH.js +32 -0
  157. package/cdn/chunks/chunk.SRJEHYGM.js +19 -0
  158. package/cdn/chunks/chunk.SUMHKERD.js +19 -0
  159. package/cdn/chunks/chunk.SWRMAID5.js +29 -0
  160. package/cdn/chunks/chunk.SXHVPE4R.js +155 -0
  161. package/cdn/chunks/chunk.T5ERJS5E.js +190 -0
  162. package/cdn/chunks/chunk.T6LNVJID.js +29 -0
  163. package/cdn/chunks/chunk.TBMDIMBM.js +231 -0
  164. package/cdn/chunks/chunk.TEJLFDZH.js +19 -0
  165. package/cdn/chunks/chunk.TEP52AIU.js +99 -0
  166. package/cdn/chunks/chunk.TF4K5RD6.js +19 -0
  167. package/cdn/chunks/chunk.TF7ANYU2.js +538 -0
  168. package/cdn/chunks/chunk.TJDDNEVM.js +19 -0
  169. package/cdn/chunks/chunk.TM5Y6BSP.js +19 -0
  170. package/cdn/chunks/chunk.TNP73SJ5.js +32 -0
  171. package/cdn/chunks/chunk.TTPP3CSY.js +19 -0
  172. package/cdn/chunks/chunk.TW7BQM7L.js +19 -0
  173. package/cdn/chunks/chunk.TWOF5TOT.js +616 -0
  174. package/cdn/chunks/chunk.U4IQLDWL.js +29 -0
  175. package/cdn/chunks/chunk.UAVWWFC5.js +19 -0
  176. package/cdn/chunks/chunk.UOVG57JU.js +19 -0
  177. package/cdn/chunks/chunk.USUBCPNS.js +19 -0
  178. package/cdn/chunks/chunk.UZMGM6H5.js +230 -0
  179. package/cdn/chunks/chunk.UZWCAVHY.js +19 -0
  180. package/cdn/chunks/chunk.V36ZUPD5.js +1184 -0
  181. package/cdn/chunks/chunk.VBU7CRTE.js +33 -0
  182. package/cdn/chunks/chunk.VFK35CBK.js +19 -0
  183. package/cdn/chunks/chunk.VJDGDFD5.js +19 -0
  184. package/cdn/chunks/chunk.VMEZAS4X.js +19 -0
  185. package/cdn/chunks/chunk.VRGSSGVY.js +19 -0
  186. package/cdn/chunks/chunk.VTN3LLII.js +71 -0
  187. package/cdn/chunks/chunk.WG4VDVEI.js +81 -0
  188. package/cdn/chunks/chunk.WJI7HHQV.js +372 -0
  189. package/cdn/chunks/chunk.WMF22SGF.js +106 -0
  190. package/cdn/chunks/chunk.XDETGEJR.js +32 -0
  191. package/cdn/chunks/chunk.XFO6JLYU.js +19 -0
  192. package/cdn/chunks/chunk.XFWUFFZG.js +32 -0
  193. package/cdn/chunks/chunk.XJ4QKE2M.js +32 -0
  194. package/cdn/chunks/chunk.XLYTCSQO.js +357 -0
  195. package/cdn/chunks/chunk.XN6332FW.js +29 -0
  196. package/cdn/chunks/chunk.XOHFDFCI.js +29 -0
  197. package/cdn/chunks/chunk.XRTCNTPM.js +32 -0
  198. package/cdn/chunks/chunk.Y4RMP4KI.js +310 -0
  199. package/cdn/chunks/chunk.YGUGZHSD.js +161 -0
  200. package/cdn/chunks/chunk.YKJYMCXN.js +29 -0
  201. package/cdn/chunks/chunk.YMX3QFGQ.js +19 -0
  202. package/cdn/chunks/chunk.YYZAGLR2.js +19 -0
  203. package/cdn/chunks/chunk.Z7JDZDUA.js +545 -0
  204. package/cdn/chunks/chunk.ZDSLEDNT.js +19 -0
  205. package/cdn/chunks/chunk.ZJCOHF3E.js +19 -0
  206. package/cdn/chunks/chunk.ZK7FRBFD.js +39 -0
  207. package/cdn/chunks/chunk.ZSUWMTM2.js +19 -0
  208. package/cdn/chunks/chunk.ZUKS3ZCP.js +264 -0
  209. package/cdn/components/accordion/accordion.component.js +5 -5
  210. package/cdn/components/accordion/accordion.js +6 -6
  211. package/cdn/components/alert/alert.component.js +3 -3
  212. package/cdn/components/alert/alert.js +4 -4
  213. package/cdn/components/avatar/avatar.component.js +7 -7
  214. package/cdn/components/avatar/avatar.js +8 -8
  215. package/cdn/components/badge/badge.component.js +2 -2
  216. package/cdn/components/badge/badge.js +3 -3
  217. package/cdn/components/breadcrumb/breadcrumb.component.js +2 -2
  218. package/cdn/components/breadcrumb/breadcrumb.js +3 -3
  219. package/cdn/components/breadcrumbs/breadcrumbs.component.js +2 -2
  220. package/cdn/components/breadcrumbs/breadcrumbs.js +3 -3
  221. package/cdn/components/browse-variables/browse-variables.component.js +17 -17
  222. package/cdn/components/browse-variables/browse-variables.js +18 -18
  223. package/cdn/components/button/button.component.js +7 -7
  224. package/cdn/components/button/button.js +8 -8
  225. package/cdn/components/button-group/button-group.component.js +2 -2
  226. package/cdn/components/button-group/button-group.js +3 -3
  227. package/cdn/components/caption/caption.component.js +2 -2
  228. package/cdn/components/caption/caption.js +3 -3
  229. package/cdn/components/card/card.component.js +2 -2
  230. package/cdn/components/card/card.js +3 -3
  231. package/cdn/components/checkbox/checkbox.component.js +8 -8
  232. package/cdn/components/checkbox/checkbox.js +9 -9
  233. package/cdn/components/chip/chip.component.js +2 -2
  234. package/cdn/components/chip/chip.js +3 -3
  235. package/cdn/components/combobox/combobox.component.js +6 -6
  236. package/cdn/components/combobox/combobox.js +7 -7
  237. package/cdn/components/data-access/data-access.component.js +29 -29
  238. package/cdn/components/data-access/data-access.js +30 -30
  239. package/cdn/components/data-grid/data-grid.component.js +5 -5
  240. package/cdn/components/data-grid/data-grid.js +6 -6
  241. package/cdn/components/data-rods/data-rods.component.js +38 -38
  242. package/cdn/components/data-rods/data-rods.js +39 -39
  243. package/cdn/components/data-subsetter/data-subsetter.component.js +40 -40
  244. package/cdn/components/data-subsetter/data-subsetter.js +41 -41
  245. package/cdn/components/data-subsetter/notebooks/subsetter-notebook.js +1 -1
  246. package/cdn/components/data-subsetter-history/data-subsetter-history.component.js +41 -41
  247. package/cdn/components/data-subsetter-history/data-subsetter-history.js +42 -42
  248. package/cdn/components/date-picker/date-picker.component.js +14 -14
  249. package/cdn/components/date-picker/date-picker.js +15 -15
  250. package/cdn/components/date-range-slider/date-range-slider.component.js +2 -2
  251. package/cdn/components/date-range-slider/date-range-slider.js +3 -3
  252. package/cdn/components/dialog/dialog.component.js +9 -9
  253. package/cdn/components/dialog/dialog.js +10 -10
  254. package/cdn/components/divider/divider.component.js +2 -2
  255. package/cdn/components/divider/divider.js +3 -3
  256. package/cdn/components/dropdown/dropdown.component.js +3 -3
  257. package/cdn/components/dropdown/dropdown.js +4 -4
  258. package/cdn/components/earthdata-login/earthdata-login.component.js +15 -15
  259. package/cdn/components/earthdata-login/earthdata-login.js +16 -16
  260. package/cdn/components/file-upload/file-upload.component.js +2 -2
  261. package/cdn/components/file-upload/file-upload.js +3 -3
  262. package/cdn/components/harmony-history/harmony-history.component.js +13 -13
  263. package/cdn/components/harmony-history/harmony-history.js +14 -14
  264. package/cdn/components/icon/icon.component.js +3 -3
  265. package/cdn/components/icon/icon.js +4 -4
  266. package/cdn/components/input/input.component.js +8 -8
  267. package/cdn/components/input/input.js +9 -9
  268. package/cdn/components/loader/loader.component.js +2 -2
  269. package/cdn/components/loader/loader.js +3 -3
  270. package/cdn/components/login/login.component.js +12 -12
  271. package/cdn/components/login/login.js +13 -13
  272. package/cdn/components/map/map.component.js +4 -4
  273. package/cdn/components/map/map.js +5 -5
  274. package/cdn/components/menu/menu.component.js +2 -2
  275. package/cdn/components/menu/menu.js +3 -3
  276. package/cdn/components/menu-item/menu-item.component.js +11 -11
  277. package/cdn/components/menu-item/menu-item.js +12 -12
  278. package/cdn/components/menu-item/submenu-controller.js +3 -3
  279. package/cdn/components/option/option.component.js +6 -6
  280. package/cdn/components/option/option.js +7 -7
  281. package/cdn/components/pagination/pagination.component.js +6 -6
  282. package/cdn/components/pagination/pagination.js +7 -7
  283. package/cdn/components/plot/plot.component.js +2 -2
  284. package/cdn/components/plot/plot.js +3 -3
  285. package/cdn/components/plot-toolbar/notebooks/time-averaged-map-notebook.js +1 -1
  286. package/cdn/components/plot-toolbar/notebooks/time-series-notebook.js +1 -1
  287. package/cdn/components/plot-toolbar/plot-toolbar.component.js +12 -12
  288. package/cdn/components/plot-toolbar/plot-toolbar.js +13 -13
  289. package/cdn/components/popup/popup.component.js +2 -2
  290. package/cdn/components/popup/popup.js +3 -3
  291. package/cdn/components/progress-bar/progress-bar.component.js +2 -2
  292. package/cdn/components/progress-bar/progress-bar.js +3 -3
  293. package/cdn/components/radio/radio.component.js +4 -4
  294. package/cdn/components/radio/radio.js +5 -5
  295. package/cdn/components/radio-group/radio-group.component.js +2 -2
  296. package/cdn/components/radio-group/radio-group.js +3 -3
  297. package/cdn/components/scroll-hint/scroll-hint.component.js +4 -4
  298. package/cdn/components/scroll-hint/scroll-hint.js +5 -5
  299. package/cdn/components/select/select.component.js +10 -10
  300. package/cdn/components/select/select.js +11 -11
  301. package/cdn/components/site-header/site-header.component.js +5 -5
  302. package/cdn/components/site-header/site-header.js +5 -5
  303. package/cdn/components/site-navigation/site-navigation.component.js +2 -2
  304. package/cdn/components/site-navigation/site-navigation.js +2 -2
  305. package/cdn/components/skeleton/skeleton.component.js +2 -2
  306. package/cdn/components/skeleton/skeleton.js +3 -3
  307. package/cdn/components/slider/slider.component.js +2 -2
  308. package/cdn/components/slider/slider.js +3 -3
  309. package/cdn/components/spatial-picker/spatial-picker.component.js +15 -15
  310. package/cdn/components/spatial-picker/spatial-picker.js +16 -16
  311. package/cdn/components/status-indicator/status-indicator.component.js +2 -2
  312. package/cdn/components/status-indicator/status-indicator.js +3 -3
  313. package/cdn/components/stepper/stepper.component.js +2 -2
  314. package/cdn/components/stepper/stepper.js +3 -3
  315. package/cdn/components/stepper-step/stepper-step.component.js +6 -6
  316. package/cdn/components/stepper-step/stepper-step.js +7 -7
  317. package/cdn/components/tab/tab.component.js +6 -6
  318. package/cdn/components/tab/tab.js +7 -7
  319. package/cdn/components/tab-panel/tab-panel.component.js +2 -2
  320. package/cdn/components/tab-panel/tab-panel.js +3 -3
  321. package/cdn/components/tabs/tabs.component.js +6 -6
  322. package/cdn/components/tabs/tabs.js +7 -7
  323. package/cdn/components/tag/tag.component.js +6 -6
  324. package/cdn/components/tag/tag.js +7 -7
  325. package/cdn/components/textarea/textarea.component.js +4 -4
  326. package/cdn/components/textarea/textarea.js +5 -5
  327. package/cdn/components/time-average-map/time-average-map.component.d.ts +7 -4
  328. package/cdn/components/time-average-map/time-average-map.component.js +24 -24
  329. package/cdn/components/time-average-map/time-average-map.controller.js +5 -5
  330. package/cdn/components/time-average-map/time-average-map.js +25 -25
  331. package/cdn/components/time-series/time-series.component.d.ts +7 -4
  332. package/cdn/components/time-series/time-series.component.js +24 -24
  333. package/cdn/components/time-series/time-series.controller.js +5 -5
  334. package/cdn/components/time-series/time-series.js +25 -25
  335. package/cdn/components/toast/toast.component.js +4 -4
  336. package/cdn/components/toast/toast.js +5 -5
  337. package/cdn/components/toggle/toggle.component.js +4 -4
  338. package/cdn/components/toggle/toggle.js +5 -5
  339. package/cdn/components/tooltip/tooltip.component.js +3 -3
  340. package/cdn/components/tooltip/tooltip.js +4 -4
  341. package/cdn/components/variable-combobox/lib.js +3 -3
  342. package/cdn/components/variable-combobox/variable-combobox.component.js +15 -15
  343. package/cdn/components/variable-combobox/variable-combobox.controller.js +4 -4
  344. package/cdn/components/variable-combobox/variable-combobox.js +16 -16
  345. package/cdn/components/variable-keyword-search/variable-keyword-search.component.js +11 -11
  346. package/cdn/components/variable-keyword-search/variable-keyword-search.js +12 -12
  347. package/cdn/custom-elements.json +181 -147
  348. package/cdn/react/accordion/index.js +6 -6
  349. package/cdn/react/alert/index.js +4 -4
  350. package/cdn/react/avatar/index.js +8 -8
  351. package/cdn/react/badge/index.js +3 -3
  352. package/cdn/react/breadcrumb/index.js +3 -3
  353. package/cdn/react/breadcrumbs/index.js +3 -3
  354. package/cdn/react/browse-variables/index.js +18 -18
  355. package/cdn/react/button/index.js +8 -8
  356. package/cdn/react/button-group/index.js +3 -3
  357. package/cdn/react/caption/index.js +3 -3
  358. package/cdn/react/card/index.js +3 -3
  359. package/cdn/react/checkbox/index.js +9 -9
  360. package/cdn/react/chip/index.js +3 -3
  361. package/cdn/react/combobox/index.js +7 -7
  362. package/cdn/react/data-access/index.js +30 -30
  363. package/cdn/react/data-grid/index.js +6 -6
  364. package/cdn/react/data-rods/index.js +39 -39
  365. package/cdn/react/data-subsetter/index.js +41 -41
  366. package/cdn/react/data-subsetter-history/index.js +42 -42
  367. package/cdn/react/date-picker/index.js +15 -15
  368. package/cdn/react/date-range-slider/index.js +3 -3
  369. package/cdn/react/dialog/index.js +10 -10
  370. package/cdn/react/divider/index.js +3 -3
  371. package/cdn/react/dropdown/index.js +4 -4
  372. package/cdn/react/earthdata-login/index.js +16 -16
  373. package/cdn/react/file-upload/index.js +3 -3
  374. package/cdn/react/harmony-history/index.js +14 -14
  375. package/cdn/react/icon/index.js +4 -4
  376. package/cdn/react/index.d.ts +1 -1
  377. package/cdn/react/index.js +158 -158
  378. package/cdn/react/input/index.js +9 -9
  379. package/cdn/react/loader/index.js +3 -3
  380. package/cdn/react/login/index.js +13 -13
  381. package/cdn/react/map/index.js +5 -5
  382. package/cdn/react/menu/index.js +3 -3
  383. package/cdn/react/menu-item/index.js +12 -12
  384. package/cdn/react/option/index.js +7 -7
  385. package/cdn/react/pagination/index.js +7 -7
  386. package/cdn/react/plot/index.js +3 -3
  387. package/cdn/react/plot-toolbar/index.js +13 -13
  388. package/cdn/react/popup/index.js +3 -3
  389. package/cdn/react/progress-bar/index.js +3 -3
  390. package/cdn/react/radio/index.js +5 -5
  391. package/cdn/react/radio-group/index.js +3 -3
  392. package/cdn/react/scroll-hint/index.js +5 -5
  393. package/cdn/react/select/index.js +11 -11
  394. package/cdn/react/site-header/index.js +6 -6
  395. package/cdn/react/site-navigation/index.js +3 -3
  396. package/cdn/react/skeleton/index.js +3 -3
  397. package/cdn/react/slider/index.js +3 -3
  398. package/cdn/react/spatial-picker/index.js +16 -16
  399. package/cdn/react/status-indicator/index.js +3 -3
  400. package/cdn/react/stepper/index.js +3 -3
  401. package/cdn/react/stepper-step/index.js +7 -7
  402. package/cdn/react/tab/index.js +7 -7
  403. package/cdn/react/tab-panel/index.js +3 -3
  404. package/cdn/react/tabs/index.js +7 -7
  405. package/cdn/react/tag/index.js +7 -7
  406. package/cdn/react/textarea/index.js +5 -5
  407. package/cdn/react/time-average-map/index.js +25 -25
  408. package/cdn/react/time-series/index.js +25 -25
  409. package/cdn/react/toast/index.js +5 -5
  410. package/cdn/react/toggle/index.js +5 -5
  411. package/cdn/react/tooltip/index.js +4 -4
  412. package/cdn/react/variable-combobox/index.js +16 -16
  413. package/cdn/react/variable-keyword-search/index.js +12 -12
  414. package/cdn/terra-ui-components.js +154 -154
  415. package/cdn/types/vue/index.d.ts +60 -58
  416. package/cdn/types.d.ts +3 -1
  417. package/cdn/vscode.html-custom-data.json +37 -27
  418. package/cdn/web-types.json +138 -118
  419. package/dist/chunks/chunk.23DS2WII.js +8 -0
  420. package/dist/chunks/chunk.24ALKEJM.js +1 -0
  421. package/dist/chunks/chunk.27IBME5U.js +37 -0
  422. package/dist/chunks/chunk.2P5R6TAG.js +1 -0
  423. package/dist/chunks/chunk.3ABKW5DL.js +1 -0
  424. package/dist/chunks/chunk.46IGCOVD.js +48 -0
  425. package/dist/chunks/chunk.4NTVLFWO.js +35 -0
  426. package/dist/chunks/chunk.4WGVGUBR.js +1 -0
  427. package/dist/chunks/chunk.4WN4C3S4.js +1 -0
  428. package/dist/chunks/chunk.53V76LYH.js +1 -0
  429. package/dist/chunks/chunk.5AVYJE4U.js +1 -0
  430. package/dist/chunks/chunk.5CTAJEZY.js +1 -0
  431. package/dist/chunks/chunk.5PDIN7I4.js +1 -0
  432. package/dist/chunks/chunk.5VJAVGEU.js +154 -0
  433. package/dist/chunks/chunk.634CBAPU.js +1 -0
  434. package/dist/chunks/chunk.6FDO44Z3.js +1 -0
  435. package/dist/chunks/chunk.6G7IPOCW.js +1 -0
  436. package/dist/chunks/chunk.6HA6XH7C.js +9 -0
  437. package/dist/chunks/chunk.74FHHVUZ.js +1 -0
  438. package/dist/chunks/chunk.74ZZ57AF.js +1 -0
  439. package/dist/chunks/chunk.76UCSSKX.js +1 -0
  440. package/dist/chunks/chunk.7CAFYUNX.js +1 -0
  441. package/dist/chunks/chunk.7GV7AIYV.js +47 -0
  442. package/dist/chunks/chunk.7HWBXYXE.js +1 -0
  443. package/dist/chunks/chunk.7LKXOICV.js +1 -0
  444. package/dist/chunks/chunk.7WJ6XSZF.js +1 -0
  445. package/dist/chunks/chunk.7ZVB423E.js +122 -0
  446. package/dist/chunks/chunk.A32KUQWA.js +749 -0
  447. package/dist/chunks/chunk.A4H3YMO3.js +62 -0
  448. package/dist/chunks/chunk.AJZS4JZO.js +30 -0
  449. package/dist/chunks/chunk.AMOS6YAE.js +1 -0
  450. package/dist/chunks/chunk.AOEQXP6W.js +1 -0
  451. package/dist/chunks/chunk.ATSB4SJF.js +38 -0
  452. package/dist/chunks/chunk.B2UKJJJB.js +2 -0
  453. package/dist/chunks/chunk.B4OHYZ4N.js +33 -0
  454. package/dist/chunks/chunk.BAYXEED7.js +1 -0
  455. package/dist/chunks/chunk.BCPTBPIB.js +1 -0
  456. package/dist/chunks/chunk.BDVBIZGM.js +1 -0
  457. package/dist/chunks/chunk.BN3HA5DT.js +1 -0
  458. package/dist/chunks/chunk.BXVR2WED.js +67 -0
  459. package/dist/chunks/chunk.BY4YZAK6.js +23 -0
  460. package/dist/chunks/chunk.C2Z2P4HZ.js +1 -0
  461. package/dist/chunks/chunk.C55HYBAZ.js +26 -0
  462. package/dist/chunks/chunk.D4PZJQYJ.js +1 -0
  463. package/dist/chunks/chunk.D5RQQJXT.js +1 -0
  464. package/dist/chunks/chunk.D7LFTNNG.js +1 -0
  465. package/dist/chunks/chunk.DBWEWDYZ.js +1 -0
  466. package/dist/chunks/chunk.DK2ULUXE.js +1 -0
  467. package/dist/chunks/chunk.DPZSYKKO.js +55 -0
  468. package/dist/chunks/chunk.DT2HI2SC.js +1 -0
  469. package/dist/chunks/chunk.DT67EYYO.js +55 -0
  470. package/dist/chunks/chunk.E6WN2OCO.js +1 -0
  471. package/dist/chunks/chunk.E7Y42BCR.js +1 -0
  472. package/dist/chunks/chunk.EA2VZX2B.js +1 -0
  473. package/dist/chunks/chunk.EDSRTLPF.js +1 -0
  474. package/dist/chunks/chunk.EGFMYSDN.js +30 -0
  475. package/dist/chunks/chunk.EKKGJZD4.js +1 -0
  476. package/dist/chunks/chunk.ENSE3HDL.js +1 -0
  477. package/dist/chunks/chunk.EOLCUMIR.js +1 -0
  478. package/dist/chunks/chunk.EOQI5GWN.js +1 -0
  479. package/dist/chunks/chunk.EPRWRJVD.js +17 -0
  480. package/dist/chunks/chunk.EZI3WYMQ.js +25 -0
  481. package/dist/chunks/chunk.EZI7VJCI.js +1 -0
  482. package/dist/chunks/chunk.FC47S6WY.js +1 -0
  483. package/dist/chunks/chunk.FEZWYWLM.js +1 -0
  484. package/dist/chunks/chunk.FHTH3C2R.js +300 -0
  485. package/dist/chunks/chunk.FK5RENY4.js +1 -0
  486. package/dist/chunks/chunk.FTDFDWP6.js +280 -0
  487. package/dist/chunks/chunk.FYFZQ6TO.js +1 -0
  488. package/dist/chunks/chunk.FYHPWILT.js +12 -0
  489. package/dist/chunks/chunk.GBXJ6Y6G.js +1 -0
  490. package/dist/chunks/chunk.GEITASEB.js +1 -0
  491. package/dist/chunks/chunk.GJIGMZVE.js +24 -0
  492. package/dist/chunks/chunk.GKVRFWRM.js +1 -0
  493. package/dist/chunks/chunk.GQCFK3QR.js +1 -0
  494. package/dist/chunks/chunk.H6KHMOPS.js +5 -0
  495. package/dist/chunks/chunk.HA6P2NGF.js +299 -0
  496. package/dist/chunks/chunk.HFUMQHGI.js +1 -0
  497. package/dist/chunks/chunk.HTZCZKKZ.js +80 -0
  498. package/dist/chunks/chunk.HYQQO2HT.js +566 -0
  499. package/dist/chunks/chunk.I5MK7RZK.js +1 -0
  500. package/dist/chunks/chunk.I67U3CEK.js +126 -0
  501. package/dist/chunks/chunk.IDR2GHCI.js +115 -0
  502. package/dist/chunks/chunk.IJ3MGNHR.js +1 -0
  503. package/dist/chunks/chunk.IJJUZDZO.js +1 -0
  504. package/dist/chunks/chunk.INH7NACQ.js +99 -0
  505. package/dist/chunks/chunk.INRHSO4Q.js +1 -0
  506. package/dist/chunks/chunk.ISA24DED.js +1 -0
  507. package/dist/chunks/chunk.J7657JP5.js +1 -0
  508. package/dist/chunks/chunk.JIO7NUNK.js +1 -0
  509. package/dist/chunks/chunk.JNAOMADJ.js +140 -0
  510. package/dist/chunks/chunk.JSQTX5RS.js +1 -0
  511. package/dist/chunks/chunk.JVBNEQVV.js +1 -0
  512. package/dist/chunks/chunk.JVS5XANO.js +35 -0
  513. package/dist/chunks/chunk.JYTVRRPS.js +1 -0
  514. package/dist/chunks/chunk.K3ACXNPB.js +1 -0
  515. package/dist/chunks/chunk.K3SRBKJS.js +1 -0
  516. package/dist/chunks/chunk.KD2ZCOEI.js +1 -0
  517. package/dist/chunks/chunk.KH7O5HGH.js +11 -0
  518. package/dist/chunks/chunk.KIL5DLYM.js +1 -0
  519. package/dist/chunks/chunk.KNHJIYKN.js +1 -0
  520. package/dist/chunks/chunk.KYDMYH2S.js +1 -0
  521. package/dist/chunks/chunk.KZLZWLYR.js +19 -0
  522. package/dist/chunks/chunk.LIFRVKFV.js +1 -0
  523. package/dist/chunks/chunk.LJDJRQDK.js +1 -0
  524. package/dist/chunks/chunk.LLHB2HAP.js +1 -0
  525. package/dist/chunks/chunk.LNPWD2JW.js +1 -0
  526. package/dist/chunks/chunk.LPG4KFKZ.js +22 -0
  527. package/dist/chunks/chunk.LWOM3IGI.js +6 -0
  528. package/dist/chunks/chunk.MMZ52SIS.js +1 -0
  529. package/dist/chunks/chunk.MOGSKCAN.js +1 -0
  530. package/dist/chunks/chunk.NB37Y7RZ.js +1 -0
  531. package/dist/chunks/chunk.NCCHFKQN.js +1 -0
  532. package/dist/chunks/chunk.NHDBBD6S.js +50 -0
  533. package/dist/chunks/chunk.NNXNQL2F.js +1 -0
  534. package/dist/chunks/chunk.NY6TLTKS.js +16 -0
  535. package/dist/chunks/chunk.O26K2IOG.js +1 -0
  536. package/dist/chunks/chunk.O65DGSMU.js +1 -0
  537. package/dist/chunks/chunk.OG55ZHRT.js +1 -0
  538. package/dist/chunks/chunk.ONUPX63E.js +1 -0
  539. package/dist/chunks/chunk.OURKZDLC.js +1 -0
  540. package/dist/chunks/chunk.PA24APN4.js +157 -0
  541. package/dist/chunks/chunk.PMLGKBQW.js +1 -0
  542. package/dist/chunks/chunk.PXL22BB7.js +1 -0
  543. package/dist/chunks/chunk.PZ6DELPX.js +1 -0
  544. package/dist/chunks/chunk.Q2FL2A4W.js +1 -0
  545. package/dist/chunks/chunk.Q2JG3A23.js +1 -0
  546. package/dist/chunks/chunk.Q6OL5TFP.js +1 -0
  547. package/dist/chunks/chunk.QFXYQ66J.js +8 -0
  548. package/dist/chunks/chunk.QHQKO436.js +1 -0
  549. package/dist/chunks/chunk.QK4ZRWJA.js +1 -0
  550. package/dist/chunks/chunk.QMFV7RWN.js +65 -0
  551. package/dist/chunks/chunk.QMLZIOGK.js +1 -0
  552. package/dist/chunks/chunk.QOKYZOU4.js +1 -0
  553. package/dist/chunks/chunk.QQB2E56V.js +1 -0
  554. package/dist/chunks/chunk.QTP64RAB.js +145 -0
  555. package/dist/chunks/chunk.QVD2R5SK.js +14 -0
  556. package/dist/chunks/chunk.QYIGKD2N.js +37 -0
  557. package/dist/chunks/chunk.R6CNKG4J.js +1 -0
  558. package/dist/chunks/chunk.R75DWQV5.js +1 -0
  559. package/dist/chunks/chunk.RCHY4HGL.js +11 -0
  560. package/dist/chunks/chunk.RQCYBIOC.js +1 -0
  561. package/dist/chunks/chunk.RTOHFMWB.js +1 -0
  562. package/dist/chunks/chunk.RXQXGNNY.js +74 -0
  563. package/dist/chunks/chunk.S4FREG7O.js +1 -0
  564. package/dist/chunks/chunk.SAR7A72P.js +100 -0
  565. package/dist/chunks/chunk.SDQRX3Y5.js +1 -0
  566. package/dist/chunks/chunk.SFCTQLIF.js +1 -0
  567. package/dist/chunks/chunk.SS4WJ3QU.js +1 -0
  568. package/dist/chunks/chunk.SSDPL2EK.js +1 -0
  569. package/dist/chunks/chunk.T6PCO7JN.js +9 -0
  570. package/dist/chunks/chunk.TCQ4NKER.js +5 -0
  571. package/dist/chunks/chunk.TG2OAF4H.js +1 -0
  572. package/dist/chunks/chunk.TLJFCIBQ.js +20 -0
  573. package/dist/chunks/chunk.TWEOK6VS.js +1 -0
  574. package/dist/chunks/chunk.TXXPV74J.js +1 -0
  575. package/dist/chunks/chunk.U2GEMG42.js +75 -0
  576. package/dist/chunks/chunk.U6FLUCI3.js +26 -0
  577. package/dist/chunks/chunk.U7SLVXQU.js +101 -0
  578. package/dist/chunks/chunk.UCPLPMKQ.js +39 -0
  579. package/dist/chunks/chunk.UEDIC4JS.js +1 -0
  580. package/dist/chunks/chunk.UHGWIQPX.js +1 -0
  581. package/dist/chunks/chunk.UNG3INRY.js +1 -0
  582. package/dist/chunks/chunk.USR7A3NZ.js +1 -0
  583. package/dist/chunks/chunk.UYIE7KUU.js +1 -0
  584. package/dist/chunks/chunk.V3OUHNUZ.js +20 -0
  585. package/dist/chunks/chunk.V72FWYPC.js +1 -0
  586. package/dist/chunks/chunk.VB5RETOW.js +1 -0
  587. package/dist/chunks/chunk.VHXDTTIE.js +1 -0
  588. package/dist/chunks/chunk.VKQZGZGY.js +1 -0
  589. package/dist/chunks/chunk.VMAZM4R7.js +1 -0
  590. package/dist/chunks/chunk.VMTTGHBS.js +1 -0
  591. package/dist/chunks/chunk.VV4EKOW5.js +55 -0
  592. package/dist/chunks/chunk.VVVT3I4X.js +4 -0
  593. package/dist/chunks/chunk.W67DVHGA.js +1 -0
  594. package/dist/chunks/chunk.WAV4ZVDA.js +1 -0
  595. package/dist/chunks/chunk.WBBJTBBH.js +1 -0
  596. package/dist/chunks/chunk.WKCVHPJA.js +1 -0
  597. package/dist/chunks/chunk.WNF6C33T.js +1 -0
  598. package/dist/chunks/chunk.WX4CKO7K.js +1 -0
  599. package/dist/chunks/chunk.WZK3QAM3.js +1 -0
  600. package/dist/chunks/chunk.XIHTKMYV.js +121 -0
  601. package/dist/chunks/chunk.YBAVJC4E.js +43 -0
  602. package/dist/chunks/chunk.YBBNCQST.js +1 -0
  603. package/dist/chunks/chunk.YBQKGN4M.js +1 -0
  604. package/dist/chunks/chunk.YGKYURTA.js +1 -0
  605. package/dist/chunks/chunk.YJO5RZSX.js +43 -0
  606. package/dist/chunks/chunk.YMIN3REJ.js +1 -0
  607. package/dist/chunks/chunk.YMY3NKIZ.js +1 -0
  608. package/dist/chunks/chunk.YU2YLT7T.js +1 -0
  609. package/dist/chunks/chunk.Z5EIIROL.js +1 -0
  610. package/dist/chunks/chunk.ZEO6JXTC.js +1157 -0
  611. package/dist/chunks/chunk.ZITJWLSW.js +1 -0
  612. package/dist/chunks/chunk.ZOHC6BBR.js +1 -0
  613. package/dist/chunks/chunk.ZOKCDALS.js +1 -0
  614. package/dist/chunks/chunk.ZSHMPLTS.js +1 -0
  615. package/dist/chunks/chunk.ZSYJOWCL.js +1 -0
  616. package/dist/chunks/chunk.ZTNF5J46.js +64 -0
  617. package/dist/chunks/chunk.ZXGY5CAR.js +1 -0
  618. package/dist/chunks/chunk.ZXJ7J7TY.js +1 -0
  619. package/dist/components/accordion/accordion.component.js +1 -1
  620. package/dist/components/accordion/accordion.js +1 -1
  621. package/dist/components/alert/alert.component.js +1 -1
  622. package/dist/components/alert/alert.js +1 -1
  623. package/dist/components/avatar/avatar.component.js +1 -1
  624. package/dist/components/avatar/avatar.js +1 -1
  625. package/dist/components/badge/badge.component.js +1 -1
  626. package/dist/components/badge/badge.js +1 -1
  627. package/dist/components/breadcrumb/breadcrumb.component.js +1 -1
  628. package/dist/components/breadcrumb/breadcrumb.js +1 -1
  629. package/dist/components/breadcrumbs/breadcrumbs.component.js +1 -1
  630. package/dist/components/breadcrumbs/breadcrumbs.js +1 -1
  631. package/dist/components/browse-variables/browse-variables.component.js +1 -1
  632. package/dist/components/browse-variables/browse-variables.js +1 -1
  633. package/dist/components/button/button.component.js +1 -1
  634. package/dist/components/button/button.js +1 -1
  635. package/dist/components/button-group/button-group.component.js +1 -1
  636. package/dist/components/button-group/button-group.js +1 -1
  637. package/dist/components/caption/caption.component.js +1 -1
  638. package/dist/components/caption/caption.js +1 -1
  639. package/dist/components/card/card.component.js +1 -1
  640. package/dist/components/card/card.js +1 -1
  641. package/dist/components/checkbox/checkbox.component.js +1 -1
  642. package/dist/components/checkbox/checkbox.js +1 -1
  643. package/dist/components/chip/chip.component.js +1 -1
  644. package/dist/components/chip/chip.js +1 -1
  645. package/dist/components/combobox/combobox.component.js +1 -1
  646. package/dist/components/combobox/combobox.js +1 -1
  647. package/dist/components/data-access/data-access.component.js +1 -1
  648. package/dist/components/data-access/data-access.js +1 -1
  649. package/dist/components/data-grid/data-grid.component.js +1 -1
  650. package/dist/components/data-grid/data-grid.js +1 -1
  651. package/dist/components/data-rods/data-rods.component.js +1 -1
  652. package/dist/components/data-rods/data-rods.js +1 -1
  653. package/dist/components/data-subsetter/data-subsetter.component.js +1 -1
  654. package/dist/components/data-subsetter/data-subsetter.js +1 -1
  655. package/dist/components/data-subsetter/notebooks/subsetter-notebook.js +1 -1
  656. package/dist/components/data-subsetter-history/data-subsetter-history.component.js +1 -1
  657. package/dist/components/data-subsetter-history/data-subsetter-history.js +1 -1
  658. package/dist/components/date-picker/date-picker.component.js +1 -1
  659. package/dist/components/date-picker/date-picker.js +1 -1
  660. package/dist/components/date-range-slider/date-range-slider.component.js +1 -1
  661. package/dist/components/date-range-slider/date-range-slider.js +1 -1
  662. package/dist/components/dialog/dialog.component.js +1 -1
  663. package/dist/components/dialog/dialog.js +1 -1
  664. package/dist/components/divider/divider.component.js +1 -1
  665. package/dist/components/divider/divider.js +1 -1
  666. package/dist/components/dropdown/dropdown.component.js +1 -1
  667. package/dist/components/dropdown/dropdown.js +1 -1
  668. package/dist/components/earthdata-login/earthdata-login.component.js +1 -1
  669. package/dist/components/earthdata-login/earthdata-login.js +1 -1
  670. package/dist/components/file-upload/file-upload.component.js +1 -1
  671. package/dist/components/file-upload/file-upload.js +1 -1
  672. package/dist/components/harmony-history/harmony-history.component.js +1 -1
  673. package/dist/components/harmony-history/harmony-history.js +1 -1
  674. package/dist/components/icon/icon.component.js +1 -1
  675. package/dist/components/icon/icon.js +1 -1
  676. package/dist/components/input/input.component.js +1 -1
  677. package/dist/components/input/input.js +1 -1
  678. package/dist/components/loader/loader.component.js +1 -1
  679. package/dist/components/loader/loader.js +1 -1
  680. package/dist/components/login/login.component.js +1 -1
  681. package/dist/components/login/login.js +1 -1
  682. package/dist/components/map/map.component.js +1 -1
  683. package/dist/components/map/map.js +1 -1
  684. package/dist/components/menu/menu.component.js +1 -1
  685. package/dist/components/menu/menu.js +1 -1
  686. package/dist/components/menu-item/menu-item.component.js +1 -1
  687. package/dist/components/menu-item/menu-item.js +1 -1
  688. package/dist/components/option/option.component.js +1 -1
  689. package/dist/components/option/option.js +1 -1
  690. package/dist/components/pagination/pagination.component.js +1 -1
  691. package/dist/components/pagination/pagination.js +1 -1
  692. package/dist/components/plot/plot.component.js +1 -1
  693. package/dist/components/plot/plot.js +1 -1
  694. package/dist/components/plot-toolbar/notebooks/time-averaged-map-notebook.js +1 -1
  695. package/dist/components/plot-toolbar/notebooks/time-series-notebook.js +1 -1
  696. package/dist/components/plot-toolbar/plot-toolbar.component.js +1 -1
  697. package/dist/components/plot-toolbar/plot-toolbar.js +1 -1
  698. package/dist/components/popup/popup.component.js +1 -1
  699. package/dist/components/popup/popup.js +1 -1
  700. package/dist/components/progress-bar/progress-bar.component.js +1 -1
  701. package/dist/components/progress-bar/progress-bar.js +1 -1
  702. package/dist/components/radio/radio.component.js +1 -1
  703. package/dist/components/radio/radio.js +1 -1
  704. package/dist/components/radio-group/radio-group.component.js +1 -1
  705. package/dist/components/radio-group/radio-group.js +1 -1
  706. package/dist/components/scroll-hint/scroll-hint.component.js +1 -1
  707. package/dist/components/scroll-hint/scroll-hint.js +1 -1
  708. package/dist/components/select/select.component.js +1 -1
  709. package/dist/components/select/select.js +1 -1
  710. package/dist/components/site-header/site-header.component.js +1 -1
  711. package/dist/components/site-header/site-header.js +1 -1
  712. package/dist/components/site-navigation/site-navigation.component.js +1 -1
  713. package/dist/components/site-navigation/site-navigation.js +1 -1
  714. package/dist/components/skeleton/skeleton.component.js +1 -1
  715. package/dist/components/skeleton/skeleton.js +1 -1
  716. package/dist/components/slider/slider.component.js +1 -1
  717. package/dist/components/slider/slider.js +1 -1
  718. package/dist/components/spatial-picker/spatial-picker.component.js +1 -1
  719. package/dist/components/spatial-picker/spatial-picker.js +1 -1
  720. package/dist/components/status-indicator/status-indicator.component.js +1 -1
  721. package/dist/components/status-indicator/status-indicator.js +1 -1
  722. package/dist/components/stepper/stepper.component.js +1 -1
  723. package/dist/components/stepper/stepper.js +1 -1
  724. package/dist/components/stepper-step/stepper-step.component.js +1 -1
  725. package/dist/components/stepper-step/stepper-step.js +1 -1
  726. package/dist/components/tab/tab.component.js +1 -1
  727. package/dist/components/tab/tab.js +1 -1
  728. package/dist/components/tab-panel/tab-panel.component.js +1 -1
  729. package/dist/components/tab-panel/tab-panel.js +1 -1
  730. package/dist/components/tabs/tabs.component.js +1 -1
  731. package/dist/components/tabs/tabs.js +1 -1
  732. package/dist/components/tag/tag.component.js +1 -1
  733. package/dist/components/tag/tag.js +1 -1
  734. package/dist/components/textarea/textarea.component.js +1 -1
  735. package/dist/components/textarea/textarea.js +1 -1
  736. package/dist/components/time-average-map/time-average-map.component.d.ts +7 -4
  737. package/dist/components/time-average-map/time-average-map.component.js +1 -1
  738. package/dist/components/time-average-map/time-average-map.controller.js +1 -1
  739. package/dist/components/time-average-map/time-average-map.js +1 -1
  740. package/dist/components/time-series/time-series.component.d.ts +7 -4
  741. package/dist/components/time-series/time-series.component.js +1 -1
  742. package/dist/components/time-series/time-series.controller.js +1 -1
  743. package/dist/components/time-series/time-series.js +1 -1
  744. package/dist/components/toast/toast.component.js +1 -1
  745. package/dist/components/toast/toast.js +1 -1
  746. package/dist/components/toggle/toggle.component.js +1 -1
  747. package/dist/components/toggle/toggle.js +1 -1
  748. package/dist/components/tooltip/tooltip.component.js +1 -1
  749. package/dist/components/tooltip/tooltip.js +1 -1
  750. package/dist/components/variable-combobox/variable-combobox.component.js +1 -1
  751. package/dist/components/variable-combobox/variable-combobox.js +1 -1
  752. package/dist/components/variable-keyword-search/variable-keyword-search.component.js +1 -1
  753. package/dist/components/variable-keyword-search/variable-keyword-search.js +1 -1
  754. package/dist/custom-elements.json +181 -147
  755. package/dist/react/accordion/index.js +1 -1
  756. package/dist/react/alert/index.js +1 -1
  757. package/dist/react/avatar/index.js +1 -1
  758. package/dist/react/badge/index.js +1 -1
  759. package/dist/react/breadcrumb/index.js +1 -1
  760. package/dist/react/breadcrumbs/index.js +1 -1
  761. package/dist/react/browse-variables/index.js +1 -1
  762. package/dist/react/button/index.js +1 -1
  763. package/dist/react/button-group/index.js +1 -1
  764. package/dist/react/caption/index.js +1 -1
  765. package/dist/react/card/index.js +1 -1
  766. package/dist/react/checkbox/index.js +1 -1
  767. package/dist/react/chip/index.js +1 -1
  768. package/dist/react/combobox/index.js +1 -1
  769. package/dist/react/data-access/index.js +1 -1
  770. package/dist/react/data-grid/index.js +1 -1
  771. package/dist/react/data-rods/index.js +1 -1
  772. package/dist/react/data-subsetter/index.js +1 -1
  773. package/dist/react/data-subsetter-history/index.js +1 -1
  774. package/dist/react/date-picker/index.js +1 -1
  775. package/dist/react/date-range-slider/index.js +1 -1
  776. package/dist/react/dialog/index.js +1 -1
  777. package/dist/react/divider/index.js +1 -1
  778. package/dist/react/dropdown/index.js +1 -1
  779. package/dist/react/earthdata-login/index.js +1 -1
  780. package/dist/react/file-upload/index.js +1 -1
  781. package/dist/react/harmony-history/index.js +1 -1
  782. package/dist/react/icon/index.js +1 -1
  783. package/dist/react/index.d.ts +1 -1
  784. package/dist/react/index.js +1 -1
  785. package/dist/react/input/index.js +1 -1
  786. package/dist/react/loader/index.js +1 -1
  787. package/dist/react/login/index.js +1 -1
  788. package/dist/react/map/index.js +1 -1
  789. package/dist/react/menu/index.js +1 -1
  790. package/dist/react/menu-item/index.js +1 -1
  791. package/dist/react/option/index.js +1 -1
  792. package/dist/react/pagination/index.js +1 -1
  793. package/dist/react/plot/index.js +1 -1
  794. package/dist/react/plot-toolbar/index.js +1 -1
  795. package/dist/react/popup/index.js +1 -1
  796. package/dist/react/progress-bar/index.js +1 -1
  797. package/dist/react/radio/index.js +1 -1
  798. package/dist/react/radio-group/index.js +1 -1
  799. package/dist/react/scroll-hint/index.js +1 -1
  800. package/dist/react/select/index.js +1 -1
  801. package/dist/react/site-header/index.js +1 -1
  802. package/dist/react/site-navigation/index.js +1 -1
  803. package/dist/react/skeleton/index.js +1 -1
  804. package/dist/react/slider/index.js +1 -1
  805. package/dist/react/spatial-picker/index.js +1 -1
  806. package/dist/react/status-indicator/index.js +1 -1
  807. package/dist/react/stepper/index.js +1 -1
  808. package/dist/react/stepper-step/index.js +1 -1
  809. package/dist/react/tab/index.js +1 -1
  810. package/dist/react/tab-panel/index.js +1 -1
  811. package/dist/react/tabs/index.js +1 -1
  812. package/dist/react/tag/index.js +1 -1
  813. package/dist/react/textarea/index.js +1 -1
  814. package/dist/react/time-average-map/index.js +1 -1
  815. package/dist/react/time-series/index.js +1 -1
  816. package/dist/react/toast/index.js +1 -1
  817. package/dist/react/toggle/index.js +1 -1
  818. package/dist/react/tooltip/index.js +1 -1
  819. package/dist/react/variable-combobox/index.js +1 -1
  820. package/dist/react/variable-keyword-search/index.js +1 -1
  821. package/dist/terra-ui-components.js +1 -1
  822. package/dist/terra_ui_components-0.0.183-py3-none-any.whl +0 -0
  823. package/dist/terra_ui_components-0.0.183.tar.gz +0 -0
  824. package/dist/types/vue/index.d.ts +60 -58
  825. package/dist/types.d.ts +3 -1
  826. package/dist/vscode.html-custom-data.json +37 -27
  827. package/dist/web-types.json +138 -118
  828. package/package.json +1 -1
  829. package/cdn/chunks/chunk.27H6Y66N.js +0 -19
  830. package/cdn/chunks/chunk.2JCGLAAZ.js +0 -19
  831. package/cdn/chunks/chunk.2NDZGMG2.js +0 -33
  832. package/cdn/chunks/chunk.2YBP736T.js +0 -161
  833. package/cdn/chunks/chunk.3465UHBW.js +0 -125
  834. package/cdn/chunks/chunk.3E3PL47L.js +0 -19
  835. package/cdn/chunks/chunk.3RT5OMRR.js +0 -19
  836. package/cdn/chunks/chunk.3S6TXNYN.js +0 -357
  837. package/cdn/chunks/chunk.3TNPXGSN.js +0 -29
  838. package/cdn/chunks/chunk.3U3QMVU3.js +0 -35
  839. package/cdn/chunks/chunk.3XHMRHX4.js +0 -19
  840. package/cdn/chunks/chunk.45J3MZ3A.js +0 -205
  841. package/cdn/chunks/chunk.4A2AWXGY.js +0 -29
  842. package/cdn/chunks/chunk.4CRAZGX7.js +0 -19
  843. package/cdn/chunks/chunk.4EHEYIXJ.js +0 -29
  844. package/cdn/chunks/chunk.4JH2XUDX.js +0 -32
  845. package/cdn/chunks/chunk.4M4OKGDE.js +0 -19
  846. package/cdn/chunks/chunk.4TR3C3XT.js +0 -19
  847. package/cdn/chunks/chunk.4YHMBW3P.js +0 -188
  848. package/cdn/chunks/chunk.4YNI6KD4.js +0 -19
  849. package/cdn/chunks/chunk.53SX2HQI.js +0 -30
  850. package/cdn/chunks/chunk.54XCTTO5.js +0 -19
  851. package/cdn/chunks/chunk.56MUPGEK.js +0 -32
  852. package/cdn/chunks/chunk.5EAUYTIJ.js +0 -19
  853. package/cdn/chunks/chunk.5I3VER3F.js +0 -19
  854. package/cdn/chunks/chunk.5KYNNL32.js +0 -32
  855. package/cdn/chunks/chunk.5MIFCXBI.js +0 -29
  856. package/cdn/chunks/chunk.62ZIBC6B.js +0 -19
  857. package/cdn/chunks/chunk.653O7V4M.js +0 -599
  858. package/cdn/chunks/chunk.67TYJBGE.js +0 -19
  859. package/cdn/chunks/chunk.6CQFWVR6.js +0 -29
  860. package/cdn/chunks/chunk.6QSUPLGB.js +0 -29
  861. package/cdn/chunks/chunk.6TITQBN5.js +0 -86
  862. package/cdn/chunks/chunk.77Y544HC.js +0 -19
  863. package/cdn/chunks/chunk.7ASKZORP.js +0 -33
  864. package/cdn/chunks/chunk.7BHCY74I.js +0 -33
  865. package/cdn/chunks/chunk.7CTLZBMK.js +0 -99
  866. package/cdn/chunks/chunk.7GWSNU54.js +0 -19
  867. package/cdn/chunks/chunk.7PYSPYWO.js +0 -19
  868. package/cdn/chunks/chunk.7QYAG5RH.js +0 -19
  869. package/cdn/chunks/chunk.7VNZMOKC.js +0 -56075
  870. package/cdn/chunks/chunk.7YI473J2.js +0 -39
  871. package/cdn/chunks/chunk.7YXZ4PLT.js +0 -359
  872. package/cdn/chunks/chunk.7ZVYIV7K.js +0 -662
  873. package/cdn/chunks/chunk.ACJHUN64.js +0 -19
  874. package/cdn/chunks/chunk.ACVD4RLC.js +0 -538
  875. package/cdn/chunks/chunk.AFRV7PHS.js +0 -19
  876. package/cdn/chunks/chunk.AG3OHBNW.js +0 -32
  877. package/cdn/chunks/chunk.AMEOWPTV.js +0 -29
  878. package/cdn/chunks/chunk.AN25EHYN.js +0 -19
  879. package/cdn/chunks/chunk.APOEQA6N.js +0 -157
  880. package/cdn/chunks/chunk.AQHIU4QQ.js +0 -19
  881. package/cdn/chunks/chunk.AW7RGJQF.js +0 -237
  882. package/cdn/chunks/chunk.AXHE75CH.js +0 -1211
  883. package/cdn/chunks/chunk.B7OA73S6.js +0 -19
  884. package/cdn/chunks/chunk.BCQ2ITZO.js +0 -33
  885. package/cdn/chunks/chunk.BEMRQEFJ.js +0 -29
  886. package/cdn/chunks/chunk.BEWDP23N.js +0 -29
  887. package/cdn/chunks/chunk.BVACLOKI.js +0 -110
  888. package/cdn/chunks/chunk.BYUN5CQ7.js +0 -34
  889. package/cdn/chunks/chunk.CL66DXQH.js +0 -19
  890. package/cdn/chunks/chunk.CLOSWCHA.js +0 -279
  891. package/cdn/chunks/chunk.CMWLAYXG.js +0 -19
  892. package/cdn/chunks/chunk.CU6Y4S4O.js +0 -134
  893. package/cdn/chunks/chunk.DCABAUTG.js +0 -29
  894. package/cdn/chunks/chunk.DCDKEGGF.js +0 -60
  895. package/cdn/chunks/chunk.DHUO654N.js +0 -19
  896. package/cdn/chunks/chunk.DHZRFA4Q.js +0 -71
  897. package/cdn/chunks/chunk.DKR37O6M.js +0 -99
  898. package/cdn/chunks/chunk.E5INDWJO.js +0 -231
  899. package/cdn/chunks/chunk.EB57UDHS.js +0 -29
  900. package/cdn/chunks/chunk.EHXDAY7E.js +0 -29
  901. package/cdn/chunks/chunk.EJC7WV7R.js +0 -19
  902. package/cdn/chunks/chunk.EPEVTPDD.js +0 -29
  903. package/cdn/chunks/chunk.ESBUSULS.js +0 -658
  904. package/cdn/chunks/chunk.EWQBAXSZ.js +0 -514
  905. package/cdn/chunks/chunk.EXWRYIIG.js +0 -34
  906. package/cdn/chunks/chunk.F7RM6CKI.js +0 -19
  907. package/cdn/chunks/chunk.FEU2ZHGK.js +0 -136
  908. package/cdn/chunks/chunk.FKESQTK7.js +0 -62
  909. package/cdn/chunks/chunk.FQW6VWTA.js +0 -29
  910. package/cdn/chunks/chunk.FVNPWS7L.js +0 -29
  911. package/cdn/chunks/chunk.FZSG2R6K.js +0 -36
  912. package/cdn/chunks/chunk.G6UY4GIZ.js +0 -610
  913. package/cdn/chunks/chunk.GAF2R7BX.js +0 -19
  914. package/cdn/chunks/chunk.GH3O32TH.js +0 -616
  915. package/cdn/chunks/chunk.GHQXXUOZ.js +0 -19
  916. package/cdn/chunks/chunk.GLLNU6QT.js +0 -276
  917. package/cdn/chunks/chunk.GN5JXOUJ.js +0 -19
  918. package/cdn/chunks/chunk.GN7JEDN2.js +0 -234
  919. package/cdn/chunks/chunk.GPPIIBI2.js +0 -19
  920. package/cdn/chunks/chunk.GU2TJT7Q.js +0 -19
  921. package/cdn/chunks/chunk.GUW2SGCI.js +0 -493
  922. package/cdn/chunks/chunk.H64ZXOYB.js +0 -473
  923. package/cdn/chunks/chunk.HA4DY4XJ.js +0 -35
  924. package/cdn/chunks/chunk.HARGEVGT.js +0 -36
  925. package/cdn/chunks/chunk.HO6Z2DWH.js +0 -29
  926. package/cdn/chunks/chunk.HQYWW5B6.js +0 -32
  927. package/cdn/chunks/chunk.I6FQTBRX.js +0 -32
  928. package/cdn/chunks/chunk.IARTVWTE.js +0 -19
  929. package/cdn/chunks/chunk.IFBDVPXH.js +0 -1975
  930. package/cdn/chunks/chunk.IFN7JOYQ.js +0 -34
  931. package/cdn/chunks/chunk.IJMKGIXM.js +0 -224
  932. package/cdn/chunks/chunk.IKTRYO23.js +0 -29
  933. package/cdn/chunks/chunk.INTWBGMN.js +0 -92
  934. package/cdn/chunks/chunk.ISR3MVUO.js +0 -19
  935. package/cdn/chunks/chunk.ITFVYNFS.js +0 -104
  936. package/cdn/chunks/chunk.J3JP6ALM.js +0 -1184
  937. package/cdn/chunks/chunk.J5HCHNS6.js +0 -29
  938. package/cdn/chunks/chunk.JCDZ72UU.js +0 -29
  939. package/cdn/chunks/chunk.JLIH4UDK.js +0 -29
  940. package/cdn/chunks/chunk.JLKIJ7LH.js +0 -113
  941. package/cdn/chunks/chunk.JSYNLIEX.js +0 -288
  942. package/cdn/chunks/chunk.JWN5RFZR.js +0 -29
  943. package/cdn/chunks/chunk.JZEMAEKF.js +0 -542
  944. package/cdn/chunks/chunk.K4DUOTZR.js +0 -19
  945. package/cdn/chunks/chunk.K4XDAFMU.js +0 -904
  946. package/cdn/chunks/chunk.KAO2PZDB.js +0 -975
  947. package/cdn/chunks/chunk.KIWNTLEB.js +0 -3452
  948. package/cdn/chunks/chunk.KJ5MDHOB.js +0 -19
  949. package/cdn/chunks/chunk.KM6WWUYU.js +0 -77
  950. package/cdn/chunks/chunk.KNFKQMZL.js +0 -37
  951. package/cdn/chunks/chunk.KPL5WVGQ.js +0 -443
  952. package/cdn/chunks/chunk.KXIMRSUN.js +0 -49
  953. package/cdn/chunks/chunk.KXPMQRAG.js +0 -19
  954. package/cdn/chunks/chunk.L2SHDSJB.js +0 -36
  955. package/cdn/chunks/chunk.L3PHK56S.js +0 -19
  956. package/cdn/chunks/chunk.L4UIOAJ6.js +0 -19
  957. package/cdn/chunks/chunk.L6QGKCD7.js +0 -106
  958. package/cdn/chunks/chunk.LVROX2ZC.js +0 -32
  959. package/cdn/chunks/chunk.M5K77MVA.js +0 -19
  960. package/cdn/chunks/chunk.M65VG5RW.js +0 -472
  961. package/cdn/chunks/chunk.MG53IOR7.js +0 -123
  962. package/cdn/chunks/chunk.MZC6KDXV.js +0 -417
  963. package/cdn/chunks/chunk.MZX3RGLE.js +0 -189
  964. package/cdn/chunks/chunk.N23A2TLL.js +0 -155
  965. package/cdn/chunks/chunk.N35W2LNG.js +0 -190
  966. package/cdn/chunks/chunk.NDP3WIKQ.js +0 -19
  967. package/cdn/chunks/chunk.O3DIP4UG.js +0 -81
  968. package/cdn/chunks/chunk.O3REVIRV.js +0 -19
  969. package/cdn/chunks/chunk.O6EPXMCN.js +0 -32
  970. package/cdn/chunks/chunk.OE3SG35G.js +0 -372
  971. package/cdn/chunks/chunk.OH4XSXGH.js +0 -35
  972. package/cdn/chunks/chunk.OLZPMQEW.js +0 -60
  973. package/cdn/chunks/chunk.OXV3VH7N.js +0 -264
  974. package/cdn/chunks/chunk.P6HJOUWE.js +0 -32
  975. package/cdn/chunks/chunk.PHTZBZS3.js +0 -19
  976. package/cdn/chunks/chunk.PJUJ4YID.js +0 -29
  977. package/cdn/chunks/chunk.PXVXOSWN.js +0 -32
  978. package/cdn/chunks/chunk.PZUVUD4C.js +0 -93
  979. package/cdn/chunks/chunk.Q6MUWVO4.js +0 -310
  980. package/cdn/chunks/chunk.Q7SMQGGV.js +0 -32
  981. package/cdn/chunks/chunk.QCZATBDS.js +0 -19
  982. package/cdn/chunks/chunk.QMC7DUVJ.js +0 -151
  983. package/cdn/chunks/chunk.QR25OOSG.js +0 -83
  984. package/cdn/chunks/chunk.R5WMOIJK.js +0 -19
  985. package/cdn/chunks/chunk.R7TKEPVG.js +0 -165
  986. package/cdn/chunks/chunk.RKSUZJZ6.js +0 -68
  987. package/cdn/chunks/chunk.RQWWWR7J.js +0 -19
  988. package/cdn/chunks/chunk.RWBA2MGO.js +0 -19
  989. package/cdn/chunks/chunk.RY5SOLET.js +0 -132
  990. package/cdn/chunks/chunk.RY7CXQXT.js +0 -36
  991. package/cdn/chunks/chunk.S3QWAZET.js +0 -230
  992. package/cdn/chunks/chunk.S7K4YQO5.js +0 -29
  993. package/cdn/chunks/chunk.SFTDPOR4.js +0 -293
  994. package/cdn/chunks/chunk.SQFLMSG5.js +0 -37
  995. package/cdn/chunks/chunk.TDT5Q3JF.js +0 -29
  996. package/cdn/chunks/chunk.TEOWGCS6.js +0 -259
  997. package/cdn/chunks/chunk.TKGLHWZN.js +0 -19
  998. package/cdn/chunks/chunk.TMZ3GMSL.js +0 -134
  999. package/cdn/chunks/chunk.TOQTKNTX.js +0 -19
  1000. package/cdn/chunks/chunk.UERLDTQZ.js +0 -29
  1001. package/cdn/chunks/chunk.UEUZKV5K.js +0 -32
  1002. package/cdn/chunks/chunk.V4VJ4UT2.js +0 -29
  1003. package/cdn/chunks/chunk.V5DBQVJ5.js +0 -19
  1004. package/cdn/chunks/chunk.V5OO2XEE.js +0 -33
  1005. package/cdn/chunks/chunk.VECOM4X2.js +0 -19
  1006. package/cdn/chunks/chunk.VGXUJ5AG.js +0 -19
  1007. package/cdn/chunks/chunk.VHMUJ6SG.js +0 -2244
  1008. package/cdn/chunks/chunk.VJKPC2DS.js +0 -29
  1009. package/cdn/chunks/chunk.VS4OOTZG.js +0 -524
  1010. package/cdn/chunks/chunk.VUKYQOBK.js +0 -350
  1011. package/cdn/chunks/chunk.W67YDC4P.js +0 -19
  1012. package/cdn/chunks/chunk.W7N4JADB.js +0 -915
  1013. package/cdn/chunks/chunk.WA3LBDSM.js +0 -19
  1014. package/cdn/chunks/chunk.WDQXQ2MJ.js +0 -19
  1015. package/cdn/chunks/chunk.WE35UV4V.js +0 -41
  1016. package/cdn/chunks/chunk.WEO6T7Q7.js +0 -32
  1017. package/cdn/chunks/chunk.WIBZBHVO.js +0 -29
  1018. package/cdn/chunks/chunk.WLINE26F.js +0 -19
  1019. package/cdn/chunks/chunk.WODOIA57.js +0 -278
  1020. package/cdn/chunks/chunk.WUA2GRUX.js +0 -19
  1021. package/cdn/chunks/chunk.WXQGG4OH.js +0 -74
  1022. package/cdn/chunks/chunk.X76BZAG2.js +0 -29
  1023. package/cdn/chunks/chunk.XCZDPAFQ.js +0 -285
  1024. package/cdn/chunks/chunk.XPO6CGIX.js +0 -32
  1025. package/cdn/chunks/chunk.XSBBTQKS.js +0 -19
  1026. package/cdn/chunks/chunk.XUC2AP34.js +0 -47
  1027. package/cdn/chunks/chunk.XUZNRU2A.js +0 -35
  1028. package/cdn/chunks/chunk.XY2BAW25.js +0 -82
  1029. package/cdn/chunks/chunk.Y73I7UWA.js +0 -19
  1030. package/cdn/chunks/chunk.YBQIGWAG.js +0 -2547
  1031. package/cdn/chunks/chunk.YOBKY3PV.js +0 -29
  1032. package/cdn/chunks/chunk.YYHCRDOA.js +0 -93
  1033. package/cdn/chunks/chunk.Z66NGM6N.js +0 -78
  1034. package/cdn/chunks/chunk.ZGM73SI6.js +0 -19
  1035. package/cdn/chunks/chunk.ZIBQ3RIQ.js +0 -477
  1036. package/cdn/chunks/chunk.ZO4JZI7Q.js +0 -19
  1037. package/dist/chunks/chunk.25IJTRN2.js +0 -35
  1038. package/dist/chunks/chunk.26TIQ67V.js +0 -1
  1039. package/dist/chunks/chunk.2QS2GW24.js +0 -1
  1040. package/dist/chunks/chunk.2W4QHF33.js +0 -100
  1041. package/dist/chunks/chunk.35AKYR3R.js +0 -1
  1042. package/dist/chunks/chunk.3A7J6DJT.js +0 -1
  1043. package/dist/chunks/chunk.3AWO3Q45.js +0 -1
  1044. package/dist/chunks/chunk.3IP76OK4.js +0 -1
  1045. package/dist/chunks/chunk.3NZFQPY5.js +0 -1
  1046. package/dist/chunks/chunk.443D6GCI.js +0 -1
  1047. package/dist/chunks/chunk.46MIWFWF.js +0 -121
  1048. package/dist/chunks/chunk.4CPC6T4W.js +0 -23
  1049. package/dist/chunks/chunk.4EI5AQ55.js +0 -47
  1050. package/dist/chunks/chunk.4MF3EOIE.js +0 -1
  1051. package/dist/chunks/chunk.4R54XEI5.js +0 -14
  1052. package/dist/chunks/chunk.52AIVMJA.js +0 -20
  1053. package/dist/chunks/chunk.52DDN5Y5.js +0 -1
  1054. package/dist/chunks/chunk.5AT7REMR.js +0 -1
  1055. package/dist/chunks/chunk.5AYLTPSG.js +0 -55
  1056. package/dist/chunks/chunk.5NVT3NMG.js +0 -1
  1057. package/dist/chunks/chunk.5ZJ22MI2.js +0 -1
  1058. package/dist/chunks/chunk.63XFDLLU.js +0 -22
  1059. package/dist/chunks/chunk.67ZMDEXW.js +0 -1
  1060. package/dist/chunks/chunk.6BU2ZYA2.js +0 -1
  1061. package/dist/chunks/chunk.6C2DLXBV.js +0 -1
  1062. package/dist/chunks/chunk.6DUHY2K7.js +0 -1
  1063. package/dist/chunks/chunk.6RGAOWQL.js +0 -1
  1064. package/dist/chunks/chunk.6XHS36ZS.js +0 -1
  1065. package/dist/chunks/chunk.6YC7NU6R.js +0 -1
  1066. package/dist/chunks/chunk.74OC24MY.js +0 -1
  1067. package/dist/chunks/chunk.76MUDXWL.js +0 -1
  1068. package/dist/chunks/chunk.7M4J27XW.js +0 -9
  1069. package/dist/chunks/chunk.7YKWHD3Q.js +0 -1
  1070. package/dist/chunks/chunk.ADD22LT5.js +0 -1
  1071. package/dist/chunks/chunk.ADOJGUIM.js +0 -1
  1072. package/dist/chunks/chunk.ADRI7S3D.js +0 -1
  1073. package/dist/chunks/chunk.AJTT6ZVS.js +0 -1
  1074. package/dist/chunks/chunk.ALLTKOK5.js +0 -55
  1075. package/dist/chunks/chunk.ALWXS4EN.js +0 -1
  1076. package/dist/chunks/chunk.AOG74ZOR.js +0 -1
  1077. package/dist/chunks/chunk.AXW6QQ5G.js +0 -1
  1078. package/dist/chunks/chunk.BDUWGLTX.js +0 -1
  1079. package/dist/chunks/chunk.BHTVOOL3.js +0 -1
  1080. package/dist/chunks/chunk.BNL5MQSM.js +0 -67
  1081. package/dist/chunks/chunk.BPGBHDOI.js +0 -1
  1082. package/dist/chunks/chunk.BPHQBSYM.js +0 -1
  1083. package/dist/chunks/chunk.BR23Z5K4.js +0 -1
  1084. package/dist/chunks/chunk.BXSXRNLA.js +0 -9
  1085. package/dist/chunks/chunk.CARZD2IC.js +0 -1
  1086. package/dist/chunks/chunk.CMJJA2FU.js +0 -280
  1087. package/dist/chunks/chunk.CNGKS3CF.js +0 -74
  1088. package/dist/chunks/chunk.CSD2H2XD.js +0 -1
  1089. package/dist/chunks/chunk.CWW64TWB.js +0 -1
  1090. package/dist/chunks/chunk.D4AQVUAD.js +0 -1
  1091. package/dist/chunks/chunk.DDT4SEKP.js +0 -1
  1092. package/dist/chunks/chunk.DN2W7CXP.js +0 -25
  1093. package/dist/chunks/chunk.DNECT5E5.js +0 -1
  1094. package/dist/chunks/chunk.DSKRM2DE.js +0 -1
  1095. package/dist/chunks/chunk.E2WOMCTG.js +0 -115
  1096. package/dist/chunks/chunk.E74KOQ6O.js +0 -37
  1097. package/dist/chunks/chunk.EB7RTWHA.js +0 -1
  1098. package/dist/chunks/chunk.EHNN7VF7.js +0 -1
  1099. package/dist/chunks/chunk.EKZ44GOI.js +0 -300
  1100. package/dist/chunks/chunk.EKZZOM3I.js +0 -1
  1101. package/dist/chunks/chunk.ELYC43YZ.js +0 -1
  1102. package/dist/chunks/chunk.EMUOCMNG.js +0 -1
  1103. package/dist/chunks/chunk.EQ77DEN3.js +0 -1
  1104. package/dist/chunks/chunk.EVAOZTKK.js +0 -37
  1105. package/dist/chunks/chunk.EXISX4DM.js +0 -1
  1106. package/dist/chunks/chunk.EY7CGJXP.js +0 -16
  1107. package/dist/chunks/chunk.F5XNFJYR.js +0 -17
  1108. package/dist/chunks/chunk.FGAFF4GY.js +0 -8
  1109. package/dist/chunks/chunk.FQ6VIV6W.js +0 -1
  1110. package/dist/chunks/chunk.FT7HZOCQ.js +0 -145
  1111. package/dist/chunks/chunk.FXGSYMQ5.js +0 -1
  1112. package/dist/chunks/chunk.G3TKMUU4.js +0 -1
  1113. package/dist/chunks/chunk.G7EZQRZI.js +0 -26
  1114. package/dist/chunks/chunk.GHVDYLX5.js +0 -1
  1115. package/dist/chunks/chunk.GIZLZV63.js +0 -1
  1116. package/dist/chunks/chunk.H2SGQQPI.js +0 -126
  1117. package/dist/chunks/chunk.H4FARZ53.js +0 -1
  1118. package/dist/chunks/chunk.H6PC5SSG.js +0 -8
  1119. package/dist/chunks/chunk.HDPC44EI.js +0 -1
  1120. package/dist/chunks/chunk.HJJKMAXZ.js +0 -1
  1121. package/dist/chunks/chunk.HRG3YIXF.js +0 -1
  1122. package/dist/chunks/chunk.HTTWDTCN.js +0 -1
  1123. package/dist/chunks/chunk.I6KMV3PH.js +0 -1
  1124. package/dist/chunks/chunk.IAZ53T5N.js +0 -1
  1125. package/dist/chunks/chunk.IECIA36P.js +0 -1
  1126. package/dist/chunks/chunk.IFRRAZJZ.js +0 -1
  1127. package/dist/chunks/chunk.ILWARFBK.js +0 -80
  1128. package/dist/chunks/chunk.IO5RP4LZ.js +0 -43
  1129. package/dist/chunks/chunk.ITLR4NVV.js +0 -1
  1130. package/dist/chunks/chunk.J6LC4XO6.js +0 -1
  1131. package/dist/chunks/chunk.JFAE577A.js +0 -1
  1132. package/dist/chunks/chunk.JHNY5UC5.js +0 -1
  1133. package/dist/chunks/chunk.JIFY72GY.js +0 -1
  1134. package/dist/chunks/chunk.JMHCKJE6.js +0 -12
  1135. package/dist/chunks/chunk.JPCSPQ7M.js +0 -122
  1136. package/dist/chunks/chunk.JUBS77KN.js +0 -1
  1137. package/dist/chunks/chunk.JVNL2XTU.js +0 -5
  1138. package/dist/chunks/chunk.K3NTQ4JF.js +0 -1
  1139. package/dist/chunks/chunk.K3RQUNKR.js +0 -1
  1140. package/dist/chunks/chunk.K6EEJAT5.js +0 -1
  1141. package/dist/chunks/chunk.KBQI5V5Q.js +0 -749
  1142. package/dist/chunks/chunk.KNYMQKW4.js +0 -1
  1143. package/dist/chunks/chunk.KPFWB2YA.js +0 -1
  1144. package/dist/chunks/chunk.KRWSFDPL.js +0 -1
  1145. package/dist/chunks/chunk.KVHJU4LP.js +0 -1
  1146. package/dist/chunks/chunk.KYXMELYH.js +0 -1
  1147. package/dist/chunks/chunk.L745Y2S6.js +0 -1
  1148. package/dist/chunks/chunk.LA4EE2OS.js +0 -26
  1149. package/dist/chunks/chunk.LBOZG7DZ.js +0 -1
  1150. package/dist/chunks/chunk.LCC2VNUN.js +0 -1
  1151. package/dist/chunks/chunk.LFGMVPWO.js +0 -6
  1152. package/dist/chunks/chunk.LPNUA4MS.js +0 -43
  1153. package/dist/chunks/chunk.MAZZVNDV.js +0 -55
  1154. package/dist/chunks/chunk.MFSYNWGZ.js +0 -1
  1155. package/dist/chunks/chunk.MJISDOIT.js +0 -1
  1156. package/dist/chunks/chunk.MNSPDFPW.js +0 -1
  1157. package/dist/chunks/chunk.MSFH4A6C.js +0 -1
  1158. package/dist/chunks/chunk.MWN6SUCO.js +0 -1
  1159. package/dist/chunks/chunk.N6MMAM36.js +0 -1
  1160. package/dist/chunks/chunk.NBONFMWU.js +0 -1
  1161. package/dist/chunks/chunk.NDMEGIXT.js +0 -1
  1162. package/dist/chunks/chunk.NH6VLJ6J.js +0 -1
  1163. package/dist/chunks/chunk.NRKQII5L.js +0 -1
  1164. package/dist/chunks/chunk.NV3RRECJ.js +0 -5
  1165. package/dist/chunks/chunk.NW7UERHZ.js +0 -99
  1166. package/dist/chunks/chunk.O3T4ATYT.js +0 -1
  1167. package/dist/chunks/chunk.OGQJXR3F.js +0 -1
  1168. package/dist/chunks/chunk.OJGU37E3.js +0 -1
  1169. package/dist/chunks/chunk.OQULIOOE.js +0 -1
  1170. package/dist/chunks/chunk.OTF3DTPS.js +0 -299
  1171. package/dist/chunks/chunk.OTK4YHSY.js +0 -1
  1172. package/dist/chunks/chunk.OZ4SZSLD.js +0 -1
  1173. package/dist/chunks/chunk.PA77JIJB.js +0 -1
  1174. package/dist/chunks/chunk.PAOPYU6H.js +0 -48
  1175. package/dist/chunks/chunk.PPSCVLKZ.js +0 -566
  1176. package/dist/chunks/chunk.PQWOPKO5.js +0 -1
  1177. package/dist/chunks/chunk.PZM3CPCG.js +0 -64
  1178. package/dist/chunks/chunk.Q6QIRUFF.js +0 -35
  1179. package/dist/chunks/chunk.QLI6APTM.js +0 -1
  1180. package/dist/chunks/chunk.QNHHTCKA.js +0 -20
  1181. package/dist/chunks/chunk.QP47LYRE.js +0 -1
  1182. package/dist/chunks/chunk.QS53EJDR.js +0 -1
  1183. package/dist/chunks/chunk.QTWF2WDX.js +0 -1
  1184. package/dist/chunks/chunk.QUWBD3SD.js +0 -2
  1185. package/dist/chunks/chunk.RMKTIRLM.js +0 -1
  1186. package/dist/chunks/chunk.ROGSTGQT.js +0 -1
  1187. package/dist/chunks/chunk.S3EEI23E.js +0 -1
  1188. package/dist/chunks/chunk.SATJQMPW.js +0 -1
  1189. package/dist/chunks/chunk.SDHUSIQJ.js +0 -1
  1190. package/dist/chunks/chunk.SEODWXYC.js +0 -38
  1191. package/dist/chunks/chunk.T3F226QD.js +0 -24
  1192. package/dist/chunks/chunk.T7B46YQE.js +0 -1
  1193. package/dist/chunks/chunk.T7GB532E.js +0 -101
  1194. package/dist/chunks/chunk.TKOSJQ55.js +0 -33
  1195. package/dist/chunks/chunk.TLQME5TY.js +0 -1
  1196. package/dist/chunks/chunk.TQGIFDYA.js +0 -65
  1197. package/dist/chunks/chunk.TRPU5KOO.js +0 -1
  1198. package/dist/chunks/chunk.TSTFRNHO.js +0 -30
  1199. package/dist/chunks/chunk.TSVYBK3W.js +0 -1
  1200. package/dist/chunks/chunk.UFDERNNG.js +0 -140
  1201. package/dist/chunks/chunk.V2RCW5GT.js +0 -1
  1202. package/dist/chunks/chunk.VIXBKCRX.js +0 -1
  1203. package/dist/chunks/chunk.VPN54IEF.js +0 -1
  1204. package/dist/chunks/chunk.VRH7V55E.js +0 -1
  1205. package/dist/chunks/chunk.VRMDJLQD.js +0 -1157
  1206. package/dist/chunks/chunk.W6XVQOLT.js +0 -1
  1207. package/dist/chunks/chunk.WCR7D3KN.js +0 -49
  1208. package/dist/chunks/chunk.WETDUXP5.js +0 -1
  1209. package/dist/chunks/chunk.WKXYY2SS.js +0 -1
  1210. package/dist/chunks/chunk.WLKVTAB4.js +0 -1
  1211. package/dist/chunks/chunk.WNYSCJWU.js +0 -1
  1212. package/dist/chunks/chunk.WSSQCROT.js +0 -62
  1213. package/dist/chunks/chunk.WSV3Y476.js +0 -1
  1214. package/dist/chunks/chunk.WUMKEMAE.js +0 -1
  1215. package/dist/chunks/chunk.WUQDOY44.js +0 -1
  1216. package/dist/chunks/chunk.WYFUGJYX.js +0 -1
  1217. package/dist/chunks/chunk.WZJ6BLFI.js +0 -154
  1218. package/dist/chunks/chunk.XA74HUUF.js +0 -11
  1219. package/dist/chunks/chunk.XAR5NYEQ.js +0 -19
  1220. package/dist/chunks/chunk.XBLQSPUU.js +0 -39
  1221. package/dist/chunks/chunk.XOZSKLSU.js +0 -1
  1222. package/dist/chunks/chunk.XQ2DODLW.js +0 -1
  1223. package/dist/chunks/chunk.XUXVJHWD.js +0 -1
  1224. package/dist/chunks/chunk.XW6P4ZVZ.js +0 -75
  1225. package/dist/chunks/chunk.XWN6PMIT.js +0 -1
  1226. package/dist/chunks/chunk.Y4NGZVLV.js +0 -157
  1227. package/dist/chunks/chunk.YITLAPOA.js +0 -1
  1228. package/dist/chunks/chunk.YSFPB4SY.js +0 -1
  1229. package/dist/chunks/chunk.YVJLNJOM.js +0 -1
  1230. package/dist/chunks/chunk.ZAZLZRKQ.js +0 -1
  1231. package/dist/chunks/chunk.ZFBM4OFX.js +0 -1
  1232. package/dist/chunks/chunk.ZGKHSKIP.js +0 -1
  1233. package/dist/chunks/chunk.ZJOXNJ4J.js +0 -30
  1234. package/dist/chunks/chunk.ZJQMVD74.js +0 -4
  1235. package/dist/chunks/chunk.ZKKAJVQK.js +0 -11
  1236. package/dist/chunks/chunk.ZVQU27UY.js +0 -1
  1237. package/dist/terra_ui_components-0.0.181-py3-none-any.whl +0 -0
  1238. package/dist/terra_ui_components-0.0.181.tar.gz +0 -0
@@ -1,3452 +0,0 @@
1
- import {
2
- withDb
3
- } from "./chunk.EHU3RZOC.js";
4
- import {
5
- BadRequestException,
6
- HttpException
7
- } from "./chunk.SYQOGYTQ.js";
8
- import {
9
- authService
10
- } from "./chunk.EYYVMPBZ.js";
11
- import {
12
- __objRest,
13
- __privateAdd,
14
- __privateGet,
15
- __privateMethod,
16
- __privateSet,
17
- __privateWrapper,
18
- __spreadProps,
19
- __spreadValues,
20
- init_buffer,
21
- init_dirname,
22
- init_process
23
- } from "./chunk.ZEOVK2FE.js";
24
-
25
- // src/apis/harmony.api.ts
26
- init_dirname();
27
- init_buffer();
28
- init_process();
29
-
30
- // src/lib/api.client.ts
31
- init_dirname();
32
- init_buffer();
33
- init_process();
34
- async function request(url, { method = "GET", body, headers = {}, signal } = {}) {
35
- var _a11, _b2, _c, _d, _e, _f;
36
- try {
37
- const res = await fetch(url, {
38
- method,
39
- headers,
40
- body: body ? JSON.stringify(body) : void 0,
41
- signal
42
- });
43
- if (!res.ok) {
44
- if (res.status === 401) {
45
- authService.logout();
46
- }
47
- if (!((_a11 = res.headers.get("Content-Type")) == null ? void 0 : _a11.includes("json"))) {
48
- const text = await res.text();
49
- throw new HttpException({
50
- status: res.status,
51
- message: text || `HTTP ${res.status}`
52
- });
53
- }
54
- const json = await res.json();
55
- throw new HttpException({
56
- status: res.status,
57
- message: (_e = (_d = (_b2 = json.message) != null ? _b2 : (
58
- // most REST clients will pass a error message
59
- json.description
60
- )) != null ? _d : (
61
- // NASA Harmony uses the description field
62
- (_c = json.errors) == null ? void 0 : _c[0]
63
- )) != null ? _e : (
64
- // NASA CMR uses an array of errors
65
- `HTTP ${res.status}`
66
- )
67
- });
68
- }
69
- if (res.status === 204) {
70
- return void 0;
71
- }
72
- if (!((_f = res.headers.get("Content-Type")) == null ? void 0 : _f.includes("json"))) {
73
- throw new HttpException({
74
- status: 500,
75
- message: `Expected JSON response but got ${res.headers.get("Content-Type")}`
76
- });
77
- }
78
- return res.json();
79
- } catch (err) {
80
- if (err instanceof DOMException && err.name === "AbortError") {
81
- return void 0;
82
- }
83
- if (err instanceof HttpException && err.status !== 500) {
84
- throw err;
85
- }
86
- console.error(err);
87
- console.error(`Failed to fetch ${url}`);
88
- throw new HttpException({
89
- status: 500,
90
- message: `An unknown error occurred when attempting to fetch, please try again later.`,
91
- cause: err
92
- });
93
- }
94
- }
95
- var apiClient = {
96
- get: (url, options) => request(url, __spreadValues({}, options)),
97
- post: (url, body, options) => request(url, __spreadValues({ method: "POST", body }, options)),
98
- put: (url, body) => request(url, { method: "PUT", body }),
99
- patch: (url, body) => request(url, { method: "PATCH", body }),
100
- delete: (url, options) => request(url, __spreadValues({ method: "DELETE" }, options))
101
- };
102
-
103
- // src/apis/harmony.api.ts
104
- var API_VERSION = "3";
105
- var Environments = {
106
- PROD: "PROD",
107
- UAT: "UAT"
108
- };
109
- var HARMONY_URLS = {
110
- [Environments.PROD]: "https://harmony.earthdata.nasa.gov",
111
- [Environments.UAT]: "https://harmony.uat.earthdata.nasa.gov",
112
- // for anonymous access, we have to go through our proxy since Harmony doesn't support anonymous requests directly
113
- // the proxy will add the necessary authentication to the request on the backend, so we can still use the same HarmonyRequest class to build the request URL with the appropriate parameters
114
- // the proxy also adds restrictions on how much data can be requested
115
- ANONYMOUS_ACCESS: "https://sjldutoe6c.execute-api.us-east-1.amazonaws.com/default/harmony-proxy"
116
- };
117
- var CLOUD_GIOVANNI_URLS = {
118
- [Environments.PROD]: "https://api.giovanni.earthdata.nasa.gov",
119
- [Environments.UAT]: "https://api.giovanni.uat.earthdata.nasa.gov"
120
- };
121
- var FINAL_STATUSES = /* @__PURE__ */ new Set([
122
- "successful" /* SUCCESSFUL */,
123
- "failed" /* FAILED */,
124
- "canceled" /* CANCELED */,
125
- "complete_with_errors" /* COMPLETE_WITH_ERRORS */
126
- ]);
127
- var _request, request_fn, _hasGiovanniServices, hasGiovanniServices_fn, _hasNonGiovanniServices, hasNonGiovanniServices_fn, _getNonGiovanniFormats, getNonGiovanniFormats_fn, _getGiovanniFormats, getGiovanniFormats_fn;
128
- var HarmonyApi = class {
129
- constructor() {
130
- __privateAdd(this, _request);
131
- __privateAdd(this, _hasGiovanniServices);
132
- __privateAdd(this, _hasNonGiovanniServices);
133
- __privateAdd(this, _getNonGiovanniFormats);
134
- __privateAdd(this, _getGiovanniFormats);
135
- }
136
- /**
137
- * Returns collection capabilities including available services, output formats, subsetting options, etc.
138
- * from the Harmony /capabilities endpoint
139
- */
140
- async getCollectionCapabilities(conceptId, options) {
141
- if (!conceptId) {
142
- throw new BadRequestException({
143
- message: "`collectionConceptId` is required"
144
- });
145
- }
146
- const capabilities = await __privateMethod(this, _request, request_fn).call(this, `capabilities?collectionId=${conceptId}&version=${API_VERSION}`, options);
147
- capabilities.variables = this.addConceptIdToVariables(capabilities.variables);
148
- capabilities.configuredOutputFormats = this.getOutputFormatOptions(capabilities);
149
- return capabilities;
150
- }
151
- /**
152
- * Gets a user's Harmony jobs
153
- */
154
- async getJobs(params, options) {
155
- const queryParams = new URLSearchParams();
156
- if (params == null ? void 0 : params.page)
157
- queryParams.append("page", params.page.toString());
158
- if (params == null ? void 0 : params.limit)
159
- queryParams.append("limit", params.limit.toString());
160
- if (params == null ? void 0 : params.label)
161
- queryParams.append("label", params.label);
162
- return __privateMethod(this, _request, request_fn).call(this, `jobs?${queryParams.toString()}`, options);
163
- }
164
- /**
165
- * Create a subset job by sending a GET request to the Harmony OGC API endpoint.
166
- * The harmonyRequest.requestUrl contains the full URL with all subset parameters.
167
- */
168
- async createJob(harmonyRequest, options) {
169
- return __privateMethod(this, _request, request_fn).call(this, harmonyRequest.requestUrl, options);
170
- }
171
- /**
172
- * Get the current status of an existing subset job.
173
- * Intended for polling until the job reaches a final state.
174
- */
175
- async getJobStatus(jobId, options) {
176
- return __privateMethod(this, _request, request_fn).call(this, `jobs/${jobId}`, options);
177
- }
178
- /**
179
- * Removes one or more labels from one or more Harmony jobs.
180
- * After removal, the jobs will no longer match label-based filters.
181
- *
182
- * @example
183
- * await harmonyApi.removeJobLabels({ jobIDs: ['abc', 'def'], labels: ['my-label'] }, { bearerToken })
184
- */
185
- async removeJobLabels(params, options) {
186
- const url = `${HARMONY_URLS[Environments.PROD]}/labels`;
187
- return apiClient.delete(url, {
188
- body: { jobID: params.jobIDs, label: params.labels },
189
- headers: __spreadValues({
190
- "Content-Type": "application/json"
191
- }, (options == null ? void 0 : options.bearerToken) && {
192
- Authorization: `Bearer ${options.bearerToken}`
193
- }),
194
- signal: options == null ? void 0 : options.signal
195
- });
196
- }
197
- /**
198
- * Given a jobId for a running job, send a cancellation request to the Harmony API.
199
- * Returns the updated job status after cancellation.
200
- */
201
- async cancelJob(jobId, options) {
202
- return __privateMethod(this, _request, request_fn).call(this, `jobs/${jobId}/cancel`, options);
203
- }
204
- /**
205
- * When a Harmony job finishes, it provides URLs for downloading the results. This method can be used to fetch the results from those URLs, which may require authentication if the data is not public.
206
- */
207
- async fetchUrl(url, options) {
208
- const relativeUrl = url.replace(CLOUD_GIOVANNI_URLS.PROD, "").replace(CLOUD_GIOVANNI_URLS.UAT, "");
209
- return __privateMethod(this, _request, request_fn).call(this, relativeUrl, options);
210
- }
211
- /**
212
- * Extracts the variable concept ID from the variable's href and adds it as a property on the variable object.
213
- */
214
- addConceptIdToVariables(variables) {
215
- return variables.map((v) => {
216
- const match = v.href.match(/\/concepts\/(V\d+-\w+)$/);
217
- if (match) {
218
- v.conceptId = match[1];
219
- }
220
- return v;
221
- });
222
- }
223
- /**
224
- * Processes the Harmony capabilities response to generate a list of output format options with user-friendly labels and descriptions.
225
- * If Giovanni is the only service available, only return Giovanni-specific formats.
226
- * If Giovanni is present with other services, include both Giovanni and non-Giovanni formats, avoiding duplicates.
227
- * If Giovanni is not present, return only non-Giovanni formats.
228
- */
229
- getOutputFormatOptions(capabilities) {
230
- const hasNonGiovanniServices = __privateMethod(this, _hasNonGiovanniServices, hasNonGiovanniServices_fn).call(this, capabilities);
231
- const hasGiovanniServices = __privateMethod(this, _hasGiovanniServices, hasGiovanniServices_fn).call(this, capabilities);
232
- const giovanniFormats = hasGiovanniServices ? __privateMethod(this, _getGiovanniFormats, getGiovanniFormats_fn).call(this, capabilities) : [];
233
- if (hasGiovanniServices && !hasNonGiovanniServices) {
234
- return giovanniFormats;
235
- }
236
- const outputFormats = [];
237
- const nonGiovanniFormats = __privateMethod(this, _getNonGiovanniFormats, getNonGiovanniFormats_fn).call(this, capabilities);
238
- nonGiovanniFormats.forEach((format) => {
239
- let label = format;
240
- let description = `Download data in ${format} format`;
241
- switch (format) {
242
- case "application/x-hdf":
243
- case "application/octet-stream":
244
- label = "HDF-EOS5";
245
- description = "Download data in HDF-EOS5 format";
246
- break;
247
- case "application/x-netcdf4":
248
- case "application/netcdf":
249
- label = "NetCDF";
250
- description = "Download data in NetCDF format";
251
- break;
252
- case "application/x-netcdf4;profile=opendap_url":
253
- label = "OPeNDAP URL (x-netcdf4)";
254
- description = "Download data in OPeNDAP URL (x-netcdf4) format";
255
- break;
256
- case "text/csv":
257
- label = "CSV";
258
- description = "Download data in CSV format";
259
- break;
260
- case "image/tiff":
261
- case "image/tif":
262
- label = "TIFF";
263
- description = "Download data in TIFF format";
264
- break;
265
- case "image/png":
266
- label = "PNG";
267
- description = "Download data in PNG format";
268
- break;
269
- case "image/jpg":
270
- case "image/jpeg":
271
- label = "JPEG";
272
- description = "Download data in JPEG format";
273
- break;
274
- case "application/shapefile+zip":
275
- label = "Shapefile+zip";
276
- description = "Download data in Shapefile+zip format";
277
- break;
278
- case "application/x-zarr":
279
- label = "ZARR";
280
- description = "Download data in ZARR format";
281
- break;
282
- default:
283
- label = format;
284
- description = `Download data in ${format} format`;
285
- }
286
- outputFormats.push({
287
- key: format,
288
- label,
289
- description
290
- });
291
- });
292
- if (hasGiovanniServices && hasNonGiovanniServices) {
293
- outputFormats.push(...giovanniFormats);
294
- }
295
- return outputFormats;
296
- }
297
- };
298
- _request = new WeakSet();
299
- request_fn = function(url, options) {
300
- let environmentUrl = HARMONY_URLS[Environments.PROD];
301
- if (!(options == null ? void 0 : options.bearerToken)) {
302
- environmentUrl = HARMONY_URLS.ANONYMOUS_ACCESS;
303
- }
304
- if (!url.startsWith("http")) {
305
- url = `${environmentUrl}/${url}`;
306
- }
307
- return apiClient.get(url, {
308
- signal: options == null ? void 0 : options.signal,
309
- headers: __spreadValues({}, (options == null ? void 0 : options.bearerToken) && {
310
- Authorization: `Bearer ${options.bearerToken}`
311
- })
312
- });
313
- };
314
- _hasGiovanniServices = new WeakSet();
315
- hasGiovanniServices_fn = function(capabilities) {
316
- var _a11, _b2;
317
- return (_b2 = (_a11 = capabilities == null ? void 0 : capabilities.services) == null ? void 0 : _a11.some(
318
- (service) => service.name.toLowerCase().includes("giovanni")
319
- )) != null ? _b2 : false;
320
- };
321
- _hasNonGiovanniServices = new WeakSet();
322
- hasNonGiovanniServices_fn = function(capabilities) {
323
- var _a11, _b2;
324
- return (_b2 = (_a11 = capabilities == null ? void 0 : capabilities.services) == null ? void 0 : _a11.some(
325
- (service) => !service.name.toLowerCase().includes("giovanni")
326
- )) != null ? _b2 : false;
327
- };
328
- _getNonGiovanniFormats = new WeakSet();
329
- getNonGiovanniFormats_fn = function(capabilities) {
330
- if (!(capabilities == null ? void 0 : capabilities.services)) {
331
- return [];
332
- }
333
- const nonGiovanniServices = capabilities.services.filter(
334
- (service) => !service.name.toLowerCase().includes("giovanni")
335
- );
336
- const formats = /* @__PURE__ */ new Set();
337
- nonGiovanniServices.forEach((service) => {
338
- var _a11;
339
- (_a11 = service.capabilities.outputFormats) == null ? void 0 : _a11.forEach((format) => {
340
- formats.add(format);
341
- });
342
- });
343
- const formatArray = Array.from(formats);
344
- if (formatArray.includes("application/netcdf") && formatArray.includes("application/x-netcdf4")) {
345
- return formatArray.filter((format) => format !== "application/netcdf");
346
- }
347
- return formatArray;
348
- };
349
- _getGiovanniFormats = new WeakSet();
350
- getGiovanniFormats_fn = function(capabilities) {
351
- const giovanniFormats = [];
352
- capabilities.services.forEach((service) => {
353
- const serviceName = service.name.toLowerCase();
354
- if (serviceName.includes("giovanni-time-series")) {
355
- giovanniFormats.push({
356
- key: "text/csv",
357
- label: "CSV (point-based time series; one file)",
358
- description: "Single variable plotted over time",
359
- isGiovanniFormat: true
360
- });
361
- }
362
- if (serviceName.includes("giovanni-averaging")) {
363
- giovanniFormats.push(
364
- {
365
- key: "image/tiff",
366
- label: "GeoTIFF (time-averaged map; one file)",
367
- description: "Time averaged representation as map",
368
- isGiovanniFormat: true
369
- },
370
- {
371
- key: "text/csv",
372
- label: "CSV (area-averaged time series; one file)",
373
- description: "Area averaged data over time",
374
- isGiovanniFormat: true
375
- }
376
- );
377
- }
378
- });
379
- return giovanniFormats.filter(
380
- (format, index, formats) => formats.findIndex((existing) => existing.label === format.label) === index
381
- );
382
- };
383
- var harmonyApi = new HarmonyApi();
384
-
385
- // src/lib/thumbnails/thumbnail.service.ts
386
- init_dirname();
387
- init_buffer();
388
- init_process();
389
- var ThumbnailService = class {
390
- async store(harmonyJobId, blob) {
391
- await withDb(async (db) => {
392
- const record = {
393
- harmonyJobId,
394
- blob,
395
- createdAt: Date.now()
396
- };
397
- await db.put("thumbnails" /* THUMBNAILS */, record);
398
- });
399
- }
400
- async get(harmonyJobId) {
401
- return withDb(async (db) => {
402
- const record = await db.get(
403
- "thumbnails" /* THUMBNAILS */,
404
- harmonyJobId
405
- );
406
- return record == null ? void 0 : record.blob;
407
- });
408
- }
409
- async delete(harmonyJobId) {
410
- await withDb(async (db) => {
411
- await db.delete("thumbnails" /* THUMBNAILS */, harmonyJobId);
412
- });
413
- }
414
- };
415
-
416
- // src/queries/harmony.queries.ts
417
- init_dirname();
418
- init_buffer();
419
- init_process();
420
- var POLL_INTERVAL_MS = 3e3;
421
- var PAGE_1_POLL_INTERVAL_MS = 5e3;
422
- var thumbnailService = new ThumbnailService();
423
- function isFetchableHarmonyJobId(jobID) {
424
- return Boolean(jobID && jobID !== "new");
425
- }
426
- function queryHarmonyCapabilities(collectionConceptId, options) {
427
- return {
428
- queryKey: ["harmony", "capabilities", collectionConceptId],
429
- queryFn: async ({ signal }) => {
430
- return harmonyApi.getCollectionCapabilities(collectionConceptId, __spreadProps(__spreadValues({}, options), {
431
- signal
432
- }));
433
- },
434
- enabled: !!collectionConceptId
435
- };
436
- }
437
- function queryHarmonyJobs(params, options) {
438
- return {
439
- queryKey: ["harmony", "jobs", params],
440
- queryFn: async ({ signal }) => {
441
- const result = await harmonyApi.getJobs(params, __spreadProps(__spreadValues({}, options), {
442
- signal
443
- }));
444
- const enrichedJobs = await Promise.all(
445
- result.jobs.map(async (job) => {
446
- const blob = await thumbnailService.get(job.jobID);
447
- return blob ? __spreadProps(__spreadValues({}, job), { thumbnailBlob: blob }) : job;
448
- })
449
- );
450
- return __spreadProps(__spreadValues({}, result), { jobs: enrichedJobs });
451
- },
452
- // require a bearer token to run
453
- enabled: !!(options == null ? void 0 : options.bearerToken),
454
- refetchInterval: () => {
455
- if ((params == null ? void 0 : params.page) && params.page !== 1) {
456
- return false;
457
- }
458
- return PAGE_1_POLL_INTERVAL_MS;
459
- }
460
- };
461
- }
462
- function queryHarmonyJobStatus(jobID, options) {
463
- return {
464
- queryKey: ["harmony", "jobs", jobID],
465
- queryFn: async ({ signal }) => {
466
- if (!isFetchableHarmonyJobId(jobID))
467
- return null;
468
- return harmonyApi.getJobStatus(jobID, __spreadProps(__spreadValues({}, options), { signal }));
469
- },
470
- enabled: isFetchableHarmonyJobId(jobID),
471
- // Poll until the job reaches a final state
472
- refetchInterval: (query) => {
473
- var _a11;
474
- const status = (_a11 = query.state.data) == null ? void 0 : _a11.status;
475
- if (status && FINAL_STATUSES.has(status)) {
476
- return false;
477
- }
478
- return POLL_INTERVAL_MS;
479
- },
480
- // Job status changes frequently while running; don't use stale data
481
- staleTime: 0,
482
- gcTime: 0
483
- };
484
- }
485
- function queryCreateHarmonySubsetJob() {
486
- return {
487
- mutationFn: ({ harmonyRequest, options }) => harmonyApi.createJob(harmonyRequest, options)
488
- };
489
- }
490
- function queryCancelHarmonySubsetJob() {
491
- return {
492
- mutationFn: ({ jobId, options }) => harmonyApi.cancelJob(jobId, options)
493
- };
494
- }
495
- function mutationRemoveHarmonyJobLabels() {
496
- return {
497
- mutationFn: ({ jobIDs, labels, options }) => harmonyApi.removeJobLabels({ jobIDs, labels }, options)
498
- };
499
- }
500
-
501
- // src/controllers/query.controller.ts
502
- init_dirname();
503
- init_buffer();
504
- init_process();
505
-
506
- // node_modules/@tanstack/query-core/build/modern/index.js
507
- init_dirname();
508
- init_buffer();
509
- init_process();
510
-
511
- // node_modules/@tanstack/query-core/build/modern/focusManager.js
512
- init_dirname();
513
- init_buffer();
514
- init_process();
515
-
516
- // node_modules/@tanstack/query-core/build/modern/subscribable.js
517
- init_dirname();
518
- init_buffer();
519
- init_process();
520
- var Subscribable = class {
521
- constructor() {
522
- this.listeners = /* @__PURE__ */ new Set();
523
- this.subscribe = this.subscribe.bind(this);
524
- }
525
- subscribe(listener) {
526
- this.listeners.add(listener);
527
- this.onSubscribe();
528
- return () => {
529
- this.listeners.delete(listener);
530
- this.onUnsubscribe();
531
- };
532
- }
533
- hasListeners() {
534
- return this.listeners.size > 0;
535
- }
536
- onSubscribe() {
537
- }
538
- onUnsubscribe() {
539
- }
540
- };
541
-
542
- // node_modules/@tanstack/query-core/build/modern/focusManager.js
543
- var _focused, _cleanup, _setup, _a;
544
- var FocusManager = (_a = class extends Subscribable {
545
- constructor() {
546
- super();
547
- __privateAdd(this, _focused, void 0);
548
- __privateAdd(this, _cleanup, void 0);
549
- __privateAdd(this, _setup, void 0);
550
- __privateSet(this, _setup, (onFocus) => {
551
- if (typeof window !== "undefined" && window.addEventListener) {
552
- const listener = () => onFocus();
553
- window.addEventListener("visibilitychange", listener, false);
554
- return () => {
555
- window.removeEventListener("visibilitychange", listener);
556
- };
557
- }
558
- return;
559
- });
560
- }
561
- onSubscribe() {
562
- if (!__privateGet(this, _cleanup)) {
563
- this.setEventListener(__privateGet(this, _setup));
564
- }
565
- }
566
- onUnsubscribe() {
567
- var _a11;
568
- if (!this.hasListeners()) {
569
- (_a11 = __privateGet(this, _cleanup)) == null ? void 0 : _a11.call(this);
570
- __privateSet(this, _cleanup, void 0);
571
- }
572
- }
573
- setEventListener(setup) {
574
- var _a11;
575
- __privateSet(this, _setup, setup);
576
- (_a11 = __privateGet(this, _cleanup)) == null ? void 0 : _a11.call(this);
577
- __privateSet(this, _cleanup, setup((focused) => {
578
- if (typeof focused === "boolean") {
579
- this.setFocused(focused);
580
- } else {
581
- this.onFocus();
582
- }
583
- }));
584
- }
585
- setFocused(focused) {
586
- const changed = __privateGet(this, _focused) !== focused;
587
- if (changed) {
588
- __privateSet(this, _focused, focused);
589
- this.onFocus();
590
- }
591
- }
592
- onFocus() {
593
- const isFocused = this.isFocused();
594
- this.listeners.forEach((listener) => {
595
- listener(isFocused);
596
- });
597
- }
598
- isFocused() {
599
- var _a11;
600
- if (typeof __privateGet(this, _focused) === "boolean") {
601
- return __privateGet(this, _focused);
602
- }
603
- return ((_a11 = globalThis.document) == null ? void 0 : _a11.visibilityState) !== "hidden";
604
- }
605
- }, _focused = new WeakMap(), _cleanup = new WeakMap(), _setup = new WeakMap(), _a);
606
- var focusManager = new FocusManager();
607
-
608
- // node_modules/@tanstack/query-core/build/modern/environmentManager.js
609
- init_dirname();
610
- init_buffer();
611
- init_process();
612
-
613
- // node_modules/@tanstack/query-core/build/modern/utils.js
614
- init_dirname();
615
- init_buffer();
616
- init_process();
617
-
618
- // node_modules/@tanstack/query-core/build/modern/timeoutManager.js
619
- init_dirname();
620
- init_buffer();
621
- init_process();
622
- var defaultTimeoutProvider = {
623
- // We need the wrapper function syntax below instead of direct references to
624
- // global setTimeout etc.
625
- //
626
- // BAD: `setTimeout: setTimeout`
627
- // GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)`
628
- //
629
- // If we use direct references here, then anything that wants to spy on or
630
- // replace the global setTimeout (like tests) won't work since we'll already
631
- // have a hard reference to the original implementation at the time when this
632
- // file was imported.
633
- setTimeout: (callback, delay) => setTimeout(callback, delay),
634
- clearTimeout: (timeoutId) => clearTimeout(timeoutId),
635
- setInterval: (callback, delay) => setInterval(callback, delay),
636
- clearInterval: (intervalId) => clearInterval(intervalId)
637
- };
638
- var _provider, _providerCalled, _a2;
639
- var TimeoutManager = (_a2 = class {
640
- constructor() {
641
- // We cannot have TimeoutManager<T> as we must instantiate it with a concrete
642
- // type at app boot; and if we leave that type, then any new timer provider
643
- // would need to support the default provider's concrete timer ID, which is
644
- // infeasible across environments.
645
- //
646
- // We settle for type safety for the TimeoutProvider type, and accept that
647
- // this class is unsafe internally to allow for extension.
648
- __privateAdd(this, _provider, defaultTimeoutProvider);
649
- __privateAdd(this, _providerCalled, false);
650
- }
651
- setTimeoutProvider(provider) {
652
- if (false) {
653
- if (__privateGet(this, _providerCalled) && provider !== __privateGet(this, _provider)) {
654
- console.error(
655
- `[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,
656
- { previous: __privateGet(this, _provider), provider }
657
- );
658
- }
659
- }
660
- __privateSet(this, _provider, provider);
661
- if (false) {
662
- __privateSet(this, _providerCalled, false);
663
- }
664
- }
665
- setTimeout(callback, delay) {
666
- if (false) {
667
- __privateSet(this, _providerCalled, true);
668
- }
669
- return __privateGet(this, _provider).setTimeout(callback, delay);
670
- }
671
- clearTimeout(timeoutId) {
672
- __privateGet(this, _provider).clearTimeout(timeoutId);
673
- }
674
- setInterval(callback, delay) {
675
- if (false) {
676
- __privateSet(this, _providerCalled, true);
677
- }
678
- return __privateGet(this, _provider).setInterval(callback, delay);
679
- }
680
- clearInterval(intervalId) {
681
- __privateGet(this, _provider).clearInterval(intervalId);
682
- }
683
- }, _provider = new WeakMap(), _providerCalled = new WeakMap(), _a2);
684
- var timeoutManager = new TimeoutManager();
685
- function systemSetTimeoutZero(callback) {
686
- setTimeout(callback, 0);
687
- }
688
-
689
- // node_modules/@tanstack/query-core/build/modern/utils.js
690
- var isServer = typeof window === "undefined" || "Deno" in globalThis;
691
- function noop() {
692
- }
693
- function functionalUpdate(updater, input) {
694
- return typeof updater === "function" ? updater(input) : updater;
695
- }
696
- function isValidTimeout(value) {
697
- return typeof value === "number" && value >= 0 && value !== Infinity;
698
- }
699
- function timeUntilStale(updatedAt, staleTime) {
700
- return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
701
- }
702
- function resolveStaleTime(staleTime, query) {
703
- return typeof staleTime === "function" ? staleTime(query) : staleTime;
704
- }
705
- function resolveEnabled(enabled, query) {
706
- return typeof enabled === "function" ? enabled(query) : enabled;
707
- }
708
- function matchQuery(filters, query) {
709
- const {
710
- type = "all",
711
- exact,
712
- fetchStatus,
713
- predicate,
714
- queryKey,
715
- stale
716
- } = filters;
717
- if (queryKey) {
718
- if (exact) {
719
- if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {
720
- return false;
721
- }
722
- } else if (!partialMatchKey(query.queryKey, queryKey)) {
723
- return false;
724
- }
725
- }
726
- if (type !== "all") {
727
- const isActive = query.isActive();
728
- if (type === "active" && !isActive) {
729
- return false;
730
- }
731
- if (type === "inactive" && isActive) {
732
- return false;
733
- }
734
- }
735
- if (typeof stale === "boolean" && query.isStale() !== stale) {
736
- return false;
737
- }
738
- if (fetchStatus && fetchStatus !== query.state.fetchStatus) {
739
- return false;
740
- }
741
- if (predicate && !predicate(query)) {
742
- return false;
743
- }
744
- return true;
745
- }
746
- function matchMutation(filters, mutation) {
747
- const { exact, status, predicate, mutationKey } = filters;
748
- if (mutationKey) {
749
- if (!mutation.options.mutationKey) {
750
- return false;
751
- }
752
- if (exact) {
753
- if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {
754
- return false;
755
- }
756
- } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {
757
- return false;
758
- }
759
- }
760
- if (status && mutation.state.status !== status) {
761
- return false;
762
- }
763
- if (predicate && !predicate(mutation)) {
764
- return false;
765
- }
766
- return true;
767
- }
768
- function hashQueryKeyByOptions(queryKey, options) {
769
- const hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashKey;
770
- return hashFn(queryKey);
771
- }
772
- function hashKey(queryKey) {
773
- return JSON.stringify(
774
- queryKey,
775
- (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
776
- result[key] = val[key];
777
- return result;
778
- }, {}) : val
779
- );
780
- }
781
- function partialMatchKey(a, b) {
782
- if (a === b) {
783
- return true;
784
- }
785
- if (typeof a !== typeof b) {
786
- return false;
787
- }
788
- if (a && b && typeof a === "object" && typeof b === "object") {
789
- return Object.keys(b).every((key) => partialMatchKey(a[key], b[key]));
790
- }
791
- return false;
792
- }
793
- var hasOwn = Object.prototype.hasOwnProperty;
794
- function replaceEqualDeep(a, b, depth = 0) {
795
- if (a === b) {
796
- return a;
797
- }
798
- if (depth > 500)
799
- return b;
800
- const array = isPlainArray(a) && isPlainArray(b);
801
- if (!array && !(isPlainObject(a) && isPlainObject(b)))
802
- return b;
803
- const aItems = array ? a : Object.keys(a);
804
- const aSize = aItems.length;
805
- const bItems = array ? b : Object.keys(b);
806
- const bSize = bItems.length;
807
- const copy = array ? new Array(bSize) : {};
808
- let equalItems = 0;
809
- for (let i = 0; i < bSize; i++) {
810
- const key = array ? i : bItems[i];
811
- const aItem = a[key];
812
- const bItem = b[key];
813
- if (aItem === bItem) {
814
- copy[key] = aItem;
815
- if (array ? i < aSize : hasOwn.call(a, key))
816
- equalItems++;
817
- continue;
818
- }
819
- if (aItem === null || bItem === null || typeof aItem !== "object" || typeof bItem !== "object") {
820
- copy[key] = bItem;
821
- continue;
822
- }
823
- const v = replaceEqualDeep(aItem, bItem, depth + 1);
824
- copy[key] = v;
825
- if (v === aItem)
826
- equalItems++;
827
- }
828
- return aSize === bSize && equalItems === aSize ? a : copy;
829
- }
830
- function shallowEqualObjects(a, b) {
831
- if (!b || Object.keys(a).length !== Object.keys(b).length) {
832
- return false;
833
- }
834
- for (const key in a) {
835
- if (a[key] !== b[key]) {
836
- return false;
837
- }
838
- }
839
- return true;
840
- }
841
- function isPlainArray(value) {
842
- return Array.isArray(value) && value.length === Object.keys(value).length;
843
- }
844
- function isPlainObject(o) {
845
- if (!hasObjectPrototype(o)) {
846
- return false;
847
- }
848
- const ctor = o.constructor;
849
- if (ctor === void 0) {
850
- return true;
851
- }
852
- const prot = ctor.prototype;
853
- if (!hasObjectPrototype(prot)) {
854
- return false;
855
- }
856
- if (!prot.hasOwnProperty("isPrototypeOf")) {
857
- return false;
858
- }
859
- if (Object.getPrototypeOf(o) !== Object.prototype) {
860
- return false;
861
- }
862
- return true;
863
- }
864
- function hasObjectPrototype(o) {
865
- return Object.prototype.toString.call(o) === "[object Object]";
866
- }
867
- function sleep(timeout) {
868
- return new Promise((resolve) => {
869
- timeoutManager.setTimeout(resolve, timeout);
870
- });
871
- }
872
- function replaceData(prevData, data, options) {
873
- if (typeof options.structuralSharing === "function") {
874
- return options.structuralSharing(prevData, data);
875
- } else if (options.structuralSharing !== false) {
876
- if (false) {
877
- try {
878
- return replaceEqualDeep(prevData, data);
879
- } catch (error) {
880
- console.error(
881
- `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`
882
- );
883
- throw error;
884
- }
885
- }
886
- return replaceEqualDeep(prevData, data);
887
- }
888
- return data;
889
- }
890
- function addToEnd(items, item, max = 0) {
891
- const newItems = [...items, item];
892
- return max && newItems.length > max ? newItems.slice(1) : newItems;
893
- }
894
- function addToStart(items, item, max = 0) {
895
- const newItems = [item, ...items];
896
- return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
897
- }
898
- var skipToken = /* @__PURE__ */ Symbol();
899
- function ensureQueryFn(options, fetchOptions) {
900
- if (false) {
901
- if (options.queryFn === skipToken) {
902
- console.error(
903
- `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`
904
- );
905
- }
906
- }
907
- if (!options.queryFn && (fetchOptions == null ? void 0 : fetchOptions.initialPromise)) {
908
- return () => fetchOptions.initialPromise;
909
- }
910
- if (!options.queryFn || options.queryFn === skipToken) {
911
- return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));
912
- }
913
- return options.queryFn;
914
- }
915
- function addConsumeAwareSignal(object, getSignal, onCancelled) {
916
- let consumed = false;
917
- let signal;
918
- Object.defineProperty(object, "signal", {
919
- enumerable: true,
920
- get: () => {
921
- signal != null ? signal : signal = getSignal();
922
- if (consumed) {
923
- return signal;
924
- }
925
- consumed = true;
926
- if (signal.aborted) {
927
- onCancelled();
928
- } else {
929
- signal.addEventListener("abort", onCancelled, { once: true });
930
- }
931
- return signal;
932
- }
933
- });
934
- return object;
935
- }
936
-
937
- // node_modules/@tanstack/query-core/build/modern/environmentManager.js
938
- var environmentManager = /* @__PURE__ */ (() => {
939
- let isServerFn = () => isServer;
940
- return {
941
- /**
942
- * Returns whether the current runtime should be treated as a server environment.
943
- */
944
- isServer() {
945
- return isServerFn();
946
- },
947
- /**
948
- * Overrides the server check globally.
949
- */
950
- setIsServer(isServerValue) {
951
- isServerFn = isServerValue;
952
- }
953
- };
954
- })();
955
-
956
- // node_modules/@tanstack/query-core/build/modern/hydration.js
957
- init_dirname();
958
- init_buffer();
959
- init_process();
960
-
961
- // node_modules/@tanstack/query-core/build/modern/thenable.js
962
- init_dirname();
963
- init_buffer();
964
- init_process();
965
- function pendingThenable() {
966
- let resolve;
967
- let reject;
968
- const thenable = new Promise((_resolve, _reject) => {
969
- resolve = _resolve;
970
- reject = _reject;
971
- });
972
- thenable.status = "pending";
973
- thenable.catch(() => {
974
- });
975
- function finalize(data) {
976
- Object.assign(thenable, data);
977
- delete thenable.resolve;
978
- delete thenable.reject;
979
- }
980
- thenable.resolve = (value) => {
981
- finalize({
982
- status: "fulfilled",
983
- value
984
- });
985
- resolve(value);
986
- };
987
- thenable.reject = (reason) => {
988
- finalize({
989
- status: "rejected",
990
- reason
991
- });
992
- reject(reason);
993
- };
994
- return thenable;
995
- }
996
- function tryResolveSync(promise) {
997
- var _a11;
998
- let data;
999
- (_a11 = promise.then((result) => {
1000
- data = result;
1001
- return result;
1002
- }, noop)) == null ? void 0 : _a11.catch(noop);
1003
- if (data !== void 0) {
1004
- return { data };
1005
- }
1006
- return void 0;
1007
- }
1008
-
1009
- // node_modules/@tanstack/query-core/build/modern/hydration.js
1010
- function defaultTransformerFn(data) {
1011
- return data;
1012
- }
1013
- function dehydrateMutation(mutation) {
1014
- return __spreadValues(__spreadValues({
1015
- mutationKey: mutation.options.mutationKey,
1016
- state: mutation.state
1017
- }, mutation.options.scope && { scope: mutation.options.scope }), mutation.meta && { meta: mutation.meta });
1018
- }
1019
- function dehydrateQuery(query, serializeData, shouldRedactErrors) {
1020
- const dehydratePromise = () => {
1021
- var _a11;
1022
- const promise = (_a11 = query.promise) == null ? void 0 : _a11.then(serializeData).catch((error) => {
1023
- if (!shouldRedactErrors(error)) {
1024
- return Promise.reject(error);
1025
- }
1026
- if (false) {
1027
- console.error(
1028
- `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`
1029
- );
1030
- }
1031
- return Promise.reject(new Error("redacted"));
1032
- });
1033
- promise == null ? void 0 : promise.catch(noop);
1034
- return promise;
1035
- };
1036
- return __spreadValues(__spreadValues({
1037
- dehydratedAt: Date.now(),
1038
- state: __spreadValues(__spreadValues({}, query.state), query.state.data !== void 0 && {
1039
- data: serializeData(query.state.data)
1040
- }),
1041
- queryKey: query.queryKey,
1042
- queryHash: query.queryHash
1043
- }, query.state.status === "pending" && {
1044
- promise: dehydratePromise()
1045
- }), query.meta && { meta: query.meta });
1046
- }
1047
- function defaultShouldDehydrateMutation(mutation) {
1048
- return mutation.state.isPaused;
1049
- }
1050
- function defaultShouldDehydrateQuery(query) {
1051
- return query.state.status === "success";
1052
- }
1053
- function defaultShouldRedactErrors(_) {
1054
- return true;
1055
- }
1056
- function dehydrate(client, options = {}) {
1057
- var _a11, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
1058
- const filterMutation = (_c = (_b2 = options.shouldDehydrateMutation) != null ? _b2 : (_a11 = client.getDefaultOptions().dehydrate) == null ? void 0 : _a11.shouldDehydrateMutation) != null ? _c : defaultShouldDehydrateMutation;
1059
- const mutations = client.getMutationCache().getAll().flatMap(
1060
- (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []
1061
- );
1062
- const filterQuery = (_f = (_e = options.shouldDehydrateQuery) != null ? _e : (_d = client.getDefaultOptions().dehydrate) == null ? void 0 : _d.shouldDehydrateQuery) != null ? _f : defaultShouldDehydrateQuery;
1063
- const shouldRedactErrors = (_i = (_h = options.shouldRedactErrors) != null ? _h : (_g = client.getDefaultOptions().dehydrate) == null ? void 0 : _g.shouldRedactErrors) != null ? _i : defaultShouldRedactErrors;
1064
- const serializeData = (_l = (_k = options.serializeData) != null ? _k : (_j = client.getDefaultOptions().dehydrate) == null ? void 0 : _j.serializeData) != null ? _l : defaultTransformerFn;
1065
- const queries = client.getQueryCache().getAll().flatMap(
1066
- (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData, shouldRedactErrors)] : []
1067
- );
1068
- return { mutations, queries };
1069
- }
1070
- function hydrate(client, dehydratedState, options) {
1071
- var _a11, _b2, _c, _d;
1072
- if (typeof dehydratedState !== "object" || dehydratedState === null) {
1073
- return;
1074
- }
1075
- const mutationCache = client.getMutationCache();
1076
- const queryCache = client.getQueryCache();
1077
- const deserializeData = (_d = (_c = (_a11 = options == null ? void 0 : options.defaultOptions) == null ? void 0 : _a11.deserializeData) != null ? _c : (_b2 = client.getDefaultOptions().hydrate) == null ? void 0 : _b2.deserializeData) != null ? _d : defaultTransformerFn;
1078
- const mutations = dehydratedState.mutations || [];
1079
- const queries = dehydratedState.queries || [];
1080
- mutations.forEach((_e) => {
1081
- var _f = _e, { state } = _f, mutationOptions = __objRest(_f, ["state"]);
1082
- var _a12, _b3;
1083
- mutationCache.build(
1084
- client,
1085
- __spreadValues(__spreadValues(__spreadValues({}, (_a12 = client.getDefaultOptions().hydrate) == null ? void 0 : _a12.mutations), (_b3 = options == null ? void 0 : options.defaultOptions) == null ? void 0 : _b3.mutations), mutationOptions),
1086
- state
1087
- );
1088
- });
1089
- queries.forEach(
1090
- ({ queryKey, state, queryHash, meta, promise, dehydratedAt }) => {
1091
- var _b3, _c2;
1092
- const syncData = promise ? tryResolveSync(promise) : void 0;
1093
- const rawData = state.data === void 0 ? syncData == null ? void 0 : syncData.data : state.data;
1094
- const data = rawData === void 0 ? rawData : deserializeData(rawData);
1095
- let query = queryCache.get(queryHash);
1096
- const existingQueryIsPending = (query == null ? void 0 : query.state.status) === "pending";
1097
- const existingQueryIsFetching = (query == null ? void 0 : query.state.fetchStatus) === "fetching";
1098
- if (query) {
1099
- const hasNewerSyncData = syncData && // We only need this undefined check to handle older dehydration
1100
- // payloads that might not have dehydratedAt
1101
- dehydratedAt !== void 0 && dehydratedAt > query.state.dataUpdatedAt;
1102
- if (state.dataUpdatedAt > query.state.dataUpdatedAt || hasNewerSyncData) {
1103
- const _a12 = state, { fetchStatus: _ignored } = _a12, serializedState = __objRest(_a12, ["fetchStatus"]);
1104
- query.setState(__spreadProps(__spreadValues({}, serializedState), {
1105
- data
1106
- }));
1107
- }
1108
- } else {
1109
- query = queryCache.build(
1110
- client,
1111
- __spreadProps(__spreadValues(__spreadValues({}, (_b3 = client.getDefaultOptions().hydrate) == null ? void 0 : _b3.queries), (_c2 = options == null ? void 0 : options.defaultOptions) == null ? void 0 : _c2.queries), {
1112
- queryKey,
1113
- queryHash,
1114
- meta
1115
- }),
1116
- // Reset fetch status to idle to avoid
1117
- // query being stuck in fetching state upon hydration
1118
- __spreadProps(__spreadValues({}, state), {
1119
- data,
1120
- fetchStatus: "idle",
1121
- status: data !== void 0 ? "success" : state.status
1122
- })
1123
- );
1124
- }
1125
- if (promise && !existingQueryIsPending && !existingQueryIsFetching && // Only hydrate if dehydration is newer than any existing data,
1126
- // this is always true for new queries
1127
- (dehydratedAt === void 0 || dehydratedAt > query.state.dataUpdatedAt)) {
1128
- query.fetch(void 0, {
1129
- // RSC transformed promises are not thenable
1130
- initialPromise: Promise.resolve(promise).then(deserializeData)
1131
- }).catch(noop);
1132
- }
1133
- }
1134
- );
1135
- }
1136
-
1137
- // node_modules/@tanstack/query-core/build/modern/queryObserver.js
1138
- init_dirname();
1139
- init_buffer();
1140
- init_process();
1141
-
1142
- // node_modules/@tanstack/query-core/build/modern/notifyManager.js
1143
- init_dirname();
1144
- init_buffer();
1145
- init_process();
1146
- var defaultScheduler = systemSetTimeoutZero;
1147
- function createNotifyManager() {
1148
- let queue = [];
1149
- let transactions = 0;
1150
- let notifyFn = (callback) => {
1151
- callback();
1152
- };
1153
- let batchNotifyFn = (callback) => {
1154
- callback();
1155
- };
1156
- let scheduleFn = defaultScheduler;
1157
- const schedule = (callback) => {
1158
- if (transactions) {
1159
- queue.push(callback);
1160
- } else {
1161
- scheduleFn(() => {
1162
- notifyFn(callback);
1163
- });
1164
- }
1165
- };
1166
- const flush = () => {
1167
- const originalQueue = queue;
1168
- queue = [];
1169
- if (originalQueue.length) {
1170
- scheduleFn(() => {
1171
- batchNotifyFn(() => {
1172
- originalQueue.forEach((callback) => {
1173
- notifyFn(callback);
1174
- });
1175
- });
1176
- });
1177
- }
1178
- };
1179
- return {
1180
- batch: (callback) => {
1181
- let result;
1182
- transactions++;
1183
- try {
1184
- result = callback();
1185
- } finally {
1186
- transactions--;
1187
- if (!transactions) {
1188
- flush();
1189
- }
1190
- }
1191
- return result;
1192
- },
1193
- /**
1194
- * All calls to the wrapped function will be batched.
1195
- */
1196
- batchCalls: (callback) => {
1197
- return (...args) => {
1198
- schedule(() => {
1199
- callback(...args);
1200
- });
1201
- };
1202
- },
1203
- schedule,
1204
- /**
1205
- * Use this method to set a custom notify function.
1206
- * This can be used to for example wrap notifications with `React.act` while running tests.
1207
- */
1208
- setNotifyFunction: (fn) => {
1209
- notifyFn = fn;
1210
- },
1211
- /**
1212
- * Use this method to set a custom function to batch notifications together into a single tick.
1213
- * By default React Query will use the batch function provided by ReactDOM or React Native.
1214
- */
1215
- setBatchNotifyFunction: (fn) => {
1216
- batchNotifyFn = fn;
1217
- },
1218
- setScheduler: (fn) => {
1219
- scheduleFn = fn;
1220
- }
1221
- };
1222
- }
1223
- var notifyManager = createNotifyManager();
1224
-
1225
- // node_modules/@tanstack/query-core/build/modern/query.js
1226
- init_dirname();
1227
- init_buffer();
1228
- init_process();
1229
-
1230
- // node_modules/@tanstack/query-core/build/modern/retryer.js
1231
- init_dirname();
1232
- init_buffer();
1233
- init_process();
1234
-
1235
- // node_modules/@tanstack/query-core/build/modern/onlineManager.js
1236
- init_dirname();
1237
- init_buffer();
1238
- init_process();
1239
- var _online, _cleanup2, _setup2, _a3;
1240
- var OnlineManager = (_a3 = class extends Subscribable {
1241
- constructor() {
1242
- super();
1243
- __privateAdd(this, _online, true);
1244
- __privateAdd(this, _cleanup2, void 0);
1245
- __privateAdd(this, _setup2, void 0);
1246
- __privateSet(this, _setup2, (onOnline) => {
1247
- if (typeof window !== "undefined" && window.addEventListener) {
1248
- const onlineListener = () => onOnline(true);
1249
- const offlineListener = () => onOnline(false);
1250
- window.addEventListener("online", onlineListener, false);
1251
- window.addEventListener("offline", offlineListener, false);
1252
- return () => {
1253
- window.removeEventListener("online", onlineListener);
1254
- window.removeEventListener("offline", offlineListener);
1255
- };
1256
- }
1257
- return;
1258
- });
1259
- }
1260
- onSubscribe() {
1261
- if (!__privateGet(this, _cleanup2)) {
1262
- this.setEventListener(__privateGet(this, _setup2));
1263
- }
1264
- }
1265
- onUnsubscribe() {
1266
- var _a11;
1267
- if (!this.hasListeners()) {
1268
- (_a11 = __privateGet(this, _cleanup2)) == null ? void 0 : _a11.call(this);
1269
- __privateSet(this, _cleanup2, void 0);
1270
- }
1271
- }
1272
- setEventListener(setup) {
1273
- var _a11;
1274
- __privateSet(this, _setup2, setup);
1275
- (_a11 = __privateGet(this, _cleanup2)) == null ? void 0 : _a11.call(this);
1276
- __privateSet(this, _cleanup2, setup(this.setOnline.bind(this)));
1277
- }
1278
- setOnline(online) {
1279
- const changed = __privateGet(this, _online) !== online;
1280
- if (changed) {
1281
- __privateSet(this, _online, online);
1282
- this.listeners.forEach((listener) => {
1283
- listener(online);
1284
- });
1285
- }
1286
- }
1287
- isOnline() {
1288
- return __privateGet(this, _online);
1289
- }
1290
- }, _online = new WeakMap(), _cleanup2 = new WeakMap(), _setup2 = new WeakMap(), _a3);
1291
- var onlineManager = new OnlineManager();
1292
-
1293
- // node_modules/@tanstack/query-core/build/modern/retryer.js
1294
- function defaultRetryDelay(failureCount) {
1295
- return Math.min(1e3 * 2 ** failureCount, 3e4);
1296
- }
1297
- function canFetch(networkMode) {
1298
- return (networkMode != null ? networkMode : "online") === "online" ? onlineManager.isOnline() : true;
1299
- }
1300
- var CancelledError = class extends Error {
1301
- constructor(options) {
1302
- super("CancelledError");
1303
- this.revert = options == null ? void 0 : options.revert;
1304
- this.silent = options == null ? void 0 : options.silent;
1305
- }
1306
- };
1307
- function createRetryer(config) {
1308
- let isRetryCancelled = false;
1309
- let failureCount = 0;
1310
- let continueFn;
1311
- const thenable = pendingThenable();
1312
- const isResolved = () => thenable.status !== "pending";
1313
- const cancel = (cancelOptions) => {
1314
- var _a11;
1315
- if (!isResolved()) {
1316
- const error = new CancelledError(cancelOptions);
1317
- reject(error);
1318
- (_a11 = config.onCancel) == null ? void 0 : _a11.call(config, error);
1319
- }
1320
- };
1321
- const cancelRetry = () => {
1322
- isRetryCancelled = true;
1323
- };
1324
- const continueRetry = () => {
1325
- isRetryCancelled = false;
1326
- };
1327
- const canContinue = () => focusManager.isFocused() && (config.networkMode === "always" || onlineManager.isOnline()) && config.canRun();
1328
- const canStart = () => canFetch(config.networkMode) && config.canRun();
1329
- const resolve = (value) => {
1330
- if (!isResolved()) {
1331
- continueFn == null ? void 0 : continueFn();
1332
- thenable.resolve(value);
1333
- }
1334
- };
1335
- const reject = (value) => {
1336
- if (!isResolved()) {
1337
- continueFn == null ? void 0 : continueFn();
1338
- thenable.reject(value);
1339
- }
1340
- };
1341
- const pause = () => {
1342
- return new Promise((continueResolve) => {
1343
- var _a11;
1344
- continueFn = (value) => {
1345
- if (isResolved() || canContinue()) {
1346
- continueResolve(value);
1347
- }
1348
- };
1349
- (_a11 = config.onPause) == null ? void 0 : _a11.call(config);
1350
- }).then(() => {
1351
- var _a11;
1352
- continueFn = void 0;
1353
- if (!isResolved()) {
1354
- (_a11 = config.onContinue) == null ? void 0 : _a11.call(config);
1355
- }
1356
- });
1357
- };
1358
- const run = () => {
1359
- if (isResolved()) {
1360
- return;
1361
- }
1362
- let promiseOrValue;
1363
- const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
1364
- try {
1365
- promiseOrValue = initialPromise != null ? initialPromise : config.fn();
1366
- } catch (error) {
1367
- promiseOrValue = Promise.reject(error);
1368
- }
1369
- Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
1370
- var _a11, _b2, _c;
1371
- if (isResolved()) {
1372
- return;
1373
- }
1374
- const retry = (_a11 = config.retry) != null ? _a11 : environmentManager.isServer() ? 0 : 3;
1375
- const retryDelay = (_b2 = config.retryDelay) != null ? _b2 : defaultRetryDelay;
1376
- const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
1377
- const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
1378
- if (isRetryCancelled || !shouldRetry) {
1379
- reject(error);
1380
- return;
1381
- }
1382
- failureCount++;
1383
- (_c = config.onFail) == null ? void 0 : _c.call(config, failureCount, error);
1384
- sleep(delay).then(() => {
1385
- return canContinue() ? void 0 : pause();
1386
- }).then(() => {
1387
- if (isRetryCancelled) {
1388
- reject(error);
1389
- } else {
1390
- run();
1391
- }
1392
- });
1393
- });
1394
- };
1395
- return {
1396
- promise: thenable,
1397
- status: () => thenable.status,
1398
- cancel,
1399
- continue: () => {
1400
- continueFn == null ? void 0 : continueFn();
1401
- return thenable;
1402
- },
1403
- cancelRetry,
1404
- continueRetry,
1405
- canStart,
1406
- start: () => {
1407
- if (canStart()) {
1408
- run();
1409
- } else {
1410
- pause().then(run);
1411
- }
1412
- return thenable;
1413
- }
1414
- };
1415
- }
1416
-
1417
- // node_modules/@tanstack/query-core/build/modern/removable.js
1418
- init_dirname();
1419
- init_buffer();
1420
- init_process();
1421
- var _gcTimeout, _a4;
1422
- var Removable = (_a4 = class {
1423
- constructor() {
1424
- __privateAdd(this, _gcTimeout, void 0);
1425
- }
1426
- destroy() {
1427
- this.clearGcTimeout();
1428
- }
1429
- scheduleGc() {
1430
- this.clearGcTimeout();
1431
- if (isValidTimeout(this.gcTime)) {
1432
- __privateSet(this, _gcTimeout, timeoutManager.setTimeout(() => {
1433
- this.optionalRemove();
1434
- }, this.gcTime));
1435
- }
1436
- }
1437
- updateGcTime(newGcTime) {
1438
- this.gcTime = Math.max(
1439
- this.gcTime || 0,
1440
- newGcTime != null ? newGcTime : environmentManager.isServer() ? Infinity : 5 * 60 * 1e3
1441
- );
1442
- }
1443
- clearGcTimeout() {
1444
- if (__privateGet(this, _gcTimeout)) {
1445
- timeoutManager.clearTimeout(__privateGet(this, _gcTimeout));
1446
- __privateSet(this, _gcTimeout, void 0);
1447
- }
1448
- }
1449
- }, _gcTimeout = new WeakMap(), _a4);
1450
-
1451
- // node_modules/@tanstack/query-core/build/modern/query.js
1452
- var _initialState, _revertState, _cache, _client, _retryer, _defaultOptions, _abortSignalConsumed, _isInitialPausedFetch, isInitialPausedFetch_fn, _dispatch, dispatch_fn, _a5;
1453
- var Query = (_a5 = class extends Removable {
1454
- constructor(config) {
1455
- var _a11;
1456
- super();
1457
- __privateAdd(this, _isInitialPausedFetch);
1458
- __privateAdd(this, _dispatch);
1459
- __privateAdd(this, _initialState, void 0);
1460
- __privateAdd(this, _revertState, void 0);
1461
- __privateAdd(this, _cache, void 0);
1462
- __privateAdd(this, _client, void 0);
1463
- __privateAdd(this, _retryer, void 0);
1464
- __privateAdd(this, _defaultOptions, void 0);
1465
- __privateAdd(this, _abortSignalConsumed, void 0);
1466
- __privateSet(this, _abortSignalConsumed, false);
1467
- __privateSet(this, _defaultOptions, config.defaultOptions);
1468
- this.setOptions(config.options);
1469
- this.observers = [];
1470
- __privateSet(this, _client, config.client);
1471
- __privateSet(this, _cache, __privateGet(this, _client).getQueryCache());
1472
- this.queryKey = config.queryKey;
1473
- this.queryHash = config.queryHash;
1474
- __privateSet(this, _initialState, getDefaultState(this.options));
1475
- this.state = (_a11 = config.state) != null ? _a11 : __privateGet(this, _initialState);
1476
- this.scheduleGc();
1477
- }
1478
- get meta() {
1479
- return this.options.meta;
1480
- }
1481
- get promise() {
1482
- var _a11;
1483
- return (_a11 = __privateGet(this, _retryer)) == null ? void 0 : _a11.promise;
1484
- }
1485
- setOptions(options) {
1486
- this.options = __spreadValues(__spreadValues({}, __privateGet(this, _defaultOptions)), options);
1487
- this.updateGcTime(this.options.gcTime);
1488
- if (this.state && this.state.data === void 0) {
1489
- const defaultState = getDefaultState(this.options);
1490
- if (defaultState.data !== void 0) {
1491
- this.setState(
1492
- successState(defaultState.data, defaultState.dataUpdatedAt)
1493
- );
1494
- __privateSet(this, _initialState, defaultState);
1495
- }
1496
- }
1497
- }
1498
- optionalRemove() {
1499
- if (!this.observers.length && this.state.fetchStatus === "idle") {
1500
- __privateGet(this, _cache).remove(this);
1501
- }
1502
- }
1503
- setData(newData, options) {
1504
- const data = replaceData(this.state.data, newData, this.options);
1505
- __privateMethod(this, _dispatch, dispatch_fn).call(this, {
1506
- data,
1507
- type: "success",
1508
- dataUpdatedAt: options == null ? void 0 : options.updatedAt,
1509
- manual: options == null ? void 0 : options.manual
1510
- });
1511
- return data;
1512
- }
1513
- setState(state, setStateOptions) {
1514
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "setState", state, setStateOptions });
1515
- }
1516
- cancel(options) {
1517
- var _a11, _b2;
1518
- const promise = (_a11 = __privateGet(this, _retryer)) == null ? void 0 : _a11.promise;
1519
- (_b2 = __privateGet(this, _retryer)) == null ? void 0 : _b2.cancel(options);
1520
- return promise ? promise.then(noop).catch(noop) : Promise.resolve();
1521
- }
1522
- destroy() {
1523
- super.destroy();
1524
- this.cancel({ silent: true });
1525
- }
1526
- get resetState() {
1527
- return __privateGet(this, _initialState);
1528
- }
1529
- reset() {
1530
- this.destroy();
1531
- this.setState(this.resetState);
1532
- }
1533
- isActive() {
1534
- return this.observers.some(
1535
- (observer) => resolveEnabled(observer.options.enabled, this) !== false
1536
- );
1537
- }
1538
- isDisabled() {
1539
- if (this.getObserversCount() > 0) {
1540
- return !this.isActive();
1541
- }
1542
- return this.options.queryFn === skipToken || !this.isFetched();
1543
- }
1544
- isFetched() {
1545
- return this.state.dataUpdateCount + this.state.errorUpdateCount > 0;
1546
- }
1547
- isStatic() {
1548
- if (this.getObserversCount() > 0) {
1549
- return this.observers.some(
1550
- (observer) => resolveStaleTime(observer.options.staleTime, this) === "static"
1551
- );
1552
- }
1553
- return false;
1554
- }
1555
- isStale() {
1556
- if (this.getObserversCount() > 0) {
1557
- return this.observers.some(
1558
- (observer) => observer.getCurrentResult().isStale
1559
- );
1560
- }
1561
- return this.state.data === void 0 || this.state.isInvalidated;
1562
- }
1563
- isStaleByTime(staleTime = 0) {
1564
- if (this.state.data === void 0) {
1565
- return true;
1566
- }
1567
- if (staleTime === "static") {
1568
- return false;
1569
- }
1570
- if (this.state.isInvalidated) {
1571
- return true;
1572
- }
1573
- return !timeUntilStale(this.state.dataUpdatedAt, staleTime);
1574
- }
1575
- onFocus() {
1576
- var _a11;
1577
- const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());
1578
- observer == null ? void 0 : observer.refetch({ cancelRefetch: false });
1579
- (_a11 = __privateGet(this, _retryer)) == null ? void 0 : _a11.continue();
1580
- }
1581
- onOnline() {
1582
- var _a11;
1583
- const observer = this.observers.find((x) => x.shouldFetchOnReconnect());
1584
- observer == null ? void 0 : observer.refetch({ cancelRefetch: false });
1585
- (_a11 = __privateGet(this, _retryer)) == null ? void 0 : _a11.continue();
1586
- }
1587
- addObserver(observer) {
1588
- if (!this.observers.includes(observer)) {
1589
- this.observers.push(observer);
1590
- this.clearGcTimeout();
1591
- __privateGet(this, _cache).notify({ type: "observerAdded", query: this, observer });
1592
- }
1593
- }
1594
- removeObserver(observer) {
1595
- if (this.observers.includes(observer)) {
1596
- this.observers = this.observers.filter((x) => x !== observer);
1597
- if (!this.observers.length) {
1598
- if (__privateGet(this, _retryer)) {
1599
- if (__privateGet(this, _abortSignalConsumed) || __privateMethod(this, _isInitialPausedFetch, isInitialPausedFetch_fn).call(this)) {
1600
- __privateGet(this, _retryer).cancel({ revert: true });
1601
- } else {
1602
- __privateGet(this, _retryer).cancelRetry();
1603
- }
1604
- }
1605
- this.scheduleGc();
1606
- }
1607
- __privateGet(this, _cache).notify({ type: "observerRemoved", query: this, observer });
1608
- }
1609
- }
1610
- getObserversCount() {
1611
- return this.observers.length;
1612
- }
1613
- invalidate() {
1614
- if (!this.state.isInvalidated) {
1615
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "invalidate" });
1616
- }
1617
- }
1618
- async fetch(options, fetchOptions) {
1619
- var _a11, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
1620
- if (this.state.fetchStatus !== "idle" && // If the promise in the retryer is already rejected, we have to definitely
1621
- // re-start the fetch; there is a chance that the query is still in a
1622
- // pending state when that happens
1623
- ((_a11 = __privateGet(this, _retryer)) == null ? void 0 : _a11.status()) !== "rejected") {
1624
- if (this.state.data !== void 0 && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) {
1625
- this.cancel({ silent: true });
1626
- } else if (__privateGet(this, _retryer)) {
1627
- __privateGet(this, _retryer).continueRetry();
1628
- return __privateGet(this, _retryer).promise;
1629
- }
1630
- }
1631
- if (options) {
1632
- this.setOptions(options);
1633
- }
1634
- if (!this.options.queryFn) {
1635
- const observer = this.observers.find((x) => x.options.queryFn);
1636
- if (observer) {
1637
- this.setOptions(observer.options);
1638
- }
1639
- }
1640
- if (false) {
1641
- if (!Array.isArray(this.options.queryKey)) {
1642
- console.error(
1643
- `As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`
1644
- );
1645
- }
1646
- }
1647
- const abortController = new AbortController();
1648
- const addSignalProperty = (object) => {
1649
- Object.defineProperty(object, "signal", {
1650
- enumerable: true,
1651
- get: () => {
1652
- __privateSet(this, _abortSignalConsumed, true);
1653
- return abortController.signal;
1654
- }
1655
- });
1656
- };
1657
- const fetchFn = () => {
1658
- const queryFn = ensureQueryFn(this.options, fetchOptions);
1659
- const createQueryFnContext = () => {
1660
- const queryFnContext2 = {
1661
- client: __privateGet(this, _client),
1662
- queryKey: this.queryKey,
1663
- meta: this.meta
1664
- };
1665
- addSignalProperty(queryFnContext2);
1666
- return queryFnContext2;
1667
- };
1668
- const queryFnContext = createQueryFnContext();
1669
- __privateSet(this, _abortSignalConsumed, false);
1670
- if (this.options.persister) {
1671
- return this.options.persister(
1672
- queryFn,
1673
- queryFnContext,
1674
- this
1675
- );
1676
- }
1677
- return queryFn(queryFnContext);
1678
- };
1679
- const createFetchContext = () => {
1680
- const context2 = {
1681
- fetchOptions,
1682
- options: this.options,
1683
- queryKey: this.queryKey,
1684
- client: __privateGet(this, _client),
1685
- state: this.state,
1686
- fetchFn
1687
- };
1688
- addSignalProperty(context2);
1689
- return context2;
1690
- };
1691
- const context = createFetchContext();
1692
- (_b2 = this.options.behavior) == null ? void 0 : _b2.onFetch(context, this);
1693
- __privateSet(this, _revertState, this.state);
1694
- if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((_c = context.fetchOptions) == null ? void 0 : _c.meta)) {
1695
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "fetch", meta: (_d = context.fetchOptions) == null ? void 0 : _d.meta });
1696
- }
1697
- __privateSet(this, _retryer, createRetryer({
1698
- initialPromise: fetchOptions == null ? void 0 : fetchOptions.initialPromise,
1699
- fn: context.fetchFn,
1700
- onCancel: (error) => {
1701
- if (error instanceof CancelledError && error.revert) {
1702
- this.setState(__spreadProps(__spreadValues({}, __privateGet(this, _revertState)), {
1703
- fetchStatus: "idle"
1704
- }));
1705
- }
1706
- abortController.abort();
1707
- },
1708
- onFail: (failureCount, error) => {
1709
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "failed", failureCount, error });
1710
- },
1711
- onPause: () => {
1712
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "pause" });
1713
- },
1714
- onContinue: () => {
1715
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "continue" });
1716
- },
1717
- retry: context.options.retry,
1718
- retryDelay: context.options.retryDelay,
1719
- networkMode: context.options.networkMode,
1720
- canRun: () => true
1721
- }));
1722
- try {
1723
- const data = await __privateGet(this, _retryer).start();
1724
- if (data === void 0) {
1725
- if (false) {
1726
- console.error(
1727
- `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
1728
- );
1729
- }
1730
- throw new Error(`${this.queryHash} data is undefined`);
1731
- }
1732
- this.setData(data);
1733
- (_f = (_e = __privateGet(this, _cache).config).onSuccess) == null ? void 0 : _f.call(_e, data, this);
1734
- (_h = (_g = __privateGet(this, _cache).config).onSettled) == null ? void 0 : _h.call(
1735
- _g,
1736
- data,
1737
- this.state.error,
1738
- this
1739
- );
1740
- return data;
1741
- } catch (error) {
1742
- if (error instanceof CancelledError) {
1743
- if (error.silent) {
1744
- return __privateGet(this, _retryer).promise;
1745
- } else if (error.revert) {
1746
- if (this.state.data === void 0) {
1747
- throw error;
1748
- }
1749
- return this.state.data;
1750
- }
1751
- }
1752
- __privateMethod(this, _dispatch, dispatch_fn).call(this, {
1753
- type: "error",
1754
- error
1755
- });
1756
- (_j = (_i = __privateGet(this, _cache).config).onError) == null ? void 0 : _j.call(
1757
- _i,
1758
- error,
1759
- this
1760
- );
1761
- (_l = (_k = __privateGet(this, _cache).config).onSettled) == null ? void 0 : _l.call(
1762
- _k,
1763
- this.state.data,
1764
- error,
1765
- this
1766
- );
1767
- throw error;
1768
- } finally {
1769
- this.scheduleGc();
1770
- }
1771
- }
1772
- }, _initialState = new WeakMap(), _revertState = new WeakMap(), _cache = new WeakMap(), _client = new WeakMap(), _retryer = new WeakMap(), _defaultOptions = new WeakMap(), _abortSignalConsumed = new WeakMap(), _isInitialPausedFetch = new WeakSet(), isInitialPausedFetch_fn = function() {
1773
- return this.state.fetchStatus === "paused" && this.state.status === "pending";
1774
- }, _dispatch = new WeakSet(), dispatch_fn = function(action) {
1775
- const reducer = (state) => {
1776
- var _a11;
1777
- switch (action.type) {
1778
- case "failed":
1779
- return __spreadProps(__spreadValues({}, state), {
1780
- fetchFailureCount: action.failureCount,
1781
- fetchFailureReason: action.error
1782
- });
1783
- case "pause":
1784
- return __spreadProps(__spreadValues({}, state), {
1785
- fetchStatus: "paused"
1786
- });
1787
- case "continue":
1788
- return __spreadProps(__spreadValues({}, state), {
1789
- fetchStatus: "fetching"
1790
- });
1791
- case "fetch":
1792
- return __spreadProps(__spreadValues(__spreadValues({}, state), fetchState(state.data, this.options)), {
1793
- fetchMeta: (_a11 = action.meta) != null ? _a11 : null
1794
- });
1795
- case "success":
1796
- const newState = __spreadValues(__spreadProps(__spreadValues(__spreadValues({}, state), successState(action.data, action.dataUpdatedAt)), {
1797
- dataUpdateCount: state.dataUpdateCount + 1
1798
- }), !action.manual && {
1799
- fetchStatus: "idle",
1800
- fetchFailureCount: 0,
1801
- fetchFailureReason: null
1802
- });
1803
- __privateSet(this, _revertState, action.manual ? newState : void 0);
1804
- return newState;
1805
- case "error":
1806
- const error = action.error;
1807
- return __spreadProps(__spreadValues({}, state), {
1808
- error,
1809
- errorUpdateCount: state.errorUpdateCount + 1,
1810
- errorUpdatedAt: Date.now(),
1811
- fetchFailureCount: state.fetchFailureCount + 1,
1812
- fetchFailureReason: error,
1813
- fetchStatus: "idle",
1814
- status: "error",
1815
- // flag existing data as invalidated if we get a background error
1816
- // note that "no data" always means stale so we can set unconditionally here
1817
- isInvalidated: true
1818
- });
1819
- case "invalidate":
1820
- return __spreadProps(__spreadValues({}, state), {
1821
- isInvalidated: true
1822
- });
1823
- case "setState":
1824
- return __spreadValues(__spreadValues({}, state), action.state);
1825
- }
1826
- };
1827
- this.state = reducer(this.state);
1828
- notifyManager.batch(() => {
1829
- this.observers.forEach((observer) => {
1830
- observer.onQueryUpdate();
1831
- });
1832
- __privateGet(this, _cache).notify({ query: this, type: "updated", action });
1833
- });
1834
- }, _a5);
1835
- function fetchState(data, options) {
1836
- return __spreadValues({
1837
- fetchFailureCount: 0,
1838
- fetchFailureReason: null,
1839
- fetchStatus: canFetch(options.networkMode) ? "fetching" : "paused"
1840
- }, data === void 0 && {
1841
- error: null,
1842
- status: "pending"
1843
- });
1844
- }
1845
- function successState(data, dataUpdatedAt) {
1846
- return {
1847
- data,
1848
- dataUpdatedAt: dataUpdatedAt != null ? dataUpdatedAt : Date.now(),
1849
- error: null,
1850
- isInvalidated: false,
1851
- status: "success"
1852
- };
1853
- }
1854
- function getDefaultState(options) {
1855
- const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
1856
- const hasData = data !== void 0;
1857
- const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
1858
- return {
1859
- data,
1860
- dataUpdateCount: 0,
1861
- dataUpdatedAt: hasData ? initialDataUpdatedAt != null ? initialDataUpdatedAt : Date.now() : 0,
1862
- error: null,
1863
- errorUpdateCount: 0,
1864
- errorUpdatedAt: 0,
1865
- fetchFailureCount: 0,
1866
- fetchFailureReason: null,
1867
- fetchMeta: null,
1868
- isInvalidated: false,
1869
- status: hasData ? "success" : "pending",
1870
- fetchStatus: "idle"
1871
- };
1872
- }
1873
-
1874
- // node_modules/@tanstack/query-core/build/modern/queryObserver.js
1875
- var _client2, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _executeFetch, executeFetch_fn, _updateStaleTimeout, updateStaleTimeout_fn, _computeRefetchInterval, computeRefetchInterval_fn, _updateRefetchInterval, updateRefetchInterval_fn, _updateTimers, updateTimers_fn, _clearStaleTimeout, clearStaleTimeout_fn, _clearRefetchInterval, clearRefetchInterval_fn, _updateQuery, updateQuery_fn, _notify, notify_fn, _b;
1876
- var QueryObserver = (_b = class extends Subscribable {
1877
- constructor(client, options) {
1878
- super();
1879
- __privateAdd(this, _executeFetch);
1880
- __privateAdd(this, _updateStaleTimeout);
1881
- __privateAdd(this, _computeRefetchInterval);
1882
- __privateAdd(this, _updateRefetchInterval);
1883
- __privateAdd(this, _updateTimers);
1884
- __privateAdd(this, _clearStaleTimeout);
1885
- __privateAdd(this, _clearRefetchInterval);
1886
- __privateAdd(this, _updateQuery);
1887
- __privateAdd(this, _notify);
1888
- __privateAdd(this, _client2, void 0);
1889
- __privateAdd(this, _currentQuery, void 0);
1890
- __privateAdd(this, _currentQueryInitialState, void 0);
1891
- __privateAdd(this, _currentResult, void 0);
1892
- __privateAdd(this, _currentResultState, void 0);
1893
- __privateAdd(this, _currentResultOptions, void 0);
1894
- __privateAdd(this, _currentThenable, void 0);
1895
- __privateAdd(this, _selectError, void 0);
1896
- __privateAdd(this, _selectFn, void 0);
1897
- __privateAdd(this, _selectResult, void 0);
1898
- // This property keeps track of the last query with defined data.
1899
- // It will be used to pass the previous data and query to the placeholder function between renders.
1900
- __privateAdd(this, _lastQueryWithDefinedData, void 0);
1901
- __privateAdd(this, _staleTimeoutId, void 0);
1902
- __privateAdd(this, _refetchIntervalId, void 0);
1903
- __privateAdd(this, _currentRefetchInterval, void 0);
1904
- __privateAdd(this, _trackedProps, /* @__PURE__ */ new Set());
1905
- this.options = options;
1906
- __privateSet(this, _client2, client);
1907
- __privateSet(this, _selectError, null);
1908
- __privateSet(this, _currentThenable, pendingThenable());
1909
- this.bindMethods();
1910
- this.setOptions(options);
1911
- }
1912
- bindMethods() {
1913
- this.refetch = this.refetch.bind(this);
1914
- }
1915
- onSubscribe() {
1916
- if (this.listeners.size === 1) {
1917
- __privateGet(this, _currentQuery).addObserver(this);
1918
- if (shouldFetchOnMount(__privateGet(this, _currentQuery), this.options)) {
1919
- __privateMethod(this, _executeFetch, executeFetch_fn).call(this);
1920
- } else {
1921
- this.updateResult();
1922
- }
1923
- __privateMethod(this, _updateTimers, updateTimers_fn).call(this);
1924
- }
1925
- }
1926
- onUnsubscribe() {
1927
- if (!this.hasListeners()) {
1928
- this.destroy();
1929
- }
1930
- }
1931
- shouldFetchOnReconnect() {
1932
- return shouldFetchOn(
1933
- __privateGet(this, _currentQuery),
1934
- this.options,
1935
- this.options.refetchOnReconnect
1936
- );
1937
- }
1938
- shouldFetchOnWindowFocus() {
1939
- return shouldFetchOn(
1940
- __privateGet(this, _currentQuery),
1941
- this.options,
1942
- this.options.refetchOnWindowFocus
1943
- );
1944
- }
1945
- destroy() {
1946
- this.listeners = /* @__PURE__ */ new Set();
1947
- __privateMethod(this, _clearStaleTimeout, clearStaleTimeout_fn).call(this);
1948
- __privateMethod(this, _clearRefetchInterval, clearRefetchInterval_fn).call(this);
1949
- __privateGet(this, _currentQuery).removeObserver(this);
1950
- }
1951
- setOptions(options) {
1952
- const prevOptions = this.options;
1953
- const prevQuery = __privateGet(this, _currentQuery);
1954
- this.options = __privateGet(this, _client2).defaultQueryOptions(options);
1955
- if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) !== "boolean") {
1956
- throw new Error(
1957
- "Expected enabled to be a boolean or a callback that returns a boolean"
1958
- );
1959
- }
1960
- __privateMethod(this, _updateQuery, updateQuery_fn).call(this);
1961
- __privateGet(this, _currentQuery).setOptions(this.options);
1962
- if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {
1963
- __privateGet(this, _client2).getQueryCache().notify({
1964
- type: "observerOptionsUpdated",
1965
- query: __privateGet(this, _currentQuery),
1966
- observer: this
1967
- });
1968
- }
1969
- const mounted = this.hasListeners();
1970
- if (mounted && shouldFetchOptionally(
1971
- __privateGet(this, _currentQuery),
1972
- prevQuery,
1973
- this.options,
1974
- prevOptions
1975
- )) {
1976
- __privateMethod(this, _executeFetch, executeFetch_fn).call(this);
1977
- }
1978
- this.updateResult();
1979
- if (mounted && (__privateGet(this, _currentQuery) !== prevQuery || resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) !== resolveEnabled(prevOptions.enabled, __privateGet(this, _currentQuery)) || resolveStaleTime(this.options.staleTime, __privateGet(this, _currentQuery)) !== resolveStaleTime(prevOptions.staleTime, __privateGet(this, _currentQuery)))) {
1980
- __privateMethod(this, _updateStaleTimeout, updateStaleTimeout_fn).call(this);
1981
- }
1982
- const nextRefetchInterval = __privateMethod(this, _computeRefetchInterval, computeRefetchInterval_fn).call(this);
1983
- if (mounted && (__privateGet(this, _currentQuery) !== prevQuery || resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) !== resolveEnabled(prevOptions.enabled, __privateGet(this, _currentQuery)) || nextRefetchInterval !== __privateGet(this, _currentRefetchInterval))) {
1984
- __privateMethod(this, _updateRefetchInterval, updateRefetchInterval_fn).call(this, nextRefetchInterval);
1985
- }
1986
- }
1987
- getOptimisticResult(options) {
1988
- const query = __privateGet(this, _client2).getQueryCache().build(__privateGet(this, _client2), options);
1989
- const result = this.createResult(query, options);
1990
- if (shouldAssignObserverCurrentProperties(this, result)) {
1991
- __privateSet(this, _currentResult, result);
1992
- __privateSet(this, _currentResultOptions, this.options);
1993
- __privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state);
1994
- }
1995
- return result;
1996
- }
1997
- getCurrentResult() {
1998
- return __privateGet(this, _currentResult);
1999
- }
2000
- trackResult(result, onPropTracked) {
2001
- return new Proxy(result, {
2002
- get: (target, key) => {
2003
- this.trackProp(key);
2004
- onPropTracked == null ? void 0 : onPropTracked(key);
2005
- if (key === "promise") {
2006
- this.trackProp("data");
2007
- if (!this.options.experimental_prefetchInRender && __privateGet(this, _currentThenable).status === "pending") {
2008
- __privateGet(this, _currentThenable).reject(
2009
- new Error(
2010
- "experimental_prefetchInRender feature flag is not enabled"
2011
- )
2012
- );
2013
- }
2014
- }
2015
- return Reflect.get(target, key);
2016
- }
2017
- });
2018
- }
2019
- trackProp(key) {
2020
- __privateGet(this, _trackedProps).add(key);
2021
- }
2022
- getCurrentQuery() {
2023
- return __privateGet(this, _currentQuery);
2024
- }
2025
- refetch(_a11 = {}) {
2026
- var options = __objRest(_a11, []);
2027
- return this.fetch(__spreadValues({}, options));
2028
- }
2029
- fetchOptimistic(options) {
2030
- const defaultedOptions = __privateGet(this, _client2).defaultQueryOptions(options);
2031
- const query = __privateGet(this, _client2).getQueryCache().build(__privateGet(this, _client2), defaultedOptions);
2032
- return query.fetch().then(() => this.createResult(query, defaultedOptions));
2033
- }
2034
- fetch(fetchOptions) {
2035
- var _a11;
2036
- return __privateMethod(this, _executeFetch, executeFetch_fn).call(this, __spreadProps(__spreadValues({}, fetchOptions), {
2037
- cancelRefetch: (_a11 = fetchOptions.cancelRefetch) != null ? _a11 : true
2038
- })).then(() => {
2039
- this.updateResult();
2040
- return __privateGet(this, _currentResult);
2041
- });
2042
- }
2043
- createResult(query, options) {
2044
- var _a11;
2045
- const prevQuery = __privateGet(this, _currentQuery);
2046
- const prevOptions = this.options;
2047
- const prevResult = __privateGet(this, _currentResult);
2048
- const prevResultState = __privateGet(this, _currentResultState);
2049
- const prevResultOptions = __privateGet(this, _currentResultOptions);
2050
- const queryChange = query !== prevQuery;
2051
- const queryInitialState = queryChange ? query.state : __privateGet(this, _currentQueryInitialState);
2052
- const { state } = query;
2053
- let newState = __spreadValues({}, state);
2054
- let isPlaceholderData = false;
2055
- let data;
2056
- if (options._optimisticResults) {
2057
- const mounted = this.hasListeners();
2058
- const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
2059
- const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
2060
- if (fetchOnMount || fetchOptionally) {
2061
- newState = __spreadValues(__spreadValues({}, newState), fetchState(state.data, query.options));
2062
- }
2063
- if (options._optimisticResults === "isRestoring") {
2064
- newState.fetchStatus = "idle";
2065
- }
2066
- }
2067
- let { error, errorUpdatedAt, status } = newState;
2068
- data = newState.data;
2069
- let skipSelect = false;
2070
- if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
2071
- let placeholderData;
2072
- if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {
2073
- placeholderData = prevResult.data;
2074
- skipSelect = true;
2075
- } else {
2076
- placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
2077
- (_a11 = __privateGet(this, _lastQueryWithDefinedData)) == null ? void 0 : _a11.state.data,
2078
- __privateGet(this, _lastQueryWithDefinedData)
2079
- ) : options.placeholderData;
2080
- }
2081
- if (placeholderData !== void 0) {
2082
- status = "success";
2083
- data = replaceData(
2084
- prevResult == null ? void 0 : prevResult.data,
2085
- placeholderData,
2086
- options
2087
- );
2088
- isPlaceholderData = true;
2089
- }
2090
- }
2091
- if (options.select && data !== void 0 && !skipSelect) {
2092
- if (prevResult && data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === __privateGet(this, _selectFn)) {
2093
- data = __privateGet(this, _selectResult);
2094
- } else {
2095
- try {
2096
- __privateSet(this, _selectFn, options.select);
2097
- data = options.select(data);
2098
- data = replaceData(prevResult == null ? void 0 : prevResult.data, data, options);
2099
- __privateSet(this, _selectResult, data);
2100
- __privateSet(this, _selectError, null);
2101
- } catch (selectError) {
2102
- __privateSet(this, _selectError, selectError);
2103
- }
2104
- }
2105
- }
2106
- if (__privateGet(this, _selectError)) {
2107
- error = __privateGet(this, _selectError);
2108
- data = __privateGet(this, _selectResult);
2109
- errorUpdatedAt = Date.now();
2110
- status = "error";
2111
- }
2112
- const isFetching = newState.fetchStatus === "fetching";
2113
- const isPending = status === "pending";
2114
- const isError = status === "error";
2115
- const isLoading = isPending && isFetching;
2116
- const hasData = data !== void 0;
2117
- const result = {
2118
- status,
2119
- fetchStatus: newState.fetchStatus,
2120
- isPending,
2121
- isSuccess: status === "success",
2122
- isError,
2123
- isInitialLoading: isLoading,
2124
- isLoading,
2125
- data,
2126
- dataUpdatedAt: newState.dataUpdatedAt,
2127
- error,
2128
- errorUpdatedAt,
2129
- failureCount: newState.fetchFailureCount,
2130
- failureReason: newState.fetchFailureReason,
2131
- errorUpdateCount: newState.errorUpdateCount,
2132
- isFetched: query.isFetched(),
2133
- isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
2134
- isFetching,
2135
- isRefetching: isFetching && !isPending,
2136
- isLoadingError: isError && !hasData,
2137
- isPaused: newState.fetchStatus === "paused",
2138
- isPlaceholderData,
2139
- isRefetchError: isError && hasData,
2140
- isStale: isStale(query, options),
2141
- refetch: this.refetch,
2142
- promise: __privateGet(this, _currentThenable),
2143
- isEnabled: resolveEnabled(options.enabled, query) !== false
2144
- };
2145
- const nextResult = result;
2146
- if (this.options.experimental_prefetchInRender) {
2147
- const hasResultData = nextResult.data !== void 0;
2148
- const isErrorWithoutData = nextResult.status === "error" && !hasResultData;
2149
- const finalizeThenableIfPossible = (thenable) => {
2150
- if (isErrorWithoutData) {
2151
- thenable.reject(nextResult.error);
2152
- } else if (hasResultData) {
2153
- thenable.resolve(nextResult.data);
2154
- }
2155
- };
2156
- const recreateThenable = () => {
2157
- const pending = __privateSet(this, _currentThenable, nextResult.promise = pendingThenable());
2158
- finalizeThenableIfPossible(pending);
2159
- };
2160
- const prevThenable = __privateGet(this, _currentThenable);
2161
- switch (prevThenable.status) {
2162
- case "pending":
2163
- if (query.queryHash === prevQuery.queryHash) {
2164
- finalizeThenableIfPossible(prevThenable);
2165
- }
2166
- break;
2167
- case "fulfilled":
2168
- if (isErrorWithoutData || nextResult.data !== prevThenable.value) {
2169
- recreateThenable();
2170
- }
2171
- break;
2172
- case "rejected":
2173
- if (!isErrorWithoutData || nextResult.error !== prevThenable.reason) {
2174
- recreateThenable();
2175
- }
2176
- break;
2177
- }
2178
- }
2179
- return nextResult;
2180
- }
2181
- updateResult() {
2182
- const prevResult = __privateGet(this, _currentResult);
2183
- const nextResult = this.createResult(__privateGet(this, _currentQuery), this.options);
2184
- __privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state);
2185
- __privateSet(this, _currentResultOptions, this.options);
2186
- if (__privateGet(this, _currentResultState).data !== void 0) {
2187
- __privateSet(this, _lastQueryWithDefinedData, __privateGet(this, _currentQuery));
2188
- }
2189
- if (shallowEqualObjects(nextResult, prevResult)) {
2190
- return;
2191
- }
2192
- __privateSet(this, _currentResult, nextResult);
2193
- const shouldNotifyListeners = () => {
2194
- if (!prevResult) {
2195
- return true;
2196
- }
2197
- const { notifyOnChangeProps } = this.options;
2198
- const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
2199
- if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !__privateGet(this, _trackedProps).size) {
2200
- return true;
2201
- }
2202
- const includedProps = new Set(
2203
- notifyOnChangePropsValue != null ? notifyOnChangePropsValue : __privateGet(this, _trackedProps)
2204
- );
2205
- if (this.options.throwOnError) {
2206
- includedProps.add("error");
2207
- }
2208
- return Object.keys(__privateGet(this, _currentResult)).some((key) => {
2209
- const typedKey = key;
2210
- const changed = __privateGet(this, _currentResult)[typedKey] !== prevResult[typedKey];
2211
- return changed && includedProps.has(typedKey);
2212
- });
2213
- };
2214
- __privateMethod(this, _notify, notify_fn).call(this, { listeners: shouldNotifyListeners() });
2215
- }
2216
- onQueryUpdate() {
2217
- this.updateResult();
2218
- if (this.hasListeners()) {
2219
- __privateMethod(this, _updateTimers, updateTimers_fn).call(this);
2220
- }
2221
- }
2222
- }, _client2 = new WeakMap(), _currentQuery = new WeakMap(), _currentQueryInitialState = new WeakMap(), _currentResult = new WeakMap(), _currentResultState = new WeakMap(), _currentResultOptions = new WeakMap(), _currentThenable = new WeakMap(), _selectError = new WeakMap(), _selectFn = new WeakMap(), _selectResult = new WeakMap(), _lastQueryWithDefinedData = new WeakMap(), _staleTimeoutId = new WeakMap(), _refetchIntervalId = new WeakMap(), _currentRefetchInterval = new WeakMap(), _trackedProps = new WeakMap(), _executeFetch = new WeakSet(), executeFetch_fn = function(fetchOptions) {
2223
- __privateMethod(this, _updateQuery, updateQuery_fn).call(this);
2224
- let promise = __privateGet(this, _currentQuery).fetch(
2225
- this.options,
2226
- fetchOptions
2227
- );
2228
- if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {
2229
- promise = promise.catch(noop);
2230
- }
2231
- return promise;
2232
- }, _updateStaleTimeout = new WeakSet(), updateStaleTimeout_fn = function() {
2233
- __privateMethod(this, _clearStaleTimeout, clearStaleTimeout_fn).call(this);
2234
- const staleTime = resolveStaleTime(
2235
- this.options.staleTime,
2236
- __privateGet(this, _currentQuery)
2237
- );
2238
- if (environmentManager.isServer() || __privateGet(this, _currentResult).isStale || !isValidTimeout(staleTime)) {
2239
- return;
2240
- }
2241
- const time = timeUntilStale(__privateGet(this, _currentResult).dataUpdatedAt, staleTime);
2242
- const timeout = time + 1;
2243
- __privateSet(this, _staleTimeoutId, timeoutManager.setTimeout(() => {
2244
- if (!__privateGet(this, _currentResult).isStale) {
2245
- this.updateResult();
2246
- }
2247
- }, timeout));
2248
- }, _computeRefetchInterval = new WeakSet(), computeRefetchInterval_fn = function() {
2249
- var _a11;
2250
- return (_a11 = typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(__privateGet(this, _currentQuery)) : this.options.refetchInterval) != null ? _a11 : false;
2251
- }, _updateRefetchInterval = new WeakSet(), updateRefetchInterval_fn = function(nextInterval) {
2252
- __privateMethod(this, _clearRefetchInterval, clearRefetchInterval_fn).call(this);
2253
- __privateSet(this, _currentRefetchInterval, nextInterval);
2254
- if (environmentManager.isServer() || resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) === false || !isValidTimeout(__privateGet(this, _currentRefetchInterval)) || __privateGet(this, _currentRefetchInterval) === 0) {
2255
- return;
2256
- }
2257
- __privateSet(this, _refetchIntervalId, timeoutManager.setInterval(() => {
2258
- if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {
2259
- __privateMethod(this, _executeFetch, executeFetch_fn).call(this);
2260
- }
2261
- }, __privateGet(this, _currentRefetchInterval)));
2262
- }, _updateTimers = new WeakSet(), updateTimers_fn = function() {
2263
- __privateMethod(this, _updateStaleTimeout, updateStaleTimeout_fn).call(this);
2264
- __privateMethod(this, _updateRefetchInterval, updateRefetchInterval_fn).call(this, __privateMethod(this, _computeRefetchInterval, computeRefetchInterval_fn).call(this));
2265
- }, _clearStaleTimeout = new WeakSet(), clearStaleTimeout_fn = function() {
2266
- if (__privateGet(this, _staleTimeoutId)) {
2267
- timeoutManager.clearTimeout(__privateGet(this, _staleTimeoutId));
2268
- __privateSet(this, _staleTimeoutId, void 0);
2269
- }
2270
- }, _clearRefetchInterval = new WeakSet(), clearRefetchInterval_fn = function() {
2271
- if (__privateGet(this, _refetchIntervalId)) {
2272
- timeoutManager.clearInterval(__privateGet(this, _refetchIntervalId));
2273
- __privateSet(this, _refetchIntervalId, void 0);
2274
- }
2275
- }, _updateQuery = new WeakSet(), updateQuery_fn = function() {
2276
- const query = __privateGet(this, _client2).getQueryCache().build(__privateGet(this, _client2), this.options);
2277
- if (query === __privateGet(this, _currentQuery)) {
2278
- return;
2279
- }
2280
- const prevQuery = __privateGet(this, _currentQuery);
2281
- __privateSet(this, _currentQuery, query);
2282
- __privateSet(this, _currentQueryInitialState, query.state);
2283
- if (this.hasListeners()) {
2284
- prevQuery == null ? void 0 : prevQuery.removeObserver(this);
2285
- query.addObserver(this);
2286
- }
2287
- }, _notify = new WeakSet(), notify_fn = function(notifyOptions) {
2288
- notifyManager.batch(() => {
2289
- if (notifyOptions.listeners) {
2290
- this.listeners.forEach((listener) => {
2291
- listener(__privateGet(this, _currentResult));
2292
- });
2293
- }
2294
- __privateGet(this, _client2).getQueryCache().notify({
2295
- query: __privateGet(this, _currentQuery),
2296
- type: "observerResultsUpdated"
2297
- });
2298
- });
2299
- }, _b);
2300
- function shouldLoadOnMount(query, options) {
2301
- return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
2302
- }
2303
- function shouldFetchOnMount(query, options) {
2304
- return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
2305
- }
2306
- function shouldFetchOn(query, options, field) {
2307
- if (resolveEnabled(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== "static") {
2308
- const value = typeof field === "function" ? field(query) : field;
2309
- return value === "always" || value !== false && isStale(query, options);
2310
- }
2311
- return false;
2312
- }
2313
- function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
2314
- return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
2315
- }
2316
- function isStale(query, options) {
2317
- return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));
2318
- }
2319
- function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
2320
- if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {
2321
- return true;
2322
- }
2323
- return false;
2324
- }
2325
-
2326
- // node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
2327
- init_dirname();
2328
- init_buffer();
2329
- init_process();
2330
- function infiniteQueryBehavior(pages) {
2331
- return {
2332
- onFetch: (context, query) => {
2333
- var _a11, _b2, _c, _d, _e;
2334
- const options = context.options;
2335
- const direction = (_c = (_b2 = (_a11 = context.fetchOptions) == null ? void 0 : _a11.meta) == null ? void 0 : _b2.fetchMore) == null ? void 0 : _c.direction;
2336
- const oldPages = ((_d = context.state.data) == null ? void 0 : _d.pages) || [];
2337
- const oldPageParams = ((_e = context.state.data) == null ? void 0 : _e.pageParams) || [];
2338
- let result = { pages: [], pageParams: [] };
2339
- let currentPage = 0;
2340
- const fetchFn = async () => {
2341
- var _a12;
2342
- let cancelled = false;
2343
- const addSignalProperty = (object) => {
2344
- addConsumeAwareSignal(
2345
- object,
2346
- () => context.signal,
2347
- () => cancelled = true
2348
- );
2349
- };
2350
- const queryFn = ensureQueryFn(context.options, context.fetchOptions);
2351
- const fetchPage = async (data, param, previous) => {
2352
- if (cancelled) {
2353
- return Promise.reject();
2354
- }
2355
- if (param == null && data.pages.length) {
2356
- return Promise.resolve(data);
2357
- }
2358
- const createQueryFnContext = () => {
2359
- const queryFnContext2 = {
2360
- client: context.client,
2361
- queryKey: context.queryKey,
2362
- pageParam: param,
2363
- direction: previous ? "backward" : "forward",
2364
- meta: context.options.meta
2365
- };
2366
- addSignalProperty(queryFnContext2);
2367
- return queryFnContext2;
2368
- };
2369
- const queryFnContext = createQueryFnContext();
2370
- const page = await queryFn(queryFnContext);
2371
- const { maxPages } = context.options;
2372
- const addTo = previous ? addToStart : addToEnd;
2373
- return {
2374
- pages: addTo(data.pages, page, maxPages),
2375
- pageParams: addTo(data.pageParams, param, maxPages)
2376
- };
2377
- };
2378
- if (direction && oldPages.length) {
2379
- const previous = direction === "backward";
2380
- const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
2381
- const oldData = {
2382
- pages: oldPages,
2383
- pageParams: oldPageParams
2384
- };
2385
- const param = pageParamFn(options, oldData);
2386
- result = await fetchPage(oldData, param, previous);
2387
- } else {
2388
- const remainingPages = pages != null ? pages : oldPages.length;
2389
- do {
2390
- const param = currentPage === 0 ? (_a12 = oldPageParams[0]) != null ? _a12 : options.initialPageParam : getNextPageParam(options, result);
2391
- if (currentPage > 0 && param == null) {
2392
- break;
2393
- }
2394
- result = await fetchPage(result, param);
2395
- currentPage++;
2396
- } while (currentPage < remainingPages);
2397
- }
2398
- return result;
2399
- };
2400
- if (context.options.persister) {
2401
- context.fetchFn = () => {
2402
- var _a12, _b3;
2403
- return (_b3 = (_a12 = context.options).persister) == null ? void 0 : _b3.call(
2404
- _a12,
2405
- fetchFn,
2406
- {
2407
- client: context.client,
2408
- queryKey: context.queryKey,
2409
- meta: context.options.meta,
2410
- signal: context.signal
2411
- },
2412
- query
2413
- );
2414
- };
2415
- } else {
2416
- context.fetchFn = fetchFn;
2417
- }
2418
- }
2419
- };
2420
- }
2421
- function getNextPageParam(options, { pages, pageParams }) {
2422
- const lastIndex = pages.length - 1;
2423
- return pages.length > 0 ? options.getNextPageParam(
2424
- pages[lastIndex],
2425
- pages,
2426
- pageParams[lastIndex],
2427
- pageParams
2428
- ) : void 0;
2429
- }
2430
- function getPreviousPageParam(options, { pages, pageParams }) {
2431
- var _a11;
2432
- return pages.length > 0 ? (_a11 = options.getPreviousPageParam) == null ? void 0 : _a11.call(options, pages[0], pages, pageParams[0], pageParams) : void 0;
2433
- }
2434
-
2435
- // node_modules/@tanstack/query-core/build/modern/mutationCache.js
2436
- init_dirname();
2437
- init_buffer();
2438
- init_process();
2439
-
2440
- // node_modules/@tanstack/query-core/build/modern/mutation.js
2441
- init_dirname();
2442
- init_buffer();
2443
- init_process();
2444
- var _client3, _observers, _mutationCache, _retryer2, _dispatch2, dispatch_fn2, _a6;
2445
- var Mutation = (_a6 = class extends Removable {
2446
- constructor(config) {
2447
- super();
2448
- __privateAdd(this, _dispatch2);
2449
- __privateAdd(this, _client3, void 0);
2450
- __privateAdd(this, _observers, void 0);
2451
- __privateAdd(this, _mutationCache, void 0);
2452
- __privateAdd(this, _retryer2, void 0);
2453
- __privateSet(this, _client3, config.client);
2454
- this.mutationId = config.mutationId;
2455
- __privateSet(this, _mutationCache, config.mutationCache);
2456
- __privateSet(this, _observers, []);
2457
- this.state = config.state || getDefaultState2();
2458
- this.setOptions(config.options);
2459
- this.scheduleGc();
2460
- }
2461
- setOptions(options) {
2462
- this.options = options;
2463
- this.updateGcTime(this.options.gcTime);
2464
- }
2465
- get meta() {
2466
- return this.options.meta;
2467
- }
2468
- addObserver(observer) {
2469
- if (!__privateGet(this, _observers).includes(observer)) {
2470
- __privateGet(this, _observers).push(observer);
2471
- this.clearGcTimeout();
2472
- __privateGet(this, _mutationCache).notify({
2473
- type: "observerAdded",
2474
- mutation: this,
2475
- observer
2476
- });
2477
- }
2478
- }
2479
- removeObserver(observer) {
2480
- __privateSet(this, _observers, __privateGet(this, _observers).filter((x) => x !== observer));
2481
- this.scheduleGc();
2482
- __privateGet(this, _mutationCache).notify({
2483
- type: "observerRemoved",
2484
- mutation: this,
2485
- observer
2486
- });
2487
- }
2488
- optionalRemove() {
2489
- if (!__privateGet(this, _observers).length) {
2490
- if (this.state.status === "pending") {
2491
- this.scheduleGc();
2492
- } else {
2493
- __privateGet(this, _mutationCache).remove(this);
2494
- }
2495
- }
2496
- }
2497
- continue() {
2498
- var _a11, _b2;
2499
- return (_b2 = (_a11 = __privateGet(this, _retryer2)) == null ? void 0 : _a11.continue()) != null ? _b2 : (
2500
- // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
2501
- this.execute(this.state.variables)
2502
- );
2503
- }
2504
- async execute(variables) {
2505
- var _a11, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
2506
- const onContinue = () => {
2507
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "continue" });
2508
- };
2509
- const mutationFnContext = {
2510
- client: __privateGet(this, _client3),
2511
- meta: this.options.meta,
2512
- mutationKey: this.options.mutationKey
2513
- };
2514
- __privateSet(this, _retryer2, createRetryer({
2515
- fn: () => {
2516
- if (!this.options.mutationFn) {
2517
- return Promise.reject(new Error("No mutationFn found"));
2518
- }
2519
- return this.options.mutationFn(variables, mutationFnContext);
2520
- },
2521
- onFail: (failureCount, error) => {
2522
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "failed", failureCount, error });
2523
- },
2524
- onPause: () => {
2525
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "pause" });
2526
- },
2527
- onContinue,
2528
- retry: (_a11 = this.options.retry) != null ? _a11 : 0,
2529
- retryDelay: this.options.retryDelay,
2530
- networkMode: this.options.networkMode,
2531
- canRun: () => __privateGet(this, _mutationCache).canRun(this)
2532
- }));
2533
- const restored = this.state.status === "pending";
2534
- const isPaused = !__privateGet(this, _retryer2).canStart();
2535
- try {
2536
- if (restored) {
2537
- onContinue();
2538
- } else {
2539
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "pending", variables, isPaused });
2540
- if (__privateGet(this, _mutationCache).config.onMutate) {
2541
- await __privateGet(this, _mutationCache).config.onMutate(
2542
- variables,
2543
- this,
2544
- mutationFnContext
2545
- );
2546
- }
2547
- const context = await ((_c = (_b2 = this.options).onMutate) == null ? void 0 : _c.call(
2548
- _b2,
2549
- variables,
2550
- mutationFnContext
2551
- ));
2552
- if (context !== this.state.context) {
2553
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, {
2554
- type: "pending",
2555
- context,
2556
- variables,
2557
- isPaused
2558
- });
2559
- }
2560
- }
2561
- const data = await __privateGet(this, _retryer2).start();
2562
- await ((_e = (_d = __privateGet(this, _mutationCache).config).onSuccess) == null ? void 0 : _e.call(
2563
- _d,
2564
- data,
2565
- variables,
2566
- this.state.context,
2567
- this,
2568
- mutationFnContext
2569
- ));
2570
- await ((_g = (_f = this.options).onSuccess) == null ? void 0 : _g.call(
2571
- _f,
2572
- data,
2573
- variables,
2574
- this.state.context,
2575
- mutationFnContext
2576
- ));
2577
- await ((_i = (_h = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _i.call(
2578
- _h,
2579
- data,
2580
- null,
2581
- this.state.variables,
2582
- this.state.context,
2583
- this,
2584
- mutationFnContext
2585
- ));
2586
- await ((_k = (_j = this.options).onSettled) == null ? void 0 : _k.call(
2587
- _j,
2588
- data,
2589
- null,
2590
- variables,
2591
- this.state.context,
2592
- mutationFnContext
2593
- ));
2594
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "success", data });
2595
- return data;
2596
- } catch (error) {
2597
- try {
2598
- await ((_m = (_l = __privateGet(this, _mutationCache).config).onError) == null ? void 0 : _m.call(
2599
- _l,
2600
- error,
2601
- variables,
2602
- this.state.context,
2603
- this,
2604
- mutationFnContext
2605
- ));
2606
- } catch (e) {
2607
- void Promise.reject(e);
2608
- }
2609
- try {
2610
- await ((_o = (_n = this.options).onError) == null ? void 0 : _o.call(
2611
- _n,
2612
- error,
2613
- variables,
2614
- this.state.context,
2615
- mutationFnContext
2616
- ));
2617
- } catch (e) {
2618
- void Promise.reject(e);
2619
- }
2620
- try {
2621
- await ((_q = (_p = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _q.call(
2622
- _p,
2623
- void 0,
2624
- error,
2625
- this.state.variables,
2626
- this.state.context,
2627
- this,
2628
- mutationFnContext
2629
- ));
2630
- } catch (e) {
2631
- void Promise.reject(e);
2632
- }
2633
- try {
2634
- await ((_s = (_r = this.options).onSettled) == null ? void 0 : _s.call(
2635
- _r,
2636
- void 0,
2637
- error,
2638
- variables,
2639
- this.state.context,
2640
- mutationFnContext
2641
- ));
2642
- } catch (e) {
2643
- void Promise.reject(e);
2644
- }
2645
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "error", error });
2646
- throw error;
2647
- } finally {
2648
- __privateGet(this, _mutationCache).runNext(this);
2649
- }
2650
- }
2651
- }, _client3 = new WeakMap(), _observers = new WeakMap(), _mutationCache = new WeakMap(), _retryer2 = new WeakMap(), _dispatch2 = new WeakSet(), dispatch_fn2 = function(action) {
2652
- const reducer = (state) => {
2653
- switch (action.type) {
2654
- case "failed":
2655
- return __spreadProps(__spreadValues({}, state), {
2656
- failureCount: action.failureCount,
2657
- failureReason: action.error
2658
- });
2659
- case "pause":
2660
- return __spreadProps(__spreadValues({}, state), {
2661
- isPaused: true
2662
- });
2663
- case "continue":
2664
- return __spreadProps(__spreadValues({}, state), {
2665
- isPaused: false
2666
- });
2667
- case "pending":
2668
- return __spreadProps(__spreadValues({}, state), {
2669
- context: action.context,
2670
- data: void 0,
2671
- failureCount: 0,
2672
- failureReason: null,
2673
- error: null,
2674
- isPaused: action.isPaused,
2675
- status: "pending",
2676
- variables: action.variables,
2677
- submittedAt: Date.now()
2678
- });
2679
- case "success":
2680
- return __spreadProps(__spreadValues({}, state), {
2681
- data: action.data,
2682
- failureCount: 0,
2683
- failureReason: null,
2684
- error: null,
2685
- status: "success",
2686
- isPaused: false
2687
- });
2688
- case "error":
2689
- return __spreadProps(__spreadValues({}, state), {
2690
- data: void 0,
2691
- error: action.error,
2692
- failureCount: state.failureCount + 1,
2693
- failureReason: action.error,
2694
- isPaused: false,
2695
- status: "error"
2696
- });
2697
- }
2698
- };
2699
- this.state = reducer(this.state);
2700
- notifyManager.batch(() => {
2701
- __privateGet(this, _observers).forEach((observer) => {
2702
- observer.onMutationUpdate(action);
2703
- });
2704
- __privateGet(this, _mutationCache).notify({
2705
- mutation: this,
2706
- type: "updated",
2707
- action
2708
- });
2709
- });
2710
- }, _a6);
2711
- function getDefaultState2() {
2712
- return {
2713
- context: void 0,
2714
- data: void 0,
2715
- error: null,
2716
- failureCount: 0,
2717
- failureReason: null,
2718
- isPaused: false,
2719
- status: "idle",
2720
- variables: void 0,
2721
- submittedAt: 0
2722
- };
2723
- }
2724
-
2725
- // node_modules/@tanstack/query-core/build/modern/mutationCache.js
2726
- var _mutations, _scopes, _mutationId, _a7;
2727
- var MutationCache = (_a7 = class extends Subscribable {
2728
- constructor(config = {}) {
2729
- super();
2730
- __privateAdd(this, _mutations, void 0);
2731
- __privateAdd(this, _scopes, void 0);
2732
- __privateAdd(this, _mutationId, void 0);
2733
- this.config = config;
2734
- __privateSet(this, _mutations, /* @__PURE__ */ new Set());
2735
- __privateSet(this, _scopes, /* @__PURE__ */ new Map());
2736
- __privateSet(this, _mutationId, 0);
2737
- }
2738
- build(client, options, state) {
2739
- const mutation = new Mutation({
2740
- client,
2741
- mutationCache: this,
2742
- mutationId: ++__privateWrapper(this, _mutationId)._,
2743
- options: client.defaultMutationOptions(options),
2744
- state
2745
- });
2746
- this.add(mutation);
2747
- return mutation;
2748
- }
2749
- add(mutation) {
2750
- __privateGet(this, _mutations).add(mutation);
2751
- const scope = scopeFor(mutation);
2752
- if (typeof scope === "string") {
2753
- const scopedMutations = __privateGet(this, _scopes).get(scope);
2754
- if (scopedMutations) {
2755
- scopedMutations.push(mutation);
2756
- } else {
2757
- __privateGet(this, _scopes).set(scope, [mutation]);
2758
- }
2759
- }
2760
- this.notify({ type: "added", mutation });
2761
- }
2762
- remove(mutation) {
2763
- if (__privateGet(this, _mutations).delete(mutation)) {
2764
- const scope = scopeFor(mutation);
2765
- if (typeof scope === "string") {
2766
- const scopedMutations = __privateGet(this, _scopes).get(scope);
2767
- if (scopedMutations) {
2768
- if (scopedMutations.length > 1) {
2769
- const index = scopedMutations.indexOf(mutation);
2770
- if (index !== -1) {
2771
- scopedMutations.splice(index, 1);
2772
- }
2773
- } else if (scopedMutations[0] === mutation) {
2774
- __privateGet(this, _scopes).delete(scope);
2775
- }
2776
- }
2777
- }
2778
- }
2779
- this.notify({ type: "removed", mutation });
2780
- }
2781
- canRun(mutation) {
2782
- const scope = scopeFor(mutation);
2783
- if (typeof scope === "string") {
2784
- const mutationsWithSameScope = __privateGet(this, _scopes).get(scope);
2785
- const firstPendingMutation = mutationsWithSameScope == null ? void 0 : mutationsWithSameScope.find(
2786
- (m) => m.state.status === "pending"
2787
- );
2788
- return !firstPendingMutation || firstPendingMutation === mutation;
2789
- } else {
2790
- return true;
2791
- }
2792
- }
2793
- runNext(mutation) {
2794
- var _a11, _b2;
2795
- const scope = scopeFor(mutation);
2796
- if (typeof scope === "string") {
2797
- const foundMutation = (_a11 = __privateGet(this, _scopes).get(scope)) == null ? void 0 : _a11.find((m) => m !== mutation && m.state.isPaused);
2798
- return (_b2 = foundMutation == null ? void 0 : foundMutation.continue()) != null ? _b2 : Promise.resolve();
2799
- } else {
2800
- return Promise.resolve();
2801
- }
2802
- }
2803
- clear() {
2804
- notifyManager.batch(() => {
2805
- __privateGet(this, _mutations).forEach((mutation) => {
2806
- this.notify({ type: "removed", mutation });
2807
- });
2808
- __privateGet(this, _mutations).clear();
2809
- __privateGet(this, _scopes).clear();
2810
- });
2811
- }
2812
- getAll() {
2813
- return Array.from(__privateGet(this, _mutations));
2814
- }
2815
- find(filters) {
2816
- const defaultedFilters = __spreadValues({ exact: true }, filters);
2817
- return this.getAll().find(
2818
- (mutation) => matchMutation(defaultedFilters, mutation)
2819
- );
2820
- }
2821
- findAll(filters = {}) {
2822
- return this.getAll().filter((mutation) => matchMutation(filters, mutation));
2823
- }
2824
- notify(event) {
2825
- notifyManager.batch(() => {
2826
- this.listeners.forEach((listener) => {
2827
- listener(event);
2828
- });
2829
- });
2830
- }
2831
- resumePausedMutations() {
2832
- const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
2833
- return notifyManager.batch(
2834
- () => Promise.all(
2835
- pausedMutations.map((mutation) => mutation.continue().catch(noop))
2836
- )
2837
- );
2838
- }
2839
- }, _mutations = new WeakMap(), _scopes = new WeakMap(), _mutationId = new WeakMap(), _a7);
2840
- function scopeFor(mutation) {
2841
- var _a11;
2842
- return (_a11 = mutation.options.scope) == null ? void 0 : _a11.id;
2843
- }
2844
-
2845
- // node_modules/@tanstack/query-core/build/modern/mutationObserver.js
2846
- init_dirname();
2847
- init_buffer();
2848
- init_process();
2849
- var _client4, _currentResult2, _currentMutation, _mutateOptions, _updateResult, updateResult_fn, _notify2, notify_fn2, _a8;
2850
- var MutationObserver = (_a8 = class extends Subscribable {
2851
- constructor(client, options) {
2852
- super();
2853
- __privateAdd(this, _updateResult);
2854
- __privateAdd(this, _notify2);
2855
- __privateAdd(this, _client4, void 0);
2856
- __privateAdd(this, _currentResult2, void 0);
2857
- __privateAdd(this, _currentMutation, void 0);
2858
- __privateAdd(this, _mutateOptions, void 0);
2859
- __privateSet(this, _client4, client);
2860
- this.setOptions(options);
2861
- this.bindMethods();
2862
- __privateMethod(this, _updateResult, updateResult_fn).call(this);
2863
- }
2864
- bindMethods() {
2865
- this.mutate = this.mutate.bind(this);
2866
- this.reset = this.reset.bind(this);
2867
- }
2868
- setOptions(options) {
2869
- var _a11;
2870
- const prevOptions = this.options;
2871
- this.options = __privateGet(this, _client4).defaultMutationOptions(options);
2872
- if (!shallowEqualObjects(this.options, prevOptions)) {
2873
- __privateGet(this, _client4).getMutationCache().notify({
2874
- type: "observerOptionsUpdated",
2875
- mutation: __privateGet(this, _currentMutation),
2876
- observer: this
2877
- });
2878
- }
2879
- if ((prevOptions == null ? void 0 : prevOptions.mutationKey) && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) {
2880
- this.reset();
2881
- } else if (((_a11 = __privateGet(this, _currentMutation)) == null ? void 0 : _a11.state.status) === "pending") {
2882
- __privateGet(this, _currentMutation).setOptions(this.options);
2883
- }
2884
- }
2885
- onUnsubscribe() {
2886
- var _a11;
2887
- if (!this.hasListeners()) {
2888
- (_a11 = __privateGet(this, _currentMutation)) == null ? void 0 : _a11.removeObserver(this);
2889
- }
2890
- }
2891
- onMutationUpdate(action) {
2892
- __privateMethod(this, _updateResult, updateResult_fn).call(this);
2893
- __privateMethod(this, _notify2, notify_fn2).call(this, action);
2894
- }
2895
- getCurrentResult() {
2896
- return __privateGet(this, _currentResult2);
2897
- }
2898
- reset() {
2899
- var _a11;
2900
- (_a11 = __privateGet(this, _currentMutation)) == null ? void 0 : _a11.removeObserver(this);
2901
- __privateSet(this, _currentMutation, void 0);
2902
- __privateMethod(this, _updateResult, updateResult_fn).call(this);
2903
- __privateMethod(this, _notify2, notify_fn2).call(this);
2904
- }
2905
- mutate(variables, options) {
2906
- var _a11;
2907
- __privateSet(this, _mutateOptions, options);
2908
- (_a11 = __privateGet(this, _currentMutation)) == null ? void 0 : _a11.removeObserver(this);
2909
- __privateSet(this, _currentMutation, __privateGet(this, _client4).getMutationCache().build(__privateGet(this, _client4), this.options));
2910
- __privateGet(this, _currentMutation).addObserver(this);
2911
- return __privateGet(this, _currentMutation).execute(variables);
2912
- }
2913
- }, _client4 = new WeakMap(), _currentResult2 = new WeakMap(), _currentMutation = new WeakMap(), _mutateOptions = new WeakMap(), _updateResult = new WeakSet(), updateResult_fn = function() {
2914
- var _a11, _b2;
2915
- const state = (_b2 = (_a11 = __privateGet(this, _currentMutation)) == null ? void 0 : _a11.state) != null ? _b2 : getDefaultState2();
2916
- __privateSet(this, _currentResult2, __spreadProps(__spreadValues({}, state), {
2917
- isPending: state.status === "pending",
2918
- isSuccess: state.status === "success",
2919
- isError: state.status === "error",
2920
- isIdle: state.status === "idle",
2921
- mutate: this.mutate,
2922
- reset: this.reset
2923
- }));
2924
- }, _notify2 = new WeakSet(), notify_fn2 = function(action) {
2925
- notifyManager.batch(() => {
2926
- var _a11, _b2, _c, _d, _e, _f, _g, _h;
2927
- if (__privateGet(this, _mutateOptions) && this.hasListeners()) {
2928
- const variables = __privateGet(this, _currentResult2).variables;
2929
- const onMutateResult = __privateGet(this, _currentResult2).context;
2930
- const context = {
2931
- client: __privateGet(this, _client4),
2932
- meta: this.options.meta,
2933
- mutationKey: this.options.mutationKey
2934
- };
2935
- if ((action == null ? void 0 : action.type) === "success") {
2936
- try {
2937
- (_b2 = (_a11 = __privateGet(this, _mutateOptions)).onSuccess) == null ? void 0 : _b2.call(
2938
- _a11,
2939
- action.data,
2940
- variables,
2941
- onMutateResult,
2942
- context
2943
- );
2944
- } catch (e) {
2945
- void Promise.reject(e);
2946
- }
2947
- try {
2948
- (_d = (_c = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _d.call(
2949
- _c,
2950
- action.data,
2951
- null,
2952
- variables,
2953
- onMutateResult,
2954
- context
2955
- );
2956
- } catch (e) {
2957
- void Promise.reject(e);
2958
- }
2959
- } else if ((action == null ? void 0 : action.type) === "error") {
2960
- try {
2961
- (_f = (_e = __privateGet(this, _mutateOptions)).onError) == null ? void 0 : _f.call(
2962
- _e,
2963
- action.error,
2964
- variables,
2965
- onMutateResult,
2966
- context
2967
- );
2968
- } catch (e) {
2969
- void Promise.reject(e);
2970
- }
2971
- try {
2972
- (_h = (_g = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _h.call(
2973
- _g,
2974
- void 0,
2975
- action.error,
2976
- variables,
2977
- onMutateResult,
2978
- context
2979
- );
2980
- } catch (e) {
2981
- void Promise.reject(e);
2982
- }
2983
- }
2984
- }
2985
- this.listeners.forEach((listener) => {
2986
- listener(__privateGet(this, _currentResult2));
2987
- });
2988
- });
2989
- }, _a8);
2990
-
2991
- // node_modules/@tanstack/query-core/build/modern/queryCache.js
2992
- init_dirname();
2993
- init_buffer();
2994
- init_process();
2995
- var _queries, _a9;
2996
- var QueryCache = (_a9 = class extends Subscribable {
2997
- constructor(config = {}) {
2998
- super();
2999
- __privateAdd(this, _queries, void 0);
3000
- this.config = config;
3001
- __privateSet(this, _queries, /* @__PURE__ */ new Map());
3002
- }
3003
- build(client, options, state) {
3004
- var _a11;
3005
- const queryKey = options.queryKey;
3006
- const queryHash = (_a11 = options.queryHash) != null ? _a11 : hashQueryKeyByOptions(queryKey, options);
3007
- let query = this.get(queryHash);
3008
- if (!query) {
3009
- query = new Query({
3010
- client,
3011
- queryKey,
3012
- queryHash,
3013
- options: client.defaultQueryOptions(options),
3014
- state,
3015
- defaultOptions: client.getQueryDefaults(queryKey)
3016
- });
3017
- this.add(query);
3018
- }
3019
- return query;
3020
- }
3021
- add(query) {
3022
- if (!__privateGet(this, _queries).has(query.queryHash)) {
3023
- __privateGet(this, _queries).set(query.queryHash, query);
3024
- this.notify({
3025
- type: "added",
3026
- query
3027
- });
3028
- }
3029
- }
3030
- remove(query) {
3031
- const queryInMap = __privateGet(this, _queries).get(query.queryHash);
3032
- if (queryInMap) {
3033
- query.destroy();
3034
- if (queryInMap === query) {
3035
- __privateGet(this, _queries).delete(query.queryHash);
3036
- }
3037
- this.notify({ type: "removed", query });
3038
- }
3039
- }
3040
- clear() {
3041
- notifyManager.batch(() => {
3042
- this.getAll().forEach((query) => {
3043
- this.remove(query);
3044
- });
3045
- });
3046
- }
3047
- get(queryHash) {
3048
- return __privateGet(this, _queries).get(queryHash);
3049
- }
3050
- getAll() {
3051
- return [...__privateGet(this, _queries).values()];
3052
- }
3053
- find(filters) {
3054
- const defaultedFilters = __spreadValues({ exact: true }, filters);
3055
- return this.getAll().find(
3056
- (query) => matchQuery(defaultedFilters, query)
3057
- );
3058
- }
3059
- findAll(filters = {}) {
3060
- const queries = this.getAll();
3061
- return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;
3062
- }
3063
- notify(event) {
3064
- notifyManager.batch(() => {
3065
- this.listeners.forEach((listener) => {
3066
- listener(event);
3067
- });
3068
- });
3069
- }
3070
- onFocus() {
3071
- notifyManager.batch(() => {
3072
- this.getAll().forEach((query) => {
3073
- query.onFocus();
3074
- });
3075
- });
3076
- }
3077
- onOnline() {
3078
- notifyManager.batch(() => {
3079
- this.getAll().forEach((query) => {
3080
- query.onOnline();
3081
- });
3082
- });
3083
- }
3084
- }, _queries = new WeakMap(), _a9);
3085
-
3086
- // node_modules/@tanstack/query-core/build/modern/queryClient.js
3087
- init_dirname();
3088
- init_buffer();
3089
- init_process();
3090
- var _queryCache, _mutationCache2, _defaultOptions2, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _a10;
3091
- var QueryClient = (_a10 = class {
3092
- constructor(config = {}) {
3093
- __privateAdd(this, _queryCache, void 0);
3094
- __privateAdd(this, _mutationCache2, void 0);
3095
- __privateAdd(this, _defaultOptions2, void 0);
3096
- __privateAdd(this, _queryDefaults, void 0);
3097
- __privateAdd(this, _mutationDefaults, void 0);
3098
- __privateAdd(this, _mountCount, void 0);
3099
- __privateAdd(this, _unsubscribeFocus, void 0);
3100
- __privateAdd(this, _unsubscribeOnline, void 0);
3101
- __privateSet(this, _queryCache, config.queryCache || new QueryCache());
3102
- __privateSet(this, _mutationCache2, config.mutationCache || new MutationCache());
3103
- __privateSet(this, _defaultOptions2, config.defaultOptions || {});
3104
- __privateSet(this, _queryDefaults, /* @__PURE__ */ new Map());
3105
- __privateSet(this, _mutationDefaults, /* @__PURE__ */ new Map());
3106
- __privateSet(this, _mountCount, 0);
3107
- }
3108
- mount() {
3109
- __privateWrapper(this, _mountCount)._++;
3110
- if (__privateGet(this, _mountCount) !== 1)
3111
- return;
3112
- __privateSet(this, _unsubscribeFocus, focusManager.subscribe(async (focused) => {
3113
- if (focused) {
3114
- await this.resumePausedMutations();
3115
- __privateGet(this, _queryCache).onFocus();
3116
- }
3117
- }));
3118
- __privateSet(this, _unsubscribeOnline, onlineManager.subscribe(async (online) => {
3119
- if (online) {
3120
- await this.resumePausedMutations();
3121
- __privateGet(this, _queryCache).onOnline();
3122
- }
3123
- }));
3124
- }
3125
- unmount() {
3126
- var _a11, _b2;
3127
- __privateWrapper(this, _mountCount)._--;
3128
- if (__privateGet(this, _mountCount) !== 0)
3129
- return;
3130
- (_a11 = __privateGet(this, _unsubscribeFocus)) == null ? void 0 : _a11.call(this);
3131
- __privateSet(this, _unsubscribeFocus, void 0);
3132
- (_b2 = __privateGet(this, _unsubscribeOnline)) == null ? void 0 : _b2.call(this);
3133
- __privateSet(this, _unsubscribeOnline, void 0);
3134
- }
3135
- isFetching(filters) {
3136
- return __privateGet(this, _queryCache).findAll(__spreadProps(__spreadValues({}, filters), { fetchStatus: "fetching" })).length;
3137
- }
3138
- isMutating(filters) {
3139
- return __privateGet(this, _mutationCache2).findAll(__spreadProps(__spreadValues({}, filters), { status: "pending" })).length;
3140
- }
3141
- /**
3142
- * Imperative (non-reactive) way to retrieve data for a QueryKey.
3143
- * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
3144
- *
3145
- * Hint: Do not use this function inside a component, because it won't receive updates.
3146
- * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
3147
- */
3148
- getQueryData(queryKey) {
3149
- var _a11;
3150
- const options = this.defaultQueryOptions({ queryKey });
3151
- return (_a11 = __privateGet(this, _queryCache).get(options.queryHash)) == null ? void 0 : _a11.state.data;
3152
- }
3153
- ensureQueryData(options) {
3154
- const defaultedOptions = this.defaultQueryOptions(options);
3155
- const query = __privateGet(this, _queryCache).build(this, defaultedOptions);
3156
- const cachedData = query.state.data;
3157
- if (cachedData === void 0) {
3158
- return this.fetchQuery(options);
3159
- }
3160
- if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) {
3161
- void this.prefetchQuery(defaultedOptions);
3162
- }
3163
- return Promise.resolve(cachedData);
3164
- }
3165
- getQueriesData(filters) {
3166
- return __privateGet(this, _queryCache).findAll(filters).map(({ queryKey, state }) => {
3167
- const data = state.data;
3168
- return [queryKey, data];
3169
- });
3170
- }
3171
- setQueryData(queryKey, updater, options) {
3172
- const defaultedOptions = this.defaultQueryOptions({ queryKey });
3173
- const query = __privateGet(this, _queryCache).get(
3174
- defaultedOptions.queryHash
3175
- );
3176
- const prevData = query == null ? void 0 : query.state.data;
3177
- const data = functionalUpdate(updater, prevData);
3178
- if (data === void 0) {
3179
- return void 0;
3180
- }
3181
- return __privateGet(this, _queryCache).build(this, defaultedOptions).setData(data, __spreadProps(__spreadValues({}, options), { manual: true }));
3182
- }
3183
- setQueriesData(filters, updater, options) {
3184
- return notifyManager.batch(
3185
- () => __privateGet(this, _queryCache).findAll(filters).map(({ queryKey }) => [
3186
- queryKey,
3187
- this.setQueryData(queryKey, updater, options)
3188
- ])
3189
- );
3190
- }
3191
- getQueryState(queryKey) {
3192
- var _a11;
3193
- const options = this.defaultQueryOptions({ queryKey });
3194
- return (_a11 = __privateGet(this, _queryCache).get(
3195
- options.queryHash
3196
- )) == null ? void 0 : _a11.state;
3197
- }
3198
- removeQueries(filters) {
3199
- const queryCache = __privateGet(this, _queryCache);
3200
- notifyManager.batch(() => {
3201
- queryCache.findAll(filters).forEach((query) => {
3202
- queryCache.remove(query);
3203
- });
3204
- });
3205
- }
3206
- resetQueries(filters, options) {
3207
- const queryCache = __privateGet(this, _queryCache);
3208
- return notifyManager.batch(() => {
3209
- queryCache.findAll(filters).forEach((query) => {
3210
- query.reset();
3211
- });
3212
- return this.refetchQueries(
3213
- __spreadValues({
3214
- type: "active"
3215
- }, filters),
3216
- options
3217
- );
3218
- });
3219
- }
3220
- cancelQueries(filters, cancelOptions = {}) {
3221
- const defaultedCancelOptions = __spreadValues({ revert: true }, cancelOptions);
3222
- const promises = notifyManager.batch(
3223
- () => __privateGet(this, _queryCache).findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
3224
- );
3225
- return Promise.all(promises).then(noop).catch(noop);
3226
- }
3227
- invalidateQueries(filters, options = {}) {
3228
- return notifyManager.batch(() => {
3229
- var _a11, _b2;
3230
- __privateGet(this, _queryCache).findAll(filters).forEach((query) => {
3231
- query.invalidate();
3232
- });
3233
- if ((filters == null ? void 0 : filters.refetchType) === "none") {
3234
- return Promise.resolve();
3235
- }
3236
- return this.refetchQueries(
3237
- __spreadProps(__spreadValues({}, filters), {
3238
- type: (_b2 = (_a11 = filters == null ? void 0 : filters.refetchType) != null ? _a11 : filters == null ? void 0 : filters.type) != null ? _b2 : "active"
3239
- }),
3240
- options
3241
- );
3242
- });
3243
- }
3244
- refetchQueries(filters, options = {}) {
3245
- var _a11;
3246
- const fetchOptions = __spreadProps(__spreadValues({}, options), {
3247
- cancelRefetch: (_a11 = options.cancelRefetch) != null ? _a11 : true
3248
- });
3249
- const promises = notifyManager.batch(
3250
- () => __privateGet(this, _queryCache).findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {
3251
- let promise = query.fetch(void 0, fetchOptions);
3252
- if (!fetchOptions.throwOnError) {
3253
- promise = promise.catch(noop);
3254
- }
3255
- return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
3256
- })
3257
- );
3258
- return Promise.all(promises).then(noop);
3259
- }
3260
- fetchQuery(options) {
3261
- const defaultedOptions = this.defaultQueryOptions(options);
3262
- if (defaultedOptions.retry === void 0) {
3263
- defaultedOptions.retry = false;
3264
- }
3265
- const query = __privateGet(this, _queryCache).build(this, defaultedOptions);
3266
- return query.isStaleByTime(
3267
- resolveStaleTime(defaultedOptions.staleTime, query)
3268
- ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
3269
- }
3270
- prefetchQuery(options) {
3271
- return this.fetchQuery(options).then(noop).catch(noop);
3272
- }
3273
- fetchInfiniteQuery(options) {
3274
- options.behavior = infiniteQueryBehavior(options.pages);
3275
- return this.fetchQuery(options);
3276
- }
3277
- prefetchInfiniteQuery(options) {
3278
- return this.fetchInfiniteQuery(options).then(noop).catch(noop);
3279
- }
3280
- ensureInfiniteQueryData(options) {
3281
- options.behavior = infiniteQueryBehavior(options.pages);
3282
- return this.ensureQueryData(options);
3283
- }
3284
- resumePausedMutations() {
3285
- if (onlineManager.isOnline()) {
3286
- return __privateGet(this, _mutationCache2).resumePausedMutations();
3287
- }
3288
- return Promise.resolve();
3289
- }
3290
- getQueryCache() {
3291
- return __privateGet(this, _queryCache);
3292
- }
3293
- getMutationCache() {
3294
- return __privateGet(this, _mutationCache2);
3295
- }
3296
- getDefaultOptions() {
3297
- return __privateGet(this, _defaultOptions2);
3298
- }
3299
- setDefaultOptions(options) {
3300
- __privateSet(this, _defaultOptions2, options);
3301
- }
3302
- setQueryDefaults(queryKey, options) {
3303
- __privateGet(this, _queryDefaults).set(hashKey(queryKey), {
3304
- queryKey,
3305
- defaultOptions: options
3306
- });
3307
- }
3308
- getQueryDefaults(queryKey) {
3309
- const defaults = [...__privateGet(this, _queryDefaults).values()];
3310
- const result = {};
3311
- defaults.forEach((queryDefault) => {
3312
- if (partialMatchKey(queryKey, queryDefault.queryKey)) {
3313
- Object.assign(result, queryDefault.defaultOptions);
3314
- }
3315
- });
3316
- return result;
3317
- }
3318
- setMutationDefaults(mutationKey, options) {
3319
- __privateGet(this, _mutationDefaults).set(hashKey(mutationKey), {
3320
- mutationKey,
3321
- defaultOptions: options
3322
- });
3323
- }
3324
- getMutationDefaults(mutationKey) {
3325
- const defaults = [...__privateGet(this, _mutationDefaults).values()];
3326
- const result = {};
3327
- defaults.forEach((queryDefault) => {
3328
- if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {
3329
- Object.assign(result, queryDefault.defaultOptions);
3330
- }
3331
- });
3332
- return result;
3333
- }
3334
- defaultQueryOptions(options) {
3335
- if (options._defaulted) {
3336
- return options;
3337
- }
3338
- const defaultedOptions = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, __privateGet(this, _defaultOptions2).queries), this.getQueryDefaults(options.queryKey)), options), {
3339
- _defaulted: true
3340
- });
3341
- if (!defaultedOptions.queryHash) {
3342
- defaultedOptions.queryHash = hashQueryKeyByOptions(
3343
- defaultedOptions.queryKey,
3344
- defaultedOptions
3345
- );
3346
- }
3347
- if (defaultedOptions.refetchOnReconnect === void 0) {
3348
- defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
3349
- }
3350
- if (defaultedOptions.throwOnError === void 0) {
3351
- defaultedOptions.throwOnError = !!defaultedOptions.suspense;
3352
- }
3353
- if (!defaultedOptions.networkMode && defaultedOptions.persister) {
3354
- defaultedOptions.networkMode = "offlineFirst";
3355
- }
3356
- if (defaultedOptions.queryFn === skipToken) {
3357
- defaultedOptions.enabled = false;
3358
- }
3359
- return defaultedOptions;
3360
- }
3361
- defaultMutationOptions(options) {
3362
- if (options == null ? void 0 : options._defaulted) {
3363
- return options;
3364
- }
3365
- return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, __privateGet(this, _defaultOptions2).mutations), (options == null ? void 0 : options.mutationKey) && this.getMutationDefaults(options.mutationKey)), options), {
3366
- _defaulted: true
3367
- });
3368
- }
3369
- clear() {
3370
- __privateGet(this, _queryCache).clear();
3371
- __privateGet(this, _mutationCache2).clear();
3372
- }
3373
- }, _queryCache = new WeakMap(), _mutationCache2 = new WeakMap(), _defaultOptions2 = new WeakMap(), _queryDefaults = new WeakMap(), _mutationDefaults = new WeakMap(), _mountCount = new WeakMap(), _unsubscribeFocus = new WeakMap(), _unsubscribeOnline = new WeakMap(), _a10);
3374
-
3375
- // src/controllers/query.controller.ts
3376
- var QueryController = class {
3377
- constructor(host, optionsFn, hostPropertyName) {
3378
- this.host = host;
3379
- this.optionsFn = optionsFn;
3380
- this.host.addController(this);
3381
- this.hostPropertyName = hostPropertyName;
3382
- if (this.optionsFn) {
3383
- this.observeQuery(this.optionsFn);
3384
- }
3385
- }
3386
- observeQuery(options, optimistic = true) {
3387
- const queryClient = this.host.queryClient;
3388
- const resolvedOptions = typeof options === "function" ? options() : options;
3389
- const defaultedOptions = queryClient.defaultQueryOptions(resolvedOptions);
3390
- this.queryObserver = new QueryObserver(queryClient, defaultedOptions);
3391
- this.result = optimistic ? this.queryObserver.getOptimisticResult(defaultedOptions) : void 0;
3392
- this.host.requestUpdate();
3393
- }
3394
- hostUpdate() {
3395
- if (!this.optionsFn || !this.queryObserver)
3396
- return;
3397
- const defaultedOptions = this.host.queryClient.defaultQueryOptions(
3398
- this.optionsFn()
3399
- );
3400
- this.queryObserver.setOptions(defaultedOptions);
3401
- }
3402
- hostConnected() {
3403
- this.subscribe();
3404
- }
3405
- async subscribe() {
3406
- var _a11;
3407
- if (!this.queryObserver) {
3408
- if (this.optionsFn)
3409
- this.observeQuery(this.optionsFn);
3410
- if (!this.queryObserver)
3411
- return;
3412
- }
3413
- (_a11 = this.unsubscribe) == null ? void 0 : _a11.call(this);
3414
- this.unsubscribe = this.queryObserver.subscribe(
3415
- (result) => {
3416
- this.result = result;
3417
- if (this.hostPropertyName) {
3418
- ;
3419
- this.host[this.hostPropertyName] = result;
3420
- }
3421
- this.host.requestUpdate();
3422
- }
3423
- );
3424
- this.queryObserver.updateResult();
3425
- this.host.requestUpdate();
3426
- }
3427
- hostDisconnected() {
3428
- var _a11;
3429
- (_a11 = this.unsubscribe) == null ? void 0 : _a11.call(this);
3430
- this.unsubscribe = void 0;
3431
- }
3432
- };
3433
-
3434
- export {
3435
- apiClient,
3436
- Environments,
3437
- HARMONY_URLS,
3438
- FINAL_STATUSES,
3439
- harmonyApi,
3440
- ThumbnailService,
3441
- queryHarmonyCapabilities,
3442
- queryHarmonyJobs,
3443
- queryHarmonyJobStatus,
3444
- queryCreateHarmonySubsetJob,
3445
- queryCancelHarmonySubsetJob,
3446
- mutationRemoveHarmonyJobLabels,
3447
- dehydrate,
3448
- hydrate,
3449
- MutationObserver,
3450
- QueryClient,
3451
- QueryController
3452
- };