@perses-dev/timeseries-chart-plugin 0.12.1 → 0.13.0-beta.1

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 (205) hide show
  1. package/__mf/css/async/907.85c2cbf6.css +1 -0
  2. package/__mf/font/inter-cyrillic-300-normal.432f2b21.woff +0 -0
  3. package/__mf/font/inter-cyrillic-300-normal.9da91009.woff2 +0 -0
  4. package/__mf/font/inter-cyrillic-400-normal.372704ff.woff2 +0 -0
  5. package/__mf/font/inter-cyrillic-400-normal.a6b6ef6f.woff +0 -0
  6. package/__mf/font/inter-cyrillic-500-normal.7c15bba8.woff2 +0 -0
  7. package/__mf/font/inter-cyrillic-500-normal.b9f8c929.woff +0 -0
  8. package/__mf/font/inter-cyrillic-600-normal.2f42892a.woff2 +0 -0
  9. package/__mf/font/inter-cyrillic-600-normal.c3987adc.woff +0 -0
  10. package/__mf/font/inter-cyrillic-700-normal.93eba3c3.woff +0 -0
  11. package/__mf/font/inter-cyrillic-700-normal.e9e5b2dc.woff2 +0 -0
  12. package/__mf/font/inter-cyrillic-900-normal.f285bd7a.woff2 +0 -0
  13. package/__mf/font/inter-cyrillic-900-normal.ffbd8a3a.woff +0 -0
  14. package/__mf/font/inter-cyrillic-ext-300-normal.95bb9038.woff2 +0 -0
  15. package/__mf/font/inter-cyrillic-ext-300-normal.cfc143a9.woff +0 -0
  16. package/__mf/font/inter-cyrillic-ext-400-normal.2a31c04b.woff +0 -0
  17. package/__mf/font/inter-cyrillic-ext-400-normal.f572b170.woff2 +0 -0
  18. package/__mf/font/inter-cyrillic-ext-500-normal.5a6bb1da.woff +0 -0
  19. package/__mf/font/inter-cyrillic-ext-500-normal.fe0d9b14.woff2 +0 -0
  20. package/__mf/font/inter-cyrillic-ext-600-normal.ecbdecad.woff +0 -0
  21. package/__mf/font/inter-cyrillic-ext-600-normal.f7b3c15b.woff2 +0 -0
  22. package/__mf/font/inter-cyrillic-ext-700-normal.4b4022a6.woff +0 -0
  23. package/__mf/font/inter-cyrillic-ext-700-normal.74b516d2.woff2 +0 -0
  24. package/__mf/font/inter-cyrillic-ext-900-normal.9970ddb5.woff +0 -0
  25. package/__mf/font/inter-cyrillic-ext-900-normal.a0d59adc.woff2 +0 -0
  26. package/__mf/font/inter-greek-300-normal.0d7be683.woff2 +0 -0
  27. package/__mf/font/inter-greek-300-normal.8f0b988e.woff +0 -0
  28. package/__mf/font/inter-greek-400-normal.cc58c11b.woff +0 -0
  29. package/__mf/font/inter-greek-400-normal.d7020e3c.woff2 +0 -0
  30. package/__mf/font/inter-greek-500-normal.d9a33207.woff +0 -0
  31. package/__mf/font/inter-greek-500-normal.f41f43db.woff2 +0 -0
  32. package/__mf/font/inter-greek-600-normal.4ec0c1c1.woff +0 -0
  33. package/__mf/font/inter-greek-600-normal.cc532937.woff2 +0 -0
  34. package/__mf/font/inter-greek-700-normal.5ec6c758.woff +0 -0
  35. package/__mf/font/inter-greek-700-normal.97f0eeeb.woff2 +0 -0
  36. package/__mf/font/inter-greek-900-normal.46b66369.woff2 +0 -0
  37. package/__mf/font/inter-greek-900-normal.9ae3a3c5.woff +0 -0
  38. package/__mf/font/inter-greek-ext-300-normal.10247a66.woff2 +0 -0
  39. package/__mf/font/inter-greek-ext-300-normal.4668e5cb.woff +0 -0
  40. package/__mf/font/inter-greek-ext-400-normal.4ce1df5d.woff2 +0 -0
  41. package/__mf/font/inter-greek-ext-400-normal.88ede1ea.woff +0 -0
  42. package/__mf/font/inter-greek-ext-500-normal.7a4aa726.woff +0 -0
  43. package/__mf/font/inter-greek-ext-500-normal.cbd51e2d.woff2 +0 -0
  44. package/__mf/font/inter-greek-ext-600-normal.089a95ee.woff +0 -0
  45. package/__mf/font/inter-greek-ext-600-normal.1f33d317.woff2 +0 -0
  46. package/__mf/font/inter-greek-ext-700-normal.31f1075d.woff +0 -0
  47. package/__mf/font/inter-greek-ext-700-normal.827cd618.woff2 +0 -0
  48. package/__mf/font/inter-greek-ext-900-normal.531bcee7.woff +0 -0
  49. package/__mf/font/inter-greek-ext-900-normal.8a9b36b9.woff2 +0 -0
  50. package/__mf/font/inter-latin-300-normal.15fb600d.woff2 +0 -0
  51. package/__mf/font/inter-latin-300-normal.6f95f590.woff +0 -0
  52. package/__mf/font/inter-latin-400-normal.2c7a775c.woff +0 -0
  53. package/__mf/font/inter-latin-400-normal.ef6d3f52.woff2 +0 -0
  54. package/__mf/font/inter-latin-500-normal.b7b43ace.woff2 +0 -0
  55. package/__mf/font/inter-latin-500-normal.cb4c8ceb.woff +0 -0
  56. package/__mf/font/inter-latin-600-normal.8fb1a964.woff2 +0 -0
  57. package/__mf/font/inter-latin-600-normal.ce0f5f43.woff +0 -0
  58. package/__mf/font/inter-latin-700-normal.953b7aa5.woff2 +0 -0
  59. package/__mf/font/inter-latin-700-normal.9c21d4dc.woff +0 -0
  60. package/__mf/font/inter-latin-900-normal.2a8028ec.woff2 +0 -0
  61. package/__mf/font/inter-latin-900-normal.fa252135.woff +0 -0
  62. package/__mf/font/inter-latin-ext-300-normal.167cc8c9.woff2 +0 -0
  63. package/__mf/font/inter-latin-ext-300-normal.f695be66.woff +0 -0
  64. package/__mf/font/inter-latin-ext-400-normal.32a25442.woff2 +0 -0
  65. package/__mf/font/inter-latin-ext-400-normal.4edcaace.woff +0 -0
  66. package/__mf/font/inter-latin-ext-500-normal.a19a84a6.woff +0 -0
  67. package/__mf/font/inter-latin-ext-500-normal.d9b491de.woff2 +0 -0
  68. package/__mf/font/inter-latin-ext-600-normal.38b075d8.woff2 +0 -0
  69. package/__mf/font/inter-latin-ext-600-normal.49faa47a.woff +0 -0
  70. package/__mf/font/inter-latin-ext-700-normal.93534b50.woff +0 -0
  71. package/__mf/font/inter-latin-ext-700-normal.b63daa1a.woff2 +0 -0
  72. package/__mf/font/inter-latin-ext-900-normal.0efdb307.woff +0 -0
  73. package/__mf/font/inter-latin-ext-900-normal.9c0fc2c7.woff2 +0 -0
  74. package/__mf/font/inter-vietnamese-300-normal.aad496d8.woff +0 -0
  75. package/__mf/font/inter-vietnamese-300-normal.ad9ef503.woff2 +0 -0
  76. package/__mf/font/inter-vietnamese-400-normal.a9dd2faf.woff +0 -0
  77. package/__mf/font/inter-vietnamese-400-normal.de4fc44f.woff2 +0 -0
  78. package/__mf/font/inter-vietnamese-500-normal.7c0a695f.woff2 +0 -0
  79. package/__mf/font/inter-vietnamese-500-normal.a3a73b95.woff +0 -0
  80. package/__mf/font/inter-vietnamese-600-normal.9d518599.woff2 +0 -0
  81. package/__mf/font/inter-vietnamese-600-normal.c5ce3fcb.woff +0 -0
  82. package/__mf/font/inter-vietnamese-700-normal.bc68b199.woff +0 -0
  83. package/__mf/font/inter-vietnamese-700-normal.faf12809.woff2 +0 -0
  84. package/__mf/font/inter-vietnamese-900-normal.2b782045.woff +0 -0
  85. package/__mf/font/inter-vietnamese-900-normal.e639b65a.woff2 +0 -0
  86. package/__mf/js/TimeSeriesChart.f9dd142d.js +7 -0
  87. package/__mf/js/async/121.df4898d6.js +2 -0
  88. package/__mf/js/async/177.56f1be10.js +1 -0
  89. package/__mf/js/async/187.2cc43fac.js +24 -0
  90. package/__mf/js/async/192.beef3a1a.js +1 -0
  91. package/__mf/js/async/2.c3740bb9.js +1 -0
  92. package/__mf/js/async/235.c24f24f7.js +1 -0
  93. package/__mf/js/async/274.d112354f.js +2 -0
  94. package/__mf/js/async/356.9f551c8a.js +1 -0
  95. package/__mf/js/async/392.2350fb02.js +2 -0
  96. package/__mf/js/async/470.a4fd777e.js +2 -0
  97. package/__mf/js/async/491.6f81cf51.js +1 -0
  98. package/__mf/js/async/568.cdcaf97d.js +1 -0
  99. package/__mf/js/async/587.c12780da.js +1 -0
  100. package/__mf/js/async/588.6662e16a.js +1 -0
  101. package/__mf/js/async/616.52acb1b4.js +1 -0
  102. package/__mf/js/async/681.8d61b348.js +110 -0
  103. package/__mf/js/async/681.8d61b348.js.LICENSE.txt +27 -0
  104. package/__mf/js/async/702.de247ad8.js +2 -0
  105. package/__mf/js/async/71.84e486c9.js +1 -0
  106. package/__mf/js/async/724.3439df06.js +1 -0
  107. package/__mf/js/async/78.91de282a.js +1 -0
  108. package/__mf/js/async/780.12a33d06.js +39 -0
  109. package/__mf/js/async/{390.ad50daba.js.LICENSE.txt → 780.12a33d06.js.LICENSE.txt} +11 -23
  110. package/__mf/js/async/873.9aad328a.js +1 -0
  111. package/__mf/js/async/907.5ce8f69d.js +7 -0
  112. package/__mf/js/async/{472.fd3069f0.js.LICENSE.txt → 907.5ce8f69d.js.LICENSE.txt} +19 -1
  113. package/__mf/js/async/941.c0e2d25e.js +2 -0
  114. package/__mf/js/async/968.6de5fa7c.js +1 -0
  115. package/__mf/js/async/978.5c14e175.js +1 -0
  116. package/__mf/js/async/__federation_expose_TimeSeriesChart.d1167045.js +1 -0
  117. package/__mf/js/async/lib-router.1934857d.js +2 -0
  118. package/__mf/js/main.2bb9f3e3.js +7 -0
  119. package/lib/QuerySettingsEditor.d.ts.map +1 -1
  120. package/lib/QuerySettingsEditor.js +179 -167
  121. package/lib/QuerySettingsEditor.js.map +1 -1
  122. package/lib/TimeSeriesChartBase.d.ts +2 -2
  123. package/lib/TimeSeriesChartBase.d.ts.map +1 -1
  124. package/lib/TimeSeriesChartBase.js +12 -11
  125. package/lib/TimeSeriesChartBase.js.map +1 -1
  126. package/lib/TimeSeriesChartPanel.d.ts +1 -1
  127. package/lib/TimeSeriesChartPanel.d.ts.map +1 -1
  128. package/lib/TimeSeriesChartPanel.js +2 -3
  129. package/lib/TimeSeriesChartPanel.js.map +1 -1
  130. package/lib/cjs/QuerySettingsEditor.js +177 -165
  131. package/lib/cjs/TimeSeriesChartBase.js +13 -12
  132. package/lib/cjs/TimeSeriesChartPanel.js +4 -5
  133. package/lib/cjs/utils/data-transform.js +1 -2
  134. package/lib/cjs/utils/timezone-formatter.js +48 -0
  135. package/lib/test/mock-query-results.d.ts +1 -1
  136. package/lib/test/mock-query-results.js.map +1 -1
  137. package/lib/time-series-chart-model.d.ts +2 -1
  138. package/lib/time-series-chart-model.d.ts.map +1 -1
  139. package/lib/time-series-chart-model.js.map +1 -1
  140. package/lib/utils/data-transform.d.ts +2 -2
  141. package/lib/utils/data-transform.d.ts.map +1 -1
  142. package/lib/utils/data-transform.js +1 -2
  143. package/lib/utils/data-transform.js.map +1 -1
  144. package/lib/utils/timezone-formatter.d.ts +5 -0
  145. package/lib/utils/timezone-formatter.d.ts.map +1 -0
  146. package/lib/utils/timezone-formatter.js +42 -0
  147. package/lib/utils/timezone-formatter.js.map +1 -0
  148. package/mf-manifest.json +62 -52
  149. package/mf-stats.json +74 -56
  150. package/package.json +4 -4
  151. package/__mf/css/async/442.d3010b86.css +0 -1
  152. package/__mf/css/async/61.d3010b86.css +0 -1
  153. package/__mf/css/async/823.d3010b86.css +0 -1
  154. package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
  155. package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
  156. package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
  157. package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
  158. package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
  159. package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
  160. package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
  161. package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
  162. package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
  163. package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
  164. package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
  165. package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
  166. package/__mf/js/TimeSeriesChart.734ed3ec.js +0 -6
  167. package/__mf/js/async/121.a742c022.js +0 -2
  168. package/__mf/js/async/177.97e14ed0.js +0 -1
  169. package/__mf/js/async/192.30450189.js +0 -1
  170. package/__mf/js/async/2.68ee9e1b.js +0 -1
  171. package/__mf/js/async/235.a53a2591.js +0 -1
  172. package/__mf/js/async/274.8e8950b6.js +0 -2
  173. package/__mf/js/async/356.dee0f34a.js +0 -1
  174. package/__mf/js/async/390.ad50daba.js +0 -110
  175. package/__mf/js/async/392.550376f0.js +0 -2
  176. package/__mf/js/async/470.4c93905a.js +0 -2
  177. package/__mf/js/async/472.fd3069f0.js +0 -7
  178. package/__mf/js/async/489.8bb61ec9.js +0 -1
  179. package/__mf/js/async/491.35fc6280.js +0 -1
  180. package/__mf/js/async/544.4dd63985.js +0 -2
  181. package/__mf/js/async/544.4dd63985.js.LICENSE.txt +0 -15
  182. package/__mf/js/async/558.5a41ebcc.js +0 -1
  183. package/__mf/js/async/587.40becf9b.js +0 -1
  184. package/__mf/js/async/588.33924c3f.js +0 -1
  185. package/__mf/js/async/616.6d37f37b.js +0 -1
  186. package/__mf/js/async/634.8646a5de.js +0 -24
  187. package/__mf/js/async/702.5d93a78a.js +0 -2
  188. package/__mf/js/async/71.e481dbdb.js +0 -1
  189. package/__mf/js/async/78.362ece9d.js +0 -1
  190. package/__mf/js/async/867.12a42f78.js +0 -38
  191. package/__mf/js/async/873.11e0e15e.js +0 -1
  192. package/__mf/js/async/941.5331fb70.js +0 -2
  193. package/__mf/js/async/968.2ea36b8a.js +0 -1
  194. package/__mf/js/async/978.844227d5.js +0 -1
  195. package/__mf/js/async/__federation_expose_TimeSeriesChart.54276867.js +0 -1
  196. package/__mf/js/async/lib-router.9730f5e9.js +0 -2
  197. package/__mf/js/main.22e0e85a.js +0 -6
  198. /package/__mf/js/async/{121.a742c022.js.LICENSE.txt → 121.df4898d6.js.LICENSE.txt} +0 -0
  199. /package/__mf/js/async/{634.8646a5de.js.LICENSE.txt → 187.2cc43fac.js.LICENSE.txt} +0 -0
  200. /package/__mf/js/async/{274.8e8950b6.js.LICENSE.txt → 274.d112354f.js.LICENSE.txt} +0 -0
  201. /package/__mf/js/async/{392.550376f0.js.LICENSE.txt → 392.2350fb02.js.LICENSE.txt} +0 -0
  202. /package/__mf/js/async/{470.4c93905a.js.LICENSE.txt → 470.a4fd777e.js.LICENSE.txt} +0 -0
  203. /package/__mf/js/async/{702.5d93a78a.js.LICENSE.txt → 702.de247ad8.js.LICENSE.txt} +0 -0
  204. /package/__mf/js/async/{941.5331fb70.js.LICENSE.txt → 941.c0e2d25e.js.LICENSE.txt} +0 -0
  205. /package/__mf/js/async/{lib-router.9730f5e9.js.LICENSE.txt → lib-router.1934857d.js.LICENSE.txt} +0 -0
