@nasa-terra/components 0.0.179 → 0.0.181

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 (1275) hide show
  1. package/cdn/apis/harmony.api.d.ts +24 -1
  2. package/cdn/chunks/chunk.2DWOHXBK.js +19 -0
  3. package/cdn/chunks/chunk.2ND5H65H.js +357 -0
  4. package/cdn/chunks/chunk.2NYU2KVG.js +41 -0
  5. package/cdn/chunks/chunk.2Y5YYW4R.js +2244 -0
  6. package/cdn/chunks/chunk.35CHAEJK.js +19 -0
  7. package/cdn/chunks/chunk.3C6QCU6U.js +56 -0
  8. package/cdn/chunks/chunk.3OFBDOEM.js +32 -0
  9. package/cdn/chunks/chunk.3QZNL3QN.js +477 -0
  10. package/cdn/chunks/chunk.3RQ3EY2O.js +32 -0
  11. package/cdn/chunks/chunk.45VJVUYK.js +34 -0
  12. package/cdn/chunks/chunk.47Q7XTJE.js +514 -0
  13. package/cdn/chunks/chunk.4DZW7OYM.js +189 -0
  14. package/cdn/chunks/chunk.4HIIVOOA.js +19 -0
  15. package/cdn/chunks/chunk.4IWGQ3QM.js +34 -0
  16. package/cdn/chunks/chunk.4MF2CVEK.js +19 -0
  17. package/cdn/chunks/chunk.4MLYEWPE.js +19 -0
  18. package/cdn/chunks/chunk.4NU6XC7B.js +616 -0
  19. package/cdn/chunks/chunk.4QUFZHF6.js +19 -0
  20. package/cdn/chunks/chunk.4SNGWC6U.js +19 -0
  21. package/cdn/chunks/chunk.55F4UQSA.js +62 -0
  22. package/cdn/chunks/chunk.5BFFURMO.js +151 -0
  23. package/cdn/chunks/chunk.5C3JGD4D.js +19 -0
  24. package/cdn/chunks/chunk.5D66GYVU.js +29 -0
  25. package/cdn/chunks/chunk.5IGCBQF2.js +29 -0
  26. package/cdn/chunks/chunk.5Q3ESWK2.js +29 -0
  27. package/cdn/chunks/chunk.63GR7COJ.js +310 -0
  28. package/cdn/chunks/chunk.6DLL4PEH.js +29 -0
  29. package/cdn/chunks/chunk.6FVRJALX.js +472 -0
  30. package/cdn/chunks/chunk.6X5DB5KR.js +56075 -0
  31. package/cdn/chunks/chunk.6ZCOQKCQ.js +19 -0
  32. package/cdn/chunks/chunk.73E43E5H.js +19 -0
  33. package/cdn/chunks/chunk.73ZJ52GL.js +237 -0
  34. package/cdn/chunks/chunk.746HHL7J.js +39 -0
  35. package/cdn/chunks/chunk.765GMYVH.js +19 -0
  36. package/cdn/chunks/chunk.7MKFJACQ.js +19 -0
  37. package/cdn/chunks/chunk.7TSAQ7F7.js +19 -0
  38. package/cdn/chunks/chunk.7W7LCLU5.js +443 -0
  39. package/cdn/chunks/chunk.AGUPZDXW.js +19 -0
  40. package/cdn/chunks/chunk.ANTYCNBS.js +234 -0
  41. package/cdn/chunks/chunk.ANY6ZBQZ.js +1207 -0
  42. package/cdn/chunks/chunk.AODMPEAA.js +32 -0
  43. package/cdn/chunks/chunk.AXHGJXN6.js +113 -0
  44. package/cdn/chunks/chunk.AYENYRMH.js +19 -0
  45. package/cdn/chunks/chunk.B6THN23F.js +19 -0
  46. package/cdn/chunks/chunk.BCNBUAWM.js +36 -0
  47. package/cdn/chunks/chunk.BOPH3VGD.js +19 -0
  48. package/cdn/chunks/chunk.BUHSAHXI.js +538 -0
  49. package/cdn/chunks/chunk.BWWU3UOU.js +293 -0
  50. package/cdn/chunks/chunk.BYWARBVO.js +35 -0
  51. package/cdn/chunks/chunk.C2ZPLW2A.js +19 -0
  52. package/cdn/chunks/chunk.CD75NGST.js +35 -0
  53. package/cdn/chunks/chunk.CIVGGIRX.js +473 -0
  54. package/cdn/chunks/chunk.CUK563TP.js +32 -0
  55. package/cdn/chunks/chunk.CWBT2ALZ.js +29 -0
  56. package/cdn/chunks/chunk.CY34MSDE.js +123 -0
  57. package/cdn/chunks/chunk.D7FSLFUL.js +904 -0
  58. package/cdn/chunks/chunk.DEDLPLON.js +47 -0
  59. package/cdn/chunks/chunk.DHRENFRE.js +285 -0
  60. package/cdn/chunks/chunk.DNHL2E5Q.js +19 -0
  61. package/cdn/chunks/chunk.DSYH36LJ.js +19 -0
  62. package/cdn/chunks/chunk.DXWMVI4V.js +29 -0
  63. package/cdn/chunks/chunk.DYDZ3LJN.js +165 -0
  64. package/cdn/chunks/chunk.DYMGURNK.js +359 -0
  65. package/cdn/chunks/chunk.E25SYMSA.js +190 -0
  66. package/cdn/chunks/chunk.EDYR7OMS.js +19 -0
  67. package/cdn/chunks/chunk.EEN2PM7M.js +29 -0
  68. package/cdn/chunks/chunk.EHU3RZOC.js +320 -0
  69. package/cdn/chunks/chunk.ERWXE4KH.js +493 -0
  70. package/cdn/chunks/chunk.ETE5JGX3.js +32 -0
  71. package/cdn/chunks/chunk.EUV33A5J.js +132 -0
  72. package/cdn/chunks/chunk.F6ZY7PEP.js +29 -0
  73. package/cdn/chunks/chunk.FEXGBRTJ.js +29 -0
  74. package/cdn/chunks/chunk.FFGQUMMS.js +99 -0
  75. package/cdn/chunks/chunk.FFRZZJF3.js +19 -0
  76. package/cdn/chunks/chunk.FH7JIHQ5.js +32 -0
  77. package/cdn/chunks/chunk.FSRWOJNJ.js +29 -0
  78. package/cdn/chunks/chunk.FYEAHT4C.js +19 -0
  79. package/cdn/chunks/chunk.G6PPVFZP.js +19 -0
  80. package/cdn/chunks/chunk.G7ARINSA.js +19 -0
  81. package/cdn/chunks/chunk.GCDBZ3W7.js +599 -0
  82. package/cdn/chunks/chunk.GMDJOE3D.js +610 -0
  83. package/cdn/chunks/chunk.GOKKW2WL.js +35 -0
  84. package/cdn/chunks/chunk.GPLYMDPJ.js +33 -0
  85. package/cdn/chunks/chunk.GQ57E6W4.js +19 -0
  86. package/cdn/chunks/chunk.GRKM53EG.js +36 -0
  87. package/cdn/chunks/chunk.HAEGIPB7.js +32 -0
  88. package/cdn/chunks/chunk.HFRKSSXY.js +187 -0
  89. package/cdn/chunks/chunk.HJDMWAVV.js +33 -0
  90. package/cdn/chunks/chunk.HK3NF22B.js +19 -0
  91. package/cdn/chunks/chunk.HMDDYPZM.js +29 -0
  92. package/cdn/chunks/chunk.I3XWIX6E.js +32 -0
  93. package/cdn/chunks/chunk.I5G3F6D4.js +19 -0
  94. package/cdn/chunks/chunk.IJ7RWFE2.js +19 -0
  95. package/cdn/chunks/chunk.JIUL3OL6.js +29 -0
  96. package/cdn/chunks/chunk.JIY4UZ2J.js +99 -0
  97. package/cdn/chunks/chunk.JKURDNA4.js +161 -0
  98. package/cdn/chunks/chunk.JS5OOQLY.js +125 -0
  99. package/cdn/chunks/chunk.K2P3VBHL.js +19 -0
  100. package/cdn/chunks/chunk.K2UWIYQ2.js +82 -0
  101. package/cdn/chunks/chunk.KAPIG3C4.js +32 -0
  102. package/cdn/chunks/chunk.KKZLSSED.js +29 -0
  103. package/cdn/chunks/chunk.KOA6BIWM.js +29 -0
  104. package/cdn/chunks/chunk.KSVL4NCO.js +68 -0
  105. package/cdn/chunks/chunk.KSXGXCJD.js +278 -0
  106. package/cdn/chunks/chunk.KVMARFYP.js +34 -0
  107. package/cdn/chunks/chunk.KVXRPLPX.js +29 -0
  108. package/cdn/chunks/chunk.LA5VODPG.js +106 -0
  109. package/cdn/chunks/chunk.LEUFWZLL.js +29 -0
  110. package/cdn/chunks/chunk.LFHHJTEK.js +19 -0
  111. package/cdn/chunks/chunk.LG3OAUSC.js +19 -0
  112. package/cdn/chunks/chunk.LG5C4AHH.js +224 -0
  113. package/cdn/chunks/chunk.LJGNFTUU.js +19 -0
  114. package/cdn/chunks/chunk.LPIUMZT6.js +29 -0
  115. package/cdn/chunks/chunk.M7VLA6HV.js +113 -0
  116. package/cdn/chunks/chunk.MB2OLLCZ.js +19 -0
  117. package/cdn/chunks/chunk.MJUD6H2O.js +60 -0
  118. package/cdn/chunks/chunk.MK76WXRC.js +32 -0
  119. package/cdn/chunks/chunk.MVC5FVKI.js +9744 -0
  120. package/cdn/chunks/chunk.MX22XUB3.js +29 -0
  121. package/cdn/chunks/chunk.N466UPRW.js +86 -0
  122. package/cdn/chunks/chunk.N4WZUEQD.js +205 -0
  123. package/cdn/chunks/chunk.N55ZUY7F.js +19 -0
  124. package/cdn/chunks/chunk.NCFSJVEZ.js +19 -0
  125. package/cdn/chunks/chunk.NQ7HNAO3.js +19 -0
  126. package/cdn/chunks/chunk.O43CCSUG.js +29 -0
  127. package/cdn/chunks/chunk.O5VR4XW3.js +19 -0
  128. package/cdn/chunks/chunk.OAR4VKWQ.js +19 -0
  129. package/cdn/chunks/chunk.OFMIOABD.js +19 -0
  130. package/cdn/chunks/chunk.OJT6BD3G.js +915 -0
  131. package/cdn/chunks/chunk.OKJYOJFO.js +37 -0
  132. package/cdn/chunks/chunk.OL7XRVJD.js +19 -0
  133. package/cdn/chunks/chunk.OSBHMGAB.js +136 -0
  134. package/cdn/chunks/chunk.PFIB3T6I.js +19 -0
  135. package/cdn/chunks/chunk.PHEAH3PP.js +19 -0
  136. package/cdn/chunks/chunk.PK2YWTXR.js +104 -0
  137. package/cdn/chunks/chunk.PLWNLNYY.js +19 -0
  138. package/cdn/chunks/chunk.PNBVXM3Y.js +2547 -0
  139. package/cdn/chunks/chunk.PQPZKAOJ.js +231 -0
  140. package/cdn/chunks/chunk.PSGY75G2.js +32 -0
  141. package/cdn/chunks/chunk.QCHUEPMQ.js +29 -0
  142. package/cdn/chunks/chunk.QDINN7DO.js +32 -0
  143. package/cdn/chunks/chunk.QKKAIJRP.js +3451 -0
  144. package/cdn/chunks/chunk.QLPYQ5QM.js +19 -0
  145. package/cdn/chunks/chunk.QPZ3OXHJ.js +188 -0
  146. package/cdn/chunks/chunk.QRJLBELU.js +230 -0
  147. package/cdn/chunks/chunk.R2VK36KK.js +29 -0
  148. package/cdn/chunks/chunk.RCSM7Z5E.js +19 -0
  149. package/cdn/chunks/chunk.RISDH34C.js +350 -0
  150. package/cdn/chunks/chunk.RSUJRQLT.js +1975 -0
  151. package/cdn/chunks/chunk.S2BYBA42.js +32 -0
  152. package/cdn/chunks/chunk.S3S7RGFN.js +29 -0
  153. package/cdn/chunks/chunk.S3XNEX7Q.js +29 -0
  154. package/cdn/chunks/chunk.SCBSBLIF.js +19 -0
  155. package/cdn/chunks/chunk.SGQIYGS7.js +83 -0
  156. package/cdn/chunks/chunk.SJFGHGKH.js +264 -0
  157. package/cdn/chunks/chunk.SR53QDBY.js +19 -0
  158. package/cdn/chunks/chunk.SRLCDKSU.js +19 -0
  159. package/cdn/chunks/chunk.SV2PUNIH.js +19 -0
  160. package/cdn/chunks/chunk.T5BE45M3.js +19 -0
  161. package/cdn/chunks/chunk.T6YZOAIS.js +29 -0
  162. package/cdn/chunks/chunk.TBLE2KGA.js +29 -0
  163. package/cdn/chunks/chunk.TKWMC5YI.js +854 -0
  164. package/cdn/chunks/chunk.TOYEA3BN.js +92 -0
  165. package/cdn/chunks/chunk.TU4BBVTN.js +19 -0
  166. package/cdn/chunks/chunk.TUJY2RG5.js +19 -0
  167. package/cdn/chunks/chunk.TY4WIMYJ.js +658 -0
  168. package/cdn/chunks/chunk.UHX3667N.js +19 -0
  169. package/cdn/chunks/chunk.USXZCB3X.js +524 -0
  170. package/cdn/chunks/chunk.UZKLGTZL.js +29 -0
  171. package/cdn/chunks/chunk.V3V7RRLU.js +49 -0
  172. package/cdn/chunks/chunk.VA5AUQXO.js +19 -0
  173. package/cdn/chunks/chunk.VFSDKRWK.js +259 -0
  174. package/cdn/chunks/chunk.VJZNIJEP.js +60 -0
  175. package/cdn/chunks/chunk.VO4X552X.js +36 -0
  176. package/cdn/chunks/chunk.VRUAG7OU.js +19 -0
  177. package/cdn/chunks/chunk.VTCUUKPV.js +19 -0
  178. package/cdn/chunks/chunk.VTTODZFG.js +33 -0
  179. package/cdn/chunks/chunk.VVKYAGA2.js +134 -0
  180. package/cdn/chunks/chunk.VXY726KB.js +29 -0
  181. package/cdn/chunks/chunk.VZEACDBX.js +19 -0
  182. package/cdn/chunks/chunk.W2GF7BXP.js +71 -0
  183. package/cdn/chunks/chunk.W5J7BIAV.js +19 -0
  184. package/cdn/chunks/chunk.WCOFECTA.js +37 -0
  185. package/cdn/chunks/chunk.WNOGT4FJ.js +300 -0
  186. package/cdn/chunks/chunk.WT7GDDLE.js +19 -0
  187. package/cdn/chunks/chunk.WTXVDBRE.js +538 -0
  188. package/cdn/chunks/chunk.WWLOI3XF.js +74 -0
  189. package/cdn/chunks/chunk.XQO3ZO7J.js +662 -0
  190. package/cdn/chunks/chunk.XUBCJIWF.js +32 -0
  191. package/cdn/chunks/chunk.XVECFU6I.js +276 -0
  192. package/cdn/chunks/chunk.XZ6LSQ2S.js +29 -0
  193. package/cdn/chunks/chunk.YDWBYNL7.js +19 -0
  194. package/cdn/chunks/chunk.YFMBAZ43.js +123 -0
  195. package/cdn/chunks/chunk.YGZ7GOSX.js +35 -0
  196. package/cdn/chunks/chunk.YIGURDHN.js +30 -0
  197. package/cdn/chunks/chunk.YJA73KAA.js +78 -0
  198. package/cdn/chunks/chunk.YJWB5W4S.js +29 -0
  199. package/cdn/chunks/chunk.YPYN4V4T.js +93 -0
  200. package/cdn/chunks/chunk.YYDMU76Q.js +372 -0
  201. package/cdn/chunks/chunk.YYVIS6D4.js +36 -0
  202. package/cdn/chunks/chunk.Z45L4FIP.js +1184 -0
  203. package/cdn/chunks/chunk.ZC2YQQZ3.js +33 -0
  204. package/cdn/chunks/chunk.ZFOTRE5C.js +19 -0
  205. package/cdn/chunks/chunk.ZKC2RGQN.js +33 -0
  206. package/cdn/chunks/chunk.ZTRMYR7K.js +29 -0
  207. package/cdn/chunks/chunk.ZVIECZDH.js +155 -0
  208. package/cdn/chunks/chunk.ZZFZ22B2.js +288 -0
  209. package/cdn/components/accordion/accordion.component.js +3 -3
  210. package/cdn/components/accordion/accordion.js +4 -4
  211. package/cdn/components/alert/alert.component.js +2 -2
  212. package/cdn/components/alert/alert.js +3 -3
  213. package/cdn/components/avatar/avatar.component.js +3 -3
  214. package/cdn/components/avatar/avatar.js +4 -4
  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 +11 -11
  222. package/cdn/components/browse-variables/browse-variables.js +12 -12
  223. package/cdn/components/button/button.component.js +3 -3
  224. package/cdn/components/button/button.js +4 -4
  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 +3 -3
  232. package/cdn/components/checkbox/checkbox.js +4 -4
  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 +2 -2
  236. package/cdn/components/combobox/combobox.js +3 -3
  237. package/cdn/components/data-access/data-access.component.js +26 -25
  238. package/cdn/components/data-access/data-access.js +27 -26
  239. package/cdn/components/data-grid/data-grid.component.js +3 -3
  240. package/cdn/components/data-grid/data-grid.js +4 -4
  241. package/cdn/components/data-rods/data-rods.component.js +36 -35
  242. package/cdn/components/data-rods/data-rods.js +37 -36
  243. package/cdn/components/data-subsetter/data-subsetter.component.js +36 -34
  244. package/cdn/components/data-subsetter/data-subsetter.js +37 -35
  245. package/cdn/components/data-subsetter/notebooks/subsetter-notebook.js +1 -1
  246. package/cdn/components/data-subsetter-history/data-subsetter-history.component.js +37 -35
  247. package/cdn/components/data-subsetter-history/data-subsetter-history.js +38 -36
  248. package/cdn/components/date-picker/date-picker.component.js +7 -7
  249. package/cdn/components/date-picker/date-picker.js +8 -8
  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 +4 -4
  253. package/cdn/components/dialog/dialog.js +5 -5
  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 +10 -10
  259. package/cdn/components/earthdata-login/earthdata-login.js +11 -11
  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.d.ts +91 -0
  263. package/cdn/components/harmony-history/harmony-history.component.js +43 -0
  264. package/cdn/components/harmony-history/harmony-history.d.ts +8 -0
  265. package/cdn/components/harmony-history/harmony-history.js +44 -0
  266. package/cdn/components/harmony-history/harmony-history.styles.d.ts +2 -0
  267. package/cdn/components/harmony-history/harmony-history.styles.js +9 -0
  268. package/cdn/components/icon/icon.component.js +2 -2
  269. package/cdn/components/icon/icon.js +3 -3
  270. package/cdn/components/input/input.component.js +3 -3
  271. package/cdn/components/input/input.js +4 -4
  272. package/cdn/components/loader/loader.component.js +2 -2
  273. package/cdn/components/loader/loader.js +3 -3
  274. package/cdn/components/login/login.component.js +8 -8
  275. package/cdn/components/login/login.js +9 -9
  276. package/cdn/components/map/map.component.js +7 -7
  277. package/cdn/components/map/map.js +8 -8
  278. package/cdn/components/map/map.service.js +3 -3
  279. package/cdn/components/menu/menu.component.js +2 -2
  280. package/cdn/components/menu/menu.js +3 -3
  281. package/cdn/components/menu-item/menu-item.component.js +5 -5
  282. package/cdn/components/menu-item/menu-item.js +6 -6
  283. package/cdn/components/option/option.component.js +3 -3
  284. package/cdn/components/option/option.js +4 -4
  285. package/cdn/components/pagination/pagination.component.js +3 -3
  286. package/cdn/components/pagination/pagination.js +4 -4
  287. package/cdn/components/plot/plot.component.js +3 -3
  288. package/cdn/components/plot/plot.js +4 -4
  289. package/cdn/components/plot-toolbar/notebooks/time-averaged-map-notebook.js +1 -1
  290. package/cdn/components/plot-toolbar/notebooks/time-series-notebook.js +1 -1
  291. package/cdn/components/plot-toolbar/plot-toolbar.component.js +14 -15
  292. package/cdn/components/plot-toolbar/plot-toolbar.js +15 -16
  293. package/cdn/components/popup/popup.component.js +2 -2
  294. package/cdn/components/popup/popup.js +3 -3
  295. package/cdn/components/progress-bar/progress-bar.component.js +2 -2
  296. package/cdn/components/progress-bar/progress-bar.js +3 -3
  297. package/cdn/components/radio/radio.component.js +2 -2
  298. package/cdn/components/radio/radio.js +3 -3
  299. package/cdn/components/radio-group/radio-group.component.js +2 -2
  300. package/cdn/components/radio-group/radio-group.js +3 -3
  301. package/cdn/components/scroll-hint/scroll-hint.component.js +3 -3
  302. package/cdn/components/scroll-hint/scroll-hint.js +4 -4
  303. package/cdn/components/select/select.component.js +5 -5
  304. package/cdn/components/select/select.js +6 -6
  305. package/cdn/components/site-header/site-header.component.js +3 -3
  306. package/cdn/components/site-header/site-header.js +3 -3
  307. package/cdn/components/site-navigation/site-navigation.component.js +2 -2
  308. package/cdn/components/site-navigation/site-navigation.js +2 -2
  309. package/cdn/components/skeleton/skeleton.component.js +2 -2
  310. package/cdn/components/skeleton/skeleton.js +3 -3
  311. package/cdn/components/slider/slider.component.js +2 -2
  312. package/cdn/components/slider/slider.js +3 -3
  313. package/cdn/components/spatial-picker/spatial-picker.component.js +12 -12
  314. package/cdn/components/spatial-picker/spatial-picker.js +13 -13
  315. package/cdn/components/status-indicator/status-indicator.component.js +2 -2
  316. package/cdn/components/status-indicator/status-indicator.js +3 -3
  317. package/cdn/components/stepper/stepper.component.js +2 -2
  318. package/cdn/components/stepper/stepper.js +3 -3
  319. package/cdn/components/stepper-step/stepper-step.component.js +3 -3
  320. package/cdn/components/stepper-step/stepper-step.js +4 -4
  321. package/cdn/components/tab/tab.component.js +3 -3
  322. package/cdn/components/tab/tab.js +4 -4
  323. package/cdn/components/tab-panel/tab-panel.component.js +2 -2
  324. package/cdn/components/tab-panel/tab-panel.js +3 -3
  325. package/cdn/components/tabs/tabs.component.js +3 -3
  326. package/cdn/components/tabs/tabs.js +4 -4
  327. package/cdn/components/tag/tag.component.js +3 -3
  328. package/cdn/components/tag/tag.js +4 -4
  329. package/cdn/components/textarea/textarea.component.js +2 -2
  330. package/cdn/components/textarea/textarea.js +3 -3
  331. package/cdn/components/time-average-map/time-average-map-cache.service.js +2 -3
  332. package/cdn/components/time-average-map/time-average-map.component.d.ts +10 -0
  333. package/cdn/components/time-average-map/time-average-map.component.js +26 -25
  334. package/cdn/components/time-average-map/time-average-map.controller.js +7 -6
  335. package/cdn/components/time-average-map/time-average-map.js +27 -26
  336. package/cdn/components/time-series/time-series-cache.service.js +2 -3
  337. package/cdn/components/time-series/time-series.component.d.ts +4 -0
  338. package/cdn/components/time-series/time-series.component.js +27 -26
  339. package/cdn/components/time-series/time-series.controller.js +8 -6
  340. package/cdn/components/time-series/time-series.js +28 -27
  341. package/cdn/components/toast/toast.component.js +3 -3
  342. package/cdn/components/toast/toast.js +4 -4
  343. package/cdn/components/toggle/toggle.component.js +2 -2
  344. package/cdn/components/toggle/toggle.js +3 -3
  345. package/cdn/components/tooltip/tooltip.component.d.ts +5 -0
  346. package/cdn/components/tooltip/tooltip.component.js +4 -4
  347. package/cdn/components/tooltip/tooltip.js +5 -5
  348. package/cdn/components/tooltip/tooltip.styles.js +1 -1
  349. package/cdn/components/variable-combobox/variable-combobox.component.js +6 -6
  350. package/cdn/components/variable-combobox/variable-combobox.js +7 -7
  351. package/cdn/components/variable-keyword-search/variable-keyword-search.component.js +7 -7
  352. package/cdn/components/variable-keyword-search/variable-keyword-search.js +8 -8
  353. package/cdn/custom-elements.json +461 -1
  354. package/cdn/data-services/types.d.ts +2 -0
  355. package/cdn/events/events.d.ts +2 -0
  356. package/cdn/events/terra-harmony-job-delete.d.ts +8 -0
  357. package/cdn/events/terra-harmony-job-select.d.ts +9 -0
  358. package/cdn/internal/indexeddb.d.ts +2 -1
  359. package/cdn/lib/api.client.d.ts +1 -1
  360. package/cdn/lib/harmony/harmony.request.d.ts +23 -1
  361. package/cdn/lib/thumbnails/thumbnail.service.d.ts +14 -0
  362. package/cdn/queries/harmony.queries.d.ts +28 -0
  363. package/cdn/react/accordion/index.js +4 -4
  364. package/cdn/react/alert/index.js +3 -3
  365. package/cdn/react/avatar/index.js +4 -4
  366. package/cdn/react/badge/index.js +3 -3
  367. package/cdn/react/breadcrumb/index.js +3 -3
  368. package/cdn/react/breadcrumbs/index.js +3 -3
  369. package/cdn/react/browse-variables/index.js +12 -12
  370. package/cdn/react/button/index.js +4 -4
  371. package/cdn/react/button-group/index.js +3 -3
  372. package/cdn/react/caption/index.js +3 -3
  373. package/cdn/react/card/index.js +3 -3
  374. package/cdn/react/checkbox/index.js +4 -4
  375. package/cdn/react/chip/index.js +3 -3
  376. package/cdn/react/combobox/index.js +3 -3
  377. package/cdn/react/data-access/index.js +27 -26
  378. package/cdn/react/data-grid/index.js +4 -4
  379. package/cdn/react/data-rods/index.js +37 -36
  380. package/cdn/react/data-subsetter/index.js +37 -35
  381. package/cdn/react/data-subsetter-history/index.js +38 -36
  382. package/cdn/react/date-picker/index.js +8 -8
  383. package/cdn/react/date-range-slider/index.js +3 -3
  384. package/cdn/react/dialog/index.js +5 -5
  385. package/cdn/react/divider/index.js +3 -3
  386. package/cdn/react/dropdown/index.js +4 -4
  387. package/cdn/react/earthdata-login/index.js +11 -11
  388. package/cdn/react/file-upload/index.js +3 -3
  389. package/cdn/react/harmony-history/index.d.ts +30 -0
  390. package/cdn/react/harmony-history/index.js +44 -0
  391. package/cdn/react/icon/index.js +3 -3
  392. package/cdn/react/index.d.ts +1 -0
  393. package/cdn/react/index.js +207 -200
  394. package/cdn/react/input/index.js +4 -4
  395. package/cdn/react/loader/index.js +3 -3
  396. package/cdn/react/login/index.js +9 -9
  397. package/cdn/react/map/index.js +8 -8
  398. package/cdn/react/menu/index.js +3 -3
  399. package/cdn/react/menu-item/index.js +6 -6
  400. package/cdn/react/option/index.js +4 -4
  401. package/cdn/react/pagination/index.js +4 -4
  402. package/cdn/react/plot/index.js +4 -4
  403. package/cdn/react/plot-toolbar/index.js +15 -16
  404. package/cdn/react/popup/index.js +3 -3
  405. package/cdn/react/progress-bar/index.js +3 -3
  406. package/cdn/react/radio/index.js +3 -3
  407. package/cdn/react/radio-group/index.js +3 -3
  408. package/cdn/react/scroll-hint/index.js +4 -4
  409. package/cdn/react/select/index.js +6 -6
  410. package/cdn/react/site-header/index.js +4 -4
  411. package/cdn/react/site-navigation/index.js +3 -3
  412. package/cdn/react/skeleton/index.js +3 -3
  413. package/cdn/react/slider/index.js +3 -3
  414. package/cdn/react/spatial-picker/index.js +13 -13
  415. package/cdn/react/status-indicator/index.js +3 -3
  416. package/cdn/react/stepper/index.js +3 -3
  417. package/cdn/react/stepper-step/index.js +4 -4
  418. package/cdn/react/tab/index.js +4 -4
  419. package/cdn/react/tab-panel/index.js +3 -3
  420. package/cdn/react/tabs/index.js +4 -4
  421. package/cdn/react/tag/index.js +4 -4
  422. package/cdn/react/textarea/index.js +3 -3
  423. package/cdn/react/time-average-map/index.js +27 -26
  424. package/cdn/react/time-series/index.js +28 -27
  425. package/cdn/react/toast/index.js +4 -4
  426. package/cdn/react/toggle/index.js +3 -3
  427. package/cdn/react/tooltip/index.js +5 -5
  428. package/cdn/react/variable-combobox/index.js +7 -7
  429. package/cdn/react/variable-keyword-search/index.js +8 -8
  430. package/cdn/terra-ui-components.d.ts +1 -0
  431. package/cdn/terra-ui-components.js +178 -171
  432. package/cdn/types/vue/index.d.ts +56 -0
  433. package/cdn/vscode.html-custom-data.json +38 -3
  434. package/cdn/web-types.json +99 -3
  435. package/dist/apis/harmony.api.d.ts +24 -1
  436. package/dist/chunks/chunk.244CTE3T.js +1 -0
  437. package/dist/chunks/chunk.27Y756GG.js +1 -0
  438. package/dist/chunks/chunk.2BHAYNPS.js +33 -0
  439. package/dist/chunks/chunk.2C5SN5KH.js +74 -0
  440. package/dist/chunks/chunk.2ENSAFQB.js +1 -0
  441. package/dist/chunks/chunk.2FKZOYDM.js +170 -0
  442. package/dist/chunks/chunk.2IEYXOYV.js +1 -0
  443. package/dist/chunks/chunk.2MLS3BXA.js +1 -0
  444. package/dist/chunks/chunk.2OO26QIR.js +126 -0
  445. package/dist/chunks/chunk.2P4DDFRQ.js +1 -0
  446. package/dist/chunks/chunk.2UQEJRIQ.js +1 -0
  447. package/dist/chunks/chunk.2UZ2VECA.js +1 -0
  448. package/dist/chunks/chunk.36AZ2XCI.js +1 -0
  449. package/dist/chunks/chunk.37QTJ25S.js +1 -0
  450. package/dist/chunks/chunk.3B4QPUAN.js +1 -0
  451. package/dist/chunks/chunk.3DFIUNAQ.js +1 -0
  452. package/dist/chunks/chunk.3IDBLCMG.js +1 -0
  453. package/dist/chunks/chunk.3MBQYZVW.js +1 -0
  454. package/dist/chunks/chunk.3MIQ6XNR.js +1 -0
  455. package/dist/chunks/chunk.3VXALYKM.js +1 -0
  456. package/dist/chunks/chunk.423GIWLL.js +1 -0
  457. package/dist/chunks/chunk.4CN24QEJ.js +20 -0
  458. package/dist/chunks/chunk.4E4ZURVB.js +1 -0
  459. package/dist/chunks/chunk.4EMIESAS.js +1 -0
  460. package/dist/chunks/chunk.4SHUUZJ2.js +1 -0
  461. package/dist/chunks/chunk.4SOONPCJ.js +1 -0
  462. package/dist/chunks/chunk.53R5NBAZ.js +1 -0
  463. package/dist/chunks/chunk.55RZU5QQ.js +5 -0
  464. package/dist/chunks/chunk.5BVXDE6L.js +1 -0
  465. package/dist/chunks/chunk.5CBU7CVX.js +35 -0
  466. package/dist/chunks/chunk.5DPPXATR.js +1 -0
  467. package/dist/chunks/chunk.5FHR3PRK.js +1 -0
  468. package/dist/chunks/chunk.5JBQBY62.js +39 -0
  469. package/dist/chunks/chunk.5MBY6WKW.js +1 -0
  470. package/dist/chunks/chunk.5QVSLO3V.js +280 -0
  471. package/dist/chunks/chunk.5SB77RHW.js +1 -0
  472. package/dist/chunks/chunk.5T6SIPN2.js +1 -0
  473. package/dist/chunks/chunk.5YXQRHD5.js +1 -0
  474. package/dist/chunks/chunk.64Q7BMHI.js +1 -0
  475. package/dist/chunks/chunk.64Z5WQSA.js +1 -0
  476. package/dist/chunks/chunk.6GKKK7NJ.js +1 -0
  477. package/dist/chunks/chunk.6UKNMXZJ.js +1 -0
  478. package/dist/chunks/chunk.6XF647QW.js +1 -0
  479. package/dist/chunks/chunk.76DTOJU7.js +16 -0
  480. package/dist/chunks/chunk.76G4XANJ.js +1 -0
  481. package/dist/chunks/chunk.7I5677S3.js +154 -0
  482. package/dist/chunks/chunk.7MBGEUE4.js +1 -0
  483. package/dist/chunks/chunk.7RCZODIH.js +1 -0
  484. package/dist/chunks/chunk.A26JWAE2.js +1 -0
  485. package/dist/chunks/chunk.AAY4R5IR.js +11 -0
  486. package/dist/chunks/chunk.ACHFH4Q5.js +1 -0
  487. package/dist/chunks/chunk.AP6WOLOM.js +1 -0
  488. package/dist/chunks/chunk.AQ25ZIGD.js +1 -0
  489. package/dist/chunks/chunk.ARVXHRR4.js +1 -0
  490. package/dist/chunks/chunk.B5J6EQBL.js +1 -0
  491. package/dist/chunks/chunk.BARYZDDP.js +1 -0
  492. package/dist/chunks/chunk.BCYULSBS.js +19 -0
  493. package/dist/chunks/chunk.BF6REXY3.js +1 -0
  494. package/dist/chunks/chunk.BNV4KROE.js +1 -0
  495. package/dist/chunks/chunk.BPWHAHIU.js +1 -0
  496. package/dist/chunks/chunk.BQ7I5O2H.js +62 -0
  497. package/dist/chunks/chunk.BWAKPSV4.js +38 -0
  498. package/dist/chunks/chunk.C2Z2P4HZ.js +1 -0
  499. package/dist/chunks/chunk.C7QR4SPF.js +1 -0
  500. package/dist/chunks/chunk.CL3UPHCV.js +145 -0
  501. package/dist/chunks/chunk.CQXIUSH7.js +1 -0
  502. package/dist/chunks/chunk.CZZ63EKR.js +1 -0
  503. package/dist/chunks/chunk.DMPAY35P.js +115 -0
  504. package/dist/chunks/chunk.E47M7NVI.js +55 -0
  505. package/dist/chunks/chunk.E6LODOVJ.js +65 -0
  506. package/dist/chunks/chunk.EDADTX5Q.js +1 -0
  507. package/dist/chunks/chunk.EDBJ4VFC.js +1 -0
  508. package/dist/chunks/chunk.EJOLVPRS.js +1 -0
  509. package/dist/chunks/chunk.EKDZB5S2.js +1 -0
  510. package/dist/chunks/chunk.ELUBODMC.js +12 -0
  511. package/dist/chunks/chunk.ETE4SEGE.js +1 -0
  512. package/dist/chunks/chunk.EZI7VJCI.js +1 -0
  513. package/dist/chunks/chunk.FB2U5ODR.js +1 -0
  514. package/dist/chunks/chunk.FEZWYWLM.js +1 -0
  515. package/dist/chunks/chunk.FM53AQRR.js +5 -0
  516. package/dist/chunks/chunk.FNBTJL76.js +55 -0
  517. package/dist/chunks/chunk.FSSL6ZLQ.js +35 -0
  518. package/dist/chunks/chunk.G6R7GCGB.js +1 -0
  519. package/dist/chunks/chunk.GPI7PCGX.js +1 -0
  520. package/dist/chunks/chunk.GQIIFJUH.js +1 -0
  521. package/dist/chunks/chunk.HBIKGPFF.js +1 -0
  522. package/dist/chunks/chunk.HOADB2CO.js +67 -0
  523. package/dist/chunks/chunk.HUZMK2VQ.js +1 -0
  524. package/dist/chunks/chunk.HZRKVYQY.js +1 -0
  525. package/dist/chunks/chunk.I5P6RFB4.js +1 -0
  526. package/dist/chunks/chunk.IWYCR2FE.js +1 -0
  527. package/dist/chunks/chunk.IWZF7C67.js +1 -0
  528. package/dist/chunks/chunk.J5THC22T.js +1 -0
  529. package/dist/chunks/chunk.JB4B7N5B.js +1 -0
  530. package/dist/chunks/chunk.JIPQ7AV4.js +1 -0
  531. package/dist/chunks/chunk.JLC7KOHX.js +1 -0
  532. package/dist/chunks/chunk.JLS55DD4.js +121 -0
  533. package/dist/chunks/chunk.JOGU5BJB.js +1 -0
  534. package/dist/chunks/chunk.JRVMPEDZ.js +1 -0
  535. package/dist/chunks/chunk.JZSTMBRE.js +55 -0
  536. package/dist/chunks/chunk.K3PIEJHK.js +23 -0
  537. package/dist/chunks/chunk.KAF7DE46.js +1 -0
  538. package/dist/chunks/chunk.KBH7XUJ2.js +1 -0
  539. package/dist/chunks/chunk.KWCBIL2K.js +11 -0
  540. package/dist/chunks/chunk.L5XSUU23.js +9 -0
  541. package/dist/chunks/chunk.LBG47EHU.js +80 -0
  542. package/dist/chunks/chunk.LC4ZSYI5.js +9 -0
  543. package/dist/chunks/chunk.LHGSX2EB.js +1 -0
  544. package/dist/chunks/chunk.LHSPDFX4.js +1 -0
  545. package/dist/chunks/chunk.LVPW3I5Y.js +1 -0
  546. package/dist/chunks/chunk.LXRYB5BK.js +1 -0
  547. package/dist/chunks/chunk.M7AHS3AH.js +1 -0
  548. package/dist/chunks/chunk.MJVP52R5.js +43 -0
  549. package/dist/chunks/chunk.MKVYWZTL.js +99 -0
  550. package/dist/chunks/chunk.MU3VKJWB.js +1 -0
  551. package/dist/chunks/chunk.MXOPVRH6.js +1 -0
  552. package/dist/chunks/chunk.N3AEF5KW.js +1 -0
  553. package/dist/chunks/chunk.NFM5IDJR.js +24 -0
  554. package/dist/chunks/chunk.NI5IMMU6.js +1 -0
  555. package/dist/chunks/chunk.NJTQ2K6F.js +48 -0
  556. package/dist/chunks/chunk.NORSDIMU.js +8 -0
  557. package/dist/chunks/chunk.NSHMVB5U.js +1 -0
  558. package/dist/chunks/chunk.NZ2EQTLJ.js +1 -0
  559. package/dist/chunks/chunk.NZRBH2FO.js +1 -0
  560. package/dist/chunks/chunk.NZW4RZY3.js +1 -0
  561. package/dist/chunks/chunk.O2HBLJZB.js +1 -0
  562. package/dist/chunks/chunk.O3JBMOQJ.js +749 -0
  563. package/dist/chunks/chunk.O7IVXZBJ.js +1 -0
  564. package/dist/chunks/chunk.OAYJFXJ7.js +37 -0
  565. package/dist/chunks/chunk.OBKNMV5D.js +1 -0
  566. package/dist/chunks/chunk.ODZ5RFHN.js +25 -0
  567. package/dist/chunks/chunk.OGQJH54I.js +1 -0
  568. package/dist/chunks/chunk.OILCN37O.js +299 -0
  569. package/dist/chunks/chunk.OWXXS6QM.js +100 -0
  570. package/dist/chunks/chunk.PABCKGCM.js +140 -0
  571. package/dist/chunks/chunk.PAEUAUNV.js +8 -0
  572. package/dist/chunks/chunk.PBRI7B7A.js +20 -0
  573. package/dist/chunks/chunk.PDXLX5LB.js +22 -0
  574. package/dist/chunks/chunk.PM4ZLX54.js +1 -0
  575. package/dist/chunks/chunk.PNFIHG3Z.js +1 -0
  576. package/dist/chunks/chunk.QBZ3RHNB.js +49 -0
  577. package/dist/chunks/chunk.QC2EZC4J.js +101 -0
  578. package/dist/chunks/chunk.QMLZIOGK.js +1 -0
  579. package/dist/chunks/chunk.QQO5GUXS.js +1 -0
  580. package/dist/chunks/chunk.QUPFWO2W.js +1 -0
  581. package/dist/chunks/chunk.QXFOLPTE.js +157 -0
  582. package/dist/chunks/chunk.QZB7YAW4.js +1 -0
  583. package/dist/chunks/chunk.RBE5AOEF.js +2 -0
  584. package/dist/chunks/chunk.RIHKWEWK.js +1 -0
  585. package/dist/chunks/chunk.RJSNPXT4.js +1 -0
  586. package/dist/chunks/chunk.RM5PZL2E.js +1 -0
  587. package/dist/chunks/chunk.RTZZX2UG.js +30 -0
  588. package/dist/chunks/chunk.RYXFAYSI.js +1 -0
  589. package/dist/chunks/chunk.S3WSRAXA.js +1 -0
  590. package/dist/chunks/chunk.SAYRRMRN.js +1 -0
  591. package/dist/chunks/chunk.SDEKZ7EH.js +1 -0
  592. package/dist/chunks/chunk.SJ7SUN6N.js +1 -0
  593. package/dist/chunks/chunk.SJW4CYVO.js +1 -0
  594. package/dist/chunks/chunk.SLEOS424.js +1 -0
  595. package/dist/chunks/chunk.T6M2XKVT.js +1 -0
  596. package/dist/chunks/chunk.TOHRQWOJ.js +43 -0
  597. package/dist/chunks/chunk.TQUTGUIU.js +1 -0
  598. package/dist/chunks/chunk.TTVYXNEX.js +1 -0
  599. package/dist/chunks/chunk.TZPFDI45.js +1 -0
  600. package/dist/chunks/chunk.U2FNXZ4T.js +1157 -0
  601. package/dist/chunks/chunk.U2GOK43S.js +14 -0
  602. package/dist/chunks/chunk.U2S27E26.js +1 -0
  603. package/dist/chunks/chunk.UEJTWT4H.js +1 -0
  604. package/dist/chunks/chunk.UHWXDO2X.js +1 -0
  605. package/dist/chunks/chunk.UIJRLYJ5.js +300 -0
  606. package/dist/chunks/chunk.UIKMEY7L.js +1 -0
  607. package/dist/chunks/chunk.UOPZ7IQO.js +1 -0
  608. package/dist/chunks/chunk.UQXFJXT2.js +566 -0
  609. package/dist/chunks/chunk.USZXOQ5W.js +1 -0
  610. package/dist/chunks/chunk.UYGW5SAC.js +37 -0
  611. package/dist/chunks/chunk.UZ4RSTT6.js +64 -0
  612. package/dist/chunks/chunk.V6OBKZEU.js +1 -0
  613. package/dist/chunks/chunk.V6ZDTBMM.js +1 -0
  614. package/dist/chunks/chunk.VBIWDPIC.js +6 -0
  615. package/dist/chunks/chunk.VZTQF4OE.js +1 -0
  616. package/dist/chunks/chunk.W753QEWS.js +122 -0
  617. package/dist/chunks/chunk.W7RCZIAS.js +30 -0
  618. package/dist/chunks/chunk.WGADCB3O.js +4 -0
  619. package/dist/chunks/chunk.WGYVWH4N.js +1 -0
  620. package/dist/chunks/chunk.WKLFO4CV.js +1 -0
  621. package/dist/chunks/chunk.WPYM7UE2.js +75 -0
  622. package/dist/chunks/chunk.WR22TB5Y.js +106 -0
  623. package/dist/chunks/chunk.WT6GZVYY.js +1 -0
  624. package/dist/chunks/chunk.X6YUDBBQ.js +1 -0
  625. package/dist/chunks/chunk.XIJIRCHU.js +1 -0
  626. package/dist/chunks/chunk.Y5KEEPVM.js +1 -0
  627. package/dist/chunks/chunk.YE2XHS7U.js +1 -0
  628. package/dist/chunks/chunk.YID2VH6X.js +17 -0
  629. package/dist/chunks/chunk.YQG4O6JG.js +1 -0
  630. package/dist/chunks/chunk.YS7ZNM77.js +1 -0
  631. package/dist/chunks/chunk.YSJ2VJE5.js +1 -0
  632. package/dist/chunks/chunk.YVP42OKY.js +26 -0
  633. package/dist/chunks/chunk.Z25SA46F.js +1 -0
  634. package/dist/chunks/chunk.ZDHEJXMO.js +1 -0
  635. package/dist/chunks/chunk.ZEIMRQG5.js +1 -0
  636. package/dist/chunks/chunk.ZF3CXW3V.js +1 -0
  637. package/dist/chunks/chunk.ZFIDO76G.js +1 -0
  638. package/dist/chunks/chunk.ZHOOI52R.js +1 -0
  639. package/dist/chunks/chunk.ZIOKLPTQ.js +47 -0
  640. package/dist/chunks/chunk.ZS3U4XEF.js +26 -0
  641. package/dist/chunks/chunk.ZTYZ7EWT.js +1 -0
  642. package/dist/components/accordion/accordion.component.js +1 -1
  643. package/dist/components/accordion/accordion.js +1 -1
  644. package/dist/components/alert/alert.component.js +1 -1
  645. package/dist/components/alert/alert.js +1 -1
  646. package/dist/components/avatar/avatar.component.js +1 -1
  647. package/dist/components/avatar/avatar.js +1 -1
  648. package/dist/components/badge/badge.component.js +1 -1
  649. package/dist/components/badge/badge.js +1 -1
  650. package/dist/components/breadcrumb/breadcrumb.component.js +1 -1
  651. package/dist/components/breadcrumb/breadcrumb.js +1 -1
  652. package/dist/components/breadcrumbs/breadcrumbs.component.js +1 -1
  653. package/dist/components/breadcrumbs/breadcrumbs.js +1 -1
  654. package/dist/components/browse-variables/browse-variables.component.js +1 -1
  655. package/dist/components/browse-variables/browse-variables.js +1 -1
  656. package/dist/components/button/button.component.js +1 -1
  657. package/dist/components/button/button.js +1 -1
  658. package/dist/components/button-group/button-group.component.js +1 -1
  659. package/dist/components/button-group/button-group.js +1 -1
  660. package/dist/components/caption/caption.component.js +1 -1
  661. package/dist/components/caption/caption.js +1 -1
  662. package/dist/components/card/card.component.js +1 -1
  663. package/dist/components/card/card.js +1 -1
  664. package/dist/components/checkbox/checkbox.component.js +1 -1
  665. package/dist/components/checkbox/checkbox.js +1 -1
  666. package/dist/components/chip/chip.component.js +1 -1
  667. package/dist/components/chip/chip.js +1 -1
  668. package/dist/components/combobox/combobox.component.js +1 -1
  669. package/dist/components/combobox/combobox.js +1 -1
  670. package/dist/components/data-access/data-access.component.js +1 -1
  671. package/dist/components/data-access/data-access.js +1 -1
  672. package/dist/components/data-grid/data-grid.component.js +1 -1
  673. package/dist/components/data-grid/data-grid.js +1 -1
  674. package/dist/components/data-rods/data-rods.component.js +1 -1
  675. package/dist/components/data-rods/data-rods.js +1 -1
  676. package/dist/components/data-subsetter/data-subsetter.component.js +1 -1
  677. package/dist/components/data-subsetter/data-subsetter.js +1 -1
  678. package/dist/components/data-subsetter/notebooks/subsetter-notebook.js +1 -1
  679. package/dist/components/data-subsetter-history/data-subsetter-history.component.js +1 -1
  680. package/dist/components/data-subsetter-history/data-subsetter-history.js +1 -1
  681. package/dist/components/date-picker/date-picker.component.js +1 -1
  682. package/dist/components/date-picker/date-picker.js +1 -1
  683. package/dist/components/date-range-slider/date-range-slider.component.js +1 -1
  684. package/dist/components/date-range-slider/date-range-slider.js +1 -1
  685. package/dist/components/dialog/dialog.component.js +1 -1
  686. package/dist/components/dialog/dialog.js +1 -1
  687. package/dist/components/divider/divider.component.js +1 -1
  688. package/dist/components/divider/divider.js +1 -1
  689. package/dist/components/dropdown/dropdown.component.js +1 -1
  690. package/dist/components/dropdown/dropdown.js +1 -1
  691. package/dist/components/earthdata-login/earthdata-login.component.js +1 -1
  692. package/dist/components/earthdata-login/earthdata-login.js +1 -1
  693. package/dist/components/file-upload/file-upload.component.js +1 -1
  694. package/dist/components/file-upload/file-upload.js +1 -1
  695. package/dist/components/harmony-history/harmony-history.component.d.ts +91 -0
  696. package/dist/components/harmony-history/harmony-history.component.js +1 -0
  697. package/dist/components/harmony-history/harmony-history.d.ts +8 -0
  698. package/dist/components/harmony-history/harmony-history.js +1 -0
  699. package/dist/components/harmony-history/harmony-history.styles.d.ts +2 -0
  700. package/dist/components/harmony-history/harmony-history.styles.js +1 -0
  701. package/dist/components/icon/icon.component.js +1 -1
  702. package/dist/components/icon/icon.js +1 -1
  703. package/dist/components/input/input.component.js +1 -1
  704. package/dist/components/input/input.js +1 -1
  705. package/dist/components/loader/loader.component.js +1 -1
  706. package/dist/components/loader/loader.js +1 -1
  707. package/dist/components/login/login.component.js +1 -1
  708. package/dist/components/login/login.js +1 -1
  709. package/dist/components/map/map.component.js +1 -1
  710. package/dist/components/map/map.js +1 -1
  711. package/dist/components/map/map.service.js +1 -1
  712. package/dist/components/menu/menu.component.js +1 -1
  713. package/dist/components/menu/menu.js +1 -1
  714. package/dist/components/menu-item/menu-item.component.js +1 -1
  715. package/dist/components/menu-item/menu-item.js +1 -1
  716. package/dist/components/option/option.component.js +1 -1
  717. package/dist/components/option/option.js +1 -1
  718. package/dist/components/pagination/pagination.component.js +1 -1
  719. package/dist/components/pagination/pagination.js +1 -1
  720. package/dist/components/plot/plot.component.js +1 -1
  721. package/dist/components/plot/plot.js +1 -1
  722. package/dist/components/plot-toolbar/notebooks/time-averaged-map-notebook.js +1 -1
  723. package/dist/components/plot-toolbar/notebooks/time-series-notebook.js +1 -1
  724. package/dist/components/plot-toolbar/plot-toolbar.component.js +1 -1
  725. package/dist/components/plot-toolbar/plot-toolbar.js +1 -1
  726. package/dist/components/popup/popup.component.js +1 -1
  727. package/dist/components/popup/popup.js +1 -1
  728. package/dist/components/progress-bar/progress-bar.component.js +1 -1
  729. package/dist/components/progress-bar/progress-bar.js +1 -1
  730. package/dist/components/radio/radio.component.js +1 -1
  731. package/dist/components/radio/radio.js +1 -1
  732. package/dist/components/radio-group/radio-group.component.js +1 -1
  733. package/dist/components/radio-group/radio-group.js +1 -1
  734. package/dist/components/scroll-hint/scroll-hint.component.js +1 -1
  735. package/dist/components/scroll-hint/scroll-hint.js +1 -1
  736. package/dist/components/select/select.component.js +1 -1
  737. package/dist/components/select/select.js +1 -1
  738. package/dist/components/site-header/site-header.component.js +1 -1
  739. package/dist/components/site-header/site-header.js +1 -1
  740. package/dist/components/site-navigation/site-navigation.component.js +1 -1
  741. package/dist/components/site-navigation/site-navigation.js +1 -1
  742. package/dist/components/skeleton/skeleton.component.js +1 -1
  743. package/dist/components/skeleton/skeleton.js +1 -1
  744. package/dist/components/slider/slider.component.js +1 -1
  745. package/dist/components/slider/slider.js +1 -1
  746. package/dist/components/spatial-picker/spatial-picker.component.js +1 -1
  747. package/dist/components/spatial-picker/spatial-picker.js +1 -1
  748. package/dist/components/status-indicator/status-indicator.component.js +1 -1
  749. package/dist/components/status-indicator/status-indicator.js +1 -1
  750. package/dist/components/stepper/stepper.component.js +1 -1
  751. package/dist/components/stepper/stepper.js +1 -1
  752. package/dist/components/stepper-step/stepper-step.component.js +1 -1
  753. package/dist/components/stepper-step/stepper-step.js +1 -1
  754. package/dist/components/tab/tab.component.js +1 -1
  755. package/dist/components/tab/tab.js +1 -1
  756. package/dist/components/tab-panel/tab-panel.component.js +1 -1
  757. package/dist/components/tab-panel/tab-panel.js +1 -1
  758. package/dist/components/tabs/tabs.component.js +1 -1
  759. package/dist/components/tabs/tabs.js +1 -1
  760. package/dist/components/tag/tag.component.js +1 -1
  761. package/dist/components/tag/tag.js +1 -1
  762. package/dist/components/textarea/textarea.component.js +1 -1
  763. package/dist/components/textarea/textarea.js +1 -1
  764. package/dist/components/time-average-map/time-average-map-cache.service.js +1 -1
  765. package/dist/components/time-average-map/time-average-map.component.d.ts +10 -0
  766. package/dist/components/time-average-map/time-average-map.component.js +1 -1
  767. package/dist/components/time-average-map/time-average-map.controller.js +1 -1
  768. package/dist/components/time-average-map/time-average-map.js +1 -1
  769. package/dist/components/time-series/time-series-cache.service.js +1 -1
  770. package/dist/components/time-series/time-series.component.d.ts +4 -0
  771. package/dist/components/time-series/time-series.component.js +1 -1
  772. package/dist/components/time-series/time-series.controller.js +1 -1
  773. package/dist/components/time-series/time-series.js +1 -1
  774. package/dist/components/toast/toast.component.js +1 -1
  775. package/dist/components/toast/toast.js +1 -1
  776. package/dist/components/toggle/toggle.component.js +1 -1
  777. package/dist/components/toggle/toggle.js +1 -1
  778. package/dist/components/tooltip/tooltip.component.d.ts +5 -0
  779. package/dist/components/tooltip/tooltip.component.js +1 -1
  780. package/dist/components/tooltip/tooltip.js +1 -1
  781. package/dist/components/tooltip/tooltip.styles.js +1 -1
  782. package/dist/components/variable-combobox/variable-combobox.component.js +1 -1
  783. package/dist/components/variable-combobox/variable-combobox.js +1 -1
  784. package/dist/components/variable-keyword-search/variable-keyword-search.component.js +1 -1
  785. package/dist/components/variable-keyword-search/variable-keyword-search.js +1 -1
  786. package/dist/custom-elements.json +461 -1
  787. package/dist/data-services/types.d.ts +2 -0
  788. package/dist/events/events.d.ts +2 -0
  789. package/dist/events/terra-harmony-job-delete.d.ts +8 -0
  790. package/dist/events/terra-harmony-job-select.d.ts +9 -0
  791. package/dist/internal/indexeddb.d.ts +2 -1
  792. package/dist/lib/api.client.d.ts +1 -1
  793. package/dist/lib/harmony/harmony.request.d.ts +23 -1
  794. package/dist/lib/thumbnails/thumbnail.service.d.ts +14 -0
  795. package/dist/queries/harmony.queries.d.ts +28 -0
  796. package/dist/react/accordion/index.js +1 -1
  797. package/dist/react/alert/index.js +1 -1
  798. package/dist/react/avatar/index.js +1 -1
  799. package/dist/react/badge/index.js +1 -1
  800. package/dist/react/breadcrumb/index.js +1 -1
  801. package/dist/react/breadcrumbs/index.js +1 -1
  802. package/dist/react/browse-variables/index.js +1 -1
  803. package/dist/react/button/index.js +1 -1
  804. package/dist/react/button-group/index.js +1 -1
  805. package/dist/react/caption/index.js +1 -1
  806. package/dist/react/card/index.js +1 -1
  807. package/dist/react/checkbox/index.js +1 -1
  808. package/dist/react/chip/index.js +1 -1
  809. package/dist/react/combobox/index.js +1 -1
  810. package/dist/react/data-access/index.js +1 -1
  811. package/dist/react/data-grid/index.js +1 -1
  812. package/dist/react/data-rods/index.js +1 -1
  813. package/dist/react/data-subsetter/index.js +1 -1
  814. package/dist/react/data-subsetter-history/index.js +1 -1
  815. package/dist/react/date-picker/index.js +1 -1
  816. package/dist/react/date-range-slider/index.js +1 -1
  817. package/dist/react/dialog/index.js +1 -1
  818. package/dist/react/divider/index.js +1 -1
  819. package/dist/react/dropdown/index.js +1 -1
  820. package/dist/react/earthdata-login/index.js +1 -1
  821. package/dist/react/file-upload/index.js +1 -1
  822. package/dist/react/harmony-history/index.d.ts +30 -0
  823. package/dist/react/harmony-history/index.js +1 -0
  824. package/dist/react/icon/index.js +1 -1
  825. package/dist/react/index.d.ts +1 -0
  826. package/dist/react/index.js +1 -1
  827. package/dist/react/input/index.js +1 -1
  828. package/dist/react/loader/index.js +1 -1
  829. package/dist/react/login/index.js +1 -1
  830. package/dist/react/map/index.js +1 -1
  831. package/dist/react/menu/index.js +1 -1
  832. package/dist/react/menu-item/index.js +1 -1
  833. package/dist/react/option/index.js +1 -1
  834. package/dist/react/pagination/index.js +1 -1
  835. package/dist/react/plot/index.js +1 -1
  836. package/dist/react/plot-toolbar/index.js +1 -1
  837. package/dist/react/popup/index.js +1 -1
  838. package/dist/react/progress-bar/index.js +1 -1
  839. package/dist/react/radio/index.js +1 -1
  840. package/dist/react/radio-group/index.js +1 -1
  841. package/dist/react/scroll-hint/index.js +1 -1
  842. package/dist/react/select/index.js +1 -1
  843. package/dist/react/site-header/index.js +1 -1
  844. package/dist/react/site-navigation/index.js +1 -1
  845. package/dist/react/skeleton/index.js +1 -1
  846. package/dist/react/slider/index.js +1 -1
  847. package/dist/react/spatial-picker/index.js +1 -1
  848. package/dist/react/status-indicator/index.js +1 -1
  849. package/dist/react/stepper/index.js +1 -1
  850. package/dist/react/stepper-step/index.js +1 -1
  851. package/dist/react/tab/index.js +1 -1
  852. package/dist/react/tab-panel/index.js +1 -1
  853. package/dist/react/tabs/index.js +1 -1
  854. package/dist/react/tag/index.js +1 -1
  855. package/dist/react/textarea/index.js +1 -1
  856. package/dist/react/time-average-map/index.js +1 -1
  857. package/dist/react/time-series/index.js +1 -1
  858. package/dist/react/toast/index.js +1 -1
  859. package/dist/react/toggle/index.js +1 -1
  860. package/dist/react/tooltip/index.js +1 -1
  861. package/dist/react/variable-combobox/index.js +1 -1
  862. package/dist/react/variable-keyword-search/index.js +1 -1
  863. package/dist/terra-ui-components.d.ts +1 -0
  864. package/dist/terra-ui-components.js +1 -1
  865. package/dist/terra_ui_components-0.0.180-py3-none-any.whl +0 -0
  866. package/dist/terra_ui_components-0.0.180.tar.gz +0 -0
  867. package/dist/types/vue/index.d.ts +56 -0
  868. package/dist/vscode.html-custom-data.json +38 -3
  869. package/dist/web-types.json +99 -3
  870. package/package.json +1 -1
  871. package/cdn/chunks/chunk.26KT257Q.js +0 -19
  872. package/cdn/chunks/chunk.26SCJOJ4.js +0 -74
  873. package/cdn/chunks/chunk.2EHI57XD.js +0 -231
  874. package/cdn/chunks/chunk.2I5KN4RI.js +0 -37
  875. package/cdn/chunks/chunk.2NYR45OC.js +0 -19
  876. package/cdn/chunks/chunk.2PCUEDQZ.js +0 -443
  877. package/cdn/chunks/chunk.2PIJCAHO.js +0 -99
  878. package/cdn/chunks/chunk.2UX56X34.js +0 -113
  879. package/cdn/chunks/chunk.2XHYYHQN.js +0 -275
  880. package/cdn/chunks/chunk.3AKWECBP.js +0 -372
  881. package/cdn/chunks/chunk.3GBETBER.js +0 -123
  882. package/cdn/chunks/chunk.3HV55YDS.js +0 -224
  883. package/cdn/chunks/chunk.3KFZES7Q.js +0 -230
  884. package/cdn/chunks/chunk.3LTFEU5K.js +0 -36
  885. package/cdn/chunks/chunk.3MWEGEU7.js +0 -610
  886. package/cdn/chunks/chunk.3NTDKUSD.js +0 -29
  887. package/cdn/chunks/chunk.3S4XI5MC.js +0 -86
  888. package/cdn/chunks/chunk.43WTY3ZD.js +0 -32
  889. package/cdn/chunks/chunk.45N3DFV4.js +0 -19
  890. package/cdn/chunks/chunk.4HCU45UG.js +0 -29
  891. package/cdn/chunks/chunk.4LFOVYFH.js +0 -99
  892. package/cdn/chunks/chunk.4NTCIMIX.js +0 -2244
  893. package/cdn/chunks/chunk.4OP4GNVW.js +0 -29
  894. package/cdn/chunks/chunk.4VAP3VBN.js +0 -29
  895. package/cdn/chunks/chunk.4YNSLPJC.js +0 -19
  896. package/cdn/chunks/chunk.4ZM4QKER.js +0 -19
  897. package/cdn/chunks/chunk.55427GKA.js +0 -82
  898. package/cdn/chunks/chunk.57IZ2MZ2.js +0 -19
  899. package/cdn/chunks/chunk.5KGLRM37.js +0 -19
  900. package/cdn/chunks/chunk.5LCTOD4H.js +0 -19
  901. package/cdn/chunks/chunk.5OXHAB2B.js +0 -29
  902. package/cdn/chunks/chunk.5PL6BT5L.js +0 -19
  903. package/cdn/chunks/chunk.5PSII5RD.js +0 -19
  904. package/cdn/chunks/chunk.5SVFWLUR.js +0 -32
  905. package/cdn/chunks/chunk.5VKEN4OT.js +0 -19
  906. package/cdn/chunks/chunk.62YQVV2U.js +0 -2545
  907. package/cdn/chunks/chunk.6345KRH3.js +0 -29
  908. package/cdn/chunks/chunk.64LFYQBJ.js +0 -36
  909. package/cdn/chunks/chunk.65JGKMIH.js +0 -33
  910. package/cdn/chunks/chunk.6BANIONF.js +0 -36
  911. package/cdn/chunks/chunk.6BNVBPDD.js +0 -83
  912. package/cdn/chunks/chunk.6FWBBVHU.js +0 -29
  913. package/cdn/chunks/chunk.7CYCPGZL.js +0 -19
  914. package/cdn/chunks/chunk.7DBQXMNS.js +0 -32
  915. package/cdn/chunks/chunk.AFVDFDPT.js +0 -19
  916. package/cdn/chunks/chunk.ANMFYKYT.js +0 -19
  917. package/cdn/chunks/chunk.AO2NP5HV.js +0 -29
  918. package/cdn/chunks/chunk.AZNBVV2E.js +0 -278
  919. package/cdn/chunks/chunk.B5SI6B3Q.js +0 -19
  920. package/cdn/chunks/chunk.B6HZN4GK.js +0 -29
  921. package/cdn/chunks/chunk.BQ2HB43G.js +0 -189
  922. package/cdn/chunks/chunk.BQPGMCWW.js +0 -19
  923. package/cdn/chunks/chunk.BS2LEWWJ.js +0 -19
  924. package/cdn/chunks/chunk.BY2PSOYC.js +0 -29
  925. package/cdn/chunks/chunk.CEYEI6T4.js +0 -19
  926. package/cdn/chunks/chunk.CGEZSHZ5.js +0 -33
  927. package/cdn/chunks/chunk.CK5NGIYK.js +0 -60
  928. package/cdn/chunks/chunk.CLKXRS73.js +0 -19
  929. package/cdn/chunks/chunk.DFGOCWJB.js +0 -32
  930. package/cdn/chunks/chunk.DOBB44OO.js +0 -32
  931. package/cdn/chunks/chunk.DQMBRW4N.js +0 -205
  932. package/cdn/chunks/chunk.DZ7HKQYS.js +0 -19
  933. package/cdn/chunks/chunk.DZK2VH2Q.js +0 -19
  934. package/cdn/chunks/chunk.E46YC4DO.js +0 -190
  935. package/cdn/chunks/chunk.E5WMG3BD.js +0 -19
  936. package/cdn/chunks/chunk.EB3CVSCM.js +0 -41
  937. package/cdn/chunks/chunk.EC5TUHDA.js +0 -56075
  938. package/cdn/chunks/chunk.EFZHNM4Z.js +0 -78
  939. package/cdn/chunks/chunk.EKRKRJLH.js +0 -288
  940. package/cdn/chunks/chunk.EMRMJT4V.js +0 -264
  941. package/cdn/chunks/chunk.EN3OWGOT.js +0 -29
  942. package/cdn/chunks/chunk.ETS22PNR.js +0 -19
  943. package/cdn/chunks/chunk.EVTA6QPK.js +0 -19
  944. package/cdn/chunks/chunk.EWNVVXDC.js +0 -915
  945. package/cdn/chunks/chunk.F5CDI3XH.js +0 -188
  946. package/cdn/chunks/chunk.F65WZTM3.js +0 -524
  947. package/cdn/chunks/chunk.FA7FPDAP.js +0 -33
  948. package/cdn/chunks/chunk.FBQK3I4M.js +0 -251
  949. package/cdn/chunks/chunk.FKX557YD.js +0 -35
  950. package/cdn/chunks/chunk.FP5DQ5TE.js +0 -19
  951. package/cdn/chunks/chunk.FPMFEQWC.js +0 -662
  952. package/cdn/chunks/chunk.FUX5Z5ZH.js +0 -19
  953. package/cdn/chunks/chunk.FVSS56G2.js +0 -904
  954. package/cdn/chunks/chunk.G5R5NCHW.js +0 -29
  955. package/cdn/chunks/chunk.G5WKYWF3.js +0 -1975
  956. package/cdn/chunks/chunk.G7YZNTSI.js +0 -37
  957. package/cdn/chunks/chunk.GB2EHXNN.js +0 -29
  958. package/cdn/chunks/chunk.GDAG7XAY.js +0 -1145
  959. package/cdn/chunks/chunk.GDIHTNEZ.js +0 -19
  960. package/cdn/chunks/chunk.GKNJVUX5.js +0 -32
  961. package/cdn/chunks/chunk.GTYKITY2.js +0 -19
  962. package/cdn/chunks/chunk.GW4OJECU.js +0 -658
  963. package/cdn/chunks/chunk.GXEN7PV7.js +0 -29
  964. package/cdn/chunks/chunk.H7I2MF6Q.js +0 -19
  965. package/cdn/chunks/chunk.HBEYO22S.js +0 -477
  966. package/cdn/chunks/chunk.HBJP5PSR.js +0 -234
  967. package/cdn/chunks/chunk.HGYUVVIH.js +0 -19
  968. package/cdn/chunks/chunk.HHAXDGNT.js +0 -793
  969. package/cdn/chunks/chunk.HWHP3UHO.js +0 -35
  970. package/cdn/chunks/chunk.I64EAKC3.js +0 -68
  971. package/cdn/chunks/chunk.IUIDKVNA.js +0 -19
  972. package/cdn/chunks/chunk.J3OF4YDA.js +0 -19
  973. package/cdn/chunks/chunk.JEKJT3MY.js +0 -71
  974. package/cdn/chunks/chunk.JR5DAYAS.js +0 -19
  975. package/cdn/chunks/chunk.JRVFANJK.js +0 -47
  976. package/cdn/chunks/chunk.JXELTFHA.js +0 -29
  977. package/cdn/chunks/chunk.JYMWEWPJ.js +0 -19
  978. package/cdn/chunks/chunk.K2ACV56W.js +0 -32
  979. package/cdn/chunks/chunk.K44OFKQS.js +0 -32
  980. package/cdn/chunks/chunk.K4OQYYXM.js +0 -29
  981. package/cdn/chunks/chunk.KAUIQBTO.js +0 -359
  982. package/cdn/chunks/chunk.KFCGIILI.js +0 -151
  983. package/cdn/chunks/chunk.KOAN3QWI.js +0 -19
  984. package/cdn/chunks/chunk.KVFJQNWO.js +0 -35
  985. package/cdn/chunks/chunk.KY4QC2V2.js +0 -62
  986. package/cdn/chunks/chunk.KYZTZY5T.js +0 -32
  987. package/cdn/chunks/chunk.L5A336NA.js +0 -302
  988. package/cdn/chunks/chunk.L73LVHAO.js +0 -29
  989. package/cdn/chunks/chunk.LLAJXXYS.js +0 -29
  990. package/cdn/chunks/chunk.LS2IEWTZ.js +0 -36
  991. package/cdn/chunks/chunk.LYJWWGV5.js +0 -19
  992. package/cdn/chunks/chunk.MB2V6COB.js +0 -514
  993. package/cdn/chunks/chunk.MKM7UBWD.js +0 -19
  994. package/cdn/chunks/chunk.N445KZFN.js +0 -19
  995. package/cdn/chunks/chunk.N6S4QWLI.js +0 -19
  996. package/cdn/chunks/chunk.NAGHFEYY.js +0 -32
  997. package/cdn/chunks/chunk.NCADSUWB.js +0 -19
  998. package/cdn/chunks/chunk.NCQOAE3M.js +0 -19
  999. package/cdn/chunks/chunk.NO4RDEJF.js +0 -92
  1000. package/cdn/chunks/chunk.NPNAGT7B.js +0 -19
  1001. package/cdn/chunks/chunk.NQXDDIXR.js +0 -32
  1002. package/cdn/chunks/chunk.NSBA63MB.js +0 -29
  1003. package/cdn/chunks/chunk.NWIN2OV5.js +0 -329
  1004. package/cdn/chunks/chunk.NWMT6TEO.js +0 -237
  1005. package/cdn/chunks/chunk.NWOUTLRN.js +0 -19
  1006. package/cdn/chunks/chunk.NZXJUHZX.js +0 -293
  1007. package/cdn/chunks/chunk.O6VWUDUR.js +0 -165
  1008. package/cdn/chunks/chunk.ODOR7YRI.js +0 -9744
  1009. package/cdn/chunks/chunk.OHLZOOZU.js +0 -3798
  1010. package/cdn/chunks/chunk.OIJZAJWN.js +0 -357
  1011. package/cdn/chunks/chunk.OXBDJPHT.js +0 -161
  1012. package/cdn/chunks/chunk.OXZDJYTP.js +0 -538
  1013. package/cdn/chunks/chunk.P7H34OO5.js +0 -32
  1014. package/cdn/chunks/chunk.PGQT2SUZ.js +0 -29
  1015. package/cdn/chunks/chunk.PZDOAUYA.js +0 -19
  1016. package/cdn/chunks/chunk.PZTXEDKR.js +0 -32
  1017. package/cdn/chunks/chunk.Q2KZZXNW.js +0 -19
  1018. package/cdn/chunks/chunk.QBWMG6IT.js +0 -34
  1019. package/cdn/chunks/chunk.QKPGMKCU.js +0 -29
  1020. package/cdn/chunks/chunk.QSUEVWML.js +0 -19
  1021. package/cdn/chunks/chunk.R76JUQVJ.js +0 -19
  1022. package/cdn/chunks/chunk.RGVLUCXY.js +0 -136
  1023. package/cdn/chunks/chunk.ROOGE2IT.js +0 -34
  1024. package/cdn/chunks/chunk.RPOR5R2E.js +0 -29
  1025. package/cdn/chunks/chunk.RRAIBGZ4.js +0 -19
  1026. package/cdn/chunks/chunk.RSLF75JQ.js +0 -276
  1027. package/cdn/chunks/chunk.RXWDA5OC.js +0 -29
  1028. package/cdn/chunks/chunk.SEDBHEAB.js +0 -259
  1029. package/cdn/chunks/chunk.SI62BLWL.js +0 -117
  1030. package/cdn/chunks/chunk.SOLKAAGN.js +0 -616
  1031. package/cdn/chunks/chunk.SXQOBC52.js +0 -113
  1032. package/cdn/chunks/chunk.TP5I7KWU.js +0 -19
  1033. package/cdn/chunks/chunk.U5HIJOMQ.js +0 -75
  1034. package/cdn/chunks/chunk.U5MPUZM5.js +0 -19
  1035. package/cdn/chunks/chunk.UDOTA73Q.js +0 -104
  1036. package/cdn/chunks/chunk.UIM3CRXT.js +0 -32
  1037. package/cdn/chunks/chunk.UJ37LSQF.js +0 -35
  1038. package/cdn/chunks/chunk.ULPRYBXE.js +0 -19
  1039. package/cdn/chunks/chunk.UOI45MZN.js +0 -33
  1040. package/cdn/chunks/chunk.UP5IZCN2.js +0 -19
  1041. package/cdn/chunks/chunk.UT7NEDHK.js +0 -56
  1042. package/cdn/chunks/chunk.UZIKKKMX.js +0 -599
  1043. package/cdn/chunks/chunk.V3B7XZSR.js +0 -29
  1044. package/cdn/chunks/chunk.VEQFG24Y.js +0 -29
  1045. package/cdn/chunks/chunk.VJ3HSVRM.js +0 -19
  1046. package/cdn/chunks/chunk.VM7QIPMN.js +0 -19
  1047. package/cdn/chunks/chunk.VOMJQ2PY.js +0 -29
  1048. package/cdn/chunks/chunk.VSWWQTCR.js +0 -49
  1049. package/cdn/chunks/chunk.W6SOSTCJ.js +0 -535
  1050. package/cdn/chunks/chunk.W7J5622D.js +0 -132
  1051. package/cdn/chunks/chunk.WCT2EGAW.js +0 -19
  1052. package/cdn/chunks/chunk.WDXR2JIS.js +0 -155
  1053. package/cdn/chunks/chunk.WQHKJMY7.js +0 -29
  1054. package/cdn/chunks/chunk.WWVZEJPV.js +0 -19
  1055. package/cdn/chunks/chunk.WWXXMUQQ.js +0 -29
  1056. package/cdn/chunks/chunk.WYHJ7NLI.js +0 -134
  1057. package/cdn/chunks/chunk.Y3GAPNFQ.js +0 -60
  1058. package/cdn/chunks/chunk.Y5OZ5KWP.js +0 -106
  1059. package/cdn/chunks/chunk.Y76LQIOK.js +0 -19
  1060. package/cdn/chunks/chunk.YDXASEGU.js +0 -29
  1061. package/cdn/chunks/chunk.YFQYUNKU.js +0 -19
  1062. package/cdn/chunks/chunk.YIVEZAP4.js +0 -30
  1063. package/cdn/chunks/chunk.YOIXCCDN.js +0 -93
  1064. package/cdn/chunks/chunk.YWHPP2TL.js +0 -19
  1065. package/cdn/chunks/chunk.YYHKRVK5.js +0 -34
  1066. package/cdn/chunks/chunk.Z2Y7UOPY.js +0 -1184
  1067. package/cdn/chunks/chunk.Z4Q7EJUU.js +0 -19
  1068. package/cdn/chunks/chunk.Z5D5WHWT.js +0 -39
  1069. package/cdn/chunks/chunk.Z7JIWZZH.js +0 -285
  1070. package/cdn/chunks/chunk.ZALJFYJ6.js +0 -493
  1071. package/cdn/chunks/chunk.ZWKZYPUO.js +0 -19
  1072. package/cdn/chunks/chunk.ZWVOSI42.js +0 -29
  1073. package/dist/chunks/chunk.2AJNF5Z5.js +0 -1
  1074. package/dist/chunks/chunk.2NT5ZT4T.js +0 -1
  1075. package/dist/chunks/chunk.2P3YOE6H.js +0 -1
  1076. package/dist/chunks/chunk.2QP3CLLZ.js +0 -67
  1077. package/dist/chunks/chunk.2YCZCE4S.js +0 -1
  1078. package/dist/chunks/chunk.34SGSVEH.js +0 -140
  1079. package/dist/chunks/chunk.3NRLZXI2.js +0 -1
  1080. package/dist/chunks/chunk.3YYQOQRG.js +0 -20
  1081. package/dist/chunks/chunk.46H3YDP7.js +0 -1
  1082. package/dist/chunks/chunk.46LCWODR.js +0 -65
  1083. package/dist/chunks/chunk.47BVT76F.js +0 -1
  1084. package/dist/chunks/chunk.4B47VXVP.js +0 -1
  1085. package/dist/chunks/chunk.4DDE3552.js +0 -1
  1086. package/dist/chunks/chunk.4DHJWSZT.js +0 -1
  1087. package/dist/chunks/chunk.4FA2VISH.js +0 -1
  1088. package/dist/chunks/chunk.4MBPAU5Y.js +0 -566
  1089. package/dist/chunks/chunk.4NHCLCIX.js +0 -1
  1090. package/dist/chunks/chunk.4ONQSCPA.js +0 -1
  1091. package/dist/chunks/chunk.4QXSXFWK.js +0 -1
  1092. package/dist/chunks/chunk.4WU5R5TN.js +0 -64
  1093. package/dist/chunks/chunk.5C2GZTN3.js +0 -1
  1094. package/dist/chunks/chunk.5FEQDBOD.js +0 -1
  1095. package/dist/chunks/chunk.5GXUM2LI.js +0 -1
  1096. package/dist/chunks/chunk.5ITKGB2M.js +0 -43
  1097. package/dist/chunks/chunk.5WTW5KGY.js +0 -1
  1098. package/dist/chunks/chunk.6D2P5XBP.js +0 -11
  1099. package/dist/chunks/chunk.6DLYU7II.js +0 -1
  1100. package/dist/chunks/chunk.6FK4JW6B.js +0 -1
  1101. package/dist/chunks/chunk.6QKLZA7M.js +0 -43
  1102. package/dist/chunks/chunk.6S7AITRG.js +0 -1
  1103. package/dist/chunks/chunk.6XKRCX7E.js +0 -300
  1104. package/dist/chunks/chunk.773YJXBD.js +0 -1
  1105. package/dist/chunks/chunk.7UFP5DQ4.js +0 -25
  1106. package/dist/chunks/chunk.7VXGRXO3.js +0 -1
  1107. package/dist/chunks/chunk.7WKPVNAD.js +0 -33
  1108. package/dist/chunks/chunk.A4B6V7DZ.js +0 -1
  1109. package/dist/chunks/chunk.AA4OOWL2.js +0 -6
  1110. package/dist/chunks/chunk.ABTLN6NI.js +0 -1
  1111. package/dist/chunks/chunk.ABUMARPK.js +0 -1
  1112. package/dist/chunks/chunk.AFZGF7AF.js +0 -1
  1113. package/dist/chunks/chunk.AIKRJW76.js +0 -26
  1114. package/dist/chunks/chunk.AXB5O266.js +0 -1
  1115. package/dist/chunks/chunk.AZFD4LBL.js +0 -23
  1116. package/dist/chunks/chunk.B4W7MOEM.js +0 -145
  1117. package/dist/chunks/chunk.B6IOO3S6.js +0 -1
  1118. package/dist/chunks/chunk.B7Z7LN4Y.js +0 -157
  1119. package/dist/chunks/chunk.BDTBEGUV.js +0 -30
  1120. package/dist/chunks/chunk.BML4OHUL.js +0 -1
  1121. package/dist/chunks/chunk.BVJU5S2L.js +0 -1
  1122. package/dist/chunks/chunk.BWUUT4P3.js +0 -1
  1123. package/dist/chunks/chunk.C3LDULRW.js +0 -1
  1124. package/dist/chunks/chunk.C5IAOI5P.js +0 -75
  1125. package/dist/chunks/chunk.C6KTVOGD.js +0 -101
  1126. package/dist/chunks/chunk.C6UJFOJA.js +0 -1
  1127. package/dist/chunks/chunk.CCYI6V7E.js +0 -1
  1128. package/dist/chunks/chunk.CDRNZVTB.js +0 -1
  1129. package/dist/chunks/chunk.CHTAX6YR.js +0 -1
  1130. package/dist/chunks/chunk.CMW3T6G4.js +0 -1
  1131. package/dist/chunks/chunk.CR2MHGYF.js +0 -37
  1132. package/dist/chunks/chunk.CVX2IQ3N.js +0 -1
  1133. package/dist/chunks/chunk.D4FZXK32.js +0 -1
  1134. package/dist/chunks/chunk.DMFUOXZT.js +0 -1
  1135. package/dist/chunks/chunk.DTB6YVF7.js +0 -5
  1136. package/dist/chunks/chunk.DW57B6YE.js +0 -35
  1137. package/dist/chunks/chunk.E2HFVVAU.js +0 -8
  1138. package/dist/chunks/chunk.E4MVZA4I.js +0 -1
  1139. package/dist/chunks/chunk.E5VEP5QD.js +0 -80
  1140. package/dist/chunks/chunk.EQLKJ6SU.js +0 -1
  1141. package/dist/chunks/chunk.EXKNLUSQ.js +0 -299
  1142. package/dist/chunks/chunk.EZDC5SS3.js +0 -1
  1143. package/dist/chunks/chunk.FFPMXRI3.js +0 -1
  1144. package/dist/chunks/chunk.FPQ2ZB2O.js +0 -1
  1145. package/dist/chunks/chunk.FZAX2HVR.js +0 -1
  1146. package/dist/chunks/chunk.G5CKSEBJ.js +0 -1
  1147. package/dist/chunks/chunk.G6FIOHAT.js +0 -1
  1148. package/dist/chunks/chunk.GBHLNNMQ.js +0 -1
  1149. package/dist/chunks/chunk.GD7YPOPL.js +0 -1
  1150. package/dist/chunks/chunk.GDBO6KPI.js +0 -280
  1151. package/dist/chunks/chunk.GEA7S4SS.js +0 -1
  1152. package/dist/chunks/chunk.GKYOUI6O.js +0 -1
  1153. package/dist/chunks/chunk.GNAOV4CE.js +0 -1
  1154. package/dist/chunks/chunk.GNFSENN2.js +0 -1
  1155. package/dist/chunks/chunk.GVVISPQE.js +0 -47
  1156. package/dist/chunks/chunk.GXFFIW4T.js +0 -1
  1157. package/dist/chunks/chunk.HCRWISSS.js +0 -20
  1158. package/dist/chunks/chunk.HG64IQ3Z.js +0 -1
  1159. package/dist/chunks/chunk.HHLLNXRY.js +0 -1
  1160. package/dist/chunks/chunk.HIX5GPFI.js +0 -1
  1161. package/dist/chunks/chunk.HJZJT6KY.js +0 -30
  1162. package/dist/chunks/chunk.HLSW2UGB.js +0 -1
  1163. package/dist/chunks/chunk.HSGYZLW4.js +0 -100
  1164. package/dist/chunks/chunk.HTXCAUP2.js +0 -1
  1165. package/dist/chunks/chunk.HZ7S3ZVA.js +0 -1
  1166. package/dist/chunks/chunk.I3354BKM.js +0 -1
  1167. package/dist/chunks/chunk.I7DU7VFZ.js +0 -2
  1168. package/dist/chunks/chunk.I7UJ44FA.js +0 -100
  1169. package/dist/chunks/chunk.ICBA67NI.js +0 -1
  1170. package/dist/chunks/chunk.IDMFGWNJ.js +0 -1
  1171. package/dist/chunks/chunk.IEIJCOMT.js +0 -1
  1172. package/dist/chunks/chunk.ILEOTN2D.js +0 -1
  1173. package/dist/chunks/chunk.IR5OA5AA.js +0 -1
  1174. package/dist/chunks/chunk.ISVPRRSL.js +0 -37
  1175. package/dist/chunks/chunk.J3542ENW.js +0 -16
  1176. package/dist/chunks/chunk.JKWPNRMY.js +0 -1
  1177. package/dist/chunks/chunk.JM5EALZ5.js +0 -19
  1178. package/dist/chunks/chunk.JON4UZAS.js +0 -22
  1179. package/dist/chunks/chunk.JT3HRZTN.js +0 -1
  1180. package/dist/chunks/chunk.JUBJN5ZN.js +0 -1
  1181. package/dist/chunks/chunk.K4WN3B56.js +0 -24
  1182. package/dist/chunks/chunk.KDMJINCM.js +0 -1
  1183. package/dist/chunks/chunk.KI4EUF67.js +0 -121
  1184. package/dist/chunks/chunk.KIHZQ3LL.js +0 -1
  1185. package/dist/chunks/chunk.KIOEQ552.js +0 -39
  1186. package/dist/chunks/chunk.KSQ6GHXW.js +0 -1
  1187. package/dist/chunks/chunk.KTTXLINR.js +0 -1
  1188. package/dist/chunks/chunk.LHTIGXNJ.js +0 -1
  1189. package/dist/chunks/chunk.LP2CR5VG.js +0 -8
  1190. package/dist/chunks/chunk.LWMXBJFQ.js +0 -1
  1191. package/dist/chunks/chunk.LWURMOZE.js +0 -1
  1192. package/dist/chunks/chunk.LXQMAB2U.js +0 -1
  1193. package/dist/chunks/chunk.MBVNMYVL.js +0 -11
  1194. package/dist/chunks/chunk.MCNJ2ULL.js +0 -1
  1195. package/dist/chunks/chunk.MCW4UTWF.js +0 -74
  1196. package/dist/chunks/chunk.MFUFKXTH.js +0 -14
  1197. package/dist/chunks/chunk.MGKQUQZ4.js +0 -38
  1198. package/dist/chunks/chunk.MJQTHFJL.js +0 -1
  1199. package/dist/chunks/chunk.NDXOHDIZ.js +0 -55
  1200. package/dist/chunks/chunk.NGWYN3KF.js +0 -1
  1201. package/dist/chunks/chunk.NO7DUW25.js +0 -1
  1202. package/dist/chunks/chunk.NUJQKS4H.js +0 -4
  1203. package/dist/chunks/chunk.O2HQT52O.js +0 -1
  1204. package/dist/chunks/chunk.O3ISQM6H.js +0 -62
  1205. package/dist/chunks/chunk.O3JG4DO5.js +0 -9
  1206. package/dist/chunks/chunk.O4PAZJBP.js +0 -5
  1207. package/dist/chunks/chunk.O5IMLJBF.js +0 -1
  1208. package/dist/chunks/chunk.OAXWRTN7.js +0 -1
  1209. package/dist/chunks/chunk.OBEH7FCK.js +0 -1
  1210. package/dist/chunks/chunk.OKOYLAUA.js +0 -1157
  1211. package/dist/chunks/chunk.OMX5FETB.js +0 -1
  1212. package/dist/chunks/chunk.OS6ZETFH.js +0 -1
  1213. package/dist/chunks/chunk.OYNORNE2.js +0 -9
  1214. package/dist/chunks/chunk.OYP2F75M.js +0 -126
  1215. package/dist/chunks/chunk.P75IMUDZ.js +0 -1
  1216. package/dist/chunks/chunk.PA3VBXVK.js +0 -26
  1217. package/dist/chunks/chunk.PEBJNSWB.js +0 -1
  1218. package/dist/chunks/chunk.PFCI7VDW.js +0 -1
  1219. package/dist/chunks/chunk.PJBZOFER.js +0 -1
  1220. package/dist/chunks/chunk.PM4H5JFF.js +0 -1
  1221. package/dist/chunks/chunk.PPPGTIMB.js +0 -1
  1222. package/dist/chunks/chunk.PRA6LX5W.js +0 -1
  1223. package/dist/chunks/chunk.QFB3PCD3.js +0 -1
  1224. package/dist/chunks/chunk.QW3OF5NM.js +0 -1
  1225. package/dist/chunks/chunk.QYBSPXA4.js +0 -55
  1226. package/dist/chunks/chunk.R57SSUHG.js +0 -115
  1227. package/dist/chunks/chunk.R5PW2J2X.js +0 -17
  1228. package/dist/chunks/chunk.REZF2TMV.js +0 -1
  1229. package/dist/chunks/chunk.RI4PAVBN.js +0 -1
  1230. package/dist/chunks/chunk.RQH2KYAF.js +0 -1
  1231. package/dist/chunks/chunk.RRD4GWZM.js +0 -1
  1232. package/dist/chunks/chunk.S2PSK5XR.js +0 -99
  1233. package/dist/chunks/chunk.S37IUS6R.js +0 -154
  1234. package/dist/chunks/chunk.SRXNJS22.js +0 -1
  1235. package/dist/chunks/chunk.T6PYLVCK.js +0 -1
  1236. package/dist/chunks/chunk.TQLT4DUB.js +0 -1
  1237. package/dist/chunks/chunk.TQWV4GMD.js +0 -1
  1238. package/dist/chunks/chunk.TRM2XUGL.js +0 -1
  1239. package/dist/chunks/chunk.TWJIFZVX.js +0 -1
  1240. package/dist/chunks/chunk.TWSY3M6Q.js +0 -1
  1241. package/dist/chunks/chunk.U2K4W4DP.js +0 -35
  1242. package/dist/chunks/chunk.U5EMXKX4.js +0 -1
  1243. package/dist/chunks/chunk.UDAASDQK.js +0 -1
  1244. package/dist/chunks/chunk.UEGDQ6BM.js +0 -1
  1245. package/dist/chunks/chunk.UG3YZVHQ.js +0 -55
  1246. package/dist/chunks/chunk.UIBWBYNW.js +0 -1
  1247. package/dist/chunks/chunk.UMWKE4O2.js +0 -1
  1248. package/dist/chunks/chunk.UYEDKQLP.js +0 -1
  1249. package/dist/chunks/chunk.V6NAM6MU.js +0 -1
  1250. package/dist/chunks/chunk.VFOMINBL.js +0 -48
  1251. package/dist/chunks/chunk.VGFTYA6N.js +0 -1
  1252. package/dist/chunks/chunk.VMACUK42.js +0 -1
  1253. package/dist/chunks/chunk.VRFTRHNI.js +0 -1
  1254. package/dist/chunks/chunk.VRKJSPEU.js +0 -1
  1255. package/dist/chunks/chunk.VSYHMVFB.js +0 -1
  1256. package/dist/chunks/chunk.VY3UBC7Y.js +0 -1
  1257. package/dist/chunks/chunk.W3RY3L2T.js +0 -49
  1258. package/dist/chunks/chunk.W4U6DIPH.js +0 -1
  1259. package/dist/chunks/chunk.W55BGFHT.js +0 -1
  1260. package/dist/chunks/chunk.WEVKLE7C.js +0 -1
  1261. package/dist/chunks/chunk.WG6D7JHO.js +0 -1
  1262. package/dist/chunks/chunk.XT37PN45.js +0 -1
  1263. package/dist/chunks/chunk.Y7BOR5Y6.js +0 -1
  1264. package/dist/chunks/chunk.YCV2ZGED.js +0 -1
  1265. package/dist/chunks/chunk.YMWVYGLQ.js +0 -1
  1266. package/dist/chunks/chunk.YPGTCFAH.js +0 -12
  1267. package/dist/chunks/chunk.Z26IZTH3.js +0 -1
  1268. package/dist/chunks/chunk.Z54EHKYE.js +0 -1
  1269. package/dist/chunks/chunk.ZLSEXTRL.js +0 -1
  1270. package/dist/chunks/chunk.ZRHNMI52.js +0 -1
  1271. package/dist/chunks/chunk.ZSPCDPLN.js +0 -749
  1272. package/dist/chunks/chunk.ZXQ7UCTV.js +0 -1
  1273. package/dist/terra_ui_components-0.0.178-py3-none-any.whl +0 -0
  1274. package/dist/terra_ui_components-0.0.178.tar.gz +0 -0
  1275. /package/cdn/chunks/{GeoTIFF.HVXG65QH.js → GeoTIFF.WDM5HZIC.js} +0 -0