@@ -1,3 +1,14 @@
1
+ /**
2
+ * match-sorter-utils
3
+ *
4
+ * Copyright (c) TanStack
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+
1
12
  /**
2
13
  * react-table
3
14
  *
@@ -18,4 +29,11 @@
18
29
  * LICENSE.md file in the root directory of this source tree.
19
30
  *
20
31
  * @license MIT
21
- */
32
+ */
33
+
34
+ /**
35
+ * @name match-sorter
36
+ * @license MIT license.
37
+ * @copyright (c) 2099 Kent C. Dodds
38
+ * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
39
+ */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 941.c0e2d25e.js.LICENSE.txt */
2
+ "use strict";(self["chunk_TimeSeriesChart "]=self["chunk_TimeSeriesChart "]||[]).push([["941"],{7470(e,r,t){var o=t(20231);r.createRoot=o.createRoot,r.hydrateRoot=o.hydrateRoot},2192(e,r,t){var o=t(70451),n=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,_=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function c(e,r,t){var o,a={},c=null,l=null;for(o in void 0!==t&&(c=""+t),void 0!==r.key&&(c=""+r.key),void 0!==r.ref&&(l=r.ref),r)s.call(r,o)&&!f.hasOwnProperty(o)&&(a[o]=r[o]);if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===a[o]&&(a[o]=r[o]);return{$$typeof:n,type:e,key:c,ref:l,props:a,_owner:_.current}}r.Fragment=a,r.jsx=c,r.jsxs=c},62540(e,r,t){e.exports=t(2192)},86604(e,r,t){t.r(r);var o=t(62540),n=t(70451),a=t.n(n);t(7470).createRoot(document.getElementById("root")).render((0,o.jsx)(a().StrictMode,{}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self["chunk_TimeSeriesChart "]=self["chunk_TimeSeriesChart "]||[]).push([["968"],{75150(e,t,s){s.r(t),s.d(t,{toNestErrors:()=>a,validateFieldsNatively:()=>l});var i=s(79215);let r=(e,t,s)=>{if(e&&"reportValidity"in e){let r=(0,i.get)(s,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},l=(e,t)=>{for(let s in t.fields){let i=t.fields[s];i&&i.ref&&"reportValidity"in i.ref?r(i.ref,s,e):i.refs&&i.refs.forEach(t=>r(t,s,e))}},a=(e,t)=>{t.shouldUseNativeValidation&&l(e,t);let s={};for(let r in e){let l=(0,i.get)(t.fields,r),a=Object.assign(e[r]||{},{ref:l&&l.ref});if(f(t.names||Object.keys(e),r)){let e=Object.assign({},(0,i.get)(s,r));(0,i.set)(e,"root",a),(0,i.set)(s,r,e)}else(0,i.set)(s,r,a)}return s},f=(e,t)=>e.some(e=>e.startsWith(t+"."))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self["chunk_TimeSeriesChart "]=self["chunk_TimeSeriesChart "]||[]).push([["978"],{61153(e,t,n){n.r(t),n.d(t,{getTimezoneOffset:()=>Q,toDate:()=>E,toZonedTime:()=>J,format:()=>B,formatInTimeZone:()=>K,fromZonedTime:()=>L});var r=n(96962),i=n(31829);function a(e,t,n){var r,a,u,l,o;let c,s,f=(0,i.getDefaultOptions)(),d=(r=e,a=n.timeZone,u=n.locale??f.locale,new Intl.DateTimeFormat(u?[u.code,"en-US"]:void 0,{timeZone:a,timeZoneName:r}));return"formatToParts"in d?function(e,t){let n=e.formatToParts(t);for(let e=n.length-1;e>=0;--e)if("timeZoneName"===n[e].type)return n[e].value}(d,t):(l=d,o=t,c=l.format(o).replace(/\u200E/g,""),(s=/ [\w-+ ]+$/.exec(c))?s[0].substr(1):"")}let u={year:0,month:1,day:2,hour:3,minute:4,second:5},l={},o=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),c="06/25/2014, 00:00:00"===o||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===o;function s(e,t,n,r,i,a,u){let l=new Date(0);return l.setUTCFullYear(e,t,n),l.setUTCHours(r,i,a,u),l}let f=/^(Z)$/,d=/^([+-]\d{2})$/,g=/^([+-])(\d{2}):?(\d{2})$/;function m(e,t,n){let r,i;if(!e)return 0;let a=f.exec(e);if(a)return 0;if(a=d.exec(e))return h(r=parseInt(a[1],10))?-(36e5*r):NaN;if(a=g.exec(e)){r=parseInt(a[2],10);let e=parseInt(a[3],10);return h(r,e)?(i=36e5*Math.abs(r)+6e4*e,"+"===a[1]?-i:i):NaN}if(function(e){if(T[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),T[e]=!0,!0}catch(e){return!1}}(e)){var u;t=new Date(t||Date.now());let r=D(n?t:s((u=t).getFullYear(),u.getMonth(),u.getDate(),u.getHours(),u.getMinutes(),u.getSeconds(),u.getMilliseconds()),e);return-(n?r:function(e,t,n){let r=e.getTime()-t,i=D(new Date(r),n);if(t===i)return t;let a=D(new Date(r-=i-t),n);return i===a?i:Math.max(i,a)}(t,r,e))}return NaN}function D(e,t){var n,r,i;let a,o,f,d=(l[n=t]||(l[n]=c?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),"formatToParts"in(f=l[n])?function(e,t){try{let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let t=u[n[e].type];void 0!==t&&(r[t]=parseInt(n[e].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(f,e):(r=f,i=e,a=r.format(i),[parseInt((o=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(a))[3],10),parseInt(o[1],10),parseInt(o[2],10),parseInt(o[4],10),parseInt(o[5],10),parseInt(o[6],10)])),g=s(d[0],d[1]-1,d[2],d[3]%24,d[4],d[5],0).getTime(),m=e.getTime(),D=m%1e3;return g-(m-=D>=0?D:1e3+D)}function h(e,t){return -23<=e&&e<=23&&(null==t||0<=t&&t<=59)}let T={},N={X:function(e,t,n){let r=p(n.timeZone,e);if(0===r)return"Z";switch(t){case"X":return I(r);case"XXXX":case"XX":return x(r);default:return x(r,":")}},x:function(e,t,n){let r=p(n.timeZone,e);switch(t){case"x":return I(r);case"xxxx":case"xx":return x(r);default:return x(r,":")}},O:function(e,t,n){let r=p(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t=""){let n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),a=r%60;return 0===a?n+String(i):n+String(i)+t+w(a,2)}(r,":");default:return"GMT"+x(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return a("short",e,n);default:return a("long",e,n)}}};function p(e,t){let n=e?m(e,t,!0)/6e4:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw RangeError("Invalid time zone specified: "+e);return n}function w(e,t){let n=Math.abs(e).toString();for(;n.length<t;)n="0"+n;return(e<0?"-":"")+n}function x(e,t=""){let n=Math.abs(e);return(e>0?"-":"+")+w(Math.floor(n/60),2)+t+w(Math.floor(n%60),2)}function I(e,t){return e%60==0?(e>0?"-":"+")+w(Math.abs(e)/60,2):x(e,t)}function Z(e){let t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e-t}let y=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,C=/^([0-9W+-]+)(T| )(.*)/,U=/^([0-9W+-]+)(.*)/,M=/^(\d{2})$/,b=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],F=/^(\d{4})/,S=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],$=/^-(\d{2})$/,O=/^-?(\d{3})$/,z=/^-?(\d{2})-?(\d{2})$/,Y=/^-?W(\d{2})$/,v=/^-?W(\d{2})-?(\d{1})$/,X=/^(\d{2}([.,]\d*)?)$/,j=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,H=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/;function E(e,t={}){if(arguments.length<1)throw TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);let n=null==t.additionalDigits?2:Number(t.additionalDigits);if(2!==n&&1!==n&&0!==n)throw RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);let r=function(e){let t,n={},r=C.exec(e);if(r?(n.date=r[1],t=r[3]):(r=U.exec(e))?(n.date=r[1],t=r[2]):(n.date=null,t=e),t){let e=y.exec(t);e?(n.time=t.replace(e[1],""),n.timeZone=e[1].trim()):n.time=t}return n}(e),{year:i,restDateString:a}=function(e,t){if(e){let n=b[t],r=S[t],i=F.exec(e)||r.exec(e);if(i){let t=i[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(i=M.exec(e)||n.exec(e)){let t=i[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(r.date,n),u=function(e,t){let n,r,i;if(null===t)return null;if(!e||!e.length)return(n=new Date(0)).setUTCFullYear(t),n;let a=$.exec(e);if(a)return(n=new Date(0),k(t,r=parseInt(a[1],10)-1))?(n.setUTCFullYear(t,r),n):new Date(NaN);if(a=O.exec(e)){n=new Date(0);let e=parseInt(a[1],10);return!function(e,t){if(t<1)return!1;let n=W(e);return(!n||!(t>366))&&(!!n||!(t>365))}(t,e)?new Date(NaN):(n.setUTCFullYear(t,0,e),n)}if(a=z.exec(e)){n=new Date(0),r=parseInt(a[1],10)-1;let e=parseInt(a[2],10);return k(t,r,e)?(n.setUTCFullYear(t,r,e),n):new Date(NaN)}if(a=Y.exec(e))return G(i=parseInt(a[1],10)-1)?P(t,i):new Date(NaN);if(a=v.exec(e)){i=parseInt(a[1],10)-1;let e=parseInt(a[2],10)-1;return G(i,e)?P(t,i,e):new Date(NaN)}return null}(a,i);if(null===u||isNaN(u.getTime())||!u)return new Date(NaN);{let e,n=u.getTime(),i=0;if(r.time&&(null===(i=function(e){let t,n,r=X.exec(e);if(r)return R(t=parseFloat(r[1].replace(",",".")))?t%24*36e5:NaN;if(r=j.exec(e))return R(t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")))?t%24*36e5+6e4*n:NaN;if(r=H.exec(e)){t=parseInt(r[1],10),n=parseInt(r[2],10);let e=parseFloat(r[3].replace(",","."));return R(t,n,e)?t%24*36e5+6e4*n+1e3*e:NaN}return null}(r.time))||isNaN(i)))return new Date(NaN);if(r.timeZone||t.timeZone){if(isNaN(e=m(r.timeZone||t.timeZone,new Date(n+i))))return new Date(NaN)}else e=Z(new Date(n+i)),e=Z(new Date(n+i+e));return new Date(n+i+e)}}function P(e,t,n){t=t||0,n=n||0;let r=new Date(0);r.setUTCFullYear(e,0,4);let i=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}let _=[31,28,31,30,31,30,31,31,30,31,30,31],A=[31,29,31,30,31,30,31,31,30,31,30,31];function W(e){return e%400==0||e%4==0&&e%100!=0}function k(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;let r=W(e);if(r&&n>A[t]||!r&&n>_[t])return!1}return!0}function G(e,t){return!(e<0)&&!(e>52)&&(null==t||!(t<0)&&!(t>6))}function R(e,t,n){return!(e<0)&&!(e>=25)&&(null==t||!(t<0)&&!(t>=60))&&(null==n||!(n<0)&&!(n>=60))}let q=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function B(e,t,n={}){let i=(t=String(t)).match(q);if(i){let r=E(n.originalDate||e,n);t=i.reduce(function(e,t){if("'"===t[0])return e;let i=e.indexOf(t),a="'"===e[i-1],u=e.replace(t,"'"+N[t[0]](r,t,n)+"'");return a?u.substring(0,i-1)+u.substring(i+1):u},t)}return(0,r.GP)(e,t,n)}function J(e,t,n){let r=m(t,e=E(e,n),!0),i=new Date(e.getTime()-r),a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}function K(e,t,n,r){return r={...r,timeZone:t,originalDate:e},B(J(e,t,{timeZone:r.timeZone}),n,r)}function L(e,t,n){if("string"==typeof e&&!e.match(y))return E(e,{...n,timeZone:t});let r=s((e=E(e,n)).getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),i=m(t,new Date(r));return new Date(r+i)}function Q(e,t){return-m(e,t)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self["chunk_TimeSeriesChart "]=self["chunk_TimeSeriesChart "]||[]).push([["53"],{17397(e,l,t){t.r(l),t.d(l,{TimeSeriesChart:()=>eM});let a={unit:"decimal",shortValues:!0},n={show:!0,label:"",format:a,min:void 0,max:void 0,logBase:void 0},i="Label",o="Min",r="Max",s="Log Base",d={display:"line",lineWidth:1.25,lineStyle:"solid",areaOpacity:0,pointRadius:2.75,connectNulls:!1},u="Line Width",c="slider-line-width",h=.25,m=3,p=.25,v="Line Style",g="Area Opacity",x="slider-area-opacity",y=0,f=1,b=.05,C="Stack Series",j="Connect Nulls",A={none:{label:"None"},all:{label:"All"}},M=Object.entries(A).map(e=>{let[l,t]=e;return{id:l,...t}}),S={solid:{label:"Solid"},dashed:{label:"Dashes"},dotted:{label:"Dots"}},w={none:{label:"None",log:void 0},2:{label:"2",log:2},10:{label:"10",log:10}},O=Object.entries(w).map(e=>{let[l,t]=e;return{id:l,...t}});var E=t(62540),T=t(7013),L=t(38662),k=t(8242),D=t(27368),I=t(61375),R=t(31729),F=t(40704),V=t(68003);function N(e){let{value:l,onChange:t}=e,a=l.stack??"none",n=A[a];return(0,E.jsxs)(k.OptionsEditorGroup,{title:"Visual",children:[(0,E.jsx)(k.OptionsEditorControl,{label:C,control:(0,E.jsx)(k.SettingsAutocomplete,{value:{...n,id:a},options:M,onChange:(e,a)=>{let n={...l,stack:"none"===a.id?void 0:a.id};"all"!==a.id||l.areaOpacity||(n.areaOpacity=.3),t(n)},disabled:void 0===l,disableClearable:!0})}),(0,E.jsx)(k.OptionsEditorControl,{label:"Display",control:(0,E.jsxs)(I.A,{color:"primary",exclusive:!0,value:l.display??"line",onChange:(e,a)=>{t({...l,display:a})},children:[(0,E.jsx)(R.A,{value:"line",selected:void 0===l.display||"line"===l.display,"aria-label":"display line series",children:"Line"}),(0,E.jsx)(R.A,{value:"bar","aria-label":"display bar series",children:"Bar"})]})}),"line"===l.display&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(k.OptionsEditorControl,{label:u,control:(0,E.jsx)(F.Ay,{"data-testid":c,value:l.lineWidth??1.25,valueLabelDisplay:"auto",step:p,marks:!0,min:h,max:m,onChange:(e,a)=>{let n=Array.isArray(a)?a[0]:a,i=void 0!==n?n+1.5:2.75;t((0,L.jM)(l,e=>{e.lineWidth=n,e.pointRadius=i}))}})}),(0,E.jsx)(k.OptionsEditorControl,{label:v,control:(0,E.jsx)(I.A,{color:"primary",exclusive:!0,value:l.lineStyle??"solid",onChange:(e,a)=>{t({...l,lineStyle:a})},children:Object.entries(S).map(e=>{let[l,t]=e;return(0,E.jsx)(R.A,{value:l,"aria-label":`${l} line style`,children:t.label},l)})})}),(0,E.jsx)(k.OptionsEditorControl,{label:g,control:(0,E.jsx)(F.Ay,{"data-testid":x,value:l.areaOpacity??0,valueLabelDisplay:"auto",step:b,marks:!0,min:y,max:f,onChange:(e,a)=>{let n=Array.isArray(a)?a[0]:a;t((0,L.jM)(l,e=>{e.areaOpacity=n}))}})}),(0,E.jsx)(k.OptionsEditorControl,{label:j,control:(0,E.jsx)(V.A,{checked:l.connectNulls??!1,onChange:e=>{t({...l,connectNulls:e.target.checked})}})})]})]})}var P=t(93648);function _(e){let{value:l,onChange:t}=e,d=l.logBase?w[l.logBase]:void 0;return(0,E.jsxs)(k.OptionsEditorGroup,{title:"Y Axis",children:[(0,E.jsx)(k.OptionsEditorControl,{label:"Show",control:(0,E.jsx)(V.A,{checked:l.show??n.show,onChange:e=>{t({...l,show:e.target.checked})}})}),(0,E.jsx)(k.FormatControls,{value:l.format??a,onChange:e=>t({...l,format:e})}),(0,E.jsx)(k.OptionsEditorControl,{label:s,control:(0,E.jsx)(k.SettingsAutocomplete,{value:{...d,id:(null==d?void 0:d.label)??"None"},options:O,onChange:(e,a)=>{t({...l,logBase:a.log??void 0})},disabled:void 0===l,disableClearable:!0})}),(0,E.jsx)(k.OptionsEditorControl,{label:i,control:(0,E.jsx)(P.A,{value:l.label??"",inputProps:{"aria-label":"enter y axis label"},onChange:e=>t({...l,label:e.target.value}),placeholder:"Default"})}),(0,E.jsx)(k.OptionsEditorControl,{label:o,control:(0,E.jsx)(P.A,{type:"number",value:l.min??"",onChange:e=>{let a=e.target.value?Number(e.target.value):void 0;t({...l,min:a})},placeholder:"Default"})}),(0,E.jsx)(k.OptionsEditorControl,{label:r,control:(0,E.jsx)(P.A,{type:"number",value:l.max??"",onChange:e=>{let a=e.target.value?Number(e.target.value):void 0;t({...l,max:a})},placeholder:"Default"})})]})}var W=t(315),G=t(88091),$=t(97653),q=t(74628),z=t(47095),B=t(30145),H=t(56599),U=t(70451),Z=t(86067),Y=t(86742),Q=t(7800);let X="#555";function K(e){let{querySettings:{queryIndex:l,colorMode:t,colorValue:a,lineStyle:n,areaOpacity:i,format:o},availableQueryIndexes:r,onQueryIndexChange:s,onColorModeChange:d,onColorValueChange:u,onLineStyleChange:c,onAreaOpacityChange:h,onDelete:m,inputRef:p,onAddColor:v,onRemoveColor:g,onAddLineStyle:x,onRemoveLineStyle:y,onAddAreaOpacity:f,onRemoveAreaOpacity:b,onAddFormat:C,onRemoveFormat:j,onFormatChange:A}=e,M=r.concat(l).sort((e,l)=>e-l),[w,O]=(0,U.useState)(null),T=(0,U.useMemo)(()=>{let e=[];return t||e.push({key:"color",label:"Color",action:v}),n||e.push({key:"lineStyle",label:"Line Style",action:x}),void 0===i&&e.push({key:"opacity",label:"Opacity",action:f}),void 0===o&&e.push({key:"format",label:"Format",action:C}),e},[t,n,i,o,v,x,f,C]),L=()=>{O(null)};return(0,E.jsxs)(W.A,{sx:{borderBottom:"1px solid",borderColor:"divider",borderRadius:1,p:2,display:"flex",flexWrap:"nowrap",flexDirection:"row"},children:[(0,E.jsxs)(W.A,{direction:"row",alignItems:"center",sx:{flexWrap:"wrap",gap:2,flexGrow:1},children:[(0,E.jsx)(P.A,{select:!0,inputRef:p,value:l,label:"Query",onChange:s,sx:{minWidth:"75px"},children:M.map(e=>(0,E.jsxs)($.A,{value:e,children:["#",e+1]},`query-${e}`))}),t&&(0,E.jsxs)(J,{label:"Color",onRemove:g,children:[(0,E.jsxs)(P.A,{select:!0,value:t,onChange:d,size:"small",sx:{flexGrow:1},children:[(0,E.jsx)($.A,{value:"fixed-single",children:"Fixed (single)"}),(0,E.jsx)($.A,{value:"fixed",children:"Fixed"})]}),(0,E.jsx)(k.OptionsColorPicker,{label:`Query n\xb0${l+1}`,color:a||X,onColorChange:u})]}),n&&(0,E.jsxs)(J,{label:"Line Style",onRemove:y,children:[(0,E.jsx)(I.A,{color:"primary",exclusive:!0,value:n,onChange:(e,l)=>{null!==l&&c(l)},size:"small",children:Object.entries(S).map(e=>{let[l,t]=e;return(0,E.jsx)(R.A,{value:l,"aria-label":`${l} line style`,children:t.label},l)})}),(0,E.jsx)(q.A,{sx:{flexGrow:1}})]}),void 0!==i&&(0,E.jsxs)(J,{label:"Opacity",onRemove:b,children:[(0,E.jsx)(q.A,{}),(0,E.jsx)(F.Ay,{value:i,valueLabelDisplay:"auto",step:.05,marks:!0,min:0,max:1,onChange:h,sx:{flexGrow:1}})]}),void 0!==o&&(0,E.jsx)(J,{label:"Format",onRemove:j,children:(0,E.jsx)(q.A,{sx:{minWidth:"180px",display:"flex",gap:1,flexDirection:"column"},children:(0,E.jsx)(k.FormatControls,{value:o,onChange:A})})}),T.length>0&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(z.A,{onClick:e=>{1===T.length&&T[0]?T[0].action():O(e.currentTarget)},"aria-label":"Add option",children:(0,E.jsx)(Y.default,{})}),(0,E.jsx)(B.A,{anchorEl:w,open:!!w,onClose:L,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:T.map(e=>(0,E.jsxs)($.A,{onClick:()=>{(0,e.action)(),L()},sx:{minWidth:"120px"},children:[(0,E.jsx)(Y.default,{sx:{mr:1,fontSize:"1rem"}}),e.label]},e.key))})]})]}),(0,E.jsx)(q.A,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,E.jsx)(z.A,{"aria-label":`delete settings for query n\xb0${l+1}`,onClick:m,children:(0,E.jsx)(Z.default,{})})})]})}function J(e){let{label:l,children:t,onRemove:a}=e,n=(0,H.A)();return(0,E.jsxs)(q.A,{sx:{position:"relative",minWidth:"250px"},children:[(0,E.jsx)(G.A,{variant:"caption",sx:{position:"absolute",top:-8,left:12,backgroundColor:n.palette.background.code,px:.5,color:"text.secondary",zIndex:1},children:l}),(0,E.jsxs)(W.A,{direction:"row",alignItems:"center",spacing:1,sx:{border:"1px solid",borderColor:"divider",borderRadius:1,p:1},children:[t,(0,E.jsx)(z.A,{size:"small",onClick:a,"aria-label":`Remove ${l}`,children:(0,E.jsx)(Q.default,{})})]})]})}var ee=t(25632),el=t.n(ee);function et(e){let l=Math.floor(Math.log10(Math.abs(e)));return Math.floor(e/Math.pow(10,l))*Math.pow(10,l)}var ea=t(92959);let en=new ea.A({hue:{min:20,max:360}}),ei=new ea.A({hue:{min:0,max:20}}),eo={};var er=t(18264),es=t.n(er),ed=t(74653),eu=t(62707),ec=t(31373),eh=t(59738),em=t(90652),ep=t(61305),ev=t(64404),eg=t(28502),ex=t(48683),ey=t(72106),ef=t(40988),eb=t(55875),eC=t(37573);(0,ed.Y)([eu.a,ec.a,eh.a,em.a,ep.a,ev.a,eg.a,ex.a,ey.a,ef.a,eb.a,eC.a]);let ej=(0,U.forwardRef)(function(e,l){var t;let a,{height:n,data:i,seriesMapping:o,timeScale:r,yAxis:s,format:d,seriesFormatMap:u,grid:c,isStackedBar:h=!1,tooltipConfig:m=k.DEFAULT_TOOLTIP_CONFIG,noDataVariant:p="message",syncGroup:v,onDataZoom:g,onDoubleClick:x,__experimentalEChartsOptionsOverride:y}=e,{chartsTheme:f,enablePinning:b,enableSyncGrouping:C,lastTooltipPinnedCoords:j,setLastTooltipPinnedCoords:A}=(0,k.useChartsContext)(),M=m.enablePinning&&b,S=(0,U.useRef)(),[w,O]=(0,U.useState)(!0),[T,L]=(0,U.useState)(null),[D,I]=(0,U.useState)(null),[R,F]=(0,U.useState)(!1),[V,N]=(0,U.useState)(0),{timeZone:P}=(0,k.useTimeZone)(),_=(0,U.useCallback)(e=>function(l){let t=new Date(Number(l));return e>15768e7?(0,k.formatWithTimeZone)(t,"yyyy",P):e>63072e6?(0,k.formatWithTimeZone)(t,"MMM yyyy",P):e>864e6&&e<1577664e4?(0,k.formatWithTimeZone)(t,"dd.MM",P):e>1728e5&&e<=864e6?(0,k.formatWithTimeZone)(t,"dd.MM HH:mm",P):(0,k.formatWithTimeZone)(t,"HH:mm",P)},[P]);if(void 0===r){let e=(0,k.getCommonTimeScale)(i);if(void 0===e){let e=new Date,l=new Date(e);l.setFullYear(e.getFullYear()-5);let t=e.getTime(),n=l.getTime();a={startMs:n,endMs:t,stepMs:1,rangeMs:t-n}}else a=e}else a=r;(0,U.useImperativeHandle)(l,()=>({highlightSeries(e){let{name:l}=e;S.current&&S.current.dispatchAction({type:"highlight",seriesId:l})},clearHighlightedSeries:()=>{S.current&&(0,k.clearHighlightedSeries)(S.current)}}),[]);let W=(0,U.useMemo)(()=>({datazoom:e=>{if(void 0===g&&setTimeout(()=>{L(null)},10),void 0===g||void 0===e.batch[0])return;let l=e.batch[0].startValue,t=e.batch[0].endValue;void 0!==l&&void 0!==t&&g({start:l,end:t})},finished:()=>{void 0!==S.current&&(0,k.enableDataZoom)(S.current)}}),[g,L]),{noDataOption:G}=f,$=(0,U.useMemo)(()=>{if(null===i||0===i.length&&"message"===p)return G;let e=[];i.map((l,t)=>{let a=l.values.map(e=>{let[l,t]=e;return[l,null===t?"-":t]});e.push({id:t,source:[...a],dimensions:["time","value"]})});let l={dataset:e,series:b&&null!==D?[...o,D]:o,xAxis:{type:"time",min:a.startMs,max:a.endMs,axisLabel:{hideOverlap:!0,formatter:_(a.rangeMs??0)},axisPointer:{snap:!1}},yAxis:Array.isArray(s)?s:(0,k.getFormattedAxis)(s,d),animation:!1,tooltip:{show:!0,showContent:h,trigger:h?"item":"axis",appendToBody:h},axisPointer:{type:"line",z:0,triggerEmphasis:!1,triggerTooltip:!1,snap:!1},toolbox:{feature:{dataZoom:{icon:null,yAxisIndex:"none"}}},grid:c};return y?y(l):l},[i,o,a,s,d,c,G,y,p,h,b,D,_]);return(0,U.useEffect)(()=>{null===T||null===j||es()(j,T)||(L(null),null!==T&&null!==D&&I(null))},[j,o]),(0,E.jsxs)(q.A,{style:{height:n},onClick:e=>{let l=e.ctrlKey||e.metaKey;l&&e.preventDefault();let t=(0,k.getPointInGrid)(e.nativeEvent.offsetX,e.nativeEvent.offsetY,S.current);if(null!==t&&M&&e.target instanceof HTMLCanvasElement){let a={page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY},target:e.target};L(e=>null===e?a:(I(null),null)),I(e=>{if(null!==e)return null;{var l;let e=t[0],a=null==(l=i[0])?void 0:l.values,n=(0,k.getClosestTimestamp)(a,e);return el()({},k.DEFAULT_PINNED_CROSSHAIR,{markLine:{data:[{xAxis:n}]}})}}),l||A(a)}},onMouseDown:e=>{let{clientX:l}=e;F(!0),N(l)},onMouseMove:e=>{if(!(e.target instanceof HTMLCanvasElement))return;let{clientX:l}=e;R&&l-V>0&&O(!1)},onMouseUp:()=>{F(!1),N(0),O(!0)},onMouseLeave:()=>{null===T&&O(!1),void 0!==S.current&&(0,k.clearHighlightedSeries)(S.current)},onMouseEnter:()=>{O(!0),void 0!==S.current&&(0,k.enableDataZoom)(S.current)},onDoubleClick:e=>{L(null),void 0===x?void 0!==S.current&&(0,k.restoreChart)(S.current):x(e)},children:[!0===w&&(null==(t=$.tooltip)?void 0:t.showContent)===!1&&!0!==m.hidden&&(0,E.jsx)(k.TimeChartTooltip,{containerId:f.tooltipPortalContainerId,chartRef:S,data:i,seriesMapping:o,wrapLabels:m.wrapLabels,enablePinning:M,pinnedPos:T,format:d,seriesFormatMap:u,onUnpinClick:()=>{L(null),I(null)}}),(0,E.jsx)(k.EChart,{sx:{width:"100%",height:"100%"},option:$,theme:f.echartsTheme,onEvents:W,_instance:S,syncGroup:C?v:void 0})]})});var eA=t(54042);let eM={PanelComponent:function(e){var l;let{spec:{thresholds:t,yAxis:i,tooltip:o,querySettings:r},contentDimensions:s,queryResults:u}=e,c=(0,k.useChartsTheme)(),h=(0,H.A)(),m=(0,k.useId)("time-series-panel"),p=(0,U.useRef)(null),v=c.echartsTheme.color,g=c.container.padding.default,x=s?{width:s.width-2*g,height:s.height-2*g}:void 0,y=(0,U.useMemo)(()=>e.spec.legend&&(0,D.validateLegendSpec)(e.spec.legend)?el()({},k.DEFAULT_LEGEND,e.spec.legend):void 0,[e.spec.legend]),f=(null==(l=e.spec.yAxis)?void 0:l.format)??a,b=(0,U.useMemo)(()=>el()({},d,e.spec.visual),[e.spec.visual]),C=(0,U.useMemo)(()=>(function(){let e,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=void 0!==l.logBase?void 0:(null==l?void 0:l.min)!==void 0?l.min:e=>e.min>=0&&e.min<=1?0:e.min>0?et(.8*e.min):et(1.2*e.min);let t={show:(null==l?void 0:l.show)??n.show,min:e,max:null==l?void 0:l.max};return void 0!==l.logBase?{...t,type:"log",logBase:l.logBase}:t})(i),[i]),{additionalFormats:j,formatToYAxisIndex:A,seriesFormatMap:M}=(0,U.useMemo)(()=>{let e=(null==f?void 0:f.unit)??"decimal",l=[],t=new Map,a=new Map;for(let a of(t.set(e,0),r??[])){var n;if((null==(n=a.format)?void 0:n.unit)&&a.format.unit!==e){let e=a.format.unit;t.has(e)||(t.set(e,1+l.length),l.push(a.format))}}return{additionalFormats:l,formatToYAxisIndex:t,seriesFormatMap:a}},[f,r]),[S,w]=(0,U.useState)("ALL"),[O,T]=(0,U.useState)(),{setTimeRange:L}=(0,D.useTimeRange)(),{timeScale:I,timeChartData:R,timeSeriesMapping:F,legendItems:V,seriesFormatMap:N,maxValuesByFormat:P}=(0,U.useMemo)(()=>{let e,l=(e=u.map(e=>e.data),(0,k.getCommonTimeScale)(e));if(void 0===l)return{timeChartData:[],timeSeriesMapping:[],seriesFormatMap:new Map,maxValuesByFormat:new Map};let a=[],n=[],o=[],s=new Map,d=0;for(let e=0;e<u.length;e++){let t,i=u[e];for(let l of r??[])l.queryIndex===e&&(t=l);if(i)for(let r=0;r<i.data.series.length;r++){var p,g,x;let c=i.data.series[r];if(void 0===c)return{timeChartData:[],timeSeriesMapping:[],legendItems:[]};let f=c.formattedName??c.name,C=function(e){var l,t,a;let{categoricalPalette:n,visual:i,muiPrimaryColor:o,seriesName:r,seriesIndex:s,querySettings:d,queryHasMultipleResults:u}=e;if(d){if("fixed"===d.colorMode&&d.colorValue)return d.colorValue;else if("fixed-single"===d.colorMode&&!u&&d.colorValue)return d.colorValue}let c=Array.isArray(n)&&n[0]?n[0]:o;return(null==(l=i.palette)?void 0:l.mode)==="categorical"?function(e,l,t){if(void 0===e)return t;let a=e.length??1;return e[l%a]??t}(n,s,c):(t=r,a=c,function(e){var l;let t,a;return l=e.toLowerCase().includes("error"),(a=eo[t=`${e}_____${l}`])||(a=function(e,l){let[t,a,n]=l?ei.hsl(e):en.hsl(e),i=`${(100*a).toFixed(0)}%`,o=`${(100*n).toFixed(0)}%`;return`hsla(${t.toFixed(2)},${i},${o},0.9)`}(e,l),eo[t]=a),a}(t)??a)}({categoricalPalette:v,visual:b,muiPrimaryColor:h.palette.primary.main,seriesName:f,seriesIndex:d,querySettings:t,queryHasMultipleResults:((null==(x=u[e])||null==(g=x.data)||null==(p=g.series)?void 0:p.length)??0)>1}),j=m+c.name+d,w=(null==y?void 0:y.values)?(0,D.getCalculations)(c.values,y.values):void 0,O="ALL"===S;if(!O&&S[j]||O){let e=n.length,a=null==t?void 0:t.format,i=(null==a?void 0:a.unit)?A.get(a.unit)??0:0;if(o.push(function(e,l,t,a,n,i,o,r){let s=a.lineWidth??1.25,d=a.pointRadius??2.75,u=n.rangeMs<=9e5;return("always"===a.showPoints&&(u=!0),"bar"===a.display)?{type:"bar",id:e,datasetIndex:l,name:t,color:i,stack:"all"===a.stack?a.stack:void 0,yAxisIndex:r,label:{show:!1}}:{type:"line",id:e,datasetIndex:l,name:t,connectNulls:a.connectNulls??!1,color:i,stack:"all"===a.stack?a.stack:void 0,yAxisIndex:r,sampling:"lttb",progressiveThreshold:k.OPTIMIZED_MODE_SERIES_LIMIT,showSymbol:u,showAllSymbol:!0,symbolSize:d,lineStyle:{width:s,type:(null==o?void 0:o.lineStyle)??a.lineStyle},areaStyle:{opacity:(null==o?void 0:o.areaOpacity)??a.areaOpacity??0},emphasis:{focus:"series",disabled:void 0!==a.areaOpacity&&a.areaOpacity>0,lineStyle:{width:s+1,opacity:1,type:a.lineStyle}},selectedMode:"single",select:{itemStyle:{borderColor:i,borderWidth:d+.5}},blur:{lineStyle:{width:s,opacity:.5,type:a.lineStyle}}}}(j,e,f,b,l,C,t,i)),a){M.set(j,a);let e=a.unit;if(e){let l=Math.max(...c.values.map(e=>Math.abs(e[1]??0)));l>(s.get(e)??0)&&s.set(e,l)}}n.push({name:f,values:(0,k.getTimeSeriesValues)(c,l)})}y&&a&&a.push({id:j,label:f,color:C,data:w}),d++}}if(t&&t.steps&&n.length>0){let e=c.thresholds,a=t.defaultColor??e.defaultColor;t.steps.forEach((r,s)=>{var u,c,h,m,p;let v,g,x,y=e.palette[s]??a,f={color:r.color??y,value:"percent"===t.mode?(u=r.value,c=null==i?void 0:i.max,h=null==i?void 0:i.min,g=c??(v=0,(m=n).length&&void 0!==m[0]&&(null==(p=m[0])?void 0:p.values)?m.forEach(e=>{e.values.forEach(e=>{let[l,t]=e;"number"==typeof t&&t>v&&(v=t)})}):m.forEach(e=>{void 0!==e.data&&e.data.forEach(e=>{"number"==typeof e&&e>v&&(v=e)})}),v),u/100*(g-(x=h??0))+x):r.value},b=r.name??`Threshold ${s+1}`,C=[],j=l.startMs;for(;j<=l.endMs;)C.push([j,f.value]),j+=15e3;n.push({name:b,values:C}),o.push({type:"line",name:b,id:b,datasetId:b,datasetIndex:d,color:f.color,label:{show:!1},lineStyle:{type:"dashed",width:2},emphasis:{focus:"series",lineStyle:{width:2.5}},blur:{lineStyle:{opacity:.5}}}),d++})}return{timeScale:l,timeChartData:n,timeSeriesMapping:o,legendItems:a,seriesFormatMap:M,maxValuesByFormat:s}},[u,t,S,y,b,r,null==i?void 0:i.max,null==i?void 0:i.min,v,m,c.thresholds,h.palette.primary.main,A,M]),_=(0,U.useMemo)(()=>{if(0===j.length)return;let e=j.map(e=>{let l=e.unit;return l?(null==P?void 0:P.get(l))??1e3:1e3});return(0,k.getFormattedMultipleYAxes)(C,f,j,e)},[C,f,j,P]),W=(0,U.useMemo)(()=>(null==y?void 0:y.values)?D.legendValues.reduce((e,l)=>{var t;let a=D.LEGEND_VALUE_CONFIG[l];return a&&(null==y||null==(t=y.values)?void 0:t.includes(l))&&e.push({accessorKey:`data.${l}`,header:a.label,headerDescription:a.description,width:72,align:"right",cell:e=>{let{getValue:l}=e,t=l();return"number"==typeof t&&f?(0,k.formatValue)(t,f):t},cellDescription:!0,enableSorting:!0}),e},[]):[],[null==y?void 0:y.values,f]),G=(0,U.useMemo)(()=>!1===C.show?{left:0,right:0,bottom:30,containLabel:!1}:{left:i&&i.label?30:20,right:j.length>0?10:20,bottom:0,containLabel:!0},[C.show,i,j.length]);if(void 0===x)return null;let $=e=>{L({start:new Date(e.start),end:new Date(e.end)})},z="bar"===b.display&&"all"===b.stack,B=!0;z?B=!1:(null==o?void 0:o.enablePinning)!==void 0&&(B=o.enablePinning);let Z={...k.DEFAULT_TOOLTIP_CONFIG,enablePinning:B};return(0,E.jsx)(q.A,{sx:{padding:`${g}px`},children:(0,E.jsx)(k.ContentWithLegend,{width:x.width,height:x.height,minChildrenHeight:50,legendSize:null==y?void 0:y.size,legendProps:y&&{options:y,data:V||[],selectedItems:S,onSelectedItemsChange:w,tableProps:{columns:W,sorting:O,onSortingChange:T},onItemMouseOver:(e,l)=>{var t;let{id:a}=l;null==(t=p.current)||t.highlightSeries({name:a})},onItemMouseOut:()=>{var e;null==(e=p.current)||e.clearHighlightedSeries()}},children:e=>{let{height:l,width:t}=e;return(0,E.jsxs)(q.A,{style:{height:l,width:t},children:[i&&i.show&&i.label&&(0,E.jsx)(k.YAxisLabel,{name:i.label,height:l}),(0,E.jsx)(ej,{ref:p,height:l,data:R,seriesMapping:F,timeScale:I,yAxis:_??C,format:f,seriesFormatMap:N,grid:G,isStackedBar:z,tooltipConfig:Z,syncGroup:"default-panel-group",onDataZoom:$,noDataVariant:!R.length&&V&&V.length>0?"chart":"message"})]})}})})},supportedQueryTypes:["TimeSeriesQuery"],panelOptionsEditorComponents:[{label:"General Settings",content:function(e){let{onChange:l,value:t}=e;return(0,E.jsxs)(k.OptionsEditorGrid,{children:[(0,E.jsxs)(k.OptionsEditorColumn,{children:[(0,E.jsx)(D.LegendOptionsEditor,{calculation:"aggregation",value:t.legend,onChange:e=>{l((0,L.jM)(t,l=>{l.legend=e}))}}),(0,E.jsx)(N,{value:t.visual??d,onChange:e=>{l((0,L.jM)(t,l=>{l.visual=e}))}})]}),(0,E.jsx)(k.OptionsEditorColumn,{children:(0,E.jsx)(_,{value:t.yAxis??n,onChange:e=>{l((0,L.jM)(t,l=>{l.yAxis=e}))}})}),(0,E.jsxs)(k.OptionsEditorColumn,{children:[(0,E.jsx)(k.ThresholdsEditor,{hideDefault:!0,thresholds:t.thresholds,onChange:e=>{l((0,L.jM)(t,l=>{l.thresholds=e}))}}),(0,E.jsx)(k.OptionsEditorGroup,{title:"Reset Settings",children:(0,E.jsx)(T.A,{variant:"outlined",color:"secondary",onClick:()=>{l((0,L.jM)(t,e=>{e.yAxis=void 0,e.legend=void 0,e.visual=void 0,e.thresholds=void 0}))},children:"Reset To Defaults"})})]})]})}},{label:"Query Settings",content:function(e){let{onChange:l,value:t}=e,a=t.querySettings,n=e=>{l((0,L.jM)(t,l=>{l.querySettings=e}))},i=(0,U.useRef)(null),o=(0,U.useRef)(!1);(0,U.useEffect)(()=>{var e;i.current&&o.current&&(null==(e=i.current)||e.focus(),o.current=!1)},[null==a?void 0:a.length]);let r=(e,l)=>{void 0!==a&&n((0,L.jM)(a,t=>{let a=t[e];a&&l(a)}))},s=(0,D.useQueryCountContext)(),d=(0,U.useMemo)(()=>{let e=(null==a?void 0:a.map(e=>e.queryIndex))??[];return Array.from({length:s},(e,l)=>l).filter((l,t)=>!e.includes(t))},[a,s]),u=(0,U.useMemo)(()=>d[0]??-1,[d]),c={queryIndex:u};return(0,E.jsxs)(W.A,{children:[0===s?(0,E.jsx)(G.A,{mb:2,fontStyle:"italic",children:"No query defined"}):(null==a?void 0:a.length)&&a.map((e,l)=>(0,E.jsx)(K,{inputRef:l===a.length-1?i:void 0,querySettings:e,availableQueryIndexes:d,onQueryIndexChange:e=>{void 0!==a&&n((0,L.jM)(a,t=>{let a=null==t?void 0:t[l];a&&(a.queryIndex=parseInt(e.target.value))}))},onColorModeChange:e=>{void 0!==a&&n((0,L.jM)(a,t=>{if(void 0!==t){let a=t[l];if(a){let l=e.target.value;l?a.colorMode=l:(a.colorMode=void 0,a.colorValue=void 0)}}}))},onColorValueChange:e=>{void 0!==a&&n((0,L.jM)(a,t=>{if(void 0!==t){let a=t[l];a&&(a.colorValue=e)}}))},onLineStyleChange:e=>{void 0!==a&&n((0,L.jM)(a,t=>{if(void 0!==t){let a=t[l];a&&(a.lineStyle=e)}}))},onAreaOpacityChange:(e,t)=>{let i;return i=Array.isArray(t)?t[0]:t,void(void 0!==a&&n((0,L.jM)(a,e=>{if(void 0!==e){let t=e[l];t&&(t.areaOpacity=i)}})))},onDelete:()=>{void 0!==a&&n((0,L.jM)(a,e=>{e.splice(l,1)}))},onAddColor:()=>{r(l,e=>{e.colorMode="fixed-single",e.colorValue=X})},onRemoveColor:()=>{r(l,e=>{e.colorMode=void 0,e.colorValue=void 0})},onAddLineStyle:()=>{r(l,e=>{e.lineStyle="solid"})},onRemoveLineStyle:()=>{r(l,e=>{e.lineStyle=void 0})},onAddAreaOpacity:()=>{r(l,e=>{e.areaOpacity=0})},onRemoveAreaOpacity:()=>{r(l,e=>{e.areaOpacity=void 0})},onAddFormat:()=>{r(l,e=>{e.format={unit:"decimal",shortValues:!0}})},onRemoveFormat:()=>{r(l,e=>{e.format=void 0})},onFormatChange:e=>{r(l,l=>{l.format=e})}},l)),s>0&&-1!==u&&(0,E.jsx)(T.A,{variant:"contained",startIcon:(0,E.jsx)(Y.default,{}),sx:{marginTop:1},onClick:()=>{o.current=!0,void 0===a?n([c]):n((0,L.jM)(a,e=>{e.push(c)}))},children:"Add Query Settings"})]})}}],createInitialOptions:function(){return{}},actions:[{component:e=>{let{queryResults:l,definition:t}=e,a=(0,U.useMemo)(()=>(0,D.extractExportableData)(l),[l]),n=(0,U.useMemo)(()=>(0,D.isExportableData)(a),[a]),i=(0,U.useCallback)(()=>{if(a&&n)try{var e,l;let n=(null==t||null==(l=t.spec)||null==(e=l.display)?void 0:e.name)||"Time Series Data",i=(0,D.exportDataAsCSV)({data:a}),o=(0,D.sanitizeFilename)(n),r=`${o}_data.csv`,s=document.createElement("a");s.href=URL.createObjectURL(i),s.download=r,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(s.href)}catch(e){console.error("Time series export failed:",e)}},[a,n,t]);return n?(0,E.jsx)(k.InfoTooltip,{description:"Export as CSV",children:(0,E.jsx)(z.A,{size:"small",onClick:i,"aria-label":"Export time series data as CSV",children:(0,E.jsx)(eA.default,{fontSize:"inherit"})})}):null},location:"header"}]}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see lib-router.1934857d.js.LICENSE.txt */
2
+ "use strict";(self["chunk_TimeSeriesChart "]=self["chunk_TimeSeriesChart "]||[]).push([["535"],{70744(e,t,r){var n,a,o,i;function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,{AO:()=>v,B6:()=>D,G3:()=>en,Gh:()=>M,HC:()=>q,HS:()=>F,HW:()=>er,Oi:()=>h,Pq:()=>z,RO:()=>L,Rr:()=>y,Sk:()=>K,TM:()=>d,V2:()=>W,VV:()=>J,aE:()=>el,o1:()=>A,pX:()=>Y,pb:()=>k,rc:()=>n,ro:()=>R,sC:()=>u,tH:()=>H,tW:()=>P,ue:()=>E,v6:()=>$,yD:()=>j,zR:()=>c}),(o=n||(n={})).Pop="POP",o.Push="PUSH",o.Replace="REPLACE";let s="popstate";function u(e){let t;void 0===e&&(e={});let{initialEntries:r=["/"],initialIndex:a,v5Compat:o=!1}=e;t=r.map((e,t)=>c(e,"string"==typeof e?null:e.state,0===t?"default":void 0));let i=u(null==a?t.length-1:a),l=n.Pop,s=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function c(e,r,n){void 0===r&&(r=null);let a=m(t?t[i].pathname:"/",e,r,n);return f("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function d(e){return"string"==typeof e?e:v(e)}return{get index(){return i},get action(){return l},get location(){return t[i]},createHref:d,createURL:e=>new URL(d(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?y(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){l=n.Push;let a=c(e,r);i+=1,t.splice(i,t.length,a),o&&s&&s({action:l,location:a,delta:1})},replace(e,r){l=n.Replace;let a=c(e,r);t[i]=a,o&&s&&s({action:l,location:a,delta:0})},go(e){l=n.Pop;let r=u(i+e),a=t[r];i=r,s&&s({action:l,location:a,delta:e})},listen:e=>(s=e,()=>{s=null})}}function c(e){return void 0===e&&(e={}),g(function(e,t){let{pathname:r,search:n,hash:a}=e.location;return m("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:v(t)},null,e)}function d(e){return void 0===e&&(e={}),g(function(e,t){let{pathname:r="/",search:n="",hash:a=""}=y(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),m("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:v(t))},function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function h(e,t){if(!1===e||null==e)throw Error(t)}function f(e,t){if(!e){"u">typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function m(e,t,r,n){return void 0===r&&(r=null),l({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?y(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function v(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function y(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function g(e,t,r,a){void 0===a&&(a={});let{window:o=document.defaultView,v5Compat:i=!1}=a,u=o.history,c=n.Pop,d=null,f=y();function y(){return(u.state||{idx:null}).idx}function g(){c=n.Pop;let e=y(),t=null==e?null:e-f;f=e,d&&d({action:c,location:w.location,delta:t})}function b(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,r="string"==typeof e?e:v(e);return h(t,"No window.location.(origin|href) available to create URL for href: "+(r=r.replace(/ $/,"%20"))),new URL(r,t)}null==f&&(f=0,u.replaceState(l({},u.state,{idx:f}),""));let w={get action(){return c},get location(){return e(o,u)},listen(e){if(d)throw Error("A history only accepts one active listener");return o.addEventListener(s,g),d=e,()=>{o.removeEventListener(s,g),d=null}},createHref:e=>t(o,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=n.Push;let a=m(w.location,e,t);r&&r(a,e);let l=p(a,f=y()+1),s=w.createHref(a);try{u.pushState(l,"",s)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(s)}i&&d&&d({action:c,location:w.location,delta:1})},replace:function(e,t){c=n.Replace;let a=m(w.location,e,t);r&&r(a,e);let o=p(a,f=y()),l=w.createHref(a);u.replaceState(o,"",l),i&&d&&d({action:c,location:w.location,delta:0})},go:e=>u.go(e)};return w}(i=a||(a={})).data="data",i.deferred="deferred",i.redirect="redirect",i.error="error";let b=new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map((e,a)=>{let o=[...r,String(a)],i="string"==typeof e.id?e.id:o.join("-");if(h(!0!==e.index||!e.children,"Cannot specify children on an index route"),h(!n[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),!0===e.index){let r=l({},e,t(e),{id:i});return n[i]=r,r}{let r=l({},e,t(e),{id:i,children:void 0});return n[i]=r,e.children&&(r.children=w(e.children,t,o,n)),r}})}function E(e,t,r){return void 0===r&&(r="/"),S(e,t,r,!1)}function S(e,t,r,n){let a=k(("string"==typeof t?y(t):t).pathname||"/",r);if(null==a)return null;let o=function e(t,r,n,a){void 0===r&&(r=[]),void 0===n&&(n=[]),void 0===a&&(a="");let o=(t,o,i)=>{var l,s;let u,c,d={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};d.relativePath.startsWith("/")&&(h(d.relativePath.startsWith(a),'Absolute route path "'+d.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),d.relativePath=d.relativePath.slice(a.length));let f=F([a,d.relativePath]),p=n.concat(d);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+f+'".'),e(t.children,r,p,f)),(null!=t.path||t.index)&&r.push({path:f,score:(l=f,s=t.index,c=(u=l.split("/")).length,u.some(C)&&(c+=-2),s&&(c+=2),u.filter(e=>!C(e)).reduce((e,t)=>e+(x.test(t)?3:""===t?1:10),c)),routesMeta:p})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[n,...a]=r,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===a.length)return o?[i,""]:[i];let l=e(a.join("/")),s=[];return s.push(...l.map(e=>""===e?i:[i,e].join("/"))),o&&s.push(...l),s.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,r);else o(e,t)}),r}(e);o.sort((e,t)=>{var r,n;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),n=t.routesMeta.map(e=>e.childrenIndex),r.length===n.length&&r.slice(0,-1).every((e,t)=>e===n[t])?r[r.length-1]-n[n.length-1]:0)});let i=null;for(let e=0;null==i&&e<o.length;++e){let t=L(a);i=function(e,t,r){void 0===r&&(r=!1);let{routesMeta:n}=e,a={},o="/",i=[];for(let e=0;e<n.length;++e){let l=n[e],s=e===n.length-1,u="/"===o?t:t.slice(o.length)||"/",c=D({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},u),d=l.route;if(!c&&s&&r&&!n[n.length-1].route.index&&(c=D({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:F([o,c.pathname]),pathnameBase:N(F([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=F([o,c.pathnameBase]))}return i}(o[e],t,n)}return i}function R(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}let x=/^:[\w-]+$/,C=e=>"*"===e;function P(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(f(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));let n=r.startsWith("/")?"/":"",a=e=>null==e?"":"string"==typeof e?e:String(e);return n+r.split(/\/+/).map((e,r,n)=>{if(r===n.length-1&&"*"===e)return a(t["*"]);let o=e.match(/^:([\w-]+)(\??)$/);if(o){let[,e,r]=o,n=t[e];return h("?"===r||null!=n,'Missing ":'+e+'" param'),a(n)}return e.replace(/\?$/g,"")}).filter(e=>!!e).join("/")}function D(e,t){var r,n,a;let o,i;"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[l,s]=(r=e.path,n=e.caseSensitive,a=e.end,void 0===n&&(n=!1),void 0===a&&(a=!0),f("*"===r||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),o=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(o.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")),r.endsWith("*")?(o.push({paramName:"*"}),i+="*"===r||"/*"===r?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==r&&"/"!==r&&(i+="(?:(?=\\/|$))"),[new RegExp(i,n?void 0:"i"),o]),u=t.match(l);if(!u)return null;let c=u[0],d=c.replace(/(.)\/+$/,"$1"),h=u.slice(1);return{params:s.reduce((e,t,r)=>{let{paramName:n,isOptional:a}=t;if("*"===n){let e=h[r]||"";d=c.slice(0,c.length-e.length).replace(/(.)\/+$/,"$1")}let o=h[r];return a&&!o?e[n]=void 0:e[n]=(o||"").replace(/%2F/g,"/"),e},{}),pathname:c,pathnameBase:d,pattern:e}}function L(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function k(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}let O=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function A(e,t){let r;void 0===t&&(t="/");let{pathname:n,search:a="",hash:o=""}="string"==typeof e?y(e):e;if(n){let e;(e=n,O.test(e))?r=n:(n.includes("//")&&f(!1,"Pathnames cannot have embedded double slashes - normalizing "+n+" -> "+(n=n.replace(/\/\/+/g,"/"))),r=n.startsWith("/")?_(n.substring(1),"/"):_(n,t))}else r=t;return{pathname:r,search:B(a),hash:I(o)}}function _(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function T(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field [")+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function U(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function j(e,t){let r=U(e);return t?r.map((e,t)=>t===r.length-1?e.pathname:e.pathnameBase):r.map(e=>e.pathnameBase)}function M(e,t,r,n){let a,o;void 0===n&&(n=!1),"string"==typeof e?a=y(e):(h(!(a=l({},e)).pathname||!a.pathname.includes("?"),T("?","pathname","search",a)),h(!a.pathname||!a.pathname.includes("#"),T("#","pathname","hash",a)),h(!a.search||!a.search.includes("#"),T("#","search","hash",a)));let i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=A(a,o),c=s&&"/"!==s&&s.endsWith("/"),d=(i||"."===s)&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}let F=e=>e.join("/").replace(/\/\/+/g,"/"),N=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",I=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",z=function(e,t){void 0===t&&(t={});let r="number"==typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),l({},r,{headers:n}))};class H extends Error{}class V{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],h(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise((e,t)=>r=t),this.controller=new AbortController;let n=()=>r(new H("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n),this.controller.signal.addEventListener("abort",n),this.data=Object.entries(e).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:this.trackPromise(r,n)})},{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then(t=>this.onSettle(r,e,void 0,t),t=>this.onSettle(r,e,t));return r.catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,n){if(this.controller.signal.aborted&&r instanceof H)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===n){let r=Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)}return void 0===n?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>n}),this.emit(!1,t),n)}emit(e,t){this.subscribers.forEach(r=>r(e,t))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((e,t)=>this.pendingKeysSet.delete(t)),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise(t=>{this.subscribe(n=>{e.removeEventListener("abort",r),(n||this.done)&&t(n)})})}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return h(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:function(e){if(!(e instanceof Promise&&!0===e._tracked))return e;if(e._error)throw e._error;return e._data}(n)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}let $=function(e,t){return void 0===t&&(t={}),new V(e,"number"==typeof t?{status:t}:t)},W=function(e,t){void 0===t&&(t=302);let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,l({},r,{headers:n}))},K=(e,t)=>{let r=W(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},q=(e,t)=>{let r=W(e,t);return r.headers.set("X-Remix-Replace","true"),r};class J{constructor(e,t,r,n){void 0===n&&(n=!1),this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Y(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}let X=["post","put","patch","delete"],G=new Set(X),Q=new Set(["get",...X]),Z=new Set([301,302,303,307,308]),ee=new Set([307,308]),et={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},er={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},en={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ea=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ei="remix-router-transitions";function el(e){let t,r,o,i,s,u,c=e.window?e.window:"u">typeof window?window:void 0,d=void 0!==c&&void 0!==c.document&&void 0!==c.document.createElement,p=!d;if(h(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){let r=e.detectErrorBoundary;t=e=>({hasErrorBoundary:r(e)})}else t=eo;let v={},y=w(e.routes,t,void 0,v),g=e.basename||"/",b=e.dataStrategy||ey,x=e.patchRoutesOnNavigation,C=l({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),P=null,D=new Set,L=null,O=null,A=null,_=null!=e.hydrationData,T=E(y,e.history.location,g),U=!1,j=null;if(null==T&&!x){let t=eO(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=ek(y);T=r,j={[n.id]:t}}if(T&&!e.hydrationData&&to(T,y,e.history.location.pathname).active&&(T=null),T)if(T.some(e=>e.route.lazy))o=!1;else if(T.some(e=>e.route.loader))if(C.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;if(r){let e=T.findIndex(e=>void 0!==r[e.route.id]);o=T.slice(0,e+1).every(e=>!eh(e.route,t,r))}else o=T.every(e=>!eh(e.route,t,r))}else o=null!=e.hydrationData;else o=!0;else if(o=!1,T=[],C.v7_partialHydration){let t=to(null,y,e.history.location.pathname);t.active&&t.matches&&(U=!0,T=t.matches)}let M={historyAction:e.history.action,location:e.history.location,matches:T,initialized:o,navigation:et,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||j,fetchers:new Map,blockers:new Map},F=n.Pop,N=!1,B=!1,I=new Map,z=null,H=!1,V=!1,$=[],W=new Set,K=new Map,q=0,J=-1,X=new Map,G=new Set,Q=new Map,el=new Map,ec=new Set,ef=new Map,ep=new Map;function ev(e,t){void 0===t&&(t={}),M=l({},M,e);let r=[],n=[];C.v7_fetcherPersist&&M.fetchers.forEach((e,t)=>{"idle"===e.state&&(ec.has(t)?n.push(t):r.push(t))}),ec.forEach(e=>{M.fetchers.has(e)||K.has(e)||n.push(e)}),[...D].forEach(e=>e(M,{deletedFetchers:n,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),C.v7_fetcherPersist?(r.forEach(e=>M.fetchers.delete(e)),n.forEach(e=>e4(e))):n.forEach(e=>ec.delete(e))}function eb(t,a,o){var i,s;let u,c,{flushSync:d}=void 0===o?{}:o,h=null!=M.actionData&&null!=M.navigation.formMethod&&eN(M.navigation.formMethod)&&"loading"===M.navigation.state&&(null==(i=t.state)?void 0:i._isRedirect)!==!0;u=a.actionData?Object.keys(a.actionData).length>0?a.actionData:null:h?M.actionData:null;let f=a.loaderData?eP(M.loaderData,a.loaderData,a.matches||[],a.errors):M.loaderData,p=M.blockers;p.size>0&&(p=new Map(p)).forEach((e,t)=>p.set(t,en));let m=!0===N||null!=M.navigation.formMethod&&eN(M.navigation.formMethod)&&(null==(s=t.state)?void 0:s._isRedirect)!==!0;if(r&&(y=r,r=void 0),H||F===n.Pop||(F===n.Push?e.history.push(t,t.state):F===n.Replace&&e.history.replace(t,t.state)),F===n.Pop){let e=I.get(M.location.pathname);e&&e.has(t.pathname)?c={currentLocation:M.location,nextLocation:t}:I.has(t.pathname)&&(c={currentLocation:t,nextLocation:M.location})}else if(B){let e=I.get(M.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),I.set(M.location.pathname,e)),c={currentLocation:M.location,nextLocation:t}}ev(l({},a,{actionData:u,loaderData:f,historyAction:F,location:t,initialized:!0,navigation:et,revalidation:"idle",restoreScrollPosition:ta(t,a.matches||M.matches),preventScrollReset:m,blockers:p}),{viewTransitionOpts:c,flushSync:!0===d}),F=n.Pop,N=!1,B=!1,H=!1,V=!1,$=[]}async function eR(t,r){if("number"==typeof t)return void e.history.go(t);let a=es(M.location,M.matches,g,C.v7_prependBasename,t,C.v7_relativeSplatPath,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:o,submission:i,error:s}=eu(C.v7_normalizeFormMethod,!1,a,r),u=M.location,c=m(M.location,o,r&&r.state);c=l({},c,e.history.encodeLocation(c));let d=r&&null!=r.replace?r.replace:void 0,h=n.Push;!0===d?h=n.Replace:!1===d||null!=i&&eN(i.formMethod)&&i.formAction===M.location.pathname+M.location.search&&(h=n.Replace);let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,p=!0===(r&&r.flushSync),v=te({currentLocation:u,nextLocation:c,historyAction:h});return v?void e9(v,{state:"blocked",location:c,proceed(){e9(v,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),eR(t,r)},reset(){let e=new Map(M.blockers);e.set(v,en),ev({blockers:e})}}):await ex(h,c,{submission:i,pendingError:s,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:p})}async function ex(t,n,o){var i,u,c,d;let h;s&&s.abort(),s=null,F=t,H=!0===(o&&o.startUninterruptedRevalidation),i=M.location,u=M.matches,L&&A&&(L[tn(i,u)]=A()),N=!0===(o&&o.preventScrollReset),B=!0===(o&&o.enableViewTransition);let f=r||y,p=o&&o.overrideNavigation,m=null!=o&&o.initialHydration&&M.matches&&M.matches.length>0&&!U?M.matches:E(f,n,g),v=!0===(o&&o.flushSync);if(m&&M.initialized&&!V&&(c=M.location,d=n,c.pathname===d.pathname&&c.search===d.search&&(""===c.hash?""!==d.hash:c.hash===d.hash||""!==d.hash||!1))&&!(o&&o.submission&&eN(o.submission.formMethod)))return void eb(n,{matches:m},{flushSync:v});let b=to(m,f,n.pathname);if(b.active&&b.matches&&(m=b.matches),!m){let{error:e,notFoundMatches:t,route:r}=tt(n.pathname);eb(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:v});return}s=new AbortController;let w=eS(e.history,n,s.signal,o&&o.submission);if(o&&o.pendingError)h=[eL(m).route.id,{type:a.error,error:o.pendingError}];else if(o&&o.submission&&eN(o.submission.formMethod)){let t=await e_(w,n,o.submission,m,b.active,{replace:o.replace,flushSync:v});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(eU(r)&&Y(r.error)&&404===r.error.status){s=null,eb(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}m=t.matches||m,h=t.pendingActionResult,p=eW(n,o.submission),v=!1,b.active=!1,w=eS(e.history,w.url,w.signal)}let{shortCircuited:S,matches:R,loaderData:x,errors:C}=await eM(w,n,m,b.active,p,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,v,h);S||(s=null,eb(n,l({matches:R||m},eD(h),{loaderData:x,errors:C})))}async function e_(t,r,o,i,l,s){var u;let c;if(void 0===s&&(s={}),eZ(),ev({navigation:{state:"submitting",location:r,formMethod:(u=o).formMethod,formAction:u.formAction,formEncType:u.formEncType,formData:u.formData,json:u.json,text:u.text}},{flushSync:!0===s.flushSync}),l){let e=await ti(i,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=eL(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:a.error,error:e.error}]}}if(e.matches)i=e.matches;else{let{notFoundMatches:e,error:t,route:n}=tt(r.pathname);return{matches:e,pendingActionResult:[n.id,{type:a.error,error:t}]}}}let d=eV(i,r);if(d.route.action||d.route.lazy){if(c=(await eG("action",M,t,[d],i,null))[d.route.id],t.signal.aborted)return{shortCircuited:!0}}else c={type:a.error,error:eO(405,{method:t.method,pathname:r.pathname,routeId:d.route.id})};if(ej(c)){let r;return r=s&&null!=s.replace?s.replace:eE(c.response.headers.get("Location"),new URL(t.url),g,e.history)===M.location.pathname+M.location.search,await eX(t,c,!0,{submission:o,replace:r}),{shortCircuited:!0}}if(eT(c))throw eO(400,{type:"defer-action"});if(eU(c)){let e=eL(i,d.route.id);return!0!==(s&&s.replace)&&(F=n.Push),{matches:i,pendingActionResult:[e.route.id,c]}}return{matches:i,pendingActionResult:[d.route.id,c]}}async function eM(t,n,a,o,i,u,c,d,h,f,p){let m=i||eW(n,u),v=u||c||e$(m),b=!H&&(!C.v7_partialHydration||!h);if(o){if(b){let e=eH(p);ev(l({navigation:m},void 0!==e?{actionData:e}:{}),{flushSync:f})}let e=await ti(a,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=eL(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)a=e.matches;else{let{error:e,notFoundMatches:t,route:r}=tt(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let w=r||y,[E,S]=ed(e.history,M,a,v,n,C.v7_partialHydration&&!0===h,C.v7_skipActionErrorRevalidation,V,$,W,ec,Q,G,w,g,p);if(tr(e=>!(a&&a.some(t=>t.route.id===e))||E&&E.some(t=>t.route.id===e)),J=++q,0===E.length&&0===S.length){let e=e2();return eb(n,l({matches:a,loaderData:{},errors:p&&eU(p[1])?{[p[0]]:p[1].error}:null},eD(p),e?{fetchers:new Map(M.fetchers)}:{}),{flushSync:f}),{shortCircuited:!0}}if(b){let e={};if(!o){e.navigation=m;let t=eH(p);void 0!==t&&(e.actionData=t)}S.length>0&&(S.forEach(e=>{let t=M.fetchers.get(e.key),r=eK(void 0,t?t.data:void 0);M.fetchers.set(e.key,r)}),e.fetchers=new Map(M.fetchers)),ev(e,{flushSync:f})}S.forEach(e=>{e3(e.key),e.controller&&K.set(e.key,e.controller)});let R=()=>S.forEach(e=>e3(e.key));s&&s.signal.addEventListener("abort",R);let{loaderResults:x,fetcherResults:P}=await eQ(M,a,E,S,t);if(t.signal.aborted)return{shortCircuited:!0};s&&s.signal.removeEventListener("abort",R),S.forEach(e=>K.delete(e.key));let D=eA(x);if(D)return await eX(t,D.result,!0,{replace:d}),{shortCircuited:!0};if(D=eA(P))return G.add(D.key),await eX(t,D.result,!0,{replace:d}),{shortCircuited:!0};let{loaderData:L,errors:k}=eC(M,a,x,p,S,P,ef);ef.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&ef.delete(t)})}),C.v7_partialHydration&&h&&M.errors&&(k=l({},M.errors,k));let O=e2(),A=e8(J),_=O||A||S.length>0;return l({matches:a,loaderData:L,errors:k},_?{fetchers:new Map(M.fetchers)}:{})}function eH(e){if(e&&!eU(e[1]))return{[e[0]]:e[1].data};if(M.actionData)if(0===Object.keys(M.actionData).length)return null;else return M.actionData}async function eJ(t,n,a,o,i,l,u,c,d){var f,p;function m(e){if(!e.route.action&&!e.route.lazy){let e=eO(405,{method:d.formMethod,pathname:a,routeId:n});return e1(t,n,e,{flushSync:u}),!0}return!1}if(eZ(),Q.delete(t),!l&&m(o))return;let v=M.fetchers.get(t);e0(t,(f=d,p=v,{state:"submitting",formMethod:f.formMethod,formAction:f.formAction,formEncType:f.formEncType,formData:f.formData,json:f.json,text:f.text,data:p?p.data:void 0}),{flushSync:u});let b=new AbortController,w=eS(e.history,a,b.signal,d);if(l){let e=await ti(i,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void e1(t,n,e.error,{flushSync:u});if(!e.matches)return void e1(t,n,eO(404,{pathname:a}),{flushSync:u});if(m(o=eV(i=e.matches,a)))return}K.set(t,b);let S=q,R=(await eG("action",M,w,[o],i,t))[o.route.id];if(w.signal.aborted){K.get(t)===b&&K.delete(t);return}if(C.v7_fetcherPersist&&ec.has(t)){if(ej(R)||eU(R))return void e0(t,eq(void 0))}else{if(ej(R))return(K.delete(t),J>S)?void e0(t,eq(void 0)):(G.add(t),e0(t,eK(d)),eX(w,R,!1,{fetcherSubmission:d,preventScrollReset:c}));if(eU(R))return void e1(t,n,R.error)}if(eT(R))throw eO(400,{type:"defer-action"});let x=M.navigation.location||M.location,P=eS(e.history,x,b.signal),D=r||y,L="idle"!==M.navigation.state?E(D,M.navigation.location,g):M.matches;h(L,"Didn't find any matches after fetcher action");let k=++q;X.set(t,k);let O=eK(d,R.data);M.fetchers.set(t,O);let[A,_]=ed(e.history,M,L,d,x,!1,C.v7_skipActionErrorRevalidation,V,$,W,ec,Q,G,D,g,[o.route.id,R]);_.filter(e=>e.key!==t).forEach(e=>{let t=e.key,r=M.fetchers.get(t),n=eK(void 0,r?r.data:void 0);M.fetchers.set(t,n),e3(t),e.controller&&K.set(t,e.controller)}),ev({fetchers:new Map(M.fetchers)});let T=()=>_.forEach(e=>e3(e.key));b.signal.addEventListener("abort",T);let{loaderResults:U,fetcherResults:j}=await eQ(M,L,A,_,P);if(b.signal.aborted)return;b.signal.removeEventListener("abort",T),X.delete(t),K.delete(t),_.forEach(e=>K.delete(e.key));let N=eA(U);if(N)return eX(P,N.result,!1,{preventScrollReset:c});if(N=eA(j))return G.add(N.key),eX(P,N.result,!1,{preventScrollReset:c});let{loaderData:B,errors:I}=eC(M,L,U,void 0,_,j,ef);if(M.fetchers.has(t)){let e=eq(R.data);M.fetchers.set(t,e)}e8(k),"loading"===M.navigation.state&&k>J?(h(F,"Expected pending action"),s&&s.abort(),eb(M.navigation.location,{matches:L,loaderData:B,errors:I,fetchers:new Map(M.fetchers)})):(ev({errors:I,loaderData:eP(M.loaderData,B,L,I),fetchers:new Map(M.fetchers)}),V=!1)}async function eY(t,r,n,a,o,i,l,s,u){let c=M.fetchers.get(t);e0(t,eK(u,c?c.data:void 0),{flushSync:l});let d=new AbortController,f=eS(e.history,n,d.signal);if(i){let e=await ti(o,new URL(f.url).pathname,f.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void e1(t,r,e.error,{flushSync:l});if(!e.matches)return void e1(t,r,eO(404,{pathname:n}),{flushSync:l});a=eV(o=e.matches,n)}K.set(t,d);let p=q,m=(await eG("loader",M,f,[a],o,t))[a.route.id];if(eT(m)&&(m=await ez(m,f.signal,!0)||m),K.get(t)===d&&K.delete(t),!f.signal.aborted){if(ec.has(t))return void e0(t,eq(void 0));if(ej(m))if(J>p)return void e0(t,eq(void 0));else{G.add(t),await eX(f,m,!1,{preventScrollReset:s});return}if(eU(m))return void e1(t,r,m.error);h(!eT(m),"Unhandled fetcher deferred data"),e0(t,eq(m.data))}}async function eX(t,r,a,o){let{submission:i,fetcherSubmission:u,preventScrollReset:f,replace:p}=void 0===o?{}:o;r.response.headers.has("X-Remix-Revalidate")&&(V=!0);let v=r.response.headers.get("Location");h(v,"Expected a Location header on the redirect Response"),v=eE(v,new URL(t.url),g,e.history);let y=m(M.location,v,{_isRedirect:!0});if(d){let t=!1;if(r.response.headers.has("X-Remix-Reload-Document"))t=!0;else if(ea.test(v)){let r=e.history.createURL(v);t=r.origin!==c.location.origin||null==k(r.pathname,g)}if(t)return void(p?c.location.replace(v):c.location.assign(v))}s=null;let b=!0===p||r.response.headers.has("X-Remix-Replace")?n.Replace:n.Push,{formMethod:w,formAction:E,formEncType:S}=M.navigation;!i&&!u&&w&&E&&S&&(i=e$(M.navigation));let R=i||u;if(ee.has(r.response.status)&&R&&eN(R.formMethod))await ex(b,y,{submission:l({},R,{formAction:v}),preventScrollReset:f||N,enableViewTransition:a?B:void 0});else{let e=eW(y,i);await ex(b,y,{overrideNavigation:e,fetcherSubmission:u,preventScrollReset:f||N,enableViewTransition:a?B:void 0})}}async function eG(e,r,n,o,i,l){let s,u={};try{s=await eg(b,e,r,n,o,i,l,v,t)}catch(e){return o.forEach(t=>{u[t.route.id]={type:a.error,error:e}}),u}for(let[e,t]of Object.entries(s)){var c;if(eF((c=t).result)&&Z.has(c.result.status)){let r=t.result;u[e]={type:a.redirect,response:function(e,t,r,n,a,o){let i=e.headers.get("Location");if(h(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!ea.test(i)){let l=n.slice(0,n.findIndex(e=>e.route.id===r)+1);i=es(new URL(t.url),l,a,!0,i,o),e.headers.set("Location",i)}return e}(r,n,e,i,g,C.v7_relativeSplatPath)}}else u[e]=await ew(t)}return u}async function eQ(t,r,n,o,i){let l=t.matches,s=eG("loader",t,i,n,r,null),u=Promise.all(o.map(async r=>{if(!r.matches||!r.match||!r.controller)return Promise.resolve({[r.key]:{type:a.error,error:eO(404,{pathname:r.path})}});{let n=(await eG("loader",t,eS(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:n}}})),c=await s,d=(await u).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([eB(r,c,i.signal,l,t.loaderData),eI(r,d,o)]),{loaderResults:c,fetcherResults:d}}function eZ(){V=!0,$.push(...tr()),Q.forEach((e,t)=>{K.has(t)&&W.add(t),e3(t)})}function e0(e,t,r){void 0===r&&(r={}),M.fetchers.set(e,t),ev({fetchers:new Map(M.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function e1(e,t,r,n){void 0===n&&(n={});let a=eL(M.matches,t);e4(e),ev({errors:{[a.route.id]:r},fetchers:new Map(M.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function e7(e){return el.set(e,(el.get(e)||0)+1),ec.has(e)&&ec.delete(e),M.fetchers.get(e)||er}function e4(e){let t=M.fetchers.get(e);K.has(e)&&!(t&&"loading"===t.state&&X.has(e))&&e3(e),Q.delete(e),X.delete(e),G.delete(e),C.v7_fetcherPersist&&ec.delete(e),W.delete(e),M.fetchers.delete(e)}function e3(e){let t=K.get(e);t&&(t.abort(),K.delete(e))}function e5(e){for(let t of e){let e=eq(e7(t).data);M.fetchers.set(t,e)}}function e2(){let e=[],t=!1;for(let r of G){let n=M.fetchers.get(r);h(n,"Expected fetcher: "+r),"loading"===n.state&&(G.delete(r),e.push(r),t=!0)}return e5(e),t}function e8(e){let t=[];for(let[r,n]of X)if(n<e){let e=M.fetchers.get(r);h(e,"Expected fetcher: "+r),"loading"===e.state&&(e3(r),X.delete(r),t.push(r))}return e5(t),t.length>0}function e6(e){M.blockers.delete(e),ep.delete(e)}function e9(e,t){let r=M.blockers.get(e)||en;h("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let n=new Map(M.blockers);n.set(e,t),ev({blockers:n})}function te(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===ep.size)return;ep.size>1&&f(!1,"A router only supports one blocker at a time");let a=Array.from(ep.entries()),[o,i]=a[a.length-1],l=M.blockers.get(o);if((!l||"proceeding"!==l.state)&&i({currentLocation:t,nextLocation:r,historyAction:n}))return o}function tt(e){let t=eO(404,{pathname:e}),{matches:n,route:a}=ek(r||y);return tr(),{notFoundMatches:n,route:a,error:t}}function tr(e){let t=[];return ef.forEach((r,n)=>{(!e||e(n))&&(r.cancel(),t.push(n),ef.delete(n))}),t}function tn(e,t){return O&&O(e,t.map(e=>R(e,M.loaderData)))||e.key}function ta(e,t){if(L){let r=L[tn(e,t)];if("number"==typeof r)return r}return null}function to(e,t,r){if(x){if(!e)return{active:!0,matches:S(t,r,g,!0)||[]};else if(Object.keys(e[0].params).length>0)return{active:!0,matches:S(t,r,g,!0)}}return{active:!1,matches:null}}async function ti(e,n,a,o){if(!x)return{type:"success",matches:e};let i=e;for(;;){let e=null==r,l=r||y,s=v;try{await x({signal:a,path:n,matches:i,fetcherKey:o,patch:(e,r)=>{a.aborted||em(e,r,l,s,t)}})}catch(e){return{type:"error",error:e,partialMatches:i}}finally{e&&!a.aborted&&(y=[...y])}if(a.aborted)return{type:"aborted"};let u=E(l,n,g);if(u)return{type:"success",matches:u};let c=S(l,n,g,!0);if(!c||i.length===c.length&&i.every((e,t)=>e.route.id===c[t].route.id))return{type:"success",matches:null};i=c}}return i={get basename(){return g},get future(){return C},get state(){return M},get routes(){return y},get window(){return c},initialize:function(){if(P=e.history.listen(t=>{let{action:r,location:n,delta:a}=t;if(u){u(),u=void 0;return}f(0===ep.size||null!=a,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=te({currentLocation:M.location,nextLocation:n,historyAction:r});if(o&&null!=a){let t=new Promise(e=>{u=e});e.history.go(-1*a),e9(o,{state:"blocked",location:n,proceed(){e9(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(a))},reset(){let e=new Map(M.blockers);e.set(o,en),ev({blockers:e})}});return}return ex(r,n)}),d){var t=c,r=I;try{let e=t.sessionStorage.getItem(ei);if(e){let t=JSON.parse(e);for(let[e,n]of Object.entries(t||{}))n&&Array.isArray(n)&&r.set(e,new Set(n||[]))}}catch(e){}let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(ei,JSON.stringify(r))}catch(e){f(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}})(c,I);c.addEventListener("pagehide",e),z=()=>c.removeEventListener("pagehide",e)}return M.initialized||ex(n.Pop,M.location,{initialHydration:!0}),i},subscribe:function(e){return D.add(e),()=>D.delete(e)},enableScrollRestoration:function(e,t,r){if(L=e,A=t,O=r||null,!_&&M.navigation===et){_=!0;let e=ta(M.location,M.matches);null!=e&&ev({restoreScrollPosition:e})}return()=>{L=null,A=null,O=null}},navigate:eR,fetch:function(e,t,n,a){if(p)throw Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");e3(e);let o=!0===(a&&a.flushSync),i=r||y,l=es(M.location,M.matches,g,C.v7_prependBasename,n,C.v7_relativeSplatPath,t,null==a?void 0:a.relative),s=E(i,l,g),u=to(s,i,l);if(u.active&&u.matches&&(s=u.matches),!s)return void e1(e,t,eO(404,{pathname:l}),{flushSync:o});let{path:c,submission:d,error:h}=eu(C.v7_normalizeFormMethod,!0,l,a);if(h)return void e1(e,t,h,{flushSync:o});let f=eV(s,c),m=!0===(a&&a.preventScrollReset);d&&eN(d.formMethod)?eJ(e,t,c,f,s,u.active,o,m,d):(Q.set(e,{routeId:t,path:c}),eY(e,t,c,f,s,u.active,o,m,d))},revalidate:function(){if(eZ(),ev({revalidation:"loading"}),"submitting"!==M.navigation.state){if("idle"===M.navigation.state)return void ex(M.historyAction,M.location,{startUninterruptedRevalidation:!0});ex(F||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:!0===B})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:e7,deleteFetcher:function(e){let t=(el.get(e)||0)-1;t<=0?(el.delete(e),ec.add(e),C.v7_fetcherPersist||e4(e)):el.set(e,t),ev({fetchers:new Map(M.fetchers)})},dispose:function(){P&&P(),z&&z(),D.clear(),s&&s.abort(),M.fetchers.forEach((e,t)=>e4(t)),M.blockers.forEach((e,t)=>e6(t))},getBlocker:function(e,t){let r=M.blockers.get(e)||en;return ep.get(e)!==t&&ep.set(e,t),r},deleteBlocker:e6,patchRoutes:function(e,n){let a=null==r;em(e,n,r||y,v,t),a&&(y=[...y],ev({}))},_internalFetchControllers:K,_internalActiveDeferreds:ef,_internalSetRoutes:function(e){r=w(e,t,void 0,v={})}}}function es(e,t,r,n,a,o,i,l){let s,u;if(i){for(let e of(s=[],t))if(s.push(e),e.route.id===i){u=e;break}}else s=t,u=t[t.length-1];let c=M(a||".",j(s,o),k(e.pathname,r)||e.pathname,"path"===l);if(null==a&&(c.search=e.search,c.hash=e.hash),(null==a||""===a||"."===a)&&u){let e=eH(c.search);if(u.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();c.search=r?"?"+r:""}}return n&&"/"!==r&&(c.pathname="/"===c.pathname?r:F([r,c.pathname])),v(c)}function eu(e,t,r,n){var a;let o,i;if(!n||!(null!=n&&("formData"in n&&null!=n.formData||"body"in n&&void 0!==n.body)))return{path:r};if(n.formMethod&&(a=n.formMethod,!Q.has(a.toLowerCase())))return{path:r,error:eO(405,{method:n.formMethod})};let l=()=>({path:r,error:eO(400,{type:"invalid-body"})}),s=n.formMethod||"get",u=e?s.toUpperCase():s.toLowerCase(),c=e_(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!eN(u))return l();let e="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,t)=>{let[r,n]=t;return""+e+r+"="+n+"\n"},""):String(n.body);return{path:r,submission:{formMethod:u,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if("application/json"===n.formEncType){if(!eN(u))return l();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:u,formAction:c,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return l()}}}if(h("function"==typeof FormData,"FormData is not available in this environment"),n.formData)o=eR(n.formData),i=n.formData;else if(n.body instanceof FormData)o=eR(n.body),i=n.body;else if(n.body instanceof URLSearchParams)i=ex(o=n.body);else if(null==n.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(n.body),i=ex(o)}catch(e){return l()}let d={formMethod:u,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(eN(d.formMethod))return{path:r,submission:d};let f=y(r);return t&&f.search&&eH(f.search)&&o.append("index",""),f.search="?"+o,{path:v(f),submission:d}}function ec(e,t,r){void 0===r&&(r=!1);let n=e.findIndex(e=>e.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function ed(e,t,r,n,a,o,i,s,u,c,d,h,f,p,m,v){let y=v?eU(v[1])?v[1].error:v[1].data:void 0,g=e.createURL(t.location),b=e.createURL(a),w=r;o&&t.errors?w=ec(r,Object.keys(t.errors)[0],!0):v&&eU(v[1])&&(w=ec(r,v[0]));let S=v?v[1].statusCode:void 0,R=i&&S&&S>=400,x=w.filter((e,r)=>{var a,i,c;let d,h,{route:f}=e;if(f.lazy)return!0;if(null==f.loader)return!1;if(o)return eh(f,t.loaderData,t.errors);if(a=t.loaderData,i=t.matches[r],c=e,d=!i||c.route.id!==i.route.id,h=void 0===a[c.route.id],d||h||u.some(t=>t===e.route.id))return!0;let p=t.matches[r];return ep(e,l({currentUrl:g,currentParams:p.params,nextUrl:b,nextParams:e.params},n,{actionResult:y,actionStatus:S,defaultShouldRevalidate:!R&&(s||g.pathname+g.search===b.pathname+b.search||g.search!==b.search||ef(p,e))}))}),C=[];return h.forEach((e,a)=>{if(o||!r.some(t=>t.route.id===e.routeId)||d.has(a))return;let i=E(p,e.path,m);if(!i)return void C.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=t.fetchers.get(a),h=eV(i,e.path),v=!1;f.has(a)?v=!1:c.has(a)?(c.delete(a),v=!0):v=u&&"idle"!==u.state&&void 0===u.data?s:ep(h,l({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:y,actionStatus:S,defaultShouldRevalidate:!R&&s})),v&&C.push({key:a,routeId:e.routeId,path:e.path,matches:i,match:h,controller:new AbortController})}),[x,C]}function eh(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=null!=t&&void 0!==t[e.id],a=null!=r&&void 0!==r[e.id];return(!!n||!a)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!n&&!a)}function ef(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ep(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function em(e,t,r,n,a){var o;let i;if(e){let t=n[e];h(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),i=t.children}else i=r;let l=w(t.filter(e=>!i.some(t=>(function e(t,r){return"id"in t&&"id"in r&&t.id===r.id||t.index===r.index&&t.path===r.path&&t.caseSensitive===r.caseSensitive&&((!t.children||0===t.children.length)&&(!r.children||0===r.children.length)||t.children.every((t,n)=>{var a;return null==(a=r.children)?void 0:a.some(r=>e(t,r))}))})(e,t))),a,[e||"_","patch",String((null==(o=i)?void 0:o.length)||"0")],n);i.push(...l)}async function ev(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];h(a,"No route found in manifest");let o={};for(let e in n){let t=void 0!==a[e]&&"hasErrorBoundary"!==e;f(!t,'Route "'+a.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||b.has(e)||(o[e]=n[e])}Object.assign(a,o),Object.assign(a,l({},t(a),{lazy:void 0}))}async function ey(e){let{matches:t}=e,r=t.filter(e=>e.shouldLoad);return(await Promise.all(r.map(e=>e.resolve()))).reduce((e,t,n)=>Object.assign(e,{[r[n].route.id]:t}),{})}async function eg(e,t,r,n,o,i,s,u,c,d){let h=i.map(e=>e.route.lazy?ev(e.route,c,u):void 0),f=i.map((e,r)=>{let i=h[r],s=o.some(t=>t.route.id===e.route.id),u=async r=>(r&&"GET"===n.method&&(e.route.lazy||e.route.loader)&&(s=!0),s?eb(t,n,e,i,r,d):Promise.resolve({type:a.data,result:void 0}));return l({},e,{shouldLoad:s,resolve:u})}),p=await e({matches:f,request:n,params:i[0].params,fetcherKey:s,context:d});try{await Promise.all(h)}catch(e){}return p}async function eb(e,t,r,n,o,i){let l,s,u=n=>{let a,l=new Promise((e,t)=>a=t);s=()=>a(),t.signal.addEventListener("abort",s);let u=a=>"function"!=typeof n?Promise.reject(Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: ')+r.route.id+"]")):n({request:t,params:r.params,context:i},...void 0!==a?[a]:[]);return Promise.race([(async()=>{try{let e=await (o?o(e=>u(e)):u());return{type:"data",result:e}}catch(e){return{type:"error",result:e}}})(),l])};try{let o=r.route[e];if(n)if(o){let e,[t]=await Promise.all([u(o).catch(t=>{e=t}),n]);if(void 0!==e)throw e;l=t}else if(await n,o=r.route[e])l=await u(o);else{if("action"!==e)return{type:a.data,result:void 0};let n=new URL(t.url),o=n.pathname+n.search;throw eO(405,{method:t.method,pathname:o,routeId:r.route.id})}else if(o)l=await u(o);else{let e=new URL(t.url),r=e.pathname+e.search;throw eO(404,{pathname:r})}h(void 0!==l.result,"You defined "+("action"===e?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `")+e+"` function. Please return a value or `null`.")}catch(e){return{type:a.error,result:e}}finally{s&&t.signal.removeEventListener("abort",s)}return l}async function ew(e){var t,r,n,o,i,l,s,u,c;let{result:d,type:h}=e;if(eF(d)){let e;try{let t=d.headers.get("Content-Type");e=t&&/\bapplication\/json\b/.test(t)?null==d.body?null:await d.json():await d.text()}catch(e){return{type:a.error,error:e}}return h===a.error?{type:a.error,error:new J(d.status,d.statusText,e),statusCode:d.status,headers:d.headers}:{type:a.data,data:e,statusCode:d.status,headers:d.headers}}if(h===a.error)return eM(d)?d.data instanceof Error?{type:a.error,error:d.data,statusCode:null==(n=d.init)?void 0:n.status,headers:null!=(o=d.init)&&o.headers?new Headers(d.init.headers):void 0}:{type:a.error,error:new J((null==(t=d.init)?void 0:t.status)||500,void 0,d.data),statusCode:Y(d)?d.status:void 0,headers:null!=(r=d.init)&&r.headers?new Headers(d.init.headers):void 0}:{type:a.error,error:d,statusCode:Y(d)?d.status:void 0};return(c=d)&&"object"==typeof c&&"object"==typeof c.data&&"function"==typeof c.subscribe&&"function"==typeof c.cancel&&"function"==typeof c.resolveData?{type:a.deferred,deferredData:d,statusCode:null==(i=d.init)?void 0:i.status,headers:(null==(l=d.init)?void 0:l.headers)&&new Headers(d.init.headers)}:eM(d)?{type:a.data,data:d.data,statusCode:null==(s=d.init)?void 0:s.status,headers:null!=(u=d.init)&&u.headers?new Headers(d.init.headers):void 0}:{type:a.data,data:d}}function eE(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(ea.test(e)){let n=new URL(e.startsWith("//")?t.protocol+e:e);if(a.includes(n.protocol))throw Error("Invalid redirect location");let o=null!=k(n.pathname,r);if(n.origin===t.origin&&o)return n.pathname+n.search+n.hash}try{let t=n.createURL(e);if(a.includes(t.protocol))throw Error("Invalid redirect location")}catch(e){}return e}function eS(e,t,r,n){let a=e.createURL(e_(t)).toString(),o={signal:r};if(n&&eN(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=eR(n.formData):o.body=n.formData}return new Request(a,o)}function eR(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function ex(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function eC(e,t,r,n,a,o,i){let s,u,c,d,f,p,{loaderData:m,errors:v}=(u={},c=null,d=!1,f={},p=n&&eU(n[1])?n[1].error:void 0,t.forEach(e=>{if(!(e.route.id in r))return;let n=e.route.id,a=r[n];if(h(!ej(a),"Cannot handle redirect results in processLoaderData"),eU(a)){let e=a.error;void 0!==p&&(e=p,p=void 0),c=c||{},1;{let r=eL(t,n);null==c[r.route.id]&&(c[r.route.id]=e)}u[n]=void 0,d||(d=!0,s=Y(a.error)?a.error.status:500),a.headers&&(f[n]=a.headers)}else eT(a)?(i.set(n,a.deferredData),u[n]=a.deferredData.data,null==a.statusCode||200===a.statusCode||d||(s=a.statusCode)):(u[n]=a.data,a.statusCode&&200!==a.statusCode&&!d&&(s=a.statusCode)),a.headers&&(f[n]=a.headers)}),void 0!==p&&n&&(c={[n[0]]:p},u[n[0]]=void 0),{loaderData:u,errors:c,statusCode:s||200,loaderHeaders:f});return a.forEach(t=>{let{key:r,match:n,controller:a}=t,i=o[r];if(h(i,"Did not find corresponding fetcher result"),!a||!a.signal.aborted)if(eU(i)){let t=eL(e.matches,null==n?void 0:n.route.id);v&&v[t.route.id]||(v=l({},v,{[t.route.id]:i.error})),e.fetchers.delete(r)}else if(ej(i))h(!1,"Unhandled fetcher revalidation redirect");else if(eT(i))h(!1,"Unhandled fetcher deferred data");else{let t=eq(i.data);e.fetchers.set(r,t)}}),{loaderData:m,errors:v}}function eP(e,t,r,n){let a=l({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(a[r]=t[r]):void 0!==e[r]&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function eD(e){return e?eU(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function eL(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function ek(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function eO(e,t){let{pathname:r,routeId:n,method:a,type:o,message:i}=void 0===t?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(l="Bad Request",a&&r&&n?s="You made a "+a+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===o?s="defer() is not supported in actions":"invalid-body"===o&&(s="Unable to encode submission body")):403===e?(l="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):404===e?(l="Not Found",s='No route matches URL "'+r+'"'):405===e&&(l="Method Not Allowed",a&&r&&n?s="You made a "+a.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+n+'", so there is no way to handle the request.':a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new J(e||500,l,Error(s),!0)}function eA(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if(ej(n))return{key:r,result:n}}}function e_(e){let t="string"==typeof e?y(e):e;return v(l({},t,{hash:""}))}function eT(e){return e.type===a.deferred}function eU(e){return e.type===a.error}function ej(e){return(e&&e.type)===a.redirect}function eM(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function eF(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function eN(e){return G.has(e.toLowerCase())}async function eB(e,t,r,n,a){let o=Object.entries(t);for(let i=0;i<o.length;i++){let[l,s]=o[i],u=e.find(e=>(null==e?void 0:e.route.id)===l);if(!u)continue;let c=n.find(e=>e.route.id===u.route.id),d=null!=c&&!ef(c,u)&&(a&&a[u.route.id])!==void 0;eT(s)&&d&&await ez(s,r,!1).then(e=>{e&&(t[l]=e)})}}async function eI(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:o,controller:i}=r[n],l=t[a];e.find(e=>(null==e?void 0:e.route.id)===o)&&eT(l)&&(h(i,"Expected an AbortController for revalidating fetcher deferred result"),await ez(l,i.signal,!0).then(e=>{e&&(t[a]=e)}))}}async function ez(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:a.data,data:e.deferredData.unwrappedData}}catch(e){return{type:a.error,error:e}}return{type:a.data,data:e.deferredData.data}}}function eH(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eV(e,t){let r="string"==typeof t?y(t).search:t.search;if(e[e.length-1].route.index&&eH(r||""))return e[e.length-1];let n=U(e);return n[n.length-1]}function e$(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n){if(null!=a)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};else if(null!=o)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};else if(void 0!==i)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function eW(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function eK(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function eq(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}Symbol("deferred")},49348(e,t,r){r.r(t),r.d(t,{AbortedDeferredError:()=>c.tH,Await:()=>u.jD,BrowserRouter:()=>U,Form:()=>z,HashRouter:()=>j,Link:()=>B,MemoryRouter:()=>u.fS,NavLink:()=>I,Navigate:()=>u.C5,NavigationType:()=>c.rc,Outlet:()=>u.sv,Route:()=>u.qh,Router:()=>u.Ix,RouterProvider:()=>_,Routes:()=>u.BV,ScrollRestoration:()=>H,UNSAFE_DataRouterContext:()=>u.sp,UNSAFE_DataRouterStateContext:()=>u.Rq,UNSAFE_ErrorResponseImpl:()=>c.VV,UNSAFE_FetchersContext:()=>P,UNSAFE_LocationContext:()=>u.yN,UNSAFE_NavigationContext:()=>u.jb,UNSAFE_RouteContext:()=>u.UX,UNSAFE_ViewTransitionContext:()=>C,UNSAFE_useRouteId:()=>u.$3,UNSAFE_useScrollRestoration:()=>et,createBrowserRouter:()=>S,createHashRouter:()=>R,createMemoryRouter:()=>u.bg,createPath:()=>c.AO,createRoutesFromChildren:()=>u.AV,createRoutesFromElements:()=>u.Eu,createSearchParams:()=>m,defer:()=>c.v6,generatePath:()=>c.tW,isRouteErrorResponse:()=>c.pX,json:()=>c.Pq,matchPath:()=>c.B6,matchRoutes:()=>c.ue,parsePath:()=>c.Rr,redirect:()=>c.V2,redirectDocument:()=>c.Sk,renderMatches:()=>u.KT,replace:()=>c.HC,resolvePath:()=>c.o1,unstable_HistoryRouter:()=>M,unstable_usePrompt:()=>en,useActionData:()=>u.mP,useAsyncError:()=>u.oI,useAsyncValue:()=>u.J8,useBeforeUnload:()=>er,useBlocker:()=>u.KP,useFetcher:()=>G,useFetchers:()=>Q,useFormAction:()=>X,useHref:()=>u.$P,useInRouterContext:()=>u.Ri,useLinkClickHandler:()=>W,useLoaderData:()=>u.LG,useLocation:()=>u.zy,useMatch:()=>u.RQ,useMatches:()=>u.FE,useNavigate:()=>u.Zp,useNavigation:()=>u.cq,useNavigationType:()=>u.wQ,useOutlet:()=>u.P1,useOutletContext:()=>u.KC,useParams:()=>u.g,useResolvedPath:()=>u.x$,useRevalidator:()=>u.vL,useRouteError:()=>u.r5,useRouteLoaderData:()=>u.Ew,useRoutes:()=>u.Ye,useSearchParams:()=>K,useSubmit:()=>Y,useViewTransitionState:()=>ea});var n,a,o,i,l=r(70451),s=r(20231),u=r(67435),c=r(70744);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function h(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}let f="application/x-www-form-urlencoded";function p(e){return null!=e&&"string"==typeof e.tagName}function m(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}let v=null,y=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function g(e){return null==e||y.has(e)?e:null}let b=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],w=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],E=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}function S(e,t){return(0,c.aE)({basename:null==t?void 0:t.basename,future:d({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,c.zR)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||x(),routes:e,mapRouteProperties:u.wE,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function R(e,t){return(0,c.aE)({basename:null==t?void 0:t.basename,future:d({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,c.TM)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||x(),routes:e,mapRouteProperties:u.wE,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function x(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=d({},t,{errors:function(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new c.VV(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){let t=window[n.__subType];if("function"==typeof t)try{let a=new t(n.message);a.stack="",r[e]=a}catch(e){}}if(null==r[e]){let t=Error(n.message);t.stack="",r[e]=t}}else r[e]=n;return r}(t.errors)})),t}let C=l.createContext({isTransitioning:!1}),P=l.createContext(new Map),D=l.startTransition,L=s.flushSync,k=l.useId;function O(e){L?L(e):e()}class A{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}}function _(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=l.useState(r.state),[i,s]=l.useState(),[c,d]=l.useState({isTransitioning:!1}),[h,f]=l.useState(),[p,m]=l.useState(),[v,y]=l.useState(),g=l.useRef(new Map),{v7_startTransition:b}=n||{},w=l.useCallback(e=>{if(b)D?D(e):e();else e()},[b]),E=l.useCallback((e,t)=>{let{deletedFetchers:n,flushSync:a,viewTransitionOpts:i}=t;e.fetchers.forEach((e,t)=>{void 0!==e.data&&g.current.set(t,e.data)}),n.forEach(e=>g.current.delete(e));let l=null==r.window||null==r.window.document||"function"!=typeof r.window.document.startViewTransition;if(!i||l)return void(a?O(()=>o(e)):w(()=>o(e)));if(a){O(()=>{p&&(h&&h.resolve(),p.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})});let t=r.window.document.startViewTransition(()=>{O(()=>o(e))});t.finished.finally(()=>{O(()=>{f(void 0),m(void 0),s(void 0),d({isTransitioning:!1})})}),O(()=>m(t));return}p?(h&&h.resolve(),p.skipTransition(),y({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(s(e),d({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))},[r.window,p,h,g,w]);l.useLayoutEffect(()=>r.subscribe(E),[r,E]),l.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new A)},[c]),l.useEffect(()=>{if(h&&i&&r.window){let e=h.promise,t=r.window.document.startViewTransition(async()=>{w(()=>o(i)),await e});t.finished.finally(()=>{f(void 0),m(void 0),s(void 0),d({isTransitioning:!1})}),m(t)}},[w,i,h,r.window]),l.useEffect(()=>{h&&i&&a.location.key===i.location.key&&h.resolve()},[h,p,a.location,i]),l.useEffect(()=>{!c.isTransitioning&&v&&(s(v.state),d({isTransitioning:!0,flushSync:!1,currentLocation:v.currentLocation,nextLocation:v.nextLocation}),y(void 0))},[c.isTransitioning,v]),l.useEffect(()=>{},[]);let S=l.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})}),[r]),R=r.basename||"/",x=l.useMemo(()=>({router:r,navigator:S,static:!1,basename:R}),[r,S,R]),L=l.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return l.useEffect(()=>(0,u.V8)(n,r.future),[n,r.future]),l.createElement(l.Fragment,null,l.createElement(u.sp.Provider,{value:x},l.createElement(u.Rq.Provider,{value:a},l.createElement(P.Provider,{value:g.current},l.createElement(C.Provider,{value:c},l.createElement(u.Ix,{basename:R,location:a.location,navigationType:a.historyAction,navigator:S,future:L},a.initialized||r.future.v7_partialHydration?l.createElement(T,{routes:r.routes,future:r.future,state:a}):t))))),null)}let T=l.memo(function(e){let{routes:t,future:r,state:n}=e;return(0,u.ph)(t,void 0,n,r)});function U(e){let{basename:t,children:r,future:n,window:a}=e,o=l.useRef();null==o.current&&(o.current=(0,c.zR)({window:a,v5Compat:!0}));let i=o.current,[s,d]=l.useState({action:i.action,location:i.location}),{v7_startTransition:h}=n||{},f=l.useCallback(e=>{h&&D?D(()=>d(e)):d(e)},[d,h]);return l.useLayoutEffect(()=>i.listen(f),[i,f]),l.useEffect(()=>(0,u.V8)(n),[n]),l.createElement(u.Ix,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function j(e){let{basename:t,children:r,future:n,window:a}=e,o=l.useRef();null==o.current&&(o.current=(0,c.TM)({window:a,v5Compat:!0}));let i=o.current,[s,d]=l.useState({action:i.action,location:i.location}),{v7_startTransition:h}=n||{},f=l.useCallback(e=>{h&&D?D(()=>d(e)):d(e)},[d,h]);return l.useLayoutEffect(()=>i.listen(f),[i,f]),l.useEffect(()=>(0,u.V8)(n),[n]),l.createElement(u.Ix,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function M(e){let{basename:t,children:r,future:n,history:a}=e,[o,i]=l.useState({action:a.action,location:a.location}),{v7_startTransition:s}=n||{},c=l.useCallback(e=>{s&&D?D(()=>i(e)):i(e)},[i,s]);return l.useLayoutEffect(()=>a.listen(c),[a,c]),l.useEffect(()=>(0,u.V8)(n),[n]),l.createElement(u.Ix,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}let F="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,N=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,B=l.forwardRef(function(e,t){let r,{onClick:n,relative:a,reloadDocument:o,replace:i,state:s,target:f,to:p,preventScrollReset:m,viewTransition:v}=e,y=h(e,b),{basename:g}=l.useContext(u.jb),w=!1;if("string"==typeof p&&N.test(p)&&(r=p,F))try{let e=new URL(window.location.href),t=new URL(p.startsWith("//")?e.protocol+p:p),r=(0,c.pb)(t.pathname,g);t.origin===e.origin&&null!=r?p=r+t.search+t.hash:w=!0}catch(e){}let E=(0,u.$P)(p,{relative:a}),S=W(p,{replace:i,state:s,target:f,preventScrollReset:m,relative:a,viewTransition:v});return l.createElement("a",d({},y,{href:r||E,onClick:w||o?n:function(e){n&&n(e),e.defaultPrevented||S(e)},ref:t,target:f}))}),I=l.forwardRef(function(e,t){let r,{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:s,to:f,viewTransition:p,children:m}=e,v=h(e,w),y=(0,u.x$)(f,{relative:v.relative}),g=(0,u.zy)(),b=l.useContext(u.Rq),{navigator:E,basename:S}=l.useContext(u.jb),R=null!=b&&ea(y)&&!0===p,x=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,C=g.pathname,P=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;a||(C=C.toLowerCase(),P=P?P.toLowerCase():null,x=x.toLowerCase()),P&&S&&(P=(0,c.pb)(P,S)||P);let D="/"!==x&&x.endsWith("/")?x.length-1:x.length,L=C===x||!i&&C.startsWith(x)&&"/"===C.charAt(D),k=null!=P&&(P===x||!i&&P.startsWith(x)&&"/"===P.charAt(x.length)),O={isActive:L,isPending:k,isTransitioning:R},A=L?n:void 0;r="function"==typeof o?o(O):[o,L?"active":null,k?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let _="function"==typeof s?s(O):s;return l.createElement(B,d({},v,{"aria-current":A,className:r,ref:t,style:_,to:f,viewTransition:p}),"function"==typeof m?m(O):m)}),z=l.forwardRef((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:a,replace:o,state:i,method:s="get",action:u,onSubmit:c,relative:f,preventScrollReset:p,viewTransition:m}=e,v=h(e,E),y=Y(),g=X(u,{relative:f}),b="get"===s.toLowerCase()?"get":"post";return l.createElement("form",d({ref:t,method:b,action:g,onSubmit:a?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,a=(null==t?void 0:t.getAttribute("formmethod"))||s;y(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:o,state:i,relative:f,preventScrollReset:p,viewTransition:m})}},v))});function H(e){let{getKey:t,storageKey:r}=e;return et({getKey:t,storageKey:r}),null}function V(e){let t=l.useContext(u.sp);return t||(0,c.Oi)(!1),t}function $(e){let t=l.useContext(u.Rq);return t||(0,c.Oi)(!1),t}function W(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i,viewTransition:s}=void 0===t?{}:t,d=(0,u.Zp)(),h=(0,u.zy)(),f=(0,u.x$)(e,{relative:i});return l.useCallback(t=>{0!==t.button||r&&"_self"!==r||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||(t.preventDefault(),d(e,{replace:void 0!==n?n:(0,c.AO)(h)===(0,c.AO)(f),state:a,preventScrollReset:o,relative:i,viewTransition:s}))},[h,d,f,n,a,r,e,o,i,s])}function K(e){let t=l.useRef(m(e)),r=l.useRef(!1),n=(0,u.zy)(),a=l.useMemo(()=>{var e,a;let o;return e=n.search,a=r.current?null:t.current,o=m(e),a&&a.forEach((e,t)=>{o.has(t)||a.getAll(t).forEach(e=>{o.append(t,e)})}),o},[n.search]),o=(0,u.Zp)(),i=l.useCallback((e,t)=>{let n=m("function"==typeof e?e(a):e);r.current=!0,o("?"+n,t)},[o,a]);return[a,i]}(n=o||(o={})).UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState",(a=i||(i={})).UseFetcher="useFetcher",a.UseFetchers="useFetchers",a.UseScrollRestoration="useScrollRestoration";let q=0,J=()=>"__"+String(++q)+"__";function Y(){let{router:e}=V(o.UseSubmit),{basename:t}=l.useContext(u.jb),r=(0,u.$3)();return l.useCallback(function(n,a){if(void 0===a&&(a={}),"u"<typeof document)throw Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{action:o,method:i,encType:l,formData:s,body:u}=function(e,t){let r,n,a,o,i;if(p(e)&&"form"===e.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?(0,c.pb)(i,t):null,r=e.getAttribute("method")||"get",a=g(e.getAttribute("enctype"))||f,o=new FormData(e)}else if(p(e)&&"button"===e.tagName.toLowerCase()||p(e)&&"input"===e.tagName.toLowerCase()&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?(0,c.pb)(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||"get",a=g(e.getAttribute("formenctype"))||g(i.getAttribute("enctype"))||f,o=new FormData(i,e),!function(){if(null===v)try{new FormData(document.createElement("form"),0),v=!1}catch(e){v=!0}return v}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?t+".":"";o.append(e+"x","0"),o.append(e+"y","0")}else t&&o.append(t,n)}}else if(p(e))throw Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');else r="get",n=null,a=f,i=e;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}(n,t);if(!1===a.navigate){let t=a.fetcherKey||J();e.fetch(t,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,flushSync:a.flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}function X(e,t){let{relative:r}=void 0===t?{}:t,{basename:n}=l.useContext(u.jb),a=l.useContext(u.UX);a||(0,c.Oi)(!1);let[o]=a.matches.slice(-1),i=d({},(0,u.x$)(e||".",{relative:r})),s=(0,u.zy)();if(null==e){i.search=s.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();i.search=r?"?"+r:""}}return(!e||"."===e)&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:(0,c.HS)([n,i.pathname])),(0,c.AO)(i)}function G(e){var t;let{key:r}=void 0===e?{}:e,{router:n}=V(o.UseFetcher),a=$(i.UseFetcher),s=l.useContext(P),h=l.useContext(u.UX),f=null==(t=h.matches[h.matches.length-1])?void 0:t.route.id;s||(0,c.Oi)(!1),h||(0,c.Oi)(!1),null==f&&(0,c.Oi)(!1);let p=k?k():"",[m,v]=l.useState(r||p);r&&r!==m?v(r):m||v(J()),l.useEffect(()=>(n.getFetcher(m),()=>{n.deleteFetcher(m)}),[n,m]);let y=l.useCallback((e,t)=>{f||(0,c.Oi)(!1),n.fetch(m,f,e,t)},[m,f,n]),g=Y(),b=l.useCallback((e,t)=>{g(e,d({},t,{navigate:!1,fetcherKey:m}))},[m,g]),w=l.useMemo(()=>l.forwardRef((e,t)=>l.createElement(z,d({},e,{navigate:!1,fetcherKey:m,ref:t}))),[m]),E=a.fetchers.get(m)||c.HW,S=s.get(m);return l.useMemo(()=>d({Form:w,submit:b,load:y},E,{data:S}),[w,b,y,E,S])}function Q(){return Array.from($(i.UseFetchers).fetchers.entries()).map(e=>{let[t,r]=e;return d({},r,{key:t})})}let Z="react-router-scroll-positions",ee={};function et(e){let{getKey:t,storageKey:r}=void 0===e?{}:e,{router:n}=V(o.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:s}=$(i.UseScrollRestoration),{basename:h}=l.useContext(u.jb),f=(0,u.zy)(),p=(0,u.FE)(),m=(0,u.cq)();l.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),function(e){let{capture:t}={};l.useEffect(()=>{let r=null!=t?{capture:t}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,t])}(l.useCallback(()=>{"idle"===m.state&&(ee[(t?t(f,p):null)||f.key]=window.scrollY);try{sessionStorage.setItem(r||Z,JSON.stringify(ee))}catch(e){}window.history.scrollRestoration="auto"},[r,t,m.state,f,p])),"u">typeof document&&(l.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(r||Z);e&&(ee=JSON.parse(e))}catch(e){}},[r]),l.useLayoutEffect(()=>{let e=t&&"/"!==h?(e,r)=>t(d({},e,{pathname:(0,c.pb)(e.pathname,h)||e.pathname}),r):t,r=null==n?void 0:n.enableScrollRestoration(ee,()=>window.scrollY,e);return()=>r&&r()},[n,h,t]),l.useLayoutEffect(()=>{if(!1!==a){if("number"==typeof a)return void window.scrollTo(0,a);if(f.hash){let e=document.getElementById(decodeURIComponent(f.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==s&&window.scrollTo(0,0)}},[f,a,s]))}function er(e,t){let{capture:r}=t||{};l.useEffect(()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}},[e,r])}function en(e){let{when:t,message:r}=e,n=(0,u.KP)(t);l.useEffect(()=>{"blocked"===n.state&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())},[n,r]),l.useEffect(()=>{"blocked"!==n.state||t||n.reset()},[n,t])}function ea(e,t){void 0===t&&(t={});let r=l.useContext(C);null==r&&(0,c.Oi)(!1);let{basename:n}=V(o.useViewTransitionState),a=(0,u.x$)(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=(0,c.pb)(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=(0,c.pb)(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=(0,c.B6)(a.pathname,s)||null!=(0,c.B6)(a.pathname,i)}},67435(e,t,r){r.d(t,{$3:()=>B,$P:()=>v,AV:()=>ed,BV:()=>eo,C5:()=>et,Eu:()=>ed,Ew:()=>$,FE:()=>H,Ix:()=>ea,J8:()=>q,KC:()=>x,KP:()=>X,KT:()=>eh,LG:()=>V,P1:()=>C,RQ:()=>w,Ri:()=>y,Rq:()=>c,UX:()=>p,V8:()=>Q,Ye:()=>L,Zp:()=>S,bg:()=>ep,cq:()=>I,fS:()=>ee,g:()=>P,jD:()=>ei,jb:()=>h,mP:()=>W,oI:()=>J,ph:()=>k,qh:()=>en,r5:()=>K,sp:()=>u,sv:()=>er,vL:()=>z,wE:()=>ef,wQ:()=>b,x$:()=>D,yN:()=>f,zy:()=>g});var n,a,o,i=r(70451),l=r(70744);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let u=i.createContext(null),c=i.createContext(null),d=i.createContext(null),h=i.createContext(null),f=i.createContext(null),p=i.createContext({outlet:null,matches:[],isDataRoute:!1}),m=i.createContext(null);function v(e,t){let{relative:r}=void 0===t?{}:t;y()||(0,l.Oi)(!1);let{basename:n,navigator:a}=i.useContext(h),{hash:o,pathname:s,search:u}=D(e,{relative:r}),c=s;return"/"!==n&&(c="/"===s?n:(0,l.HS)([n,s])),a.createHref({pathname:c,search:u,hash:o})}function y(){return null!=i.useContext(f)}function g(){return y()||(0,l.Oi)(!1),i.useContext(f).location}function b(){return i.useContext(f).navigationType}function w(e){y()||(0,l.Oi)(!1);let{pathname:t}=g();return i.useMemo(()=>(0,l.B6)(e,(0,l.RO)(t)),[t,e])}function E(e){i.useContext(h).static||i.useLayoutEffect(e)}function S(){let{isDataRoute:e}=i.useContext(p);return e?function(){let{router:e}=M(U.UseNavigateStable),t=N(j.UseNavigateStable),r=i.useRef(!1);return E(()=>{r.current=!0}),i.useCallback(function(n,a){void 0===a&&(a={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,s({fromRouteId:t},a)))},[e,t])}():function(){y()||(0,l.Oi)(!1);let e=i.useContext(u),{basename:t,future:r,navigator:n}=i.useContext(h),{matches:a}=i.useContext(p),{pathname:o}=g(),s=JSON.stringify((0,l.yD)(a,r.v7_relativeSplatPath)),c=i.useRef(!1);return E(()=>{c.current=!0}),i.useCallback(function(r,a){if(void 0===a&&(a={}),!c.current)return;if("number"==typeof r)return void n.go(r);let i=(0,l.Gh)(r,JSON.parse(s),o,"path"===a.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:(0,l.HS)([t,i.pathname])),(a.replace?n.replace:n.push)(i,a.state,a)},[t,n,s,o,e])}()}let R=i.createContext(null);function x(){return i.useContext(R)}function C(e){let t=i.useContext(p).outlet;return t?i.createElement(R.Provider,{value:e},t):t}function P(){let{matches:e}=i.useContext(p),t=e[e.length-1];return t?t.params:{}}function D(e,t){let{relative:r}=void 0===t?{}:t,{future:n}=i.useContext(h),{matches:a}=i.useContext(p),{pathname:o}=g(),s=JSON.stringify((0,l.yD)(a,n.v7_relativeSplatPath));return i.useMemo(()=>(0,l.Gh)(e,JSON.parse(s),o,"path"===r),[e,s,o,r])}function L(e,t){return k(e,t)}function k(e,t,r,n){let a;y()||(0,l.Oi)(!1);let{navigator:o}=i.useContext(h),{matches:u}=i.useContext(p),c=u[u.length-1],d=c?c.params:{};c&&c.pathname;let m=c?c.pathnameBase:"/";c&&c.route;let v=g();if(t){var b;let e="string"==typeof t?(0,l.Rr)(t):t;"/"===m||(null==(b=e.pathname)?void 0:b.startsWith(m))||(0,l.Oi)(!1),a=e}else a=v;let w=a.pathname||"/",E=w;if("/"!==m){let e=m.replace(/^\//,"").split("/");E="/"+w.replace(/^\//,"").split("/").slice(e.length).join("/")}let S=(0,l.ue)(e,{pathname:E}),R=T(S&&S.map(e=>Object.assign({},e,{params:Object.assign({},d,e.params),pathname:(0,l.HS)([m,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?m:(0,l.HS)([m,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),u,r,n);return t&&R?i.createElement(f.Provider,{value:{location:s({pathname:"/",search:"",hash:"",state:null,key:"default"},a),navigationType:l.rc.Pop}},R):R}let O=i.createElement(function(){let e=K(),t=(0,l.pX)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)},null);class A extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?i.createElement(p.Provider,{value:this.props.routeContext},i.createElement(m.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _(e){let{routeContext:t,match:r,children:n}=e,a=i.useContext(u);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),i.createElement(p.Provider,{value:t},n)}function T(e,t,r,n){var a,o;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(null==(o=n)||!o.v7_partialHydration||0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let s=e,u=null==(a=r)?void 0:a.errors;if(null!=u){let e=s.findIndex(e=>e.route.id&&(null==u?void 0:u[e.route.id])!==void 0);e>=0||(0,l.Oi)(!1),s=s.slice(0,Math.min(s.length,e+1))}let c=!1,d=-1;if(r&&n&&n.v7_partialHydration)for(let e=0;e<s.length;e++){let t=s[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(d=e),t.route.id){let{loaderData:e,errors:n}=r,a=t.route.loader&&void 0===e[t.route.id]&&(!n||void 0===n[t.route.id]);if(t.route.lazy||a){c=!0,s=d>=0?s.slice(0,d+1):[s[0]];break}}}return s.reduceRight((e,n,a)=>{var o;let l,h=!1,f=null,p=null;r&&(l=u&&n.route.id?u[n.route.id]:void 0,f=n.route.errorElement||O,c&&(d<0&&0===a?(o="route-fallback",G[o]||(G[o]=!0),h=!0,p=null):d===a&&(h=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,a+1)),v=()=>{let t;return t=l?f:h?p:n.route.Component?i.createElement(n.route.Component,null):n.route.element?n.route.element:e,i.createElement(_,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?i.createElement(A,{location:r.location,revalidation:r.revalidation,component:f,error:l,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()},null)}var U=((n=U||{}).UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n),j=((a=j||{}).UseBlocker="useBlocker",a.UseLoaderData="useLoaderData",a.UseActionData="useActionData",a.UseRouteError="useRouteError",a.UseNavigation="useNavigation",a.UseRouteLoaderData="useRouteLoaderData",a.UseMatches="useMatches",a.UseRevalidator="useRevalidator",a.UseNavigateStable="useNavigate",a.UseRouteId="useRouteId",a);function M(e){let t=i.useContext(u);return t||(0,l.Oi)(!1),t}function F(e){let t=i.useContext(c);return t||(0,l.Oi)(!1),t}function N(e){let t,r=((t=i.useContext(p))||(0,l.Oi)(!1),t),n=r.matches[r.matches.length-1];return n.route.id||(0,l.Oi)(!1),n.route.id}function B(){return N(j.UseRouteId)}function I(){return F(j.UseNavigation).navigation}function z(){let e=M(U.UseRevalidator),t=F(j.UseRevalidator);return i.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function H(){let{matches:e,loaderData:t}=F(j.UseMatches);return i.useMemo(()=>e.map(e=>(0,l.ro)(e,t)),[e,t])}function V(){let e=F(j.UseLoaderData),t=N(j.UseLoaderData);return e.errors&&null!=e.errors[t]?void console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")"):e.loaderData[t]}function $(e){return F(j.UseRouteLoaderData).loaderData[e]}function W(){let e=F(j.UseActionData),t=N(j.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function K(){var e;let t=i.useContext(m),r=F(j.UseRouteError),n=N(j.UseRouteError);return void 0!==t?t:null==(e=r.errors)?void 0:e[n]}function q(){let e=i.useContext(d);return null==e?void 0:e._data}function J(){let e=i.useContext(d);return null==e?void 0:e._error}let Y=0;function X(e){let{router:t,basename:r}=M(U.UseBlocker),n=F(j.UseBlocker),[a,o]=i.useState(""),u=i.useCallback(t=>{if("function"!=typeof e)return!!e;if("/"===r)return e(t);let{currentLocation:n,nextLocation:a,historyAction:o}=t;return e({currentLocation:s({},n,{pathname:(0,l.pb)(n.pathname,r)||n.pathname}),nextLocation:s({},a,{pathname:(0,l.pb)(a.pathname,r)||a.pathname}),historyAction:o})},[r,e]);return i.useEffect(()=>{let e=String(++Y);return o(e),()=>t.deleteBlocker(e)},[t]),i.useEffect(()=>{""!==a&&t.getBlocker(a,u)},[t,a,u]),a&&n.blockers.has(a)?n.blockers.get(a):l.G3}let G={};function Q(e,t){(null==e||e.v7_startTransition,(null==e?void 0:e.v7_relativeSplatPath)!==void 0||t&&void 0!==t.v7_relativeSplatPath,t)&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}let Z=i.startTransition;function ee(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:o}=e,s=i.useRef();null==s.current&&(s.current=(0,l.sC)({initialEntries:n,initialIndex:a,v5Compat:!0}));let u=s.current,[c,d]=i.useState({action:u.action,location:u.location}),{v7_startTransition:h}=o||{},f=i.useCallback(e=>{h&&Z?Z(()=>d(e)):d(e)},[d,h]);return i.useLayoutEffect(()=>u.listen(f),[u,f]),i.useEffect(()=>Q(o),[o]),i.createElement(ea,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:u,future:o})}function et(e){let{to:t,replace:r,state:n,relative:a}=e;y()||(0,l.Oi)(!1);let{future:o,static:s}=i.useContext(h),{matches:u}=i.useContext(p),{pathname:c}=g(),d=S(),f=JSON.stringify((0,l.Gh)(t,(0,l.yD)(u,o.v7_relativeSplatPath),c,"path"===a));return i.useEffect(()=>d(JSON.parse(f),{replace:r,state:n,relative:a}),[d,f,a,r,n]),null}function er(e){return C(e.context)}function en(e){(0,l.Oi)(!1)}function ea(e){let{basename:t="/",children:r=null,location:n,navigationType:a=l.rc.Pop,navigator:o,static:u=!1,future:c}=e;y()&&(0,l.Oi)(!1);let d=t.replace(/^\/*/,"/"),p=i.useMemo(()=>({basename:d,navigator:o,static:u,future:s({v7_relativeSplatPath:!1},c)}),[d,c,o,u]);"string"==typeof n&&(n=(0,l.Rr)(n));let{pathname:m="/",search:v="",hash:g="",state:b=null,key:w="default"}=n,E=i.useMemo(()=>{let e=(0,l.pb)(m,d);return null==e?null:{location:{pathname:e,search:v,hash:g,state:b,key:w},navigationType:a}},[d,m,v,g,b,w,a]);return null==E?null:i.createElement(h.Provider,{value:p},i.createElement(f.Provider,{children:r,value:E}))}function eo(e){let{children:t,location:r}=e;return k(ed(t),r)}function ei(e){let{children:t,errorElement:r,resolve:n}=e;return i.createElement(eu,{resolve:n,errorElement:r},i.createElement(ec,null,t))}var el=((o=el||{})[o.pending=0]="pending",o[o.success=1]="success",o[o.error=2]="error",o);let es=new Promise(()=>{});class eu extends i.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,a=el.pending;if(r instanceof Promise)if(this.state.error){a=el.error;let e=this.state.error;Object.defineProperty(n=Promise.reject().catch(()=>{}),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>e})}else r._tracked?a="_error"in(n=r)?el.error:"_data"in n?el.success:el.pending:(a=el.pending,Object.defineProperty(r,"_tracked",{get:()=>!0}),n=r.then(e=>Object.defineProperty(r,"_data",{get:()=>e}),e=>Object.defineProperty(r,"_error",{get:()=>e})));else a=el.success,Object.defineProperty(n=Promise.resolve(),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(a===el.error&&n._error instanceof l.tH)throw es;if(a===el.error&&!t)throw n._error;if(a===el.error)return i.createElement(d.Provider,{value:n,children:t});if(a===el.success)return i.createElement(d.Provider,{value:n,children:e});throw n}}function ec(e){let{children:t}=e,r=q(),n="function"==typeof t?t(r):t;return i.createElement(i.Fragment,null,n)}function ed(e,t){void 0===t&&(t=[]);let r=[];return i.Children.forEach(e,(e,n)=>{if(!i.isValidElement(e))return;let a=[...t,n];if(e.type===i.Fragment)return void r.push.apply(r,ed(e.props.children,a));e.type!==en&&(0,l.Oi)(!1),e.props.index&&e.props.children&&(0,l.Oi)(!1);let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=ed(e.props.children,a)),r.push(o)}),r}function eh(e){return T(e)}function ef(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:i.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:i.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function ep(e,t){return(0,l.aE)({basename:null==t?void 0:t.basename,future:s({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,l.sC)({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:ef,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation}).initialize()}}}]);