@@ -1,3798 +0,0 @@
1
- import {
2
- BadRequestException,
3
- HttpException,
4
- NotFoundException
5
- } from "./chunk.SYQOGYTQ.js";
6
- import {
7
- authService
8
- } from "./chunk.EYYVMPBZ.js";
9
- import {
10
- __objRest,
11
- __privateAdd,
12
- __privateGet,
13
- __privateMethod,
14
- __privateSet,
15
- __privateWrapper,
16
- __spreadProps,
17
- __spreadValues,
18
- init_buffer,
19
- init_dirname,
20
- init_process
21
- } from "./chunk.ZEOVK2FE.js";
22
-
23
- // src/apis/harmony.api.ts
24
- init_dirname();
25
- init_buffer();
26
- init_process();
27
-
28
- // src/lib/api.client.ts
29
- init_dirname();
30
- init_buffer();
31
- init_process();
32
- async function request(url, { method = "GET", body, headers = {}, signal } = {}) {
33
- var _a11, _b2, _c, _d, _e, _f;
34
- try {
35
- const res = await fetch(url, {
36
- method,
37
- headers,
38
- body: body ? JSON.stringify(body) : void 0,
39
- signal
40
- });
41
- if (!res.ok) {
42
- if (res.status === 401) {
43
- authService.logout();
44
- }
45
- if (!((_a11 = res.headers.get("Content-Type")) == null ? void 0 : _a11.includes("json"))) {
46
- const text = await res.text();
47
- throw new HttpException({
48
- status: res.status,
49
- message: text || `HTTP ${res.status}`
50
- });
51
- }
52
- const json = await res.json();
53
- throw new HttpException({
54
- status: res.status,
55
- message: (_e = (_d = (_b2 = json.message) != null ? _b2 : (
56
- // most REST clients will pass a error message
57
- json.description
58
- )) != null ? _d : (
59
- // NASA Harmony uses the description field
60
- (_c = json.errors) == null ? void 0 : _c[0]
61
- )) != null ? _e : (
62
- // NASA CMR uses an array of errors
63
- `HTTP ${res.status}`
64
- )
65
- });
66
- }
67
- if (res.status === 204) {
68
- return void 0;
69
- }
70
- if (!((_f = res.headers.get("Content-Type")) == null ? void 0 : _f.includes("json"))) {
71
- throw new HttpException({
72
- status: 500,
73
- message: `Expected JSON response but got ${res.headers.get("Content-Type")}`
74
- });
75
- }
76
- return res.json();
77
- } catch (err) {
78
- if (err instanceof DOMException && err.name === "AbortError") {
79
- return void 0;
80
- }
81
- if (err instanceof HttpException && err.status !== 500) {
82
- throw err;
83
- }
84
- console.error(err);
85
- console.error(`Failed to fetch ${url}`);
86
- throw new HttpException({
87
- status: 500,
88
- message: `An unknown error occurred when attempting to fetch, please try again later.`,
89
- cause: err
90
- });
91
- }
92
- }
93
- var apiClient = {
94
- get: (url, options) => request(url, __spreadValues({}, options)),
95
- post: (url, body, options) => request(url, __spreadValues({ method: "POST", body }, options)),
96
- put: (url, body) => request(url, { method: "PUT", body }),
97
- patch: (url, body) => request(url, { method: "PATCH", body }),
98
- delete: (url) => request(url, { method: "DELETE" })
99
- };
100
-
101
- // src/apis/harmony.api.ts
102
- var API_VERSION = "3";
103
- var Environments = {
104
- PROD: "PROD",
105
- UAT: "UAT"
106
- };
107
- var HARMONY_URLS = {
108
- [Environments.PROD]: "https://harmony.earthdata.nasa.gov",
109
- [Environments.UAT]: "https://harmony.uat.earthdata.nasa.gov",
110
- // for anonymous access, we have to go through our proxy since Harmony doesn't support anonymous requests directly
111
- // 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
112
- // the proxy also adds restrictions on how much data can be requested
113
- ANONYMOUS_ACCESS: "https://sjldutoe6c.execute-api.us-east-1.amazonaws.com/default/harmony-proxy"
114
- };
115
- var CLOUD_GIOVANNI_URLS = {
116
- [Environments.PROD]: "https://api.giovanni.earthdata.nasa.gov",
117
- [Environments.UAT]: "https://api.giovanni.uat.earthdata.nasa.gov"
118
- };
119
- var FINAL_STATUSES = /* @__PURE__ */ new Set([
120
- "successful" /* SUCCESSFUL */,
121
- "failed" /* FAILED */,
122
- "canceled" /* CANCELED */,
123
- "complete_with_errors" /* COMPLETE_WITH_ERRORS */
124
- ]);
125
- var _request, request_fn, _hasGiovanniServices, hasGiovanniServices_fn, _hasNonGiovanniServices, hasNonGiovanniServices_fn, _getNonGiovanniFormats, getNonGiovanniFormats_fn, _getGiovanniFormats, getGiovanniFormats_fn;
126
- var HarmonyApi = class {
127
- constructor() {
128
- __privateAdd(this, _request);
129
- __privateAdd(this, _hasGiovanniServices);
130
- __privateAdd(this, _hasNonGiovanniServices);
131
- __privateAdd(this, _getNonGiovanniFormats);
132
- __privateAdd(this, _getGiovanniFormats);
133
- }
134
- /**
135
- * Returns collection capabilities including available services, output formats, subsetting options, etc.
136
- * from the Harmony /capabilities endpoint
137
- */
138
- async getCollectionCapabilities(conceptId, options) {
139
- if (!conceptId) {
140
- throw new BadRequestException({
141
- message: "`collectionConceptId` is required"
142
- });
143
- }
144
- const capabilities = await __privateMethod(this, _request, request_fn).call(this, `capabilities?collectionId=${conceptId}&version=${API_VERSION}`, options);
145
- capabilities.variables = this.addConceptIdToVariables(capabilities.variables);
146
- capabilities.configuredOutputFormats = this.getOutputFormatOptions(capabilities);
147
- return capabilities;
148
- }
149
- /**
150
- * Create a subset job by sending a GET request to the Harmony OGC API endpoint.
151
- * The harmonyRequest.requestUrl contains the full URL with all subset parameters.
152
- */
153
- async createJob(harmonyRequest, options) {
154
- return __privateMethod(this, _request, request_fn).call(this, harmonyRequest.requestUrl, options);
155
- }
156
- /**
157
- * Get the current status of an existing subset job.
158
- * Intended for polling until the job reaches a final state.
159
- */
160
- async getJobStatus(jobId, options) {
161
- return __privateMethod(this, _request, request_fn).call(this, `jobs/${jobId}`, options);
162
- }
163
- /**
164
- * Given a jobId for a running job, send a cancellation request to the Harmony API.
165
- * Returns the updated job status after cancellation.
166
- */
167
- async cancelJob(jobId, options) {
168
- return __privateMethod(this, _request, request_fn).call(this, `jobs/${jobId}/cancel`, options);
169
- }
170
- /**
171
- * 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.
172
- */
173
- async fetchUrl(url, options) {
174
- const relativeUrl = url.replace(CLOUD_GIOVANNI_URLS.PROD, "").replace(CLOUD_GIOVANNI_URLS.UAT, "");
175
- return __privateMethod(this, _request, request_fn).call(this, relativeUrl, options);
176
- }
177
- /**
178
- * Extracts the variable concept ID from the variable's href and adds it as a property on the variable object.
179
- */
180
- addConceptIdToVariables(variables) {
181
- return variables.map((v) => {
182
- const match = v.href.match(/\/concepts\/(V\d+-\w+)$/);
183
- if (match) {
184
- v.conceptId = match[1];
185
- }
186
- return v;
187
- });
188
- }
189
- /**
190
- * Processes the Harmony capabilities response to generate a list of output format options with user-friendly labels and descriptions.
191
- * If Giovanni is the only service available, only return Giovanni-specific formats.
192
- * If Giovanni is present with other services, include both Giovanni and non-Giovanni formats, avoiding duplicates.
193
- * If Giovanni is not present, return only non-Giovanni formats.
194
- */
195
- getOutputFormatOptions(capabilities) {
196
- const hasNonGiovanniServices = __privateMethod(this, _hasNonGiovanniServices, hasNonGiovanniServices_fn).call(this, capabilities);
197
- const hasGiovanniServices = __privateMethod(this, _hasGiovanniServices, hasGiovanniServices_fn).call(this, capabilities);
198
- const giovanniFormats = hasGiovanniServices ? __privateMethod(this, _getGiovanniFormats, getGiovanniFormats_fn).call(this, capabilities) : [];
199
- if (hasGiovanniServices && !hasNonGiovanniServices) {
200
- return giovanniFormats;
201
- }
202
- const outputFormats = [];
203
- const nonGiovanniFormats = __privateMethod(this, _getNonGiovanniFormats, getNonGiovanniFormats_fn).call(this, capabilities);
204
- nonGiovanniFormats.forEach((format) => {
205
- let label = format;
206
- let description = `Download data in ${format} format`;
207
- switch (format) {
208
- case "application/x-hdf":
209
- case "application/octet-stream":
210
- label = "HDF-EOS5";
211
- description = "Download data in HDF-EOS5 format";
212
- break;
213
- case "application/x-netcdf4":
214
- case "application/netcdf":
215
- label = "NetCDF";
216
- description = "Download data in NetCDF format";
217
- break;
218
- case "application/x-netcdf4;profile=opendap_url":
219
- label = "OPeNDAP URL (x-netcdf4)";
220
- description = "Download data in OPeNDAP URL (x-netcdf4) format";
221
- break;
222
- case "text/csv":
223
- label = "CSV";
224
- description = "Download data in CSV format";
225
- break;
226
- case "image/tiff":
227
- case "image/tif":
228
- label = "TIFF";
229
- description = "Download data in TIFF format";
230
- break;
231
- case "image/png":
232
- label = "PNG";
233
- description = "Download data in PNG format";
234
- break;
235
- case "image/jpg":
236
- case "image/jpeg":
237
- label = "JPEG";
238
- description = "Download data in JPEG format";
239
- break;
240
- case "application/shapefile+zip":
241
- label = "Shapefile+zip";
242
- description = "Download data in Shapefile+zip format";
243
- break;
244
- case "application/x-zarr":
245
- label = "ZARR";
246
- description = "Download data in ZARR format";
247
- break;
248
- default:
249
- label = format;
250
- description = `Download data in ${format} format`;
251
- }
252
- outputFormats.push({
253
- key: format,
254
- label,
255
- description
256
- });
257
- });
258
- if (hasGiovanniServices && hasNonGiovanniServices) {
259
- outputFormats.push(...giovanniFormats);
260
- }
261
- return outputFormats;
262
- }
263
- };
264
- _request = new WeakSet();
265
- request_fn = function(url, options) {
266
- let environmentUrl = HARMONY_URLS[Environments.PROD];
267
- if (!(options == null ? void 0 : options.bearerToken)) {
268
- environmentUrl = HARMONY_URLS.ANONYMOUS_ACCESS;
269
- }
270
- if (!url.startsWith("http")) {
271
- url = `${environmentUrl}/${url}`;
272
- }
273
- return apiClient.get(url, {
274
- signal: options == null ? void 0 : options.signal,
275
- headers: __spreadValues({}, (options == null ? void 0 : options.bearerToken) && {
276
- Authorization: `Bearer ${options.bearerToken}`
277
- })
278
- });
279
- };
280
- _hasGiovanniServices = new WeakSet();
281
- hasGiovanniServices_fn = function(capabilities) {
282
- var _a11, _b2;
283
- return (_b2 = (_a11 = capabilities == null ? void 0 : capabilities.services) == null ? void 0 : _a11.some(
284
- (service) => service.name.toLowerCase().includes("giovanni")
285
- )) != null ? _b2 : false;
286
- };
287
- _hasNonGiovanniServices = new WeakSet();
288
- hasNonGiovanniServices_fn = function(capabilities) {
289
- var _a11, _b2;
290
- return (_b2 = (_a11 = capabilities == null ? void 0 : capabilities.services) == null ? void 0 : _a11.some(
291
- (service) => !service.name.toLowerCase().includes("giovanni")
292
- )) != null ? _b2 : false;
293
- };
294
- _getNonGiovanniFormats = new WeakSet();
295
- getNonGiovanniFormats_fn = function(capabilities) {
296
- if (!(capabilities == null ? void 0 : capabilities.services)) {
297
- return [];
298
- }
299
- const nonGiovanniServices = capabilities.services.filter(
300
- (service) => !service.name.toLowerCase().includes("giovanni")
301
- );
302
- const formats = /* @__PURE__ */ new Set();
303
- nonGiovanniServices.forEach((service) => {
304
- var _a11;
305
- (_a11 = service.capabilities.outputFormats) == null ? void 0 : _a11.forEach((format) => {
306
- formats.add(format);
307
- });
308
- });
309
- const formatArray = Array.from(formats);
310
- if (formatArray.includes("application/netcdf") && formatArray.includes("application/x-netcdf4")) {
311
- return formatArray.filter((format) => format !== "application/netcdf");
312
- }
313
- return formatArray;
314
- };
315
- _getGiovanniFormats = new WeakSet();
316
- getGiovanniFormats_fn = function(capabilities) {
317
- const giovanniFormats = [];
318
- capabilities.services.forEach((service) => {
319
- const serviceName = service.name.toLowerCase();
320
- if (serviceName.includes("giovanni-time-series")) {
321
- giovanniFormats.push({
322
- key: "text/csv",
323
- label: "CSV (point-based time series; one file)",
324
- description: "Single variable plotted over time",
325
- isGiovanniFormat: true
326
- });
327
- }
328
- if (serviceName.includes("giovanni-averaging")) {
329
- giovanniFormats.push(
330
- {
331
- key: "image/tiff",
332
- label: "GeoTIFF (time-averaged map; one file)",
333
- description: "Time averaged representation as map",
334
- isGiovanniFormat: true
335
- },
336
- {
337
- key: "text/csv",
338
- label: "CSV (area-averaged time series; one file)",
339
- description: "Area averaged data over time",
340
- isGiovanniFormat: true
341
- }
342
- );
343
- }
344
- });
345
- return giovanniFormats.filter(
346
- (format, index, formats) => formats.findIndex((existing) => existing.label === format.label) === index
347
- );
348
- };
349
- var harmonyApi = new HarmonyApi();
350
-
351
- // src/queries/cmr.queries.ts
352
- init_dirname();
353
- init_buffer();
354
- init_process();
355
-
356
- // src/apis/cmr.api.ts
357
- init_dirname();
358
- init_buffer();
359
- init_process();
360
- var baseUrl = "https://cmr.earthdata.nasa.gov/search/";
361
- var _request2, request_fn2, _getGranuleSortKey, getGranuleSortKey_fn;
362
- var CmrApi = class {
363
- constructor() {
364
- __privateAdd(this, _request2);
365
- // TODO: replace references to these old columns with these names and remove this method (data access may be the only location)
366
- __privateAdd(this, _getGranuleSortKey);
367
- }
368
- async getCollection(shortName, version, options) {
369
- return this.getCollectionByEntryId(`${shortName}_${version}`, options);
370
- }
371
- async getCollectionByEntryId(collectionEntryId, options) {
372
- if (!collectionEntryId) {
373
- throw new BadRequestException({
374
- message: "`collectionEntryId` is required"
375
- });
376
- }
377
- const ummResponse = await __privateMethod(this, _request2, request_fn2).call(this, `collections.umm_json?entry_id=${collectionEntryId}&include_granule_counts=true`, options);
378
- if (!ummResponse.items.length) {
379
- throw new NotFoundException({
380
- message: `Collection ${collectionEntryId} was not found`
381
- });
382
- }
383
- return ummResponse.items[0];
384
- }
385
- async searchVariables(searchParams, options) {
386
- var _a11;
387
- if (!searchParams.collectionConceptId) {
388
- throw new BadRequestException({
389
- message: "`collectionConceptId` is required"
390
- });
391
- }
392
- return __privateMethod(this, _request2, request_fn2).call(this, `variables.umm_json?keyword=${searchParams.collectionConceptId}&page_size=${(_a11 = searchParams.pageSize) != null ? _a11 : 200}`, options);
393
- }
394
- async getSamplingOfGranules(collectionEntryId, options) {
395
- var _a11, _b2, _c, _d, _e, _f, _g;
396
- const [first, last] = await Promise.all([
397
- this.searchGranules(
398
- {
399
- collectionEntryId,
400
- pageSize: 1,
401
- sortBy: "umm.TemporalExtent.RangeDateTime.BeginningDateTime",
402
- sortDirection: "asc"
403
- },
404
- options
405
- ),
406
- this.searchGranules(
407
- {
408
- collectionEntryId,
409
- pageSize: 1,
410
- sortBy: "umm.TemporalExtent.RangeDateTime.BeginningDateTime",
411
- sortDirection: "desc"
412
- },
413
- options
414
- )
415
- ]);
416
- const firstGranule = (_a11 = first.items[0]) == null ? void 0 : _a11.umm;
417
- const firstExtent = (_b2 = firstGranule == null ? void 0 : firstGranule.TemporalExtent) == null ? void 0 : _b2.RangeDateTime;
418
- const isSubDaily = (firstExtent == null ? void 0 : firstExtent.BeginningDateTime) != null && firstExtent.EndingDateTime != null ? (new Date(firstExtent.EndingDateTime).getTime() - new Date(firstExtent.BeginningDateTime).getTime()) / (1e3 * 60 * 60) < 24 : false;
419
- return {
420
- minDate: (_c = firstExtent == null ? void 0 : firstExtent.BeginningDateTime) == null ? void 0 : _c.toString(),
421
- maxDate: (_g = (_f = (_e = (_d = last.items[0]) == null ? void 0 : _d.umm.TemporalExtent) == null ? void 0 : _e.RangeDateTime) == null ? void 0 : _f.BeginningDateTime) == null ? void 0 : _g.toString(),
422
- isSubDaily,
423
- hasGranules: first.hits > 0
424
- };
425
- }
426
- async searchGranules(params, options) {
427
- var _a11, _b2, _c, _d;
428
- if (!params.collectionEntryId && !params.collectionConceptId) {
429
- throw new BadRequestException({
430
- message: "`collectionEntryId` or `collectionConceptId` is required to search granules"
431
- });
432
- }
433
- const searchParams = new URLSearchParams(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, params.collectionEntryId && {
434
- "entry_id[]": params.collectionEntryId
435
- }), params.collectionConceptId && {
436
- collection_concept_id: params.collectionConceptId
437
- }), params.pageSize && { page_size: params.pageSize.toString() }), params.pageNum && { page_num: params.pageNum.toString() }), params.offset && { offset: params.offset.toString() }), params.sortBy && {
438
- "sort_key[]": __privateMethod(this, _getGranuleSortKey, getGranuleSortKey_fn).call(this, params.sortBy, (_a11 = params.sortDirection) != null ? _a11 : "asc")
439
- }), params.search && {
440
- // TODO: support searchFields for searching other than granule_ur
441
- "granule_ur[]": `*${params.search}*`,
442
- "options[granule_ur][pattern]": "true"
443
- // CMR supports wildcard searching via the pattern option
444
- }), params.startDate && params.endDate && {
445
- temporal: `${params.startDate},${params.endDate}`
446
- }), ((_b2 = params.location) == null ? void 0 : _b2.type) === "bbox" && {
447
- // TODO: support other location types (e.g. circle, polygon, point, shapefile)
448
- bounding_box: params.location.bounds.toBBoxString()
449
- }), ((_c = params.cloudCover) == null ? void 0 : _c.min) !== void 0 && ((_d = params.cloudCover) == null ? void 0 : _d.max) !== void 0 && {
450
- cloud_cover: `${params.cloudCover.min},${params.cloudCover.max}`
451
- }));
452
- return __privateMethod(this, _request2, request_fn2).call(this, `granules.umm_json?${searchParams.toString()}`, options);
453
- }
454
- };
455
- _request2 = new WeakSet();
456
- request_fn2 = function(path, requestOptions) {
457
- return apiClient.get(`${baseUrl}${path}`, __spreadProps(__spreadValues({}, requestOptions), {
458
- headers: __spreadValues(__spreadValues({}, requestOptions == null ? void 0 : requestOptions.headers), (requestOptions == null ? void 0 : requestOptions.bearerToken) && {
459
- Authorization: `Bearer ${requestOptions.bearerToken}`
460
- })
461
- }));
462
- };
463
- _getGranuleSortKey = new WeakSet();
464
- getGranuleSortKey_fn = function(sortBy, sortDirection) {
465
- let sortKey = sortBy;
466
- switch (sortBy) {
467
- case "title":
468
- case "umm.GranuleUR":
469
- sortKey = "granuleUr";
470
- break;
471
- case "size":
472
- case "umm.DataGranule.Size":
473
- sortKey = "dataSize";
474
- break;
475
- case "timeStart":
476
- case "umm.TemporalExtent.RangeDateTime.BeginningDateTime":
477
- sortKey = "startDate";
478
- break;
479
- case "timeEnd":
480
- case "umm.TemporalExtent.RangeDateTime.EndingDateTime":
481
- sortKey = "endDate";
482
- break;
483
- }
484
- return `${sortDirection === "asc" ? "+" : "-"}${sortKey}`;
485
- };
486
- var cmrApi = new CmrApi();
487
- var cmr_api_default = cmrApi;
488
-
489
- // src/queries/cmr.queries.ts
490
- function queryCmrCollection(collectionEntryId, options) {
491
- return {
492
- queryKey: ["cmr", "collection", collectionEntryId],
493
- queryFn: async ({ signal }) => {
494
- return cmr_api_default.getCollectionByEntryId(collectionEntryId, __spreadProps(__spreadValues({}, options), {
495
- signal
496
- }));
497
- },
498
- enabled: !!collectionEntryId
499
- // prevent firing when collectionEntryId is undefined
500
- };
501
- }
502
- function queryCmrGranules(searchParams, options) {
503
- return {
504
- queryKey: ["cmr", "granules", searchParams],
505
- queryFn: async ({ signal }) => {
506
- return cmr_api_default.searchGranules(searchParams, __spreadProps(__spreadValues({}, options), {
507
- signal
508
- }));
509
- },
510
- enabled: !!searchParams.collectionEntryId || !!searchParams.collectionConceptId
511
- // prevent firing when collectionEntryId and collectionConceptId are undefined
512
- };
513
- }
514
- function queryCmrVariables(searchParams, options) {
515
- return {
516
- queryKey: ["cmr", "variables", searchParams],
517
- queryFn: async ({ signal }) => {
518
- return cmr_api_default.searchVariables(searchParams, __spreadProps(__spreadValues({}, options), {
519
- signal
520
- }));
521
- },
522
- enabled: !!searchParams.collectionConceptId
523
- // prevent firing when collectionConceptId is undefined
524
- };
525
- }
526
- function queryCmrSampling(collectionEntryId, options) {
527
- return {
528
- queryKey: ["cmr", "sampling", collectionEntryId],
529
- queryFn: async ({ signal }) => {
530
- if (!collectionEntryId)
531
- return null;
532
- return cmr_api_default.getSamplingOfGranules(collectionEntryId, __spreadProps(__spreadValues({}, options), {
533
- signal
534
- }));
535
- },
536
- enabled: !!collectionEntryId
537
- };
538
- }
539
-
540
- // src/controllers/collection.controller.ts
541
- init_dirname();
542
- init_buffer();
543
- init_process();
544
-
545
- // src/queries/giovanni.queries.ts
546
- init_dirname();
547
- init_buffer();
548
- init_process();
549
-
550
- // src/apis/giovanni.api.ts
551
- init_dirname();
552
- init_buffer();
553
- init_process();
554
- var baseUrl2 = "https://api.giovanni.earthdata.nasa.gov/";
555
- var _request3, request_fn3;
556
- var GiovanniApi = class {
557
- constructor() {
558
- __privateAdd(this, _request3);
559
- }
560
- /**
561
- * Fetches the list of configured variables from the Giovanni API.
562
- * Giovanni does not support all variables, so this endpoint provides a list of variables that are supported for subsetting.
563
- */
564
- async getConfiguredVariables(options) {
565
- const response = await __privateMethod(this, _request3, request_fn3).call(this, "configured-variables", options);
566
- return response.configured_variables;
567
- }
568
- };
569
- _request3 = new WeakSet();
570
- request_fn3 = function(path, requestOptions) {
571
- return apiClient.get(`${baseUrl2}${path}`, requestOptions);
572
- };
573
- var giovanniApi = new GiovanniApi();
574
- var giovanni_api_default = giovanniApi;
575
-
576
- // src/queries/giovanni.queries.ts
577
- function queryGiovanniConfiguredVariables() {
578
- return {
579
- queryKey: ["giovanni", "configuredVariables"],
580
- queryFn: async ({ signal }) => {
581
- return giovanni_api_default.getConfiguredVariables({
582
- signal
583
- });
584
- }
585
- };
586
- }
587
-
588
- // src/queries/gesdisc.queries.ts
589
- init_dirname();
590
- init_buffer();
591
- init_process();
592
-
593
- // src/apis/gesdisc.api.ts
594
- init_dirname();
595
- init_buffer();
596
- init_process();
597
- var baseUrl3 = "https://disc.gsfc.nasa.gov/api/";
598
- var _request4, request_fn4;
599
- var GesDiscApi = class {
600
- constructor() {
601
- __privateAdd(this, _request4);
602
- }
603
- async getCollectionByEntryId(collectionEntryId, options) {
604
- if (!collectionEntryId) {
605
- throw new BadRequestException({
606
- message: "`collectionEntryId` is required"
607
- });
608
- }
609
- return __privateMethod(this, _request4, request_fn4).call(this, `/metadata/dataset/${collectionEntryId}`, options);
610
- }
611
- };
612
- _request4 = new WeakSet();
613
- request_fn4 = function(path, requestOptions) {
614
- return apiClient.get(`${baseUrl3}${path}`, requestOptions);
615
- };
616
- var gesDiscApi = new GesDiscApi();
617
- var gesdisc_api_default = gesDiscApi;
618
-
619
- // src/queries/gesdisc.queries.ts
620
- function queryGesDiscCollection(params, options) {
621
- return {
622
- queryKey: ["gesdisc", "collection", params.collectionEntryId],
623
- queryFn: async ({ signal }) => {
624
- return gesdisc_api_default.getCollectionByEntryId(params.collectionEntryId, __spreadProps(__spreadValues({}, options), {
625
- signal
626
- }));
627
- },
628
- // prevent firing when collectionEntryId is undefined or this is not a GES DISC collection
629
- enabled: !!params.collectionEntryId && isGesDiscCollection(params.collectionConceptId)
630
- };
631
- }
632
- function isGesDiscCollection(conceptId) {
633
- var _a11;
634
- return (_a11 = conceptId == null ? void 0 : conceptId.endsWith("GES_DISC")) != null ? _a11 : false;
635
- }
636
-
637
- // src/queries/harmony.queries.ts
638
- init_dirname();
639
- init_buffer();
640
- init_process();
641
- var POLL_INTERVAL_MS = 3e3;
642
- function isFetchableHarmonyJobId(jobID) {
643
- return Boolean(jobID && jobID !== "new");
644
- }
645
- function queryHarmonyCapabilities(collectionConceptId, options) {
646
- return {
647
- queryKey: ["harmony", "capabilities", collectionConceptId],
648
- queryFn: async ({ signal }) => {
649
- return harmonyApi.getCollectionCapabilities(collectionConceptId, __spreadProps(__spreadValues({}, options), {
650
- signal
651
- }));
652
- },
653
- enabled: !!collectionConceptId
654
- };
655
- }
656
- function queryHarmonyJobStatus(jobID, options) {
657
- return {
658
- queryKey: ["harmony", "jobs", jobID],
659
- queryFn: async ({ signal }) => {
660
- if (!isFetchableHarmonyJobId(jobID))
661
- return null;
662
- return harmonyApi.getJobStatus(jobID, __spreadProps(__spreadValues({}, options), { signal }));
663
- },
664
- enabled: isFetchableHarmonyJobId(jobID),
665
- // Poll until the job reaches a final state
666
- refetchInterval: (query) => {
667
- var _a11;
668
- const status = (_a11 = query.state.data) == null ? void 0 : _a11.status;
669
- if (status && FINAL_STATUSES.has(status)) {
670
- return false;
671
- }
672
- return POLL_INTERVAL_MS;
673
- },
674
- // Job status changes frequently while running; don't use stale data
675
- staleTime: 0,
676
- gcTime: 0
677
- };
678
- }
679
- function queryCreateHarmonySubsetJob() {
680
- return {
681
- mutationFn: ({ harmonyRequest, options }) => harmonyApi.createJob(harmonyRequest, options)
682
- };
683
- }
684
- function queryCancelHarmonySubsetJob() {
685
- return {
686
- mutationFn: ({ jobId, options }) => harmonyApi.cancelJob(jobId, options)
687
- };
688
- }
689
-
690
- // src/controllers/query.controller.ts
691
- init_dirname();
692
- init_buffer();
693
- init_process();
694
-
695
- // node_modules/@tanstack/query-core/build/modern/index.js
696
- init_dirname();
697
- init_buffer();
698
- init_process();
699
-
700
- // node_modules/@tanstack/query-core/build/modern/focusManager.js
701
- init_dirname();
702
- init_buffer();
703
- init_process();
704
-
705
- // node_modules/@tanstack/query-core/build/modern/subscribable.js
706
- init_dirname();
707
- init_buffer();
708
- init_process();
709
- var Subscribable = class {
710
- constructor() {
711
- this.listeners = /* @__PURE__ */ new Set();
712
- this.subscribe = this.subscribe.bind(this);
713
- }
714
- subscribe(listener) {
715
- this.listeners.add(listener);
716
- this.onSubscribe();
717
- return () => {
718
- this.listeners.delete(listener);
719
- this.onUnsubscribe();
720
- };
721
- }
722
- hasListeners() {
723
- return this.listeners.size > 0;
724
- }
725
- onSubscribe() {
726
- }
727
- onUnsubscribe() {
728
- }
729
- };
730
-
731
- // node_modules/@tanstack/query-core/build/modern/focusManager.js
732
- var _focused, _cleanup, _setup, _a;
733
- var FocusManager = (_a = class extends Subscribable {
734
- constructor() {
735
- super();
736
- __privateAdd(this, _focused, void 0);
737
- __privateAdd(this, _cleanup, void 0);
738
- __privateAdd(this, _setup, void 0);
739
- __privateSet(this, _setup, (onFocus) => {
740
- if (typeof window !== "undefined" && window.addEventListener) {
741
- const listener = () => onFocus();
742
- window.addEventListener("visibilitychange", listener, false);
743
- return () => {
744
- window.removeEventListener("visibilitychange", listener);
745
- };
746
- }
747
- return;
748
- });
749
- }
750
- onSubscribe() {
751
- if (!__privateGet(this, _cleanup)) {
752
- this.setEventListener(__privateGet(this, _setup));
753
- }
754
- }
755
- onUnsubscribe() {
756
- var _a11;
757
- if (!this.hasListeners()) {
758
- (_a11 = __privateGet(this, _cleanup)) == null ? void 0 : _a11.call(this);
759
- __privateSet(this, _cleanup, void 0);
760
- }
761
- }
762
- setEventListener(setup) {
763
- var _a11;
764
- __privateSet(this, _setup, setup);
765
- (_a11 = __privateGet(this, _cleanup)) == null ? void 0 : _a11.call(this);
766
- __privateSet(this, _cleanup, setup((focused) => {
767
- if (typeof focused === "boolean") {
768
- this.setFocused(focused);
769
- } else {
770
- this.onFocus();
771
- }
772
- }));
773
- }
774
- setFocused(focused) {
775
- const changed = __privateGet(this, _focused) !== focused;
776
- if (changed) {
777
- __privateSet(this, _focused, focused);
778
- this.onFocus();
779
- }
780
- }
781
- onFocus() {
782
- const isFocused = this.isFocused();
783
- this.listeners.forEach((listener) => {
784
- listener(isFocused);
785
- });
786
- }
787
- isFocused() {
788
- var _a11;
789
- if (typeof __privateGet(this, _focused) === "boolean") {
790
- return __privateGet(this, _focused);
791
- }
792
- return ((_a11 = globalThis.document) == null ? void 0 : _a11.visibilityState) !== "hidden";
793
- }
794
- }, _focused = new WeakMap(), _cleanup = new WeakMap(), _setup = new WeakMap(), _a);
795
- var focusManager = new FocusManager();
796
-
797
- // node_modules/@tanstack/query-core/build/modern/environmentManager.js
798
- init_dirname();
799
- init_buffer();
800
- init_process();
801
-
802
- // node_modules/@tanstack/query-core/build/modern/utils.js
803
- init_dirname();
804
- init_buffer();
805
- init_process();
806
-
807
- // node_modules/@tanstack/query-core/build/modern/timeoutManager.js
808
- init_dirname();
809
- init_buffer();
810
- init_process();
811
- var defaultTimeoutProvider = {
812
- // We need the wrapper function syntax below instead of direct references to
813
- // global setTimeout etc.
814
- //
815
- // BAD: `setTimeout: setTimeout`
816
- // GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)`
817
- //
818
- // If we use direct references here, then anything that wants to spy on or
819
- // replace the global setTimeout (like tests) won't work since we'll already
820
- // have a hard reference to the original implementation at the time when this
821
- // file was imported.
822
- setTimeout: (callback, delay) => setTimeout(callback, delay),
823
- clearTimeout: (timeoutId) => clearTimeout(timeoutId),
824
- setInterval: (callback, delay) => setInterval(callback, delay),
825
- clearInterval: (intervalId) => clearInterval(intervalId)
826
- };
827
- var _provider, _providerCalled, _a2;
828
- var TimeoutManager = (_a2 = class {
829
- constructor() {
830
- // We cannot have TimeoutManager<T> as we must instantiate it with a concrete
831
- // type at app boot; and if we leave that type, then any new timer provider
832
- // would need to support the default provider's concrete timer ID, which is
833
- // infeasible across environments.
834
- //
835
- // We settle for type safety for the TimeoutProvider type, and accept that
836
- // this class is unsafe internally to allow for extension.
837
- __privateAdd(this, _provider, defaultTimeoutProvider);
838
- __privateAdd(this, _providerCalled, false);
839
- }
840
- setTimeoutProvider(provider) {
841
- if (false) {
842
- if (__privateGet(this, _providerCalled) && provider !== __privateGet(this, _provider)) {
843
- console.error(
844
- `[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,
845
- { previous: __privateGet(this, _provider), provider }
846
- );
847
- }
848
- }
849
- __privateSet(this, _provider, provider);
850
- if (false) {
851
- __privateSet(this, _providerCalled, false);
852
- }
853
- }
854
- setTimeout(callback, delay) {
855
- if (false) {
856
- __privateSet(this, _providerCalled, true);
857
- }
858
- return __privateGet(this, _provider).setTimeout(callback, delay);
859
- }
860
- clearTimeout(timeoutId) {
861
- __privateGet(this, _provider).clearTimeout(timeoutId);
862
- }
863
- setInterval(callback, delay) {
864
- if (false) {
865
- __privateSet(this, _providerCalled, true);
866
- }
867
- return __privateGet(this, _provider).setInterval(callback, delay);
868
- }
869
- clearInterval(intervalId) {
870
- __privateGet(this, _provider).clearInterval(intervalId);
871
- }
872
- }, _provider = new WeakMap(), _providerCalled = new WeakMap(), _a2);
873
- var timeoutManager = new TimeoutManager();
874
- function systemSetTimeoutZero(callback) {
875
- setTimeout(callback, 0);
876
- }
877
-
878
- // node_modules/@tanstack/query-core/build/modern/utils.js
879
- var isServer = typeof window === "undefined" || "Deno" in globalThis;
880
- function noop() {
881
- }
882
- function functionalUpdate(updater, input) {
883
- return typeof updater === "function" ? updater(input) : updater;
884
- }
885
- function isValidTimeout(value) {
886
- return typeof value === "number" && value >= 0 && value !== Infinity;
887
- }
888
- function timeUntilStale(updatedAt, staleTime) {
889
- return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
890
- }
891
- function resolveStaleTime(staleTime, query) {
892
- return typeof staleTime === "function" ? staleTime(query) : staleTime;
893
- }
894
- function resolveEnabled(enabled, query) {
895
- return typeof enabled === "function" ? enabled(query) : enabled;
896
- }
897
- function matchQuery(filters, query) {
898
- const {
899
- type = "all",
900
- exact,
901
- fetchStatus,
902
- predicate,
903
- queryKey,
904
- stale
905
- } = filters;
906
- if (queryKey) {
907
- if (exact) {
908
- if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {
909
- return false;
910
- }
911
- } else if (!partialMatchKey(query.queryKey, queryKey)) {
912
- return false;
913
- }
914
- }
915
- if (type !== "all") {
916
- const isActive = query.isActive();
917
- if (type === "active" && !isActive) {
918
- return false;
919
- }
920
- if (type === "inactive" && isActive) {
921
- return false;
922
- }
923
- }
924
- if (typeof stale === "boolean" && query.isStale() !== stale) {
925
- return false;
926
- }
927
- if (fetchStatus && fetchStatus !== query.state.fetchStatus) {
928
- return false;
929
- }
930
- if (predicate && !predicate(query)) {
931
- return false;
932
- }
933
- return true;
934
- }
935
- function matchMutation(filters, mutation) {
936
- const { exact, status, predicate, mutationKey } = filters;
937
- if (mutationKey) {
938
- if (!mutation.options.mutationKey) {
939
- return false;
940
- }
941
- if (exact) {
942
- if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {
943
- return false;
944
- }
945
- } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {
946
- return false;
947
- }
948
- }
949
- if (status && mutation.state.status !== status) {
950
- return false;
951
- }
952
- if (predicate && !predicate(mutation)) {
953
- return false;
954
- }
955
- return true;
956
- }
957
- function hashQueryKeyByOptions(queryKey, options) {
958
- const hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashKey;
959
- return hashFn(queryKey);
960
- }
961
- function hashKey(queryKey) {
962
- return JSON.stringify(
963
- queryKey,
964
- (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
965
- result[key] = val[key];
966
- return result;
967
- }, {}) : val
968
- );
969
- }
970
- function partialMatchKey(a, b) {
971
- if (a === b) {
972
- return true;
973
- }
974
- if (typeof a !== typeof b) {
975
- return false;
976
- }
977
- if (a && b && typeof a === "object" && typeof b === "object") {
978
- return Object.keys(b).every((key) => partialMatchKey(a[key], b[key]));
979
- }
980
- return false;
981
- }
982
- var hasOwn = Object.prototype.hasOwnProperty;
983
- function replaceEqualDeep(a, b, depth = 0) {
984
- if (a === b) {
985
- return a;
986
- }
987
- if (depth > 500)
988
- return b;
989
- const array = isPlainArray(a) && isPlainArray(b);
990
- if (!array && !(isPlainObject(a) && isPlainObject(b)))
991
- return b;
992
- const aItems = array ? a : Object.keys(a);
993
- const aSize = aItems.length;
994
- const bItems = array ? b : Object.keys(b);
995
- const bSize = bItems.length;
996
- const copy = array ? new Array(bSize) : {};
997
- let equalItems = 0;
998
- for (let i = 0; i < bSize; i++) {
999
- const key = array ? i : bItems[i];
1000
- const aItem = a[key];
1001
- const bItem = b[key];
1002
- if (aItem === bItem) {
1003
- copy[key] = aItem;
1004
- if (array ? i < aSize : hasOwn.call(a, key))
1005
- equalItems++;
1006
- continue;
1007
- }
1008
- if (aItem === null || bItem === null || typeof aItem !== "object" || typeof bItem !== "object") {
1009
- copy[key] = bItem;
1010
- continue;
1011
- }
1012
- const v = replaceEqualDeep(aItem, bItem, depth + 1);
1013
- copy[key] = v;
1014
- if (v === aItem)
1015
- equalItems++;
1016
- }
1017
- return aSize === bSize && equalItems === aSize ? a : copy;
1018
- }
1019
- function shallowEqualObjects(a, b) {
1020
- if (!b || Object.keys(a).length !== Object.keys(b).length) {
1021
- return false;
1022
- }
1023
- for (const key in a) {
1024
- if (a[key] !== b[key]) {
1025
- return false;
1026
- }
1027
- }
1028
- return true;
1029
- }
1030
- function isPlainArray(value) {
1031
- return Array.isArray(value) && value.length === Object.keys(value).length;
1032
- }
1033
- function isPlainObject(o) {
1034
- if (!hasObjectPrototype(o)) {
1035
- return false;
1036
- }
1037
- const ctor = o.constructor;
1038
- if (ctor === void 0) {
1039
- return true;
1040
- }
1041
- const prot = ctor.prototype;
1042
- if (!hasObjectPrototype(prot)) {
1043
- return false;
1044
- }
1045
- if (!prot.hasOwnProperty("isPrototypeOf")) {
1046
- return false;
1047
- }
1048
- if (Object.getPrototypeOf(o) !== Object.prototype) {
1049
- return false;
1050
- }
1051
- return true;
1052
- }
1053
- function hasObjectPrototype(o) {
1054
- return Object.prototype.toString.call(o) === "[object Object]";
1055
- }
1056
- function sleep(timeout) {
1057
- return new Promise((resolve) => {
1058
- timeoutManager.setTimeout(resolve, timeout);
1059
- });
1060
- }
1061
- function replaceData(prevData, data, options) {
1062
- if (typeof options.structuralSharing === "function") {
1063
- return options.structuralSharing(prevData, data);
1064
- } else if (options.structuralSharing !== false) {
1065
- if (false) {
1066
- try {
1067
- return replaceEqualDeep(prevData, data);
1068
- } catch (error) {
1069
- console.error(
1070
- `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}`
1071
- );
1072
- throw error;
1073
- }
1074
- }
1075
- return replaceEqualDeep(prevData, data);
1076
- }
1077
- return data;
1078
- }
1079
- function addToEnd(items, item, max = 0) {
1080
- const newItems = [...items, item];
1081
- return max && newItems.length > max ? newItems.slice(1) : newItems;
1082
- }
1083
- function addToStart(items, item, max = 0) {
1084
- const newItems = [item, ...items];
1085
- return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
1086
- }
1087
- var skipToken = /* @__PURE__ */ Symbol();
1088
- function ensureQueryFn(options, fetchOptions) {
1089
- if (false) {
1090
- if (options.queryFn === skipToken) {
1091
- console.error(
1092
- `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`
1093
- );
1094
- }
1095
- }
1096
- if (!options.queryFn && (fetchOptions == null ? void 0 : fetchOptions.initialPromise)) {
1097
- return () => fetchOptions.initialPromise;
1098
- }
1099
- if (!options.queryFn || options.queryFn === skipToken) {
1100
- return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));
1101
- }
1102
- return options.queryFn;
1103
- }
1104
- function addConsumeAwareSignal(object, getSignal, onCancelled) {
1105
- let consumed = false;
1106
- let signal;
1107
- Object.defineProperty(object, "signal", {
1108
- enumerable: true,
1109
- get: () => {
1110
- signal != null ? signal : signal = getSignal();
1111
- if (consumed) {
1112
- return signal;
1113
- }
1114
- consumed = true;
1115
- if (signal.aborted) {
1116
- onCancelled();
1117
- } else {
1118
- signal.addEventListener("abort", onCancelled, { once: true });
1119
- }
1120
- return signal;
1121
- }
1122
- });
1123
- return object;
1124
- }
1125
-
1126
- // node_modules/@tanstack/query-core/build/modern/environmentManager.js
1127
- var environmentManager = /* @__PURE__ */ (() => {
1128
- let isServerFn = () => isServer;
1129
- return {
1130
- /**
1131
- * Returns whether the current runtime should be treated as a server environment.
1132
- */
1133
- isServer() {
1134
- return isServerFn();
1135
- },
1136
- /**
1137
- * Overrides the server check globally.
1138
- */
1139
- setIsServer(isServerValue) {
1140
- isServerFn = isServerValue;
1141
- }
1142
- };
1143
- })();
1144
-
1145
- // node_modules/@tanstack/query-core/build/modern/hydration.js
1146
- init_dirname();
1147
- init_buffer();
1148
- init_process();
1149
-
1150
- // node_modules/@tanstack/query-core/build/modern/thenable.js
1151
- init_dirname();
1152
- init_buffer();
1153
- init_process();
1154
- function pendingThenable() {
1155
- let resolve;
1156
- let reject;
1157
- const thenable = new Promise((_resolve, _reject) => {
1158
- resolve = _resolve;
1159
- reject = _reject;
1160
- });
1161
- thenable.status = "pending";
1162
- thenable.catch(() => {
1163
- });
1164
- function finalize(data) {
1165
- Object.assign(thenable, data);
1166
- delete thenable.resolve;
1167
- delete thenable.reject;
1168
- }
1169
- thenable.resolve = (value) => {
1170
- finalize({
1171
- status: "fulfilled",
1172
- value
1173
- });
1174
- resolve(value);
1175
- };
1176
- thenable.reject = (reason) => {
1177
- finalize({
1178
- status: "rejected",
1179
- reason
1180
- });
1181
- reject(reason);
1182
- };
1183
- return thenable;
1184
- }
1185
- function tryResolveSync(promise) {
1186
- var _a11;
1187
- let data;
1188
- (_a11 = promise.then((result) => {
1189
- data = result;
1190
- return result;
1191
- }, noop)) == null ? void 0 : _a11.catch(noop);
1192
- if (data !== void 0) {
1193
- return { data };
1194
- }
1195
- return void 0;
1196
- }
1197
-
1198
- // node_modules/@tanstack/query-core/build/modern/hydration.js
1199
- function defaultTransformerFn(data) {
1200
- return data;
1201
- }
1202
- function dehydrateMutation(mutation) {
1203
- return __spreadValues(__spreadValues({
1204
- mutationKey: mutation.options.mutationKey,
1205
- state: mutation.state
1206
- }, mutation.options.scope && { scope: mutation.options.scope }), mutation.meta && { meta: mutation.meta });
1207
- }
1208
- function dehydrateQuery(query, serializeData, shouldRedactErrors) {
1209
- const dehydratePromise = () => {
1210
- var _a11;
1211
- const promise = (_a11 = query.promise) == null ? void 0 : _a11.then(serializeData).catch((error) => {
1212
- if (!shouldRedactErrors(error)) {
1213
- return Promise.reject(error);
1214
- }
1215
- if (false) {
1216
- console.error(
1217
- `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`
1218
- );
1219
- }
1220
- return Promise.reject(new Error("redacted"));
1221
- });
1222
- promise == null ? void 0 : promise.catch(noop);
1223
- return promise;
1224
- };
1225
- return __spreadValues(__spreadValues({
1226
- dehydratedAt: Date.now(),
1227
- state: __spreadValues(__spreadValues({}, query.state), query.state.data !== void 0 && {
1228
- data: serializeData(query.state.data)
1229
- }),
1230
- queryKey: query.queryKey,
1231
- queryHash: query.queryHash
1232
- }, query.state.status === "pending" && {
1233
- promise: dehydratePromise()
1234
- }), query.meta && { meta: query.meta });
1235
- }
1236
- function defaultShouldDehydrateMutation(mutation) {
1237
- return mutation.state.isPaused;
1238
- }
1239
- function defaultShouldDehydrateQuery(query) {
1240
- return query.state.status === "success";
1241
- }
1242
- function defaultShouldRedactErrors(_) {
1243
- return true;
1244
- }
1245
- function dehydrate(client, options = {}) {
1246
- var _a11, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
1247
- const filterMutation = (_c = (_b2 = options.shouldDehydrateMutation) != null ? _b2 : (_a11 = client.getDefaultOptions().dehydrate) == null ? void 0 : _a11.shouldDehydrateMutation) != null ? _c : defaultShouldDehydrateMutation;
1248
- const mutations = client.getMutationCache().getAll().flatMap(
1249
- (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []
1250
- );
1251
- const filterQuery = (_f = (_e = options.shouldDehydrateQuery) != null ? _e : (_d = client.getDefaultOptions().dehydrate) == null ? void 0 : _d.shouldDehydrateQuery) != null ? _f : defaultShouldDehydrateQuery;
1252
- const shouldRedactErrors = (_i = (_h = options.shouldRedactErrors) != null ? _h : (_g = client.getDefaultOptions().dehydrate) == null ? void 0 : _g.shouldRedactErrors) != null ? _i : defaultShouldRedactErrors;
1253
- const serializeData = (_l = (_k = options.serializeData) != null ? _k : (_j = client.getDefaultOptions().dehydrate) == null ? void 0 : _j.serializeData) != null ? _l : defaultTransformerFn;
1254
- const queries = client.getQueryCache().getAll().flatMap(
1255
- (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData, shouldRedactErrors)] : []
1256
- );
1257
- return { mutations, queries };
1258
- }
1259
- function hydrate(client, dehydratedState, options) {
1260
- var _a11, _b2, _c, _d;
1261
- if (typeof dehydratedState !== "object" || dehydratedState === null) {
1262
- return;
1263
- }
1264
- const mutationCache = client.getMutationCache();
1265
- const queryCache = client.getQueryCache();
1266
- 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;
1267
- const mutations = dehydratedState.mutations || [];
1268
- const queries = dehydratedState.queries || [];
1269
- mutations.forEach((_e) => {
1270
- var _f = _e, { state } = _f, mutationOptions = __objRest(_f, ["state"]);
1271
- var _a12, _b3;
1272
- mutationCache.build(
1273
- client,
1274
- __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),
1275
- state
1276
- );
1277
- });
1278
- queries.forEach(
1279
- ({ queryKey, state, queryHash, meta, promise, dehydratedAt }) => {
1280
- var _b3, _c2;
1281
- const syncData = promise ? tryResolveSync(promise) : void 0;
1282
- const rawData = state.data === void 0 ? syncData == null ? void 0 : syncData.data : state.data;
1283
- const data = rawData === void 0 ? rawData : deserializeData(rawData);
1284
- let query = queryCache.get(queryHash);
1285
- const existingQueryIsPending = (query == null ? void 0 : query.state.status) === "pending";
1286
- const existingQueryIsFetching = (query == null ? void 0 : query.state.fetchStatus) === "fetching";
1287
- if (query) {
1288
- const hasNewerSyncData = syncData && // We only need this undefined check to handle older dehydration
1289
- // payloads that might not have dehydratedAt
1290
- dehydratedAt !== void 0 && dehydratedAt > query.state.dataUpdatedAt;
1291
- if (state.dataUpdatedAt > query.state.dataUpdatedAt || hasNewerSyncData) {
1292
- const _a12 = state, { fetchStatus: _ignored } = _a12, serializedState = __objRest(_a12, ["fetchStatus"]);
1293
- query.setState(__spreadProps(__spreadValues({}, serializedState), {
1294
- data
1295
- }));
1296
- }
1297
- } else {
1298
- query = queryCache.build(
1299
- client,
1300
- __spreadProps(__spreadValues(__spreadValues({}, (_b3 = client.getDefaultOptions().hydrate) == null ? void 0 : _b3.queries), (_c2 = options == null ? void 0 : options.defaultOptions) == null ? void 0 : _c2.queries), {
1301
- queryKey,
1302
- queryHash,
1303
- meta
1304
- }),
1305
- // Reset fetch status to idle to avoid
1306
- // query being stuck in fetching state upon hydration
1307
- __spreadProps(__spreadValues({}, state), {
1308
- data,
1309
- fetchStatus: "idle",
1310
- status: data !== void 0 ? "success" : state.status
1311
- })
1312
- );
1313
- }
1314
- if (promise && !existingQueryIsPending && !existingQueryIsFetching && // Only hydrate if dehydration is newer than any existing data,
1315
- // this is always true for new queries
1316
- (dehydratedAt === void 0 || dehydratedAt > query.state.dataUpdatedAt)) {
1317
- query.fetch(void 0, {
1318
- // RSC transformed promises are not thenable
1319
- initialPromise: Promise.resolve(promise).then(deserializeData)
1320
- }).catch(noop);
1321
- }
1322
- }
1323
- );
1324
- }
1325
-
1326
- // node_modules/@tanstack/query-core/build/modern/queryObserver.js
1327
- init_dirname();
1328
- init_buffer();
1329
- init_process();
1330
-
1331
- // node_modules/@tanstack/query-core/build/modern/notifyManager.js
1332
- init_dirname();
1333
- init_buffer();
1334
- init_process();
1335
- var defaultScheduler = systemSetTimeoutZero;
1336
- function createNotifyManager() {
1337
- let queue = [];
1338
- let transactions = 0;
1339
- let notifyFn = (callback) => {
1340
- callback();
1341
- };
1342
- let batchNotifyFn = (callback) => {
1343
- callback();
1344
- };
1345
- let scheduleFn = defaultScheduler;
1346
- const schedule = (callback) => {
1347
- if (transactions) {
1348
- queue.push(callback);
1349
- } else {
1350
- scheduleFn(() => {
1351
- notifyFn(callback);
1352
- });
1353
- }
1354
- };
1355
- const flush = () => {
1356
- const originalQueue = queue;
1357
- queue = [];
1358
- if (originalQueue.length) {
1359
- scheduleFn(() => {
1360
- batchNotifyFn(() => {
1361
- originalQueue.forEach((callback) => {
1362
- notifyFn(callback);
1363
- });
1364
- });
1365
- });
1366
- }
1367
- };
1368
- return {
1369
- batch: (callback) => {
1370
- let result;
1371
- transactions++;
1372
- try {
1373
- result = callback();
1374
- } finally {
1375
- transactions--;
1376
- if (!transactions) {
1377
- flush();
1378
- }
1379
- }
1380
- return result;
1381
- },
1382
- /**
1383
- * All calls to the wrapped function will be batched.
1384
- */
1385
- batchCalls: (callback) => {
1386
- return (...args) => {
1387
- schedule(() => {
1388
- callback(...args);
1389
- });
1390
- };
1391
- },
1392
- schedule,
1393
- /**
1394
- * Use this method to set a custom notify function.
1395
- * This can be used to for example wrap notifications with `React.act` while running tests.
1396
- */
1397
- setNotifyFunction: (fn) => {
1398
- notifyFn = fn;
1399
- },
1400
- /**
1401
- * Use this method to set a custom function to batch notifications together into a single tick.
1402
- * By default React Query will use the batch function provided by ReactDOM or React Native.
1403
- */
1404
- setBatchNotifyFunction: (fn) => {
1405
- batchNotifyFn = fn;
1406
- },
1407
- setScheduler: (fn) => {
1408
- scheduleFn = fn;
1409
- }
1410
- };
1411
- }
1412
- var notifyManager = createNotifyManager();
1413
-
1414
- // node_modules/@tanstack/query-core/build/modern/query.js
1415
- init_dirname();
1416
- init_buffer();
1417
- init_process();
1418
-
1419
- // node_modules/@tanstack/query-core/build/modern/retryer.js
1420
- init_dirname();
1421
- init_buffer();
1422
- init_process();
1423
-
1424
- // node_modules/@tanstack/query-core/build/modern/onlineManager.js
1425
- init_dirname();
1426
- init_buffer();
1427
- init_process();
1428
- var _online, _cleanup2, _setup2, _a3;
1429
- var OnlineManager = (_a3 = class extends Subscribable {
1430
- constructor() {
1431
- super();
1432
- __privateAdd(this, _online, true);
1433
- __privateAdd(this, _cleanup2, void 0);
1434
- __privateAdd(this, _setup2, void 0);
1435
- __privateSet(this, _setup2, (onOnline) => {
1436
- if (typeof window !== "undefined" && window.addEventListener) {
1437
- const onlineListener = () => onOnline(true);
1438
- const offlineListener = () => onOnline(false);
1439
- window.addEventListener("online", onlineListener, false);
1440
- window.addEventListener("offline", offlineListener, false);
1441
- return () => {
1442
- window.removeEventListener("online", onlineListener);
1443
- window.removeEventListener("offline", offlineListener);
1444
- };
1445
- }
1446
- return;
1447
- });
1448
- }
1449
- onSubscribe() {
1450
- if (!__privateGet(this, _cleanup2)) {
1451
- this.setEventListener(__privateGet(this, _setup2));
1452
- }
1453
- }
1454
- onUnsubscribe() {
1455
- var _a11;
1456
- if (!this.hasListeners()) {
1457
- (_a11 = __privateGet(this, _cleanup2)) == null ? void 0 : _a11.call(this);
1458
- __privateSet(this, _cleanup2, void 0);
1459
- }
1460
- }
1461
- setEventListener(setup) {
1462
- var _a11;
1463
- __privateSet(this, _setup2, setup);
1464
- (_a11 = __privateGet(this, _cleanup2)) == null ? void 0 : _a11.call(this);
1465
- __privateSet(this, _cleanup2, setup(this.setOnline.bind(this)));
1466
- }
1467
- setOnline(online) {
1468
- const changed = __privateGet(this, _online) !== online;
1469
- if (changed) {
1470
- __privateSet(this, _online, online);
1471
- this.listeners.forEach((listener) => {
1472
- listener(online);
1473
- });
1474
- }
1475
- }
1476
- isOnline() {
1477
- return __privateGet(this, _online);
1478
- }
1479
- }, _online = new WeakMap(), _cleanup2 = new WeakMap(), _setup2 = new WeakMap(), _a3);
1480
- var onlineManager = new OnlineManager();
1481
-
1482
- // node_modules/@tanstack/query-core/build/modern/retryer.js
1483
- function defaultRetryDelay(failureCount) {
1484
- return Math.min(1e3 * 2 ** failureCount, 3e4);
1485
- }
1486
- function canFetch(networkMode) {
1487
- return (networkMode != null ? networkMode : "online") === "online" ? onlineManager.isOnline() : true;
1488
- }
1489
- var CancelledError = class extends Error {
1490
- constructor(options) {
1491
- super("CancelledError");
1492
- this.revert = options == null ? void 0 : options.revert;
1493
- this.silent = options == null ? void 0 : options.silent;
1494
- }
1495
- };
1496
- function createRetryer(config) {
1497
- let isRetryCancelled = false;
1498
- let failureCount = 0;
1499
- let continueFn;
1500
- const thenable = pendingThenable();
1501
- const isResolved = () => thenable.status !== "pending";
1502
- const cancel = (cancelOptions) => {
1503
- var _a11;
1504
- if (!isResolved()) {
1505
- const error = new CancelledError(cancelOptions);
1506
- reject(error);
1507
- (_a11 = config.onCancel) == null ? void 0 : _a11.call(config, error);
1508
- }
1509
- };
1510
- const cancelRetry = () => {
1511
- isRetryCancelled = true;
1512
- };
1513
- const continueRetry = () => {
1514
- isRetryCancelled = false;
1515
- };
1516
- const canContinue = () => focusManager.isFocused() && (config.networkMode === "always" || onlineManager.isOnline()) && config.canRun();
1517
- const canStart = () => canFetch(config.networkMode) && config.canRun();
1518
- const resolve = (value) => {
1519
- if (!isResolved()) {
1520
- continueFn == null ? void 0 : continueFn();
1521
- thenable.resolve(value);
1522
- }
1523
- };
1524
- const reject = (value) => {
1525
- if (!isResolved()) {
1526
- continueFn == null ? void 0 : continueFn();
1527
- thenable.reject(value);
1528
- }
1529
- };
1530
- const pause = () => {
1531
- return new Promise((continueResolve) => {
1532
- var _a11;
1533
- continueFn = (value) => {
1534
- if (isResolved() || canContinue()) {
1535
- continueResolve(value);
1536
- }
1537
- };
1538
- (_a11 = config.onPause) == null ? void 0 : _a11.call(config);
1539
- }).then(() => {
1540
- var _a11;
1541
- continueFn = void 0;
1542
- if (!isResolved()) {
1543
- (_a11 = config.onContinue) == null ? void 0 : _a11.call(config);
1544
- }
1545
- });
1546
- };
1547
- const run = () => {
1548
- if (isResolved()) {
1549
- return;
1550
- }
1551
- let promiseOrValue;
1552
- const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
1553
- try {
1554
- promiseOrValue = initialPromise != null ? initialPromise : config.fn();
1555
- } catch (error) {
1556
- promiseOrValue = Promise.reject(error);
1557
- }
1558
- Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
1559
- var _a11, _b2, _c;
1560
- if (isResolved()) {
1561
- return;
1562
- }
1563
- const retry = (_a11 = config.retry) != null ? _a11 : environmentManager.isServer() ? 0 : 3;
1564
- const retryDelay = (_b2 = config.retryDelay) != null ? _b2 : defaultRetryDelay;
1565
- const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
1566
- const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
1567
- if (isRetryCancelled || !shouldRetry) {
1568
- reject(error);
1569
- return;
1570
- }
1571
- failureCount++;
1572
- (_c = config.onFail) == null ? void 0 : _c.call(config, failureCount, error);
1573
- sleep(delay).then(() => {
1574
- return canContinue() ? void 0 : pause();
1575
- }).then(() => {
1576
- if (isRetryCancelled) {
1577
- reject(error);
1578
- } else {
1579
- run();
1580
- }
1581
- });
1582
- });
1583
- };
1584
- return {
1585
- promise: thenable,
1586
- status: () => thenable.status,
1587
- cancel,
1588
- continue: () => {
1589
- continueFn == null ? void 0 : continueFn();
1590
- return thenable;
1591
- },
1592
- cancelRetry,
1593
- continueRetry,
1594
- canStart,
1595
- start: () => {
1596
- if (canStart()) {
1597
- run();
1598
- } else {
1599
- pause().then(run);
1600
- }
1601
- return thenable;
1602
- }
1603
- };
1604
- }
1605
-
1606
- // node_modules/@tanstack/query-core/build/modern/removable.js
1607
- init_dirname();
1608
- init_buffer();
1609
- init_process();
1610
- var _gcTimeout, _a4;
1611
- var Removable = (_a4 = class {
1612
- constructor() {
1613
- __privateAdd(this, _gcTimeout, void 0);
1614
- }
1615
- destroy() {
1616
- this.clearGcTimeout();
1617
- }
1618
- scheduleGc() {
1619
- this.clearGcTimeout();
1620
- if (isValidTimeout(this.gcTime)) {
1621
- __privateSet(this, _gcTimeout, timeoutManager.setTimeout(() => {
1622
- this.optionalRemove();
1623
- }, this.gcTime));
1624
- }
1625
- }
1626
- updateGcTime(newGcTime) {
1627
- this.gcTime = Math.max(
1628
- this.gcTime || 0,
1629
- newGcTime != null ? newGcTime : environmentManager.isServer() ? Infinity : 5 * 60 * 1e3
1630
- );
1631
- }
1632
- clearGcTimeout() {
1633
- if (__privateGet(this, _gcTimeout)) {
1634
- timeoutManager.clearTimeout(__privateGet(this, _gcTimeout));
1635
- __privateSet(this, _gcTimeout, void 0);
1636
- }
1637
- }
1638
- }, _gcTimeout = new WeakMap(), _a4);
1639
-
1640
- // node_modules/@tanstack/query-core/build/modern/query.js
1641
- var _initialState, _revertState, _cache, _client, _retryer, _defaultOptions, _abortSignalConsumed, _isInitialPausedFetch, isInitialPausedFetch_fn, _dispatch, dispatch_fn, _a5;
1642
- var Query = (_a5 = class extends Removable {
1643
- constructor(config) {
1644
- var _a11;
1645
- super();
1646
- __privateAdd(this, _isInitialPausedFetch);
1647
- __privateAdd(this, _dispatch);
1648
- __privateAdd(this, _initialState, void 0);
1649
- __privateAdd(this, _revertState, void 0);
1650
- __privateAdd(this, _cache, void 0);
1651
- __privateAdd(this, _client, void 0);
1652
- __privateAdd(this, _retryer, void 0);
1653
- __privateAdd(this, _defaultOptions, void 0);
1654
- __privateAdd(this, _abortSignalConsumed, void 0);
1655
- __privateSet(this, _abortSignalConsumed, false);
1656
- __privateSet(this, _defaultOptions, config.defaultOptions);
1657
- this.setOptions(config.options);
1658
- this.observers = [];
1659
- __privateSet(this, _client, config.client);
1660
- __privateSet(this, _cache, __privateGet(this, _client).getQueryCache());
1661
- this.queryKey = config.queryKey;
1662
- this.queryHash = config.queryHash;
1663
- __privateSet(this, _initialState, getDefaultState(this.options));
1664
- this.state = (_a11 = config.state) != null ? _a11 : __privateGet(this, _initialState);
1665
- this.scheduleGc();
1666
- }
1667
- get meta() {
1668
- return this.options.meta;
1669
- }
1670
- get promise() {
1671
- var _a11;
1672
- return (_a11 = __privateGet(this, _retryer)) == null ? void 0 : _a11.promise;
1673
- }
1674
- setOptions(options) {
1675
- this.options = __spreadValues(__spreadValues({}, __privateGet(this, _defaultOptions)), options);
1676
- this.updateGcTime(this.options.gcTime);
1677
- if (this.state && this.state.data === void 0) {
1678
- const defaultState = getDefaultState(this.options);
1679
- if (defaultState.data !== void 0) {
1680
- this.setState(
1681
- successState(defaultState.data, defaultState.dataUpdatedAt)
1682
- );
1683
- __privateSet(this, _initialState, defaultState);
1684
- }
1685
- }
1686
- }
1687
- optionalRemove() {
1688
- if (!this.observers.length && this.state.fetchStatus === "idle") {
1689
- __privateGet(this, _cache).remove(this);
1690
- }
1691
- }
1692
- setData(newData, options) {
1693
- const data = replaceData(this.state.data, newData, this.options);
1694
- __privateMethod(this, _dispatch, dispatch_fn).call(this, {
1695
- data,
1696
- type: "success",
1697
- dataUpdatedAt: options == null ? void 0 : options.updatedAt,
1698
- manual: options == null ? void 0 : options.manual
1699
- });
1700
- return data;
1701
- }
1702
- setState(state, setStateOptions) {
1703
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "setState", state, setStateOptions });
1704
- }
1705
- cancel(options) {
1706
- var _a11, _b2;
1707
- const promise = (_a11 = __privateGet(this, _retryer)) == null ? void 0 : _a11.promise;
1708
- (_b2 = __privateGet(this, _retryer)) == null ? void 0 : _b2.cancel(options);
1709
- return promise ? promise.then(noop).catch(noop) : Promise.resolve();
1710
- }
1711
- destroy() {
1712
- super.destroy();
1713
- this.cancel({ silent: true });
1714
- }
1715
- get resetState() {
1716
- return __privateGet(this, _initialState);
1717
- }
1718
- reset() {
1719
- this.destroy();
1720
- this.setState(this.resetState);
1721
- }
1722
- isActive() {
1723
- return this.observers.some(
1724
- (observer) => resolveEnabled(observer.options.enabled, this) !== false
1725
- );
1726
- }
1727
- isDisabled() {
1728
- if (this.getObserversCount() > 0) {
1729
- return !this.isActive();
1730
- }
1731
- return this.options.queryFn === skipToken || !this.isFetched();
1732
- }
1733
- isFetched() {
1734
- return this.state.dataUpdateCount + this.state.errorUpdateCount > 0;
1735
- }
1736
- isStatic() {
1737
- if (this.getObserversCount() > 0) {
1738
- return this.observers.some(
1739
- (observer) => resolveStaleTime(observer.options.staleTime, this) === "static"
1740
- );
1741
- }
1742
- return false;
1743
- }
1744
- isStale() {
1745
- if (this.getObserversCount() > 0) {
1746
- return this.observers.some(
1747
- (observer) => observer.getCurrentResult().isStale
1748
- );
1749
- }
1750
- return this.state.data === void 0 || this.state.isInvalidated;
1751
- }
1752
- isStaleByTime(staleTime = 0) {
1753
- if (this.state.data === void 0) {
1754
- return true;
1755
- }
1756
- if (staleTime === "static") {
1757
- return false;
1758
- }
1759
- if (this.state.isInvalidated) {
1760
- return true;
1761
- }
1762
- return !timeUntilStale(this.state.dataUpdatedAt, staleTime);
1763
- }
1764
- onFocus() {
1765
- var _a11;
1766
- const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());
1767
- observer == null ? void 0 : observer.refetch({ cancelRefetch: false });
1768
- (_a11 = __privateGet(this, _retryer)) == null ? void 0 : _a11.continue();
1769
- }
1770
- onOnline() {
1771
- var _a11;
1772
- const observer = this.observers.find((x) => x.shouldFetchOnReconnect());
1773
- observer == null ? void 0 : observer.refetch({ cancelRefetch: false });
1774
- (_a11 = __privateGet(this, _retryer)) == null ? void 0 : _a11.continue();
1775
- }
1776
- addObserver(observer) {
1777
- if (!this.observers.includes(observer)) {
1778
- this.observers.push(observer);
1779
- this.clearGcTimeout();
1780
- __privateGet(this, _cache).notify({ type: "observerAdded", query: this, observer });
1781
- }
1782
- }
1783
- removeObserver(observer) {
1784
- if (this.observers.includes(observer)) {
1785
- this.observers = this.observers.filter((x) => x !== observer);
1786
- if (!this.observers.length) {
1787
- if (__privateGet(this, _retryer)) {
1788
- if (__privateGet(this, _abortSignalConsumed) || __privateMethod(this, _isInitialPausedFetch, isInitialPausedFetch_fn).call(this)) {
1789
- __privateGet(this, _retryer).cancel({ revert: true });
1790
- } else {
1791
- __privateGet(this, _retryer).cancelRetry();
1792
- }
1793
- }
1794
- this.scheduleGc();
1795
- }
1796
- __privateGet(this, _cache).notify({ type: "observerRemoved", query: this, observer });
1797
- }
1798
- }
1799
- getObserversCount() {
1800
- return this.observers.length;
1801
- }
1802
- invalidate() {
1803
- if (!this.state.isInvalidated) {
1804
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "invalidate" });
1805
- }
1806
- }
1807
- async fetch(options, fetchOptions) {
1808
- var _a11, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
1809
- if (this.state.fetchStatus !== "idle" && // If the promise in the retryer is already rejected, we have to definitely
1810
- // re-start the fetch; there is a chance that the query is still in a
1811
- // pending state when that happens
1812
- ((_a11 = __privateGet(this, _retryer)) == null ? void 0 : _a11.status()) !== "rejected") {
1813
- if (this.state.data !== void 0 && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) {
1814
- this.cancel({ silent: true });
1815
- } else if (__privateGet(this, _retryer)) {
1816
- __privateGet(this, _retryer).continueRetry();
1817
- return __privateGet(this, _retryer).promise;
1818
- }
1819
- }
1820
- if (options) {
1821
- this.setOptions(options);
1822
- }
1823
- if (!this.options.queryFn) {
1824
- const observer = this.observers.find((x) => x.options.queryFn);
1825
- if (observer) {
1826
- this.setOptions(observer.options);
1827
- }
1828
- }
1829
- if (false) {
1830
- if (!Array.isArray(this.options.queryKey)) {
1831
- console.error(
1832
- `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']`
1833
- );
1834
- }
1835
- }
1836
- const abortController = new AbortController();
1837
- const addSignalProperty = (object) => {
1838
- Object.defineProperty(object, "signal", {
1839
- enumerable: true,
1840
- get: () => {
1841
- __privateSet(this, _abortSignalConsumed, true);
1842
- return abortController.signal;
1843
- }
1844
- });
1845
- };
1846
- const fetchFn = () => {
1847
- const queryFn = ensureQueryFn(this.options, fetchOptions);
1848
- const createQueryFnContext = () => {
1849
- const queryFnContext2 = {
1850
- client: __privateGet(this, _client),
1851
- queryKey: this.queryKey,
1852
- meta: this.meta
1853
- };
1854
- addSignalProperty(queryFnContext2);
1855
- return queryFnContext2;
1856
- };
1857
- const queryFnContext = createQueryFnContext();
1858
- __privateSet(this, _abortSignalConsumed, false);
1859
- if (this.options.persister) {
1860
- return this.options.persister(
1861
- queryFn,
1862
- queryFnContext,
1863
- this
1864
- );
1865
- }
1866
- return queryFn(queryFnContext);
1867
- };
1868
- const createFetchContext = () => {
1869
- const context2 = {
1870
- fetchOptions,
1871
- options: this.options,
1872
- queryKey: this.queryKey,
1873
- client: __privateGet(this, _client),
1874
- state: this.state,
1875
- fetchFn
1876
- };
1877
- addSignalProperty(context2);
1878
- return context2;
1879
- };
1880
- const context = createFetchContext();
1881
- (_b2 = this.options.behavior) == null ? void 0 : _b2.onFetch(context, this);
1882
- __privateSet(this, _revertState, this.state);
1883
- if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((_c = context.fetchOptions) == null ? void 0 : _c.meta)) {
1884
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "fetch", meta: (_d = context.fetchOptions) == null ? void 0 : _d.meta });
1885
- }
1886
- __privateSet(this, _retryer, createRetryer({
1887
- initialPromise: fetchOptions == null ? void 0 : fetchOptions.initialPromise,
1888
- fn: context.fetchFn,
1889
- onCancel: (error) => {
1890
- if (error instanceof CancelledError && error.revert) {
1891
- this.setState(__spreadProps(__spreadValues({}, __privateGet(this, _revertState)), {
1892
- fetchStatus: "idle"
1893
- }));
1894
- }
1895
- abortController.abort();
1896
- },
1897
- onFail: (failureCount, error) => {
1898
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "failed", failureCount, error });
1899
- },
1900
- onPause: () => {
1901
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "pause" });
1902
- },
1903
- onContinue: () => {
1904
- __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: "continue" });
1905
- },
1906
- retry: context.options.retry,
1907
- retryDelay: context.options.retryDelay,
1908
- networkMode: context.options.networkMode,
1909
- canRun: () => true
1910
- }));
1911
- try {
1912
- const data = await __privateGet(this, _retryer).start();
1913
- if (data === void 0) {
1914
- if (false) {
1915
- console.error(
1916
- `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
1917
- );
1918
- }
1919
- throw new Error(`${this.queryHash} data is undefined`);
1920
- }
1921
- this.setData(data);
1922
- (_f = (_e = __privateGet(this, _cache).config).onSuccess) == null ? void 0 : _f.call(_e, data, this);
1923
- (_h = (_g = __privateGet(this, _cache).config).onSettled) == null ? void 0 : _h.call(
1924
- _g,
1925
- data,
1926
- this.state.error,
1927
- this
1928
- );
1929
- return data;
1930
- } catch (error) {
1931
- if (error instanceof CancelledError) {
1932
- if (error.silent) {
1933
- return __privateGet(this, _retryer).promise;
1934
- } else if (error.revert) {
1935
- if (this.state.data === void 0) {
1936
- throw error;
1937
- }
1938
- return this.state.data;
1939
- }
1940
- }
1941
- __privateMethod(this, _dispatch, dispatch_fn).call(this, {
1942
- type: "error",
1943
- error
1944
- });
1945
- (_j = (_i = __privateGet(this, _cache).config).onError) == null ? void 0 : _j.call(
1946
- _i,
1947
- error,
1948
- this
1949
- );
1950
- (_l = (_k = __privateGet(this, _cache).config).onSettled) == null ? void 0 : _l.call(
1951
- _k,
1952
- this.state.data,
1953
- error,
1954
- this
1955
- );
1956
- throw error;
1957
- } finally {
1958
- this.scheduleGc();
1959
- }
1960
- }
1961
- }, _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() {
1962
- return this.state.fetchStatus === "paused" && this.state.status === "pending";
1963
- }, _dispatch = new WeakSet(), dispatch_fn = function(action) {
1964
- const reducer = (state) => {
1965
- var _a11;
1966
- switch (action.type) {
1967
- case "failed":
1968
- return __spreadProps(__spreadValues({}, state), {
1969
- fetchFailureCount: action.failureCount,
1970
- fetchFailureReason: action.error
1971
- });
1972
- case "pause":
1973
- return __spreadProps(__spreadValues({}, state), {
1974
- fetchStatus: "paused"
1975
- });
1976
- case "continue":
1977
- return __spreadProps(__spreadValues({}, state), {
1978
- fetchStatus: "fetching"
1979
- });
1980
- case "fetch":
1981
- return __spreadProps(__spreadValues(__spreadValues({}, state), fetchState(state.data, this.options)), {
1982
- fetchMeta: (_a11 = action.meta) != null ? _a11 : null
1983
- });
1984
- case "success":
1985
- const newState = __spreadValues(__spreadProps(__spreadValues(__spreadValues({}, state), successState(action.data, action.dataUpdatedAt)), {
1986
- dataUpdateCount: state.dataUpdateCount + 1
1987
- }), !action.manual && {
1988
- fetchStatus: "idle",
1989
- fetchFailureCount: 0,
1990
- fetchFailureReason: null
1991
- });
1992
- __privateSet(this, _revertState, action.manual ? newState : void 0);
1993
- return newState;
1994
- case "error":
1995
- const error = action.error;
1996
- return __spreadProps(__spreadValues({}, state), {
1997
- error,
1998
- errorUpdateCount: state.errorUpdateCount + 1,
1999
- errorUpdatedAt: Date.now(),
2000
- fetchFailureCount: state.fetchFailureCount + 1,
2001
- fetchFailureReason: error,
2002
- fetchStatus: "idle",
2003
- status: "error",
2004
- // flag existing data as invalidated if we get a background error
2005
- // note that "no data" always means stale so we can set unconditionally here
2006
- isInvalidated: true
2007
- });
2008
- case "invalidate":
2009
- return __spreadProps(__spreadValues({}, state), {
2010
- isInvalidated: true
2011
- });
2012
- case "setState":
2013
- return __spreadValues(__spreadValues({}, state), action.state);
2014
- }
2015
- };
2016
- this.state = reducer(this.state);
2017
- notifyManager.batch(() => {
2018
- this.observers.forEach((observer) => {
2019
- observer.onQueryUpdate();
2020
- });
2021
- __privateGet(this, _cache).notify({ query: this, type: "updated", action });
2022
- });
2023
- }, _a5);
2024
- function fetchState(data, options) {
2025
- return __spreadValues({
2026
- fetchFailureCount: 0,
2027
- fetchFailureReason: null,
2028
- fetchStatus: canFetch(options.networkMode) ? "fetching" : "paused"
2029
- }, data === void 0 && {
2030
- error: null,
2031
- status: "pending"
2032
- });
2033
- }
2034
- function successState(data, dataUpdatedAt) {
2035
- return {
2036
- data,
2037
- dataUpdatedAt: dataUpdatedAt != null ? dataUpdatedAt : Date.now(),
2038
- error: null,
2039
- isInvalidated: false,
2040
- status: "success"
2041
- };
2042
- }
2043
- function getDefaultState(options) {
2044
- const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
2045
- const hasData = data !== void 0;
2046
- const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
2047
- return {
2048
- data,
2049
- dataUpdateCount: 0,
2050
- dataUpdatedAt: hasData ? initialDataUpdatedAt != null ? initialDataUpdatedAt : Date.now() : 0,
2051
- error: null,
2052
- errorUpdateCount: 0,
2053
- errorUpdatedAt: 0,
2054
- fetchFailureCount: 0,
2055
- fetchFailureReason: null,
2056
- fetchMeta: null,
2057
- isInvalidated: false,
2058
- status: hasData ? "success" : "pending",
2059
- fetchStatus: "idle"
2060
- };
2061
- }
2062
-
2063
- // node_modules/@tanstack/query-core/build/modern/queryObserver.js
2064
- 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;
2065
- var QueryObserver = (_b = class extends Subscribable {
2066
- constructor(client, options) {
2067
- super();
2068
- __privateAdd(this, _executeFetch);
2069
- __privateAdd(this, _updateStaleTimeout);
2070
- __privateAdd(this, _computeRefetchInterval);
2071
- __privateAdd(this, _updateRefetchInterval);
2072
- __privateAdd(this, _updateTimers);
2073
- __privateAdd(this, _clearStaleTimeout);
2074
- __privateAdd(this, _clearRefetchInterval);
2075
- __privateAdd(this, _updateQuery);
2076
- __privateAdd(this, _notify);
2077
- __privateAdd(this, _client2, void 0);
2078
- __privateAdd(this, _currentQuery, void 0);
2079
- __privateAdd(this, _currentQueryInitialState, void 0);
2080
- __privateAdd(this, _currentResult, void 0);
2081
- __privateAdd(this, _currentResultState, void 0);
2082
- __privateAdd(this, _currentResultOptions, void 0);
2083
- __privateAdd(this, _currentThenable, void 0);
2084
- __privateAdd(this, _selectError, void 0);
2085
- __privateAdd(this, _selectFn, void 0);
2086
- __privateAdd(this, _selectResult, void 0);
2087
- // This property keeps track of the last query with defined data.
2088
- // It will be used to pass the previous data and query to the placeholder function between renders.
2089
- __privateAdd(this, _lastQueryWithDefinedData, void 0);
2090
- __privateAdd(this, _staleTimeoutId, void 0);
2091
- __privateAdd(this, _refetchIntervalId, void 0);
2092
- __privateAdd(this, _currentRefetchInterval, void 0);
2093
- __privateAdd(this, _trackedProps, /* @__PURE__ */ new Set());
2094
- this.options = options;
2095
- __privateSet(this, _client2, client);
2096
- __privateSet(this, _selectError, null);
2097
- __privateSet(this, _currentThenable, pendingThenable());
2098
- this.bindMethods();
2099
- this.setOptions(options);
2100
- }
2101
- bindMethods() {
2102
- this.refetch = this.refetch.bind(this);
2103
- }
2104
- onSubscribe() {
2105
- if (this.listeners.size === 1) {
2106
- __privateGet(this, _currentQuery).addObserver(this);
2107
- if (shouldFetchOnMount(__privateGet(this, _currentQuery), this.options)) {
2108
- __privateMethod(this, _executeFetch, executeFetch_fn).call(this);
2109
- } else {
2110
- this.updateResult();
2111
- }
2112
- __privateMethod(this, _updateTimers, updateTimers_fn).call(this);
2113
- }
2114
- }
2115
- onUnsubscribe() {
2116
- if (!this.hasListeners()) {
2117
- this.destroy();
2118
- }
2119
- }
2120
- shouldFetchOnReconnect() {
2121
- return shouldFetchOn(
2122
- __privateGet(this, _currentQuery),
2123
- this.options,
2124
- this.options.refetchOnReconnect
2125
- );
2126
- }
2127
- shouldFetchOnWindowFocus() {
2128
- return shouldFetchOn(
2129
- __privateGet(this, _currentQuery),
2130
- this.options,
2131
- this.options.refetchOnWindowFocus
2132
- );
2133
- }
2134
- destroy() {
2135
- this.listeners = /* @__PURE__ */ new Set();
2136
- __privateMethod(this, _clearStaleTimeout, clearStaleTimeout_fn).call(this);
2137
- __privateMethod(this, _clearRefetchInterval, clearRefetchInterval_fn).call(this);
2138
- __privateGet(this, _currentQuery).removeObserver(this);
2139
- }
2140
- setOptions(options) {
2141
- const prevOptions = this.options;
2142
- const prevQuery = __privateGet(this, _currentQuery);
2143
- this.options = __privateGet(this, _client2).defaultQueryOptions(options);
2144
- 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") {
2145
- throw new Error(
2146
- "Expected enabled to be a boolean or a callback that returns a boolean"
2147
- );
2148
- }
2149
- __privateMethod(this, _updateQuery, updateQuery_fn).call(this);
2150
- __privateGet(this, _currentQuery).setOptions(this.options);
2151
- if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {
2152
- __privateGet(this, _client2).getQueryCache().notify({
2153
- type: "observerOptionsUpdated",
2154
- query: __privateGet(this, _currentQuery),
2155
- observer: this
2156
- });
2157
- }
2158
- const mounted = this.hasListeners();
2159
- if (mounted && shouldFetchOptionally(
2160
- __privateGet(this, _currentQuery),
2161
- prevQuery,
2162
- this.options,
2163
- prevOptions
2164
- )) {
2165
- __privateMethod(this, _executeFetch, executeFetch_fn).call(this);
2166
- }
2167
- this.updateResult();
2168
- 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)))) {
2169
- __privateMethod(this, _updateStaleTimeout, updateStaleTimeout_fn).call(this);
2170
- }
2171
- const nextRefetchInterval = __privateMethod(this, _computeRefetchInterval, computeRefetchInterval_fn).call(this);
2172
- if (mounted && (__privateGet(this, _currentQuery) !== prevQuery || resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) !== resolveEnabled(prevOptions.enabled, __privateGet(this, _currentQuery)) || nextRefetchInterval !== __privateGet(this, _currentRefetchInterval))) {
2173
- __privateMethod(this, _updateRefetchInterval, updateRefetchInterval_fn).call(this, nextRefetchInterval);
2174
- }
2175
- }
2176
- getOptimisticResult(options) {
2177
- const query = __privateGet(this, _client2).getQueryCache().build(__privateGet(this, _client2), options);
2178
- const result = this.createResult(query, options);
2179
- if (shouldAssignObserverCurrentProperties(this, result)) {
2180
- __privateSet(this, _currentResult, result);
2181
- __privateSet(this, _currentResultOptions, this.options);
2182
- __privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state);
2183
- }
2184
- return result;
2185
- }
2186
- getCurrentResult() {
2187
- return __privateGet(this, _currentResult);
2188
- }
2189
- trackResult(result, onPropTracked) {
2190
- return new Proxy(result, {
2191
- get: (target, key) => {
2192
- this.trackProp(key);
2193
- onPropTracked == null ? void 0 : onPropTracked(key);
2194
- if (key === "promise") {
2195
- this.trackProp("data");
2196
- if (!this.options.experimental_prefetchInRender && __privateGet(this, _currentThenable).status === "pending") {
2197
- __privateGet(this, _currentThenable).reject(
2198
- new Error(
2199
- "experimental_prefetchInRender feature flag is not enabled"
2200
- )
2201
- );
2202
- }
2203
- }
2204
- return Reflect.get(target, key);
2205
- }
2206
- });
2207
- }
2208
- trackProp(key) {
2209
- __privateGet(this, _trackedProps).add(key);
2210
- }
2211
- getCurrentQuery() {
2212
- return __privateGet(this, _currentQuery);
2213
- }
2214
- refetch(_a11 = {}) {
2215
- var options = __objRest(_a11, []);
2216
- return this.fetch(__spreadValues({}, options));
2217
- }
2218
- fetchOptimistic(options) {
2219
- const defaultedOptions = __privateGet(this, _client2).defaultQueryOptions(options);
2220
- const query = __privateGet(this, _client2).getQueryCache().build(__privateGet(this, _client2), defaultedOptions);
2221
- return query.fetch().then(() => this.createResult(query, defaultedOptions));
2222
- }
2223
- fetch(fetchOptions) {
2224
- var _a11;
2225
- return __privateMethod(this, _executeFetch, executeFetch_fn).call(this, __spreadProps(__spreadValues({}, fetchOptions), {
2226
- cancelRefetch: (_a11 = fetchOptions.cancelRefetch) != null ? _a11 : true
2227
- })).then(() => {
2228
- this.updateResult();
2229
- return __privateGet(this, _currentResult);
2230
- });
2231
- }
2232
- createResult(query, options) {
2233
- var _a11;
2234
- const prevQuery = __privateGet(this, _currentQuery);
2235
- const prevOptions = this.options;
2236
- const prevResult = __privateGet(this, _currentResult);
2237
- const prevResultState = __privateGet(this, _currentResultState);
2238
- const prevResultOptions = __privateGet(this, _currentResultOptions);
2239
- const queryChange = query !== prevQuery;
2240
- const queryInitialState = queryChange ? query.state : __privateGet(this, _currentQueryInitialState);
2241
- const { state } = query;
2242
- let newState = __spreadValues({}, state);
2243
- let isPlaceholderData = false;
2244
- let data;
2245
- if (options._optimisticResults) {
2246
- const mounted = this.hasListeners();
2247
- const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
2248
- const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
2249
- if (fetchOnMount || fetchOptionally) {
2250
- newState = __spreadValues(__spreadValues({}, newState), fetchState(state.data, query.options));
2251
- }
2252
- if (options._optimisticResults === "isRestoring") {
2253
- newState.fetchStatus = "idle";
2254
- }
2255
- }
2256
- let { error, errorUpdatedAt, status } = newState;
2257
- data = newState.data;
2258
- let skipSelect = false;
2259
- if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
2260
- let placeholderData;
2261
- if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {
2262
- placeholderData = prevResult.data;
2263
- skipSelect = true;
2264
- } else {
2265
- placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
2266
- (_a11 = __privateGet(this, _lastQueryWithDefinedData)) == null ? void 0 : _a11.state.data,
2267
- __privateGet(this, _lastQueryWithDefinedData)
2268
- ) : options.placeholderData;
2269
- }
2270
- if (placeholderData !== void 0) {
2271
- status = "success";
2272
- data = replaceData(
2273
- prevResult == null ? void 0 : prevResult.data,
2274
- placeholderData,
2275
- options
2276
- );
2277
- isPlaceholderData = true;
2278
- }
2279
- }
2280
- if (options.select && data !== void 0 && !skipSelect) {
2281
- if (prevResult && data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === __privateGet(this, _selectFn)) {
2282
- data = __privateGet(this, _selectResult);
2283
- } else {
2284
- try {
2285
- __privateSet(this, _selectFn, options.select);
2286
- data = options.select(data);
2287
- data = replaceData(prevResult == null ? void 0 : prevResult.data, data, options);
2288
- __privateSet(this, _selectResult, data);
2289
- __privateSet(this, _selectError, null);
2290
- } catch (selectError) {
2291
- __privateSet(this, _selectError, selectError);
2292
- }
2293
- }
2294
- }
2295
- if (__privateGet(this, _selectError)) {
2296
- error = __privateGet(this, _selectError);
2297
- data = __privateGet(this, _selectResult);
2298
- errorUpdatedAt = Date.now();
2299
- status = "error";
2300
- }
2301
- const isFetching = newState.fetchStatus === "fetching";
2302
- const isPending = status === "pending";
2303
- const isError = status === "error";
2304
- const isLoading = isPending && isFetching;
2305
- const hasData = data !== void 0;
2306
- const result = {
2307
- status,
2308
- fetchStatus: newState.fetchStatus,
2309
- isPending,
2310
- isSuccess: status === "success",
2311
- isError,
2312
- isInitialLoading: isLoading,
2313
- isLoading,
2314
- data,
2315
- dataUpdatedAt: newState.dataUpdatedAt,
2316
- error,
2317
- errorUpdatedAt,
2318
- failureCount: newState.fetchFailureCount,
2319
- failureReason: newState.fetchFailureReason,
2320
- errorUpdateCount: newState.errorUpdateCount,
2321
- isFetched: query.isFetched(),
2322
- isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
2323
- isFetching,
2324
- isRefetching: isFetching && !isPending,
2325
- isLoadingError: isError && !hasData,
2326
- isPaused: newState.fetchStatus === "paused",
2327
- isPlaceholderData,
2328
- isRefetchError: isError && hasData,
2329
- isStale: isStale(query, options),
2330
- refetch: this.refetch,
2331
- promise: __privateGet(this, _currentThenable),
2332
- isEnabled: resolveEnabled(options.enabled, query) !== false
2333
- };
2334
- const nextResult = result;
2335
- if (this.options.experimental_prefetchInRender) {
2336
- const hasResultData = nextResult.data !== void 0;
2337
- const isErrorWithoutData = nextResult.status === "error" && !hasResultData;
2338
- const finalizeThenableIfPossible = (thenable) => {
2339
- if (isErrorWithoutData) {
2340
- thenable.reject(nextResult.error);
2341
- } else if (hasResultData) {
2342
- thenable.resolve(nextResult.data);
2343
- }
2344
- };
2345
- const recreateThenable = () => {
2346
- const pending = __privateSet(this, _currentThenable, nextResult.promise = pendingThenable());
2347
- finalizeThenableIfPossible(pending);
2348
- };
2349
- const prevThenable = __privateGet(this, _currentThenable);
2350
- switch (prevThenable.status) {
2351
- case "pending":
2352
- if (query.queryHash === prevQuery.queryHash) {
2353
- finalizeThenableIfPossible(prevThenable);
2354
- }
2355
- break;
2356
- case "fulfilled":
2357
- if (isErrorWithoutData || nextResult.data !== prevThenable.value) {
2358
- recreateThenable();
2359
- }
2360
- break;
2361
- case "rejected":
2362
- if (!isErrorWithoutData || nextResult.error !== prevThenable.reason) {
2363
- recreateThenable();
2364
- }
2365
- break;
2366
- }
2367
- }
2368
- return nextResult;
2369
- }
2370
- updateResult() {
2371
- const prevResult = __privateGet(this, _currentResult);
2372
- const nextResult = this.createResult(__privateGet(this, _currentQuery), this.options);
2373
- __privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state);
2374
- __privateSet(this, _currentResultOptions, this.options);
2375
- if (__privateGet(this, _currentResultState).data !== void 0) {
2376
- __privateSet(this, _lastQueryWithDefinedData, __privateGet(this, _currentQuery));
2377
- }
2378
- if (shallowEqualObjects(nextResult, prevResult)) {
2379
- return;
2380
- }
2381
- __privateSet(this, _currentResult, nextResult);
2382
- const shouldNotifyListeners = () => {
2383
- if (!prevResult) {
2384
- return true;
2385
- }
2386
- const { notifyOnChangeProps } = this.options;
2387
- const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
2388
- if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !__privateGet(this, _trackedProps).size) {
2389
- return true;
2390
- }
2391
- const includedProps = new Set(
2392
- notifyOnChangePropsValue != null ? notifyOnChangePropsValue : __privateGet(this, _trackedProps)
2393
- );
2394
- if (this.options.throwOnError) {
2395
- includedProps.add("error");
2396
- }
2397
- return Object.keys(__privateGet(this, _currentResult)).some((key) => {
2398
- const typedKey = key;
2399
- const changed = __privateGet(this, _currentResult)[typedKey] !== prevResult[typedKey];
2400
- return changed && includedProps.has(typedKey);
2401
- });
2402
- };
2403
- __privateMethod(this, _notify, notify_fn).call(this, { listeners: shouldNotifyListeners() });
2404
- }
2405
- onQueryUpdate() {
2406
- this.updateResult();
2407
- if (this.hasListeners()) {
2408
- __privateMethod(this, _updateTimers, updateTimers_fn).call(this);
2409
- }
2410
- }
2411
- }, _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) {
2412
- __privateMethod(this, _updateQuery, updateQuery_fn).call(this);
2413
- let promise = __privateGet(this, _currentQuery).fetch(
2414
- this.options,
2415
- fetchOptions
2416
- );
2417
- if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {
2418
- promise = promise.catch(noop);
2419
- }
2420
- return promise;
2421
- }, _updateStaleTimeout = new WeakSet(), updateStaleTimeout_fn = function() {
2422
- __privateMethod(this, _clearStaleTimeout, clearStaleTimeout_fn).call(this);
2423
- const staleTime = resolveStaleTime(
2424
- this.options.staleTime,
2425
- __privateGet(this, _currentQuery)
2426
- );
2427
- if (environmentManager.isServer() || __privateGet(this, _currentResult).isStale || !isValidTimeout(staleTime)) {
2428
- return;
2429
- }
2430
- const time = timeUntilStale(__privateGet(this, _currentResult).dataUpdatedAt, staleTime);
2431
- const timeout = time + 1;
2432
- __privateSet(this, _staleTimeoutId, timeoutManager.setTimeout(() => {
2433
- if (!__privateGet(this, _currentResult).isStale) {
2434
- this.updateResult();
2435
- }
2436
- }, timeout));
2437
- }, _computeRefetchInterval = new WeakSet(), computeRefetchInterval_fn = function() {
2438
- var _a11;
2439
- return (_a11 = typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(__privateGet(this, _currentQuery)) : this.options.refetchInterval) != null ? _a11 : false;
2440
- }, _updateRefetchInterval = new WeakSet(), updateRefetchInterval_fn = function(nextInterval) {
2441
- __privateMethod(this, _clearRefetchInterval, clearRefetchInterval_fn).call(this);
2442
- __privateSet(this, _currentRefetchInterval, nextInterval);
2443
- if (environmentManager.isServer() || resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) === false || !isValidTimeout(__privateGet(this, _currentRefetchInterval)) || __privateGet(this, _currentRefetchInterval) === 0) {
2444
- return;
2445
- }
2446
- __privateSet(this, _refetchIntervalId, timeoutManager.setInterval(() => {
2447
- if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {
2448
- __privateMethod(this, _executeFetch, executeFetch_fn).call(this);
2449
- }
2450
- }, __privateGet(this, _currentRefetchInterval)));
2451
- }, _updateTimers = new WeakSet(), updateTimers_fn = function() {
2452
- __privateMethod(this, _updateStaleTimeout, updateStaleTimeout_fn).call(this);
2453
- __privateMethod(this, _updateRefetchInterval, updateRefetchInterval_fn).call(this, __privateMethod(this, _computeRefetchInterval, computeRefetchInterval_fn).call(this));
2454
- }, _clearStaleTimeout = new WeakSet(), clearStaleTimeout_fn = function() {
2455
- if (__privateGet(this, _staleTimeoutId)) {
2456
- timeoutManager.clearTimeout(__privateGet(this, _staleTimeoutId));
2457
- __privateSet(this, _staleTimeoutId, void 0);
2458
- }
2459
- }, _clearRefetchInterval = new WeakSet(), clearRefetchInterval_fn = function() {
2460
- if (__privateGet(this, _refetchIntervalId)) {
2461
- timeoutManager.clearInterval(__privateGet(this, _refetchIntervalId));
2462
- __privateSet(this, _refetchIntervalId, void 0);
2463
- }
2464
- }, _updateQuery = new WeakSet(), updateQuery_fn = function() {
2465
- const query = __privateGet(this, _client2).getQueryCache().build(__privateGet(this, _client2), this.options);
2466
- if (query === __privateGet(this, _currentQuery)) {
2467
- return;
2468
- }
2469
- const prevQuery = __privateGet(this, _currentQuery);
2470
- __privateSet(this, _currentQuery, query);
2471
- __privateSet(this, _currentQueryInitialState, query.state);
2472
- if (this.hasListeners()) {
2473
- prevQuery == null ? void 0 : prevQuery.removeObserver(this);
2474
- query.addObserver(this);
2475
- }
2476
- }, _notify = new WeakSet(), notify_fn = function(notifyOptions) {
2477
- notifyManager.batch(() => {
2478
- if (notifyOptions.listeners) {
2479
- this.listeners.forEach((listener) => {
2480
- listener(__privateGet(this, _currentResult));
2481
- });
2482
- }
2483
- __privateGet(this, _client2).getQueryCache().notify({
2484
- query: __privateGet(this, _currentQuery),
2485
- type: "observerResultsUpdated"
2486
- });
2487
- });
2488
- }, _b);
2489
- function shouldLoadOnMount(query, options) {
2490
- return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
2491
- }
2492
- function shouldFetchOnMount(query, options) {
2493
- return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
2494
- }
2495
- function shouldFetchOn(query, options, field) {
2496
- if (resolveEnabled(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== "static") {
2497
- const value = typeof field === "function" ? field(query) : field;
2498
- return value === "always" || value !== false && isStale(query, options);
2499
- }
2500
- return false;
2501
- }
2502
- function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
2503
- return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
2504
- }
2505
- function isStale(query, options) {
2506
- return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));
2507
- }
2508
- function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
2509
- if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {
2510
- return true;
2511
- }
2512
- return false;
2513
- }
2514
-
2515
- // node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
2516
- init_dirname();
2517
- init_buffer();
2518
- init_process();
2519
- function infiniteQueryBehavior(pages) {
2520
- return {
2521
- onFetch: (context, query) => {
2522
- var _a11, _b2, _c, _d, _e;
2523
- const options = context.options;
2524
- const direction = (_c = (_b2 = (_a11 = context.fetchOptions) == null ? void 0 : _a11.meta) == null ? void 0 : _b2.fetchMore) == null ? void 0 : _c.direction;
2525
- const oldPages = ((_d = context.state.data) == null ? void 0 : _d.pages) || [];
2526
- const oldPageParams = ((_e = context.state.data) == null ? void 0 : _e.pageParams) || [];
2527
- let result = { pages: [], pageParams: [] };
2528
- let currentPage = 0;
2529
- const fetchFn = async () => {
2530
- var _a12;
2531
- let cancelled = false;
2532
- const addSignalProperty = (object) => {
2533
- addConsumeAwareSignal(
2534
- object,
2535
- () => context.signal,
2536
- () => cancelled = true
2537
- );
2538
- };
2539
- const queryFn = ensureQueryFn(context.options, context.fetchOptions);
2540
- const fetchPage = async (data, param, previous) => {
2541
- if (cancelled) {
2542
- return Promise.reject();
2543
- }
2544
- if (param == null && data.pages.length) {
2545
- return Promise.resolve(data);
2546
- }
2547
- const createQueryFnContext = () => {
2548
- const queryFnContext2 = {
2549
- client: context.client,
2550
- queryKey: context.queryKey,
2551
- pageParam: param,
2552
- direction: previous ? "backward" : "forward",
2553
- meta: context.options.meta
2554
- };
2555
- addSignalProperty(queryFnContext2);
2556
- return queryFnContext2;
2557
- };
2558
- const queryFnContext = createQueryFnContext();
2559
- const page = await queryFn(queryFnContext);
2560
- const { maxPages } = context.options;
2561
- const addTo = previous ? addToStart : addToEnd;
2562
- return {
2563
- pages: addTo(data.pages, page, maxPages),
2564
- pageParams: addTo(data.pageParams, param, maxPages)
2565
- };
2566
- };
2567
- if (direction && oldPages.length) {
2568
- const previous = direction === "backward";
2569
- const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
2570
- const oldData = {
2571
- pages: oldPages,
2572
- pageParams: oldPageParams
2573
- };
2574
- const param = pageParamFn(options, oldData);
2575
- result = await fetchPage(oldData, param, previous);
2576
- } else {
2577
- const remainingPages = pages != null ? pages : oldPages.length;
2578
- do {
2579
- const param = currentPage === 0 ? (_a12 = oldPageParams[0]) != null ? _a12 : options.initialPageParam : getNextPageParam(options, result);
2580
- if (currentPage > 0 && param == null) {
2581
- break;
2582
- }
2583
- result = await fetchPage(result, param);
2584
- currentPage++;
2585
- } while (currentPage < remainingPages);
2586
- }
2587
- return result;
2588
- };
2589
- if (context.options.persister) {
2590
- context.fetchFn = () => {
2591
- var _a12, _b3;
2592
- return (_b3 = (_a12 = context.options).persister) == null ? void 0 : _b3.call(
2593
- _a12,
2594
- fetchFn,
2595
- {
2596
- client: context.client,
2597
- queryKey: context.queryKey,
2598
- meta: context.options.meta,
2599
- signal: context.signal
2600
- },
2601
- query
2602
- );
2603
- };
2604
- } else {
2605
- context.fetchFn = fetchFn;
2606
- }
2607
- }
2608
- };
2609
- }
2610
- function getNextPageParam(options, { pages, pageParams }) {
2611
- const lastIndex = pages.length - 1;
2612
- return pages.length > 0 ? options.getNextPageParam(
2613
- pages[lastIndex],
2614
- pages,
2615
- pageParams[lastIndex],
2616
- pageParams
2617
- ) : void 0;
2618
- }
2619
- function getPreviousPageParam(options, { pages, pageParams }) {
2620
- var _a11;
2621
- return pages.length > 0 ? (_a11 = options.getPreviousPageParam) == null ? void 0 : _a11.call(options, pages[0], pages, pageParams[0], pageParams) : void 0;
2622
- }
2623
-
2624
- // node_modules/@tanstack/query-core/build/modern/mutationCache.js
2625
- init_dirname();
2626
- init_buffer();
2627
- init_process();
2628
-
2629
- // node_modules/@tanstack/query-core/build/modern/mutation.js
2630
- init_dirname();
2631
- init_buffer();
2632
- init_process();
2633
- var _client3, _observers, _mutationCache, _retryer2, _dispatch2, dispatch_fn2, _a6;
2634
- var Mutation = (_a6 = class extends Removable {
2635
- constructor(config) {
2636
- super();
2637
- __privateAdd(this, _dispatch2);
2638
- __privateAdd(this, _client3, void 0);
2639
- __privateAdd(this, _observers, void 0);
2640
- __privateAdd(this, _mutationCache, void 0);
2641
- __privateAdd(this, _retryer2, void 0);
2642
- __privateSet(this, _client3, config.client);
2643
- this.mutationId = config.mutationId;
2644
- __privateSet(this, _mutationCache, config.mutationCache);
2645
- __privateSet(this, _observers, []);
2646
- this.state = config.state || getDefaultState2();
2647
- this.setOptions(config.options);
2648
- this.scheduleGc();
2649
- }
2650
- setOptions(options) {
2651
- this.options = options;
2652
- this.updateGcTime(this.options.gcTime);
2653
- }
2654
- get meta() {
2655
- return this.options.meta;
2656
- }
2657
- addObserver(observer) {
2658
- if (!__privateGet(this, _observers).includes(observer)) {
2659
- __privateGet(this, _observers).push(observer);
2660
- this.clearGcTimeout();
2661
- __privateGet(this, _mutationCache).notify({
2662
- type: "observerAdded",
2663
- mutation: this,
2664
- observer
2665
- });
2666
- }
2667
- }
2668
- removeObserver(observer) {
2669
- __privateSet(this, _observers, __privateGet(this, _observers).filter((x) => x !== observer));
2670
- this.scheduleGc();
2671
- __privateGet(this, _mutationCache).notify({
2672
- type: "observerRemoved",
2673
- mutation: this,
2674
- observer
2675
- });
2676
- }
2677
- optionalRemove() {
2678
- if (!__privateGet(this, _observers).length) {
2679
- if (this.state.status === "pending") {
2680
- this.scheduleGc();
2681
- } else {
2682
- __privateGet(this, _mutationCache).remove(this);
2683
- }
2684
- }
2685
- }
2686
- continue() {
2687
- var _a11, _b2;
2688
- return (_b2 = (_a11 = __privateGet(this, _retryer2)) == null ? void 0 : _a11.continue()) != null ? _b2 : (
2689
- // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
2690
- this.execute(this.state.variables)
2691
- );
2692
- }
2693
- async execute(variables) {
2694
- var _a11, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
2695
- const onContinue = () => {
2696
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "continue" });
2697
- };
2698
- const mutationFnContext = {
2699
- client: __privateGet(this, _client3),
2700
- meta: this.options.meta,
2701
- mutationKey: this.options.mutationKey
2702
- };
2703
- __privateSet(this, _retryer2, createRetryer({
2704
- fn: () => {
2705
- if (!this.options.mutationFn) {
2706
- return Promise.reject(new Error("No mutationFn found"));
2707
- }
2708
- return this.options.mutationFn(variables, mutationFnContext);
2709
- },
2710
- onFail: (failureCount, error) => {
2711
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "failed", failureCount, error });
2712
- },
2713
- onPause: () => {
2714
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "pause" });
2715
- },
2716
- onContinue,
2717
- retry: (_a11 = this.options.retry) != null ? _a11 : 0,
2718
- retryDelay: this.options.retryDelay,
2719
- networkMode: this.options.networkMode,
2720
- canRun: () => __privateGet(this, _mutationCache).canRun(this)
2721
- }));
2722
- const restored = this.state.status === "pending";
2723
- const isPaused = !__privateGet(this, _retryer2).canStart();
2724
- try {
2725
- if (restored) {
2726
- onContinue();
2727
- } else {
2728
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "pending", variables, isPaused });
2729
- if (__privateGet(this, _mutationCache).config.onMutate) {
2730
- await __privateGet(this, _mutationCache).config.onMutate(
2731
- variables,
2732
- this,
2733
- mutationFnContext
2734
- );
2735
- }
2736
- const context = await ((_c = (_b2 = this.options).onMutate) == null ? void 0 : _c.call(
2737
- _b2,
2738
- variables,
2739
- mutationFnContext
2740
- ));
2741
- if (context !== this.state.context) {
2742
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, {
2743
- type: "pending",
2744
- context,
2745
- variables,
2746
- isPaused
2747
- });
2748
- }
2749
- }
2750
- const data = await __privateGet(this, _retryer2).start();
2751
- await ((_e = (_d = __privateGet(this, _mutationCache).config).onSuccess) == null ? void 0 : _e.call(
2752
- _d,
2753
- data,
2754
- variables,
2755
- this.state.context,
2756
- this,
2757
- mutationFnContext
2758
- ));
2759
- await ((_g = (_f = this.options).onSuccess) == null ? void 0 : _g.call(
2760
- _f,
2761
- data,
2762
- variables,
2763
- this.state.context,
2764
- mutationFnContext
2765
- ));
2766
- await ((_i = (_h = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _i.call(
2767
- _h,
2768
- data,
2769
- null,
2770
- this.state.variables,
2771
- this.state.context,
2772
- this,
2773
- mutationFnContext
2774
- ));
2775
- await ((_k = (_j = this.options).onSettled) == null ? void 0 : _k.call(
2776
- _j,
2777
- data,
2778
- null,
2779
- variables,
2780
- this.state.context,
2781
- mutationFnContext
2782
- ));
2783
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "success", data });
2784
- return data;
2785
- } catch (error) {
2786
- try {
2787
- await ((_m = (_l = __privateGet(this, _mutationCache).config).onError) == null ? void 0 : _m.call(
2788
- _l,
2789
- error,
2790
- variables,
2791
- this.state.context,
2792
- this,
2793
- mutationFnContext
2794
- ));
2795
- } catch (e) {
2796
- void Promise.reject(e);
2797
- }
2798
- try {
2799
- await ((_o = (_n = this.options).onError) == null ? void 0 : _o.call(
2800
- _n,
2801
- error,
2802
- variables,
2803
- this.state.context,
2804
- mutationFnContext
2805
- ));
2806
- } catch (e) {
2807
- void Promise.reject(e);
2808
- }
2809
- try {
2810
- await ((_q = (_p = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _q.call(
2811
- _p,
2812
- void 0,
2813
- error,
2814
- this.state.variables,
2815
- this.state.context,
2816
- this,
2817
- mutationFnContext
2818
- ));
2819
- } catch (e) {
2820
- void Promise.reject(e);
2821
- }
2822
- try {
2823
- await ((_s = (_r = this.options).onSettled) == null ? void 0 : _s.call(
2824
- _r,
2825
- void 0,
2826
- error,
2827
- variables,
2828
- this.state.context,
2829
- mutationFnContext
2830
- ));
2831
- } catch (e) {
2832
- void Promise.reject(e);
2833
- }
2834
- __privateMethod(this, _dispatch2, dispatch_fn2).call(this, { type: "error", error });
2835
- throw error;
2836
- } finally {
2837
- __privateGet(this, _mutationCache).runNext(this);
2838
- }
2839
- }
2840
- }, _client3 = new WeakMap(), _observers = new WeakMap(), _mutationCache = new WeakMap(), _retryer2 = new WeakMap(), _dispatch2 = new WeakSet(), dispatch_fn2 = function(action) {
2841
- const reducer = (state) => {
2842
- switch (action.type) {
2843
- case "failed":
2844
- return __spreadProps(__spreadValues({}, state), {
2845
- failureCount: action.failureCount,
2846
- failureReason: action.error
2847
- });
2848
- case "pause":
2849
- return __spreadProps(__spreadValues({}, state), {
2850
- isPaused: true
2851
- });
2852
- case "continue":
2853
- return __spreadProps(__spreadValues({}, state), {
2854
- isPaused: false
2855
- });
2856
- case "pending":
2857
- return __spreadProps(__spreadValues({}, state), {
2858
- context: action.context,
2859
- data: void 0,
2860
- failureCount: 0,
2861
- failureReason: null,
2862
- error: null,
2863
- isPaused: action.isPaused,
2864
- status: "pending",
2865
- variables: action.variables,
2866
- submittedAt: Date.now()
2867
- });
2868
- case "success":
2869
- return __spreadProps(__spreadValues({}, state), {
2870
- data: action.data,
2871
- failureCount: 0,
2872
- failureReason: null,
2873
- error: null,
2874
- status: "success",
2875
- isPaused: false
2876
- });
2877
- case "error":
2878
- return __spreadProps(__spreadValues({}, state), {
2879
- data: void 0,
2880
- error: action.error,
2881
- failureCount: state.failureCount + 1,
2882
- failureReason: action.error,
2883
- isPaused: false,
2884
- status: "error"
2885
- });
2886
- }
2887
- };
2888
- this.state = reducer(this.state);
2889
- notifyManager.batch(() => {
2890
- __privateGet(this, _observers).forEach((observer) => {
2891
- observer.onMutationUpdate(action);
2892
- });
2893
- __privateGet(this, _mutationCache).notify({
2894
- mutation: this,
2895
- type: "updated",
2896
- action
2897
- });
2898
- });
2899
- }, _a6);
2900
- function getDefaultState2() {
2901
- return {
2902
- context: void 0,
2903
- data: void 0,
2904
- error: null,
2905
- failureCount: 0,
2906
- failureReason: null,
2907
- isPaused: false,
2908
- status: "idle",
2909
- variables: void 0,
2910
- submittedAt: 0
2911
- };
2912
- }
2913
-
2914
- // node_modules/@tanstack/query-core/build/modern/mutationCache.js
2915
- var _mutations, _scopes, _mutationId, _a7;
2916
- var MutationCache = (_a7 = class extends Subscribable {
2917
- constructor(config = {}) {
2918
- super();
2919
- __privateAdd(this, _mutations, void 0);
2920
- __privateAdd(this, _scopes, void 0);
2921
- __privateAdd(this, _mutationId, void 0);
2922
- this.config = config;
2923
- __privateSet(this, _mutations, /* @__PURE__ */ new Set());
2924
- __privateSet(this, _scopes, /* @__PURE__ */ new Map());
2925
- __privateSet(this, _mutationId, 0);
2926
- }
2927
- build(client, options, state) {
2928
- const mutation = new Mutation({
2929
- client,
2930
- mutationCache: this,
2931
- mutationId: ++__privateWrapper(this, _mutationId)._,
2932
- options: client.defaultMutationOptions(options),
2933
- state
2934
- });
2935
- this.add(mutation);
2936
- return mutation;
2937
- }
2938
- add(mutation) {
2939
- __privateGet(this, _mutations).add(mutation);
2940
- const scope = scopeFor(mutation);
2941
- if (typeof scope === "string") {
2942
- const scopedMutations = __privateGet(this, _scopes).get(scope);
2943
- if (scopedMutations) {
2944
- scopedMutations.push(mutation);
2945
- } else {
2946
- __privateGet(this, _scopes).set(scope, [mutation]);
2947
- }
2948
- }
2949
- this.notify({ type: "added", mutation });
2950
- }
2951
- remove(mutation) {
2952
- if (__privateGet(this, _mutations).delete(mutation)) {
2953
- const scope = scopeFor(mutation);
2954
- if (typeof scope === "string") {
2955
- const scopedMutations = __privateGet(this, _scopes).get(scope);
2956
- if (scopedMutations) {
2957
- if (scopedMutations.length > 1) {
2958
- const index = scopedMutations.indexOf(mutation);
2959
- if (index !== -1) {
2960
- scopedMutations.splice(index, 1);
2961
- }
2962
- } else if (scopedMutations[0] === mutation) {
2963
- __privateGet(this, _scopes).delete(scope);
2964
- }
2965
- }
2966
- }
2967
- }
2968
- this.notify({ type: "removed", mutation });
2969
- }
2970
- canRun(mutation) {
2971
- const scope = scopeFor(mutation);
2972
- if (typeof scope === "string") {
2973
- const mutationsWithSameScope = __privateGet(this, _scopes).get(scope);
2974
- const firstPendingMutation = mutationsWithSameScope == null ? void 0 : mutationsWithSameScope.find(
2975
- (m) => m.state.status === "pending"
2976
- );
2977
- return !firstPendingMutation || firstPendingMutation === mutation;
2978
- } else {
2979
- return true;
2980
- }
2981
- }
2982
- runNext(mutation) {
2983
- var _a11, _b2;
2984
- const scope = scopeFor(mutation);
2985
- if (typeof scope === "string") {
2986
- const foundMutation = (_a11 = __privateGet(this, _scopes).get(scope)) == null ? void 0 : _a11.find((m) => m !== mutation && m.state.isPaused);
2987
- return (_b2 = foundMutation == null ? void 0 : foundMutation.continue()) != null ? _b2 : Promise.resolve();
2988
- } else {
2989
- return Promise.resolve();
2990
- }
2991
- }
2992
- clear() {
2993
- notifyManager.batch(() => {
2994
- __privateGet(this, _mutations).forEach((mutation) => {
2995
- this.notify({ type: "removed", mutation });
2996
- });
2997
- __privateGet(this, _mutations).clear();
2998
- __privateGet(this, _scopes).clear();
2999
- });
3000
- }
3001
- getAll() {
3002
- return Array.from(__privateGet(this, _mutations));
3003
- }
3004
- find(filters) {
3005
- const defaultedFilters = __spreadValues({ exact: true }, filters);
3006
- return this.getAll().find(
3007
- (mutation) => matchMutation(defaultedFilters, mutation)
3008
- );
3009
- }
3010
- findAll(filters = {}) {
3011
- return this.getAll().filter((mutation) => matchMutation(filters, mutation));
3012
- }
3013
- notify(event) {
3014
- notifyManager.batch(() => {
3015
- this.listeners.forEach((listener) => {
3016
- listener(event);
3017
- });
3018
- });
3019
- }
3020
- resumePausedMutations() {
3021
- const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
3022
- return notifyManager.batch(
3023
- () => Promise.all(
3024
- pausedMutations.map((mutation) => mutation.continue().catch(noop))
3025
- )
3026
- );
3027
- }
3028
- }, _mutations = new WeakMap(), _scopes = new WeakMap(), _mutationId = new WeakMap(), _a7);
3029
- function scopeFor(mutation) {
3030
- var _a11;
3031
- return (_a11 = mutation.options.scope) == null ? void 0 : _a11.id;
3032
- }
3033
-
3034
- // node_modules/@tanstack/query-core/build/modern/mutationObserver.js
3035
- init_dirname();
3036
- init_buffer();
3037
- init_process();
3038
- var _client4, _currentResult2, _currentMutation, _mutateOptions, _updateResult, updateResult_fn, _notify2, notify_fn2, _a8;
3039
- var MutationObserver = (_a8 = class extends Subscribable {
3040
- constructor(client, options) {
3041
- super();
3042
- __privateAdd(this, _updateResult);
3043
- __privateAdd(this, _notify2);
3044
- __privateAdd(this, _client4, void 0);
3045
- __privateAdd(this, _currentResult2, void 0);
3046
- __privateAdd(this, _currentMutation, void 0);
3047
- __privateAdd(this, _mutateOptions, void 0);
3048
- __privateSet(this, _client4, client);
3049
- this.setOptions(options);
3050
- this.bindMethods();
3051
- __privateMethod(this, _updateResult, updateResult_fn).call(this);
3052
- }
3053
- bindMethods() {
3054
- this.mutate = this.mutate.bind(this);
3055
- this.reset = this.reset.bind(this);
3056
- }
3057
- setOptions(options) {
3058
- var _a11;
3059
- const prevOptions = this.options;
3060
- this.options = __privateGet(this, _client4).defaultMutationOptions(options);
3061
- if (!shallowEqualObjects(this.options, prevOptions)) {
3062
- __privateGet(this, _client4).getMutationCache().notify({
3063
- type: "observerOptionsUpdated",
3064
- mutation: __privateGet(this, _currentMutation),
3065
- observer: this
3066
- });
3067
- }
3068
- if ((prevOptions == null ? void 0 : prevOptions.mutationKey) && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) {
3069
- this.reset();
3070
- } else if (((_a11 = __privateGet(this, _currentMutation)) == null ? void 0 : _a11.state.status) === "pending") {
3071
- __privateGet(this, _currentMutation).setOptions(this.options);
3072
- }
3073
- }
3074
- onUnsubscribe() {
3075
- var _a11;
3076
- if (!this.hasListeners()) {
3077
- (_a11 = __privateGet(this, _currentMutation)) == null ? void 0 : _a11.removeObserver(this);
3078
- }
3079
- }
3080
- onMutationUpdate(action) {
3081
- __privateMethod(this, _updateResult, updateResult_fn).call(this);
3082
- __privateMethod(this, _notify2, notify_fn2).call(this, action);
3083
- }
3084
- getCurrentResult() {
3085
- return __privateGet(this, _currentResult2);
3086
- }
3087
- reset() {
3088
- var _a11;
3089
- (_a11 = __privateGet(this, _currentMutation)) == null ? void 0 : _a11.removeObserver(this);
3090
- __privateSet(this, _currentMutation, void 0);
3091
- __privateMethod(this, _updateResult, updateResult_fn).call(this);
3092
- __privateMethod(this, _notify2, notify_fn2).call(this);
3093
- }
3094
- mutate(variables, options) {
3095
- var _a11;
3096
- __privateSet(this, _mutateOptions, options);
3097
- (_a11 = __privateGet(this, _currentMutation)) == null ? void 0 : _a11.removeObserver(this);
3098
- __privateSet(this, _currentMutation, __privateGet(this, _client4).getMutationCache().build(__privateGet(this, _client4), this.options));
3099
- __privateGet(this, _currentMutation).addObserver(this);
3100
- return __privateGet(this, _currentMutation).execute(variables);
3101
- }
3102
- }, _client4 = new WeakMap(), _currentResult2 = new WeakMap(), _currentMutation = new WeakMap(), _mutateOptions = new WeakMap(), _updateResult = new WeakSet(), updateResult_fn = function() {
3103
- var _a11, _b2;
3104
- const state = (_b2 = (_a11 = __privateGet(this, _currentMutation)) == null ? void 0 : _a11.state) != null ? _b2 : getDefaultState2();
3105
- __privateSet(this, _currentResult2, __spreadProps(__spreadValues({}, state), {
3106
- isPending: state.status === "pending",
3107
- isSuccess: state.status === "success",
3108
- isError: state.status === "error",
3109
- isIdle: state.status === "idle",
3110
- mutate: this.mutate,
3111
- reset: this.reset
3112
- }));
3113
- }, _notify2 = new WeakSet(), notify_fn2 = function(action) {
3114
- notifyManager.batch(() => {
3115
- var _a11, _b2, _c, _d, _e, _f, _g, _h;
3116
- if (__privateGet(this, _mutateOptions) && this.hasListeners()) {
3117
- const variables = __privateGet(this, _currentResult2).variables;
3118
- const onMutateResult = __privateGet(this, _currentResult2).context;
3119
- const context = {
3120
- client: __privateGet(this, _client4),
3121
- meta: this.options.meta,
3122
- mutationKey: this.options.mutationKey
3123
- };
3124
- if ((action == null ? void 0 : action.type) === "success") {
3125
- try {
3126
- (_b2 = (_a11 = __privateGet(this, _mutateOptions)).onSuccess) == null ? void 0 : _b2.call(
3127
- _a11,
3128
- action.data,
3129
- variables,
3130
- onMutateResult,
3131
- context
3132
- );
3133
- } catch (e) {
3134
- void Promise.reject(e);
3135
- }
3136
- try {
3137
- (_d = (_c = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _d.call(
3138
- _c,
3139
- action.data,
3140
- null,
3141
- variables,
3142
- onMutateResult,
3143
- context
3144
- );
3145
- } catch (e) {
3146
- void Promise.reject(e);
3147
- }
3148
- } else if ((action == null ? void 0 : action.type) === "error") {
3149
- try {
3150
- (_f = (_e = __privateGet(this, _mutateOptions)).onError) == null ? void 0 : _f.call(
3151
- _e,
3152
- action.error,
3153
- variables,
3154
- onMutateResult,
3155
- context
3156
- );
3157
- } catch (e) {
3158
- void Promise.reject(e);
3159
- }
3160
- try {
3161
- (_h = (_g = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _h.call(
3162
- _g,
3163
- void 0,
3164
- action.error,
3165
- variables,
3166
- onMutateResult,
3167
- context
3168
- );
3169
- } catch (e) {
3170
- void Promise.reject(e);
3171
- }
3172
- }
3173
- }
3174
- this.listeners.forEach((listener) => {
3175
- listener(__privateGet(this, _currentResult2));
3176
- });
3177
- });
3178
- }, _a8);
3179
-
3180
- // node_modules/@tanstack/query-core/build/modern/queryCache.js
3181
- init_dirname();
3182
- init_buffer();
3183
- init_process();
3184
- var _queries, _a9;
3185
- var QueryCache = (_a9 = class extends Subscribable {
3186
- constructor(config = {}) {
3187
- super();
3188
- __privateAdd(this, _queries, void 0);
3189
- this.config = config;
3190
- __privateSet(this, _queries, /* @__PURE__ */ new Map());
3191
- }
3192
- build(client, options, state) {
3193
- var _a11;
3194
- const queryKey = options.queryKey;
3195
- const queryHash = (_a11 = options.queryHash) != null ? _a11 : hashQueryKeyByOptions(queryKey, options);
3196
- let query = this.get(queryHash);
3197
- if (!query) {
3198
- query = new Query({
3199
- client,
3200
- queryKey,
3201
- queryHash,
3202
- options: client.defaultQueryOptions(options),
3203
- state,
3204
- defaultOptions: client.getQueryDefaults(queryKey)
3205
- });
3206
- this.add(query);
3207
- }
3208
- return query;
3209
- }
3210
- add(query) {
3211
- if (!__privateGet(this, _queries).has(query.queryHash)) {
3212
- __privateGet(this, _queries).set(query.queryHash, query);
3213
- this.notify({
3214
- type: "added",
3215
- query
3216
- });
3217
- }
3218
- }
3219
- remove(query) {
3220
- const queryInMap = __privateGet(this, _queries).get(query.queryHash);
3221
- if (queryInMap) {
3222
- query.destroy();
3223
- if (queryInMap === query) {
3224
- __privateGet(this, _queries).delete(query.queryHash);
3225
- }
3226
- this.notify({ type: "removed", query });
3227
- }
3228
- }
3229
- clear() {
3230
- notifyManager.batch(() => {
3231
- this.getAll().forEach((query) => {
3232
- this.remove(query);
3233
- });
3234
- });
3235
- }
3236
- get(queryHash) {
3237
- return __privateGet(this, _queries).get(queryHash);
3238
- }
3239
- getAll() {
3240
- return [...__privateGet(this, _queries).values()];
3241
- }
3242
- find(filters) {
3243
- const defaultedFilters = __spreadValues({ exact: true }, filters);
3244
- return this.getAll().find(
3245
- (query) => matchQuery(defaultedFilters, query)
3246
- );
3247
- }
3248
- findAll(filters = {}) {
3249
- const queries = this.getAll();
3250
- return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;
3251
- }
3252
- notify(event) {
3253
- notifyManager.batch(() => {
3254
- this.listeners.forEach((listener) => {
3255
- listener(event);
3256
- });
3257
- });
3258
- }
3259
- onFocus() {
3260
- notifyManager.batch(() => {
3261
- this.getAll().forEach((query) => {
3262
- query.onFocus();
3263
- });
3264
- });
3265
- }
3266
- onOnline() {
3267
- notifyManager.batch(() => {
3268
- this.getAll().forEach((query) => {
3269
- query.onOnline();
3270
- });
3271
- });
3272
- }
3273
- }, _queries = new WeakMap(), _a9);
3274
-
3275
- // node_modules/@tanstack/query-core/build/modern/queryClient.js
3276
- init_dirname();
3277
- init_buffer();
3278
- init_process();
3279
- var _queryCache, _mutationCache2, _defaultOptions2, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _a10;
3280
- var QueryClient = (_a10 = class {
3281
- constructor(config = {}) {
3282
- __privateAdd(this, _queryCache, void 0);
3283
- __privateAdd(this, _mutationCache2, void 0);
3284
- __privateAdd(this, _defaultOptions2, void 0);
3285
- __privateAdd(this, _queryDefaults, void 0);
3286
- __privateAdd(this, _mutationDefaults, void 0);
3287
- __privateAdd(this, _mountCount, void 0);
3288
- __privateAdd(this, _unsubscribeFocus, void 0);
3289
- __privateAdd(this, _unsubscribeOnline, void 0);
3290
- __privateSet(this, _queryCache, config.queryCache || new QueryCache());
3291
- __privateSet(this, _mutationCache2, config.mutationCache || new MutationCache());
3292
- __privateSet(this, _defaultOptions2, config.defaultOptions || {});
3293
- __privateSet(this, _queryDefaults, /* @__PURE__ */ new Map());
3294
- __privateSet(this, _mutationDefaults, /* @__PURE__ */ new Map());
3295
- __privateSet(this, _mountCount, 0);
3296
- }
3297
- mount() {
3298
- __privateWrapper(this, _mountCount)._++;
3299
- if (__privateGet(this, _mountCount) !== 1)
3300
- return;
3301
- __privateSet(this, _unsubscribeFocus, focusManager.subscribe(async (focused) => {
3302
- if (focused) {
3303
- await this.resumePausedMutations();
3304
- __privateGet(this, _queryCache).onFocus();
3305
- }
3306
- }));
3307
- __privateSet(this, _unsubscribeOnline, onlineManager.subscribe(async (online) => {
3308
- if (online) {
3309
- await this.resumePausedMutations();
3310
- __privateGet(this, _queryCache).onOnline();
3311
- }
3312
- }));
3313
- }
3314
- unmount() {
3315
- var _a11, _b2;
3316
- __privateWrapper(this, _mountCount)._--;
3317
- if (__privateGet(this, _mountCount) !== 0)
3318
- return;
3319
- (_a11 = __privateGet(this, _unsubscribeFocus)) == null ? void 0 : _a11.call(this);
3320
- __privateSet(this, _unsubscribeFocus, void 0);
3321
- (_b2 = __privateGet(this, _unsubscribeOnline)) == null ? void 0 : _b2.call(this);
3322
- __privateSet(this, _unsubscribeOnline, void 0);
3323
- }
3324
- isFetching(filters) {
3325
- return __privateGet(this, _queryCache).findAll(__spreadProps(__spreadValues({}, filters), { fetchStatus: "fetching" })).length;
3326
- }
3327
- isMutating(filters) {
3328
- return __privateGet(this, _mutationCache2).findAll(__spreadProps(__spreadValues({}, filters), { status: "pending" })).length;
3329
- }
3330
- /**
3331
- * Imperative (non-reactive) way to retrieve data for a QueryKey.
3332
- * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
3333
- *
3334
- * Hint: Do not use this function inside a component, because it won't receive updates.
3335
- * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
3336
- */
3337
- getQueryData(queryKey) {
3338
- var _a11;
3339
- const options = this.defaultQueryOptions({ queryKey });
3340
- return (_a11 = __privateGet(this, _queryCache).get(options.queryHash)) == null ? void 0 : _a11.state.data;
3341
- }
3342
- ensureQueryData(options) {
3343
- const defaultedOptions = this.defaultQueryOptions(options);
3344
- const query = __privateGet(this, _queryCache).build(this, defaultedOptions);
3345
- const cachedData = query.state.data;
3346
- if (cachedData === void 0) {
3347
- return this.fetchQuery(options);
3348
- }
3349
- if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) {
3350
- void this.prefetchQuery(defaultedOptions);
3351
- }
3352
- return Promise.resolve(cachedData);
3353
- }
3354
- getQueriesData(filters) {
3355
- return __privateGet(this, _queryCache).findAll(filters).map(({ queryKey, state }) => {
3356
- const data = state.data;
3357
- return [queryKey, data];
3358
- });
3359
- }
3360
- setQueryData(queryKey, updater, options) {
3361
- const defaultedOptions = this.defaultQueryOptions({ queryKey });
3362
- const query = __privateGet(this, _queryCache).get(
3363
- defaultedOptions.queryHash
3364
- );
3365
- const prevData = query == null ? void 0 : query.state.data;
3366
- const data = functionalUpdate(updater, prevData);
3367
- if (data === void 0) {
3368
- return void 0;
3369
- }
3370
- return __privateGet(this, _queryCache).build(this, defaultedOptions).setData(data, __spreadProps(__spreadValues({}, options), { manual: true }));
3371
- }
3372
- setQueriesData(filters, updater, options) {
3373
- return notifyManager.batch(
3374
- () => __privateGet(this, _queryCache).findAll(filters).map(({ queryKey }) => [
3375
- queryKey,
3376
- this.setQueryData(queryKey, updater, options)
3377
- ])
3378
- );
3379
- }
3380
- getQueryState(queryKey) {
3381
- var _a11;
3382
- const options = this.defaultQueryOptions({ queryKey });
3383
- return (_a11 = __privateGet(this, _queryCache).get(
3384
- options.queryHash
3385
- )) == null ? void 0 : _a11.state;
3386
- }
3387
- removeQueries(filters) {
3388
- const queryCache = __privateGet(this, _queryCache);
3389
- notifyManager.batch(() => {
3390
- queryCache.findAll(filters).forEach((query) => {
3391
- queryCache.remove(query);
3392
- });
3393
- });
3394
- }
3395
- resetQueries(filters, options) {
3396
- const queryCache = __privateGet(this, _queryCache);
3397
- return notifyManager.batch(() => {
3398
- queryCache.findAll(filters).forEach((query) => {
3399
- query.reset();
3400
- });
3401
- return this.refetchQueries(
3402
- __spreadValues({
3403
- type: "active"
3404
- }, filters),
3405
- options
3406
- );
3407
- });
3408
- }
3409
- cancelQueries(filters, cancelOptions = {}) {
3410
- const defaultedCancelOptions = __spreadValues({ revert: true }, cancelOptions);
3411
- const promises = notifyManager.batch(
3412
- () => __privateGet(this, _queryCache).findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
3413
- );
3414
- return Promise.all(promises).then(noop).catch(noop);
3415
- }
3416
- invalidateQueries(filters, options = {}) {
3417
- return notifyManager.batch(() => {
3418
- var _a11, _b2;
3419
- __privateGet(this, _queryCache).findAll(filters).forEach((query) => {
3420
- query.invalidate();
3421
- });
3422
- if ((filters == null ? void 0 : filters.refetchType) === "none") {
3423
- return Promise.resolve();
3424
- }
3425
- return this.refetchQueries(
3426
- __spreadProps(__spreadValues({}, filters), {
3427
- type: (_b2 = (_a11 = filters == null ? void 0 : filters.refetchType) != null ? _a11 : filters == null ? void 0 : filters.type) != null ? _b2 : "active"
3428
- }),
3429
- options
3430
- );
3431
- });
3432
- }
3433
- refetchQueries(filters, options = {}) {
3434
- var _a11;
3435
- const fetchOptions = __spreadProps(__spreadValues({}, options), {
3436
- cancelRefetch: (_a11 = options.cancelRefetch) != null ? _a11 : true
3437
- });
3438
- const promises = notifyManager.batch(
3439
- () => __privateGet(this, _queryCache).findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {
3440
- let promise = query.fetch(void 0, fetchOptions);
3441
- if (!fetchOptions.throwOnError) {
3442
- promise = promise.catch(noop);
3443
- }
3444
- return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
3445
- })
3446
- );
3447
- return Promise.all(promises).then(noop);
3448
- }
3449
- fetchQuery(options) {
3450
- const defaultedOptions = this.defaultQueryOptions(options);
3451
- if (defaultedOptions.retry === void 0) {
3452
- defaultedOptions.retry = false;
3453
- }
3454
- const query = __privateGet(this, _queryCache).build(this, defaultedOptions);
3455
- return query.isStaleByTime(
3456
- resolveStaleTime(defaultedOptions.staleTime, query)
3457
- ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
3458
- }
3459
- prefetchQuery(options) {
3460
- return this.fetchQuery(options).then(noop).catch(noop);
3461
- }
3462
- fetchInfiniteQuery(options) {
3463
- options.behavior = infiniteQueryBehavior(options.pages);
3464
- return this.fetchQuery(options);
3465
- }
3466
- prefetchInfiniteQuery(options) {
3467
- return this.fetchInfiniteQuery(options).then(noop).catch(noop);
3468
- }
3469
- ensureInfiniteQueryData(options) {
3470
- options.behavior = infiniteQueryBehavior(options.pages);
3471
- return this.ensureQueryData(options);
3472
- }
3473
- resumePausedMutations() {
3474
- if (onlineManager.isOnline()) {
3475
- return __privateGet(this, _mutationCache2).resumePausedMutations();
3476
- }
3477
- return Promise.resolve();
3478
- }
3479
- getQueryCache() {
3480
- return __privateGet(this, _queryCache);
3481
- }
3482
- getMutationCache() {
3483
- return __privateGet(this, _mutationCache2);
3484
- }
3485
- getDefaultOptions() {
3486
- return __privateGet(this, _defaultOptions2);
3487
- }
3488
- setDefaultOptions(options) {
3489
- __privateSet(this, _defaultOptions2, options);
3490
- }
3491
- setQueryDefaults(queryKey, options) {
3492
- __privateGet(this, _queryDefaults).set(hashKey(queryKey), {
3493
- queryKey,
3494
- defaultOptions: options
3495
- });
3496
- }
3497
- getQueryDefaults(queryKey) {
3498
- const defaults = [...__privateGet(this, _queryDefaults).values()];
3499
- const result = {};
3500
- defaults.forEach((queryDefault) => {
3501
- if (partialMatchKey(queryKey, queryDefault.queryKey)) {
3502
- Object.assign(result, queryDefault.defaultOptions);
3503
- }
3504
- });
3505
- return result;
3506
- }
3507
- setMutationDefaults(mutationKey, options) {
3508
- __privateGet(this, _mutationDefaults).set(hashKey(mutationKey), {
3509
- mutationKey,
3510
- defaultOptions: options
3511
- });
3512
- }
3513
- getMutationDefaults(mutationKey) {
3514
- const defaults = [...__privateGet(this, _mutationDefaults).values()];
3515
- const result = {};
3516
- defaults.forEach((queryDefault) => {
3517
- if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {
3518
- Object.assign(result, queryDefault.defaultOptions);
3519
- }
3520
- });
3521
- return result;
3522
- }
3523
- defaultQueryOptions(options) {
3524
- if (options._defaulted) {
3525
- return options;
3526
- }
3527
- const defaultedOptions = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, __privateGet(this, _defaultOptions2).queries), this.getQueryDefaults(options.queryKey)), options), {
3528
- _defaulted: true
3529
- });
3530
- if (!defaultedOptions.queryHash) {
3531
- defaultedOptions.queryHash = hashQueryKeyByOptions(
3532
- defaultedOptions.queryKey,
3533
- defaultedOptions
3534
- );
3535
- }
3536
- if (defaultedOptions.refetchOnReconnect === void 0) {
3537
- defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
3538
- }
3539
- if (defaultedOptions.throwOnError === void 0) {
3540
- defaultedOptions.throwOnError = !!defaultedOptions.suspense;
3541
- }
3542
- if (!defaultedOptions.networkMode && defaultedOptions.persister) {
3543
- defaultedOptions.networkMode = "offlineFirst";
3544
- }
3545
- if (defaultedOptions.queryFn === skipToken) {
3546
- defaultedOptions.enabled = false;
3547
- }
3548
- return defaultedOptions;
3549
- }
3550
- defaultMutationOptions(options) {
3551
- if (options == null ? void 0 : options._defaulted) {
3552
- return options;
3553
- }
3554
- return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, __privateGet(this, _defaultOptions2).mutations), (options == null ? void 0 : options.mutationKey) && this.getMutationDefaults(options.mutationKey)), options), {
3555
- _defaulted: true
3556
- });
3557
- }
3558
- clear() {
3559
- __privateGet(this, _queryCache).clear();
3560
- __privateGet(this, _mutationCache2).clear();
3561
- }
3562
- }, _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);
3563
-
3564
- // src/controllers/query.controller.ts
3565
- var QueryController = class {
3566
- constructor(host, optionsFn, hostPropertyName) {
3567
- this.host = host;
3568
- this.optionsFn = optionsFn;
3569
- this.host.addController(this);
3570
- this.hostPropertyName = hostPropertyName;
3571
- if (this.optionsFn) {
3572
- this.observeQuery(this.optionsFn);
3573
- }
3574
- }
3575
- observeQuery(options, optimistic = true) {
3576
- const queryClient = this.host.queryClient;
3577
- const resolvedOptions = typeof options === "function" ? options() : options;
3578
- const defaultedOptions = queryClient.defaultQueryOptions(resolvedOptions);
3579
- this.queryObserver = new QueryObserver(queryClient, defaultedOptions);
3580
- this.result = optimistic ? this.queryObserver.getOptimisticResult(defaultedOptions) : void 0;
3581
- this.host.requestUpdate();
3582
- }
3583
- hostUpdate() {
3584
- if (!this.optionsFn || !this.queryObserver)
3585
- return;
3586
- const defaultedOptions = this.host.queryClient.defaultQueryOptions(
3587
- this.optionsFn()
3588
- );
3589
- this.queryObserver.setOptions(defaultedOptions);
3590
- }
3591
- hostConnected() {
3592
- this.subscribe();
3593
- }
3594
- async subscribe() {
3595
- var _a11;
3596
- if (!this.queryObserver) {
3597
- if (this.optionsFn)
3598
- this.observeQuery(this.optionsFn);
3599
- if (!this.queryObserver)
3600
- return;
3601
- }
3602
- (_a11 = this.unsubscribe) == null ? void 0 : _a11.call(this);
3603
- this.unsubscribe = this.queryObserver.subscribe(
3604
- (result) => {
3605
- this.result = result;
3606
- if (this.hostPropertyName) {
3607
- ;
3608
- this.host[this.hostPropertyName] = result;
3609
- }
3610
- this.host.requestUpdate();
3611
- }
3612
- );
3613
- this.queryObserver.updateResult();
3614
- this.host.requestUpdate();
3615
- }
3616
- hostDisconnected() {
3617
- var _a11;
3618
- (_a11 = this.unsubscribe) == null ? void 0 : _a11.call(this);
3619
- this.unsubscribe = void 0;
3620
- }
3621
- };
3622
-
3623
- // src/controllers/collection.controller.ts
3624
- var _collectionQuery, _capabilitiesQuery, _variablesQuery, _gesDiscCollectionQuery, _samplingQuery, _giovanniVariablesQuery, _collectionInfo, _capsData, _cmrData, _giovanniData, _giovanniSet;
3625
- var CollectionController = class {
3626
- constructor(host, config) {
3627
- this.host = host;
3628
- this.config = config;
3629
- __privateAdd(this, _collectionQuery, void 0);
3630
- __privateAdd(this, _capabilitiesQuery, void 0);
3631
- __privateAdd(this, _variablesQuery, void 0);
3632
- __privateAdd(this, _gesDiscCollectionQuery, void 0);
3633
- __privateAdd(this, _samplingQuery, void 0);
3634
- __privateAdd(this, _giovanniVariablesQuery, void 0);
3635
- // Memoized values — stable references rebuilt only when underlying query data changes.
3636
- __privateAdd(this, _collectionInfo, void 0);
3637
- __privateAdd(this, _capsData, void 0);
3638
- __privateAdd(this, _cmrData, void 0);
3639
- __privateAdd(this, _giovanniData, void 0);
3640
- __privateAdd(this, _giovanniSet, /* @__PURE__ */ new Set());
3641
- this.host.addController(this);
3642
- __privateSet(this, _collectionQuery, new QueryController(
3643
- this.host,
3644
- () => queryCmrCollection(this.config.getCollectionEntryId())
3645
- ));
3646
- __privateSet(this, _capabilitiesQuery, new QueryController(
3647
- this.host,
3648
- () => queryHarmonyCapabilities(this.conceptId, {
3649
- bearerToken: this.config.getBearerToken()
3650
- })
3651
- ));
3652
- __privateSet(this, _variablesQuery, new QueryController(
3653
- this.host,
3654
- () => queryCmrVariables({ collectionConceptId: this.conceptId })
3655
- ));
3656
- __privateSet(this, _gesDiscCollectionQuery, new QueryController(
3657
- this.host,
3658
- () => queryGesDiscCollection({
3659
- collectionEntryId: this.config.getCollectionEntryId(),
3660
- collectionConceptId: this.conceptId
3661
- })
3662
- ));
3663
- __privateSet(this, _samplingQuery, new QueryController(
3664
- this.host,
3665
- () => queryCmrSampling(this.config.getCollectionEntryId())
3666
- ));
3667
- __privateSet(this, _giovanniVariablesQuery, new QueryController(
3668
- this.host,
3669
- queryGiovanniConfiguredVariables
3670
- ));
3671
- }
3672
- // ReactiveController is satisfied by addController above; sub-controllers handle their own lifecycle
3673
- hostConnected() {
3674
- }
3675
- hostDisconnected() {
3676
- }
3677
- // ─── Derived ────────────────────────────────────────────────────────────────
3678
- /** The CMR concept-id for the current collection, once loaded. */
3679
- get conceptId() {
3680
- var _a11, _b2;
3681
- return (_b2 = (_a11 = __privateGet(this, _collectionQuery).result) == null ? void 0 : _a11.data) == null ? void 0 : _b2.meta["concept-id"];
3682
- }
3683
- // ─── Query results ───────────────────────────────────────────────────────────
3684
- /** Raw CMR UMM-C result for the current collection. */
3685
- get collection() {
3686
- return __privateGet(this, _collectionQuery).result;
3687
- }
3688
- /** Harmony capabilities for the current collection (output formats, subsetting options, etc.). */
3689
- get capabilities() {
3690
- return __privateGet(this, _capabilitiesQuery).result;
3691
- }
3692
- /** CMR UMM-Var records for all variables in the current collection. */
3693
- get variables() {
3694
- return __privateGet(this, _variablesQuery).result;
3695
- }
3696
- /** GES DISC collection details (user-friendly dimension names, etc.). */
3697
- get gesDiscCollection() {
3698
- return __privateGet(this, _gesDiscCollectionQuery).result;
3699
- }
3700
- /** First/last granule dates derived from a CMR temporal sampling query. */
3701
- get sampling() {
3702
- return __privateGet(this, _samplingQuery).result;
3703
- }
3704
- /** List of variable names configured in Giovanni. Stable reference — only changes when data changes. */
3705
- get giovanniVariables() {
3706
- var _a11, _b2;
3707
- const raw = (_b2 = (_a11 = __privateGet(this, _giovanniVariablesQuery).result) == null ? void 0 : _a11.data) != null ? _b2 : void 0;
3708
- if (raw !== __privateGet(this, _giovanniData)) {
3709
- __privateSet(this, _giovanniData, raw);
3710
- __privateSet(this, _giovanniSet, new Set(raw != null ? raw : []));
3711
- }
3712
- return __privateGet(this, _giovanniSet);
3713
- }
3714
- // ─── Status helpers ──────────────────────────────────────────────────────────
3715
- /** True while the primary collection record is being fetched. */
3716
- get isLoadingCollection() {
3717
- var _a11, _b2;
3718
- return (_b2 = (_a11 = __privateGet(this, _collectionQuery).result) == null ? void 0 : _a11.isLoading) != null ? _b2 : false;
3719
- }
3720
- /** True if the capabilities query errored (e.g. collection not found in Harmony). */
3721
- get hasCapabilitiesError() {
3722
- var _a11, _b2;
3723
- return (_b2 = (_a11 = __privateGet(this, _capabilitiesQuery).result) == null ? void 0 : _a11.isError) != null ? _b2 : false;
3724
- }
3725
- // ─── Computed from sampling ───────────────────────────────────────────────────
3726
- /** True if the collection contains sub-daily granules (temporal extent < 24 h). */
3727
- get isSubDaily() {
3728
- var _a11, _b2, _c;
3729
- return (_c = (_b2 = (_a11 = __privateGet(this, _samplingQuery).result) == null ? void 0 : _a11.data) == null ? void 0 : _b2.isSubDaily) != null ? _c : false;
3730
- }
3731
- /** True if the collection has at least one granule. */
3732
- get hasGranules() {
3733
- var _a11, _b2, _c;
3734
- return (_c = (_b2 = (_a11 = __privateGet(this, _samplingQuery).result) == null ? void 0 : _a11.data) == null ? void 0 : _b2.hasGranules) != null ? _c : false;
3735
- }
3736
- // ─── Computed from CMR collection ────────────────────────────────────────────
3737
- /**
3738
- * Bounding box string derived from the UMM-C spatial extent, in the format
3739
- * "west, south, east, north". Returns a global default if no extent is defined.
3740
- */
3741
- get spatialConstraints() {
3742
- var _a11, _b2, _c, _d, _e;
3743
- const rects = (_e = (_d = (_c = (_b2 = (_a11 = __privateGet(this, _collectionQuery).result) == null ? void 0 : _a11.data) == null ? void 0 : _b2.umm.SpatialExtent) == null ? void 0 : _c.HorizontalSpatialDomain) == null ? void 0 : _d.Geometry) == null ? void 0 : _e.BoundingRectangles;
3744
- if (!(rects == null ? void 0 : rects.length))
3745
- return "-180, -90, 180, 90";
3746
- const r = rects[0];
3747
- return `${r.WestBoundingCoordinate}, ${r.SouthBoundingCoordinate}, ${r.EastBoundingCoordinate}, ${r.NorthBoundingCoordinate}`;
3748
- }
3749
- /**
3750
- * Returns a `CollectionWithAvailableServices` shaped object by combining the
3751
- * Harmony capabilities response with UMM-C metadata from CMR.
3752
- * Returns undefined until both capabilities and the collection record are loaded.
3753
- * Stable reference — only rebuilds when the underlying query data changes.
3754
- */
3755
- get collectionInfo() {
3756
- var _a11, _b2, _c;
3757
- const caps = (_a11 = __privateGet(this, _capabilitiesQuery).result) == null ? void 0 : _a11.data;
3758
- const cmr = (_b2 = __privateGet(this, _collectionQuery).result) == null ? void 0 : _b2.data;
3759
- if (!caps || !cmr)
3760
- return void 0;
3761
- if (caps !== __privateGet(this, _capsData) || cmr !== __privateGet(this, _cmrData)) {
3762
- __privateSet(this, _capsData, caps);
3763
- __privateSet(this, _cmrData, cmr);
3764
- __privateSet(this, _collectionInfo, __spreadProps(__spreadValues({}, caps), {
3765
- granuleCount: (_c = cmr.meta["granule-count"]) != null ? _c : 0,
3766
- collection: cmr.umm
3767
- }));
3768
- }
3769
- return __privateGet(this, _collectionInfo);
3770
- }
3771
- };
3772
- _collectionQuery = new WeakMap();
3773
- _capabilitiesQuery = new WeakMap();
3774
- _variablesQuery = new WeakMap();
3775
- _gesDiscCollectionQuery = new WeakMap();
3776
- _samplingQuery = new WeakMap();
3777
- _giovanniVariablesQuery = new WeakMap();
3778
- _collectionInfo = new WeakMap();
3779
- _capsData = new WeakMap();
3780
- _cmrData = new WeakMap();
3781
- _giovanniData = new WeakMap();
3782
- _giovanniSet = new WeakMap();
3783
-
3784
- export {
3785
- Environments,
3786
- HARMONY_URLS,
3787
- FINAL_STATUSES,
3788
- queryCmrGranules,
3789
- queryHarmonyJobStatus,
3790
- queryCreateHarmonySubsetJob,
3791
- queryCancelHarmonySubsetJob,
3792
- dehydrate,
3793
- hydrate,
3794
- MutationObserver,
3795
- QueryClient,
3796
- QueryController,
3797
- CollectionController
3798
- };